@chaibuilder/sdk 4.0.0-beta.4 → 4.0.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -50
- package/dist/{2SSKDMRQ-Difo_1pg.js → 2SSKDMRQ-CdpXONNF.js} +3 -3
- package/dist/{2SSKDMRQ-CopJgtZb.cjs → 2SSKDMRQ-Dq_oq6gn.cjs} +1 -1
- package/dist/{AP7HFJJL-BPuPBqj4.js → AP7HFJJL-CZb0rAxI.js} +1 -1
- package/dist/{AP7HFJJL-DYxDgaOs.cjs → AP7HFJJL-Do14BULM.cjs} +1 -1
- package/dist/{IconPicker-B2-oriq2.js → IconPicker-CvZSjXc6.js} +2 -2
- package/dist/{IconPicker-C0oycHbs.cjs → IconPicker-DUN9bxmQ.cjs} +1 -1
- package/dist/STRINGS-BExFecZW.js +8 -0
- package/dist/STRINGS-FNnfjF5H.cjs +1 -0
- package/dist/{WDYDFRGG-DbejaRPK.cjs → WDYDFRGG-DfczfcZ8.cjs} +1 -1
- package/dist/{WDYDFRGG-KK8pkcW1.js → WDYDFRGG-Dxa2zFdt.js} +4 -4
- package/dist/{actions-registery-y_ENc8zj.js → actions-registery-CMKfEXxX.js} +3397 -3202
- package/dist/actions-registery-CqhNZFV3.cjs +481 -0
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.ts +0 -158
- package/dist/actions.js +3 -3
- package/dist/{active-in-another-tab-DkR2HWI4.js → active-in-another-tab-BREv3Xj8.js} +5 -5
- package/dist/{active-in-another-tab-Cu_ASKtx.cjs → active-in-another-tab-C9o276yY.cjs} +1 -1
- package/dist/{add-new-language-page-CBY0RR6q.js → add-new-language-page-C4PSVDV5.js} +4 -4
- package/dist/{add-new-language-page-BXuwluuU.cjs → add-new-language-page-jHLJjrl1.cjs} +1 -1
- package/dist/{add-new-page-C_PzKby8.cjs → add-new-page-BPPMxBYi.cjs} +1 -1
- package/dist/add-new-page-DomZuT16.js +31 -0
- package/dist/{ai-panel-content--YM01Aly.js → ai-panel-content-CsmUoTCg.js} +6 -6
- package/dist/{ai-panel-content-rRmJdH7L.cjs → ai-panel-content-DlS51Qef.cjs} +1 -1
- package/dist/ai-panel-default-lang-BRVlAMMU.js +317 -0
- package/dist/ai-panel-default-lang-DVKDEnbe.cjs +3 -0
- package/dist/ai-panel-other-lang-B-2xJz2W.cjs +1 -0
- package/dist/ai-panel-other-lang-BPVS6lO_.js +132 -0
- package/dist/{ai-prompt-input-DueQYNf-.js → ai-prompt-input-B0FMhaLB.js} +30 -34
- package/dist/{ai-prompt-input-N9PcYCFa.cjs → ai-prompt-input-CY2pBPzO.cjs} +1 -1
- package/dist/{ai-translation-prompt-B36F3d7K.js → ai-translation-prompt-6LlaU9LO.js} +2 -2
- package/dist/{ai-translation-prompt-IAdWMNZb.cjs → ai-translation-prompt-BwhKmgC3.cjs} +1 -1
- package/dist/apply-binding-BuwI_Uf5.cjs +41 -0
- package/dist/apply-binding-RQRSIe56.js +942 -0
- package/dist/change-password-modal-BlSTfit6.js +137 -0
- package/dist/change-password-modal-wbCcGfDM.cjs +1 -0
- package/dist/{code-display-DloSPyPr.cjs → code-display-BR-gij5j.cjs} +1 -1
- package/dist/{code-display-Ck81Id9K.js → code-display-DdWcOQ_i.js} +1 -1
- package/dist/code-editor-BC_saYAw.cjs +1 -0
- package/dist/code-editor-Be5VT6om.js +57 -0
- package/dist/{continue-editing-in-this-client-DmGFLHXw.cjs → continue-editing-in-this-client-Bs_3q1hH.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-Dm9cCj7K.js → continue-editing-in-this-client-Z1rBUPU8.js} +3 -3
- package/dist/core-czmLeR0h.cjs +1 -0
- package/dist/core-nSRy3D7z.js +54 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +285 -103
- package/dist/core.js +71 -42
- package/dist/{css-import-modal-9P_0uNa4.js → css-import-modal-DMZRgpy0.js} +8 -8
- package/dist/{css-import-modal-Rh1QAVxo.cjs → css-import-modal-QaTHJ7CT.cjs} +1 -1
- package/dist/delete-page-BoP3I06P.js +84 -0
- package/dist/delete-page-CjXYHAsS.cjs +1 -0
- package/dist/{design-token-usage-MNYsFlPG.js → design-token-usage-DFanW2r-.js} +26 -26
- package/dist/{design-token-usage-CXglXgcJ.cjs → design-token-usage-kEPgi-3C.cjs} +1 -1
- package/dist/{digital-asset-manager-CqCWBO0s.js → digital-asset-manager-BbI7Ye34.js} +6 -6
- package/dist/digital-asset-manager-N8tcW28y.cjs +1 -0
- package/dist/{duplicate-page-DzZByALW.cjs → duplicate-page-B-4nFU4j.cjs} +1 -1
- package/dist/{duplicate-page-BknLfqr0.js → duplicate-page-C6y7FdRQ.js} +7 -7
- package/dist/{dynamic-page-selector-WA007Sni.cjs → dynamic-page-selector-Cq4U-49i.cjs} +1 -1
- package/dist/{dynamic-page-selector-DoW7OyUB.js → dynamic-page-selector-DQCWphi0.js} +16 -16
- package/dist/fonts/bungee/Bungee-Regular.woff2 +0 -0
- package/dist/fonts/dm_sans/dm-sans-variable.woff2 +0 -0
- package/dist/fonts/geist/Geist-VariableFont_wght.ttf +0 -0
- package/dist/fonts/geist/Geist-VariableFont_wght.woff2 +0 -0
- package/dist/fonts/geist/geist-variable.woff2 +0 -0
- package/dist/fonts/geist-mono/GeistMono-VariableFont_wght.woff2 +0 -0
- package/dist/fonts/inter/inter-latin.woff2 +0 -0
- package/dist/fonts/inter/inter-variable.woff2 +1449 -0
- package/dist/fonts/lato/lato-variable.woff2 +0 -0
- package/dist/fonts/lavishly_yours/lavishly-yours.woff2 +11 -0
- package/dist/fonts/merriweather/merriweather-variable.woff2 +11 -0
- package/dist/fonts/montserrat/montserrat-variable.woff2 +0 -0
- package/dist/fonts/nunito_sans/nunito-sans-variable.woff2 +11 -0
- package/dist/fonts/open_sans/open-sans-variable.woff2 +0 -0
- package/dist/fonts/oswald/oswald-variable.woff2 +0 -0
- package/dist/fonts/playfair_display/playfair-display-variable.woff2 +11 -0
- package/dist/fonts/poppins/poppins-variable.woff2 +0 -0
- package/dist/fonts/raleway/raleway-variable.woff2 +0 -0
- package/dist/fonts/roboto/roboto-variable.woff2 +11 -0
- package/dist/fonts/source_sans_3/source-sans-3-variable.woff2 +11 -0
- package/dist/fonts/ubuntu/ubuntu-variable.woff2 +0 -0
- package/dist/fonts-B3UYxuJI.js +25 -0
- package/dist/fonts-D5fTqvSS.cjs +1 -0
- package/dist/{get-chai-builder-tailwind-config-BFePCEIS.cjs → get-chai-builder-tailwind-config-7CxFxEYL.cjs} +1 -1
- package/dist/{get-chai-builder-tailwind-config-BXf_xLHk.js → get-chai-builder-tailwind-config-DC4sDOYK.js} +5 -5
- package/dist/{get-chai-builder-theme-BApShjRz.cjs → get-chai-builder-theme-B5RkBTsB.cjs} +1 -1
- package/dist/{get-chai-builder-theme-DDVRJQ6Z.js → get-chai-builder-theme-BpuwSLeS.js} +1 -1
- package/dist/{image-compression-DsZ1oqpb.js → image-compression-DPFITwOL.js} +2 -2
- package/dist/image-compression-UaU7Bwqe.cjs +1 -0
- package/dist/{image-editor-CqwaVxO2.cjs → image-editor-565A0NpE.cjs} +1 -1
- package/dist/{image-editor-CQnNtak2.js → image-editor-Dz_HQ0I8.js} +1 -1
- package/dist/index-3pEi7VzS.cjs +5 -0
- package/dist/index-C3CV1lXL.cjs +160 -0
- package/dist/index-CDVuf3C1.js +5118 -0
- package/dist/{index-rAcNbjk_.js → index-wBr2Ml98.js} +6152 -6102
- package/dist/{json-diff-viewer-CLuUHiPU.cjs → json-diff-viewer-CMYFM6D6.cjs} +7 -7
- package/dist/{json-diff-viewer-CMvGUvJ2.js → json-diff-viewer-DG7a5-2B.js} +87 -85
- package/dist/{lang-panel-CnwTb05j.js → lang-panel-BvGiJJ8s.js} +26 -26
- package/dist/lang-panel-D97iJH-l.cjs +1 -0
- package/dist/library-blocks/bento/agency-showcase/agency-showcase.html +175 -0
- package/dist/library-blocks/bento/agency-showcase/agency-showcase.webp +0 -0
- package/dist/library-blocks/bento/creative-portfolio/creative-portfolio.html +116 -0
- package/dist/library-blocks/bento/creative-portfolio/creative-portfolio.webp +0 -0
- package/dist/library-blocks/bento/product-features/product-features.html +159 -0
- package/dist/library-blocks/bento/product-features/product-features.webp +0 -0
- package/dist/library-blocks/bento/saas-dashboard/saas-dashboard.html +182 -0
- package/dist/library-blocks/bento/saas-dashboard/saas-dashboard.webp +0 -0
- package/dist/library-blocks/bento/startup-metrics/startup-metrics.html +170 -0
- package/dist/library-blocks/bento/startup-metrics/startup-metrics.webp +0 -0
- package/dist/library-blocks/blocks-list.json +149 -0
- package/dist/library-blocks/feature/agency-services/agency-services.html +194 -0
- package/dist/library-blocks/feature/agency-services/agency-services.webp +0 -0
- package/dist/library-blocks/feature/consulting-firm/consulting-firm.html +219 -0
- package/dist/library-blocks/feature/consulting-firm/consulting-firm.webp +0 -0
- package/dist/library-blocks/feature/design-studio/design-studio.html +190 -0
- package/dist/library-blocks/feature/design-studio/design-studio.webp +0 -0
- package/dist/library-blocks/feature/freelancer-toolkit/freelancer-toolkit.html +195 -0
- package/dist/library-blocks/feature/freelancer-toolkit/freelancer-toolkit.webp +0 -0
- package/dist/library-blocks/feature/marketing-agency/marketing-agency.html +212 -0
- package/dist/library-blocks/feature/marketing-agency/marketing-agency.webp +0 -0
- package/dist/library-blocks/footer/creative-agency/creative-agency.html +64 -0
- package/dist/library-blocks/footer/creative-agency/creative-agency.webp +0 -0
- package/dist/library-blocks/footer/minimal-portfolio/minimal-portfolio.html +106 -0
- package/dist/library-blocks/footer/minimal-portfolio/minimal-portfolio.webp +0 -0
- package/dist/library-blocks/footer/saas-startup/saas-startup.html +117 -0
- package/dist/library-blocks/footer/saas-startup/saas-startup.webp +0 -0
- package/dist/library-blocks/hero/creative-agency/creative-agency.html +117 -0
- package/dist/library-blocks/hero/creative-agency/creative-agency.webp +0 -0
- package/dist/library-blocks/hero/developer-focused/developer-focused.html +124 -0
- package/dist/library-blocks/hero/developer-focused/developer-focused.webp +0 -0
- package/dist/library-blocks/hero/minimal-saas/minimal-saas.html +98 -0
- package/dist/library-blocks/hero/minimal-saas/minimal-saas.webp +0 -0
- package/dist/library-blocks/hero/portfolio-showcase/portfolio-showcase.html +148 -0
- package/dist/library-blocks/hero/portfolio-showcase/portfolio-showcase.webp +0 -0
- package/dist/library-blocks/hero/startup-landing/startup-landing.html +130 -0
- package/dist/library-blocks/hero/startup-landing/startup-landing.webp +0 -0
- package/dist/library-blocks/navbar/creative-agency/creative-agency.html +139 -0
- package/dist/library-blocks/navbar/creative-agency/creative-agency.webp +0 -0
- package/dist/library-blocks/navbar/minimal-portfolio/minimal-portfolio.html +164 -0
- package/dist/library-blocks/navbar/minimal-portfolio/minimal-portfolio.webp +0 -0
- package/dist/library-blocks/navbar/saas-startup/saas-startup.html +129 -0
- package/dist/library-blocks/navbar/saas-startup/saas-startup.webp +0 -0
- package/dist/manage-design-tokens-4Gu6TMKZ.js +446 -0
- package/dist/manage-design-tokens-Do9Kptp3.cjs +1 -0
- package/dist/manage-design-tokens-modal-Btbdgoun.cjs +1 -0
- package/dist/manage-design-tokens-modal-CkyFE8NW.js +161 -0
- package/dist/{mark-as-template-DBLshWb5.js → mark-as-template-Djhnj93U.js} +11 -11
- package/dist/{mark-as-template-CpWEBJGd.cjs → mark-as-template-QPJ0DqxL.cjs} +1 -1
- package/dist/{nested-path-selector-content-C2sD9dkq.cjs → nested-path-selector-content-BcmSxXxL.cjs} +1 -1
- package/dist/{nested-path-selector-content-6OBJ8LG8.js → nested-path-selector-content-DkPIHcVj.js} +2 -2
- package/dist/{no-language-page-content-CzENgtnu.js → no-language-page-content-DTq-5StU.js} +9 -9
- package/dist/{no-language-page-content-BvPDdccK.cjs → no-language-page-content-ZQz4Kr0-.cjs} +1 -1
- package/dist/{no-language-page-dialog-CbYI2cVg.js → no-language-page-dialog-2rA-YBbC.js} +2 -2
- package/dist/{no-language-page-dialog-CgW4yJBC.cjs → no-language-page-dialog-BsLkwJID.cjs} +1 -1
- package/dist/{page-creator-Cc83uQqw.js → page-creator-Dzpc0_dN.js} +143 -143
- package/dist/page-creator-lcDUpPjh.cjs +1 -0
- package/dist/{page-lock-CT7SmQqp.cjs → page-lock-B2GU-1YM.cjs} +1 -1
- package/dist/{page-lock-BJUkyxdh.js → page-lock-ulFtdOkt.js} +2 -2
- package/dist/{page-locked-dialog-DsEbWRed.js → page-locked-dialog-B9VpkvhN.js} +22 -22
- package/dist/page-locked-dialog-CJ53Z6sQ.cjs +1 -0
- package/dist/page-manager-new-CkoS0B1i.cjs +1 -0
- package/dist/page-manager-new-OoC8W7Yn.js +408 -0
- package/dist/{page-manager-search-and-filter-Bfm0j1gg.cjs → page-manager-search-and-filter-BosoN3wg.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-zq-LfhQ1.js → page-manager-search-and-filter-JfSTGlvp.js} +30 -29
- package/dist/{page-revisions-content-D38G2tJM.js → page-revisions-content-DsFh5itr.js} +133 -122
- package/dist/page-revisions-content-Dtd-t1N3.cjs +1 -0
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +330 -96
- package/dist/pages.js +23 -19
- package/dist/plugin-BSjgGgwo.js +248 -0
- package/dist/plugin-DHpuZZXz.cjs +22 -0
- package/dist/publish-pages-content-C7oS7pkz.cjs +1 -0
- package/dist/{publish-pages-content-CS7f41Ac.js → publish-pages-content-DJc7iu8d.js} +39 -39
- package/dist/{register-chai-top-bar-ESJHs5s-.js → register-chai-top-bar-D6GjnauV.js} +87 -87
- package/dist/register-chai-top-bar-DyW9GPzV.cjs +1 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +20 -18
- package/dist/render.js +133 -132
- package/dist/{rte-widget-modal-BKNx2wln.cjs → rte-widget-modal-BKQaoxh9.cjs} +1 -1
- package/dist/{rte-widget-modal-D6Zik0Ta.js → rte-widget-modal-BdBYmqgs.js} +10 -10
- package/dist/runtime-client.cjs +1 -0
- package/dist/runtime-client.d.ts +158 -0
- package/dist/runtime-client.js +32 -0
- package/dist/runtime.cjs +11 -1
- package/dist/runtime.d.ts +153 -270
- package/dist/runtime.js +107 -71
- package/dist/{save-to-lib-WwOzbgiF.js → save-to-lib-5nwSdZ9R.js} +153 -147
- package/dist/save-to-lib-D0WdH4lq.cjs +1 -0
- package/dist/sdk.css +1 -1
- package/dist/{selected-block-display-B1SG_UXw.js → selected-block-display-D8ROZHHv.js} +12 -12
- package/dist/{selected-block-display-BOgnQRLF.cjs → selected-block-display-DjYeUPdU.cjs} +1 -1
- package/dist/{seo-panel-BkOgRoWd.js → seo-panel-BbyRNAEo.js} +27 -27
- package/dist/seo-panel-DRjSxmk5.cjs +2 -0
- package/dist/shared-json-ld-BbNLdzCO.cjs +1 -0
- package/dist/{shared-json-ld-uka9TOgA.js → shared-json-ld-EPbpTI9V.js} +88 -88
- package/dist/{slug-input-Cyd6NR6J.cjs → slug-input-CIzxXknM.cjs} +1 -1
- package/dist/{slug-input-DHLmUNrH.js → slug-input-DSbJecNr.js} +8 -8
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.d.ts +45 -0
- package/dist/supabase-actions.js +380 -275
- package/dist/{take-over-request-Ca0X-qyf.js → take-over-request-BOGDk0H4.js} +13 -13
- package/dist/take-over-request-BXntCMdj.cjs +1 -0
- package/dist/{translation-warning-modal-pSZVKcNW.cjs → translation-warning-modal-DhJaOyLo.cjs} +1 -1
- package/dist/{translation-warning-modal-DrpFeI83.js → translation-warning-modal-reVr0L9e.js} +9 -9
- package/dist/types.cjs +1 -0
- package/dist/types.d.ts +756 -0
- package/dist/types.js +1 -0
- package/dist/{unmark-as-template-BMqgelv-.js → unmark-as-template-BM85Y7WK.js} +11 -11
- package/dist/{unmark-as-template-DF1Ms4VN.cjs → unmark-as-template-DOPyeU7R.cjs} +1 -1
- package/dist/unpublish-page-DHfds-1-.js +28 -0
- package/dist/{unpublish-page-Bsq2yEqQ.cjs → unpublish-page-Dz028Bzp.cjs} +1 -1
- package/dist/unpublished-partials-modal-BO5ZZdTw.js +52 -0
- package/dist/unpublished-partials-modal-CMqQa9-m.cjs +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +6 -6
- package/dist/utils.js +2 -2
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +360 -351
- package/dist/{web-preview-kres0aG7.cjs → web-preview-5MzixBt5.cjs} +1 -1
- package/dist/{web-preview-D6h1L2nV.js → web-preview-BNjG8s8A.js} +2 -2
- package/package.json +34 -35
- package/dist/actions-registery-JdxhXhT6.cjs +0 -418
- package/dist/add-new-page-DJLJFLAd.js +0 -31
- package/dist/ai-panel-default-lang-BZl0tPYo.js +0 -341
- package/dist/ai-panel-default-lang-D2zhXvKP.cjs +0 -3
- package/dist/ai-panel-other-lang-Bfjk2CYZ.js +0 -162
- package/dist/ai-panel-other-lang-Y4bEKHoG.cjs +0 -1
- package/dist/apply-binding-BvWfJCSZ.js +0 -841
- package/dist/apply-binding-IsUf6UWJ.cjs +0 -1
- package/dist/code-editor-Bb7JumZy.js +0 -51
- package/dist/code-editor-DQB8lAOk.cjs +0 -1
- package/dist/core-Dr7QYemB.js +0 -56
- package/dist/core-Y0lXLwkq.cjs +0 -1
- package/dist/delete-design-token-BG8yHcS5.cjs +0 -1
- package/dist/delete-design-token-COvR4G1S.js +0 -40
- package/dist/delete-page-CNucxe4P.js +0 -71
- package/dist/delete-page-DAvEjHwF.cjs +0 -1
- package/dist/digital-asset-manager-CB5MRBcW.cjs +0 -1
- package/dist/fonts/GeistMonoVF.woff +0 -0
- package/dist/fonts/GeistVF.woff +0 -0
- package/dist/fonts-B-Xt29pe.cjs +0 -1
- package/dist/fonts-DRly3Wzd.js +0 -78
- package/dist/image-compression-DZ9WMmyn.cjs +0 -1
- package/dist/index-B-rSiAp_.cjs +0 -1
- package/dist/index-C0-pgg_p.cjs +0 -5
- package/dist/index-C99FhuF1.cjs +0 -160
- package/dist/index-Dno42B0a.js +0 -4734
- package/dist/index-Dxfyt4d4.js +0 -39
- package/dist/lang-panel-fDCYm5Jm.cjs +0 -1
- package/dist/manage-design-tokens-BsSZE9Vs.js +0 -241
- package/dist/manage-design-tokens-BvH5KTJX.cjs +0 -1
- package/dist/page-creator-g8GqgcKH.cjs +0 -1
- package/dist/page-locked-dialog-Co5b9XIZ.cjs +0 -1
- package/dist/page-manager-new-5rFP5DyQ.js +0 -395
- package/dist/page-manager-new-BOkJImo2.cjs +0 -1
- package/dist/page-revisions-content-ag-MHBGr.cjs +0 -1
- package/dist/plugin-BGlQf0iy.cjs +0 -22
- package/dist/plugin-C-ht41UZ.js +0 -245
- package/dist/publish-pages-content-BiX-GMLw.cjs +0 -1
- package/dist/register-chai-top-bar-BqwKw4uy.cjs +0 -1
- package/dist/save-to-lib-ffjCZYJ5.cjs +0 -1
- package/dist/seo-panel-FjS1UF_y.cjs +0 -2
- package/dist/shared-json-ld-yJkXjENy.cjs +0 -1
- package/dist/take-over-request-CmpJVe9T.cjs +0 -1
- package/dist/theme-panel-footer-BUXIu252.js +0 -26
- package/dist/theme-panel-footer-CKO9YYwZ.cjs +0 -1
- package/dist/unpublish-page-BJ0Bsvt2.js +0 -28
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { z as
|
|
3
|
-
import { j as os,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as s, jsxs as a, Fragment as We } from "react/jsx-runtime";
|
|
2
|
+
import { z as Y, h as ye, B as W } from "./register-chai-top-bar-D6GjnauV.js";
|
|
3
|
+
import { j as os, p as z, X as ee, Y as se, P as le, C as ae, k as ne, l as G, m as I, ax as cs, d as us } from "./index-wBr2Ml98.js";
|
|
4
|
+
import { useState as y, useRef as ms, useEffect as ze, useMemo as B, startTransition as Oe } from "react";
|
|
5
|
+
import { r as te, S as hs, c as Be } from "./slug-input-DSbJecNr.js";
|
|
6
|
+
import { isEmpty as Ie, startCase as de, filter as ps, find as ge, groupBy as ds, pick as fs, set as P } from "lodash-es";
|
|
7
7
|
import { ChevronDown as re, Search as ie, Check as R } from "lucide-react";
|
|
8
|
-
import {
|
|
9
|
-
import { useQuery as
|
|
8
|
+
import { ap as Re, aq as Ue, A as oe, k as gs, ar as ys, e as vs, f as Ns, g as Ss, aw as bs, L as ws } from "./index-CDVuf3C1.js";
|
|
9
|
+
import { useQuery as qe } from "@tanstack/react-query";
|
|
10
10
|
import { toast as E } from "sonner";
|
|
11
11
|
import { g as $e } from "./get-seo-defaults-9zHebckY.js";
|
|
12
12
|
function xs({
|
|
13
|
-
value:
|
|
13
|
+
value: l,
|
|
14
14
|
onChange: o,
|
|
15
15
|
placeholder: v = "Enter custom slug part",
|
|
16
16
|
dynamicPattern: p,
|
|
17
17
|
onValidationChange: i
|
|
18
18
|
}) {
|
|
19
|
-
const [g, u] = y(null), m =
|
|
20
|
-
|
|
21
|
-
C(p +
|
|
22
|
-
}, [
|
|
19
|
+
const [g, u] = y(null), m = ms(null), [f, C] = y(p + l);
|
|
20
|
+
ze(() => {
|
|
21
|
+
C(p + l);
|
|
22
|
+
}, [l, p]);
|
|
23
23
|
const F = (S) => {
|
|
24
24
|
const b = S.target.value;
|
|
25
25
|
if (!b.startsWith(p)) {
|
|
@@ -46,13 +46,13 @@ function xs({
|
|
|
46
46
|
b.setSelectionRange(t, t);
|
|
47
47
|
}, 0);
|
|
48
48
|
};
|
|
49
|
-
return /* @__PURE__ */ s("div", { children: /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ s("div", { children: /* @__PURE__ */ a("div", { className: "relative", children: [
|
|
50
|
+
/* @__PURE__ */ a("p", { className: "mb-2 text-xs text-gray-500", children: [
|
|
51
51
|
`${p}`,
|
|
52
52
|
" is a dynamic segment of slug"
|
|
53
53
|
] }),
|
|
54
54
|
/* @__PURE__ */ s(
|
|
55
|
-
|
|
55
|
+
Y,
|
|
56
56
|
{
|
|
57
57
|
ref: m,
|
|
58
58
|
value: f,
|
|
@@ -66,7 +66,7 @@ function xs({
|
|
|
66
66
|
g && /* @__PURE__ */ s("div", { className: "mt-1 text-xs text-red-500", children: g })
|
|
67
67
|
] }) });
|
|
68
68
|
}
|
|
69
|
-
const ce = ({ children:
|
|
69
|
+
const ce = ({ children: l, onWheel: o, ...v }) => /* @__PURE__ */ s(os, { ...v, onWheel: (i) => {
|
|
70
70
|
try {
|
|
71
71
|
i.preventDefault();
|
|
72
72
|
const g = i.currentTarget;
|
|
@@ -75,9 +75,9 @@ const ce = ({ children: a, onWheel: o, ...v }) => /* @__PURE__ */ s(os, { ...v,
|
|
|
75
75
|
i.preventDefault();
|
|
76
76
|
}
|
|
77
77
|
o && o(i);
|
|
78
|
-
}, children:
|
|
78
|
+
}, children: l }), fe = (...l) => l.filter(Boolean).join(" ");
|
|
79
79
|
function Cs({
|
|
80
|
-
pages:
|
|
80
|
+
pages: l,
|
|
81
81
|
selectedParentId: o,
|
|
82
82
|
onChange: v,
|
|
83
83
|
className: p,
|
|
@@ -86,7 +86,7 @@ function Cs({
|
|
|
86
86
|
}) {
|
|
87
87
|
const [u, m] = y(!1), [f, C] = y(""), F = ye("enable-add-page-dropdown");
|
|
88
88
|
F || (p = "w-full rounded-md border border-gray-300 px-3 py-2");
|
|
89
|
-
const w = B(() => !
|
|
89
|
+
const w = B(() => !l || l.length === 0 ? [] : l.filter((d) => !Ie(d.slug)).filter((d) => d.slug !== "/").sort((d, N) => d.slug.localeCompare(N.slug)), [l]), $ = B(() => {
|
|
90
90
|
if (!f.trim()) return w;
|
|
91
91
|
const n = f.toLowerCase();
|
|
92
92
|
return w.filter(
|
|
@@ -105,10 +105,10 @@ function Cs({
|
|
|
105
105
|
const n = w.find((d) => d.id === o);
|
|
106
106
|
return n ? `${n.name} (${h(n.slug)})` : "None";
|
|
107
107
|
};
|
|
108
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ a("div", { className: "space-y-0.5", children: [
|
|
109
109
|
/* @__PURE__ */ s(z, { htmlFor: i, className: "text-sm", children: "Parent" }),
|
|
110
|
-
F ? /* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */
|
|
110
|
+
F ? /* @__PURE__ */ a(ee, { open: u, onOpenChange: m, children: [
|
|
111
|
+
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ a(
|
|
112
112
|
W,
|
|
113
113
|
{
|
|
114
114
|
id: i,
|
|
@@ -122,11 +122,11 @@ function Cs({
|
|
|
122
122
|
]
|
|
123
123
|
}
|
|
124
124
|
) }),
|
|
125
|
-
/* @__PURE__ */ s(
|
|
126
|
-
/* @__PURE__ */ s("div", { className: "relative border-none py-2", children: /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ s(le, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ a(ae, { shouldFilter: !1, children: [
|
|
126
|
+
/* @__PURE__ */ s("div", { className: "relative border-none py-2", children: /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ a("div", { className: "relative", children: [
|
|
127
127
|
/* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
|
|
128
128
|
/* @__PURE__ */ s(
|
|
129
|
-
|
|
129
|
+
Y,
|
|
130
130
|
{
|
|
131
131
|
placeholder: "Search pages...",
|
|
132
132
|
className: "h-8 pl-8 text-xs",
|
|
@@ -135,10 +135,10 @@ function Cs({
|
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
] }) }) }),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ a(ce, { className: "max-h-[300px] overflow-y-auto", children: [
|
|
139
139
|
/* @__PURE__ */ s(ne, { children: "No pages found." }),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ a(G, { children: [
|
|
141
|
+
/* @__PURE__ */ a(
|
|
142
142
|
I,
|
|
143
143
|
{
|
|
144
144
|
value: "none",
|
|
@@ -153,16 +153,16 @@ function Cs({
|
|
|
153
153
|
}
|
|
154
154
|
),
|
|
155
155
|
$.map((n) => {
|
|
156
|
-
const d = b(S(n.slug)), N = h(n.slug), O = /* @__PURE__ */
|
|
156
|
+
const d = b(S(n.slug)), N = h(n.slug), O = /* @__PURE__ */ a("span", { className: "flex items-center text-sm", children: [
|
|
157
157
|
d,
|
|
158
158
|
n.name,
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ a("span", { className: "text-xs text-gray-500", children: [
|
|
160
160
|
" (",
|
|
161
161
|
N,
|
|
162
162
|
")"
|
|
163
163
|
] })
|
|
164
164
|
] });
|
|
165
|
-
return /* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ a(
|
|
166
166
|
I,
|
|
167
167
|
{
|
|
168
168
|
value: n.id,
|
|
@@ -189,7 +189,7 @@ function Cs({
|
|
|
189
189
|
] })
|
|
190
190
|
] })
|
|
191
191
|
] }) })
|
|
192
|
-
] }) : /* @__PURE__ */
|
|
192
|
+
] }) : /* @__PURE__ */ a(
|
|
193
193
|
"select",
|
|
194
194
|
{
|
|
195
195
|
id: i,
|
|
@@ -201,7 +201,7 @@ function Cs({
|
|
|
201
201
|
/* @__PURE__ */ s("option", { value: "none", children: "None" }),
|
|
202
202
|
w.map((n) => {
|
|
203
203
|
const d = S(n.slug), N = d > 0 ? b(d) : "", O = h(n.slug);
|
|
204
|
-
return (g == null ? void 0 : g.id) === n.id || n.slug.startsWith(g == null ? void 0 : g.slug) ? null : /* @__PURE__ */
|
|
204
|
+
return (g == null ? void 0 : g.id) === n.id || n.slug.startsWith(g == null ? void 0 : g.slug) ? null : /* @__PURE__ */ a("option", { value: n.id, children: [
|
|
205
205
|
N,
|
|
206
206
|
n.name,
|
|
207
207
|
" (",
|
|
@@ -214,25 +214,25 @@ function Cs({
|
|
|
214
214
|
)
|
|
215
215
|
] });
|
|
216
216
|
}
|
|
217
|
-
const ks = (...
|
|
218
|
-
templates:
|
|
217
|
+
const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
|
|
218
|
+
templates: l,
|
|
219
219
|
selectedTemplateId: o,
|
|
220
220
|
onSelectTemplate: v,
|
|
221
221
|
isLoading: p = !1
|
|
222
222
|
}) => {
|
|
223
223
|
const [i, g] = y(""), [u, m] = y(!1), [f, C] = y(""), F = ye("enable-add-page-dropdown");
|
|
224
|
-
if (
|
|
224
|
+
if (ze(() => {
|
|
225
225
|
if (o) {
|
|
226
|
-
const h =
|
|
226
|
+
const h = l.find((t) => t.id === o);
|
|
227
227
|
Oe(() => g((h == null ? void 0 : h.preview) || ""));
|
|
228
228
|
} else
|
|
229
229
|
Oe(() => g(""));
|
|
230
|
-
}, [o,
|
|
230
|
+
}, [o, l]), p)
|
|
231
231
|
return /* @__PURE__ */ s("div", { className: "flex h-fit items-center justify-center text-sm text-gray-500", children: "Loading templates..." });
|
|
232
|
-
if (
|
|
232
|
+
if (l.length === 0)
|
|
233
233
|
return null;
|
|
234
234
|
const w = {};
|
|
235
|
-
|
|
235
|
+
l.forEach((h) => {
|
|
236
236
|
const t = h.libraryName;
|
|
237
237
|
w[t] || (w[t] = []), w[t].push(h);
|
|
238
238
|
});
|
|
@@ -244,18 +244,18 @@ const ks = (...a) => a.filter(Boolean).join(" "), Ls = ({
|
|
|
244
244
|
return d.length > 0 && (h[t] = d), h;
|
|
245
245
|
},
|
|
246
246
|
{}
|
|
247
|
-
), S =
|
|
248
|
-
return /* @__PURE__ */
|
|
249
|
-
F ? /* @__PURE__ */
|
|
250
|
-
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */
|
|
247
|
+
), S = l.find((h) => h.id === o), b = S ? de(S.name) : "No Template";
|
|
248
|
+
return /* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
249
|
+
F ? /* @__PURE__ */ a(ee, { open: u, onOpenChange: m, children: [
|
|
250
|
+
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ a(W, { variant: "outline", role: "combobox", className: "w-full justify-between", children: [
|
|
251
251
|
b,
|
|
252
252
|
/* @__PURE__ */ s(re, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
253
253
|
] }) }),
|
|
254
|
-
/* @__PURE__ */ s(
|
|
255
|
-
/* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ s(le, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ a(ae, { shouldFilter: !1, children: [
|
|
255
|
+
/* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ a("div", { className: "relative", children: [
|
|
256
256
|
/* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
|
|
257
257
|
/* @__PURE__ */ s(
|
|
258
|
-
|
|
258
|
+
Y,
|
|
259
259
|
{
|
|
260
260
|
placeholder: "Search templates...",
|
|
261
261
|
className: "h-8 pl-8 text-xs",
|
|
@@ -264,9 +264,9 @@ const ks = (...a) => a.filter(Boolean).join(" "), Ls = ({
|
|
|
264
264
|
}
|
|
265
265
|
)
|
|
266
266
|
] }) }),
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ a(ce, { className: "max-h-[300px] overflow-y-auto", children: [
|
|
268
268
|
/* @__PURE__ */ s(ne, { children: "No templates found." }),
|
|
269
|
-
Object.entries($).map(([h, t]) => /* @__PURE__ */ s(G, { heading: h, children: t.map((n) => /* @__PURE__ */
|
|
269
|
+
Object.entries($).map(([h, t]) => /* @__PURE__ */ s(G, { heading: h, children: t.map((n) => /* @__PURE__ */ a(
|
|
270
270
|
I,
|
|
271
271
|
{
|
|
272
272
|
value: n.id,
|
|
@@ -291,7 +291,7 @@ const ks = (...a) => a.filter(Boolean).join(" "), Ls = ({
|
|
|
291
291
|
)) }, h))
|
|
292
292
|
] })
|
|
293
293
|
] }) })
|
|
294
|
-
] }) : /* @__PURE__ */
|
|
294
|
+
] }) : /* @__PURE__ */ a(
|
|
295
295
|
"select",
|
|
296
296
|
{
|
|
297
297
|
className: "w-full rounded-md border border-gray-300 px-3 py-2",
|
|
@@ -303,64 +303,64 @@ const ks = (...a) => a.filter(Boolean).join(" "), Ls = ({
|
|
|
303
303
|
]
|
|
304
304
|
}
|
|
305
305
|
),
|
|
306
|
-
i && /* @__PURE__ */
|
|
306
|
+
i && /* @__PURE__ */ a("div", { className: "mt-3 overflow-hidden rounded border", children: [
|
|
307
307
|
/* @__PURE__ */ s("div", { className: "max-h-[200px] overflow-auto", children: /* @__PURE__ */ s("img", { src: i, alt: "Template Preview", className: "w-full object-contain" }) }),
|
|
308
308
|
/* @__PURE__ */ s("div", { className: "border-t bg-gray-50 p-2 text-xs text-gray-500", children: "Template preview" })
|
|
309
309
|
] })
|
|
310
310
|
] });
|
|
311
311
|
}, Ts = () => {
|
|
312
|
-
const
|
|
313
|
-
return
|
|
312
|
+
const l = Re(), o = Ue();
|
|
313
|
+
return qe({
|
|
314
314
|
queryKey: [oe.GET_LIBRARIES],
|
|
315
315
|
staleTime: "static",
|
|
316
|
-
queryFn: async () => await o(
|
|
316
|
+
queryFn: async () => await o(l, { action: oe.GET_LIBRARIES }) || []
|
|
317
317
|
});
|
|
318
|
-
}, js = (
|
|
318
|
+
}, js = (l) => {
|
|
319
319
|
const o = Re(), v = Ue();
|
|
320
|
-
return
|
|
321
|
-
queryKey: [oe.GET_TEMPLATES_BY_TYPE,
|
|
320
|
+
return qe({
|
|
321
|
+
queryKey: [oe.GET_TEMPLATES_BY_TYPE, l],
|
|
322
322
|
staleTime: "static",
|
|
323
|
-
enabled: !!
|
|
323
|
+
enabled: !!l,
|
|
324
324
|
queryFn: async () => {
|
|
325
325
|
const p = await v(o, {
|
|
326
326
|
action: oe.GET_TEMPLATES_BY_TYPE,
|
|
327
|
-
data: { pageType:
|
|
327
|
+
data: { pageType: l }
|
|
328
328
|
});
|
|
329
|
-
return (
|
|
329
|
+
return (l ? ps(p, { pageType: l }) : p) || [];
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
|
-
}, Ds = (
|
|
333
|
-
const { data: o = [], isLoading: v } = js(
|
|
332
|
+
}, Ds = (l) => {
|
|
333
|
+
const { data: o = [], isLoading: v } = js(l), { data: p = [], isLoading: i } = Ts(), g = B(() => v || i ? [] : o.map((m) => {
|
|
334
334
|
const f = ge(p, { id: m.library });
|
|
335
335
|
return {
|
|
336
336
|
...m,
|
|
337
337
|
libraryName: (f == null ? void 0 : f.type) !== "shared" ? "Site Library" : (f == null ? void 0 : f.name) + " Library",
|
|
338
338
|
libraryType: f == null ? void 0 : f.type
|
|
339
339
|
};
|
|
340
|
-
}), [o, p, v, i]), u = B(() =>
|
|
340
|
+
}), [o, p, v, i]), u = B(() => ds(g, "libraryName"), [g]);
|
|
341
341
|
return {
|
|
342
342
|
data: g,
|
|
343
343
|
groupedData: u,
|
|
344
344
|
isLoading: v || i
|
|
345
345
|
};
|
|
346
|
-
}, V = (...
|
|
347
|
-
function
|
|
346
|
+
}, V = (...l) => l.filter(Boolean).join(" ");
|
|
347
|
+
function _s({ addEditPage: l, close: o, closePanel: v }) {
|
|
348
348
|
var Ae, Fe;
|
|
349
|
-
const { data: p } = gs(), i = B(() => p ?? [], [p]), g = ys(), u = !!(
|
|
349
|
+
const { data: p } = gs(), i = B(() => p ?? [], [p]), g = ys(), u = !!(l != null && l.id), { data: m } = vs(), { mutate: f, isPending: C } = Ns(), { mutate: F, isPending: w } = Ss(), [$, S] = y(null), [b, h] = y(!0), [t, n] = y((l == null ? void 0 : l.pageType) ?? "page"), { hasPermission: d } = cs(), N = d(bs.CHANGE_PAGE_TYPE), [O, U] = y(!1), [_e, Ve] = y(""), { selectedLang: Ge, fallbackLang: Ye } = us(), ve = Ge || Ye, [M, X] = y(""), [Ne, H] = y(!1), Se = B(() => {
|
|
350
350
|
const e = i.find((c) => c.key === t);
|
|
351
351
|
return (e == null ? void 0 : e.hasSlug) === !1;
|
|
352
|
-
}, [t, i]), [k,
|
|
352
|
+
}, [t, i]), [k, Me] = y((l == null ? void 0 : l.parent) ?? ""), [q, be] = y((l == null ? void 0 : l.name) ?? ""), [T, we] = y((l == null ? void 0 : l.dynamic) ?? !1), [j, K] = y(T ? "" : ((l == null ? void 0 : l.slug) ?? "").split("/").pop() || ""), [xe, Ce] = y((l == null ? void 0 : l.dynamicSlugCustom) ?? ""), [ke, Qe] = y(!0), [He, ue] = y(!1), [me, Ke] = y(""), { data: Le, isLoading: Xe } = Ds(t), Q = C || w, Te = ye("enable-add-page-dropdown"), he = B(() => !u || !(l != null && l.id) || !m ? null : m.find((e) => e.id === l.id), [u, l == null ? void 0 : l.id, m]), Ze = (he == null ? void 0 : he.online) || !1, Je = B(() => !u || !(l != null && l.id) || !m ? !1 : m.some((e) => e.parent === l.id), [u, l == null ? void 0 : l.id, m]), r = i.find((e) => e.key === t), _ = (e) => {
|
|
353
353
|
if (u && t !== e) {
|
|
354
|
-
Ve(e), U(!0),
|
|
354
|
+
Ve(e), U(!0), X(""), H(!1);
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
|
-
n(e),
|
|
357
|
+
n(e), X(""), H(!1);
|
|
358
358
|
}, je = () => {
|
|
359
|
-
n(
|
|
359
|
+
n(_e), U(!1), we(!1);
|
|
360
360
|
}, Pe = (e) => {
|
|
361
361
|
we(e), e ? K("") : Ce("");
|
|
362
362
|
}, Ee = (e) => {
|
|
363
|
-
if (
|
|
363
|
+
if (Me(e), e && e !== "none") {
|
|
364
364
|
const c = m == null ? void 0 : m.find((x) => x.id === e), D = (c == null ? void 0 : c.slug) || "";
|
|
365
365
|
if (j.startsWith(D)) {
|
|
366
366
|
const x = j.slice(D.length).replace(/^\/+/, "");
|
|
@@ -371,15 +371,15 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
371
371
|
K(j ? `${j}` : "");
|
|
372
372
|
}, es = (e) => {
|
|
373
373
|
Ke(e);
|
|
374
|
-
}, ss = () =>
|
|
374
|
+
}, ss = () => q.trim() ? T && !Ie(j) ? (S("Slug must be empty when using dynamic slug"), !1) : T && !ke ? (S("Dynamic slug is invalid"), !1) : !0 : (E.error("Name is required"), !1), ls = () => {
|
|
375
375
|
const e = {
|
|
376
376
|
pageType: r == null ? void 0 : r.key,
|
|
377
|
-
name:
|
|
377
|
+
name: q,
|
|
378
378
|
slug: "",
|
|
379
379
|
hasSlug: !1
|
|
380
380
|
};
|
|
381
381
|
u ? F(
|
|
382
|
-
{ id:
|
|
382
|
+
{ id: l == null ? void 0 : l.id, name: q },
|
|
383
383
|
{
|
|
384
384
|
onSuccess: () => {
|
|
385
385
|
E.success((r == null ? void 0 : r.name) + " updated successfully"), o();
|
|
@@ -390,15 +390,15 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
390
390
|
o(), g(c.page.id, v);
|
|
391
391
|
}
|
|
392
392
|
});
|
|
393
|
-
},
|
|
393
|
+
}, as = (e, c) => {
|
|
394
394
|
if (!e.trim() && !T)
|
|
395
395
|
return S("Child page slug is required"), !1;
|
|
396
396
|
const D = te(c), x = Be(D, e);
|
|
397
|
-
return Object.keys(ws).some((
|
|
397
|
+
return Object.keys(ws).some((J) => x === `/${J}` || (x == null ? void 0 : x.startsWith(`/${J}/`))) ? (S("Slugs cannot start with a language code for primary page"), !1) : !0;
|
|
398
398
|
}, ns = (e, c) => {
|
|
399
399
|
const D = te(c), x = Be(D, e), L = {
|
|
400
400
|
pageType: t,
|
|
401
|
-
name:
|
|
401
|
+
name: q,
|
|
402
402
|
slug: x.replace(/\/$/, ""),
|
|
403
403
|
// remove trailing slashes
|
|
404
404
|
parent: k,
|
|
@@ -410,9 +410,9 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
410
410
|
jsonLD: {}
|
|
411
411
|
};
|
|
412
412
|
if (T && (L.dynamicSlugCustom = xe), u) {
|
|
413
|
-
const A =
|
|
413
|
+
const A = fs(L, ["pageType", "parent", "name", "slug", "dynamic", "dynamicSlugCustom"]);
|
|
414
414
|
F(
|
|
415
|
-
{ id:
|
|
415
|
+
{ id: l == null ? void 0 : l.id, ...A },
|
|
416
416
|
{
|
|
417
417
|
onSuccess: () => {
|
|
418
418
|
E.success("Page updated successfully"), o();
|
|
@@ -422,8 +422,8 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
422
422
|
} else {
|
|
423
423
|
const A = ge(i, { key: t });
|
|
424
424
|
A != null && A.trackingDefault && (L.tracking = A.trackingDefault);
|
|
425
|
-
const { seo:
|
|
426
|
-
P(L, "seo",
|
|
425
|
+
const { seo: J, jsonLD: rs } = $e(A, ve);
|
|
426
|
+
P(L, "seo", J), P(L, "jsonLD", rs), f(L, {
|
|
427
427
|
onSuccess: (is) => {
|
|
428
428
|
o(), g(is.page.id, v);
|
|
429
429
|
}
|
|
@@ -432,7 +432,7 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
432
432
|
}, ts = () => {
|
|
433
433
|
const e = {
|
|
434
434
|
pageType: t,
|
|
435
|
-
name:
|
|
435
|
+
name: q,
|
|
436
436
|
slug: j === "" ? "/" : `/${j.replace(/\/$/, "")}`,
|
|
437
437
|
template: me || void 0,
|
|
438
438
|
parent: null,
|
|
@@ -440,7 +440,7 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
440
440
|
};
|
|
441
441
|
if (u)
|
|
442
442
|
F(
|
|
443
|
-
{ id:
|
|
443
|
+
{ id: l == null ? void 0 : l.id, ...e },
|
|
444
444
|
{
|
|
445
445
|
onSuccess: () => {
|
|
446
446
|
E.success("Page updated successfully"), o();
|
|
@@ -461,29 +461,29 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
461
461
|
}, De = (e) => {
|
|
462
462
|
if (e.preventDefault(), S(null), !!ss()) {
|
|
463
463
|
if (!(r != null && r.hasSlug)) {
|
|
464
|
-
|
|
464
|
+
ls();
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
if (k && k !== "none") {
|
|
468
468
|
const c = m == null ? void 0 : m.find((x) => x.id === k), D = (c == null ? void 0 : c.slug) || "";
|
|
469
|
-
if (!
|
|
469
|
+
if (!as(j, D))
|
|
470
470
|
return;
|
|
471
471
|
ns(j, D);
|
|
472
472
|
} else
|
|
473
473
|
ts();
|
|
474
474
|
}
|
|
475
|
-
}, { pagesType: pe, partialsType:
|
|
476
|
-
const e = (c) =>
|
|
475
|
+
}, { pagesType: pe, partialsType: Z } = B(() => {
|
|
476
|
+
const e = (c) => M ? c.name.toLowerCase().includes(M.toLowerCase()) || c.key.toLowerCase().includes(M.toLowerCase()) : !0;
|
|
477
477
|
return {
|
|
478
478
|
pagesType: i.filter((c) => c.hasSlug !== !1 && e(c)),
|
|
479
479
|
partialsType: i.filter((c) => c.hasSlug === !1 && e(c))
|
|
480
480
|
};
|
|
481
|
-
}, [i,
|
|
482
|
-
return r != null && r.hasSlug ? /* @__PURE__ */
|
|
483
|
-
/* @__PURE__ */
|
|
481
|
+
}, [i, M]);
|
|
482
|
+
return r != null && r.hasSlug ? /* @__PURE__ */ a("form", { onSubmit: De, className: "mx-auto w-full max-w-md space-y-4", children: [
|
|
483
|
+
/* @__PURE__ */ a("div", { className: "space-y-0.5", children: [
|
|
484
484
|
/* @__PURE__ */ s(z, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
|
|
485
|
-
Te ? /* @__PURE__ */
|
|
486
|
-
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */
|
|
485
|
+
Te ? /* @__PURE__ */ a(ee, { open: Ne, onOpenChange: H, children: [
|
|
486
|
+
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ a(
|
|
487
487
|
W,
|
|
488
488
|
{
|
|
489
489
|
variant: "outline",
|
|
@@ -499,26 +499,26 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
499
499
|
]
|
|
500
500
|
}
|
|
501
501
|
) }),
|
|
502
|
-
/* @__PURE__ */ s(
|
|
503
|
-
/* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ s(le, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ a(ae, { shouldFilter: !1, children: [
|
|
503
|
+
/* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ a("div", { className: "relative", children: [
|
|
504
504
|
/* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
|
|
505
505
|
/* @__PURE__ */ s(
|
|
506
|
-
|
|
506
|
+
Y,
|
|
507
507
|
{
|
|
508
508
|
placeholder: "Search page types...",
|
|
509
509
|
className: "h-8 pl-8 text-xs",
|
|
510
|
-
value:
|
|
511
|
-
onChange: (e) =>
|
|
510
|
+
value: M,
|
|
511
|
+
onChange: (e) => X(e.target.value)
|
|
512
512
|
}
|
|
513
513
|
)
|
|
514
514
|
] }) }),
|
|
515
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ a(ce, { className: "overflow-y-auto", children: [
|
|
516
516
|
/* @__PURE__ */ s(ne, { children: "No page type found." }),
|
|
517
|
-
u ? Se ? /* @__PURE__ */ s(G, { heading: "Partials", children:
|
|
517
|
+
u ? Se ? /* @__PURE__ */ s(G, { heading: "Partials", children: Z.map((e) => /* @__PURE__ */ a(
|
|
518
518
|
I,
|
|
519
519
|
{
|
|
520
520
|
value: e.key,
|
|
521
|
-
onSelect: () =>
|
|
521
|
+
onSelect: () => _(e.key),
|
|
522
522
|
className: "flex cursor-pointer items-center justify-between",
|
|
523
523
|
children: [
|
|
524
524
|
e.name,
|
|
@@ -531,11 +531,11 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
531
531
|
]
|
|
532
532
|
},
|
|
533
533
|
e.key
|
|
534
|
-
)) }) : /* @__PURE__ */ s(G, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */
|
|
534
|
+
)) }) : /* @__PURE__ */ s(G, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */ a(
|
|
535
535
|
I,
|
|
536
536
|
{
|
|
537
537
|
value: e.key,
|
|
538
|
-
onSelect: () =>
|
|
538
|
+
onSelect: () => _(e.key),
|
|
539
539
|
className: "flex cursor-pointer items-center justify-between",
|
|
540
540
|
children: [
|
|
541
541
|
e.name,
|
|
@@ -548,12 +548,12 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
548
548
|
]
|
|
549
549
|
},
|
|
550
550
|
e.key
|
|
551
|
-
)) }) : /* @__PURE__ */
|
|
552
|
-
pe.length > 0 && /* @__PURE__ */ s(G, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */
|
|
551
|
+
)) }) : /* @__PURE__ */ a(We, { children: [
|
|
552
|
+
pe.length > 0 && /* @__PURE__ */ s(G, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */ a(
|
|
553
553
|
I,
|
|
554
554
|
{
|
|
555
555
|
value: e.key,
|
|
556
|
-
onSelect: () =>
|
|
556
|
+
onSelect: () => _(e.key),
|
|
557
557
|
className: "flex cursor-pointer items-center justify-between",
|
|
558
558
|
children: [
|
|
559
559
|
e.name,
|
|
@@ -567,11 +567,11 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
567
567
|
},
|
|
568
568
|
e.key
|
|
569
569
|
)) }),
|
|
570
|
-
|
|
570
|
+
Z.length > 0 && /* @__PURE__ */ s(G, { heading: "Partials", children: Z.map((e) => /* @__PURE__ */ a(
|
|
571
571
|
I,
|
|
572
572
|
{
|
|
573
573
|
value: e.key,
|
|
574
|
-
onSelect: () =>
|
|
574
|
+
onSelect: () => _(e.key),
|
|
575
575
|
className: "flex cursor-pointer items-center justify-between",
|
|
576
576
|
children: [
|
|
577
577
|
e.name,
|
|
@@ -594,23 +594,23 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
594
594
|
id: "pageType",
|
|
595
595
|
value: t,
|
|
596
596
|
disabled: u && !N,
|
|
597
|
-
onChange: (e) =>
|
|
597
|
+
onChange: (e) => _(e.target.value),
|
|
598
598
|
className: `w-full rounded-md border border-gray-300 px-3 py-2 ${u && !N ? "cursor-not-allowed text-gray-500" : ""}`,
|
|
599
|
-
children: u ? Se ? /* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */ s("optgroup", { label: "Pages", children: i.filter((e) => e.hasSlug !== !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */
|
|
599
|
+
children: u ? Se ? /* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */ s("optgroup", { label: "Pages", children: i.filter((e) => e.hasSlug !== !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */ a(We, { children: [
|
|
600
600
|
/* @__PURE__ */ s("optgroup", { label: "Pages", children: i.filter((e) => e.hasSlug !== !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }),
|
|
601
601
|
/* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) })
|
|
602
602
|
] })
|
|
603
603
|
}
|
|
604
604
|
),
|
|
605
|
-
O && /* @__PURE__ */
|
|
605
|
+
O && /* @__PURE__ */ a("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
|
|
606
606
|
/* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
|
|
607
|
-
/* @__PURE__ */
|
|
607
|
+
/* @__PURE__ */ a("div", { className: "mt-2 flex gap-2", children: [
|
|
608
608
|
/* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
|
|
609
609
|
/* @__PURE__ */ s(W, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
|
|
610
610
|
] })
|
|
611
611
|
] })
|
|
612
612
|
] }),
|
|
613
|
-
!u && (r == null ? void 0 : r.hasSlug) && Le.length > 0 && /* @__PURE__ */
|
|
613
|
+
!u && (r == null ? void 0 : r.hasSlug) && Le.length > 0 && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
614
614
|
/* @__PURE__ */ s(z, { className: "mb-1 block text-sm", children: "Template" }),
|
|
615
615
|
/* @__PURE__ */ s(
|
|
616
616
|
Ls,
|
|
@@ -618,7 +618,7 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
618
618
|
templates: Le,
|
|
619
619
|
selectedTemplateId: me,
|
|
620
620
|
onSelectTemplate: es,
|
|
621
|
-
isLoading:
|
|
621
|
+
isLoading: Xe
|
|
622
622
|
}
|
|
623
623
|
)
|
|
624
624
|
] }),
|
|
@@ -628,16 +628,16 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
628
628
|
pages: m,
|
|
629
629
|
selectedParentId: k,
|
|
630
630
|
onChange: Ee,
|
|
631
|
-
currentPage:
|
|
631
|
+
currentPage: l
|
|
632
632
|
}
|
|
633
633
|
),
|
|
634
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ a("div", { className: "space-y-0.5", children: [
|
|
635
635
|
/* @__PURE__ */ s(z, { htmlFor: "name", className: "text-sm", children: "Name" }),
|
|
636
636
|
/* @__PURE__ */ s(
|
|
637
|
-
|
|
637
|
+
Y,
|
|
638
638
|
{
|
|
639
639
|
id: "name",
|
|
640
|
-
value:
|
|
640
|
+
value: q,
|
|
641
641
|
onChange: (e) => be(e.target.value),
|
|
642
642
|
required: !0,
|
|
643
643
|
"aria-required": "true",
|
|
@@ -645,8 +645,8 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
645
645
|
}
|
|
646
646
|
)
|
|
647
647
|
] }),
|
|
648
|
-
(r == null ? void 0 : r.dynamicSegments) && k && k !== "none" && /* @__PURE__ */
|
|
649
|
-
/* @__PURE__ */
|
|
648
|
+
(r == null ? void 0 : r.dynamicSegments) && k && k !== "none" && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
649
|
+
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
650
650
|
/* @__PURE__ */ s(
|
|
651
651
|
"input",
|
|
652
652
|
{
|
|
@@ -670,15 +670,15 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
670
670
|
}
|
|
671
671
|
) }) })
|
|
672
672
|
] }),
|
|
673
|
-
(!(r != null && r.dynamicSegments) || !T) && /* @__PURE__ */
|
|
673
|
+
(!(r != null && r.dynamicSegments) || !T) && /* @__PURE__ */ a("div", { className: "space-y-0.5", children: [
|
|
674
674
|
/* @__PURE__ */ s(z, { htmlFor: "slug", className: "text-sm", children: "Slug" }),
|
|
675
675
|
/* @__PURE__ */ s(
|
|
676
|
-
|
|
676
|
+
hs,
|
|
677
677
|
{
|
|
678
678
|
value: j,
|
|
679
679
|
onChange: (e) => {
|
|
680
680
|
var c;
|
|
681
|
-
K(e), u && e !== (((c =
|
|
681
|
+
K(e), u && e !== (((c = l == null ? void 0 : l.slug) == null ? void 0 : c.split("/").pop()) || "") ? ue(!!(Ze || Je)) : ue(!1);
|
|
682
682
|
},
|
|
683
683
|
placeholder: k && k !== "none" ? "Enter page slug" : t === "page" ? "Leave empty for home page" : "Required - e.g. your-slug",
|
|
684
684
|
parentSlug: k && k !== "none" ? (Fe = m == null ? void 0 : m.find((e) => e.id === k)) == null ? void 0 : Fe.slug : void 0,
|
|
@@ -686,7 +686,7 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
686
686
|
}
|
|
687
687
|
),
|
|
688
688
|
$ && /* @__PURE__ */ s("p", { className: "text-xs text-red-500", children: $ }),
|
|
689
|
-
He && /* @__PURE__ */ s("div", { className: "mt-4 rounded-md border border-amber-200 bg-amber-50 p-3", children: /* @__PURE__ */
|
|
689
|
+
He && /* @__PURE__ */ s("div", { className: "mt-4 rounded-md border border-amber-200 bg-amber-50 p-3", children: /* @__PURE__ */ a("div", { className: "flex items-start space-x-2", children: [
|
|
690
690
|
/* @__PURE__ */ s("div", { className: "flex-shrink-0", children: /* @__PURE__ */ s("svg", { className: "h-5 w-5 text-amber-400", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ s(
|
|
691
691
|
"path",
|
|
692
692
|
{
|
|
@@ -695,7 +695,7 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
695
695
|
clipRule: "evenodd"
|
|
696
696
|
}
|
|
697
697
|
) }) }),
|
|
698
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ a("div", { className: "flex-1", children: [
|
|
699
699
|
/* @__PURE__ */ s("h3", { className: "text-sm font-medium text-amber-800", children: "Slug Change Warning" }),
|
|
700
700
|
/* @__PURE__ */ s("div", { className: "mt-1 text-sm text-amber-700", children: /* @__PURE__ */ s("p", { children: "The previous URL and any child pages will become inaccessible. You may want to set up a redirect to avoid broken links." }) })
|
|
701
701
|
] })
|
|
@@ -712,11 +712,11 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
712
712
|
children: u ? Q ? "Updating..." : "Update page" : Q ? "Creating..." : "Create Page"
|
|
713
713
|
}
|
|
714
714
|
)
|
|
715
|
-
] }) : /* @__PURE__ */
|
|
716
|
-
/* @__PURE__ */
|
|
715
|
+
] }) : /* @__PURE__ */ a("form", { onSubmit: De, className: "mx-auto w-full max-w-md space-y-4", children: [
|
|
716
|
+
/* @__PURE__ */ a("div", { className: "space-y-0.5", children: [
|
|
717
717
|
/* @__PURE__ */ s(z, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
|
|
718
|
-
Te ? /* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */
|
|
718
|
+
Te ? /* @__PURE__ */ a(ee, { open: Ne, onOpenChange: H, children: [
|
|
719
|
+
/* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ a(
|
|
720
720
|
W,
|
|
721
721
|
{
|
|
722
722
|
variant: "outline",
|
|
@@ -732,27 +732,27 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
732
732
|
]
|
|
733
733
|
}
|
|
734
734
|
) }),
|
|
735
|
-
/* @__PURE__ */ s(
|
|
736
|
-
/* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ s(le, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ a(ae, { shouldFilter: !1, children: [
|
|
736
|
+
/* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ a("div", { className: "relative", children: [
|
|
737
737
|
/* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
|
|
738
738
|
/* @__PURE__ */ s(
|
|
739
|
-
|
|
739
|
+
Y,
|
|
740
740
|
{
|
|
741
741
|
placeholder: "Search page types...",
|
|
742
742
|
className: "h-8 pl-8 text-xs",
|
|
743
|
-
value:
|
|
744
|
-
onChange: (e) =>
|
|
743
|
+
value: M,
|
|
744
|
+
onChange: (e) => X(e.target.value)
|
|
745
745
|
}
|
|
746
746
|
)
|
|
747
747
|
] }) }),
|
|
748
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ a(ce, { className: "max-h-[200px] overflow-y-auto", children: [
|
|
749
749
|
/* @__PURE__ */ s(ne, { children: "No page type found." }),
|
|
750
|
-
/* @__PURE__ */ s(G, { heading: "Partials", children:
|
|
750
|
+
/* @__PURE__ */ s(G, { heading: "Partials", children: Z.map((e) => /* @__PURE__ */ a(
|
|
751
751
|
I,
|
|
752
752
|
{
|
|
753
753
|
value: e.key,
|
|
754
754
|
onSelect: () => {
|
|
755
|
-
|
|
755
|
+
_(e.key), H(!1);
|
|
756
756
|
},
|
|
757
757
|
className: "flex cursor-pointer items-center justify-between",
|
|
758
758
|
children: [
|
|
@@ -770,27 +770,27 @@ function qs({ addEditPage: a, close: o, closePanel: v }) {
|
|
|
770
770
|
id: "pageType",
|
|
771
771
|
value: t,
|
|
772
772
|
disabled: u && !N,
|
|
773
|
-
onChange: (e) =>
|
|
773
|
+
onChange: (e) => _(e.target.value),
|
|
774
774
|
className: `w-full rounded-md border border-gray-300 px-3 py-2 ${u && !N ? "cursor-not-allowed text-gray-500" : ""}`,
|
|
775
775
|
children: /* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) })
|
|
776
776
|
}
|
|
777
777
|
),
|
|
778
|
-
O && /* @__PURE__ */
|
|
778
|
+
O && /* @__PURE__ */ a("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
|
|
779
779
|
/* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
|
|
780
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ a("div", { className: "mt-2 flex gap-2", children: [
|
|
781
781
|
/* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
|
|
782
782
|
/* @__PURE__ */ s(W, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
|
|
783
783
|
] })
|
|
784
784
|
] }),
|
|
785
785
|
/* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (Ae = i.find((e) => e.key === t)) == null ? void 0 : Ae.helpText })
|
|
786
786
|
] }),
|
|
787
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ a("div", { className: "space-y-0.5", children: [
|
|
788
788
|
/* @__PURE__ */ s(z, { htmlFor: "name", className: "text-sm", children: "Name" }),
|
|
789
|
-
/* @__PURE__ */ s(
|
|
789
|
+
/* @__PURE__ */ s(Y, { id: "name", value: q, onChange: (e) => be(e.target.value), required: !0, "aria-required": "true" })
|
|
790
790
|
] }),
|
|
791
791
|
/* @__PURE__ */ s(W, { disabled: Q, type: "submit", className: "w-full", children: u ? Q ? "Updating..." : "Update " + (r == null ? void 0 : r.name) : Q ? "Creating..." : "Create " + (r == null ? void 0 : r.name) })
|
|
792
792
|
] });
|
|
793
793
|
}
|
|
794
794
|
export {
|
|
795
|
-
|
|
795
|
+
_s as default
|
|
796
796
|
};
|