themelia-react-ui 2.0.1 → 2.0.2
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/CHANGELOG.md +307 -131
- package/README.md +28 -8
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/dist/{accordion-B6a3vVgA.js → accordion-Cjb6sx0G.js} +14 -13
- package/dist/accordion-Cjb6sx0G.js.map +1 -0
- package/dist/action-menu-CllU52Mm.js +280 -0
- package/dist/action-menu-CllU52Mm.js.map +1 -0
- package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
- package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
- package/dist/ai-artifact-DvTwDVyL.js +1148 -0
- package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
- package/dist/{app-shell-ZK5RWdo6.js → app-shell-C4FhvCqF.js} +5 -5
- package/dist/{app-shell-ZK5RWdo6.js.map → app-shell-C4FhvCqF.js.map} +1 -1
- package/dist/attachment-BxDfL2mw.js +246 -0
- package/dist/attachment-BxDfL2mw.js.map +1 -0
- package/dist/{auth-CYxKfo69.js → auth-ax2BqjrI.js} +58 -54
- package/dist/auth-ax2BqjrI.js.map +1 -0
- package/dist/{avatar-BBnEJIx8.js → avatar-DAPlDvhJ.js} +7 -7
- package/dist/avatar-DAPlDvhJ.js.map +1 -0
- package/dist/{badge-MrKVNzW9.js → badge-HpFqoqSY.js} +40 -40
- package/dist/badge-HpFqoqSY.js.map +1 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +40 -36
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +92 -92
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +14 -14
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +171 -176
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +6 -6
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +79 -2
- package/dist/base/spinner.js.map +1 -0
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +46 -45
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-BZGDG-Si.js → batch-action-bar-DnUJ21NQ.js} +6 -5
- package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
- package/dist/blocks/admin.js +42 -42
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +260 -240
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +620 -585
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1152 -1109
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +48 -39
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +13 -12
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-D5t7I023.js → breadcrumbs-C-oqs1sQ.js} +5 -5
- package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
- package/dist/{button-QYwiyhD2.js → button-DVzspB_G.js} +2 -2
- package/dist/{button-QYwiyhD2.js.map → button-DVzspB_G.js.map} +1 -1
- package/dist/{buttons-SbIcm1HJ.js → buttons-DPZekJFu.js} +20 -15
- package/dist/buttons-DPZekJFu.js.map +1 -0
- package/dist/cards-BaBZR-AU.js +68 -0
- package/dist/cards-BaBZR-AU.js.map +1 -0
- package/dist/{chart-QfrARkXl.js → chart-ZOYyK2xG.js} +58 -55
- package/dist/chart-ZOYyK2xG.js.map +1 -0
- package/dist/{checkbox-DhB6K0bK.js → checkbox-AWIhNhmo.js} +2 -2
- package/dist/{checkbox-DhB6K0bK.js.map → checkbox-AWIhNhmo.js.map} +1 -1
- package/dist/{choice-inputs-t6w3ATNz.js → choice-inputs-CNHvARCJ.js} +49 -45
- package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
- package/dist/{code-block-Dgbu-CU3.js → code-block-DeneBJR_.js} +8 -8
- package/dist/code-block-DeneBJR_.js.map +1 -0
- package/dist/{collapsible-D8AEGU1-.js → collapsible-C-_l4hpy.js} +3 -3
- package/dist/{collapsible-D8AEGU1-.js.map → collapsible-C-_l4hpy.js.map} +1 -1
- package/dist/{collection-content-uK16Grv0.js → collection-content-By56pLog.js} +3 -3
- package/dist/{collection-content-uK16Grv0.js.map → collection-content-By56pLog.js.map} +1 -1
- package/dist/combobox-C0EQW6dr.js +875 -0
- package/dist/combobox-C0EQW6dr.js.map +1 -0
- package/dist/combobox-xCQ2RMNE.js +309 -0
- package/dist/combobox-xCQ2RMNE.js.map +1 -0
- package/dist/{command-kNR20o7x.js → command-C25VMRII.js} +7 -7
- package/dist/{command-kNR20o7x.js.map → command-C25VMRII.js.map} +1 -1
- package/dist/{comments-BpDuCUUu.js → comments-BYYlTA8E.js} +114 -105
- package/dist/comments-BYYlTA8E.js.map +1 -0
- package/dist/components/base/badge/badge.recipes.d.ts +1 -1
- package/dist/components/base/buttons/loader-button.d.ts +2 -1
- package/dist/components/base/cards/card.recipes.d.ts +2 -3
- package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
- package/dist/components/base/cards/smart-card.types.d.ts +11 -4
- package/dist/components/base/chart/chart.d.ts +2 -5
- package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +30 -4
- package/dist/components/base/forms/form-sizing.d.ts +11 -3
- package/dist/components/base/navigation/pagination.d.ts +5 -2
- package/dist/components/base/popover/popover.recipes.d.ts +15 -1
- package/dist/components/base/table/index.d.ts +9 -2
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
- package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +3 -1
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
- package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
- package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
- package/dist/components/features/appointment-calendar/index.d.ts +3 -0
- package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
- package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
- package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
- package/dist/components/features/combobox/types.d.ts +4 -0
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/rich-text-editor/index.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +9 -1
- package/dist/components/features/table/table-header.d.ts +1 -1
- package/dist/components/features/table/table.strings.d.ts +55 -1
- package/dist/components/features/table/table.types.d.ts +17 -4
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
- package/dist/components/primitives/number.d.ts +4 -2
- package/dist/components/primitives/value.d.ts +3 -1
- package/dist/components/typography/text-link.d.ts +4 -0
- package/dist/components/ui/combobox.d.ts +6 -2
- package/dist/components/ui/item.d.ts +8 -8
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/{containers-DmWiJa2I.js → containers-Mu1LMGV1.js} +2 -2
- package/dist/{containers-DmWiJa2I.js.map → containers-Mu1LMGV1.js.map} +1 -1
- package/dist/{copyable-B3Gwgdqc.js → copyable-ClBuk_UK.js} +4 -4
- package/dist/{copyable-B3Gwgdqc.js.map → copyable-ClBuk_UK.js.map} +1 -1
- package/dist/{data-display-DafIvCl5.js → data-display-DT_khPl_.js} +98 -87
- package/dist/data-display-DT_khPl_.js.map +1 -0
- package/dist/{date-BgK3bTdo.js → date-DCrsDTZc.js} +5 -5
- package/dist/{date-BgK3bTdo.js.map → date-DCrsDTZc.js.map} +1 -1
- package/dist/{date-picker-CF-DtUpF.js → date-picker-ay0Pha_a.js} +594 -593
- package/dist/date-picker-ay0Pha_a.js.map +1 -0
- package/dist/date-pickers-Ccw8DL2b.js +175 -0
- package/dist/date-pickers-Ccw8DL2b.js.map +1 -0
- package/dist/{display-DsQTVzMz.js → display-hAc1HjpI.js} +49 -49
- package/dist/display-hAc1HjpI.js.map +1 -0
- package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
- package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
- package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
- package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
- package/dist/features/activities.js +398 -375
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +188 -179
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +683 -0
- package/dist/features/appointment-calendar.js.map +1 -0
- package/dist/features/async-preview.js +109 -107
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +137 -137
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +255 -255
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +254 -248
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +35 -32
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +118 -117
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +233 -231
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +789 -775
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +922 -902
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +28 -24
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +18 -15
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +12 -12
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +15 -13
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +11 -5
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +493 -489
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-BYIhtitP.js +239 -0
- package/dist/feedback-BYIhtitP.js.map +1 -0
- package/dist/{field-affordance-recipes-qQeIf4lG.js → field-affordance-recipes-DZhnIL_Y.js} +11 -18
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
- package/dist/{filters-BkHH53uv.js → filters-BGfvjP4d.js} +589 -580
- package/dist/filters-BGfvjP4d.js.map +1 -0
- package/dist/{form-field-DUt4UxSV.js → form-field-CwH9y77i.js} +6 -5
- package/dist/form-field-CwH9y77i.js.map +1 -0
- package/dist/{form-sizing-By94KzXE.js → form-sizing-BdP_Mf5p.js} +39 -44
- package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
- package/dist/{forms-Bzha-Y3B.js → forms-B9G_xwzi.js} +8 -8
- package/dist/{forms-Bzha-Y3B.js.map → forms-B9G_xwzi.js.map} +1 -1
- package/dist/{forms-numeric-C0bvjRPZ.js → forms-numeric-B_jraJaQ.js} +309 -309
- package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
- package/dist/{header-BOefOKd1.js → header-CGXuhcRm.js} +160 -153
- package/dist/header-CGXuhcRm.js.map +1 -0
- package/dist/{hooks-9k_TtmKh.js → hooks-Dkz0K2WT.js} +2 -2
- package/dist/{hooks-9k_TtmKh.js.map → hooks-Dkz0K2WT.js.map} +1 -1
- package/dist/{icon-badge-CAuKupo9.js → icon-badge-DYKIwvOV.js} +4 -4
- package/dist/{icon-badge-CAuKupo9.js.map → icon-badge-DYKIwvOV.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/input-CZw8iU99.js +21 -0
- package/dist/input-CZw8iU99.js.map +1 -0
- package/dist/input-DQdEd0YD.js +263 -0
- package/dist/input-DQdEd0YD.js.map +1 -0
- package/dist/{interaction-recipes-CHr0dJUs.js → interaction-recipes-XR9ZpVYL.js} +2 -1
- package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
- package/dist/item-K5_ghvze.js +275 -0
- package/dist/item-K5_ghvze.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +71 -0
- package/dist/lib/editable-text-recipe.d.ts +4 -4
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/interaction-recipes.d.ts +5 -0
- package/dist/lib/theme-mode-css.d.ts +7 -0
- package/dist/lib/tone-recipes.d.ts +8 -0
- package/dist/lib/ui-provider/types.d.ts +2 -2
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-DcTtAaeC.js → media-gallery-3zIVLMWH.js} +8 -8
- package/dist/media-gallery-3zIVLMWH.js.map +1 -0
- package/dist/{mentions-D-uyCh01.js → mentions-utuUvH1K.js} +144 -142
- package/dist/mentions-utuUvH1K.js.map +1 -0
- package/dist/{message-CdHgIWKf.js → message-DZ_ruyUV.js} +6 -5
- package/dist/message-DZ_ruyUV.js.map +1 -0
- package/dist/{metadata-list-X5rYAKSB.js → metadata-list-8N16ZMW_.js} +130 -119
- package/dist/metadata-list-8N16ZMW_.js.map +1 -0
- package/dist/{navigation-D3KwXmaq.js → navigation-Bnotn4AQ.js} +19 -19
- package/dist/navigation-Bnotn4AQ.js.map +1 -0
- package/dist/{navigation-HJf5zxlH.js → navigation-BzhHI3lo.js} +36 -35
- package/dist/navigation-BzhHI3lo.js.map +1 -0
- package/dist/{navigation-row-recipes-BVowojQw.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
- package/dist/{navigation-row-recipes-BVowojQw.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
- package/dist/{number-DMhe-Vsk.js → number-DbV1Dija.js} +36 -34
- package/dist/{number-DMhe-Vsk.js.map → number-DbV1Dija.js.map} +1 -1
- package/dist/{overflow-tab-bar-sQHXLlwQ.js → overflow-tab-bar-CWY7Nogn.js} +105 -103
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
- package/dist/{overlays-I0axtYA6.js → overlays-DNWmZrJ4.js} +14 -12
- package/dist/overlays-DNWmZrJ4.js.map +1 -0
- package/dist/{page-B5dTH9gE.js → page-Bgl1F560.js} +8 -8
- package/dist/{page-B5dTH9gE.js.map → page-Bgl1F560.js.map} +1 -1
- package/dist/{page-header-commands-DjzFEq3E.js → page-header-commands-DOb6WsfD.js} +5 -5
- package/dist/{page-header-commands-DjzFEq3E.js.map → page-header-commands-DOb6WsfD.js.map} +1 -1
- package/dist/pagination-BL25hu2s.js +158 -0
- package/dist/pagination-BL25hu2s.js.map +1 -0
- package/dist/{popover-Di55PyAI.js → popover-7_m66eYW.js} +8 -7
- package/dist/{popover-Di55PyAI.js.map → popover-7_m66eYW.js.map} +1 -1
- package/dist/popover-menu-B9WWygpa.js +100 -0
- package/dist/popover-menu-B9WWygpa.js.map +1 -0
- package/dist/{popover.recipes-Bdyhj2db.js → popover.recipes-D3j8R8Yp.js} +17 -10
- package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
- package/dist/{primitives-B-CkiEMU.js → primitives-BFK08r9M.js} +45 -44
- package/dist/primitives-BFK08r9M.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-rnS8-uAW.js → progress-B1VnCT0K.js} +5 -5
- package/dist/{progress-rnS8-uAW.js.map → progress-B1VnCT0K.js.map} +1 -1
- package/dist/{receipt-D0oswZ0p.js → receipt-BVSOH3Xo.js} +9 -6
- package/dist/{receipt-D0oswZ0p.js.map → receipt-BVSOH3Xo.js.map} +1 -1
- package/dist/{rich-text-DvGulsNJ.js → rich-text-GOUyKQ-s.js} +3 -3
- package/dist/{rich-text-DvGulsNJ.js.map → rich-text-GOUyKQ-s.js.map} +1 -1
- package/dist/{rich-text-editor-sMU_Scqm.js → rich-text-editor-cRLC-eBK.js} +418 -426
- package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
- package/dist/{scroll-area-Bt_vXY2b.js → scroll-area-DcI-M1UT.js} +2 -2
- package/dist/{scroll-area-Bt_vXY2b.js.map → scroll-area-DcI-M1UT.js.map} +1 -1
- package/dist/{separator-C8DlRGwF.js → separator-BDV-Y648.js} +3 -3
- package/dist/{separator-C8DlRGwF.js.map → separator-BDV-Y648.js.map} +1 -1
- package/dist/{separator-CYHnjsAb.js → separator-Bom7NsGO.js} +2 -2
- package/dist/{separator-CYHnjsAb.js.map → separator-Bom7NsGO.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/{settings-CQW3b-Cu.js → settings-ybnjVwbd.js} +20 -19
- package/dist/settings-ybnjVwbd.js.map +1 -0
- package/dist/{sheet-4SEvVYzA.js → sheet-CGpB3omz.js} +8 -7
- package/dist/{sheet-4SEvVYzA.js.map → sheet-CGpB3omz.js.map} +1 -1
- package/dist/{sidebar-d7Dg80ln.js → sidebar-A0ElHINE.js} +14 -13
- package/dist/{sidebar-d7Dg80ln.js.map → sidebar-A0ElHINE.js.map} +1 -1
- package/dist/{sidebar-C7WWR29L.js → sidebar-CPx_7YBa.js} +183 -182
- package/dist/sidebar-CPx_7YBa.js.map +1 -0
- package/dist/{skeleton-Cz890JZF.js → skeleton-Byjnt7qr.js} +3 -3
- package/dist/{skeleton-Cz890JZF.js.map → skeleton-Byjnt7qr.js.map} +1 -1
- package/dist/smart-card-DiC5aac3.js +604 -0
- package/dist/smart-card-DiC5aac3.js.map +1 -0
- package/dist/{structure-DC2dygdA.js → structure-BmisBK-3.js} +2 -2
- package/dist/{structure-DC2dygdA.js.map → structure-BmisBK-3.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/table-BweFy_P9.js +1530 -0
- package/dist/table-BweFy_P9.js.map +1 -0
- package/dist/{table-CIKyLUsy.js → table-DsfzoUia.js} +75 -63
- package/dist/table-DsfzoUia.js.map +1 -0
- package/dist/{tabs-DwBJfjxX.js → tabs-CDocW5D1.js} +14 -13
- package/dist/tabs-CDocW5D1.js.map +1 -0
- package/dist/text-inputs-f9Ia-aCi.js +353 -0
- package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
- package/dist/theme-mode-css-BB-_RYab.js +14 -0
- package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
- package/dist/theme-scope-BJ6eE2xt.js +50 -0
- package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
- package/dist/theme.css +285 -228
- package/dist/themes/green.css +16 -12
- package/dist/timelines-CwM_9IhD.js +457 -0
- package/dist/timelines-CwM_9IhD.js.map +1 -0
- package/dist/{tone-recipes-CPoExcTE.js → tone-recipes-BPsRAvhu.js} +5 -2
- package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
- package/dist/{tooltip-CsfgrfS7.js → tooltip-yiRJUFjp.js} +4 -4
- package/dist/{tooltip-CsfgrfS7.js.map → tooltip-yiRJUFjp.js.map} +1 -1
- package/dist/{tree-BiKhg8AY.js → tree-WnKQzwbq.js} +9 -9
- package/dist/{tree-BiKhg8AY.js.map → tree-WnKQzwbq.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-DTRkE9zL.js → typography-UTnveOEy.js} +6 -6
- package/dist/typography-UTnveOEy.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-1D_NSYzO.js → ui-provider-C_U0Xma4.js} +3 -3
- package/dist/ui-provider-C_U0Xma4.js.map +1 -0
- package/dist/ui-provider.js +2 -2
- package/dist/{upload-BO8-CLN6.js → upload-CXyxmQBP.js} +13 -12
- package/dist/upload-CXyxmQBP.js.map +1 -0
- package/dist/{upload-queue-EOC8g1gf.js → upload-queue-Boscubn9.js} +11 -9
- package/dist/upload-queue-Boscubn9.js.map +1 -0
- package/dist/{usage-card-obRaBskq.js → usage-card-BhO5eqkX.js} +53 -37
- package/dist/usage-card-BhO5eqkX.js.map +1 -0
- package/dist/{utils-l5LpDw2z.js → utils-BRhFDwuU.js} +59 -44
- package/dist/utils-BRhFDwuU.js.map +1 -0
- package/dist/{value-inputs-TAYMX111.js → value-inputs-DXPDjvBU.js} +268 -252
- package/dist/value-inputs-DXPDjvBU.js.map +1 -0
- package/dist/{value-typography-b8wpz1eX.js → value-typography-BP8OG6h5.js} +2 -2
- package/dist/{value-typography-b8wpz1eX.js.map → value-typography-BP8OG6h5.js.map} +1 -1
- package/dist/{workspace-DH0v0KcB.js → workspace-Cdrg7k9f.js} +34 -33
- package/dist/workspace-Cdrg7k9f.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +2 -2
- package/docs/consumer-skill/references/agents-md.md +1 -1
- package/docs/consumer-skill/references/composition.md +8 -6
- package/docs/consumer-skill/references/integration.md +4 -3
- package/docs/consumer-skill/references/public-api.json +105 -2
- package/docs/consumer-skill/references/review.md +7 -0
- package/docs/consumer-skill/references/theming.md +71 -6
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/references/workflows.md +25 -0
- package/docs/consumer-skill/scripts/composition-policy.mjs +3 -2
- package/docs/consumer-skill/scripts/surface-policy.mjs +11 -0
- package/package.json +8 -4
- package/dist/accordion-B6a3vVgA.js.map +0 -1
- package/dist/action-menu-TzCoSlwL.js +0 -280
- package/dist/action-menu-TzCoSlwL.js.map +0 -1
- package/dist/affordance-geometry.generated-B5iu-Mkr.js +0 -69
- package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +0 -1
- package/dist/ai-artifact-BMJdv-6q.js +0 -1115
- package/dist/ai-artifact-BMJdv-6q.js.map +0 -1
- package/dist/attachment-BtfhGm8i.js +0 -245
- package/dist/attachment-BtfhGm8i.js.map +0 -1
- package/dist/auth-CYxKfo69.js.map +0 -1
- package/dist/avatar-BBnEJIx8.js.map +0 -1
- package/dist/badge-MrKVNzW9.js.map +0 -1
- package/dist/batch-action-bar-BZGDG-Si.js.map +0 -1
- package/dist/breadcrumbs-D5t7I023.js.map +0 -1
- package/dist/buttons-SbIcm1HJ.js.map +0 -1
- package/dist/cards-CiiHpKYd.js +0 -66
- package/dist/cards-CiiHpKYd.js.map +0 -1
- package/dist/chart-QfrARkXl.js.map +0 -1
- package/dist/choice-inputs-t6w3ATNz.js.map +0 -1
- package/dist/code-block-Dgbu-CU3.js.map +0 -1
- package/dist/combobox-2Ic8N9bL.js +0 -278
- package/dist/combobox-2Ic8N9bL.js.map +0 -1
- package/dist/combobox-DLl0bfiq.js +0 -867
- package/dist/combobox-DLl0bfiq.js.map +0 -1
- package/dist/comments-BpDuCUUu.js.map +0 -1
- package/dist/data-display-DafIvCl5.js.map +0 -1
- package/dist/date-picker-CF-DtUpF.js.map +0 -1
- package/dist/date-pickers-BmzxJl5l.js +0 -174
- package/dist/date-pickers-BmzxJl5l.js.map +0 -1
- package/dist/display-DsQTVzMz.js.map +0 -1
- package/dist/dropdown-menu-E2qmdC7o.js +0 -193
- package/dist/dropdown-menu-E2qmdC7o.js.map +0 -1
- package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
- package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
- package/dist/feedback-qNuMBtRH.js +0 -233
- package/dist/feedback-qNuMBtRH.js.map +0 -1
- package/dist/field-affordance-recipes-qQeIf4lG.js.map +0 -1
- package/dist/filters-BkHH53uv.js.map +0 -1
- package/dist/form-field-DUt4UxSV.js.map +0 -1
- package/dist/form-sizing-By94KzXE.js.map +0 -1
- package/dist/forms-numeric-C0bvjRPZ.js.map +0 -1
- package/dist/header-BOefOKd1.js.map +0 -1
- package/dist/input-DWhBBBww.js +0 -262
- package/dist/input-DWhBBBww.js.map +0 -1
- package/dist/input-Ddi_LSYv.js +0 -20
- package/dist/input-Ddi_LSYv.js.map +0 -1
- package/dist/interaction-recipes-CHr0dJUs.js.map +0 -1
- package/dist/item-DEmDiTlD.js +0 -265
- package/dist/item-DEmDiTlD.js.map +0 -1
- package/dist/media-gallery-DcTtAaeC.js.map +0 -1
- package/dist/mentions-D-uyCh01.js.map +0 -1
- package/dist/message-CdHgIWKf.js.map +0 -1
- package/dist/metadata-list-X5rYAKSB.js.map +0 -1
- package/dist/navigation-D3KwXmaq.js.map +0 -1
- package/dist/navigation-HJf5zxlH.js.map +0 -1
- package/dist/overflow-tab-bar-sQHXLlwQ.js.map +0 -1
- package/dist/overlays-I0axtYA6.js.map +0 -1
- package/dist/pagination-3bPA_a6K.js +0 -149
- package/dist/pagination-3bPA_a6K.js.map +0 -1
- package/dist/popover-menu-B71Tn2Qz.js +0 -99
- package/dist/popover-menu-B71Tn2Qz.js.map +0 -1
- package/dist/popover.recipes-Bdyhj2db.js.map +0 -1
- package/dist/primitives-B-CkiEMU.js.map +0 -1
- package/dist/rich-text-editor-sMU_Scqm.js.map +0 -1
- package/dist/rich-text-editor.recipes-CadiF_Uu.js +0 -88
- package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +0 -1
- package/dist/settings-CQW3b-Cu.js.map +0 -1
- package/dist/sidebar-C7WWR29L.js.map +0 -1
- package/dist/smart-card-lFKxn5Hu.js +0 -595
- package/dist/smart-card-lFKxn5Hu.js.map +0 -1
- package/dist/spinner-fa3h1Aif.js +0 -80
- package/dist/spinner-fa3h1Aif.js.map +0 -1
- package/dist/table-CIKyLUsy.js.map +0 -1
- package/dist/table-CrcLN9Io.js +0 -1458
- package/dist/table-CrcLN9Io.js.map +0 -1
- package/dist/tabs-DwBJfjxX.js.map +0 -1
- package/dist/text-inputs-aaK9wcDT.js +0 -326
- package/dist/text-inputs-aaK9wcDT.js.map +0 -1
- package/dist/theme-scope-kStaAer0.js +0 -39
- package/dist/theme-scope-kStaAer0.js.map +0 -1
- package/dist/timelines-C_SBwHNP.js +0 -442
- package/dist/timelines-C_SBwHNP.js.map +0 -1
- package/dist/tone-recipes-CPoExcTE.js.map +0 -1
- package/dist/typography-DTRkE9zL.js.map +0 -1
- package/dist/ui-provider-1D_NSYzO.js.map +0 -1
- package/dist/upload-BO8-CLN6.js.map +0 -1
- package/dist/upload-queue-EOC8g1gf.js.map +0 -1
- package/dist/usage-card-obRaBskq.js.map +0 -1
- package/dist/utils-l5LpDw2z.js.map +0 -1
- package/dist/value-inputs-TAYMX111.js.map +0 -1
- package/dist/workspace-DH0v0KcB.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStrings as e } from "../lib/strings.js";
|
|
3
|
-
import { t } from "../utils-
|
|
4
|
-
import { n } from "../buttons-
|
|
5
|
-
import {
|
|
6
|
-
import { i, t as a } from "../structure-
|
|
7
|
-
import { h as o, p as s, t as c, v as l } from "../smart-card-
|
|
8
|
-
import { n as u, t as d } from "../feedback-
|
|
9
|
-
import { n as f, t as p } from "../action-menu-
|
|
10
|
-
import { n as m, r as h, t as g } from "../overlays-
|
|
3
|
+
import { t } from "../utils-BRhFDwuU.js";
|
|
4
|
+
import { n } from "../buttons-DPZekJFu.js";
|
|
5
|
+
import { c as r } from "../typography-UTnveOEy.js";
|
|
6
|
+
import { i, t as a } from "../structure-BmisBK-3.js";
|
|
7
|
+
import { h as o, p as s, t as c, v as l } from "../smart-card-DiC5aac3.js";
|
|
8
|
+
import { n as u, t as d } from "../feedback-BYIhtitP.js";
|
|
9
|
+
import { n as f, t as p } from "../action-menu-CllU52Mm.js";
|
|
10
|
+
import { n as m, r as h, t as g } from "../overlays-DNWmZrJ4.js";
|
|
11
11
|
import { n as _ } from "../content-typography-CnwgMJ37.js";
|
|
12
|
-
import { t as v } from "../accordion-
|
|
13
|
-
import { t as y } from "../input-
|
|
14
|
-
import { t as b } from "../form-field-
|
|
15
|
-
import { a as x, c as S, d as C, o as w, s as T } from "../text-inputs-
|
|
16
|
-
import { l as E } from "../choice-inputs-
|
|
17
|
-
import { t as ee } from "../scroll-area-
|
|
18
|
-
import { i as D, n as O, r as te, t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { n as
|
|
21
|
-
import { t as
|
|
22
|
-
import { a as
|
|
23
|
-
import { useEffect as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { Bold as
|
|
12
|
+
import { t as v } from "../accordion-Cjb6sx0G.js";
|
|
13
|
+
import { t as y } from "../input-DQdEd0YD.js";
|
|
14
|
+
import { t as b } from "../form-field-CwH9y77i.js";
|
|
15
|
+
import { a as x, c as S, d as C, o as w, s as T } from "../text-inputs-f9Ia-aCi.js";
|
|
16
|
+
import { l as E } from "../choice-inputs-CNHvARCJ.js";
|
|
17
|
+
import { t as ee } from "../scroll-area-DcI-M1UT.js";
|
|
18
|
+
import { i as D, n as O, r as te, t as ne } from "../tabs-CDocW5D1.js";
|
|
19
|
+
import { t as k } from "../popover-menu-B9WWygpa.js";
|
|
20
|
+
import { n as A, t as j } from "../rich-text-editor-toolbar-DfXg0-VC.js";
|
|
21
|
+
import { t as M } from "../rich-text-editor.strings-CB59ekH2.js";
|
|
22
|
+
import { a as N, c as P, i as F, l as I, n as L, o as R, r as z, s as B, t as V, u as H } from "../http-D_6rOnzU.js";
|
|
23
|
+
import { useEffect as U, useId as W, useImperativeHandle as G, useMemo as re, useRef as K, useState as q } from "react";
|
|
24
|
+
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
25
|
+
import { Bold as ie, Italic as ae, Link as oe, List as se, ListOrdered as ce, Plus as Z, Redo2 as le, Undo2 as ue, X as de } from "lucide-react";
|
|
26
26
|
import { EditorContent as fe, Node as pe, generateJSON as me, mergeAttributes as he, useEditor as ge } from "@tiptap/react";
|
|
27
27
|
import _e from "@tiptap/starter-kit";
|
|
28
28
|
//#region src/components/features/email-composer/partials/data-status.tsx
|
|
@@ -30,7 +30,7 @@ function Q(e) {
|
|
|
30
30
|
return !!(e?.loading || e?.error);
|
|
31
31
|
}
|
|
32
32
|
function ve({ state: e, label: t, retryLabel: n, report: r }) {
|
|
33
|
-
return e?.loading ? /* @__PURE__ */
|
|
33
|
+
return e?.loading ? /* @__PURE__ */ Y(u, { label: t }) : e?.error ? /* @__PURE__ */ Y(d, {
|
|
34
34
|
variant: "inline",
|
|
35
35
|
description: e.error,
|
|
36
36
|
retryLabel: n,
|
|
@@ -42,7 +42,7 @@ function ve({ state: e, label: t, retryLabel: n, report: r }) {
|
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/components/features/email-composer/use-composer.ts
|
|
44
44
|
function ye(t) {
|
|
45
|
-
let n = e(
|
|
45
|
+
let n = e(H, t.strings), r = K(null);
|
|
46
46
|
r.current ||= structuredClone({
|
|
47
47
|
to: [],
|
|
48
48
|
cc: [],
|
|
@@ -50,12 +50,12 @@ function ye(t) {
|
|
|
50
50
|
subject: "",
|
|
51
51
|
body: {
|
|
52
52
|
kind: "rich",
|
|
53
|
-
document:
|
|
53
|
+
document: I
|
|
54
54
|
},
|
|
55
55
|
placeholderOverrides: {},
|
|
56
56
|
...t.value ?? t.defaultValue
|
|
57
57
|
});
|
|
58
|
-
let [i, a] =
|
|
58
|
+
let [i, a] = q(r.current), o = t.value ?? i, s = K({
|
|
59
59
|
props: t,
|
|
60
60
|
draft: o,
|
|
61
61
|
strings: n
|
|
@@ -65,25 +65,25 @@ function ye(t) {
|
|
|
65
65
|
draft: o,
|
|
66
66
|
strings: n
|
|
67
67
|
};
|
|
68
|
-
let c =
|
|
68
|
+
let c = K(o);
|
|
69
69
|
t.value !== void 0 && (c.current = t.value);
|
|
70
|
-
let l =
|
|
71
|
-
|
|
70
|
+
let l = K(null), u = K(null), [d, f] = q(!1), [p, m] = q(""), [h, g] = q(""), [_, v] = q(!1), [y, b] = q([]), x = K(!0);
|
|
71
|
+
U(() => (x.current = !0, () => {
|
|
72
72
|
x.current = !1;
|
|
73
73
|
}), []);
|
|
74
|
-
let S =
|
|
74
|
+
let S = re(() => {
|
|
75
75
|
let e = Object.create(null);
|
|
76
76
|
for (let r of t.placeholders?.sets ?? []) for (let t of Object.keys(r.definitions)) {
|
|
77
77
|
if (Object.hasOwn(e, t)) throw Error(n.duplicateVariable(t));
|
|
78
78
|
r.definitions[t] && (e[t] = r.definitions[t]);
|
|
79
79
|
}
|
|
80
80
|
return e;
|
|
81
|
-
}, [t.placeholders?.sets, n]), C =
|
|
81
|
+
}, [t.placeholders?.sets, n]), C = re(() => [...t.templates?.items ?? [], ...y], [t.templates?.items, y]), w = K(C);
|
|
82
82
|
if (w.current = C, new Set(C.map((e) => e.id)).size !== C.length) throw Error(n.duplicateTemplate);
|
|
83
|
-
let T = () => s.current.props.value ?? c.current, E = (e) => C.find((t) => t.id === e.templateId), ee =
|
|
83
|
+
let T = () => s.current.props.value ?? c.current, E = (e) => C.find((t) => t.id === e.templateId), ee = K(null), D = (e = T()) => {
|
|
84
84
|
let t = s.current.props.context, n = E(e), r = s.current.strings, i = ee.current;
|
|
85
85
|
if (i && i.draft === e && i.context === t && i.definitions === S && i.template === n && i.strings === r) return i.result;
|
|
86
|
-
let a =
|
|
86
|
+
let a = L(e, t, S, n, r);
|
|
87
87
|
return ee.current = {
|
|
88
88
|
draft: e,
|
|
89
89
|
context: t,
|
|
@@ -106,54 +106,54 @@ function ye(t) {
|
|
|
106
106
|
field: "placeholders",
|
|
107
107
|
message: t.dataUnavailable
|
|
108
108
|
}), n;
|
|
109
|
-
}, te = O().length > 0,
|
|
109
|
+
}, te = O().length > 0, ne = (e = T()) => structuredClone([...O(), ...D(e).issues]), k = () => {
|
|
110
110
|
let e = T(), t = [...D(e).rendered?.unresolved ?? []];
|
|
111
111
|
return {
|
|
112
112
|
draft: structuredClone(e),
|
|
113
113
|
dirty: JSON.stringify(e) !== JSON.stringify(r.current),
|
|
114
114
|
busy: u.current !== null,
|
|
115
|
-
issues:
|
|
115
|
+
issues: ne(e),
|
|
116
116
|
unresolvedPlaceholders: t
|
|
117
117
|
};
|
|
118
|
-
},
|
|
118
|
+
}, A = (e) => {
|
|
119
119
|
let t = e instanceof Error ? e : Error(String(e));
|
|
120
120
|
x.current && m(t.message), s.current.props.onError?.(t);
|
|
121
|
-
},
|
|
121
|
+
}, j = (e, t = "api", n = !1) => {
|
|
122
122
|
if (!x.current || !n && u.current && u.current !== "action") return;
|
|
123
123
|
let r = structuredClone(e(structuredClone(T())));
|
|
124
124
|
s.current.props.value === void 0 && (c.current = r, a(r)), s.current.props.onChange?.(structuredClone(r)), s.current.props.onEdit?.(structuredClone(r), { source: t }), m(""), g("");
|
|
125
|
-
},
|
|
126
|
-
async function
|
|
125
|
+
}, M = K(null);
|
|
126
|
+
async function N(e, t, n = !1) {
|
|
127
127
|
if (u.current && !(n && u.current === "action") || !x.current) return;
|
|
128
128
|
let r = {
|
|
129
129
|
kind: e,
|
|
130
130
|
settled: !1,
|
|
131
|
-
parent: n ?
|
|
131
|
+
parent: n ? M.current : null
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
M.current = r, u.current = e, f(!0), m(""), g("");
|
|
134
134
|
try {
|
|
135
135
|
await t();
|
|
136
136
|
} catch (e) {
|
|
137
|
-
|
|
137
|
+
A(e);
|
|
138
138
|
} finally {
|
|
139
|
-
if (r.settled = !0,
|
|
139
|
+
if (r.settled = !0, M.current === r) {
|
|
140
140
|
let e = r.parent;
|
|
141
141
|
for (; e?.settled;) e = e.parent;
|
|
142
|
-
|
|
142
|
+
M.current = e, u.current = e?.kind ?? null, x.current && f(e !== null);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
let
|
|
146
|
+
let P = () => {
|
|
147
147
|
if (!l.current) throw Error(n.editorNotReady);
|
|
148
148
|
if (T().body.kind === "html") throw Error(n.editableRequired);
|
|
149
149
|
return l.current.synchronize(T().body), l.current;
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function F(e, t = {}, r = !1) {
|
|
152
152
|
if (!r && u.current && u.current !== "action") return;
|
|
153
153
|
let i = t.body ?? "replace";
|
|
154
154
|
if (i !== "replace" && (e.body.kind === "html" || T().body.kind === "html")) throw Error(n.editableRequired);
|
|
155
|
-
let a = i === "replace" ? e.body :
|
|
156
|
-
|
|
155
|
+
let a = i === "replace" ? e.body : P().insert(e.body, i);
|
|
156
|
+
j((n) => ({
|
|
157
157
|
...n,
|
|
158
158
|
body: a,
|
|
159
159
|
subject: t.subject === "preserve" ? n.subject : e.subject ?? n.subject,
|
|
@@ -161,66 +161,66 @@ function ye(t) {
|
|
|
161
161
|
placeholderOverrides: t.overrides === "reset" ? {} : n.placeholderOverrides
|
|
162
162
|
}), "template", r);
|
|
163
163
|
}
|
|
164
|
-
let
|
|
165
|
-
|
|
166
|
-
getState: () =>
|
|
167
|
-
update: (e) =>
|
|
168
|
-
setSubject: (e) =>
|
|
169
|
-
setRecipients: (e, t) =>
|
|
170
|
-
setBody: (e) =>
|
|
171
|
-
importBody: (e) =>
|
|
172
|
-
setPlaceholder: (e, t) =>
|
|
173
|
-
clearPlaceholderOverride: (e) =>
|
|
174
|
-
insertPlaceholder: (e) =>
|
|
175
|
-
applyTemplate: (e, t) =>
|
|
176
|
-
insertText: (e) =>
|
|
177
|
-
focusBody: () =>
|
|
178
|
-
validate: () =>
|
|
179
|
-
prepare: () =>
|
|
180
|
-
send: () =>
|
|
181
|
-
discard: () =>
|
|
164
|
+
let R = K(null), z = K(null);
|
|
165
|
+
z.current ||= {
|
|
166
|
+
getState: () => R.current.getState(),
|
|
167
|
+
update: (e) => R.current.update(e),
|
|
168
|
+
setSubject: (e) => R.current.setSubject(e),
|
|
169
|
+
setRecipients: (e, t) => R.current.setRecipients(e, t),
|
|
170
|
+
setBody: (e) => R.current.setBody(e),
|
|
171
|
+
importBody: (e) => R.current.importBody(e),
|
|
172
|
+
setPlaceholder: (e, t) => R.current.setPlaceholder(e, t),
|
|
173
|
+
clearPlaceholderOverride: (e) => R.current.clearPlaceholderOverride(e),
|
|
174
|
+
insertPlaceholder: (e) => R.current.insertPlaceholder(e),
|
|
175
|
+
applyTemplate: (e, t) => R.current.applyTemplate(e, t),
|
|
176
|
+
insertText: (e) => R.current.insertText(e),
|
|
177
|
+
focusBody: () => R.current.focusBody(),
|
|
178
|
+
validate: () => R.current.validate(),
|
|
179
|
+
prepare: () => R.current.prepare(),
|
|
180
|
+
send: () => R.current.send(),
|
|
181
|
+
discard: () => R.current.discard()
|
|
182
182
|
};
|
|
183
|
-
let
|
|
183
|
+
let B = z.current, V = async () => {
|
|
184
184
|
if (O().length) throw Error(s.current.strings.dataUnavailable);
|
|
185
185
|
let e = D();
|
|
186
186
|
if (e.issues.length || !e.rendered) throw Error(e.issues.map((e) => e.message).join(" "));
|
|
187
187
|
return structuredClone(e.rendered.email);
|
|
188
|
-
},
|
|
188
|
+
}, W = (e = !1) => N("send", async () => {
|
|
189
189
|
let e = s.current.props;
|
|
190
190
|
v(!0);
|
|
191
|
-
let t = await
|
|
191
|
+
let t = await V();
|
|
192
192
|
if (e.onBeforeSend) {
|
|
193
|
-
let n = await e.onBeforeSend(t,
|
|
193
|
+
let n = await e.onBeforeSend(t, B);
|
|
194
194
|
if (n === !1 || !x.current) return;
|
|
195
195
|
t = n;
|
|
196
196
|
}
|
|
197
197
|
x.current && (t = structuredClone(t), await e.onSend(structuredClone(t)), x.current && (g(n.sent), e.onSent?.(t)));
|
|
198
|
-
}, e),
|
|
198
|
+
}, e), J = (e = !1) => N("discard", async () => {
|
|
199
199
|
let e = s.current.props, t = T();
|
|
200
|
-
await e.onDiscard?.(
|
|
200
|
+
await e.onDiscard?.(B), x.current && T() === t && (j(() => r.current, "api", !0), v(!1), g(n.discarded), e.onClose?.());
|
|
201
201
|
}, e);
|
|
202
|
-
|
|
203
|
-
getState:
|
|
204
|
-
update: (e) =>
|
|
205
|
-
setSubject: (e) =>
|
|
202
|
+
R.current = {
|
|
203
|
+
getState: k,
|
|
204
|
+
update: (e) => j(e),
|
|
205
|
+
setSubject: (e) => j((t) => ({
|
|
206
206
|
...t,
|
|
207
207
|
subject: e
|
|
208
208
|
})),
|
|
209
|
-
setRecipients: (e, t) =>
|
|
209
|
+
setRecipients: (e, t) => j((n) => ({
|
|
210
210
|
...n,
|
|
211
211
|
[e]: t
|
|
212
212
|
})),
|
|
213
|
-
setBody: (e) =>
|
|
213
|
+
setBody: (e) => j((t) => ({
|
|
214
214
|
...t,
|
|
215
215
|
body: e
|
|
216
216
|
})),
|
|
217
|
-
importBody: (e) =>
|
|
217
|
+
importBody: (e) => j((t) => ({
|
|
218
218
|
...t,
|
|
219
219
|
body: e
|
|
220
220
|
})),
|
|
221
221
|
setPlaceholder: (e, t) => {
|
|
222
222
|
if (!Object.hasOwn(S, e)) throw Error(n.unknownVariable(e));
|
|
223
|
-
|
|
223
|
+
j((n) => ({
|
|
224
224
|
...n,
|
|
225
225
|
placeholderOverrides: {
|
|
226
226
|
...n.placeholderOverrides,
|
|
@@ -228,20 +228,20 @@ function ye(t) {
|
|
|
228
228
|
}
|
|
229
229
|
}), "placeholder");
|
|
230
230
|
},
|
|
231
|
-
clearPlaceholderOverride: (e) =>
|
|
231
|
+
clearPlaceholderOverride: (e) => j((t) => (delete t.placeholderOverrides[e], t), "placeholder"),
|
|
232
232
|
insertPlaceholder: (e) => {
|
|
233
233
|
if (u.current && u.current !== "action") return;
|
|
234
234
|
if (!Object.hasOwn(S, e)) throw Error(n.unknownVariable(e));
|
|
235
|
-
let t =
|
|
236
|
-
|
|
235
|
+
let t = P().insertPlaceholder(e);
|
|
236
|
+
j((e) => ({
|
|
237
237
|
...e,
|
|
238
238
|
body: t
|
|
239
239
|
}));
|
|
240
240
|
},
|
|
241
241
|
insertText: (e) => {
|
|
242
242
|
if (u.current && u.current !== "action") return;
|
|
243
|
-
let t =
|
|
244
|
-
|
|
243
|
+
let t = P().insertText(e);
|
|
244
|
+
j((e) => ({
|
|
245
245
|
...e,
|
|
246
246
|
body: t
|
|
247
247
|
}));
|
|
@@ -251,27 +251,27 @@ function ye(t) {
|
|
|
251
251
|
if (Q(s.current.props.templates)) throw Error(s.current.strings.templatesUnavailable);
|
|
252
252
|
let r = C.find((t) => t.id === e);
|
|
253
253
|
if (!r) throw Error(n.unknownTemplate(e));
|
|
254
|
-
|
|
254
|
+
F(r, t);
|
|
255
255
|
},
|
|
256
|
-
validate: () =>
|
|
257
|
-
prepare:
|
|
258
|
-
send: () =>
|
|
259
|
-
discard: () =>
|
|
260
|
-
},
|
|
261
|
-
let
|
|
262
|
-
await e.onSelect(Object.assign(Object.create(
|
|
263
|
-
send: () =>
|
|
264
|
-
discard: () =>
|
|
256
|
+
validate: () => ne(),
|
|
257
|
+
prepare: V,
|
|
258
|
+
send: () => W(),
|
|
259
|
+
discard: () => J()
|
|
260
|
+
}, G(t.apiRef, () => B, [B]);
|
|
261
|
+
let Y = (e) => N("action", async () => {
|
|
262
|
+
await e.onSelect(Object.assign(Object.create(B), {
|
|
263
|
+
send: () => W(!0),
|
|
264
|
+
discard: () => J(!0)
|
|
265
265
|
}));
|
|
266
|
-
}),
|
|
266
|
+
}), X = () => N("import", async () => {
|
|
267
267
|
let e = T(), t = await s.current.props.templates?.onImport?.();
|
|
268
268
|
if (t && x.current) {
|
|
269
269
|
if (w.current.some((e) => e.id === t.id)) throw Error(n.duplicateTemplate);
|
|
270
|
-
b((e) => [...e, structuredClone(t)]), T() === e &&
|
|
270
|
+
b((e) => [...e, structuredClone(t)]), T() === e && F(t, {}, !0);
|
|
271
271
|
}
|
|
272
|
-
}), { rendered:
|
|
272
|
+
}), { rendered: ie, renderError: ae } = D(o);
|
|
273
273
|
return {
|
|
274
|
-
api:
|
|
274
|
+
api: B,
|
|
275
275
|
draft: o,
|
|
276
276
|
strings: n,
|
|
277
277
|
busy: d,
|
|
@@ -279,25 +279,25 @@ function ye(t) {
|
|
|
279
279
|
error: p,
|
|
280
280
|
notice: h,
|
|
281
281
|
attempted: _,
|
|
282
|
-
rendered:
|
|
283
|
-
renderError:
|
|
282
|
+
rendered: ie,
|
|
283
|
+
renderError: ae,
|
|
284
284
|
definitions: S,
|
|
285
285
|
templates: C,
|
|
286
|
-
values:
|
|
286
|
+
values: ie?.email.resolvedPlaceholders ?? {},
|
|
287
287
|
editorRef: l,
|
|
288
|
-
state:
|
|
289
|
-
report:
|
|
290
|
-
runAction:
|
|
291
|
-
importTemplate:
|
|
292
|
-
changeBody: (e) =>
|
|
288
|
+
state: k(),
|
|
289
|
+
report: A,
|
|
290
|
+
runAction: Y,
|
|
291
|
+
importTemplate: X,
|
|
292
|
+
changeBody: (e) => j((t) => ({
|
|
293
293
|
...t,
|
|
294
294
|
body: e
|
|
295
295
|
}), "body"),
|
|
296
|
-
changeSubject: (e) =>
|
|
296
|
+
changeSubject: (e) => j((t) => ({
|
|
297
297
|
...t,
|
|
298
298
|
subject: e
|
|
299
299
|
}), "subject"),
|
|
300
|
-
changeRecipients: (e, t) =>
|
|
300
|
+
changeRecipients: (e, t) => j((n) => ({
|
|
301
301
|
...n,
|
|
302
302
|
[e]: t
|
|
303
303
|
}), "recipient")
|
|
@@ -306,19 +306,19 @@ function ye(t) {
|
|
|
306
306
|
//#endregion
|
|
307
307
|
//#region src/components/features/email-composer/partials/recipients.tsx
|
|
308
308
|
function be({ recipient: e, field: t, index: n, options: r, busy: i, strings: a, change: o, remove: s, add: c, id: l, errorId: u }) {
|
|
309
|
-
let [d, f] =
|
|
310
|
-
|
|
311
|
-
f(
|
|
309
|
+
let [d, f] = q(F(e));
|
|
310
|
+
U(() => {
|
|
311
|
+
f(F(e));
|
|
312
312
|
}, [e.name, e.email]);
|
|
313
313
|
let p = r.mode === "readonly", m = r.mode === "disabled" || i, h = r.mode !== "disabled" && r.allowRemove !== !1 && (!p || r.allowRemove === !0), g = () => {
|
|
314
|
-
!p && !m && d !==
|
|
314
|
+
!p && !m && d !== F(e) && o({
|
|
315
315
|
id: e.id,
|
|
316
|
-
...
|
|
316
|
+
...z(d)
|
|
317
317
|
});
|
|
318
318
|
};
|
|
319
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ X(x, {
|
|
320
320
|
className: "min-w-0 w-full",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ Y(S, {
|
|
322
322
|
id: l,
|
|
323
323
|
"aria-invalid": !!u,
|
|
324
324
|
"aria-describedby": u,
|
|
@@ -326,23 +326,23 @@ function be({ recipient: e, field: t, index: n, options: r, busy: i, strings: a,
|
|
|
326
326
|
value: d,
|
|
327
327
|
readOnly: p,
|
|
328
328
|
disabled: m,
|
|
329
|
-
title:
|
|
329
|
+
title: F(e),
|
|
330
330
|
onChange: (e) => f(e.target.value),
|
|
331
331
|
onBlur: g,
|
|
332
332
|
onKeyDown: (t) => {
|
|
333
|
-
t.key === "Enter" && (t.preventDefault(), g()), t.key === "Escape" && (t.preventDefault(), f(
|
|
333
|
+
t.key === "Enter" && (t.preventDefault(), g()), t.key === "Escape" && (t.preventDefault(), f(F(e)));
|
|
334
334
|
}
|
|
335
|
-
}), (h || c) && /* @__PURE__ */
|
|
335
|
+
}), (h || c) && /* @__PURE__ */ X(w, {
|
|
336
336
|
align: "inline-end",
|
|
337
|
-
children: [h && /* @__PURE__ */
|
|
337
|
+
children: [h && /* @__PURE__ */ Y(T, {
|
|
338
338
|
type: "button",
|
|
339
339
|
iconOnly: !0,
|
|
340
340
|
size: "sm",
|
|
341
341
|
disabled: i,
|
|
342
342
|
"aria-label": a.removeRecipient(e.email),
|
|
343
343
|
onClick: s,
|
|
344
|
-
children: /* @__PURE__ */
|
|
345
|
-
}), c && /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ Y(de, { className: "size-icon" })
|
|
345
|
+
}), c && /* @__PURE__ */ Y(T, {
|
|
346
346
|
type: "button",
|
|
347
347
|
iconOnly: !0,
|
|
348
348
|
size: "sm",
|
|
@@ -350,38 +350,38 @@ function be({ recipient: e, field: t, index: n, options: r, busy: i, strings: a,
|
|
|
350
350
|
"aria-label": a.addRecipient(t),
|
|
351
351
|
title: a.addRecipient(t),
|
|
352
352
|
onClick: c,
|
|
353
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ Y(Z, { className: "size-icon" })
|
|
354
354
|
})]
|
|
355
355
|
})]
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
358
|
function xe({ field: e, value: t, options: n = {}, busy: r, strings: i, onChange: o, error: s, actions: c, report: l }) {
|
|
359
|
-
let [u, d] =
|
|
359
|
+
let [u, d] = q(!1), [f, p] = q(""), m = W(), h = s ? `${m}-error` : void 0, g = K(null), _ = n.mode !== "disabled" && n.allowAdd !== !1 && (n.mode !== "readonly" || n.allowAdd === !0), v = u || t.length === 0, y = Q(n), C = () => {
|
|
360
360
|
if (r || !_ || !v || y) return;
|
|
361
|
-
let e =
|
|
361
|
+
let e = z(f);
|
|
362
362
|
f.trim() && !t.some((t) => t.email.toLowerCase() === e.email.toLowerCase()) && o([...t, e]), p(""), d(!1);
|
|
363
363
|
};
|
|
364
|
-
|
|
364
|
+
U(() => {
|
|
365
365
|
u && g.current?.focus();
|
|
366
366
|
}, [u]);
|
|
367
367
|
let E = () => {
|
|
368
368
|
v && C(), d(!0), g.current?.focus();
|
|
369
369
|
};
|
|
370
|
-
return /* @__PURE__ */
|
|
370
|
+
return /* @__PURE__ */ Y(b, {
|
|
371
371
|
label: i[e],
|
|
372
372
|
required: e === "to",
|
|
373
373
|
error: s,
|
|
374
374
|
supportingTextId: h,
|
|
375
375
|
htmlFor: t.length ? `${m}-0` : `${m}-new`,
|
|
376
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ X(a, {
|
|
377
377
|
id: `${m}-group`,
|
|
378
378
|
gap: "sm",
|
|
379
|
-
children: [y ? /* @__PURE__ */
|
|
379
|
+
children: [y ? /* @__PURE__ */ Y(ve, {
|
|
380
380
|
state: n,
|
|
381
381
|
label: i.loadingRecipients(i[e]),
|
|
382
382
|
retryLabel: i.retry,
|
|
383
383
|
report: l
|
|
384
|
-
}) : /* @__PURE__ */
|
|
384
|
+
}) : /* @__PURE__ */ X(J, { children: [t.map((a, s) => /* @__PURE__ */ Y(be, {
|
|
385
385
|
id: `${m}-${s}`,
|
|
386
386
|
errorId: h,
|
|
387
387
|
recipient: a,
|
|
@@ -393,9 +393,9 @@ function xe({ field: e, value: t, options: n = {}, busy: r, strings: i, onChange
|
|
|
393
393
|
change: (e) => o(t.map((t, n) => n === s ? e : t)),
|
|
394
394
|
remove: () => o(t.filter((e, t) => t !== s)),
|
|
395
395
|
add: _ && !v && s === t.length - 1 ? E : void 0
|
|
396
|
-
}, a.id ?? s)), v && /* @__PURE__ */
|
|
396
|
+
}, a.id ?? s)), v && /* @__PURE__ */ X(x, {
|
|
397
397
|
className: "min-w-0 w-full",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ Y(S, {
|
|
399
399
|
id: `${m}-new`,
|
|
400
400
|
ref: g,
|
|
401
401
|
autoFocus: e !== "to",
|
|
@@ -411,9 +411,9 @@ function xe({ field: e, value: t, options: n = {}, busy: r, strings: i, onChange
|
|
|
411
411
|
onKeyDown: (e) => {
|
|
412
412
|
e.key === "Enter" && (e.preventDefault(), C()), e.key === "Escape" && (e.preventDefault(), p(""), d(!1));
|
|
413
413
|
}
|
|
414
|
-
}), _ && /* @__PURE__ */
|
|
414
|
+
}), _ && /* @__PURE__ */ Y(w, {
|
|
415
415
|
align: "inline-end",
|
|
416
|
-
children: /* @__PURE__ */
|
|
416
|
+
children: /* @__PURE__ */ Y(T, {
|
|
417
417
|
type: "button",
|
|
418
418
|
iconOnly: !0,
|
|
419
419
|
size: "sm",
|
|
@@ -422,10 +422,10 @@ function xe({ field: e, value: t, options: n = {}, busy: r, strings: i, onChange
|
|
|
422
422
|
title: i.addRecipient(i[e]),
|
|
423
423
|
onMouseDown: (e) => e.preventDefault(),
|
|
424
424
|
onClick: E,
|
|
425
|
-
children: /* @__PURE__ */
|
|
425
|
+
children: /* @__PURE__ */ Y(Z, { className: "size-icon" })
|
|
426
426
|
})
|
|
427
427
|
})]
|
|
428
|
-
})] }), c && /* @__PURE__ */
|
|
428
|
+
})] }), c && /* @__PURE__ */ Y(a, {
|
|
429
429
|
direction: "horizontal",
|
|
430
430
|
gap: "xs",
|
|
431
431
|
justify: "end",
|
|
@@ -437,8 +437,8 @@ function xe({ field: e, value: t, options: n = {}, busy: r, strings: i, onChange
|
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/components/features/email-composer/partials/variables.tsx
|
|
439
439
|
function Se({ definitions: e, values: t, draft: r, api: o, strings: s, busy: c, editable: l }) {
|
|
440
|
-
let u =
|
|
441
|
-
return /* @__PURE__ */
|
|
440
|
+
let u = W();
|
|
441
|
+
return /* @__PURE__ */ Y(i, {
|
|
442
442
|
minColumnWidth: "sm",
|
|
443
443
|
gap: "md",
|
|
444
444
|
children: Object.keys(e).map((i) => {
|
|
@@ -447,36 +447,36 @@ function Se({ definitions: e, values: t, draft: r, api: o, strings: s, busy: c,
|
|
|
447
447
|
value: String(t[i] ?? ""),
|
|
448
448
|
disabled: c,
|
|
449
449
|
readOnly: !d.editable
|
|
450
|
-
}, h = d.input === "textarea" ? /* @__PURE__ */
|
|
450
|
+
}, h = d.input === "textarea" ? /* @__PURE__ */ Y(C, {
|
|
451
451
|
...m,
|
|
452
452
|
onChange: (e) => o.setPlaceholder(i, e.target.value)
|
|
453
|
-
}) : d.input === "select" ? /* @__PURE__ */
|
|
453
|
+
}) : d.input === "select" ? /* @__PURE__ */ Y(E, {
|
|
454
454
|
...m,
|
|
455
455
|
placeholder: s.choose,
|
|
456
456
|
options: [...d.options ?? []],
|
|
457
457
|
onValueChange: (e) => o.setPlaceholder(i, e ?? "")
|
|
458
|
-
}) : /* @__PURE__ */
|
|
458
|
+
}) : /* @__PURE__ */ Y(y, {
|
|
459
459
|
...m,
|
|
460
460
|
type: d.input === "number" ? "number" : d.input === "date" ? "date" : "text",
|
|
461
461
|
onChange: (e) => o.setPlaceholder(i, d.input === "number" && e.target.value !== "" ? Number(e.target.value) : e.target.value)
|
|
462
462
|
});
|
|
463
|
-
return /* @__PURE__ */
|
|
463
|
+
return /* @__PURE__ */ Y(b, {
|
|
464
464
|
label: d.group ? `${d.group} · ${d.label}` : d.label,
|
|
465
465
|
htmlFor: p,
|
|
466
466
|
required: d.required,
|
|
467
467
|
helperText: `${f ? s.overridden : s.dynamic}${d.description ? ` · ${d.description}` : ""}`,
|
|
468
|
-
children: /* @__PURE__ */
|
|
468
|
+
children: /* @__PURE__ */ X(a, {
|
|
469
469
|
id: `${p}-group`,
|
|
470
470
|
direction: "horizontal",
|
|
471
471
|
gap: "sm",
|
|
472
472
|
align: "start",
|
|
473
473
|
wrap: !1,
|
|
474
474
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ Y("div", {
|
|
476
476
|
className: "min-w-0 flex-1",
|
|
477
477
|
children: h
|
|
478
478
|
}),
|
|
479
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ Y(n, {
|
|
480
480
|
type: "button",
|
|
481
481
|
iconOnly: !0,
|
|
482
482
|
size: "sm",
|
|
@@ -485,9 +485,9 @@ function Se({ definitions: e, values: t, draft: r, api: o, strings: s, busy: c,
|
|
|
485
485
|
disabled: c || !l,
|
|
486
486
|
"aria-label": s.insertVariable(d.label),
|
|
487
487
|
onClick: () => o.insertPlaceholder(i),
|
|
488
|
-
children: /* @__PURE__ */
|
|
488
|
+
children: /* @__PURE__ */ Y(Z, { className: "size-icon" })
|
|
489
489
|
}),
|
|
490
|
-
f && /* @__PURE__ */
|
|
490
|
+
f && /* @__PURE__ */ Y(n, {
|
|
491
491
|
type: "button",
|
|
492
492
|
size: "sm",
|
|
493
493
|
buttonStyle: "ghost",
|
|
@@ -526,19 +526,19 @@ var Ce = pe.create({
|
|
|
526
526
|
renderText: ({ node: e }) => `{{${e.attrs.key}}}`
|
|
527
527
|
}), $ = [_e.configure({ link: { openOnClick: !1 } }), Ce];
|
|
528
528
|
function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
529
|
-
let u =
|
|
529
|
+
let u = K(i);
|
|
530
530
|
u.current = i;
|
|
531
|
-
let d =
|
|
531
|
+
let d = K(!1), [f, p] = q(!1), [m, g] = q(""), [v, x] = q(""), S = K({
|
|
532
532
|
from: 1,
|
|
533
533
|
to: 1
|
|
534
|
-
}), C = e(
|
|
534
|
+
}), C = e(M, {
|
|
535
535
|
editorLabel: l.body,
|
|
536
536
|
toolbar: l.toolbar
|
|
537
537
|
}), w = ge({
|
|
538
538
|
extensions: $,
|
|
539
539
|
immediatelyRender: !1,
|
|
540
540
|
shouldRerenderOnTransaction: !0,
|
|
541
|
-
content: n.kind === "rich" ? n.document :
|
|
541
|
+
content: n.kind === "rich" ? n.document : P(n),
|
|
542
542
|
editable: !r,
|
|
543
543
|
editorProps: { attributes: {
|
|
544
544
|
role: "textbox",
|
|
@@ -553,20 +553,20 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
|
-
|
|
556
|
+
U(() => {
|
|
557
557
|
if (w) try {
|
|
558
|
-
let e = n.kind === "rich" ? w.schema.nodeFromJSON(n.document).toJSON() : me(
|
|
558
|
+
let e = n.kind === "rich" ? w.schema.nodeFromJSON(n.document).toJSON() : me(P(n), $);
|
|
559
559
|
JSON.stringify(w.getJSON()) !== JSON.stringify(e) && w.commands.setContent(e, { emitUpdate: !1 });
|
|
560
560
|
} catch {}
|
|
561
|
-
}),
|
|
561
|
+
}), U(() => {
|
|
562
562
|
w?.setEditable(!r && n.kind !== "html", !1);
|
|
563
563
|
}, [
|
|
564
564
|
w,
|
|
565
565
|
r,
|
|
566
566
|
n.kind
|
|
567
|
-
]),
|
|
567
|
+
]), U(() => {
|
|
568
568
|
(r || n.kind === "html") && p(!1);
|
|
569
|
-
}, [r, n.kind]),
|
|
569
|
+
}, [r, n.kind]), G(c, () => {
|
|
570
570
|
let e = (e) => {
|
|
571
571
|
if (!w) throw Error(l.editorNotReady);
|
|
572
572
|
d.current = !0;
|
|
@@ -582,7 +582,7 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
582
582
|
return {
|
|
583
583
|
synchronize: (e) => {
|
|
584
584
|
if (!w) return;
|
|
585
|
-
let t = e.kind === "rich" ? w.schema.nodeFromJSON(e.document).toJSON() : me(
|
|
585
|
+
let t = e.kind === "rich" ? w.schema.nodeFromJSON(e.document).toJSON() : me(P(e), $);
|
|
586
586
|
JSON.stringify(w.getJSON()) !== JSON.stringify(t) && w.commands.setContent(t, { emitUpdate: !1 });
|
|
587
587
|
},
|
|
588
588
|
focus: () => {
|
|
@@ -590,10 +590,10 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
590
590
|
},
|
|
591
591
|
convert: (e) => ({
|
|
592
592
|
kind: "rich",
|
|
593
|
-
document: e.kind === "rich" ? e.document : me(
|
|
593
|
+
document: e.kind === "rich" ? e.document : me(P(e), $)
|
|
594
594
|
}),
|
|
595
595
|
insert: (t, n) => e(() => {
|
|
596
|
-
n === "append" && w.commands.focus("end"), w.chain().focus().insertContent(t.kind === "rich" ? t.document.content ?? [] :
|
|
596
|
+
n === "append" && w.commands.focus("end"), w.chain().focus().insertContent(t.kind === "rich" ? t.document.content ?? [] : P(t)).run();
|
|
597
597
|
}),
|
|
598
598
|
insertText: (t) => e(() => {
|
|
599
599
|
t && w.chain().focus().insertContent({
|
|
@@ -612,7 +612,7 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
612
612
|
let T = [
|
|
613
613
|
{
|
|
614
614
|
id: "bold",
|
|
615
|
-
icon:
|
|
615
|
+
icon: ie,
|
|
616
616
|
label: C.toolbar.bold,
|
|
617
617
|
isActive: () => !!w?.isActive("bold"),
|
|
618
618
|
run: () => {
|
|
@@ -621,7 +621,7 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
621
621
|
},
|
|
622
622
|
{
|
|
623
623
|
id: "italic",
|
|
624
|
-
icon:
|
|
624
|
+
icon: ae,
|
|
625
625
|
label: C.toolbar.italic,
|
|
626
626
|
isActive: () => !!w?.isActive("italic"),
|
|
627
627
|
run: () => {
|
|
@@ -630,7 +630,7 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
630
630
|
},
|
|
631
631
|
{
|
|
632
632
|
id: "bullet",
|
|
633
|
-
icon:
|
|
633
|
+
icon: se,
|
|
634
634
|
label: C.toolbar.bulletList,
|
|
635
635
|
isActive: () => !!w?.isActive("bulletList"),
|
|
636
636
|
run: () => {
|
|
@@ -639,7 +639,7 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
639
639
|
},
|
|
640
640
|
{
|
|
641
641
|
id: "ordered",
|
|
642
|
-
icon:
|
|
642
|
+
icon: ce,
|
|
643
643
|
label: C.toolbar.orderedList,
|
|
644
644
|
isActive: () => !!w?.isActive("orderedList"),
|
|
645
645
|
run: () => {
|
|
@@ -667,11 +667,11 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
667
667
|
disabled: !w?.can().redo()
|
|
668
668
|
}
|
|
669
669
|
];
|
|
670
|
-
return /* @__PURE__ */
|
|
670
|
+
return /* @__PURE__ */ X(a, {
|
|
671
671
|
gap: "none",
|
|
672
|
-
className: t("email-composer--editor",
|
|
672
|
+
className: t("email-composer--editor", A.frame, r && A.disabled),
|
|
673
673
|
children: [
|
|
674
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ Y(j, {
|
|
675
675
|
buttons: T,
|
|
676
676
|
disabled: r,
|
|
677
677
|
hasEditor: !!w,
|
|
@@ -681,7 +681,7 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
681
681
|
strings: C,
|
|
682
682
|
extraToolbarItems: [{
|
|
683
683
|
id: "link",
|
|
684
|
-
icon:
|
|
684
|
+
icon: oe,
|
|
685
685
|
label: l.link,
|
|
686
686
|
onClick: () => {
|
|
687
687
|
w && (S.current = {
|
|
@@ -691,11 +691,11 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
691
691
|
}
|
|
692
692
|
}]
|
|
693
693
|
}),
|
|
694
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ Y(fe, {
|
|
695
695
|
editor: w,
|
|
696
|
-
className: t(
|
|
696
|
+
className: t(A.content, "min-h-64 w-full min-w-0 [&_.ProseMirror]:min-h-64")
|
|
697
697
|
}),
|
|
698
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ Y(h, {
|
|
699
699
|
open: f,
|
|
700
700
|
onOpenChange: p,
|
|
701
701
|
title: l.linkTitle,
|
|
@@ -713,17 +713,17 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
713
713
|
}
|
|
714
714
|
w?.commands.setTextSelection(S.current), e ? w?.chain().focus().extendMarkRange("link").setLink({ href: e }).run() : w?.chain().focus().extendMarkRange("link").unsetLink().run(), p(!1);
|
|
715
715
|
},
|
|
716
|
-
children: /* @__PURE__ */
|
|
716
|
+
children: /* @__PURE__ */ X(a, {
|
|
717
717
|
gap: "md",
|
|
718
|
-
children: [/* @__PURE__ */
|
|
718
|
+
children: [/* @__PURE__ */ Y(b, {
|
|
719
719
|
label: l.linkUrl,
|
|
720
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ Y(y, {
|
|
721
721
|
value: m,
|
|
722
722
|
onChange: (e) => g(e.target.value)
|
|
723
723
|
})
|
|
724
|
-
}), v && /* @__PURE__ */
|
|
724
|
+
}), v && /* @__PURE__ */ Y(s, {
|
|
725
725
|
tone: "destructive",
|
|
726
|
-
children: /* @__PURE__ */
|
|
726
|
+
children: /* @__PURE__ */ Y(o, { children: v })
|
|
727
727
|
})]
|
|
728
728
|
})
|
|
729
729
|
})
|
|
@@ -733,20 +733,20 @@ function we({ body: n, disabled: r, onChange: i, adapterRef: c, strings: l }) {
|
|
|
733
733
|
//#endregion
|
|
734
734
|
//#region src/components/features/email-composer/partials/html-preview.tsx
|
|
735
735
|
function Te({ html: e, subject: t, strings: n }) {
|
|
736
|
-
return /* @__PURE__ */
|
|
736
|
+
return /* @__PURE__ */ X(a, {
|
|
737
737
|
gap: "normal",
|
|
738
738
|
className: "min-w-0",
|
|
739
|
-
children: [/* @__PURE__ */
|
|
739
|
+
children: [/* @__PURE__ */ X(r, {
|
|
740
740
|
type: "secondary",
|
|
741
741
|
children: [
|
|
742
742
|
n.subject,
|
|
743
743
|
": ",
|
|
744
744
|
t
|
|
745
745
|
]
|
|
746
|
-
}), /* @__PURE__ */
|
|
746
|
+
}), /* @__PURE__ */ Y(c, {
|
|
747
747
|
surface: "card",
|
|
748
748
|
padding: "none",
|
|
749
|
-
children: /* @__PURE__ */
|
|
749
|
+
children: /* @__PURE__ */ Y("iframe", {
|
|
750
750
|
title: n.previewLabel,
|
|
751
751
|
sandbox: "",
|
|
752
752
|
referrerPolicy: "no-referrer",
|
|
@@ -759,7 +759,7 @@ function Te({ html: e, subject: t, strings: n }) {
|
|
|
759
759
|
//#endregion
|
|
760
760
|
//#region src/components/features/email-composer/email-composer.tsx
|
|
761
761
|
function Ee(e) {
|
|
762
|
-
let r = ye(e), { api: i, draft: u, strings: d, busy: _, state: x } = r, [S, C] =
|
|
762
|
+
let r = ye(e), { api: i, draft: u, strings: d, busy: _, state: x } = r, [S, C] = q("editor"), [w, T] = q(e.placeholders?.showEditor ?? !1), [E, A] = q(!1), [j, M] = q(!1), [N, P] = q(!1), F = W(), I = S === "preview" || u.body.kind === "html", L = (t) => (e.actions ?? []).filter((e) => (e.position ?? "toolbar") === t && (e.visible?.(x) ?? !0)).map((e) => ({
|
|
763
763
|
id: e.id,
|
|
764
764
|
label: e.label,
|
|
765
765
|
icon: e.icon,
|
|
@@ -769,7 +769,7 @@ function Ee(e) {
|
|
|
769
769
|
},
|
|
770
770
|
buttonStyle: "ghost",
|
|
771
771
|
tone: "secondary"
|
|
772
|
-
})),
|
|
772
|
+
})), R = /* @__PURE__ */ X(a, {
|
|
773
773
|
direction: {
|
|
774
774
|
base: "vertical",
|
|
775
775
|
sm: "horizontal"
|
|
@@ -781,10 +781,10 @@ function Ee(e) {
|
|
|
781
781
|
},
|
|
782
782
|
justify: "between",
|
|
783
783
|
className: "w-full",
|
|
784
|
-
children: [/* @__PURE__ */
|
|
784
|
+
children: [/* @__PURE__ */ X(a, {
|
|
785
785
|
direction: "horizontal",
|
|
786
786
|
gap: "sm",
|
|
787
|
-
children: [e.buttons?.discard !== !1 && /* @__PURE__ */
|
|
787
|
+
children: [e.buttons?.discard !== !1 && /* @__PURE__ */ Y(n, {
|
|
788
788
|
type: "button",
|
|
789
789
|
tone: "secondary",
|
|
790
790
|
buttonStyle: "ghost",
|
|
@@ -793,17 +793,17 @@ function Ee(e) {
|
|
|
793
793
|
i.discard();
|
|
794
794
|
},
|
|
795
795
|
children: e.buttons?.discard?.label ?? d.discard
|
|
796
|
-
}), /* @__PURE__ */
|
|
797
|
-
}), /* @__PURE__ */
|
|
796
|
+
}), /* @__PURE__ */ Y(p, { actions: L("footer-start") })]
|
|
797
|
+
}), /* @__PURE__ */ X(a, {
|
|
798
798
|
direction: "horizontal",
|
|
799
799
|
gap: "sm",
|
|
800
800
|
justify: "end",
|
|
801
|
-
children: [/* @__PURE__ */
|
|
801
|
+
children: [/* @__PURE__ */ Y(p, { actions: L("footer-end") }), (e.buttons?.send !== !1 || !!L("overflow").length) && /* @__PURE__ */ X(a, {
|
|
802
802
|
direction: "horizontal",
|
|
803
803
|
gap: "sm",
|
|
804
804
|
wrap: !1,
|
|
805
805
|
className: "email-composer--send-commands",
|
|
806
|
-
children: [e.buttons?.send !== !1 && /* @__PURE__ */
|
|
806
|
+
children: [e.buttons?.send !== !1 && /* @__PURE__ */ Y(n, {
|
|
807
807
|
type: "button",
|
|
808
808
|
tone: "primary",
|
|
809
809
|
disabled: _ || r.dataPending,
|
|
@@ -813,98 +813,98 @@ function Ee(e) {
|
|
|
813
813
|
i.send();
|
|
814
814
|
},
|
|
815
815
|
children: _ ? d.working : e.buttons?.send?.label ?? d.send
|
|
816
|
-
}), !!
|
|
817
|
-
actions:
|
|
816
|
+
}), !!L("overflow").length && /* @__PURE__ */ Y(f, {
|
|
817
|
+
actions: L("overflow"),
|
|
818
818
|
srText: d.more,
|
|
819
819
|
buttonProps: { disabled: _ }
|
|
820
820
|
})]
|
|
821
821
|
})]
|
|
822
822
|
})]
|
|
823
|
-
}),
|
|
823
|
+
}), z = (e) => r.attempted ? x.issues.find((t) => t.field === e)?.message : void 0, B = /* @__PURE__ */ X(a, {
|
|
824
824
|
gap: "lg",
|
|
825
825
|
className: "email-composer--body min-w-0",
|
|
826
826
|
children: [
|
|
827
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ X(a, {
|
|
828
828
|
gap: "md",
|
|
829
829
|
className: "email-composer--details",
|
|
830
|
-
children: [/* @__PURE__ */
|
|
830
|
+
children: [/* @__PURE__ */ Y(a, {
|
|
831
831
|
gap: "md",
|
|
832
832
|
children: [
|
|
833
833
|
"to",
|
|
834
834
|
"cc",
|
|
835
835
|
"bcc"
|
|
836
|
-
].filter((t) => t === "to" || t === "cc" && (E || u.cc.length || Q(e.recipients?.cc)) || t === "bcc" && (
|
|
836
|
+
].filter((t) => t === "to" || t === "cc" && (E || u.cc.length || Q(e.recipients?.cc)) || t === "bcc" && (j || u.bcc.length || Q(e.recipients?.bcc))).map((t) => /* @__PURE__ */ Y(xe, {
|
|
837
837
|
field: t,
|
|
838
838
|
value: u[t],
|
|
839
839
|
options: e.recipients?.[t],
|
|
840
840
|
strings: d,
|
|
841
841
|
busy: _,
|
|
842
842
|
report: r.report,
|
|
843
|
-
error:
|
|
843
|
+
error: z(t),
|
|
844
844
|
onChange: (e) => r.changeRecipients(t, e),
|
|
845
|
-
actions: t === "to" ? /* @__PURE__ */
|
|
845
|
+
actions: t === "to" ? /* @__PURE__ */ X(J, { children: [!E && !u.cc.length && /* @__PURE__ */ Y(n, {
|
|
846
846
|
type: "button",
|
|
847
847
|
size: "sm",
|
|
848
848
|
buttonStyle: "ghost",
|
|
849
849
|
tone: "secondary",
|
|
850
850
|
disabled: _,
|
|
851
|
-
onClick: () =>
|
|
851
|
+
onClick: () => A(!0),
|
|
852
852
|
children: d.cc
|
|
853
|
-
}), !
|
|
853
|
+
}), !j && !u.bcc.length && /* @__PURE__ */ Y(n, {
|
|
854
854
|
type: "button",
|
|
855
855
|
size: "sm",
|
|
856
856
|
buttonStyle: "ghost",
|
|
857
857
|
tone: "secondary",
|
|
858
858
|
disabled: _,
|
|
859
|
-
onClick: () =>
|
|
859
|
+
onClick: () => M(!0),
|
|
860
860
|
children: d.bcc
|
|
861
861
|
})] }) : void 0
|
|
862
862
|
}, t))
|
|
863
|
-
}), /* @__PURE__ */
|
|
863
|
+
}), /* @__PURE__ */ Y(b, {
|
|
864
864
|
label: d.subject,
|
|
865
865
|
required: !0,
|
|
866
|
-
htmlFor: `${
|
|
867
|
-
error:
|
|
868
|
-
supportingTextId: `${
|
|
869
|
-
children: /* @__PURE__ */
|
|
870
|
-
id: `${
|
|
866
|
+
htmlFor: `${F}-subject`,
|
|
867
|
+
error: z("subject"),
|
|
868
|
+
supportingTextId: `${F}-subject-error`,
|
|
869
|
+
children: /* @__PURE__ */ Y(y, {
|
|
870
|
+
id: `${F}-subject`,
|
|
871
871
|
value: u.subject,
|
|
872
872
|
readOnly: e.subject?.readOnly,
|
|
873
873
|
disabled: _,
|
|
874
|
-
invalid: !!
|
|
875
|
-
"aria-describedby":
|
|
874
|
+
invalid: !!z("subject"),
|
|
875
|
+
"aria-describedby": z("subject") ? `${F}-subject-error` : void 0,
|
|
876
876
|
onChange: (e) => r.changeSubject(e.target.value)
|
|
877
877
|
})
|
|
878
878
|
})]
|
|
879
879
|
}),
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
value:
|
|
880
|
+
/* @__PURE__ */ Y(ne, {
|
|
881
|
+
value: I ? "preview" : "editor",
|
|
882
882
|
onValueChange: (e) => {
|
|
883
883
|
e && C(e);
|
|
884
884
|
},
|
|
885
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ X(c, {
|
|
886
886
|
surface: "flat",
|
|
887
887
|
padding: "none",
|
|
888
888
|
contentGap: "md",
|
|
889
889
|
titleSize: "sm",
|
|
890
890
|
title: d.body,
|
|
891
|
-
headerAction: /* @__PURE__ */
|
|
891
|
+
headerAction: /* @__PURE__ */ X(te, { children: [/* @__PURE__ */ Y(D, {
|
|
892
892
|
value: "editor",
|
|
893
893
|
disabled: u.body.kind === "html",
|
|
894
894
|
children: d.editor
|
|
895
|
-
}), /* @__PURE__ */
|
|
895
|
+
}), /* @__PURE__ */ Y(D, {
|
|
896
896
|
value: "preview",
|
|
897
897
|
children: d.preview
|
|
898
898
|
})] }),
|
|
899
899
|
children: [
|
|
900
|
-
(!!e.templates || !!r.templates.length ||
|
|
900
|
+
(!!e.templates || !!r.templates.length || L("toolbar").length > 0) && /* @__PURE__ */ X(a, {
|
|
901
901
|
direction: "horizontal",
|
|
902
902
|
gap: "sm",
|
|
903
903
|
align: "center",
|
|
904
904
|
className: "email-composer--message-actions",
|
|
905
905
|
children: [
|
|
906
|
-
(e.templates || !!r.templates.length) && /* @__PURE__ */
|
|
907
|
-
trigger: /* @__PURE__ */
|
|
906
|
+
(e.templates || !!r.templates.length) && /* @__PURE__ */ Y(k, {
|
|
907
|
+
trigger: /* @__PURE__ */ Y(n, {
|
|
908
908
|
type: "button",
|
|
909
909
|
tone: "secondary",
|
|
910
910
|
buttonStyle: "outline",
|
|
@@ -938,7 +938,7 @@ function Ee(e) {
|
|
|
938
938
|
retry: d.retry
|
|
939
939
|
}
|
|
940
940
|
}),
|
|
941
|
-
e.templates?.allowImport && e.templates.onImport && /* @__PURE__ */
|
|
941
|
+
e.templates?.allowImport && e.templates.onImport && /* @__PURE__ */ Y(n, {
|
|
942
942
|
type: "button",
|
|
943
943
|
tone: "secondary",
|
|
944
944
|
buttonStyle: "ghost",
|
|
@@ -949,26 +949,26 @@ function Ee(e) {
|
|
|
949
949
|
},
|
|
950
950
|
children: d.importTemplate
|
|
951
951
|
}),
|
|
952
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ Y(p, {
|
|
953
953
|
size: "sm",
|
|
954
|
-
actions:
|
|
954
|
+
actions: L("toolbar")
|
|
955
955
|
})
|
|
956
956
|
]
|
|
957
957
|
}),
|
|
958
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ Y(O, {
|
|
959
959
|
value: "editor",
|
|
960
960
|
keepMounted: !0,
|
|
961
|
-
children: /* @__PURE__ */
|
|
961
|
+
children: /* @__PURE__ */ Y(we, {
|
|
962
962
|
body: u.body,
|
|
963
|
-
disabled: _ ||
|
|
963
|
+
disabled: _ || I,
|
|
964
964
|
onChange: r.changeBody,
|
|
965
965
|
adapterRef: r.editorRef,
|
|
966
966
|
strings: d
|
|
967
967
|
})
|
|
968
968
|
}),
|
|
969
|
-
/* @__PURE__ */
|
|
969
|
+
/* @__PURE__ */ Y(O, {
|
|
970
970
|
value: "preview",
|
|
971
|
-
children: r.rendered && /* @__PURE__ */
|
|
971
|
+
children: r.rendered && /* @__PURE__ */ Y(Te, {
|
|
972
972
|
html: r.rendered.email.html,
|
|
973
973
|
subject: r.rendered.email.subject,
|
|
974
974
|
strings: d
|
|
@@ -977,49 +977,49 @@ function Ee(e) {
|
|
|
977
977
|
]
|
|
978
978
|
})
|
|
979
979
|
}),
|
|
980
|
-
(!!Object.keys(r.definitions).length || Q(e.placeholders)) && /* @__PURE__ */
|
|
980
|
+
(!!Object.keys(r.definitions).length || Q(e.placeholders)) && /* @__PURE__ */ Y(v, {
|
|
981
981
|
value: w ? ["variables"] : [],
|
|
982
982
|
onValueChange: (e) => T(e.includes("variables")),
|
|
983
983
|
items: [{
|
|
984
984
|
value: "variables",
|
|
985
985
|
title: d.variables,
|
|
986
986
|
description: d.variablesDescription,
|
|
987
|
-
content: Q(e.placeholders) ? /* @__PURE__ */
|
|
987
|
+
content: Q(e.placeholders) ? /* @__PURE__ */ Y(ve, {
|
|
988
988
|
state: e.placeholders,
|
|
989
989
|
label: d.loadingVariables,
|
|
990
990
|
retryLabel: d.retry,
|
|
991
991
|
report: r.report
|
|
992
|
-
}) : /* @__PURE__ */
|
|
992
|
+
}) : /* @__PURE__ */ Y(Se, {
|
|
993
993
|
definitions: r.definitions,
|
|
994
994
|
values: r.values,
|
|
995
995
|
draft: u,
|
|
996
996
|
api: i,
|
|
997
997
|
strings: d,
|
|
998
998
|
busy: _,
|
|
999
|
-
editable: !
|
|
999
|
+
editable: !I
|
|
1000
1000
|
})
|
|
1001
1001
|
}]
|
|
1002
1002
|
}),
|
|
1003
|
-
u.body.kind === "html" && /* @__PURE__ */
|
|
1003
|
+
u.body.kind === "html" && /* @__PURE__ */ Y(n, {
|
|
1004
1004
|
type: "button",
|
|
1005
1005
|
tone: "secondary",
|
|
1006
1006
|
buttonStyle: "outline",
|
|
1007
1007
|
disabled: _,
|
|
1008
|
-
onClick: () =>
|
|
1008
|
+
onClick: () => P(!0),
|
|
1009
1009
|
children: d.convert
|
|
1010
1010
|
}),
|
|
1011
|
-
(r.error || !r.dataPending && r.renderError) && /* @__PURE__ */
|
|
1011
|
+
(r.error || !r.dataPending && r.renderError) && /* @__PURE__ */ X(s, {
|
|
1012
1012
|
tone: "destructive",
|
|
1013
|
-
children: [/* @__PURE__ */
|
|
1013
|
+
children: [/* @__PURE__ */ Y(l, { children: d.errorTitle }), /* @__PURE__ */ Y(o, { children: r.error || r.renderError })]
|
|
1014
1014
|
}),
|
|
1015
|
-
r.notice && /* @__PURE__ */
|
|
1015
|
+
r.notice && /* @__PURE__ */ Y(s, {
|
|
1016
1016
|
tone: "success",
|
|
1017
1017
|
role: "status",
|
|
1018
|
-
children: /* @__PURE__ */
|
|
1018
|
+
children: /* @__PURE__ */ Y(o, { children: r.notice })
|
|
1019
1019
|
}),
|
|
1020
1020
|
e.children?.(i)
|
|
1021
1021
|
]
|
|
1022
|
-
}),
|
|
1022
|
+
}), V = e.title ?? d.title, H = e.onClose ? /* @__PURE__ */ Y(n, {
|
|
1023
1023
|
type: "button",
|
|
1024
1024
|
iconOnly: !0,
|
|
1025
1025
|
tone: "secondary",
|
|
@@ -1028,12 +1028,12 @@ function Ee(e) {
|
|
|
1028
1028
|
disabled: _,
|
|
1029
1029
|
"aria-label": d.close,
|
|
1030
1030
|
onClick: e.onClose,
|
|
1031
|
-
children: /* @__PURE__ */
|
|
1032
|
-
}) : void 0,
|
|
1031
|
+
children: /* @__PURE__ */ Y(de, { className: "size-icon" })
|
|
1032
|
+
}) : void 0, U, G = t("email-composer--component min-w-0", e.className);
|
|
1033
1033
|
if (e.position === "dialog" || e.position === "sheet") {
|
|
1034
1034
|
let t = {
|
|
1035
1035
|
open: !0,
|
|
1036
|
-
title:
|
|
1036
|
+
title: V,
|
|
1037
1037
|
description: e.description,
|
|
1038
1038
|
onOpenChange: (t) => {
|
|
1039
1039
|
!t && !_ && e.onClose?.();
|
|
@@ -1045,42 +1045,42 @@ function Ee(e) {
|
|
|
1045
1045
|
showCancel: !1,
|
|
1046
1046
|
showConfirm: !1,
|
|
1047
1047
|
showCloseButton: !!e.onClose && !_,
|
|
1048
|
-
footer:
|
|
1049
|
-
className:
|
|
1048
|
+
footer: R,
|
|
1049
|
+
className: G
|
|
1050
1050
|
};
|
|
1051
|
-
|
|
1051
|
+
U = e.position === "dialog" ? /* @__PURE__ */ Y(h, {
|
|
1052
1052
|
...t,
|
|
1053
1053
|
size: "3xl",
|
|
1054
1054
|
showCloseButton: !!e.onClose && !_,
|
|
1055
|
-
children:
|
|
1056
|
-
}) : /* @__PURE__ */
|
|
1055
|
+
children: B
|
|
1056
|
+
}) : /* @__PURE__ */ Y(m, {
|
|
1057
1057
|
...t,
|
|
1058
1058
|
width: "3xl",
|
|
1059
|
-
children:
|
|
1059
|
+
children: B
|
|
1060
1060
|
});
|
|
1061
1061
|
} else {
|
|
1062
|
-
let t = /* @__PURE__ */
|
|
1063
|
-
className:
|
|
1062
|
+
let t = /* @__PURE__ */ Y(c, {
|
|
1063
|
+
className: G,
|
|
1064
1064
|
surface: "card",
|
|
1065
|
-
title:
|
|
1065
|
+
title: V,
|
|
1066
1066
|
description: e.description,
|
|
1067
|
-
headerAction:
|
|
1068
|
-
headerClassName: e.position === "floating" &&
|
|
1069
|
-
footerSlot:
|
|
1070
|
-
children:
|
|
1067
|
+
headerAction: H,
|
|
1068
|
+
headerClassName: e.position === "floating" && H ? "flex-nowrap [&>.card--header-start]:basis-0 [&>.card--header-end]:shrink-0" : void 0,
|
|
1069
|
+
footerSlot: R,
|
|
1070
|
+
children: B
|
|
1071
1071
|
});
|
|
1072
|
-
|
|
1072
|
+
U = e.position === "floating" ? /* @__PURE__ */ Y("div", {
|
|
1073
1073
|
className: "fixed bottom-space-md end-space-md z-40 w-[min(42rem,calc(100vw-2rem))]",
|
|
1074
|
-
children: /* @__PURE__ */
|
|
1074
|
+
children: /* @__PURE__ */ Y(ee, {
|
|
1075
1075
|
className: "max-h-[calc(100dvh-2rem)]",
|
|
1076
1076
|
viewportClassName: "max-h-[calc(100dvh-2rem)]",
|
|
1077
1077
|
children: t
|
|
1078
1078
|
})
|
|
1079
1079
|
}) : t;
|
|
1080
1080
|
}
|
|
1081
|
-
return /* @__PURE__ */
|
|
1082
|
-
open:
|
|
1083
|
-
onOpenChange:
|
|
1081
|
+
return /* @__PURE__ */ X(J, { children: [U, /* @__PURE__ */ Y(g, {
|
|
1082
|
+
open: N,
|
|
1083
|
+
onOpenChange: P,
|
|
1084
1084
|
title: d.convertTitle,
|
|
1085
1085
|
description: d.convertDescription,
|
|
1086
1086
|
strings: {
|
|
@@ -1094,6 +1094,6 @@ function Ee(e) {
|
|
|
1094
1094
|
})] });
|
|
1095
1095
|
}
|
|
1096
1096
|
//#endregion
|
|
1097
|
-
export { Ee as EmailComposer,
|
|
1097
|
+
export { Ee as EmailComposer, P as bodyHtml, V as createHttpSender, H as defaultEmailComposerStrings, z as parseRecipient, F as recipientLabel, N as renderEmail, R as resolveValues, B as validate };
|
|
1098
1098
|
|
|
1099
1099
|
//# sourceMappingURL=email-composer.js.map
|