@alfadocs/ui-kit 1.61.0 → 1.62.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/_chunks/{actions-cell-renderer-CZWGQFKV.js → actions-cell-renderer-BXCpK2_0.js} +3 -3
- package/dist/_chunks/{agenda-card-DauvvKX6.js → agenda-card-DR9gDdKp.js} +2 -2
- package/dist/_chunks/{agenda-tray-DU7O5Z7R.js → agenda-tray-DGB1Zup-.js} +3 -3
- package/dist/_chunks/{ai-credits-notice-MBgQXxsx.js → ai-credits-notice-pK9BOmEz.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-BJHutKLE.js → ai-permission-notice-DpRmZ9Q3.js} +4 -4
- package/dist/_chunks/{ai-prompt-input-Dzos37rf.js → ai-prompt-input-DSGSe4LH.js} +2 -2
- package/dist/_chunks/{alert-BhCstf2h.js → alert-DdDpOi-P.js} +2 -2
- package/dist/_chunks/{alia-sidebar-CU3mVL9J.js → alia-sidebar-qe0quZkB.js} +6 -6
- package/dist/_chunks/{anamnesis-card-VjJOUl-t.js → anamnesis-card-CsUBOG32.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-card-cCj7LPh3.js → anamnesis-summary-card-CMzBLTiN.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-C5F08WT6.js → anamnesis-summary-rows-DFWws7mM.js} +11 -11
- package/dist/_chunks/{antenatal-schedule-timeline-CfNFrej5.js → antenatal-schedule-timeline-DuaAQj1m.js} +2 -2
- package/dist/_chunks/app-frame-DUPEwu4E.js +179 -0
- package/dist/_chunks/app-frame-context-CPszhDDb.js +10 -0
- package/dist/_chunks/{appointment-card-BXQUZlAJ.js → appointment-card-CL32sux-.js} +3 -3
- package/dist/_chunks/{appointment-peek-BvzXHYiD.js → appointment-peek-B5mcDcXt.js} +3 -3
- package/dist/_chunks/{appointment-timeline-r-q97cec.js → appointment-timeline-DaHKV81s.js} +4 -4
- package/dist/_chunks/{appointment-tray-DF_R9ldY.js → appointment-tray-qtpJt8e0.js} +3 -3
- package/dist/_chunks/{audio-recorder-Cssm6jVh.js → audio-recorder-DR-u1qbl.js} +3 -3
- package/dist/_chunks/{auth-form-parts-CravOf0L.js → auth-form-parts-Cmb41LSQ.js} +2 -2
- package/dist/_chunks/{badge-hnBt8o7n.js → badge-BUk4RjTS.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DMG06b2C.js → balance-badge-cell-F7p_ZKEg.js} +5 -5
- package/dist/_chunks/{bishop-score-DxfkcxiV.js → bishop-score-CaNTrikJ.js} +2 -2
- package/dist/_chunks/{bmi-calculator-B4kgPqt5.js → bmi-calculator-DjmQ04Ch.js} +4 -4
- package/dist/_chunks/{booking-CXaqmdF7.js → booking-CGhOtxad.js} +8 -8
- package/dist/_chunks/{button-group-Cfpyu6pc.js → button-group-DCOJhvm3.js} +3 -3
- package/dist/_chunks/{calendar-DNTVaK6b.js → calendar-DCr65Kt1.js} +3 -3
- package/dist/_chunks/{calendar-workspace-UL5xcpWa.js → calendar-workspace-Dvfl9Vf6.js} +29 -29
- package/dist/_chunks/{care-plan-card-DFQbU_Gd.js → care-plan-card-BU3p5cLr.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-bj784KRk.js → care-plan-entry-card-DPJcP34v.js} +4 -4
- package/dist/_chunks/{care-plan-header-DDhyAfVK.js → care-plan-header-CgFjQLBd.js} +3 -3
- package/dist/_chunks/{carousel.agent-Csn24G1k.js → carousel.agent-BaRsN-8H.js} +2 -2
- package/dist/_chunks/chart-DgYHN8Xq.js +991 -0
- package/dist/_chunks/{chat-input-Ck34Pnmp.js → chat-input-HtTbUUD6.js} +2 -2
- package/dist/_chunks/{chat-message-DU0X3Xnl.js → chat-message-fRLZ95O5.js} +2 -2
- package/dist/_chunks/{checkbox--ndmyokr.js → checkbox-BjDv-r3o.js} +2 -2
- package/dist/_chunks/{checkbox-group-B0oZHNT3.js → checkbox-group-Cw2H5qaq.js} +2 -2
- package/dist/_chunks/{clinical-note-card-L6FVM9Gx.js → clinical-note-card-BgURrgL5.js} +3 -3
- package/dist/_chunks/{code-block-DiC4bg-o.js → code-block-vwEv1jEa.js} +2 -2
- package/dist/_chunks/{connection-status-BAnuwayz.js → connection-status--wYsgreh.js} +3 -3
- package/dist/_chunks/{contact-profile-card-JTRbnbxy.js → contact-profile-card-VTCAmQqj.js} +3 -3
- package/dist/_chunks/control-room-rail-DUerqHeo.js +416 -0
- package/dist/_chunks/{cycle-calculator-BuFi6ZJa.js → cycle-calculator-D-rwX9Pj.js} +2 -2
- package/dist/_chunks/{dashboard-grid-DRnhIlT-.js → dashboard-grid-B2MB7SRS.js} +627 -603
- package/dist/_chunks/{data-table-DAPkhyXO.js → data-table-m7GbLJZy.js} +6 -6
- package/dist/_chunks/{data-table-tabs-2t0cdk0h.js → data-table-tabs-BfrnefV5.js} +3 -3
- package/dist/_chunks/{dependent-selector-DgaAQc-c.js → dependent-selector-DBr1AhLg.js} +3 -3
- package/dist/_chunks/{description-list-CFEw__MT.js → description-list-Q8640NHu.js} +2 -2
- package/dist/_chunks/{dev-bypass-button-dTuUuzsT.js → dev-bypass-button--CPzzRSj.js} +2 -2
- package/dist/_chunks/{document-preview-DYX669jE.js → document-preview-B1dQm292.js} +4 -4
- package/dist/_chunks/{document-scanner-C41n4pNq.js → document-scanner-CVPVLK7z.js} +2 -2
- package/dist/_chunks/{due-date-calculator-yYvX8Ww_.js → due-date-calculator-DTfxFJCM.js} +5 -5
- package/dist/_chunks/{editable-currency-cell-renderer-6LDFAWUE.js → editable-currency-cell-renderer-1ijmzNWh.js} +4 -4
- package/dist/_chunks/{editable-description-D9FsTi8e.js → editable-description-ChGNdYY8.js} +2 -2
- package/dist/_chunks/{editor-overlay-BYkcaLCj.js → editor-overlay-CpVO1-Kk.js} +2 -2
- package/dist/_chunks/{entity-summary-oD_63dlz.js → entity-summary-DXIr5_x2.js} +4 -4
- package/dist/_chunks/{error-summary-BhM8FEkl.js → error-summary-DrUfuKu1.js} +2 -2
- package/dist/_chunks/{face-scheme-C-5V3MsY.js → face-scheme-DAD-mXzM.js} +4 -4
- package/dist/_chunks/{fetal-weight-CHv2winC.js → fetal-weight-DycD_Vqr.js} +2 -2
- package/dist/_chunks/{field-array-dSkD_ePA.js → field-array-BJYc1xSu.js} +2 -2
- package/dist/_chunks/{file-manager-C8bdHsYy.js → file-manager-G0t8MWbE.js} +6 -6
- package/dist/_chunks/{fiscal-code-input-BSWwda0C.js → fiscal-code-input-DwHb2nVW.js} +2 -2
- package/dist/_chunks/{forgot-password-form-CGWV5Q1-.js → forgot-password-form-CgZkEvZy.js} +4 -4
- package/dist/_chunks/{freemium-paywall-DjjVPC-5.js → freemium-paywall-r-z48YaT.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BLccWS_4.js → gestational-age-calculator-BnCAL5a-.js} +5 -5
- package/dist/_chunks/{hcg-doubling-CnrY2OVu.js → hcg-doubling-DVDiqFyp.js} +2 -2
- package/dist/_chunks/{header-BVHAt7Fi.js → header-_TppWBpK.js} +2 -2
- package/dist/_chunks/{header-settings-C200bKyp.js → header-settings-BSH9Gk0J.js} +3 -3
- package/dist/_chunks/{heatmap-CRMr7VWC.js → heatmap-Bb0-M88T.js} +4 -4
- package/dist/_chunks/{help-me-write-templates-C9T8-DcT.js → help-me-write-templates-DFmqnsAa.js} +4 -4
- package/dist/_chunks/{hover-card-DbTmj-ea.js → hover-card-CTNhQXWS.js} +2 -2
- package/dist/_chunks/{icon-button-dNE6ENLn.js → icon-button-C_1TgRiK.js} +2 -2
- package/dist/_chunks/{icon-button-group-Du8IvZek.js → icon-button-group-NIHji7_y.js} +2 -2
- package/dist/_chunks/{icon-picker-D5NdDbCL.js → icon-picker-Dq4O32K8.js} +2 -2
- package/dist/_chunks/{info-tip-DObdz3w3.js → info-tip-cYszyg6h.js} +2 -2
- package/dist/_chunks/{key-value-pair-BNYHAZwD.js → key-value-pair-BscGwZsJ.js} +2 -2
- package/dist/_chunks/{kit-extensions-DI2nHVNw.js → kit-extensions-RnddkrXn.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-DvhzS6lu.js → link-cell-renderer-dtEYlxi2.js} +6 -6
- package/dist/_chunks/{locale-picker-Bu4YE5b2.js → locale-picker-CeveTnDK.js} +3 -3
- package/dist/_chunks/{login-dev-card-DwWWHclZ.js → login-dev-card-PnADNcI9.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-p6hPgVwy.js → marketplace-app-shell-C-2e4eCD.js} +139 -136
- package/dist/_chunks/{message-card-CvZlo3Fn.js → message-card-A3mJNqfy.js} +2 -2
- package/dist/_chunks/{message-tray-DrS_LOed.js → message-tray-Ft6vSr71.js} +3 -3
- package/dist/_chunks/{multi-select-BT23EnSA.js → multi-select-CMaAQQgb.js} +2 -2
- package/dist/_chunks/{note-attachment-Bt2cddsZ.js → note-attachment-DoVWvjWR.js} +2 -2
- package/dist/_chunks/{note-timeline-CX9nAgAR.js → note-timeline-B7l3t5DZ.js} +2 -2
- package/dist/_chunks/{notes-panel-6TElt7jQ.js → notes-panel-CTmvrqQn.js} +7 -7
- package/dist/_chunks/{notification-card-Qrs52HIA.js → notification-card-c2oX8j3F.js} +2 -2
- package/dist/_chunks/{notification-tray-DRm1z97G.js → notification-tray-BR3seWA7.js} +3 -3
- package/dist/_chunks/{operator-hero-C_Khr5IU.js → operator-hero-3_RG4Dkj.js} +2 -2
- package/dist/_chunks/{optical-prescription-DLIAhJ6f.js → optical-prescription-CxfMsbxi.js} +2 -2
- package/dist/_chunks/{panel-header-D_mTdhUp.js → panel-header-BJkaUwnl.js} +2 -2
- package/dist/_chunks/{panel-subview-CjZgdWwO.js → panel-subview-yP4qIbKS.js} +3 -3
- package/dist/_chunks/{patient-details-BjqKBY2x.js → patient-details-BNDS69Zx.js} +4 -4
- package/dist/_chunks/{patient-field-row-BiI0BPPK.js → patient-field-row-BLBi-PjO.js} +7 -7
- package/dist/_chunks/{patient-search-B5R7FyFO.js → patient-search-DOnDUVsl.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BOgnWKRV.js → patient-summary-card-T9umuZJF.js} +8 -8
- package/dist/_chunks/{payment-automation-upsell-39d5ykBi.js → payment-automation-upsell-C8MEu0t6.js} +4 -4
- package/dist/_chunks/{payment-form-v6zZuV1_.js → payment-form-i90DUuNK.js} +2 -2
- package/dist/_chunks/{payment-request-card-E3G4aVt6.js → payment-request-card-BmzNMY2a.js} +4 -4
- package/dist/_chunks/{pdf-viewer-CNQxa4tv.js → pdf-viewer-DJ9VN7cu.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BZ1d6S36.js → periodontal-chart-DCcOEYC6.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-BE5hiQnn.js → periodontal-chart-card-CxdjXFb3.js} +3 -3
- package/dist/_chunks/{periodontal-diagnosis-6wybid_W.js → periodontal-diagnosis-B9YmmVmM.js} +5 -5
- package/dist/_chunks/{periodontal-risk-chart-CgLwBj5c.js → periodontal-risk-chart-CPy7CNFe.js} +2 -2
- package/dist/_chunks/{permission-matrix-DuTkUHxe.js → permission-matrix-BoQjENGV.js} +3 -3
- package/dist/_chunks/{popover-DQr_tljb.js → popover-4ZVtH_At.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-DPbvYfCs.js → practice-profile-hero-Dfc0F60y.js} +2 -2
- package/dist/_chunks/{practice-results-Cktx7KaC.js → practice-results-B8L9ZmtR.js} +4 -4
- package/dist/_chunks/{pregnancy-dating-26fcvhAx.js → pregnancy-dating-D2XTELiw.js} +5 -5
- package/dist/_chunks/{pregnancy-weight-gain-D8q1IUCT.js → pregnancy-weight-gain-BVvyL-j1.js} +4 -4
- package/dist/_chunks/{privacy-lock-BpVgSgMb.js → privacy-lock-CEYJ8ehu.js} +2 -2
- package/dist/_chunks/{privacy-mask-BfMC57ST.js → privacy-mask-Ch7743uk.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CH4B49ij.js → product-hub-panel-D-UELdo0.js} +2 -2
- package/dist/_chunks/{public-header.agent-BHTDKMsw.js → public-header.agent-DXRA7ebK.js} +3 -3
- package/dist/_chunks/{radio-BBbMdbE_.js → radio-BZQs6_36.js} +2 -2
- package/dist/_chunks/{radio-group-DicxWJXP.js → radio-group-ChIKyeSJ.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-DR0gOeSc.js → radiograph-panel.agent-DDNUo4Ul.js} +4 -4
- package/dist/_chunks/{registration-form-B8IeB9kd.js → registration-form-BQyT_kBX.js} +5 -5
- package/dist/_chunks/{resource-chip-DQeCJzJf.js → resource-chip-DB5jDwUO.js} +2 -2
- package/dist/_chunks/{reviews-panel-CHzDqerd.js → reviews-panel-AvsVgtJu.js} +3 -3
- package/dist/_chunks/{rich-text-editor-BRuTo2hm.js → rich-text-editor-M2gT_E7f.js} +9 -9
- package/dist/_chunks/{sheet-CqvPYNLn.js → sheet-D2PfJl8n.js} +2 -2
- package/dist/_chunks/{sidebar-C9Zof0z1.js → sidebar-BS24EnYd.js} +2 -2
- package/dist/_chunks/{sign-document-D4iHS_Ug.js → sign-document-CY7xTXbm.js} +2 -2
- package/dist/_chunks/{signature-request-BH7yKI01.js → signature-request-BMCHy2ZO.js} +5 -5
- package/dist/_chunks/{signature-status-chip-DP3qRijv.js → signature-status-chip-pIoQjvH8.js} +3 -3
- package/dist/_chunks/{signed-out-frame-eaOWHpDr.js → signed-out-frame-D5DzqATh.js} +3 -3
- package/dist/_chunks/{slot-grid-DELa2Nwz.js → slot-grid-dj5f6R2w.js} +2 -2
- package/dist/_chunks/{stat-DmjGfXND.js → stat-D2PNJujA.js} +2 -2
- package/dist/_chunks/{streaming-text-bPDoG7Y3.js → streaming-text-zFViGexf.js} +2 -2
- package/dist/_chunks/{tab-bar-5GppbMGc.js → tab-bar-BEODTG6k.js} +2 -2
- package/dist/_chunks/{tag-CS5cXpfx.js → tag-DOZGz0fT.js} +2 -2
- package/dist/_chunks/{task-card-zaTU1rQa.js → task-card-BS7Uqevr.js} +2 -2
- package/dist/_chunks/{task-editor-CgGcg-2c.js → task-editor-DoiOzNiC.js} +9 -9
- package/dist/_chunks/{task-tray-DGMwogWu.js → task-tray-eQU4KJcA.js} +3 -3
- package/dist/_chunks/{tasks-panel-xGtiEdcj.js → tasks-panel-8nLwBw6P.js} +7 -7
- package/dist/_chunks/{theme-toggle-_cfYEK73.js → theme-toggle-Ctb77x6O.js} +3 -3
- package/dist/_chunks/{toast-CNUydTgT.js → toast-6T519aLz.js} +2 -2
- package/dist/_chunks/tool-rail-C-03rH2I.js +973 -0
- package/dist/_chunks/tooltip-uEBdD1-5.js +178 -0
- package/dist/_chunks/{tooth-scheme-05DsRMA5.js → tooth-scheme-Dkh4JwzT.js} +2 -2
- package/dist/_chunks/{transcript-panel-CjsiDB1K.js → transcript-panel-XudW5l6l.js} +2 -2
- package/dist/_chunks/{treatment-receipt-BSVOfStA.js → treatment-receipt-BdJ36vNP.js} +3 -3
- package/dist/_chunks/{use-appointment-details-read-BGVthJFx.js → use-appointment-details-read-Gu0ehyxj.js} +16 -16
- package/dist/_chunks/use-edge-resize-CBtem0j2.js +171 -0
- package/dist/_chunks/{voice-control-panel-DyKEaFxt.js → voice-control-panel-C0BfY23Y.js} +4 -4
- package/dist/_chunks/{warning-stack-CAL9xVo1.js → warning-stack-HYWAytZV.js} +3 -3
- package/dist/_chunks/{widget-picker-CkhoG4Rj.js → widget-picker-DlNPGcnu.js} +2 -2
- package/dist/_chunks/{workflow-map-BUYG1oXU.js → workflow-map-C2B2qIr1.js} +5 -5
- package/dist/agent-catalog.json +13 -1
- package/dist/agent-i18n/en.json +10 -0
- package/dist/components/_shared/use-apex-legend-scroll.d.ts +7 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/app-frame/app-frame-context.d.ts +19 -0
- package/dist/components/app-frame/app-frame.d.ts +3 -0
- package/dist/components/app-frame/index.d.ts +2 -0
- package/dist/components/app-frame/index.js +4 -2
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/chart.d.ts +3 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +10 -4
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/resource-chip/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +7 -2
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +7 -0
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-edge-resize.d.ts +5 -1
- package/dist/index.js +778 -776
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +3 -0
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +8 -1
- package/package.json +1 -1
- package/dist/_chunks/app-frame-CqmDh2v5.js +0 -134
- package/dist/_chunks/chart-D7PbNO_M.js +0 -920
- package/dist/_chunks/control-room-rail-BbBEIdws.js +0 -379
- package/dist/_chunks/tool-rail-Blgibz0a.js +0 -816
- package/dist/_chunks/tooltip-Cp-PLePW.js +0 -119
- package/dist/_chunks/use-edge-resize-DHbyQwu8.js +0 -149
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { I as
|
|
6
|
-
import { D as
|
|
7
|
-
import { T as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { P as
|
|
11
|
-
import { X as
|
|
12
|
-
import { G as
|
|
13
|
-
import { E as
|
|
1
|
+
import { jsxs as ge, jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Dt, useRef as S, useState as J, useCallback as L, useMemo as se, useEffect as B, useImperativeHandle as Pt, useContext as Wt, Children as Ht, isValidElement as zt, Fragment as Xt, createContext as Ft, cloneElement as lt } from "react";
|
|
3
|
+
import { c as ue } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as xt } from "react-i18next";
|
|
5
|
+
import { I as Fe } from "./icon-button-C_1TgRiK.js";
|
|
6
|
+
import { D as Ie } from "./dropdown-menu-D1we7oAY.js";
|
|
7
|
+
import { T as Yt } from "./tooltip-uEBdD1-5.js";
|
|
8
|
+
import { u as re } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
9
|
+
import { u as Ot } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { P as jt } from "./plus-DzMQ_c6b.js";
|
|
11
|
+
import { X as Vt } from "./x-B5YnXwCz.js";
|
|
12
|
+
import { G as $t } from "./grip-vertical-onSb1JXO.js";
|
|
13
|
+
import { E as qt } from "./ellipsis-dRo9ouSU.js";
|
|
14
14
|
import { c as Kt } from "./createLucideIcon-DhHxpK9K.js";
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v1.22.0 - ISC
|
|
@@ -22,7 +22,7 @@ const Ut = [
|
|
|
22
22
|
["path", { d: "M19 13v6h-6", key: "1hxl6d" }],
|
|
23
23
|
["path", { d: "M5 11V5h6", key: "12e2xe" }],
|
|
24
24
|
["path", { d: "m5 5 14 14", key: "11anup" }]
|
|
25
|
-
],
|
|
25
|
+
], Bt = Kt("move-diagonal-2", Ut), Jt = {
|
|
26
26
|
id: "dashboard-grid",
|
|
27
27
|
// The board's whole purpose is in-place rearrangement of its widgets.
|
|
28
28
|
// `scroll` is backed by reveal_widget (the catalogue's name heuristic
|
|
@@ -83,7 +83,7 @@ const Ut = [
|
|
|
83
83
|
],
|
|
84
84
|
descriptionKey: "ui.agent.dashboardGrid.actions.revealWidget",
|
|
85
85
|
description: "Scroll a widget into view (its scrolling ancestor and the window) and highlight it briefly. Works in view and edit mode, and for a widget added a moment ago. Does not move focus.",
|
|
86
|
-
invoke: (r,
|
|
86
|
+
invoke: (r, i) => r.revealWidget(i.id)
|
|
87
87
|
},
|
|
88
88
|
move_widget: {
|
|
89
89
|
// Rearranging the board mutates user configuration — a write,
|
|
@@ -116,7 +116,7 @@ const Ut = [
|
|
|
116
116
|
],
|
|
117
117
|
descriptionKey: "ui.agent.dashboardGrid.actions.moveWidget",
|
|
118
118
|
description: "Move a widget to a cell. Out-of-bounds targets are clamped; colliding widgets are pushed down and the layout re-compacts. Refused while edit mode is off or the board is stacked.",
|
|
119
|
-
invoke: (r,
|
|
119
|
+
invoke: (r, i) => r.moveWidgetTo(i.id, i.x, i.y)
|
|
120
120
|
},
|
|
121
121
|
resize_widget: {
|
|
122
122
|
safety: "write",
|
|
@@ -147,7 +147,7 @@ const Ut = [
|
|
|
147
147
|
],
|
|
148
148
|
descriptionKey: "ui.agent.dashboardGrid.actions.resizeWidget",
|
|
149
149
|
description: "Resize a widget to a span. Clamped to the grid and the widget’s min/max; colliding widgets are pushed down. Refused while edit mode is off or the board is stacked.",
|
|
150
|
-
invoke: (r,
|
|
150
|
+
invoke: (r, i) => r.resizeWidgetTo(i.id, i.w, i.h)
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
domHooks: {
|
|
@@ -167,146 +167,146 @@ const Ut = [
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
function
|
|
171
|
-
return r.x <
|
|
170
|
+
function X(r, i) {
|
|
171
|
+
return r.x < i.x + i.w && i.x < r.x + r.w && r.y < i.y + i.h && i.y < r.y + r.h;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
const
|
|
175
|
-
return { ...r, x:
|
|
173
|
+
function Ne(r, i) {
|
|
174
|
+
const s = Math.max(1, r.minW ?? 1), l = Math.max(1, r.minH ?? 1), g = Math.min(i, r.maxW ?? i), N = r.maxH ?? Number.POSITIVE_INFINITY, p = Math.min(Math.max(r.w, s), g), a = Math.min(Math.max(r.h, l), N), I = Math.min(Math.max(0, r.x), i - p), W = Math.max(0, r.y);
|
|
175
|
+
return { ...r, x: I, y: W, w: p, h: a };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
if (
|
|
179
|
-
for (let
|
|
180
|
-
if (!
|
|
181
|
-
(g) => g.x >= r.x + r.w &&
|
|
177
|
+
function ut(r, i) {
|
|
178
|
+
if (i.some((s) => X(s, r))) return !1;
|
|
179
|
+
for (let s = r.y; s < r.y + r.h; s += 1)
|
|
180
|
+
if (!i.some(
|
|
181
|
+
(g) => g.x >= r.x + r.w && s >= g.y && s < g.y + g.h
|
|
182
182
|
)) return !1;
|
|
183
183
|
return !0;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return Math.abs(r.y *
|
|
185
|
+
function ft(r, i, s) {
|
|
186
|
+
return Math.abs(r.y * s + r.x - (i.y * s + i.x));
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const g = r.map((o) =>
|
|
188
|
+
function oe(r, i, s, l) {
|
|
189
|
+
const g = r.map((o) => Ne(o, i)), N = [...g].sort((o, w) => o.id === s ? -1 : w.id === s ? 1 : o.y - w.y || o.x - w.x), p = [], a = s ? g.find((o) => o.id === s) : void 0, I = /* @__PURE__ */ new Set();
|
|
190
190
|
for (const o of N) {
|
|
191
|
-
if (o.id !==
|
|
192
|
-
if (a &&
|
|
193
|
-
const
|
|
194
|
-
!
|
|
191
|
+
if (o.id !== s) {
|
|
192
|
+
if (a && X(a, o)) {
|
|
193
|
+
const w = { ...o, y: Math.max(0, a.y - o.h) };
|
|
194
|
+
!X(a, w) && !p.some((x) => x.id !== s && X(x, w)) && (o.y = w.y);
|
|
195
195
|
}
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
let
|
|
200
|
-
for (;
|
|
201
|
-
|
|
196
|
+
if (p.some((w) => X(w, o))) {
|
|
197
|
+
I.add(o.id);
|
|
198
|
+
const w = g.filter((k) => k.id !== o.id);
|
|
199
|
+
let x = o.y;
|
|
200
|
+
for (; p.some((k) => X(k, { ...o, y: x })); )
|
|
201
|
+
x += 1;
|
|
202
202
|
let _ = null;
|
|
203
|
-
for (let
|
|
204
|
-
for (let
|
|
205
|
-
const
|
|
206
|
-
(
|
|
203
|
+
for (let k = Math.max(0, o.y - o.h); k <= x; k += 1)
|
|
204
|
+
for (let E = 0; E <= i - o.w; E += 1) {
|
|
205
|
+
const H = { ...o, x: E, y: k };
|
|
206
|
+
(ut(H, w) || l !== void 0 && X(l, H) && !w.some(($) => X($, H))) && (!_ || ft({ x: E, y: k }, o, i) < ft(_, o, i)) && (_ = { x: E, y: k });
|
|
207
207
|
}
|
|
208
208
|
if (_)
|
|
209
209
|
o.x = _.x, o.y = _.y;
|
|
210
210
|
else {
|
|
211
|
-
o.y =
|
|
212
|
-
const
|
|
213
|
-
for (;
|
|
211
|
+
o.y = x;
|
|
212
|
+
const k = a !== void 0 && a.x < o.x && o.x < a.x + a.w, E = a ? a.x : o.x;
|
|
213
|
+
for (; k && o.x > E && !w.some((H) => X(H, { ...o, x: o.x - 1 })); )
|
|
214
214
|
o.x -= 1;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
for (;
|
|
217
|
+
for (; p.some((w) => X(w, o)); )
|
|
218
218
|
o.y += 1;
|
|
219
219
|
for (; o.y > 0; ) {
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
220
|
+
const w = { ...o, y: o.y - 1 };
|
|
221
|
+
if (p.some((x) => X(x, w))) break;
|
|
222
222
|
o.y -= 1;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
|
|
225
|
+
p.push(o);
|
|
226
226
|
}
|
|
227
|
-
const
|
|
228
|
-
for (const o of
|
|
229
|
-
if (o.id ===
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
for (let _ = 0; _ < o.y && !
|
|
233
|
-
const
|
|
227
|
+
const W = a ? [...p].sort((o, w) => o.y - w.y || o.x - w.x) : [];
|
|
228
|
+
for (const o of W) {
|
|
229
|
+
if (o.id === s || I.has(o.id)) continue;
|
|
230
|
+
const w = p.filter((_) => _.id !== o.id);
|
|
231
|
+
let x = null;
|
|
232
|
+
for (let _ = 0; _ < o.y && !x; _ += 1) {
|
|
233
|
+
const k = Array.from(
|
|
234
234
|
{ length: 2 * o.w + 1 },
|
|
235
|
-
(
|
|
236
|
-
).filter((
|
|
237
|
-
for (const
|
|
238
|
-
if (
|
|
239
|
-
|
|
235
|
+
(E, H) => o.x - o.w + H
|
|
236
|
+
).filter((E) => E >= 0 && E <= i - o.w).sort((E, H) => Math.abs(E - o.x) - Math.abs(H - o.x) || E - H);
|
|
237
|
+
for (const E of k)
|
|
238
|
+
if (ut({ ...o, x: E, y: _ }, w)) {
|
|
239
|
+
x = { x: E, y: _ };
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
if (
|
|
244
|
-
for (o.x =
|
|
243
|
+
if (x)
|
|
244
|
+
for (o.x = x.x, o.y = x.y; o.y > 0; ) {
|
|
245
245
|
const _ = { ...o, y: o.y - 1 };
|
|
246
|
-
if (
|
|
246
|
+
if (w.some((k) => X(k, _))) break;
|
|
247
247
|
o.y -= 1;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
const
|
|
251
|
-
return r.map((o) =>
|
|
250
|
+
const b = new Map(p.map((o) => [o.id, o]));
|
|
251
|
+
return r.map((o) => b.get(o.id));
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function Qt(r, i, s, l, g) {
|
|
254
254
|
const N = r.map(
|
|
255
|
-
(
|
|
255
|
+
(p) => p.id === i ? Ne({ ...p, x: s, y: l }, g) : p
|
|
256
256
|
);
|
|
257
|
-
return
|
|
257
|
+
return oe(
|
|
258
258
|
N,
|
|
259
259
|
g,
|
|
260
|
-
|
|
261
|
-
r.find((
|
|
260
|
+
i,
|
|
261
|
+
r.find((p) => p.id === i)
|
|
262
262
|
);
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Zt(r, i, s, l, g) {
|
|
265
265
|
const N = r.map(
|
|
266
|
-
(
|
|
266
|
+
(p) => p.id === i ? (
|
|
267
267
|
// Resizing never moves the widget: the width clamps to the space
|
|
268
268
|
// between its position and the grid edge (clampRect would slide it).
|
|
269
269
|
// minW wins over the edge clamp so clampRect cannot re-raise w and
|
|
270
270
|
// slide x as a side effect.
|
|
271
|
-
|
|
271
|
+
Ne(
|
|
272
272
|
{
|
|
273
|
-
...
|
|
274
|
-
w: Math.max(
|
|
273
|
+
...p,
|
|
274
|
+
w: Math.max(p.minW ?? 1, Math.min(s, g - p.x)),
|
|
275
275
|
h: l
|
|
276
276
|
},
|
|
277
277
|
g
|
|
278
278
|
)
|
|
279
|
-
) :
|
|
279
|
+
) : p
|
|
280
280
|
);
|
|
281
|
-
return
|
|
281
|
+
return oe(N, g, i);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const g = Math.min(Math.max(1,
|
|
285
|
-
for (let
|
|
286
|
-
for (let a = 0; a <=
|
|
287
|
-
const
|
|
283
|
+
function mt(r, i, s, l) {
|
|
284
|
+
const g = Math.min(Math.max(1, s), i), N = r.reduce((p, a) => Math.max(p, a.y + a.h), 0);
|
|
285
|
+
for (let p = 0; p <= N; p += 1)
|
|
286
|
+
for (let a = 0; a <= i - g; a += 1) {
|
|
287
|
+
const I = {
|
|
288
288
|
x: a,
|
|
289
|
-
y:
|
|
289
|
+
y: p,
|
|
290
290
|
w: g,
|
|
291
291
|
h: l
|
|
292
292
|
};
|
|
293
|
-
if (!r.some((
|
|
294
|
-
return { x: a, y:
|
|
293
|
+
if (!r.some((W) => X(W, I)))
|
|
294
|
+
return { x: a, y: p };
|
|
295
295
|
}
|
|
296
296
|
return { x: 0, y: N };
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
return r.reduce((
|
|
298
|
+
function kt(r) {
|
|
299
|
+
return r.reduce((i, s) => Math.max(i, s.y + s.h), 0);
|
|
300
300
|
}
|
|
301
|
-
const
|
|
302
|
-
function
|
|
303
|
-
return
|
|
301
|
+
const er = 24;
|
|
302
|
+
function pt(r, i, s) {
|
|
303
|
+
return i === void 0 || !Number.isFinite(i) || i <= 0 ? !1 : !Number.isFinite(r) || r <= 0 ? s : s ? r < i + er : r < i;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
const
|
|
307
|
-
return r.map((l, g) => ({ id: l, index: g, entry:
|
|
305
|
+
function tr(r, i) {
|
|
306
|
+
const s = new Map(i.map((l) => [l.id, l]));
|
|
307
|
+
return r.map((l, g) => ({ id: l, index: g, entry: s.get(l) })).sort((l, g) => !l.entry || !g.entry ? l.entry ? -1 : g.entry ? 1 : l.index - g.index : l.entry.y - g.entry.y || l.entry.x - g.entry.x || l.index - g.index).map(({ id: l }) => l);
|
|
308
308
|
}
|
|
309
|
-
const
|
|
309
|
+
const rr = ue(
|
|
310
310
|
[
|
|
311
311
|
"ds:grid ds:w-full",
|
|
312
312
|
// A stacking context: a grabbed widget's lift stays inside the board.
|
|
@@ -337,7 +337,7 @@ const tr = le(
|
|
|
337
337
|
},
|
|
338
338
|
defaultVariants: { stacked: !1 }
|
|
339
339
|
}
|
|
340
|
-
),
|
|
340
|
+
), nr = ue(
|
|
341
341
|
[
|
|
342
342
|
"ds:relative ds:min-h-0 ds:min-w-0 ds:overflow-hidden",
|
|
343
343
|
// Its own stacking context: a sticky or raised layer inside a widget
|
|
@@ -396,7 +396,7 @@ const tr = le(
|
|
|
396
396
|
],
|
|
397
397
|
defaultVariants: { stacked: !1, stackedHeight: "grid" }
|
|
398
398
|
}
|
|
399
|
-
),
|
|
399
|
+
), ir = ue(
|
|
400
400
|
"ds:ps-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]",
|
|
401
401
|
{
|
|
402
402
|
variants: {
|
|
@@ -419,7 +419,7 @@ const tr = le(
|
|
|
419
419
|
},
|
|
420
420
|
defaultVariants: { fit: "box", editing: !1 }
|
|
421
421
|
}
|
|
422
|
-
), sr =
|
|
422
|
+
), sr = ue(
|
|
423
423
|
[
|
|
424
424
|
"ds:absolute ds:bottom-[var(--spacing-2xs)] ds:end-[var(--spacing-2xs)]",
|
|
425
425
|
"ds:inline-flex ds:size-[var(--spacing-lg)] ds:items-center ds:justify-center",
|
|
@@ -433,7 +433,7 @@ const tr = le(
|
|
|
433
433
|
"ds:before:size-[var(--min-target-size)]",
|
|
434
434
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
435
435
|
].join(" ")
|
|
436
|
-
),
|
|
436
|
+
), gt = ue(
|
|
437
437
|
"ds:items-center ds:gap-[calc(var(--min-target-size)_-_var(--spacing-xl))]",
|
|
438
438
|
{
|
|
439
439
|
variants: {
|
|
@@ -445,7 +445,7 @@ const tr = le(
|
|
|
445
445
|
},
|
|
446
446
|
defaultVariants: { when: "always" }
|
|
447
447
|
}
|
|
448
|
-
),
|
|
448
|
+
), Ye = "ds:bg-[var(--card)] ds:data-[component=icon-button]:sm:before:block", or = ue(
|
|
449
449
|
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]",
|
|
450
450
|
{
|
|
451
451
|
variants: {
|
|
@@ -456,173 +456,187 @@ const tr = le(
|
|
|
456
456
|
},
|
|
457
457
|
defaultVariants: { editing: !1 }
|
|
458
458
|
}
|
|
459
|
-
),
|
|
459
|
+
), dr = ue(
|
|
460
460
|
[
|
|
461
461
|
"ds:m-0 ds:min-w-0 ds:flex-1 ds:truncate ds:text-sm ds:font-medium",
|
|
462
462
|
"ds:rounded-[var(--radius-sm)]",
|
|
463
463
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
464
464
|
].join(" ")
|
|
465
|
-
),
|
|
465
|
+
), St = Ft(
|
|
466
466
|
null
|
|
467
467
|
);
|
|
468
|
-
function
|
|
468
|
+
function ht(r) {
|
|
469
469
|
return r !== void 0 && Number.isFinite(r) && r >= 1 ? Math.floor(r) : void 0;
|
|
470
470
|
}
|
|
471
|
-
function Le(r,
|
|
472
|
-
|
|
473
|
-
if (
|
|
474
|
-
if (
|
|
471
|
+
function Le(r, i) {
|
|
472
|
+
Ht.forEach(r, (s) => {
|
|
473
|
+
if (zt(s)) {
|
|
474
|
+
if (s.type === Xt) {
|
|
475
475
|
Le(
|
|
476
|
-
|
|
477
|
-
|
|
476
|
+
s.props.children,
|
|
477
|
+
i
|
|
478
478
|
);
|
|
479
479
|
return;
|
|
480
480
|
}
|
|
481
|
-
s
|
|
481
|
+
i(s);
|
|
482
482
|
}
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Mt({
|
|
486
486
|
id: r,
|
|
487
|
-
title:
|
|
488
|
-
minStackedHeight:
|
|
487
|
+
title: i,
|
|
488
|
+
minStackedHeight: s,
|
|
489
489
|
actions: l,
|
|
490
490
|
actionsSlot: g,
|
|
491
491
|
children: N
|
|
492
492
|
}) {
|
|
493
|
-
var
|
|
494
|
-
const { t:
|
|
495
|
-
if (
|
|
496
|
-
if (!
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
const
|
|
502
|
-
return
|
|
503
|
-
|
|
493
|
+
var fe, de, T;
|
|
494
|
+
const { t: p } = xt("ui"), a = Wt(St), I = S(null), W = S(null), b = a == null ? void 0 : a.layoutById.get(r), [o, w] = J(null), [x, _] = J(!1), [k, E] = J(!1), [H, A] = J(!1);
|
|
495
|
+
if (B(() => {
|
|
496
|
+
if (!o) return;
|
|
497
|
+
const h = () => _(o.scrollWidth > o.clientWidth);
|
|
498
|
+
h();
|
|
499
|
+
const z = typeof document < "u" ? document.fonts : void 0;
|
|
500
|
+
z == null || z.addEventListener("loadingdone", h);
|
|
501
|
+
const q = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(h);
|
|
502
|
+
return q == null || q.observe(o), () => {
|
|
503
|
+
z == null || z.removeEventListener("loadingdone", h), q == null || q.disconnect();
|
|
504
504
|
};
|
|
505
|
-
}, [
|
|
506
|
-
|
|
507
|
-
}, [
|
|
508
|
-
const
|
|
509
|
-
!
|
|
505
|
+
}, [o, i]), B(() => {
|
|
506
|
+
x || A(!1);
|
|
507
|
+
}, [x]), re(() => {
|
|
508
|
+
const h = I.current;
|
|
509
|
+
!h || !b || (h.style.setProperty("--dg-x", String(b.x + 1)), h.style.setProperty("--dg-y", String(b.y + 1)), h.style.setProperty("--dg-w", String(b.w)), h.style.setProperty("--dg-h", String(b.h)), h.style.setProperty(
|
|
510
510
|
"--dg-min-stacked",
|
|
511
|
-
|
|
511
|
+
s !== void 0 && Number.isFinite(s) && s > 0 ? `${s}px` : "auto"
|
|
512
512
|
));
|
|
513
|
-
}, [
|
|
514
|
-
const
|
|
513
|
+
}, [b == null ? void 0 : b.x, b == null ? void 0 : b.y, b == null ? void 0 : b.w, b == null ? void 0 : b.h, b, s]), !a || !b) return null;
|
|
514
|
+
const $ = ((fe = a.grab) == null ? void 0 : fe.id) === r, G = a.editing, M = [
|
|
515
515
|
...l ?? [],
|
|
516
|
-
...
|
|
516
|
+
...G && a.canRemove ? [
|
|
517
517
|
{
|
|
518
|
-
id:
|
|
519
|
-
label:
|
|
520
|
-
icon: /* @__PURE__ */ R(
|
|
518
|
+
id: bt,
|
|
519
|
+
label: p("dashboardGrid.remove", { title: i }),
|
|
520
|
+
icon: /* @__PURE__ */ R(Vt, {}),
|
|
521
521
|
onSelect: () => a.requestRemove(r)
|
|
522
522
|
}
|
|
523
523
|
] : []
|
|
524
|
-
],
|
|
525
|
-
return /* @__PURE__ */
|
|
524
|
+
], xe = M.length > 1, Q = a.headingLevel ? `h${a.headingLevel}` : "span";
|
|
525
|
+
return /* @__PURE__ */ ge(
|
|
526
526
|
"div",
|
|
527
527
|
{
|
|
528
|
-
ref:
|
|
528
|
+
ref: I,
|
|
529
529
|
role: "listitem",
|
|
530
|
-
"aria-label":
|
|
530
|
+
"aria-label": i,
|
|
531
531
|
"data-component": "dashboard-grid-widget",
|
|
532
532
|
"data-widget-id": r,
|
|
533
|
-
"data-grabbed":
|
|
533
|
+
"data-grabbed": $ || void 0,
|
|
534
534
|
"data-selected": a.selectedId === r || void 0,
|
|
535
535
|
"data-revealed": a.revealedId === r || void 0,
|
|
536
536
|
"aria-current": a.selectedId === r ? "true" : void 0,
|
|
537
|
-
className:
|
|
537
|
+
className: nr({
|
|
538
538
|
stacked: a.stacked,
|
|
539
539
|
stackedHeight: a.stackedHeight
|
|
540
540
|
}),
|
|
541
541
|
children: [
|
|
542
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ ge(
|
|
543
543
|
"div",
|
|
544
544
|
{
|
|
545
|
-
className:
|
|
546
|
-
onPointerDown:
|
|
545
|
+
className: or({ editing: G }),
|
|
546
|
+
onPointerDown: G ? (h) => a.startHeaderPress(r, h) : void 0,
|
|
547
547
|
children: [
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
G ? /* @__PURE__ */ R(
|
|
549
|
+
Fe,
|
|
550
550
|
{
|
|
551
551
|
size: "sm",
|
|
552
552
|
intent: "outline",
|
|
553
553
|
type: "button",
|
|
554
|
-
icon: /* @__PURE__ */ R(
|
|
555
|
-
"aria-label":
|
|
556
|
-
"aria-pressed":
|
|
557
|
-
className: `ds:cursor-grab ds:touch-none ${
|
|
558
|
-
onPointerDown: (
|
|
559
|
-
onKeyDown: (
|
|
554
|
+
icon: /* @__PURE__ */ R($t, {}),
|
|
555
|
+
"aria-label": p("dashboardGrid.move", { title: i }),
|
|
556
|
+
"aria-pressed": $ && ((de = a.grab) == null ? void 0 : de.kind) === "move",
|
|
557
|
+
className: `ds:cursor-grab ds:touch-none ${Ye}`,
|
|
558
|
+
onPointerDown: (h) => a.startPointerGrab("move", r, h),
|
|
559
|
+
onKeyDown: (h) => a.keyboardStep(h, r),
|
|
560
560
|
onClick: () => a.startKeyboardGrab("move", r)
|
|
561
561
|
}
|
|
562
562
|
) : null,
|
|
563
563
|
/* @__PURE__ */ R(
|
|
564
|
-
|
|
564
|
+
Yt,
|
|
565
565
|
{
|
|
566
|
-
label:
|
|
567
|
-
open:
|
|
568
|
-
onOpenChange: (
|
|
566
|
+
label: i,
|
|
567
|
+
open: x && H,
|
|
568
|
+
onOpenChange: (h) => A(h && x),
|
|
569
569
|
children: /* @__PURE__ */ R(
|
|
570
|
-
|
|
570
|
+
Q,
|
|
571
571
|
{
|
|
572
|
-
ref:
|
|
573
|
-
tabIndex:
|
|
572
|
+
ref: w,
|
|
573
|
+
tabIndex: x || k ? 0 : void 0,
|
|
574
574
|
"data-dashboard-grid-title": "",
|
|
575
|
-
onFocus: () =>
|
|
576
|
-
onBlur: () =>
|
|
577
|
-
className:
|
|
578
|
-
children:
|
|
575
|
+
onFocus: () => E(!0),
|
|
576
|
+
onBlur: () => E(!1),
|
|
577
|
+
className: dr(),
|
|
578
|
+
children: i
|
|
579
579
|
}
|
|
580
580
|
)
|
|
581
581
|
}
|
|
582
582
|
),
|
|
583
583
|
g,
|
|
584
|
-
|
|
584
|
+
M.length > 0 ? /* @__PURE__ */ R(
|
|
585
585
|
"div",
|
|
586
586
|
{
|
|
587
|
-
className:
|
|
588
|
-
when:
|
|
587
|
+
className: gt({
|
|
588
|
+
when: xe ? "wide" : "always"
|
|
589
589
|
}),
|
|
590
|
-
children:
|
|
591
|
-
|
|
590
|
+
children: M.map((h) => /* @__PURE__ */ R(
|
|
591
|
+
Fe,
|
|
592
592
|
{
|
|
593
593
|
size: "sm",
|
|
594
594
|
intent: "outline",
|
|
595
595
|
type: "button",
|
|
596
|
-
icon:
|
|
597
|
-
className:
|
|
598
|
-
"aria-label":
|
|
599
|
-
onClick:
|
|
596
|
+
icon: h.icon,
|
|
597
|
+
className: Ye,
|
|
598
|
+
"aria-label": h.label,
|
|
599
|
+
onClick: h.onSelect
|
|
600
600
|
},
|
|
601
|
-
|
|
601
|
+
h.id
|
|
602
602
|
))
|
|
603
603
|
}
|
|
604
604
|
) : null,
|
|
605
|
-
|
|
606
|
-
/* @__PURE__ */ R(
|
|
607
|
-
|
|
605
|
+
xe ? /* @__PURE__ */ R("div", { className: gt({ when: "narrow" }), children: /* @__PURE__ */ ge(Ie.Root, { modal: !1, children: [
|
|
606
|
+
/* @__PURE__ */ R(Ie.Trigger, { asChild: !0, children: /* @__PURE__ */ R(
|
|
607
|
+
Fe,
|
|
608
608
|
{
|
|
609
609
|
size: "sm",
|
|
610
610
|
intent: "outline",
|
|
611
611
|
type: "button",
|
|
612
|
-
icon: /* @__PURE__ */ R(
|
|
613
|
-
className:
|
|
614
|
-
"aria-label":
|
|
612
|
+
icon: /* @__PURE__ */ R(qt, {}),
|
|
613
|
+
className: Ye,
|
|
614
|
+
"aria-label": p("dashboardGrid.moreActions", { title: i })
|
|
615
615
|
}
|
|
616
616
|
) }),
|
|
617
|
-
/* @__PURE__ */ R(
|
|
618
|
-
|
|
617
|
+
/* @__PURE__ */ R(
|
|
618
|
+
Ie.Content,
|
|
619
619
|
{
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
620
|
+
align: "end",
|
|
621
|
+
onCloseAutoFocus: (h) => {
|
|
622
|
+
const z = W.current;
|
|
623
|
+
if (W.current = null, !z) return;
|
|
624
|
+
const q = document.activeElement;
|
|
625
|
+
z.onSelect(), (z.id === bt || document.activeElement !== q) && h.preventDefault();
|
|
626
|
+
},
|
|
627
|
+
children: M.map((h) => /* @__PURE__ */ R(
|
|
628
|
+
Ie.Item,
|
|
629
|
+
{
|
|
630
|
+
startIcon: h.icon,
|
|
631
|
+
onSelect: () => {
|
|
632
|
+
W.current = h;
|
|
633
|
+
},
|
|
634
|
+
children: h.label
|
|
635
|
+
},
|
|
636
|
+
h.id
|
|
637
|
+
))
|
|
638
|
+
}
|
|
639
|
+
)
|
|
626
640
|
] }) }) : null
|
|
627
641
|
]
|
|
628
642
|
}
|
|
@@ -630,32 +644,32 @@ function kt({
|
|
|
630
644
|
/* @__PURE__ */ R(
|
|
631
645
|
"div",
|
|
632
646
|
{
|
|
633
|
-
className:
|
|
647
|
+
className: ir({
|
|
634
648
|
fit: a.stacked && a.stackedHeight === "content" ? "content" : "box",
|
|
635
|
-
editing:
|
|
649
|
+
editing: G
|
|
636
650
|
}),
|
|
637
651
|
children: N
|
|
638
652
|
}
|
|
639
653
|
),
|
|
640
|
-
|
|
654
|
+
G ? /* @__PURE__ */ R(
|
|
641
655
|
"button",
|
|
642
656
|
{
|
|
643
657
|
type: "button",
|
|
644
|
-
"aria-label":
|
|
645
|
-
"aria-pressed":
|
|
658
|
+
"aria-label": p("dashboardGrid.resize", { title: i }),
|
|
659
|
+
"aria-pressed": $ && ((T = a.grab) == null ? void 0 : T.kind) === "resize",
|
|
646
660
|
className: sr(),
|
|
647
|
-
onPointerDown: (
|
|
648
|
-
onKeyDown: (
|
|
661
|
+
onPointerDown: (h) => a.startPointerGrab("resize", r, h),
|
|
662
|
+
onKeyDown: (h) => a.keyboardStep(h, r),
|
|
649
663
|
onClick: () => a.startKeyboardGrab("resize", r),
|
|
650
|
-
children: /* @__PURE__ */ R(
|
|
664
|
+
children: /* @__PURE__ */ R(Bt, { "aria-hidden": "true" })
|
|
651
665
|
}
|
|
652
666
|
) : null
|
|
653
667
|
]
|
|
654
668
|
}
|
|
655
669
|
);
|
|
656
670
|
}
|
|
657
|
-
|
|
658
|
-
const
|
|
671
|
+
Mt.displayName = "DashboardGrid.Widget";
|
|
672
|
+
const vt = 1e3, ar = 1600, cr = [
|
|
659
673
|
"button",
|
|
660
674
|
"a",
|
|
661
675
|
"input",
|
|
@@ -667,99 +681,99 @@ const ht = 1e3, dr = 1600, ar = [
|
|
|
667
681
|
'[role="button"]',
|
|
668
682
|
'[role="menuitem"]',
|
|
669
683
|
"[tabindex]:not([data-dashboard-grid-title])"
|
|
670
|
-
].join(", "),
|
|
671
|
-
function
|
|
672
|
-
const
|
|
684
|
+
].join(", "), bt = "__remove__", wt = 4, lr = 400, ur = 8, Oe = 48, fr = 18;
|
|
685
|
+
function mr(r) {
|
|
686
|
+
const i = {
|
|
673
687
|
x: null,
|
|
674
688
|
y: null
|
|
675
|
-
},
|
|
676
|
-
for (let l = r.parentElement; l && l !== document.body && l !== document.documentElement && !(
|
|
689
|
+
}, s = (l) => l === "auto" || l === "scroll" || l === "overlay";
|
|
690
|
+
for (let l = r.parentElement; l && l !== document.body && l !== document.documentElement && !(i.x && i.y); l = l.parentElement) {
|
|
677
691
|
const g = window.getComputedStyle(l);
|
|
678
|
-
!
|
|
692
|
+
!i.y && s(g.overflowY) && l.scrollHeight > l.clientHeight && (i.y = l), !i.x && s(g.overflowX) && l.scrollWidth > l.clientWidth && (i.x = l);
|
|
679
693
|
}
|
|
680
|
-
return
|
|
694
|
+
return i;
|
|
681
695
|
}
|
|
682
|
-
function
|
|
683
|
-
const a = r.find((
|
|
696
|
+
function pe(r, i, s, l, g, N, p = !0) {
|
|
697
|
+
const a = r.find((w) => w.id === s);
|
|
684
698
|
if (!a) return r;
|
|
685
|
-
const
|
|
686
|
-
return
|
|
699
|
+
const I = p ? kt(r) + 2 : Number.POSITIVE_INFINITY, W = i === "move" ? Qt(r, s, l, Math.min(g, I - a.h), N) : Zt(r, s, l, Math.min(g, I - a.y), N), b = W.find((w) => w.id === s);
|
|
700
|
+
return b !== void 0 && b.x === a.x && b.y === a.y && b.w === a.w && b.h === a.h ? r : W;
|
|
687
701
|
}
|
|
688
|
-
function
|
|
689
|
-
if (r >=
|
|
690
|
-
const
|
|
691
|
-
return Math.ceil(
|
|
702
|
+
function yt(r) {
|
|
703
|
+
if (r >= Oe) return 0;
|
|
704
|
+
const i = (Oe - Math.max(0, r)) / Oe;
|
|
705
|
+
return Math.ceil(i * fr);
|
|
692
706
|
}
|
|
693
|
-
const
|
|
707
|
+
const Et = Dt(
|
|
694
708
|
({
|
|
695
709
|
"aria-label": r,
|
|
696
|
-
id:
|
|
697
|
-
cols:
|
|
710
|
+
id: i,
|
|
711
|
+
cols: s = 12,
|
|
698
712
|
rowHeight: l = 96,
|
|
699
713
|
layout: g,
|
|
700
714
|
defaultLayout: N,
|
|
701
|
-
onLayoutChange:
|
|
715
|
+
onLayoutChange: p,
|
|
702
716
|
editing: a = !1,
|
|
703
|
-
onRemoveWidget:
|
|
704
|
-
onRequestAdd:
|
|
705
|
-
stackBelow:
|
|
717
|
+
onRemoveWidget: I,
|
|
718
|
+
onRequestAdd: W,
|
|
719
|
+
stackBelow: b,
|
|
706
720
|
onStackedChange: o,
|
|
707
|
-
stackedHeight:
|
|
708
|
-
selectedId:
|
|
721
|
+
stackedHeight: w = "grid",
|
|
722
|
+
selectedId: x,
|
|
709
723
|
widgetHeadingLevel: _,
|
|
710
|
-
children:
|
|
711
|
-
className:
|
|
712
|
-
},
|
|
713
|
-
const { t:
|
|
714
|
-
|
|
715
|
-
const
|
|
724
|
+
children: k,
|
|
725
|
+
className: E
|
|
726
|
+
}, H) => {
|
|
727
|
+
const { t: A } = xt("ui"), $ = S(null), G = S(null), [M, xe] = J(!1), Q = S(!1);
|
|
728
|
+
Q.current = M;
|
|
729
|
+
const fe = S(null), de = L((e) => {
|
|
716
730
|
var d;
|
|
717
|
-
if (e ===
|
|
718
|
-
const t =
|
|
719
|
-
|
|
731
|
+
if (e === Q.current) return;
|
|
732
|
+
const t = $.current, n = typeof document < "u" ? document.activeElement : null;
|
|
733
|
+
fe.current = t && n instanceof HTMLElement && t.contains(n) ? {
|
|
720
734
|
element: n,
|
|
721
735
|
widgetId: ((d = n.closest("[data-widget-id]")) == null ? void 0 : d.getAttribute("data-widget-id")) ?? null
|
|
722
|
-
} : null,
|
|
736
|
+
} : null, Q.current = e, xe(e);
|
|
723
737
|
}, []);
|
|
724
|
-
|
|
725
|
-
const e =
|
|
738
|
+
re(() => {
|
|
739
|
+
const e = $.current;
|
|
726
740
|
if (!e) return;
|
|
727
|
-
if (
|
|
728
|
-
|
|
741
|
+
if (b === void 0) {
|
|
742
|
+
de(!1);
|
|
729
743
|
return;
|
|
730
744
|
}
|
|
731
|
-
if (
|
|
732
|
-
|
|
745
|
+
if (de(
|
|
746
|
+
pt(e.offsetWidth, b, Q.current)
|
|
733
747
|
), typeof ResizeObserver > "u") return;
|
|
734
748
|
const t = new ResizeObserver((n) => {
|
|
735
|
-
var c,
|
|
749
|
+
var c, m;
|
|
736
750
|
const d = n[n.length - 1];
|
|
737
751
|
if (!d) return;
|
|
738
|
-
const
|
|
739
|
-
|
|
752
|
+
const u = ((m = (c = d.borderBoxSize) == null ? void 0 : c[0]) == null ? void 0 : m.inlineSize) ?? d.contentRect.width;
|
|
753
|
+
de(pt(u, b, Q.current));
|
|
740
754
|
});
|
|
741
755
|
return t.observe(e), () => t.disconnect();
|
|
742
|
-
}, [
|
|
743
|
-
const
|
|
756
|
+
}, [b, de]);
|
|
757
|
+
const T = a && !M, h = se(() => {
|
|
744
758
|
const e = [];
|
|
745
|
-
return Le(
|
|
759
|
+
return Le(k, (t) => {
|
|
746
760
|
t.props.id && e.push(t.props.id);
|
|
747
761
|
}), e;
|
|
748
|
-
}, [
|
|
762
|
+
}, [k]), z = se(() => {
|
|
749
763
|
const e = /* @__PURE__ */ new Map();
|
|
750
|
-
return Le(
|
|
764
|
+
return Le(k, (t) => {
|
|
751
765
|
t.props.id && e.set(t.props.id, {
|
|
752
766
|
defaultW: t.props.defaultW ?? 4,
|
|
753
767
|
defaultH: t.props.defaultH ?? 2,
|
|
754
|
-
minW:
|
|
755
|
-
minH:
|
|
768
|
+
minW: ht(t.props.minW),
|
|
769
|
+
minH: ht(t.props.minH)
|
|
756
770
|
});
|
|
757
771
|
}), e;
|
|
758
|
-
}, [
|
|
759
|
-
|
|
760
|
-
const
|
|
772
|
+
}, [k]), [q, Gt] = J(() => N ?? []), ke = g ?? q, je = S(ke);
|
|
773
|
+
je.current = ke;
|
|
774
|
+
const Se = L(
|
|
761
775
|
(e) => e.map((t) => {
|
|
762
|
-
const n =
|
|
776
|
+
const n = je.current.find((m) => m.id === t.id), { minW: d, minH: u, ...c } = t;
|
|
763
777
|
return {
|
|
764
778
|
...c,
|
|
765
779
|
...(n == null ? void 0 : n.minW) !== void 0 ? { minW: n.minW } : {},
|
|
@@ -767,237 +781,237 @@ const Mt = Nt(
|
|
|
767
781
|
};
|
|
768
782
|
}),
|
|
769
783
|
[]
|
|
770
|
-
),
|
|
784
|
+
), Z = L(
|
|
771
785
|
(e) => {
|
|
772
|
-
const t =
|
|
773
|
-
g === void 0 && Gt(t),
|
|
786
|
+
const t = Se(e);
|
|
787
|
+
g === void 0 && Gt(t), p == null || p(t);
|
|
774
788
|
},
|
|
775
|
-
[g,
|
|
776
|
-
), { resolved:
|
|
777
|
-
const e = (
|
|
778
|
-
const c =
|
|
779
|
-
return
|
|
789
|
+
[g, p, Se]
|
|
790
|
+
), { resolved: P, autoPlaced: Ve } = se(() => {
|
|
791
|
+
const e = (u) => {
|
|
792
|
+
const c = z.get(u.id);
|
|
793
|
+
return Ne(
|
|
780
794
|
{
|
|
781
|
-
...
|
|
782
|
-
...(c == null ? void 0 : c.minW) !== void 0 ? { minW: Math.max(
|
|
783
|
-
...(c == null ? void 0 : c.minH) !== void 0 ? { minH: Math.max(
|
|
795
|
+
...u,
|
|
796
|
+
...(c == null ? void 0 : c.minW) !== void 0 ? { minW: Math.max(u.minW ?? 1, c.minW) } : {},
|
|
797
|
+
...(c == null ? void 0 : c.minH) !== void 0 ? { minH: Math.max(u.minH ?? 1, c.minH) } : {}
|
|
784
798
|
},
|
|
785
|
-
|
|
799
|
+
s
|
|
786
800
|
);
|
|
787
|
-
}, t =
|
|
788
|
-
(
|
|
801
|
+
}, t = ke.map(e), n = h.filter(
|
|
802
|
+
(u) => !t.some((c) => c.id === u)
|
|
789
803
|
);
|
|
790
804
|
if (n.length === 0)
|
|
791
805
|
return {
|
|
792
806
|
resolved: t.some(
|
|
793
|
-
(c,
|
|
794
|
-
) ?
|
|
807
|
+
(c, m) => t.some((y, f) => f > m && X(c, y))
|
|
808
|
+
) ? oe(t, s) : t,
|
|
795
809
|
autoPlaced: !1
|
|
796
810
|
};
|
|
797
811
|
const d = [...t];
|
|
798
|
-
for (const
|
|
799
|
-
const c =
|
|
800
|
-
d.push(e({ id:
|
|
812
|
+
for (const u of n) {
|
|
813
|
+
const c = z.get(u) ?? { defaultW: 4, defaultH: 2 }, m = Math.min(Math.max(c.defaultW, c.minW ?? 1), s), y = Math.max(c.defaultH, c.minH ?? 1), f = mt(d, s, m, y);
|
|
814
|
+
d.push(e({ id: u, x: f.x, y: f.y, w: m, h: y }));
|
|
801
815
|
}
|
|
802
|
-
return { resolved:
|
|
803
|
-
}, [
|
|
804
|
-
|
|
805
|
-
if (!
|
|
806
|
-
const e =
|
|
816
|
+
return { resolved: oe(d, s), autoPlaced: !0 };
|
|
817
|
+
}, [ke, h, z, s]), $e = S("");
|
|
818
|
+
B(() => {
|
|
819
|
+
if (!Ve) return;
|
|
820
|
+
const e = P.map(
|
|
807
821
|
(t) => `${t.id}:${t.x},${t.y},${t.w},${t.h}`
|
|
808
822
|
).join("|");
|
|
809
|
-
|
|
810
|
-
}, [
|
|
811
|
-
const [
|
|
812
|
-
|
|
813
|
-
const
|
|
814
|
-
|
|
815
|
-
const
|
|
816
|
-
|
|
817
|
-
}, []),
|
|
823
|
+
$e.current !== e && ($e.current = e, Z(P));
|
|
824
|
+
}, [Ve, P, Z]);
|
|
825
|
+
const [Tt, _t] = J(null), [ae, qe] = J(null), [At, ce] = J(""), De = S(null), V = S(null), le = S(null), Pe = S(!1), he = S(s);
|
|
826
|
+
he.current = s;
|
|
827
|
+
const me = S(P);
|
|
828
|
+
me.current = P;
|
|
829
|
+
const ne = L((e) => {
|
|
830
|
+
De.current = e, _t(e);
|
|
831
|
+
}, []), Me = L(
|
|
818
832
|
(e, t, n) => {
|
|
819
833
|
const d = { kind: e, id: t, via: n };
|
|
820
|
-
|
|
834
|
+
V.current = { ...d, baseLayout: me.current }, qe(d), ne(me.current);
|
|
821
835
|
},
|
|
822
|
-
[
|
|
823
|
-
),
|
|
824
|
-
() => new Map(
|
|
825
|
-
[
|
|
826
|
-
), Ue =
|
|
836
|
+
[ne]
|
|
837
|
+
), ve = Tt ?? P, Ke = se(
|
|
838
|
+
() => new Map(ve.map((e) => [e.id, e])),
|
|
839
|
+
[ve]
|
|
840
|
+
), Ue = L(
|
|
827
841
|
(e, t) => {
|
|
828
|
-
|
|
829
|
-
e === "move" ?
|
|
842
|
+
ce(
|
|
843
|
+
e === "move" ? A("dashboardGrid.movedTo", { col: t.x + 1, row: t.y + 1 }) : A("dashboardGrid.resizedTo", { cols: t.w, rows: t.h })
|
|
830
844
|
);
|
|
831
845
|
},
|
|
832
|
-
[
|
|
833
|
-
),
|
|
846
|
+
[A]
|
|
847
|
+
), Y = S(null), O = L(
|
|
834
848
|
(e) => {
|
|
835
|
-
var
|
|
836
|
-
(
|
|
837
|
-
const t =
|
|
838
|
-
if (
|
|
839
|
-
|
|
849
|
+
var m;
|
|
850
|
+
(m = Y.current) == null || m.call(Y), Y.current = null;
|
|
851
|
+
const t = De.current, n = V.current;
|
|
852
|
+
if (V.current = null, le.current = null, qe(null), ne(null), !e || !t || !n) {
|
|
853
|
+
ce(A("dashboardGrid.cancelled"));
|
|
840
854
|
return;
|
|
841
855
|
}
|
|
842
|
-
const d =
|
|
843
|
-
if (
|
|
844
|
-
|
|
856
|
+
const d = oe(t, he.current), u = (y) => y.map((f) => `${f.id}:${f.x},${f.y},${f.w},${f.h}`).join("|");
|
|
857
|
+
if (u(d) === u(me.current)) {
|
|
858
|
+
ce(A("dashboardGrid.cancelled"));
|
|
845
859
|
return;
|
|
846
860
|
}
|
|
847
|
-
|
|
848
|
-
const c = d.find((
|
|
849
|
-
|
|
850
|
-
c ?
|
|
861
|
+
Z(d);
|
|
862
|
+
const c = d.find((y) => y.id === n.id);
|
|
863
|
+
ce(
|
|
864
|
+
c ? A("dashboardGrid.droppedAt", {
|
|
851
865
|
col: c.x + 1,
|
|
852
866
|
row: c.y + 1
|
|
853
|
-
}) :
|
|
867
|
+
}) : A("dashboardGrid.cancelled")
|
|
854
868
|
);
|
|
855
869
|
},
|
|
856
|
-
[
|
|
857
|
-
), We =
|
|
858
|
-
We.current =
|
|
859
|
-
const
|
|
870
|
+
[ne, Z, A]
|
|
871
|
+
), We = S(O);
|
|
872
|
+
We.current = O;
|
|
873
|
+
const Be = L(
|
|
860
874
|
(e, t) => {
|
|
861
|
-
if (!
|
|
875
|
+
if (!T) return;
|
|
862
876
|
if (Pe.current) {
|
|
863
877
|
Pe.current = !1;
|
|
864
878
|
return;
|
|
865
879
|
}
|
|
866
|
-
const n =
|
|
880
|
+
const n = V.current;
|
|
867
881
|
if ((n == null ? void 0 : n.via) !== "pointer") {
|
|
868
882
|
if (n && n.id === t && n.kind === e) {
|
|
869
|
-
|
|
883
|
+
O(!0);
|
|
870
884
|
return;
|
|
871
885
|
}
|
|
872
|
-
|
|
873
|
-
|
|
886
|
+
Me(e, t, "keyboard"), ce(
|
|
887
|
+
A(e === "move" ? "dashboardGrid.grabbed" : "dashboardGrid.resizeGrabbed")
|
|
874
888
|
);
|
|
875
889
|
}
|
|
876
890
|
},
|
|
877
|
-
[
|
|
878
|
-
),
|
|
891
|
+
[T, Me, O, A]
|
|
892
|
+
), Je = L(
|
|
879
893
|
(e, t) => {
|
|
880
|
-
const n =
|
|
894
|
+
const n = V.current;
|
|
881
895
|
if (!n || n.id !== t || n.via !== "keyboard")
|
|
882
896
|
return;
|
|
883
897
|
if (e.key === "Escape") {
|
|
884
|
-
e.preventDefault(),
|
|
898
|
+
e.preventDefault(), O(!1);
|
|
885
899
|
return;
|
|
886
900
|
}
|
|
887
901
|
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(e.key)) return;
|
|
888
902
|
e.preventDefault();
|
|
889
|
-
const
|
|
890
|
-
if (!
|
|
891
|
-
const
|
|
903
|
+
const u = typeof window < "u" && G.current ? window.getComputedStyle(G.current).direction === "rtl" : !1, c = e.key === "ArrowRight" ? u ? -1 : 1 : e.key === "ArrowLeft" ? u ? 1 : -1 : 0, m = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0, f = (De.current ?? n.baseLayout).find((D) => D.id === t);
|
|
904
|
+
if (!f) return;
|
|
905
|
+
const v = n.kind === "move" ? pe(
|
|
892
906
|
n.baseLayout,
|
|
893
907
|
"move",
|
|
894
908
|
t,
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
) :
|
|
909
|
+
f.x + c,
|
|
910
|
+
f.y + m,
|
|
911
|
+
s
|
|
912
|
+
) : pe(
|
|
899
913
|
n.baseLayout,
|
|
900
914
|
"resize",
|
|
901
915
|
t,
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
916
|
+
f.w + c,
|
|
917
|
+
f.h + m,
|
|
918
|
+
s
|
|
905
919
|
);
|
|
906
|
-
|
|
907
|
-
const C =
|
|
920
|
+
ne(v);
|
|
921
|
+
const C = v.find((D) => D.id === t);
|
|
908
922
|
C && Ue(n.kind, C);
|
|
909
923
|
},
|
|
910
|
-
[
|
|
911
|
-
),
|
|
912
|
-
const e =
|
|
924
|
+
[s, O, ne, Ue]
|
|
925
|
+
), be = L(() => {
|
|
926
|
+
const e = le.current, t = V.current, n = G.current;
|
|
913
927
|
if (!e || !t || !n) return;
|
|
914
|
-
const d = n.getBoundingClientRect(),
|
|
915
|
-
|
|
916
|
-
e.kind === "move" ?
|
|
928
|
+
const d = n.getBoundingClientRect(), u = e.lastClientX - d.left - e.startGridX, c = e.lastClientY - d.top - e.startGridY, m = Math.round(u / e.colStride) * (e.isRtl ? -1 : 1), y = Math.round(c / e.rowStride), { origin: f } = e;
|
|
929
|
+
ne(
|
|
930
|
+
e.kind === "move" ? pe(
|
|
917
931
|
t.baseLayout,
|
|
918
932
|
"move",
|
|
919
933
|
e.id,
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
) :
|
|
934
|
+
f.x + m,
|
|
935
|
+
f.y + y,
|
|
936
|
+
he.current
|
|
937
|
+
) : pe(
|
|
924
938
|
t.baseLayout,
|
|
925
939
|
"resize",
|
|
926
940
|
e.id,
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
941
|
+
f.w + m,
|
|
942
|
+
f.h + y,
|
|
943
|
+
he.current
|
|
930
944
|
)
|
|
931
945
|
);
|
|
932
|
-
}, [
|
|
933
|
-
var
|
|
934
|
-
(
|
|
935
|
-
const e = (
|
|
936
|
-
const
|
|
937
|
-
!
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
) >
|
|
941
|
-
}, t = (
|
|
942
|
-
const C =
|
|
943
|
-
!C ||
|
|
944
|
-
}, n = t(!0), d = t(!1),
|
|
946
|
+
}, [ne]), Ee = S(!1), Qe = L(() => {
|
|
947
|
+
var y;
|
|
948
|
+
(y = Y.current) == null || y.call(Y);
|
|
949
|
+
const e = (f) => {
|
|
950
|
+
const v = le.current;
|
|
951
|
+
!v || f.pointerId !== v.pointerId || (v.lastClientX = f.clientX, v.lastClientY = f.clientY, v.travelled || (v.travelled = Math.hypot(
|
|
952
|
+
f.clientX - v.pressX,
|
|
953
|
+
f.clientY - v.pressY
|
|
954
|
+
) > wt), be());
|
|
955
|
+
}, t = (f) => (v) => {
|
|
956
|
+
const C = le.current;
|
|
957
|
+
!C || v.pointerId !== C.pointerId || (Pe.current = C.fromHandle, We.current(f));
|
|
958
|
+
}, n = t(!0), d = t(!1), u = () => be();
|
|
945
959
|
let c = 0;
|
|
946
|
-
const
|
|
947
|
-
c = requestAnimationFrame(
|
|
948
|
-
const
|
|
949
|
-
if (!(
|
|
950
|
-
const
|
|
951
|
-
if (!
|
|
952
|
-
const { lastClientX: C, lastClientY:
|
|
953
|
-
const
|
|
954
|
-
|
|
960
|
+
const m = () => {
|
|
961
|
+
c = requestAnimationFrame(m);
|
|
962
|
+
const f = le.current;
|
|
963
|
+
if (!(f != null && f.travelled)) return;
|
|
964
|
+
const v = G.current;
|
|
965
|
+
if (!v) return;
|
|
966
|
+
const { lastClientX: C, lastClientY: D } = f, K = mr(v), Re = (U, at, te) => {
|
|
967
|
+
const Xe = te ? window.innerHeight : window.innerWidth, j = U == null ? void 0 : U.getBoundingClientRect(), It = Math.max(
|
|
968
|
+
te ? (j == null ? void 0 : j.top) ?? 0 : (j == null ? void 0 : j.left) ?? 0,
|
|
955
969
|
0
|
|
956
|
-
),
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
),
|
|
960
|
-
if (
|
|
961
|
-
const
|
|
962
|
-
U == null || U.scrollBy(
|
|
970
|
+
), Lt = Math.min(
|
|
971
|
+
te ? (j == null ? void 0 : j.bottom) ?? Xe : (j == null ? void 0 : j.right) ?? Xe,
|
|
972
|
+
Xe
|
|
973
|
+
), ye = yt(Lt - at) - yt(at - It);
|
|
974
|
+
if (ye === 0) return;
|
|
975
|
+
const ct = () => U ? te ? U.scrollTop : U.scrollLeft : te ? window.scrollY : window.scrollX, Nt = ct();
|
|
976
|
+
U == null || U.scrollBy(te ? 0 : ye, te ? ye : 0), (!U || ct() === Nt) && window.scrollBy(te ? 0 : ye, te ? ye : 0);
|
|
963
977
|
};
|
|
964
|
-
|
|
978
|
+
Re(K.y, D, !0), Re(K.x, C, !1);
|
|
965
979
|
};
|
|
966
|
-
c = requestAnimationFrame(
|
|
980
|
+
c = requestAnimationFrame(m), window.addEventListener("pointermove", e), window.addEventListener("pointerup", n), window.addEventListener("pointercancel", d), window.addEventListener("scroll", u, {
|
|
967
981
|
capture: !0,
|
|
968
982
|
passive: !0
|
|
969
|
-
}),
|
|
970
|
-
cancelAnimationFrame(c),
|
|
983
|
+
}), Y.current = () => {
|
|
984
|
+
cancelAnimationFrame(c), Ee.current = !1, window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", n), window.removeEventListener("pointercancel", d), window.removeEventListener("scroll", u, { capture: !0 });
|
|
971
985
|
};
|
|
972
|
-
}, [
|
|
973
|
-
|
|
986
|
+
}, [be]);
|
|
987
|
+
B(
|
|
974
988
|
() => () => {
|
|
975
989
|
var e;
|
|
976
|
-
(e =
|
|
990
|
+
(e = Y.current) == null || e.call(Y), Y.current = null;
|
|
977
991
|
},
|
|
978
992
|
[]
|
|
979
993
|
);
|
|
980
|
-
const
|
|
981
|
-
(e, t, n, d,
|
|
994
|
+
const Ge = L(
|
|
995
|
+
(e, t, n, d, u) => {
|
|
982
996
|
var K;
|
|
983
|
-
const c =
|
|
984
|
-
if (!c || !
|
|
985
|
-
const
|
|
986
|
-
if (
|
|
987
|
-
const
|
|
988
|
-
|
|
997
|
+
const c = G.current, m = me.current.find((Re) => Re.id === t);
|
|
998
|
+
if (!c || !m) return !1;
|
|
999
|
+
const y = c.getBoundingClientRect();
|
|
1000
|
+
if (y.width <= 0) return !1;
|
|
1001
|
+
const f = window.getComputedStyle(c), v = Number.parseFloat(f.columnGap) || 0, C = Number.parseFloat(f.rowGap) || 0, D = (y.width - v * (s - 1)) / s;
|
|
1002
|
+
le.current = {
|
|
989
1003
|
kind: e,
|
|
990
1004
|
id: t,
|
|
991
1005
|
pointerId: n.pointerId,
|
|
992
|
-
startGridX: n.clientX -
|
|
993
|
-
startGridY: n.clientY -
|
|
1006
|
+
startGridX: n.clientX - y.left,
|
|
1007
|
+
startGridY: n.clientY - y.top,
|
|
994
1008
|
lastClientX: n.clientX,
|
|
995
1009
|
lastClientY: n.clientY,
|
|
996
|
-
origin:
|
|
997
|
-
colStride:
|
|
1010
|
+
origin: m,
|
|
1011
|
+
colStride: D + v,
|
|
998
1012
|
rowStride: l + C,
|
|
999
|
-
isRtl:
|
|
1000
|
-
fromHandle:
|
|
1013
|
+
isRtl: f.direction === "rtl",
|
|
1014
|
+
fromHandle: u,
|
|
1001
1015
|
pressX: n.clientX,
|
|
1002
1016
|
pressY: n.clientY,
|
|
1003
1017
|
travelled: !1
|
|
@@ -1006,108 +1020,108 @@ const Mt = Nt(
|
|
|
1006
1020
|
(K = d.setPointerCapture) == null || K.call(d, n.pointerId);
|
|
1007
1021
|
} catch {
|
|
1008
1022
|
}
|
|
1009
|
-
return
|
|
1023
|
+
return Me(e, t, "pointer"), Qe(), !0;
|
|
1010
1024
|
},
|
|
1011
|
-
[
|
|
1012
|
-
),
|
|
1025
|
+
[s, l, Me, Qe]
|
|
1026
|
+
), Ze = L(
|
|
1013
1027
|
(e, t, n) => {
|
|
1014
|
-
var d,
|
|
1015
|
-
|
|
1028
|
+
var d, u;
|
|
1029
|
+
T && (V.current || (n.preventDefault(), (u = (d = n.currentTarget).focus) == null || u.call(d), Ge(e, t, n, n.currentTarget, !0)));
|
|
1016
1030
|
},
|
|
1017
|
-
[
|
|
1018
|
-
),
|
|
1019
|
-
const e =
|
|
1020
|
-
|
|
1021
|
-
}, []),
|
|
1031
|
+
[T, Ge]
|
|
1032
|
+
), ee = S(null), ie = L(() => {
|
|
1033
|
+
const e = ee.current;
|
|
1034
|
+
ee.current = null, e && (e.holdTimer && clearTimeout(e.holdTimer), e.cleanup());
|
|
1035
|
+
}, []), et = L(
|
|
1022
1036
|
(e, t) => {
|
|
1023
|
-
if (!
|
|
1037
|
+
if (!T || V.current || ee.current || t.button !== 0 || !t.isPrimary) return;
|
|
1024
1038
|
const n = t.target;
|
|
1025
1039
|
if (!t.currentTarget.contains(n)) return;
|
|
1026
|
-
const d = n.closest(
|
|
1040
|
+
const d = n.closest(cr);
|
|
1027
1041
|
if (d && t.currentTarget.contains(d)) return;
|
|
1028
|
-
const
|
|
1042
|
+
const u = t.currentTarget, c = t.pointerType === "touch";
|
|
1029
1043
|
c || t.preventDefault();
|
|
1030
|
-
const
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1044
|
+
const m = (v, C) => {
|
|
1045
|
+
const D = ee.current;
|
|
1046
|
+
if (ie(), !(!D || V.current) && Ge(
|
|
1033
1047
|
"move",
|
|
1034
|
-
|
|
1048
|
+
D.id,
|
|
1035
1049
|
{
|
|
1036
|
-
pointerId:
|
|
1037
|
-
clientX:
|
|
1038
|
-
clientY:
|
|
1050
|
+
pointerId: D.pointerId,
|
|
1051
|
+
clientX: D.startClientX,
|
|
1052
|
+
clientY: D.startClientY
|
|
1039
1053
|
},
|
|
1040
|
-
|
|
1054
|
+
D.surface,
|
|
1041
1055
|
!1
|
|
1042
1056
|
)) {
|
|
1043
|
-
|
|
1044
|
-
const K =
|
|
1045
|
-
K && (K.lastClientX =
|
|
1057
|
+
Ee.current = c;
|
|
1058
|
+
const K = le.current;
|
|
1059
|
+
K && (K.lastClientX = v, K.lastClientY = C, K.travelled = !c), be();
|
|
1046
1060
|
}
|
|
1047
|
-
},
|
|
1048
|
-
const C =
|
|
1049
|
-
if (!C ||
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1052
|
-
|
|
1061
|
+
}, y = (v) => {
|
|
1062
|
+
const C = ee.current;
|
|
1063
|
+
if (!C || v.pointerId !== C.pointerId) return;
|
|
1064
|
+
const D = Math.hypot(
|
|
1065
|
+
v.clientX - C.startClientX,
|
|
1066
|
+
v.clientY - C.startClientY
|
|
1053
1067
|
);
|
|
1054
|
-
c ?
|
|
1055
|
-
},
|
|
1068
|
+
c ? D > ur && ie() : D > wt && m(v.clientX, v.clientY);
|
|
1069
|
+
}, f = (v) => {
|
|
1056
1070
|
var C;
|
|
1057
|
-
|
|
1071
|
+
v.pointerId === ((C = ee.current) == null ? void 0 : C.pointerId) && ie();
|
|
1058
1072
|
};
|
|
1059
|
-
window.addEventListener("pointermove",
|
|
1073
|
+
window.addEventListener("pointermove", y), window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f), ee.current = {
|
|
1060
1074
|
id: e,
|
|
1061
1075
|
pointerId: t.pointerId,
|
|
1062
1076
|
pointerType: t.pointerType,
|
|
1063
1077
|
startClientX: t.clientX,
|
|
1064
1078
|
startClientY: t.clientY,
|
|
1065
|
-
surface:
|
|
1079
|
+
surface: u,
|
|
1066
1080
|
holdTimer: c ? setTimeout(() => {
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
},
|
|
1081
|
+
const v = ee.current;
|
|
1082
|
+
v && m(v.startClientX, v.startClientY);
|
|
1083
|
+
}, lr) : null,
|
|
1070
1084
|
cleanup: () => {
|
|
1071
|
-
window.removeEventListener("pointermove",
|
|
1085
|
+
window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f);
|
|
1072
1086
|
}
|
|
1073
1087
|
};
|
|
1074
1088
|
},
|
|
1075
|
-
[
|
|
1089
|
+
[T, Ge, be, ie]
|
|
1076
1090
|
);
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
}, [
|
|
1080
|
-
const e =
|
|
1081
|
-
if (!
|
|
1091
|
+
B(() => {
|
|
1092
|
+
T || (ie(), V.current && We.current(!1));
|
|
1093
|
+
}, [T, ie]), B(() => ie, [ie]), B(() => {
|
|
1094
|
+
const e = G.current;
|
|
1095
|
+
if (!T || !e) return;
|
|
1082
1096
|
const t = (d) => {
|
|
1083
|
-
|
|
1097
|
+
Ee.current && d.cancelable && d.preventDefault();
|
|
1084
1098
|
}, n = (d) => {
|
|
1085
|
-
(
|
|
1099
|
+
(ee.current || Ee.current) && d.preventDefault();
|
|
1086
1100
|
};
|
|
1087
1101
|
return e.addEventListener("touchmove", t, { passive: !1 }), e.addEventListener("contextmenu", n), () => {
|
|
1088
1102
|
e.removeEventListener("touchmove", t), e.removeEventListener("contextmenu", n);
|
|
1089
1103
|
};
|
|
1090
|
-
}, [
|
|
1091
|
-
if (!
|
|
1104
|
+
}, [T]), B(() => {
|
|
1105
|
+
if (!ae) return;
|
|
1092
1106
|
const e = (t) => {
|
|
1093
|
-
t.key === "Escape" &&
|
|
1107
|
+
t.key === "Escape" && O(!1);
|
|
1094
1108
|
};
|
|
1095
1109
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1096
|
-
}, [
|
|
1097
|
-
if (!
|
|
1110
|
+
}, [ae, O]), B(() => {
|
|
1111
|
+
if (!ae || ae.via !== "keyboard") return;
|
|
1098
1112
|
const e = (n) => {
|
|
1099
|
-
var
|
|
1113
|
+
var u;
|
|
1100
1114
|
const d = n.relatedTarget;
|
|
1101
|
-
(!d || !((
|
|
1102
|
-
}, t =
|
|
1115
|
+
(!d || !((u = G.current) != null && u.contains(d))) && O(!1);
|
|
1116
|
+
}, t = G.current;
|
|
1103
1117
|
return t == null || t.addEventListener("focusout", e), () => t == null ? void 0 : t.removeEventListener("focusout", e);
|
|
1104
|
-
}, [
|
|
1105
|
-
|
|
1106
|
-
}, [
|
|
1107
|
-
var
|
|
1108
|
-
const e =
|
|
1109
|
-
|
|
1110
|
-
const t =
|
|
1118
|
+
}, [ae, O]), re(() => {
|
|
1119
|
+
M && (V.current && O(!1), a && ce(A("dashboardGrid.stackedReadOnly")));
|
|
1120
|
+
}, [M, a, O, A]), re(() => {
|
|
1121
|
+
var u;
|
|
1122
|
+
const e = fe.current;
|
|
1123
|
+
fe.current = null;
|
|
1124
|
+
const t = $.current;
|
|
1111
1125
|
if (!e || !t) return;
|
|
1112
1126
|
const n = document.activeElement;
|
|
1113
1127
|
if (n === e.element || n !== null && n !== document.body) return;
|
|
@@ -1124,251 +1138,261 @@ const Mt = Nt(
|
|
|
1124
1138
|
d.setAttribute("tabindex", "-1"), d.focus();
|
|
1125
1139
|
return;
|
|
1126
1140
|
}
|
|
1127
|
-
(
|
|
1128
|
-
}, [
|
|
1129
|
-
const
|
|
1130
|
-
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1141
|
+
(u = G.current) == null || u.focus();
|
|
1142
|
+
}, [M]);
|
|
1143
|
+
const Te = S(o);
|
|
1144
|
+
Te.current = o;
|
|
1145
|
+
const tt = S(!1);
|
|
1146
|
+
re(() => {
|
|
1133
1147
|
var e;
|
|
1134
|
-
|
|
1135
|
-
}, [
|
|
1136
|
-
const e =
|
|
1137
|
-
e && (e.style.setProperty("--dg-cols", String(
|
|
1138
|
-
}, [
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1141
|
-
const e =
|
|
1148
|
+
tt.current !== M && (tt.current = M, (e = Te.current) == null || e.call(Te, M));
|
|
1149
|
+
}, [M]), re(() => {
|
|
1150
|
+
const e = G.current;
|
|
1151
|
+
e && (e.style.setProperty("--dg-cols", String(s)), e.style.setProperty("--dg-row", `${l}px`));
|
|
1152
|
+
}, [s, l]);
|
|
1153
|
+
const rt = kt(ve);
|
|
1154
|
+
re(() => {
|
|
1155
|
+
const e = G.current;
|
|
1142
1156
|
e && (e.style.setProperty(
|
|
1143
1157
|
"--dg-grid-lines",
|
|
1144
|
-
`repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc((100% + var(--spacing-md)) / ${
|
|
1158
|
+
`repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc((100% + var(--spacing-md)) / ${s})), repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc(${l}px + var(--spacing-md)))`
|
|
1145
1159
|
), e.style.setProperty(
|
|
1146
1160
|
"--dg-min-block",
|
|
1147
|
-
`calc(${
|
|
1161
|
+
`calc(${rt + 2} * (${l}px + var(--spacing-md)) - var(--spacing-md))`
|
|
1148
1162
|
));
|
|
1149
|
-
}, [
|
|
1150
|
-
const
|
|
1151
|
-
() =>
|
|
1152
|
-
[
|
|
1163
|
+
}, [s, l, rt]);
|
|
1164
|
+
const nt = S(null), He = T && !!W, _e = se(
|
|
1165
|
+
() => He ? mt(ve, s, 2, 2) : null,
|
|
1166
|
+
[He, ve, s]
|
|
1153
1167
|
);
|
|
1154
|
-
|
|
1155
|
-
const e =
|
|
1156
|
-
!e || !
|
|
1157
|
-
}, [
|
|
1158
|
-
const
|
|
1168
|
+
re(() => {
|
|
1169
|
+
const e = nt.current;
|
|
1170
|
+
!e || !_e || (e.style.setProperty("--dg-x", String(_e.x + 1)), e.style.setProperty("--dg-y", String(_e.y + 1)), e.style.setProperty("--dg-w", "2"), e.style.setProperty("--dg-h", "2"));
|
|
1171
|
+
}, [_e]);
|
|
1172
|
+
const it = L(
|
|
1159
1173
|
(e) => {
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1174
|
+
var u, c;
|
|
1175
|
+
const t = Array.from(
|
|
1176
|
+
((u = G.current) == null ? void 0 : u.querySelectorAll("[data-widget-id]")) ?? []
|
|
1177
|
+
), n = t.findIndex(
|
|
1178
|
+
(m) => m.getAttribute("data-widget-id") === e
|
|
1179
|
+
), d = (c = t[n + 1] ?? t[n - 1]) == null ? void 0 : c.getAttribute(
|
|
1180
|
+
"data-widget-id"
|
|
1181
|
+
);
|
|
1182
|
+
Z(
|
|
1183
|
+
oe(
|
|
1184
|
+
me.current.filter((m) => m.id !== e),
|
|
1185
|
+
he.current
|
|
1164
1186
|
)
|
|
1165
|
-
),
|
|
1166
|
-
const
|
|
1167
|
-
if (!
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1187
|
+
), ce(A("dashboardGrid.removed")), I == null || I(e), requestAnimationFrame(() => {
|
|
1188
|
+
const m = G.current;
|
|
1189
|
+
if (!m) return;
|
|
1190
|
+
const y = Array.from(
|
|
1191
|
+
m.querySelectorAll("[data-widget-id]")
|
|
1192
|
+
).find((v) => v.getAttribute("data-widget-id") === d), f = (y == null ? void 0 : y.querySelector("button")) ?? m.querySelector("button");
|
|
1193
|
+
f ? f.focus() : m.focus();
|
|
1170
1194
|
});
|
|
1171
1195
|
},
|
|
1172
|
-
[
|
|
1173
|
-
), [st,
|
|
1196
|
+
[Z, I, A]
|
|
1197
|
+
), [st, ot] = J(null), F = S(null), we = S(null), Ae = S(0), Ce = L(() => {
|
|
1174
1198
|
var c;
|
|
1175
|
-
const e =
|
|
1199
|
+
const e = F.current, t = G.current;
|
|
1176
1200
|
if (!e || !t) return !1;
|
|
1177
1201
|
const n = Array.from(
|
|
1178
1202
|
t.querySelectorAll("[data-widget-id]")
|
|
1179
|
-
).find((
|
|
1203
|
+
).find((m) => m.getAttribute("data-widget-id") === e.id), d = n == null ? void 0 : n.getBoundingClientRect();
|
|
1180
1204
|
if (!n || !d || d.height <= 0)
|
|
1181
|
-
return performance.now() > e.deadline && (
|
|
1182
|
-
|
|
1183
|
-
const
|
|
1205
|
+
return performance.now() > e.deadline && (F.current = null, e.resolve(!1)), !1;
|
|
1206
|
+
F.current = null;
|
|
1207
|
+
const u = ((c = window.matchMedia) == null ? void 0 : c.call(window, "(prefers-reduced-motion: reduce)").matches) || window.getComputedStyle(t).getPropertyValue("--animation-duration").trim() === "0ms";
|
|
1184
1208
|
return n.scrollIntoView({
|
|
1185
1209
|
block: "nearest",
|
|
1186
1210
|
inline: "nearest",
|
|
1187
|
-
behavior:
|
|
1188
|
-
}),
|
|
1189
|
-
() =>
|
|
1190
|
-
|
|
1211
|
+
behavior: u ? "auto" : "smooth"
|
|
1212
|
+
}), ot(e.id), we.current && clearTimeout(we.current), we.current = setTimeout(
|
|
1213
|
+
() => ot(null),
|
|
1214
|
+
ar
|
|
1191
1215
|
), e.resolve(!0), !0;
|
|
1192
|
-
}, []),
|
|
1216
|
+
}, []), dt = L(
|
|
1193
1217
|
(e) => new Promise((t) => {
|
|
1194
1218
|
var c;
|
|
1195
|
-
(c =
|
|
1219
|
+
(c = F.current) == null || c.resolve(!1), cancelAnimationFrame(Ae.current);
|
|
1196
1220
|
const n = setTimeout(() => {
|
|
1197
|
-
const
|
|
1198
|
-
(
|
|
1199
|
-
},
|
|
1200
|
-
clearTimeout(n), t(
|
|
1221
|
+
const m = F.current;
|
|
1222
|
+
(m == null ? void 0 : m.resolve) === d && !Ce() && F.current === m && (F.current = null, d(!1));
|
|
1223
|
+
}, vt), d = (m) => {
|
|
1224
|
+
clearTimeout(n), t(m);
|
|
1201
1225
|
};
|
|
1202
|
-
|
|
1226
|
+
F.current = {
|
|
1203
1227
|
id: e,
|
|
1204
|
-
deadline: performance.now() +
|
|
1228
|
+
deadline: performance.now() + vt,
|
|
1205
1229
|
resolve: d
|
|
1206
1230
|
};
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1231
|
+
const u = () => {
|
|
1232
|
+
F.current && !Ce() && F.current && (Ae.current = requestAnimationFrame(u));
|
|
1209
1233
|
};
|
|
1210
|
-
|
|
1234
|
+
Ae.current = requestAnimationFrame(u);
|
|
1211
1235
|
}),
|
|
1212
|
-
[
|
|
1236
|
+
[Ce]
|
|
1213
1237
|
);
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
}),
|
|
1238
|
+
re(() => {
|
|
1239
|
+
F.current && Ce();
|
|
1240
|
+
}), B(
|
|
1217
1241
|
() => () => {
|
|
1218
1242
|
var e;
|
|
1219
|
-
cancelAnimationFrame(
|
|
1243
|
+
cancelAnimationFrame(Ae.current), we.current && clearTimeout(we.current), (e = F.current) == null || e.resolve(!1), F.current = null;
|
|
1220
1244
|
},
|
|
1221
1245
|
[]
|
|
1222
1246
|
);
|
|
1223
|
-
const
|
|
1247
|
+
const ze = se(
|
|
1224
1248
|
() => ({
|
|
1225
1249
|
moveWidgetTo(e, t, n) {
|
|
1226
|
-
if (!
|
|
1227
|
-
const d =
|
|
1228
|
-
|
|
1250
|
+
if (!T || Q.current || !Number.isFinite(t) || !Number.isFinite(n) || !P.some((u) => u.id === e)) return !1;
|
|
1251
|
+
const d = pe(
|
|
1252
|
+
P,
|
|
1229
1253
|
"move",
|
|
1230
1254
|
e,
|
|
1231
1255
|
Math.round(t),
|
|
1232
1256
|
Math.round(n),
|
|
1233
|
-
|
|
1257
|
+
s,
|
|
1234
1258
|
!1
|
|
1235
1259
|
);
|
|
1236
|
-
return d !==
|
|
1260
|
+
return d !== P && Z(oe(d, s)), !0;
|
|
1237
1261
|
},
|
|
1238
1262
|
resizeWidgetTo(e, t, n) {
|
|
1239
|
-
if (!
|
|
1240
|
-
const d =
|
|
1241
|
-
|
|
1263
|
+
if (!T || Q.current || !Number.isFinite(t) || !Number.isFinite(n) || !P.some((u) => u.id === e)) return !1;
|
|
1264
|
+
const d = pe(
|
|
1265
|
+
P,
|
|
1242
1266
|
"resize",
|
|
1243
1267
|
e,
|
|
1244
1268
|
Math.round(t),
|
|
1245
1269
|
Math.round(n),
|
|
1246
|
-
|
|
1270
|
+
s,
|
|
1247
1271
|
!1
|
|
1248
1272
|
);
|
|
1249
|
-
return d !==
|
|
1273
|
+
return d !== P && Z(oe(d, s)), !0;
|
|
1250
1274
|
},
|
|
1251
|
-
revealWidget:
|
|
1275
|
+
revealWidget: dt,
|
|
1252
1276
|
getGridState() {
|
|
1253
1277
|
return {
|
|
1254
|
-
cols:
|
|
1278
|
+
cols: s,
|
|
1255
1279
|
editing: a,
|
|
1256
|
-
stacked:
|
|
1257
|
-
layout:
|
|
1258
|
-
selectedId:
|
|
1280
|
+
stacked: M,
|
|
1281
|
+
layout: Se(P),
|
|
1282
|
+
selectedId: x ?? null
|
|
1259
1283
|
};
|
|
1260
1284
|
}
|
|
1261
1285
|
}),
|
|
1262
1286
|
[
|
|
1263
|
-
|
|
1287
|
+
T,
|
|
1264
1288
|
a,
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1289
|
+
M,
|
|
1290
|
+
P,
|
|
1291
|
+
s,
|
|
1292
|
+
Z,
|
|
1293
|
+
Se,
|
|
1294
|
+
dt,
|
|
1295
|
+
x
|
|
1272
1296
|
]
|
|
1273
1297
|
);
|
|
1274
|
-
Pt(
|
|
1298
|
+
Pt(H, () => ze, [ze]), Ot(Jt, ze, i);
|
|
1275
1299
|
const Ct = se(
|
|
1276
1300
|
() => ({
|
|
1277
|
-
editing:
|
|
1278
|
-
stacked:
|
|
1279
|
-
stackedHeight:
|
|
1280
|
-
selectedId:
|
|
1301
|
+
editing: T,
|
|
1302
|
+
stacked: M,
|
|
1303
|
+
stackedHeight: w,
|
|
1304
|
+
selectedId: x,
|
|
1281
1305
|
revealedId: st,
|
|
1282
1306
|
headingLevel: _,
|
|
1283
1307
|
layoutById: Ke,
|
|
1284
|
-
grab:
|
|
1285
|
-
canRemove: !!
|
|
1286
|
-
requestRemove:
|
|
1287
|
-
startKeyboardGrab:
|
|
1288
|
-
keyboardStep:
|
|
1289
|
-
startPointerGrab:
|
|
1290
|
-
startHeaderPress:
|
|
1308
|
+
grab: ae,
|
|
1309
|
+
canRemove: !!I,
|
|
1310
|
+
requestRemove: it,
|
|
1311
|
+
startKeyboardGrab: Be,
|
|
1312
|
+
keyboardStep: Je,
|
|
1313
|
+
startPointerGrab: Ze,
|
|
1314
|
+
startHeaderPress: et
|
|
1291
1315
|
}),
|
|
1292
1316
|
[
|
|
1293
|
-
|
|
1294
|
-
E,
|
|
1295
|
-
h,
|
|
1317
|
+
T,
|
|
1296
1318
|
M,
|
|
1319
|
+
w,
|
|
1320
|
+
x,
|
|
1297
1321
|
st,
|
|
1298
1322
|
_,
|
|
1299
1323
|
Ke,
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
qe,
|
|
1324
|
+
ae,
|
|
1325
|
+
I,
|
|
1326
|
+
it,
|
|
1304
1327
|
Be,
|
|
1305
|
-
|
|
1306
|
-
Ze
|
|
1328
|
+
Je,
|
|
1329
|
+
Ze,
|
|
1330
|
+
et
|
|
1307
1331
|
]
|
|
1308
1332
|
), Rt = se(() => {
|
|
1309
|
-
if (
|
|
1333
|
+
if (b === void 0) return k;
|
|
1310
1334
|
const e = [], t = /* @__PURE__ */ new Map(), n = [];
|
|
1311
|
-
return Le(
|
|
1312
|
-
const
|
|
1313
|
-
if (
|
|
1314
|
-
const c =
|
|
1315
|
-
key: `widget:${
|
|
1335
|
+
return Le(k, (d) => {
|
|
1336
|
+
const u = d.props.id;
|
|
1337
|
+
if (u && !t.has(u)) {
|
|
1338
|
+
const c = lt(d, {
|
|
1339
|
+
key: `widget:${u}:${d.key ?? ""}`
|
|
1316
1340
|
});
|
|
1317
|
-
t.set(
|
|
1341
|
+
t.set(u, c), e.push(c);
|
|
1318
1342
|
} else {
|
|
1319
|
-
const c =
|
|
1343
|
+
const c = lt(d, {
|
|
1320
1344
|
key: d.key === null ? `child:at:${n.length}` : `child:key:${d.key}`
|
|
1321
1345
|
});
|
|
1322
1346
|
n.push(c), e.push(c);
|
|
1323
1347
|
}
|
|
1324
|
-
}),
|
|
1325
|
-
...
|
|
1348
|
+
}), M ? [
|
|
1349
|
+
...tr([...t.keys()], P).map(
|
|
1326
1350
|
(d) => t.get(d)
|
|
1327
1351
|
),
|
|
1328
1352
|
...n
|
|
1329
1353
|
] : e;
|
|
1330
|
-
}, [
|
|
1331
|
-
return /* @__PURE__ */
|
|
1354
|
+
}, [b, k, M, P]);
|
|
1355
|
+
return /* @__PURE__ */ ge(
|
|
1332
1356
|
"div",
|
|
1333
1357
|
{
|
|
1334
|
-
ref:
|
|
1358
|
+
ref: $,
|
|
1335
1359
|
"data-component": "dashboard-grid",
|
|
1336
|
-
"data-component-id":
|
|
1337
|
-
"data-editing":
|
|
1338
|
-
"data-stacked":
|
|
1339
|
-
className: `ds:block ds:w-full ${
|
|
1360
|
+
"data-component-id": i,
|
|
1361
|
+
"data-editing": T || void 0,
|
|
1362
|
+
"data-stacked": M || void 0,
|
|
1363
|
+
className: `ds:block ds:w-full ${E ?? ""}`.trim(),
|
|
1340
1364
|
children: [
|
|
1341
|
-
/* @__PURE__ */ R("div", { role: "status", "aria-live": "polite", className: "ds:sr-only", children:
|
|
1342
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ R("div", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: At }),
|
|
1366
|
+
/* @__PURE__ */ ge(
|
|
1343
1367
|
"div",
|
|
1344
1368
|
{
|
|
1345
|
-
ref:
|
|
1369
|
+
ref: G,
|
|
1346
1370
|
role: "list",
|
|
1347
1371
|
"aria-label": r,
|
|
1348
1372
|
tabIndex: -1,
|
|
1349
|
-
"data-editing":
|
|
1350
|
-
"data-stacked":
|
|
1351
|
-
className:
|
|
1373
|
+
"data-editing": T || void 0,
|
|
1374
|
+
"data-stacked": M || void 0,
|
|
1375
|
+
className: rr({ stacked: M }),
|
|
1352
1376
|
children: [
|
|
1353
|
-
/* @__PURE__ */ R(
|
|
1354
|
-
|
|
1377
|
+
/* @__PURE__ */ R(St.Provider, { value: Ct, children: Rt }),
|
|
1378
|
+
He ? (
|
|
1355
1379
|
// role="list" allows only listitem children — the tile wrapper
|
|
1356
1380
|
// carries the grid placement, the button fills it.
|
|
1357
1381
|
/* @__PURE__ */ R(
|
|
1358
1382
|
"div",
|
|
1359
1383
|
{
|
|
1360
|
-
ref:
|
|
1384
|
+
ref: nt,
|
|
1361
1385
|
role: "listitem",
|
|
1362
1386
|
className: [
|
|
1363
1387
|
"ds:flex",
|
|
1364
1388
|
"ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]",
|
|
1365
1389
|
"ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]"
|
|
1366
1390
|
].join(" "),
|
|
1367
|
-
children: /* @__PURE__ */
|
|
1391
|
+
children: /* @__PURE__ */ ge(
|
|
1368
1392
|
"button",
|
|
1369
1393
|
{
|
|
1370
1394
|
type: "button",
|
|
1371
|
-
onClick:
|
|
1395
|
+
onClick: W,
|
|
1372
1396
|
className: [
|
|
1373
1397
|
"ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
|
|
1374
1398
|
"ds:rounded-[var(--radius-lg)] ds:border ds:border-dashed ds:border-border",
|
|
@@ -1377,8 +1401,8 @@ const Mt = Nt(
|
|
|
1377
1401
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring"
|
|
1378
1402
|
].join(" "),
|
|
1379
1403
|
children: [
|
|
1380
|
-
/* @__PURE__ */ R(
|
|
1381
|
-
|
|
1404
|
+
/* @__PURE__ */ R(jt, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
1405
|
+
A("dashboardGrid.add")
|
|
1382
1406
|
]
|
|
1383
1407
|
}
|
|
1384
1408
|
)
|
|
@@ -1393,12 +1417,12 @@ const Mt = Nt(
|
|
|
1393
1417
|
);
|
|
1394
1418
|
}
|
|
1395
1419
|
);
|
|
1396
|
-
|
|
1397
|
-
const
|
|
1398
|
-
Widget:
|
|
1420
|
+
Et.displayName = "DashboardGrid";
|
|
1421
|
+
const _r = Object.assign(Et, {
|
|
1422
|
+
Widget: Mt
|
|
1399
1423
|
});
|
|
1400
1424
|
export {
|
|
1401
|
-
|
|
1402
|
-
|
|
1425
|
+
_r as D,
|
|
1426
|
+
Jt as d
|
|
1403
1427
|
};
|
|
1404
|
-
//# sourceMappingURL=dashboard-grid-
|
|
1428
|
+
//# sourceMappingURL=dashboard-grid-B2MB7SRS.js.map
|