create-nextjs-cms 0.5.21 → 0.5.24
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/package.json +3 -5
- package/templates/default/_gitignore +1 -1
- package/templates/default/app/(auth)/auth/login/LoginPage.tsx +5 -5
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/LICENSE +191 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/README.md +118 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/install/build.js +38 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/install/check.js +14 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/channel.js +177 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/colour.js +195 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/composite.js +212 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/constructor.js +499 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/index.d.ts +1971 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/index.js +16 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/input.js +809 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/is.js +143 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/libvips.js +207 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/operation.js +1016 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/output.js +1666 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/resize.js +595 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/sharp.js +121 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/lib/utility.js +291 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/package.json +202 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/binding.gyp +298 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/common.cc +1130 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/common.h +402 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/metadata.cc +346 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/metadata.h +90 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/operations.cc +499 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/operations.h +137 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/pipeline.cc +1814 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/pipeline.h +408 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/sharp.cc +43 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/stats.cc +186 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/stats.h +62 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/utilities.cc +288 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/sharp/src/utilities.h +22 -0
- package/templates/default/apps/cms/node_modules/sharp/LICENSE +191 -0
- package/templates/default/apps/cms/node_modules/sharp/README.md +118 -0
- package/templates/default/apps/cms/node_modules/sharp/install/check.js +41 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/channel.js +174 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/colour.js +180 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/composite.js +210 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/constructor.js +452 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/index.d.ts +1754 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/index.js +16 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/input.js +658 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/is.js +169 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/libvips.js +203 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/operation.js +958 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/output.js +1587 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/resize.js +587 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/sharp.js +114 -0
- package/templates/default/apps/cms/node_modules/sharp/lib/utility.js +296 -0
- package/templates/default/apps/cms/node_modules/sharp/package.json +222 -0
- package/templates/default/apps/cms/node_modules/sharp/src/binding.gyp +280 -0
- package/templates/default/apps/cms/node_modules/sharp/src/common.cc +1091 -0
- package/templates/default/apps/cms/node_modules/sharp/src/common.h +393 -0
- package/templates/default/apps/cms/node_modules/sharp/src/metadata.cc +320 -0
- package/templates/default/apps/cms/node_modules/sharp/src/metadata.h +85 -0
- package/templates/default/apps/cms/node_modules/sharp/src/operations.cc +475 -0
- package/templates/default/apps/cms/node_modules/sharp/src/operations.h +125 -0
- package/templates/default/apps/cms/node_modules/sharp/src/pipeline.cc +1758 -0
- package/templates/default/apps/cms/node_modules/sharp/src/pipeline.h +393 -0
- package/templates/default/apps/cms/node_modules/sharp/src/sharp.cc +40 -0
- package/templates/default/apps/cms/node_modules/sharp/src/stats.cc +183 -0
- package/templates/default/apps/cms/node_modules/sharp/src/stats.h +59 -0
- package/templates/default/apps/cms/node_modules/sharp/src/utilities.cc +269 -0
- package/templates/default/apps/cms/node_modules/sharp/src/utilities.h +19 -0
- package/templates/default/components/AdminCard.tsx +1 -1
- package/templates/default/components/AdminsPage.tsx +1 -1
- package/templates/default/components/AdvancedSettingsPage.tsx +1 -1
- package/templates/default/components/AnalyticsPage.tsx +1 -1
- package/templates/default/components/BrowsePage.tsx +2 -2
- package/templates/default/components/CategorizedSectionPage.tsx +3 -3
- package/templates/default/components/CategoryDeleteConfirmPage.tsx +4 -4
- package/templates/default/components/CategorySectionSelectInput.tsx +1 -1
- package/templates/default/components/ContainerBox.tsx +1 -1
- package/templates/default/components/DashboardPage.tsx +1 -1
- package/templates/default/components/EmailCard.tsx +1 -1
- package/templates/default/components/EmailPasswordForm.tsx +2 -2
- package/templates/default/components/EmailQuotaForm.tsx +1 -1
- package/templates/default/components/EmailsPage.tsx +1 -1
- package/templates/default/components/GalleryPhoto.tsx +1 -1
- package/templates/default/components/ItemEditPage.tsx +2 -2
- package/templates/default/components/Layout.tsx +1 -1
- package/templates/default/components/LogPage.tsx +1 -1
- package/templates/default/components/Navbar.tsx +2 -2
- package/templates/default/components/NavbarAlt.tsx +6 -6
- package/templates/default/components/NewAdminForm.tsx +2 -2
- package/templates/default/components/NewEmailForm.tsx +3 -3
- package/templates/default/components/NewPage.tsx +2 -2
- package/templates/default/components/NewVariantComponent.tsx +1 -1
- package/templates/default/components/ProgressBar.tsx +46 -22
- package/templates/default/components/SectionItemCard.tsx +1 -1
- package/templates/default/components/SectionItemStatusBadge.tsx +1 -1
- package/templates/default/components/SectionPage.tsx +2 -2
- package/templates/default/components/SelectBox.tsx +2 -2
- package/templates/default/components/SettingsPage.tsx +1 -1
- package/templates/default/components/Sidebar.tsx +3 -3
- package/templates/default/components/VariantEditPage.tsx +2 -2
- package/templates/default/components/form/DateRangeFormInput.tsx +8 -6
- package/templates/default/components/form/Form.tsx +1 -1
- package/templates/default/components/form/FormInputElement.tsx +1 -1
- package/templates/default/components/form/helpers/{_section-hot-reload.ts → _section-hot-reload.js} +1 -1
- package/templates/default/components/form/helpers/util.ts +1 -1
- package/templates/default/components/form/inputs/ColorFormInput.tsx +1 -1
- package/templates/default/components/form/inputs/DateFormInput.tsx +82 -34
- package/templates/default/components/form/inputs/DocumentFormInput.tsx +3 -3
- package/templates/default/components/form/inputs/MultipleSelectFormInput.tsx +40 -107
- package/templates/default/components/form/inputs/NumberFormInput.tsx +1 -1
- package/templates/default/components/form/inputs/PasswordFormInput.tsx +1 -1
- package/templates/default/components/form/inputs/PhotoFormInput.tsx +4 -4
- package/templates/default/components/form/inputs/RichTextFormInput.tsx +2 -0
- package/templates/default/components/form/inputs/SelectFormInput.tsx +1 -1
- package/templates/default/components/form/inputs/TagsFormInput.tsx +115 -26
- package/templates/default/components/form/inputs/TextFormInput.tsx +1 -1
- package/templates/default/components/form/inputs/TextareaFormInput.tsx +1 -1
- package/templates/default/components/form/inputs/VideoFormInput.tsx +3 -3
- package/templates/default/components/multi-select.tsx +1144 -0
- package/templates/default/components/ui/badge.tsx +16 -12
- package/templates/default/components/ui/button.tsx +35 -30
- package/templates/default/components/ui/calendar.tsx +145 -47
- package/templates/default/components/ui/card.tsx +1 -1
- package/templates/default/components/ui/checkbox.tsx +1 -1
- package/templates/default/components/ui/command.tsx +184 -0
- package/templates/default/components/ui/dialog.tsx +143 -0
- package/templates/default/components/ui/dropdown-menu.tsx +6 -6
- package/templates/default/components/ui/input.tsx +1 -1
- package/templates/default/components/ui/popover.tsx +39 -22
- package/templates/default/components/ui/progress.tsx +31 -0
- package/templates/default/components/ui/scroll-area.tsx +2 -2
- package/templates/default/components/ui/select.tsx +150 -149
- package/templates/default/components/ui/separator.tsx +28 -0
- package/templates/default/components/ui/sheet.tsx +1 -1
- package/templates/default/components/ui/switch.tsx +1 -1
- package/templates/default/components/ui/table.tsx +3 -3
- package/templates/default/components/ui/tabs.tsx +2 -2
- package/templates/default/components/ui/toast.tsx +4 -4
- package/templates/default/components.json +8 -3
- package/templates/default/{postinstall.js → lib/postinstall.js} +1 -1
- package/templates/default/lib/utils.ts +6 -0
- package/templates/default/package.json +27 -47
- package/templates/default/postcss.config.mjs +7 -0
- package/templates/default/public/tinymce/CHANGELOG.md +155 -0
- package/templates/default/public/tinymce/README.md +12 -12
- package/templates/default/public/tinymce/bower.json +1 -1
- package/templates/default/public/tinymce/composer.json +2 -2
- package/templates/default/public/tinymce/icons/default/icons.js +40 -32
- package/templates/default/public/tinymce/icons/default/icons.min.js +1 -1
- package/templates/default/public/tinymce/license.md +7 -4
- package/templates/default/public/tinymce/models/dom/model.js +36 -50
- package/templates/default/public/tinymce/models/dom/model.min.js +1 -1
- package/templates/default/public/tinymce/notices.txt +2 -2
- package/templates/default/public/tinymce/package.json +2 -2
- package/templates/default/public/tinymce/plugins/accordion/plugin.js +45 -21
- package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/advlist/plugin.js +8 -6
- package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/anchor/plugin.js +1 -1
- package/templates/default/public/tinymce/plugins/autolink/plugin.js +3 -6
- package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/autoresize/plugin.js +4 -6
- package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/autosave/plugin.js +4 -7
- package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/charmap/plugin.js +8 -8
- package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/code/plugin.js +3 -2
- package/templates/default/public/tinymce/plugins/code/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/codesample/plugin.js +11 -10
- package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +2 -2
- package/templates/default/public/tinymce/plugins/directionality/plugin.js +9 -11
- package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/emoticons/plugin.js +7 -7
- package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +11 -13
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he-IL.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th-TH.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +87 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +93 -0
- package/templates/default/public/tinymce/plugins/help/plugin.js +15 -17
- package/templates/default/public/tinymce/plugins/help/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/image/plugin.js +34 -32
- package/templates/default/public/tinymce/plugins/image/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/importcss/plugin.js +4 -6
- package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +4 -3
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/link/plugin.js +170 -38
- package/templates/default/public/tinymce/plugins/link/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/lists/plugin.js +111 -2053
- package/templates/default/public/tinymce/plugins/lists/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/media/plugin.js +15 -23
- package/templates/default/public/tinymce/plugins/media/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +1 -1
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +1 -1
- package/templates/default/public/tinymce/plugins/preview/plugin.js +88 -10
- package/templates/default/public/tinymce/plugins/preview/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/quickbars/plugin.js +9 -9
- package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/save/plugin.js +1 -1
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +10 -13
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/table/plugin.js +13 -24
- package/templates/default/public/tinymce/plugins/table/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +1 -1
- package/templates/default/public/tinymce/plugins/visualchars/plugin.js +9 -10
- package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +1 -1
- package/templates/default/public/tinymce/plugins/wordcount/plugin.js +1 -1
- package/templates/default/public/tinymce/skins/content/dark/content.min.ts +3 -0
- package/templates/default/public/tinymce/skins/content/dark/content.ts +3 -0
- package/templates/default/public/tinymce/skins/content/default/content.min.ts +3 -0
- package/templates/default/public/tinymce/skins/content/default/content.ts +3 -0
- package/templates/default/public/tinymce/skins/content/document/content.min.ts +3 -0
- package/templates/default/public/tinymce/skins/content/document/content.ts +3 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.ts +3 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.ts +3 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.ts +3 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.ts +3 -0
- package/templates/default/public/tinymce/skins/content/writer/content.min.ts +3 -0
- package/templates/default/public/tinymce/skins/content/writer/content.ts +3 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.css +144 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +144 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.js +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.css +923 -449
- package/templates/default/public/tinymce/skins/ui/oxide/skin.js +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.ts +507 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.ts +507 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +144 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +144 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +926 -452
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.ts +507 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.ts +507 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +144 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +144 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +924 -450
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.ts +508 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.ts +508 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +144 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +144 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.ts +116 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +925 -451
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.ts +508 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.ts +9 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.ts +508 -0
- package/templates/default/public/tinymce/themes/silver/theme.js +543 -593
- package/templates/default/public/tinymce/themes/silver/theme.min.js +1 -1
- package/templates/default/public/tinymce/tinymce.d.ts +559 -496
- package/templates/default/public/tinymce/tinymce.js +6788 -3964
- package/templates/default/public/tinymce/tinymce.min.js +3 -4
- package/templates/default/styles/globals.css +131 -3
- package/templates/default/tsconfig.json +1 -0
- package/templates/default/.prettierrc.json +0 -19
- package/templates/default/postcss.config.js +0 -6
- package/templates/default/tailwind.config.js +0 -95
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 8.3.1 (2025-12-17)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -8,13 +8,12 @@
|
|
|
8
8
|
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
9
9
|
const getPrototypeOf$2 = Object.getPrototypeOf;
|
|
10
10
|
const hasProto = (v, constructor, predicate) => {
|
|
11
|
-
var _a;
|
|
12
11
|
if (predicate(v, constructor.prototype)) {
|
|
13
12
|
return true;
|
|
14
13
|
}
|
|
15
14
|
else {
|
|
16
15
|
// String-based fallback time
|
|
17
|
-
return
|
|
16
|
+
return v.constructor?.name === constructor.name;
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
const typeOf = (x) => {
|
|
@@ -80,7 +79,6 @@
|
|
|
80
79
|
const tripleEquals = (a, b) => {
|
|
81
80
|
return a === b;
|
|
82
81
|
};
|
|
83
|
-
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
|
84
82
|
function curry(fn, ...initialArgs) {
|
|
85
83
|
return (...restArgs) => {
|
|
86
84
|
const all = initialArgs.concat(restArgs);
|
|
@@ -115,6 +113,11 @@
|
|
|
115
113
|
* strict-null-checks
|
|
116
114
|
*/
|
|
117
115
|
class Optional {
|
|
116
|
+
tag;
|
|
117
|
+
value;
|
|
118
|
+
// Sneaky optimisation: every instance of Optional.none is identical, so just
|
|
119
|
+
// reuse the same object
|
|
120
|
+
static singletonNone = new Optional(false);
|
|
118
121
|
// The internal representation has a `tag` and a `value`, but both are
|
|
119
122
|
// private: able to be console.logged, but not able to be accessed by code
|
|
120
123
|
constructor(tag, value) {
|
|
@@ -282,7 +285,7 @@
|
|
|
282
285
|
*/
|
|
283
286
|
getOrDie(message) {
|
|
284
287
|
if (!this.tag) {
|
|
285
|
-
throw new Error(message
|
|
288
|
+
throw new Error(message ?? 'Called getOrDie on None');
|
|
286
289
|
}
|
|
287
290
|
else {
|
|
288
291
|
return this.value;
|
|
@@ -346,15 +349,10 @@
|
|
|
346
349
|
return this.tag ? `some(${this.value})` : 'none()';
|
|
347
350
|
}
|
|
348
351
|
}
|
|
349
|
-
// Sneaky optimisation: every instance of Optional.none is identical, so just
|
|
350
|
-
// reuse the same object
|
|
351
|
-
Optional.singletonNone = new Optional(false);
|
|
352
352
|
|
|
353
|
-
/* eslint-disable @typescript-eslint/unbound-method */
|
|
354
353
|
const nativeSlice = Array.prototype.slice;
|
|
355
354
|
const nativeIndexOf = Array.prototype.indexOf;
|
|
356
355
|
const nativePush = Array.prototype.push;
|
|
357
|
-
/* eslint-enable */
|
|
358
356
|
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
|
359
357
|
const indexOf = (xs, x) => {
|
|
360
358
|
// The rawIndexOf method does not wrap up in an option. This is for performance reasons.
|
|
@@ -538,7 +536,6 @@
|
|
|
538
536
|
//
|
|
539
537
|
// Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
|
|
540
538
|
const keys = Object.keys;
|
|
541
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
542
539
|
const hasOwnProperty = Object.hasOwnProperty;
|
|
543
540
|
const each = (obj, f) => {
|
|
544
541
|
const props = keys(obj);
|
|
@@ -1573,7 +1570,7 @@
|
|
|
1573
1570
|
const detectBrowser$1 = (browsers, userAgentData) => {
|
|
1574
1571
|
return findMap(userAgentData.brands, (uaBrand) => {
|
|
1575
1572
|
const lcBrand = uaBrand.brand.toLowerCase();
|
|
1576
|
-
return find$5(browsers, (browser) =>
|
|
1573
|
+
return find$5(browsers, (browser) => lcBrand === browser.brand?.toLowerCase())
|
|
1577
1574
|
.map((info) => ({
|
|
1578
1575
|
current: info.name,
|
|
1579
1576
|
version: Version.nu(parseInt(uaBrand.version, 10), 0)
|
|
@@ -1899,6 +1896,7 @@
|
|
|
1899
1896
|
return ret;
|
|
1900
1897
|
};
|
|
1901
1898
|
const offsetParent = (element) => Optional.from(element.dom.offsetParent).map(SugarElement.fromDom);
|
|
1899
|
+
const prevSibling = (element) => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);
|
|
1902
1900
|
const nextSibling = (element) => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);
|
|
1903
1901
|
const children = (element) => map$2(element.dom.childNodes, SugarElement.fromDom);
|
|
1904
1902
|
const child$2 = (element, index) => {
|
|
@@ -2210,9 +2208,7 @@
|
|
|
2210
2208
|
|
|
2211
2209
|
// some elements, such as mathml, don't have style attributes
|
|
2212
2210
|
// others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration
|
|
2213
|
-
const isSupported = (dom) =>
|
|
2214
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
2215
|
-
dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
2211
|
+
const isSupported = (dom) => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
2216
2212
|
|
|
2217
2213
|
// Node.contains() is very, very, very good performance
|
|
2218
2214
|
// http://jsperf.com/closest-vs-contains/5
|
|
@@ -2439,17 +2435,13 @@
|
|
|
2439
2435
|
const isHidden$1 = (dom) => dom.offsetWidth <= 0 && dom.offsetHeight <= 0;
|
|
2440
2436
|
const isVisible = (element) => !isHidden$1(element.dom);
|
|
2441
2437
|
|
|
2442
|
-
const api$1 = Dimension('width', (element) =>
|
|
2443
|
-
// IMO passing this function is better than using dom['offset' + 'width']
|
|
2444
|
-
element.dom.offsetWidth);
|
|
2445
|
-
const apiExact = Dimension('width', (element) => {
|
|
2438
|
+
const api$1 = Dimension('width', (element) => {
|
|
2446
2439
|
const dom = element.dom;
|
|
2447
2440
|
return inBody(element) ? dom.getBoundingClientRect().width : dom.offsetWidth;
|
|
2448
2441
|
});
|
|
2449
2442
|
const set$6 = (element, h) => api$1.set(element, h);
|
|
2450
2443
|
const get$c = (element) => api$1.get(element);
|
|
2451
2444
|
const getOuter = (element) => api$1.getOuter(element);
|
|
2452
|
-
const getOuterExact = (element) => apiExact.getOuter(element);
|
|
2453
2445
|
const setMax = (element, value) => {
|
|
2454
2446
|
// These properties affect the absolute max-height, they are not counted natively, we want to include these properties.
|
|
2455
2447
|
const inclusions = ['margin-left', 'border-left-width', 'padding-left', 'padding-right', 'border-right-width', 'margin-right'];
|
|
@@ -2489,8 +2481,8 @@
|
|
|
2489
2481
|
if (body === element.dom) {
|
|
2490
2482
|
return SugarPosition(body.offsetLeft, body.offsetTop);
|
|
2491
2483
|
}
|
|
2492
|
-
const scrollTop = firstDefinedOrZero(win
|
|
2493
|
-
const scrollLeft = firstDefinedOrZero(win
|
|
2484
|
+
const scrollTop = firstDefinedOrZero(win?.pageYOffset, html.scrollTop);
|
|
2485
|
+
const scrollLeft = firstDefinedOrZero(win?.pageXOffset, html.scrollLeft);
|
|
2494
2486
|
const clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);
|
|
2495
2487
|
const clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);
|
|
2496
2488
|
return viewport$1(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);
|
|
@@ -2999,10 +2991,9 @@
|
|
|
2999
2991
|
};
|
|
3000
2992
|
|
|
3001
2993
|
const view = (doc) => {
|
|
3002
|
-
var _a;
|
|
3003
2994
|
// Only walk up to the document this script is defined in.
|
|
3004
2995
|
// This prevents walking up to the parent window when the editor is in an iframe.
|
|
3005
|
-
const element = doc.dom === document ? Optional.none() : Optional.from(
|
|
2996
|
+
const element = doc.dom === document ? Optional.none() : Optional.from(doc.dom.defaultView?.frameElement);
|
|
3006
2997
|
return element.map(SugarElement.fromDom);
|
|
3007
2998
|
};
|
|
3008
2999
|
const owner$3 = (element) => owner$4(element);
|
|
@@ -3283,7 +3274,9 @@
|
|
|
3283
3274
|
}
|
|
3284
3275
|
};
|
|
3285
3276
|
|
|
3286
|
-
const mergeValues$1 = (values, base) =>
|
|
3277
|
+
const mergeValues$1 = (values, base) => {
|
|
3278
|
+
return SimpleResult.svalue(deepMerge(base, merge$1.apply(undefined, values)));
|
|
3279
|
+
};
|
|
3287
3280
|
const mergeErrors$1 = (errors) => compose(SimpleResult.serror, flatten)(errors);
|
|
3288
3281
|
const consolidateObj = (objects, base) => {
|
|
3289
3282
|
const partition = SimpleResult.partition(objects);
|
|
@@ -3513,6 +3506,7 @@
|
|
|
3513
3506
|
const optionNumber = (key) => optionOf(key, number);
|
|
3514
3507
|
const optionString = (key) => optionOf(key, string);
|
|
3515
3508
|
const optionStringEnum = (key, values) => optionOf(key, validateEnum(values));
|
|
3509
|
+
const optionBoolean = (key) => optionOf(key, boolean);
|
|
3516
3510
|
const optionFunction = (key) => optionOf(key, functionProcessor);
|
|
3517
3511
|
const optionArrayOf = (key, schema) => optionOf(key, arrOf(schema));
|
|
3518
3512
|
const optionObjOf = (key, objSchema) => optionOf(key, objOf(objSchema));
|
|
@@ -4902,6 +4896,11 @@
|
|
|
4902
4896
|
const RIGHT = [39];
|
|
4903
4897
|
const DOWN = [40];
|
|
4904
4898
|
|
|
4899
|
+
const closeTooltips = constant$1('tooltipping.close.all');
|
|
4900
|
+
const dismissPopups = constant$1('dismiss.popups');
|
|
4901
|
+
const repositionPopups = constant$1('reposition.popups');
|
|
4902
|
+
const mouseReleased = constant$1('mouse.released');
|
|
4903
|
+
|
|
4905
4904
|
const cyclePrev = (values, index, predicate) => {
|
|
4906
4905
|
const before = reverse(values.slice(0, index));
|
|
4907
4906
|
const after = reverse(values.slice(index + 1));
|
|
@@ -5231,7 +5230,19 @@
|
|
|
5231
5230
|
const goFromPseudoTabstop = (component, simulatedEvent, tabbingConfig) => findCurrent(component, tabbingConfig).filter((elem) => !tabbingConfig.useTabstopAt(elem))
|
|
5232
5231
|
.bind((elem) => (isFirstChild(elem) ? goBackwards : goForwards)(component, simulatedEvent, tabbingConfig));
|
|
5233
5232
|
const execute = (component, simulatedEvent, tabbingConfig) => tabbingConfig.onEnter.bind((f) => f(component, simulatedEvent));
|
|
5234
|
-
const exit = (component, simulatedEvent, tabbingConfig) =>
|
|
5233
|
+
const exit = (component, simulatedEvent, tabbingConfig) => {
|
|
5234
|
+
component.getSystem().broadcastOn([closeTooltips()], {
|
|
5235
|
+
closedTooltip: () => {
|
|
5236
|
+
simulatedEvent.stop();
|
|
5237
|
+
}
|
|
5238
|
+
});
|
|
5239
|
+
if (!simulatedEvent.isStopped()) {
|
|
5240
|
+
return tabbingConfig.onEscape.bind((f) => f(component, simulatedEvent));
|
|
5241
|
+
}
|
|
5242
|
+
else {
|
|
5243
|
+
return Optional.none();
|
|
5244
|
+
}
|
|
5245
|
+
};
|
|
5235
5246
|
const getKeydownRules = constant$1([
|
|
5236
5247
|
rule(and([isShift$1, inSet(TAB)]), goBackwards),
|
|
5237
5248
|
rule(inSet(TAB), goForwards),
|
|
@@ -5267,7 +5278,7 @@
|
|
|
5267
5278
|
// keyup also. This does make the name confusing, though.
|
|
5268
5279
|
const stopEventForFirefox = (_component, _simulatedEvent) => Optional.some(true);
|
|
5269
5280
|
|
|
5270
|
-
const schema$
|
|
5281
|
+
const schema$y = [
|
|
5271
5282
|
defaulted('execute', defaultExecute),
|
|
5272
5283
|
defaulted('useSpace', false),
|
|
5273
5284
|
defaulted('useEnter', true),
|
|
@@ -5289,7 +5300,7 @@
|
|
|
5289
5300
|
const getKeyupRules$5 = (component, _simulatedEvent, executeConfig, _executeState) => executeConfig.useSpace && !inside(component.element) ?
|
|
5290
5301
|
[rule(inSet(SPACE), stopEventForFirefox)] :
|
|
5291
5302
|
[];
|
|
5292
|
-
var ExecutionType = typical(schema$
|
|
5303
|
+
var ExecutionType = typical(schema$y, NoState.init, getKeydownRules$5, getKeyupRules$5, () => Optional.none());
|
|
5293
5304
|
|
|
5294
5305
|
const flatgrid$1 = () => {
|
|
5295
5306
|
const dimensions = value$2();
|
|
@@ -5390,7 +5401,7 @@
|
|
|
5390
5401
|
const cycleUp$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, -1);
|
|
5391
5402
|
const cycleDown$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, +1);
|
|
5392
5403
|
|
|
5393
|
-
const schema$
|
|
5404
|
+
const schema$x = [
|
|
5394
5405
|
required$1('selector'),
|
|
5395
5406
|
defaulted('execute', defaultExecute),
|
|
5396
5407
|
onKeyboardHandler('onEscape'),
|
|
@@ -5427,7 +5438,7 @@
|
|
|
5427
5438
|
rule(inSet(ESCAPE), doEscape$1),
|
|
5428
5439
|
rule(inSet(SPACE), stopEventForFirefox)
|
|
5429
5440
|
]);
|
|
5430
|
-
var FlatgridType = typical(schema$
|
|
5441
|
+
var FlatgridType = typical(schema$x, flatgrid$1, getKeydownRules$4, getKeyupRules$4, () => Optional.some(focusIn$4));
|
|
5431
5442
|
|
|
5432
5443
|
const f = (container, selector, current, delta, getNewIndex) => {
|
|
5433
5444
|
const isDisabledButton = (candidate) => name$3(candidate) === 'button' && get$g(candidate, 'disabled') === 'disabled';
|
|
@@ -5451,7 +5462,7 @@
|
|
|
5451
5462
|
return newIndex === prevIndex ? Optional.none() : onNewIndex(newIndex);
|
|
5452
5463
|
});
|
|
5453
5464
|
|
|
5454
|
-
const schema$
|
|
5465
|
+
const schema$w = [
|
|
5455
5466
|
required$1('selector'),
|
|
5456
5467
|
defaulted('getInitial', Optional.none),
|
|
5457
5468
|
defaulted('execute', defaultExecute),
|
|
@@ -5490,7 +5501,7 @@
|
|
|
5490
5501
|
rule(inSet(SPACE), stopEventForFirefox),
|
|
5491
5502
|
rule(inSet(ESCAPE), doEscape)
|
|
5492
5503
|
]);
|
|
5493
|
-
var FlowType = typical(schema$
|
|
5504
|
+
var FlowType = typical(schema$w, NoState.init, getKeydownRules$3, getKeyupRules$3, () => Optional.some(focusIn$3));
|
|
5494
5505
|
|
|
5495
5506
|
const toCell = (matrix, rowIndex, columnIndex) => Optional.from(matrix[rowIndex]).bind((row) => Optional.from(row[columnIndex]).map((cell) => ({
|
|
5496
5507
|
rowIndex,
|
|
@@ -5531,7 +5542,7 @@
|
|
|
5531
5542
|
const moveUp$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, -1);
|
|
5532
5543
|
const moveDown$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, +1);
|
|
5533
5544
|
|
|
5534
|
-
const schema$
|
|
5545
|
+
const schema$v = [
|
|
5535
5546
|
requiredObjOf('selectors', [
|
|
5536
5547
|
required$1('row'),
|
|
5537
5548
|
required$1('cell')
|
|
@@ -5580,9 +5591,9 @@
|
|
|
5580
5591
|
const getKeyupRules$2 = constant$1([
|
|
5581
5592
|
rule(inSet(SPACE), stopEventForFirefox)
|
|
5582
5593
|
]);
|
|
5583
|
-
var MatrixType = typical(schema$
|
|
5594
|
+
var MatrixType = typical(schema$v, NoState.init, getKeydownRules$2, getKeyupRules$2, () => Optional.some(focusIn$2));
|
|
5584
5595
|
|
|
5585
|
-
const schema$
|
|
5596
|
+
const schema$u = [
|
|
5586
5597
|
required$1('selector'),
|
|
5587
5598
|
defaulted('execute', defaultExecute),
|
|
5588
5599
|
defaulted('moveOnTab', false)
|
|
@@ -5609,9 +5620,9 @@
|
|
|
5609
5620
|
const getKeyupRules$1 = constant$1([
|
|
5610
5621
|
rule(inSet(SPACE), stopEventForFirefox)
|
|
5611
5622
|
]);
|
|
5612
|
-
var MenuType = typical(schema$
|
|
5623
|
+
var MenuType = typical(schema$u, NoState.init, getKeydownRules$1, getKeyupRules$1, () => Optional.some(focusIn$1));
|
|
5613
5624
|
|
|
5614
|
-
const schema$
|
|
5625
|
+
const schema$t = [
|
|
5615
5626
|
onKeyboardHandler('onSpace'),
|
|
5616
5627
|
onKeyboardHandler('onEnter'),
|
|
5617
5628
|
onKeyboardHandler('onShiftEnter'),
|
|
@@ -5641,7 +5652,7 @@
|
|
|
5641
5652
|
...(specialInfo.stopSpaceKeyup ? [rule(inSet(SPACE), stopEventForFirefox)] : []),
|
|
5642
5653
|
rule(inSet(ESCAPE), specialInfo.onEscape)
|
|
5643
5654
|
];
|
|
5644
|
-
var SpecialType = typical(schema$
|
|
5655
|
+
var SpecialType = typical(schema$t, NoState.init, getKeydownRules, getKeyupRules, (specialInfo) => specialInfo.focusIn);
|
|
5645
5656
|
|
|
5646
5657
|
const acyclic = AcyclicType.schema();
|
|
5647
5658
|
const cyclic = CyclicType.schema();
|
|
@@ -6279,7 +6290,7 @@
|
|
|
6279
6290
|
};
|
|
6280
6291
|
|
|
6281
6292
|
const baseBehaviour = 'alloy.base.behaviour';
|
|
6282
|
-
const schema$
|
|
6293
|
+
const schema$s = objOf([
|
|
6283
6294
|
field$1('dom', 'dom', required$2(), objOf([
|
|
6284
6295
|
// Note, no children.
|
|
6285
6296
|
required$1('tag'),
|
|
@@ -6308,7 +6319,7 @@
|
|
|
6308
6319
|
}), anyValue()),
|
|
6309
6320
|
option$3('domModification')
|
|
6310
6321
|
]);
|
|
6311
|
-
const toInfo = (spec) => asRaw('custom.definition', schema$
|
|
6322
|
+
const toInfo = (spec) => asRaw('custom.definition', schema$s, spec);
|
|
6312
6323
|
const toDefinition = (detail) =>
|
|
6313
6324
|
// EFFICIENCY: Consider not merging here.
|
|
6314
6325
|
({
|
|
@@ -6360,7 +6371,7 @@
|
|
|
6360
6371
|
const value = definition.value.getOrUndefined();
|
|
6361
6372
|
if (value !== get$5(valueElement)) {
|
|
6362
6373
|
// TINY-8736: Value.set throws an error in case the value is undefined
|
|
6363
|
-
set$4(valueElement, value
|
|
6374
|
+
set$4(valueElement, value ?? '');
|
|
6364
6375
|
}
|
|
6365
6376
|
};
|
|
6366
6377
|
updateAttrs();
|
|
@@ -6392,7 +6403,7 @@
|
|
|
6392
6403
|
const e = reconcileToDom(definition, obsoleted);
|
|
6393
6404
|
return Optional.some(e);
|
|
6394
6405
|
}
|
|
6395
|
-
catch
|
|
6406
|
+
catch {
|
|
6396
6407
|
return Optional.none();
|
|
6397
6408
|
}
|
|
6398
6409
|
};
|
|
@@ -6950,7 +6961,6 @@
|
|
|
6950
6961
|
state.getInitialPos().fold(() => storePrior(elem, box, viewport, state, decision), () => noop);
|
|
6951
6962
|
};
|
|
6952
6963
|
const revertToOriginal = (elem, box, state) => state.getInitialPos().bind((position) => {
|
|
6953
|
-
var _a;
|
|
6954
6964
|
state.clearInitialPos();
|
|
6955
6965
|
switch (position.position) {
|
|
6956
6966
|
case 'static':
|
|
@@ -6974,7 +6984,7 @@
|
|
|
6974
6984
|
// countered by the fact that if the offset parent is outside the scroller, then you don't really
|
|
6975
6985
|
// have a scrolling environment any more, because the offset parent isn't going to be impacted
|
|
6976
6986
|
// at all by the scroller
|
|
6977
|
-
const scrollDelta =
|
|
6987
|
+
const scrollDelta = offsetParent.dom.scrollTop ?? 0;
|
|
6978
6988
|
return Optional.some({
|
|
6979
6989
|
morph: 'absolute',
|
|
6980
6990
|
positionCss: NuPositionCss('absolute', get$h(position.style, 'left').map((_left) => box.x - offsetBox.x), get$h(position.style, 'top').map((_top) => box.y - offsetBox.y + scrollDelta), get$h(position.style, 'right').map((_right) => offsetBox.right - box.right), get$h(position.style, 'bottom').map((_bottom) => offsetBox.bottom - box.bottom))
|
|
@@ -7337,7 +7347,6 @@
|
|
|
7337
7347
|
const withinRange = (coord1, coord2, xRange, yRange, scroll, origin) => {
|
|
7338
7348
|
const a1 = asAbsolute(coord1, scroll, origin);
|
|
7339
7349
|
const a2 = asAbsolute(coord2, scroll, origin);
|
|
7340
|
-
// eslint-disable-next-line no-console
|
|
7341
7350
|
// console.log(`a1.left: ${a1.left}, a2.left: ${a2.left}, leftDelta: ${a1.left - a2.left}, xRange: ${xRange}, lD <= xRange: ${Math.abs(a1.left - a2.left) <= xRange}`);
|
|
7342
7351
|
// console.log(`a1.top: ${a1.top}, a2.top: ${a2.top}, topDelta: ${a1.top - a2.top}, yRange: ${yRange}, lD <= xRange: ${Math.abs(a1.top - a2.top) <= yRange}`);
|
|
7343
7352
|
return Math.abs(a1.left - a2.left) <= xRange &&
|
|
@@ -7628,7 +7637,7 @@
|
|
|
7628
7637
|
};
|
|
7629
7638
|
};
|
|
7630
7639
|
|
|
7631
|
-
const factory$
|
|
7640
|
+
const factory$n = (detail) => {
|
|
7632
7641
|
const { attributes, ...domWithoutAttributes } = detail.dom;
|
|
7633
7642
|
return {
|
|
7634
7643
|
uid: detail.uid,
|
|
@@ -7649,7 +7658,7 @@
|
|
|
7649
7658
|
};
|
|
7650
7659
|
const Container = single({
|
|
7651
7660
|
name: 'Container',
|
|
7652
|
-
factory: factory$
|
|
7661
|
+
factory: factory$n,
|
|
7653
7662
|
configFields: [
|
|
7654
7663
|
defaulted('components', []),
|
|
7655
7664
|
field('containerBehaviours', []),
|
|
@@ -7714,7 +7723,7 @@
|
|
|
7714
7723
|
defaulted('mustSnap', false)
|
|
7715
7724
|
]);
|
|
7716
7725
|
|
|
7717
|
-
const schema$
|
|
7726
|
+
const schema$r = [
|
|
7718
7727
|
// Is this used?
|
|
7719
7728
|
defaulted('useFixed', never),
|
|
7720
7729
|
required$1('blockerClass'),
|
|
@@ -7876,8 +7885,8 @@
|
|
|
7876
7885
|
start();
|
|
7877
7886
|
})
|
|
7878
7887
|
];
|
|
7879
|
-
const schema$
|
|
7880
|
-
...schema$
|
|
7888
|
+
const schema$q = [
|
|
7889
|
+
...schema$r,
|
|
7881
7890
|
output$1('dragger', {
|
|
7882
7891
|
handlers: handlers(events$d)
|
|
7883
7892
|
})
|
|
@@ -7958,8 +7967,8 @@
|
|
|
7958
7967
|
run$1(touchcancel(), stopBlocking)
|
|
7959
7968
|
];
|
|
7960
7969
|
};
|
|
7961
|
-
const schema$
|
|
7962
|
-
...schema$
|
|
7970
|
+
const schema$p = [
|
|
7971
|
+
...schema$r,
|
|
7963
7972
|
output$1('dragger', {
|
|
7964
7973
|
handlers: handlers(events$c)
|
|
7965
7974
|
})
|
|
@@ -7969,16 +7978,16 @@
|
|
|
7969
7978
|
...events$d(dragConfig, dragState, updateStartState),
|
|
7970
7979
|
...events$c(dragConfig, dragState, updateStartState)
|
|
7971
7980
|
];
|
|
7972
|
-
const schema$
|
|
7973
|
-
...schema$
|
|
7981
|
+
const schema$o = [
|
|
7982
|
+
...schema$r,
|
|
7974
7983
|
output$1('dragger', {
|
|
7975
7984
|
handlers: handlers(events$b)
|
|
7976
7985
|
})
|
|
7977
7986
|
];
|
|
7978
7987
|
|
|
7979
|
-
const mouse = schema$
|
|
7980
|
-
const touch = schema$
|
|
7981
|
-
const mouseOrTouch = schema$
|
|
7988
|
+
const mouse = schema$q;
|
|
7989
|
+
const touch = schema$p;
|
|
7990
|
+
const mouseOrTouch = schema$o;
|
|
7982
7991
|
|
|
7983
7992
|
var DraggingBranches = /*#__PURE__*/Object.freeze({
|
|
7984
7993
|
__proto__: null,
|
|
@@ -8702,9 +8711,8 @@
|
|
|
8702
8711
|
const transitionCancel = unbindable();
|
|
8703
8712
|
let timer;
|
|
8704
8713
|
const isSourceTransition = (e) => {
|
|
8705
|
-
var _a;
|
|
8706
8714
|
// Ensure the transition event isn't from a pseudo element
|
|
8707
|
-
const pseudoElement =
|
|
8715
|
+
const pseudoElement = e.raw.pseudoElement ?? '';
|
|
8708
8716
|
return eq(e.target, element) && isEmpty(pseudoElement) && contains$2(properties, e.raw.propertyName);
|
|
8709
8717
|
};
|
|
8710
8718
|
const transitionDone = (e) => {
|
|
@@ -8713,7 +8721,7 @@
|
|
|
8713
8721
|
transitionCancel.clear();
|
|
8714
8722
|
// Only cleanup the class/timer on transitionend not on a cancel. This is done as cancel
|
|
8715
8723
|
// means the element has been repositioned and would need to keep transitioning
|
|
8716
|
-
const type = e
|
|
8724
|
+
const type = e?.raw.type;
|
|
8717
8725
|
if (isNullable(type) || type === transitionend()) {
|
|
8718
8726
|
clearTimeout(timer);
|
|
8719
8727
|
remove$8(element, timerAttr);
|
|
@@ -8731,7 +8739,7 @@
|
|
|
8731
8739
|
// Request the next animation frame so we can roughly determine when the transition starts and then ensure
|
|
8732
8740
|
// the transition is cleaned up. In addition add ~17ms to the delay as that's about about 1 frame at 60fps
|
|
8733
8741
|
const duration = getTransitionDuration(element);
|
|
8734
|
-
requestAnimationFrame(() => {
|
|
8742
|
+
window.requestAnimationFrame(() => {
|
|
8735
8743
|
timer = setTimeout(transitionDone, duration + 17);
|
|
8736
8744
|
set$9(element, timerAttr, timer);
|
|
8737
8745
|
});
|
|
@@ -8773,7 +8781,7 @@
|
|
|
8773
8781
|
* in case we decide to bring back the flexibility of working with non-standard positioning.
|
|
8774
8782
|
*/
|
|
8775
8783
|
const elementSize = (p) => ({
|
|
8776
|
-
width: Math.ceil(
|
|
8784
|
+
width: Math.ceil(getOuter(p)),
|
|
8777
8785
|
height: getOuter$1(p)
|
|
8778
8786
|
});
|
|
8779
8787
|
const layout = (anchorBox, element, bubbles, options) => {
|
|
@@ -8851,7 +8859,7 @@
|
|
|
8851
8859
|
|
|
8852
8860
|
const nu$1 = identity;
|
|
8853
8861
|
|
|
8854
|
-
const schema$
|
|
8862
|
+
const schema$n = () => optionObjOf('layouts', [
|
|
8855
8863
|
required$1('onLtr'),
|
|
8856
8864
|
required$1('onRtl'),
|
|
8857
8865
|
option$3('onBottomLtr'),
|
|
@@ -8890,7 +8898,7 @@
|
|
|
8890
8898
|
required$1('hotspot'),
|
|
8891
8899
|
option$3('bubble'),
|
|
8892
8900
|
defaulted('overrides', {}),
|
|
8893
|
-
schema$
|
|
8901
|
+
schema$n(),
|
|
8894
8902
|
output$1('placement', placement$4)
|
|
8895
8903
|
];
|
|
8896
8904
|
|
|
@@ -8914,7 +8922,7 @@
|
|
|
8914
8922
|
defaulted('width', 0),
|
|
8915
8923
|
defaulted('bubble', fallback()),
|
|
8916
8924
|
defaulted('overrides', {}),
|
|
8917
|
-
schema$
|
|
8925
|
+
schema$n(),
|
|
8918
8926
|
output$1('placement', placement$3)
|
|
8919
8927
|
];
|
|
8920
8928
|
|
|
@@ -8997,7 +9005,7 @@
|
|
|
8997
9005
|
required$1('node'),
|
|
8998
9006
|
required$1('root'),
|
|
8999
9007
|
option$3('bubble'),
|
|
9000
|
-
schema$
|
|
9008
|
+
schema$n(),
|
|
9001
9009
|
// chiefly MaxHeight.expandable()
|
|
9002
9010
|
defaulted('overrides', {}),
|
|
9003
9011
|
defaulted('showAbove', false),
|
|
@@ -9086,7 +9094,7 @@
|
|
|
9086
9094
|
option$3('getSelection'),
|
|
9087
9095
|
required$1('root'),
|
|
9088
9096
|
option$3('bubble'),
|
|
9089
|
-
schema$
|
|
9097
|
+
schema$n(),
|
|
9090
9098
|
defaulted('overrides', {}),
|
|
9091
9099
|
defaulted('showAbove', false),
|
|
9092
9100
|
output$1('placement', placement$1)
|
|
@@ -9127,7 +9135,7 @@
|
|
|
9127
9135
|
};
|
|
9128
9136
|
var SubmenuAnchor = [
|
|
9129
9137
|
required$1('item'),
|
|
9130
|
-
schema$
|
|
9138
|
+
schema$n(),
|
|
9131
9139
|
defaulted('overrides', {}),
|
|
9132
9140
|
output$1('placement', placement)
|
|
9133
9141
|
];
|
|
@@ -10142,7 +10150,10 @@
|
|
|
10142
10150
|
// to rely on receiving.
|
|
10143
10151
|
const receivingData = message;
|
|
10144
10152
|
if (!receivingData.universal) {
|
|
10145
|
-
if (contains$2(receivingData.channels, ExclusivityChannel)) {
|
|
10153
|
+
if (contains$2(receivingData.channels, ExclusivityChannel) || contains$2(receivingData.channels, closeTooltips())) {
|
|
10154
|
+
if (receivingData.data.closedTooltip && state.isShowing()) {
|
|
10155
|
+
receivingData.data.closedTooltip();
|
|
10156
|
+
}
|
|
10146
10157
|
hide(comp);
|
|
10147
10158
|
}
|
|
10148
10159
|
}
|
|
@@ -10290,13 +10301,9 @@
|
|
|
10290
10301
|
};
|
|
10291
10302
|
|
|
10292
10303
|
// TODO: ^ rename the parts/ api to composites, it will break mobile alloy now if we do
|
|
10293
|
-
const parts$
|
|
10304
|
+
const parts$g = AlloyParts;
|
|
10294
10305
|
const partType$1 = PartType;
|
|
10295
10306
|
|
|
10296
|
-
const dismissPopups = constant$1('dismiss.popups');
|
|
10297
|
-
const repositionPopups = constant$1('reposition.popups');
|
|
10298
|
-
const mouseReleased = constant$1('mouse.released');
|
|
10299
|
-
|
|
10300
10307
|
const fromSource = (event, source) => {
|
|
10301
10308
|
const stopper = Cell(false);
|
|
10302
10309
|
const cutter = Cell(false);
|
|
@@ -10780,7 +10787,7 @@
|
|
|
10780
10787
|
]));
|
|
10781
10788
|
};
|
|
10782
10789
|
|
|
10783
|
-
const factory$
|
|
10790
|
+
const factory$m = (detail) => {
|
|
10784
10791
|
const events$1 = events(detail.action);
|
|
10785
10792
|
const tag = detail.dom.tag;
|
|
10786
10793
|
const lookupAttr = (attr) => get$h(detail.dom, 'attributes').bind((attrs) => get$h(attrs, attr));
|
|
@@ -10828,7 +10835,7 @@
|
|
|
10828
10835
|
};
|
|
10829
10836
|
const Button = single({
|
|
10830
10837
|
name: 'Button',
|
|
10831
|
-
factory: factory$
|
|
10838
|
+
factory: factory$m,
|
|
10832
10839
|
configFields: [
|
|
10833
10840
|
defaulted('uid', undefined),
|
|
10834
10841
|
required$1('dom'),
|
|
@@ -10840,7 +10847,7 @@
|
|
|
10840
10847
|
]
|
|
10841
10848
|
});
|
|
10842
10849
|
|
|
10843
|
-
const schema$
|
|
10850
|
+
const schema$m = constant$1([
|
|
10844
10851
|
defaulted('shell', false),
|
|
10845
10852
|
required$1('makeItem'),
|
|
10846
10853
|
defaulted('setupItem', noop),
|
|
@@ -10855,12 +10862,12 @@
|
|
|
10855
10862
|
name: 'items',
|
|
10856
10863
|
overrides: customListDetail
|
|
10857
10864
|
});
|
|
10858
|
-
const parts$
|
|
10865
|
+
const parts$f = constant$1([
|
|
10859
10866
|
itemsPart
|
|
10860
10867
|
]);
|
|
10861
10868
|
const name$1 = constant$1('CustomList');
|
|
10862
10869
|
|
|
10863
|
-
const factory$
|
|
10870
|
+
const factory$l = (detail, components, _spec, _external) => {
|
|
10864
10871
|
const setItems = (list, items) => {
|
|
10865
10872
|
getListContainer(list).fold(() => {
|
|
10866
10873
|
// check that the group container existed. It may not have if the components
|
|
@@ -10900,9 +10907,9 @@
|
|
|
10900
10907
|
};
|
|
10901
10908
|
const CustomList = composite({
|
|
10902
10909
|
name: name$1(),
|
|
10903
|
-
configFields: schema$
|
|
10904
|
-
partFields: parts$
|
|
10905
|
-
factory: factory$
|
|
10910
|
+
configFields: schema$m(),
|
|
10911
|
+
partFields: parts$f(),
|
|
10912
|
+
factory: factory$l,
|
|
10906
10913
|
apis: {
|
|
10907
10914
|
setItems: (apis, list, items) => {
|
|
10908
10915
|
apis.setItems(list, items);
|
|
@@ -11031,7 +11038,7 @@
|
|
|
11031
11038
|
components: detail.components,
|
|
11032
11039
|
eventOrder: detail.eventOrder
|
|
11033
11040
|
});
|
|
11034
|
-
const schema$
|
|
11041
|
+
const schema$l = [
|
|
11035
11042
|
required$1('data'),
|
|
11036
11043
|
required$1('components'),
|
|
11037
11044
|
required$1('dom'),
|
|
@@ -11045,7 +11052,7 @@
|
|
|
11045
11052
|
output$1('builder', builder$2),
|
|
11046
11053
|
defaulted('eventOrder', {})
|
|
11047
11054
|
];
|
|
11048
|
-
var ItemType = schema$
|
|
11055
|
+
var ItemType = schema$l;
|
|
11049
11056
|
|
|
11050
11057
|
const builder$1 = (detail) => ({
|
|
11051
11058
|
dom: detail.dom,
|
|
@@ -11054,15 +11061,15 @@
|
|
|
11054
11061
|
stopper(focusItem())
|
|
11055
11062
|
])
|
|
11056
11063
|
});
|
|
11057
|
-
const schema$
|
|
11064
|
+
const schema$k = [
|
|
11058
11065
|
required$1('dom'),
|
|
11059
11066
|
required$1('components'),
|
|
11060
11067
|
output$1('builder', builder$1)
|
|
11061
11068
|
];
|
|
11062
|
-
var SeparatorType = schema$
|
|
11069
|
+
var SeparatorType = schema$k;
|
|
11063
11070
|
|
|
11064
11071
|
const owner$2 = constant$1('item-widget');
|
|
11065
|
-
const parts$
|
|
11072
|
+
const parts$e = constant$1([
|
|
11066
11073
|
required({
|
|
11067
11074
|
name: 'widget',
|
|
11068
11075
|
overrides: (detail) => {
|
|
@@ -11084,7 +11091,7 @@
|
|
|
11084
11091
|
]);
|
|
11085
11092
|
|
|
11086
11093
|
const builder = (detail) => {
|
|
11087
|
-
const subs = substitutes(owner$2(), detail, parts$
|
|
11094
|
+
const subs = substitutes(owner$2(), detail, parts$e());
|
|
11088
11095
|
const components = components$1(owner$2(), detail, subs.internals());
|
|
11089
11096
|
const focusWidget = (component) => getPart(component, detail, 'widget').map((widget) => {
|
|
11090
11097
|
Keying.focusIn(widget);
|
|
@@ -11162,7 +11169,7 @@
|
|
|
11162
11169
|
])
|
|
11163
11170
|
};
|
|
11164
11171
|
};
|
|
11165
|
-
const schema$
|
|
11172
|
+
const schema$j = [
|
|
11166
11173
|
required$1('uid'),
|
|
11167
11174
|
required$1('data'),
|
|
11168
11175
|
required$1('components'),
|
|
@@ -11172,10 +11179,10 @@
|
|
|
11172
11179
|
SketchBehaviours.field('widgetBehaviours', [Representing, Focusing, Keying]),
|
|
11173
11180
|
defaulted('domModification', {}),
|
|
11174
11181
|
// We don't have the uid at this point
|
|
11175
|
-
defaultUidsSchema(parts$
|
|
11182
|
+
defaultUidsSchema(parts$e()),
|
|
11176
11183
|
output$1('builder', builder)
|
|
11177
11184
|
];
|
|
11178
|
-
var WidgetType = schema$
|
|
11185
|
+
var WidgetType = schema$j;
|
|
11179
11186
|
|
|
11180
11187
|
const itemSchema$2 = choose$1('type', {
|
|
11181
11188
|
widget: WidgetType,
|
|
@@ -11206,7 +11213,7 @@
|
|
|
11206
11213
|
moveOnTab: movementInfo.moveOnTab,
|
|
11207
11214
|
focusManager: detail.focusManager
|
|
11208
11215
|
});
|
|
11209
|
-
const parts$
|
|
11216
|
+
const parts$d = constant$1([
|
|
11210
11217
|
group({
|
|
11211
11218
|
factory: {
|
|
11212
11219
|
sketch: (spec) => {
|
|
@@ -11237,7 +11244,7 @@
|
|
|
11237
11244
|
}
|
|
11238
11245
|
})
|
|
11239
11246
|
]);
|
|
11240
|
-
const schema$
|
|
11247
|
+
const schema$i = constant$1([
|
|
11241
11248
|
optionString('role'),
|
|
11242
11249
|
required$1('value'),
|
|
11243
11250
|
required$1('items'),
|
|
@@ -11351,8 +11358,8 @@
|
|
|
11351
11358
|
|
|
11352
11359
|
const Menu = composite({
|
|
11353
11360
|
name: 'Menu',
|
|
11354
|
-
configFields: schema$
|
|
11355
|
-
partFields: parts$
|
|
11361
|
+
configFields: schema$i(),
|
|
11362
|
+
partFields: parts$d(),
|
|
11356
11363
|
factory: make$6
|
|
11357
11364
|
});
|
|
11358
11365
|
|
|
@@ -11942,14 +11949,14 @@
|
|
|
11942
11949
|
})
|
|
11943
11950
|
}));
|
|
11944
11951
|
|
|
11945
|
-
const schema$
|
|
11952
|
+
const schema$h = objOfOnly([
|
|
11946
11953
|
defaulted('isExtraPart', never),
|
|
11947
11954
|
optionObjOf('fireEventInstead', [
|
|
11948
11955
|
defaulted('event', dismissRequested())
|
|
11949
11956
|
])
|
|
11950
11957
|
]);
|
|
11951
11958
|
const receivingChannel$1 = (rawSpec) => {
|
|
11952
|
-
const detail = asRawOrDie$1('Dismissal', schema$
|
|
11959
|
+
const detail = asRawOrDie$1('Dismissal', schema$h, rawSpec);
|
|
11953
11960
|
return {
|
|
11954
11961
|
[dismissPopups()]: {
|
|
11955
11962
|
schema: objOfOnly([
|
|
@@ -11967,14 +11974,14 @@
|
|
|
11967
11974
|
};
|
|
11968
11975
|
};
|
|
11969
11976
|
|
|
11970
|
-
const schema$
|
|
11977
|
+
const schema$g = objOfOnly([
|
|
11971
11978
|
optionObjOf('fireEventInstead', [
|
|
11972
11979
|
defaulted('event', repositionRequested())
|
|
11973
11980
|
]),
|
|
11974
11981
|
requiredFunction('doReposition')
|
|
11975
11982
|
]);
|
|
11976
11983
|
const receivingChannel = (rawSpec) => {
|
|
11977
|
-
const detail = asRawOrDie$1('Reposition', schema$
|
|
11984
|
+
const detail = asRawOrDie$1('Reposition', schema$g, rawSpec);
|
|
11978
11985
|
return {
|
|
11979
11986
|
[repositionPopups()]: {
|
|
11980
11987
|
onReceive: (sandbox) => {
|
|
@@ -12175,14 +12182,14 @@
|
|
|
12175
12182
|
SketchBehaviours.field('sandboxBehaviours', [Composing, Receiving, Sandboxing, Representing])
|
|
12176
12183
|
];
|
|
12177
12184
|
|
|
12178
|
-
const schema$
|
|
12185
|
+
const schema$f = constant$1([
|
|
12179
12186
|
required$1('dom'),
|
|
12180
12187
|
required$1('fetch'),
|
|
12181
12188
|
onHandler('onOpen'),
|
|
12182
12189
|
onKeyboardHandler('onExecute'),
|
|
12183
12190
|
defaulted('getHotspot', Optional.some),
|
|
12184
12191
|
defaulted('getAnchorOverrides', constant$1({})),
|
|
12185
|
-
schema$
|
|
12192
|
+
schema$n(),
|
|
12186
12193
|
field('dropdownBehaviours', [Toggling, Coupling, Keying, Focusing]),
|
|
12187
12194
|
required$1('toggleClass'),
|
|
12188
12195
|
defaulted('eventOrder', {}),
|
|
@@ -12192,7 +12199,7 @@
|
|
|
12192
12199
|
option$3('role'),
|
|
12193
12200
|
option$3('listRole'),
|
|
12194
12201
|
].concat(sandboxFields()));
|
|
12195
|
-
const parts$
|
|
12202
|
+
const parts$c = constant$1([
|
|
12196
12203
|
external$1({
|
|
12197
12204
|
schema: [
|
|
12198
12205
|
tieredMenuMarkers(),
|
|
@@ -12213,7 +12220,7 @@
|
|
|
12213
12220
|
partType()
|
|
12214
12221
|
]);
|
|
12215
12222
|
|
|
12216
|
-
const factory$
|
|
12223
|
+
const factory$k = (detail, components, _spec, externals) => {
|
|
12217
12224
|
const lookupAttr = (attr) => get$h(detail.dom, 'attributes').bind((attrs) => get$h(attrs, attr));
|
|
12218
12225
|
const switchToMenu = (sandbox) => {
|
|
12219
12226
|
Sandboxing.getState(sandbox).each((tmenu) => {
|
|
@@ -12348,9 +12355,9 @@
|
|
|
12348
12355
|
};
|
|
12349
12356
|
const Dropdown = composite({
|
|
12350
12357
|
name: 'Dropdown',
|
|
12351
|
-
configFields: schema$
|
|
12352
|
-
partFields: parts$
|
|
12353
|
-
factory: factory$
|
|
12358
|
+
configFields: schema$f(),
|
|
12359
|
+
partFields: parts$c(),
|
|
12360
|
+
factory: factory$k,
|
|
12354
12361
|
apis: {
|
|
12355
12362
|
open: (apis, comp) => apis.open(comp),
|
|
12356
12363
|
refetch: (apis, comp) => apis.refetch(comp),
|
|
@@ -12362,7 +12369,7 @@
|
|
|
12362
12369
|
});
|
|
12363
12370
|
|
|
12364
12371
|
const owner$1 = 'form';
|
|
12365
|
-
const schema$
|
|
12372
|
+
const schema$e = [
|
|
12366
12373
|
field('formBehaviours', [Representing])
|
|
12367
12374
|
];
|
|
12368
12375
|
const getPartName$1 = (name) => '<alloy.field.' + name + '>';
|
|
@@ -12383,7 +12390,7 @@
|
|
|
12383
12390
|
// Unlike other sketches, a form does not know its parts in advance (as they represent each field
|
|
12384
12391
|
// in a particular form). Therefore, it needs to calculate the part names on the fly
|
|
12385
12392
|
const fieldParts = map$2(partNames, (n) => required({ name: n, pname: getPartName$1(n) }));
|
|
12386
|
-
return composite$1(owner$1, schema$
|
|
12393
|
+
return composite$1(owner$1, schema$e, fieldParts, make$4, spec);
|
|
12387
12394
|
};
|
|
12388
12395
|
const toResult = (o, e) => o.fold(() => Result.error(e), Result.value);
|
|
12389
12396
|
const make$4 = (detail, components) => ({
|
|
@@ -12426,7 +12433,7 @@
|
|
|
12426
12433
|
sketch: sketch$2
|
|
12427
12434
|
};
|
|
12428
12435
|
|
|
12429
|
-
const schema$
|
|
12436
|
+
const schema$d = constant$1([
|
|
12430
12437
|
required$1('dom'),
|
|
12431
12438
|
defaulted('shell', true),
|
|
12432
12439
|
field('toolbarBehaviours', [Replacing])
|
|
@@ -12437,7 +12444,7 @@
|
|
|
12437
12444
|
Replacing.config({})
|
|
12438
12445
|
])
|
|
12439
12446
|
});
|
|
12440
|
-
const parts$
|
|
12447
|
+
const parts$b = constant$1([
|
|
12441
12448
|
// Note, is the container for putting all the groups in, not a group itself.
|
|
12442
12449
|
optional({
|
|
12443
12450
|
name: 'groups',
|
|
@@ -12445,7 +12452,7 @@
|
|
|
12445
12452
|
})
|
|
12446
12453
|
]);
|
|
12447
12454
|
|
|
12448
|
-
const factory$
|
|
12455
|
+
const factory$j = (detail, components, _spec, _externals) => {
|
|
12449
12456
|
const setGroups = (toolbar, groups) => {
|
|
12450
12457
|
getGroupContainer(toolbar).fold(() => {
|
|
12451
12458
|
// check that the group container existed. It may not have if the components
|
|
@@ -12478,9 +12485,9 @@
|
|
|
12478
12485
|
};
|
|
12479
12486
|
const Toolbar = composite({
|
|
12480
12487
|
name: 'Toolbar',
|
|
12481
|
-
configFields: schema$
|
|
12482
|
-
partFields: parts$
|
|
12483
|
-
factory: factory$
|
|
12488
|
+
configFields: schema$d(),
|
|
12489
|
+
partFields: parts$b(),
|
|
12490
|
+
factory: factory$j,
|
|
12484
12491
|
apis: {
|
|
12485
12492
|
setGroups: (apis, toolbar, groups) => {
|
|
12486
12493
|
apis.setGroups(toolbar, groups);
|
|
@@ -12488,7 +12495,7 @@
|
|
|
12488
12495
|
}
|
|
12489
12496
|
});
|
|
12490
12497
|
|
|
12491
|
-
const schema$
|
|
12498
|
+
const schema$c = constant$1([
|
|
12492
12499
|
markers$1(['toggledClass']),
|
|
12493
12500
|
required$1('lazySink'),
|
|
12494
12501
|
requiredFunction('fetch'),
|
|
@@ -12496,10 +12503,10 @@
|
|
|
12496
12503
|
optionObjOf('fireDismissalEventInstead', [
|
|
12497
12504
|
defaulted('event', dismissRequested())
|
|
12498
12505
|
]),
|
|
12499
|
-
schema$
|
|
12506
|
+
schema$n(),
|
|
12500
12507
|
onHandler('onToggled'),
|
|
12501
12508
|
]);
|
|
12502
|
-
const parts$
|
|
12509
|
+
const parts$a = constant$1([
|
|
12503
12510
|
external$1({
|
|
12504
12511
|
name: 'button',
|
|
12505
12512
|
overrides: (detail) => ({
|
|
@@ -12529,7 +12536,7 @@
|
|
|
12529
12536
|
}),
|
|
12530
12537
|
external$1({
|
|
12531
12538
|
factory: Toolbar,
|
|
12532
|
-
schema: schema$
|
|
12539
|
+
schema: schema$d(),
|
|
12533
12540
|
name: 'toolbar',
|
|
12534
12541
|
overrides: (detail) => {
|
|
12535
12542
|
return {
|
|
@@ -12645,7 +12652,7 @@
|
|
|
12645
12652
|
])
|
|
12646
12653
|
};
|
|
12647
12654
|
};
|
|
12648
|
-
const factory$
|
|
12655
|
+
const factory$i = (detail, components, spec, externals) => ({
|
|
12649
12656
|
...Button.sketch({
|
|
12650
12657
|
...externals.button(),
|
|
12651
12658
|
action: (button) => {
|
|
@@ -12688,9 +12695,9 @@
|
|
|
12688
12695
|
});
|
|
12689
12696
|
const FloatingToolbarButton = composite({
|
|
12690
12697
|
name: 'FloatingToolbarButton',
|
|
12691
|
-
factory: factory$
|
|
12692
|
-
configFields: schema$
|
|
12693
|
-
partFields: parts$
|
|
12698
|
+
factory: factory$i,
|
|
12699
|
+
configFields: schema$c(),
|
|
12700
|
+
partFields: parts$a(),
|
|
12694
12701
|
apis: {
|
|
12695
12702
|
setGroups: (apis, button, groups) => {
|
|
12696
12703
|
apis.setGroups(button, groups);
|
|
@@ -12709,11 +12716,11 @@
|
|
|
12709
12716
|
}
|
|
12710
12717
|
});
|
|
12711
12718
|
|
|
12712
|
-
const schema$
|
|
12719
|
+
const schema$b = constant$1([
|
|
12713
12720
|
defaulted('prefix', 'form-field'),
|
|
12714
12721
|
field('fieldBehaviours', [Composing, Representing])
|
|
12715
12722
|
]);
|
|
12716
|
-
const parts$
|
|
12723
|
+
const parts$9 = constant$1([
|
|
12717
12724
|
optional({
|
|
12718
12725
|
schema: [required$1('dom')],
|
|
12719
12726
|
name: 'label'
|
|
@@ -12751,7 +12758,7 @@
|
|
|
12751
12758
|
})
|
|
12752
12759
|
]);
|
|
12753
12760
|
|
|
12754
|
-
const factory$
|
|
12761
|
+
const factory$h = (detail, components, _spec, _externals) => {
|
|
12755
12762
|
const behaviours = augment(detail.fieldBehaviours, [
|
|
12756
12763
|
Composing.config({
|
|
12757
12764
|
find: (container) => {
|
|
@@ -12808,16 +12815,16 @@
|
|
|
12808
12815
|
};
|
|
12809
12816
|
const FormField = composite({
|
|
12810
12817
|
name: 'FormField',
|
|
12811
|
-
configFields: schema$
|
|
12812
|
-
partFields: parts$
|
|
12813
|
-
factory: factory$
|
|
12818
|
+
configFields: schema$b(),
|
|
12819
|
+
partFields: parts$9(),
|
|
12820
|
+
factory: factory$h,
|
|
12814
12821
|
apis: {
|
|
12815
12822
|
getField: (apis, comp) => apis.getField(comp),
|
|
12816
12823
|
getLabel: (apis, comp) => apis.getLabel(comp)
|
|
12817
12824
|
}
|
|
12818
12825
|
});
|
|
12819
12826
|
|
|
12820
|
-
const schema$
|
|
12827
|
+
const schema$a = constant$1([
|
|
12821
12828
|
defaulted('field1Name', 'field1'),
|
|
12822
12829
|
defaulted('field2Name', 'field2'),
|
|
12823
12830
|
onStrictHandler('onLockedChange'),
|
|
@@ -12850,7 +12857,7 @@
|
|
|
12850
12857
|
};
|
|
12851
12858
|
}
|
|
12852
12859
|
});
|
|
12853
|
-
const parts$
|
|
12860
|
+
const parts$8 = constant$1([
|
|
12854
12861
|
coupledPart('field1', 'field2'),
|
|
12855
12862
|
coupledPart('field2', 'field1'),
|
|
12856
12863
|
required({
|
|
@@ -12875,7 +12882,7 @@
|
|
|
12875
12882
|
})
|
|
12876
12883
|
]);
|
|
12877
12884
|
|
|
12878
|
-
const factory$
|
|
12885
|
+
const factory$g = (detail, components, _spec, _externals) => ({
|
|
12879
12886
|
uid: detail.uid,
|
|
12880
12887
|
dom: detail.dom,
|
|
12881
12888
|
components,
|
|
@@ -12911,9 +12918,9 @@
|
|
|
12911
12918
|
});
|
|
12912
12919
|
const FormCoupledInputs = composite({
|
|
12913
12920
|
name: 'FormCoupledInputs',
|
|
12914
|
-
configFields: schema$
|
|
12915
|
-
partFields: parts$
|
|
12916
|
-
factory: factory$
|
|
12921
|
+
configFields: schema$a(),
|
|
12922
|
+
partFields: parts$8(),
|
|
12923
|
+
factory: factory$g,
|
|
12917
12924
|
apis: {
|
|
12918
12925
|
getField1: (apis, component) => apis.getField1(component),
|
|
12919
12926
|
getField2: (apis, component) => apis.getField2(component),
|
|
@@ -12921,7 +12928,7 @@
|
|
|
12921
12928
|
}
|
|
12922
12929
|
});
|
|
12923
12930
|
|
|
12924
|
-
const factory$
|
|
12931
|
+
const factory$f = (detail, _spec) => {
|
|
12925
12932
|
const options = map$2(detail.options, (option) => ({
|
|
12926
12933
|
dom: {
|
|
12927
12934
|
tag: 'option',
|
|
@@ -12977,7 +12984,7 @@
|
|
|
12977
12984
|
defaulted('selectAttributes', {}),
|
|
12978
12985
|
option$3('data')
|
|
12979
12986
|
],
|
|
12980
|
-
factory: factory$
|
|
12987
|
+
factory: factory$f
|
|
12981
12988
|
});
|
|
12982
12989
|
|
|
12983
12990
|
const makeMenu = (detail, menuSandbox, placementSpec, menuSpec, getBounds) => {
|
|
@@ -13030,7 +13037,7 @@
|
|
|
13030
13037
|
}
|
|
13031
13038
|
});
|
|
13032
13039
|
};
|
|
13033
|
-
const factory$
|
|
13040
|
+
const factory$e = (detail, spec) => {
|
|
13034
13041
|
const isPartOfRelated = (sandbox, queryElem) => {
|
|
13035
13042
|
const related = detail.getRelated(sandbox);
|
|
13036
13043
|
return related.exists((rel) => isPartOf(rel, queryElem));
|
|
@@ -13156,7 +13163,7 @@
|
|
|
13156
13163
|
defaulted('isExtraPart', never),
|
|
13157
13164
|
defaulted('eventOrder', Optional.none)
|
|
13158
13165
|
],
|
|
13159
|
-
factory: factory$
|
|
13166
|
+
factory: factory$e,
|
|
13160
13167
|
apis: {
|
|
13161
13168
|
showAt: (apis, component, anchor, thing) => {
|
|
13162
13169
|
apis.showAt(component, anchor, thing);
|
|
@@ -13184,7 +13191,7 @@
|
|
|
13184
13191
|
}
|
|
13185
13192
|
});
|
|
13186
13193
|
|
|
13187
|
-
const schema$
|
|
13194
|
+
const schema$9 = constant$1([
|
|
13188
13195
|
defaultedString('type', 'text'),
|
|
13189
13196
|
option$3('data'),
|
|
13190
13197
|
defaulted('inputAttributes', {}),
|
|
@@ -13244,7 +13251,7 @@
|
|
|
13244
13251
|
classes: detail.inputClasses
|
|
13245
13252
|
});
|
|
13246
13253
|
|
|
13247
|
-
const factory$
|
|
13254
|
+
const factory$d = (detail, _spec) => ({
|
|
13248
13255
|
uid: detail.uid,
|
|
13249
13256
|
dom: dom$1(detail),
|
|
13250
13257
|
// No children.
|
|
@@ -13254,11 +13261,11 @@
|
|
|
13254
13261
|
});
|
|
13255
13262
|
const Input = single({
|
|
13256
13263
|
name: 'Input',
|
|
13257
|
-
configFields: schema$
|
|
13258
|
-
factory: factory$
|
|
13264
|
+
configFields: schema$9(),
|
|
13265
|
+
factory: factory$d
|
|
13259
13266
|
});
|
|
13260
13267
|
|
|
13261
|
-
const parts$
|
|
13268
|
+
const parts$7 = generate$5(owner$2(), parts$e());
|
|
13262
13269
|
|
|
13263
13270
|
const labelledBy = (labelledElement, labelElement) => {
|
|
13264
13271
|
const labelId = getOpt(labelledElement, 'id')
|
|
@@ -13270,7 +13277,7 @@
|
|
|
13270
13277
|
set$9(labelledElement, 'aria-labelledby', labelId);
|
|
13271
13278
|
};
|
|
13272
13279
|
|
|
13273
|
-
const schema$
|
|
13280
|
+
const schema$8 = constant$1([
|
|
13274
13281
|
required$1('lazySink'),
|
|
13275
13282
|
option$3('dragBlockClass'),
|
|
13276
13283
|
defaultedFunction('getBounds', win),
|
|
@@ -13282,7 +13289,7 @@
|
|
|
13282
13289
|
onStrictKeyboardHandler('onEscape')
|
|
13283
13290
|
]);
|
|
13284
13291
|
const basic = { sketch: identity };
|
|
13285
|
-
const parts$
|
|
13292
|
+
const parts$6 = constant$1([
|
|
13286
13293
|
optional({
|
|
13287
13294
|
name: 'draghandle',
|
|
13288
13295
|
overrides: (detail, spec) => {
|
|
@@ -13349,7 +13356,7 @@
|
|
|
13349
13356
|
})
|
|
13350
13357
|
]);
|
|
13351
13358
|
|
|
13352
|
-
const factory$
|
|
13359
|
+
const factory$c = (detail, components, spec, externals) => {
|
|
13353
13360
|
const dialogComp = value$2();
|
|
13354
13361
|
// TODO IMPROVEMENT: Make close actually close the dialog by default!
|
|
13355
13362
|
const showDialog = (dialog) => {
|
|
@@ -13445,9 +13452,9 @@
|
|
|
13445
13452
|
};
|
|
13446
13453
|
const ModalDialog = composite({
|
|
13447
13454
|
name: 'ModalDialog',
|
|
13448
|
-
configFields: schema$
|
|
13449
|
-
partFields: parts$
|
|
13450
|
-
factory: factory$
|
|
13455
|
+
configFields: schema$8(),
|
|
13456
|
+
partFields: parts$6(),
|
|
13457
|
+
factory: factory$c,
|
|
13451
13458
|
apis: {
|
|
13452
13459
|
show: (apis, dialog) => {
|
|
13453
13460
|
apis.show(dialog);
|
|
@@ -14326,7 +14333,7 @@
|
|
|
14326
14333
|
});
|
|
14327
14334
|
|
|
14328
14335
|
const owner = 'container';
|
|
14329
|
-
const schema$
|
|
14336
|
+
const schema$7 = [
|
|
14330
14337
|
field('slotBehaviours', [])
|
|
14331
14338
|
];
|
|
14332
14339
|
const getPartName = (name) => '<alloy.field.' + name + '>';
|
|
@@ -14350,7 +14357,7 @@
|
|
|
14350
14357
|
// record lists the names of the parts to put in the schema.
|
|
14351
14358
|
// TODO: Find a nice way to remove dupe with Form
|
|
14352
14359
|
const fieldParts = map$2(partNames, (n) => required({ name: n, pname: getPartName(n) }));
|
|
14353
|
-
return composite$1(owner, schema$
|
|
14360
|
+
return composite$1(owner, schema$7, fieldParts, make$3, spec);
|
|
14354
14361
|
};
|
|
14355
14362
|
const make$3 = (detail, components) => {
|
|
14356
14363
|
const getSlotNames = (_) => getAllPartNames(detail);
|
|
@@ -14414,230 +14421,6 @@
|
|
|
14414
14421
|
...{ sketch }
|
|
14415
14422
|
};
|
|
14416
14423
|
|
|
14417
|
-
const schema$7 = constant$1([
|
|
14418
|
-
required$1('toggleClass'),
|
|
14419
|
-
required$1('fetch'),
|
|
14420
|
-
onStrictHandler('onExecute'),
|
|
14421
|
-
defaulted('getHotspot', Optional.some),
|
|
14422
|
-
defaulted('getAnchorOverrides', constant$1({})),
|
|
14423
|
-
schema$o(),
|
|
14424
|
-
onStrictHandler('onItemExecute'),
|
|
14425
|
-
option$3('lazySink'),
|
|
14426
|
-
required$1('dom'),
|
|
14427
|
-
onHandler('onOpen'),
|
|
14428
|
-
field('splitDropdownBehaviours', [Coupling, Keying, Focusing]),
|
|
14429
|
-
defaulted('matchWidth', false),
|
|
14430
|
-
defaulted('useMinWidth', false),
|
|
14431
|
-
defaulted('eventOrder', {}),
|
|
14432
|
-
option$3('role'),
|
|
14433
|
-
option$3('listRole')
|
|
14434
|
-
].concat(sandboxFields()));
|
|
14435
|
-
const arrowPart = required({
|
|
14436
|
-
factory: Button,
|
|
14437
|
-
schema: [required$1('dom')],
|
|
14438
|
-
name: 'arrow',
|
|
14439
|
-
defaults: () => {
|
|
14440
|
-
return {
|
|
14441
|
-
buttonBehaviours: derive$1([
|
|
14442
|
-
// TODO: Remove all traces of revoking
|
|
14443
|
-
Focusing.revoke()
|
|
14444
|
-
])
|
|
14445
|
-
};
|
|
14446
|
-
},
|
|
14447
|
-
overrides: (detail) => {
|
|
14448
|
-
return {
|
|
14449
|
-
dom: {
|
|
14450
|
-
tag: 'span',
|
|
14451
|
-
attributes: {
|
|
14452
|
-
role: 'presentation'
|
|
14453
|
-
}
|
|
14454
|
-
},
|
|
14455
|
-
action: (arrow) => {
|
|
14456
|
-
arrow.getSystem().getByUid(detail.uid).each(emitExecute);
|
|
14457
|
-
},
|
|
14458
|
-
buttonBehaviours: derive$1([
|
|
14459
|
-
Toggling.config({
|
|
14460
|
-
toggleOnExecute: false,
|
|
14461
|
-
toggleClass: detail.toggleClass
|
|
14462
|
-
})
|
|
14463
|
-
])
|
|
14464
|
-
};
|
|
14465
|
-
}
|
|
14466
|
-
});
|
|
14467
|
-
const buttonPart = required({
|
|
14468
|
-
factory: Button,
|
|
14469
|
-
schema: [required$1('dom')],
|
|
14470
|
-
name: 'button',
|
|
14471
|
-
defaults: () => {
|
|
14472
|
-
return {
|
|
14473
|
-
buttonBehaviours: derive$1([
|
|
14474
|
-
// TODO: Remove all traces of revoking
|
|
14475
|
-
Focusing.revoke()
|
|
14476
|
-
])
|
|
14477
|
-
};
|
|
14478
|
-
},
|
|
14479
|
-
overrides: (detail) => {
|
|
14480
|
-
return {
|
|
14481
|
-
dom: {
|
|
14482
|
-
tag: 'span',
|
|
14483
|
-
attributes: {
|
|
14484
|
-
role: 'presentation'
|
|
14485
|
-
}
|
|
14486
|
-
},
|
|
14487
|
-
action: (btn) => {
|
|
14488
|
-
btn.getSystem().getByUid(detail.uid).each((splitDropdown) => {
|
|
14489
|
-
detail.onExecute(splitDropdown, btn);
|
|
14490
|
-
});
|
|
14491
|
-
}
|
|
14492
|
-
};
|
|
14493
|
-
}
|
|
14494
|
-
});
|
|
14495
|
-
const parts$6 = constant$1([
|
|
14496
|
-
arrowPart,
|
|
14497
|
-
buttonPart,
|
|
14498
|
-
optional({
|
|
14499
|
-
factory: {
|
|
14500
|
-
sketch: (spec) => {
|
|
14501
|
-
return {
|
|
14502
|
-
uid: spec.uid,
|
|
14503
|
-
dom: {
|
|
14504
|
-
tag: 'span',
|
|
14505
|
-
styles: {
|
|
14506
|
-
display: 'none'
|
|
14507
|
-
},
|
|
14508
|
-
attributes: {
|
|
14509
|
-
'aria-hidden': 'true'
|
|
14510
|
-
},
|
|
14511
|
-
innerHtml: spec.text
|
|
14512
|
-
}
|
|
14513
|
-
};
|
|
14514
|
-
}
|
|
14515
|
-
},
|
|
14516
|
-
schema: [required$1('text')],
|
|
14517
|
-
name: 'aria-descriptor'
|
|
14518
|
-
}),
|
|
14519
|
-
external$1({
|
|
14520
|
-
schema: [
|
|
14521
|
-
tieredMenuMarkers()
|
|
14522
|
-
],
|
|
14523
|
-
name: 'menu',
|
|
14524
|
-
defaults: (detail) => {
|
|
14525
|
-
return {
|
|
14526
|
-
onExecute: (tmenu, item) => {
|
|
14527
|
-
// CAUTION: This won't work if the splitDropdown and the tmenu aren't
|
|
14528
|
-
// in the same mothership. It is just a default, though.
|
|
14529
|
-
tmenu.getSystem().getByUid(detail.uid).each((splitDropdown) => {
|
|
14530
|
-
detail.onItemExecute(splitDropdown, tmenu, item);
|
|
14531
|
-
});
|
|
14532
|
-
}
|
|
14533
|
-
};
|
|
14534
|
-
}
|
|
14535
|
-
}),
|
|
14536
|
-
partType()
|
|
14537
|
-
]);
|
|
14538
|
-
|
|
14539
|
-
const factory$c = (detail, components, spec, externals) => {
|
|
14540
|
-
const switchToMenu = (sandbox) => {
|
|
14541
|
-
Composing.getCurrent(sandbox).each((current) => {
|
|
14542
|
-
Highlighting.highlightFirst(current);
|
|
14543
|
-
Keying.focusIn(current);
|
|
14544
|
-
});
|
|
14545
|
-
};
|
|
14546
|
-
const action = (component) => {
|
|
14547
|
-
const onOpenSync = switchToMenu;
|
|
14548
|
-
togglePopup(detail, identity, component, externals, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);
|
|
14549
|
-
};
|
|
14550
|
-
const openMenu = (comp) => {
|
|
14551
|
-
action(comp);
|
|
14552
|
-
return Optional.some(true);
|
|
14553
|
-
};
|
|
14554
|
-
const executeOnButton = (comp) => {
|
|
14555
|
-
const button = getPartOrDie(comp, detail, 'button');
|
|
14556
|
-
emitExecute(button);
|
|
14557
|
-
return Optional.some(true);
|
|
14558
|
-
};
|
|
14559
|
-
const buttonEvents = {
|
|
14560
|
-
...derive$2([
|
|
14561
|
-
runOnAttached((component, _simulatedEvent) => {
|
|
14562
|
-
const ariaDescriptor = getPart(component, detail, 'aria-descriptor');
|
|
14563
|
-
ariaDescriptor.each((descriptor) => {
|
|
14564
|
-
const descriptorId = generate$6('aria');
|
|
14565
|
-
set$9(descriptor.element, 'id', descriptorId);
|
|
14566
|
-
set$9(component.element, 'aria-describedby', descriptorId);
|
|
14567
|
-
});
|
|
14568
|
-
})
|
|
14569
|
-
]),
|
|
14570
|
-
...events(Optional.some(action))
|
|
14571
|
-
};
|
|
14572
|
-
const apis = {
|
|
14573
|
-
repositionMenus: (comp) => {
|
|
14574
|
-
if (Toggling.isOn(comp)) {
|
|
14575
|
-
repositionMenus(comp);
|
|
14576
|
-
}
|
|
14577
|
-
}
|
|
14578
|
-
};
|
|
14579
|
-
return {
|
|
14580
|
-
uid: detail.uid,
|
|
14581
|
-
dom: detail.dom,
|
|
14582
|
-
components,
|
|
14583
|
-
apis,
|
|
14584
|
-
eventOrder: {
|
|
14585
|
-
...detail.eventOrder,
|
|
14586
|
-
// Order, the button state is toggled first, so assumed !selected means close.
|
|
14587
|
-
[execute$5()]: ['disabling', 'toggling', 'alloy.base.behaviour']
|
|
14588
|
-
},
|
|
14589
|
-
events: buttonEvents,
|
|
14590
|
-
behaviours: augment(detail.splitDropdownBehaviours, [
|
|
14591
|
-
Coupling.config({
|
|
14592
|
-
others: {
|
|
14593
|
-
sandbox: (hotspot) => {
|
|
14594
|
-
const arrow = getPartOrDie(hotspot, detail, 'arrow');
|
|
14595
|
-
const extras = {
|
|
14596
|
-
onOpen: () => {
|
|
14597
|
-
Toggling.on(arrow);
|
|
14598
|
-
Toggling.on(hotspot);
|
|
14599
|
-
},
|
|
14600
|
-
onClose: () => {
|
|
14601
|
-
Toggling.off(arrow);
|
|
14602
|
-
Toggling.off(hotspot);
|
|
14603
|
-
}
|
|
14604
|
-
};
|
|
14605
|
-
return makeSandbox$1(detail, hotspot, extras);
|
|
14606
|
-
}
|
|
14607
|
-
}
|
|
14608
|
-
}),
|
|
14609
|
-
Keying.config({
|
|
14610
|
-
mode: 'special',
|
|
14611
|
-
onSpace: executeOnButton,
|
|
14612
|
-
onEnter: executeOnButton,
|
|
14613
|
-
onDown: openMenu
|
|
14614
|
-
}),
|
|
14615
|
-
Focusing.config({}),
|
|
14616
|
-
Toggling.config({
|
|
14617
|
-
toggleOnExecute: false,
|
|
14618
|
-
aria: {
|
|
14619
|
-
mode: 'expanded'
|
|
14620
|
-
}
|
|
14621
|
-
})
|
|
14622
|
-
]),
|
|
14623
|
-
domModification: {
|
|
14624
|
-
attributes: {
|
|
14625
|
-
'role': detail.role.getOr('button'),
|
|
14626
|
-
'aria-haspopup': true
|
|
14627
|
-
}
|
|
14628
|
-
}
|
|
14629
|
-
};
|
|
14630
|
-
};
|
|
14631
|
-
const SplitDropdown = composite({
|
|
14632
|
-
name: 'SplitDropdown',
|
|
14633
|
-
configFields: schema$7(),
|
|
14634
|
-
partFields: parts$6(),
|
|
14635
|
-
factory: factory$c,
|
|
14636
|
-
apis: {
|
|
14637
|
-
repositionMenus: (apis, comp) => apis.repositionMenus(comp)
|
|
14638
|
-
}
|
|
14639
|
-
});
|
|
14640
|
-
|
|
14641
14424
|
const generate$1 = (xs, f) => {
|
|
14642
14425
|
const init = {
|
|
14643
14426
|
len: 0,
|
|
@@ -14766,11 +14549,11 @@
|
|
|
14766
14549
|
const parts$5 = constant$1([
|
|
14767
14550
|
required({
|
|
14768
14551
|
factory: Toolbar,
|
|
14769
|
-
schema: schema$
|
|
14552
|
+
schema: schema$d(),
|
|
14770
14553
|
name: 'primary'
|
|
14771
14554
|
}),
|
|
14772
14555
|
external$1({
|
|
14773
|
-
schema: schema$
|
|
14556
|
+
schema: schema$d(),
|
|
14774
14557
|
name: 'overflow'
|
|
14775
14558
|
}),
|
|
14776
14559
|
external$1({
|
|
@@ -14927,12 +14710,12 @@
|
|
|
14927
14710
|
const parts$3 = constant$1([
|
|
14928
14711
|
required({
|
|
14929
14712
|
factory: Toolbar,
|
|
14930
|
-
schema: schema$
|
|
14713
|
+
schema: schema$d(),
|
|
14931
14714
|
name: 'primary'
|
|
14932
14715
|
}),
|
|
14933
14716
|
required({
|
|
14934
14717
|
factory: Toolbar,
|
|
14935
|
-
schema: schema$
|
|
14718
|
+
schema: schema$d(),
|
|
14936
14719
|
name: 'overflow',
|
|
14937
14720
|
overrides: (detail) => {
|
|
14938
14721
|
return {
|
|
@@ -15721,7 +15504,7 @@
|
|
|
15721
15504
|
]),
|
|
15722
15505
|
customField('lazyTypeaheadComp', () => Cell(Optional.none)),
|
|
15723
15506
|
customField('previewing', () => Cell(true))
|
|
15724
|
-
].concat(schema$
|
|
15507
|
+
].concat(schema$9()).concat(sandboxFields()));
|
|
15725
15508
|
const parts = constant$1([
|
|
15726
15509
|
external$1({
|
|
15727
15510
|
schema: [
|
|
@@ -16162,12 +15945,11 @@
|
|
|
16162
15945
|
}, always);
|
|
16163
15946
|
const isToolbarLocationBottom = (editor) => getToolbarLocation(editor) === ToolbarLocation$1.bottom;
|
|
16164
15947
|
const fixedContainerTarget = (editor) => {
|
|
16165
|
-
var _a;
|
|
16166
15948
|
if (!editor.inline) {
|
|
16167
15949
|
// fixed_toolbar_container(_target) is only available in inline mode
|
|
16168
15950
|
return Optional.none();
|
|
16169
15951
|
}
|
|
16170
|
-
const selector =
|
|
15952
|
+
const selector = fixedContainerSelector(editor) ?? '';
|
|
16171
15953
|
if (selector.length > 0) {
|
|
16172
15954
|
// If we have a valid selector
|
|
16173
15955
|
return descendant(body(), selector);
|
|
@@ -16301,7 +16083,7 @@
|
|
|
16301
16083
|
return sc.isFullscreen() ? win() : constrainByMany(box$1(sc.element), scrollableBoxes);
|
|
16302
16084
|
};
|
|
16303
16085
|
|
|
16304
|
-
/*! @license DOMPurify 3.2.
|
|
16086
|
+
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
16305
16087
|
|
|
16306
16088
|
const {
|
|
16307
16089
|
entries,
|
|
@@ -16361,6 +16143,9 @@
|
|
|
16361
16143
|
*/
|
|
16362
16144
|
function unapply(func) {
|
|
16363
16145
|
return function (thisArg) {
|
|
16146
|
+
if (thisArg instanceof RegExp) {
|
|
16147
|
+
thisArg.lastIndex = 0;
|
|
16148
|
+
}
|
|
16364
16149
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
16365
16150
|
args[_key - 1] = arguments[_key];
|
|
16366
16151
|
}
|
|
@@ -16502,7 +16287,7 @@
|
|
|
16502
16287
|
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
|
|
16503
16288
|
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
|
|
16504
16289
|
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
|
16505
|
-
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
|
16290
|
+
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
|
16506
16291
|
);
|
|
16507
16292
|
const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
16508
16293
|
const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
|
@@ -16599,7 +16384,7 @@
|
|
|
16599
16384
|
function createDOMPurify() {
|
|
16600
16385
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
16601
16386
|
const DOMPurify = root => createDOMPurify(root);
|
|
16602
|
-
DOMPurify.version = '3.2.
|
|
16387
|
+
DOMPurify.version = '3.2.6';
|
|
16603
16388
|
DOMPurify.removed = [];
|
|
16604
16389
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
16605
16390
|
// Not running in a browser, provide a factory function
|
|
@@ -16838,8 +16623,8 @@
|
|
|
16838
16623
|
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
16839
16624
|
DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
16840
16625
|
FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
16841
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
|
|
16842
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
|
|
16626
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
16627
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
16843
16628
|
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
|
|
16844
16629
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
|
16845
16630
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
|
@@ -17204,7 +16989,7 @@
|
|
|
17204
16989
|
allowedTags: ALLOWED_TAGS
|
|
17205
16990
|
});
|
|
17206
16991
|
/* Detect mXSS attempts abusing namespace confusion */
|
|
17207
|
-
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
|
|
16992
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
|
17208
16993
|
_forceRemove(currentNode);
|
|
17209
16994
|
return true;
|
|
17210
16995
|
}
|
|
@@ -17356,8 +17141,8 @@
|
|
|
17356
17141
|
value: attrValue
|
|
17357
17142
|
} = attr;
|
|
17358
17143
|
const lcName = transformCaseFunc(name);
|
|
17359
|
-
|
|
17360
|
-
|
|
17144
|
+
const initValue = attrValue;
|
|
17145
|
+
let value = name === 'value' ? initValue : stringTrim(initValue);
|
|
17361
17146
|
/* Execute a hook if present */
|
|
17362
17147
|
hookEvent.attrName = lcName;
|
|
17363
17148
|
hookEvent.attrValue = value;
|
|
@@ -17383,7 +17168,6 @@
|
|
|
17383
17168
|
if (hookEvent.forceKeepAttr) {
|
|
17384
17169
|
continue;
|
|
17385
17170
|
}
|
|
17386
|
-
/* Remove attribute */
|
|
17387
17171
|
/* Did the hooks approve of the attribute? */
|
|
17388
17172
|
if (!hookEvent.keepAttr) {
|
|
17389
17173
|
_removeAttribute(name, currentNode);
|
|
@@ -17437,7 +17221,9 @@
|
|
|
17437
17221
|
} else {
|
|
17438
17222
|
arrayPop(DOMPurify.removed);
|
|
17439
17223
|
}
|
|
17440
|
-
} catch (_) {
|
|
17224
|
+
} catch (_) {
|
|
17225
|
+
_removeAttribute(name, currentNode);
|
|
17226
|
+
}
|
|
17441
17227
|
}
|
|
17442
17228
|
}
|
|
17443
17229
|
/* Execute a hook if present */
|
|
@@ -17689,21 +17475,21 @@
|
|
|
17689
17475
|
})
|
|
17690
17476
|
]);
|
|
17691
17477
|
const renderIcon$3 = (spec, iconName, icons, fallbackIcon) => {
|
|
17692
|
-
var _a, _b;
|
|
17693
17478
|
// If RTL, add the flip icon class if the icon doesn't have a `-rtl` icon available.
|
|
17694
17479
|
const rtlIconClasses = needsRtlTransform(iconName) ? ['tox-icon--flip'] : [];
|
|
17695
17480
|
const iconHtml = get$h(icons, getIconName(iconName, icons)).or(fallbackIcon).getOrThunk(defaultIcon(icons));
|
|
17696
17481
|
return {
|
|
17697
17482
|
dom: {
|
|
17698
17483
|
tag: spec.tag,
|
|
17699
|
-
attributes:
|
|
17484
|
+
attributes: spec.attributes ?? {},
|
|
17700
17485
|
classes: spec.classes.concat(rtlIconClasses),
|
|
17701
17486
|
innerHtml: iconHtml
|
|
17702
17487
|
},
|
|
17703
17488
|
behaviours: derive$1([
|
|
17704
|
-
...
|
|
17489
|
+
...spec.behaviours ?? [],
|
|
17705
17490
|
addFocusableBehaviour()
|
|
17706
|
-
])
|
|
17491
|
+
]),
|
|
17492
|
+
eventOrder: spec.eventOrder ?? {}
|
|
17707
17493
|
};
|
|
17708
17494
|
};
|
|
17709
17495
|
const render$4 = (iconName, spec, iconProvider, fallbackIcon = Optional.none()) => renderIcon$3(spec, iconName, iconProvider(), fallbackIcon);
|
|
@@ -18367,14 +18153,13 @@
|
|
|
18367
18153
|
const searchResultsClass = 'tox-collection--results__js';
|
|
18368
18154
|
// NOTE: this is operating on the the final AlloySpec
|
|
18369
18155
|
const augmentWithAria = (item) => {
|
|
18370
|
-
var _a;
|
|
18371
18156
|
if (item.dom) {
|
|
18372
18157
|
return {
|
|
18373
18158
|
...item,
|
|
18374
18159
|
dom: {
|
|
18375
18160
|
...item.dom,
|
|
18376
18161
|
attributes: {
|
|
18377
|
-
...
|
|
18162
|
+
...item.dom.attributes ?? {},
|
|
18378
18163
|
'id': generate$6('aria-item-search-result-id'),
|
|
18379
18164
|
'aria-selected': 'false'
|
|
18380
18165
|
}
|
|
@@ -18386,6 +18171,7 @@
|
|
|
18386
18171
|
}
|
|
18387
18172
|
};
|
|
18388
18173
|
|
|
18174
|
+
const widgetAriaLabel = 'Use arrow keys to navigate.';
|
|
18389
18175
|
const chunk = (rowDom, numColumns) => (items) => {
|
|
18390
18176
|
const chunks = chunk$1(items, numColumns);
|
|
18391
18177
|
return map$2(chunks, (c) => ({
|
|
@@ -18396,7 +18182,10 @@
|
|
|
18396
18182
|
const forSwatch = (columns) => ({
|
|
18397
18183
|
dom: {
|
|
18398
18184
|
tag: 'div',
|
|
18399
|
-
classes: ['tox-menu', 'tox-swatches-menu']
|
|
18185
|
+
classes: ['tox-menu', 'tox-swatches-menu'],
|
|
18186
|
+
attributes: {
|
|
18187
|
+
'aria-label': global$6.translate(widgetAriaLabel)
|
|
18188
|
+
}
|
|
18400
18189
|
},
|
|
18401
18190
|
components: [
|
|
18402
18191
|
{
|
|
@@ -18500,10 +18289,15 @@
|
|
|
18500
18289
|
}
|
|
18501
18290
|
});
|
|
18502
18291
|
};
|
|
18292
|
+
const hasWidget = (items) => exists(items, (item) => item.type === 'widget');
|
|
18503
18293
|
const forCollection = (columns, initItems, _hasIcons = true) => ({
|
|
18504
18294
|
dom: {
|
|
18505
18295
|
tag: 'div',
|
|
18506
|
-
classes: ['tox-menu', 'tox-collection'].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid'])
|
|
18296
|
+
classes: ['tox-menu', 'tox-collection'].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid']),
|
|
18297
|
+
attributes: {
|
|
18298
|
+
// widget item can be inserttable, colorswatch or imageselect - all of them are navigated with arrow keys
|
|
18299
|
+
...hasWidget(initItems) ? { 'aria-label': global$6.translate(widgetAriaLabel) } : {}
|
|
18300
|
+
},
|
|
18507
18301
|
},
|
|
18508
18302
|
components: [
|
|
18509
18303
|
// We don't need to add IDs for each item because there are no
|
|
@@ -18694,6 +18488,7 @@
|
|
|
18694
18488
|
const optionalRole = optionString('role');
|
|
18695
18489
|
const optionalIcon = optionString('icon');
|
|
18696
18490
|
const optionalTooltip = optionString('tooltip');
|
|
18491
|
+
const optionalChevronTooltip = optionString('chevronTooltip');
|
|
18697
18492
|
const optionalLabel = optionString('label');
|
|
18698
18493
|
const optionalShortcut = optionString('shortcut');
|
|
18699
18494
|
const optionalSelect = optionFunction('select');
|
|
@@ -18851,6 +18646,10 @@
|
|
|
18851
18646
|
|
|
18852
18647
|
const dropZoneFields = formComponentWithLabelFields.concat([
|
|
18853
18648
|
defaultedString('context', 'mode:design'),
|
|
18649
|
+
optionString('dropAreaLabel'),
|
|
18650
|
+
optionString('buttonLabel'),
|
|
18651
|
+
optionString('allowedFileTypes'),
|
|
18652
|
+
optionArrayOf('allowedFileExtensions', string)
|
|
18854
18653
|
]);
|
|
18855
18654
|
const dropZoneSchema = objOf(dropZoneFields);
|
|
18856
18655
|
const dropZoneDataProcessor = arrOfVal();
|
|
@@ -18970,6 +18769,7 @@
|
|
|
18970
18769
|
defaultedBoolean('maximized', false),
|
|
18971
18770
|
enabled,
|
|
18972
18771
|
defaultedString('context', 'mode:design'),
|
|
18772
|
+
optionBoolean('spellcheck'),
|
|
18973
18773
|
]);
|
|
18974
18774
|
const textAreaSchema = objOf(textAreaFields);
|
|
18975
18775
|
const textAreaDataProcessor = string;
|
|
@@ -19182,11 +18982,10 @@
|
|
|
19182
18982
|
};
|
|
19183
18983
|
|
|
19184
18984
|
const extract = (structure) => {
|
|
19185
|
-
var _a;
|
|
19186
18985
|
const internalDialog = getOrDie(createDialog(structure));
|
|
19187
18986
|
const dataValidator = createDataValidator(structure);
|
|
19188
18987
|
// We used to validate data here, but it's done when loading the dialog in tinymce
|
|
19189
|
-
const initialData =
|
|
18988
|
+
const initialData = structure.initialData ?? {};
|
|
19190
18989
|
return {
|
|
19191
18990
|
internalDialog,
|
|
19192
18991
|
dataValidator,
|
|
@@ -19500,6 +19299,7 @@
|
|
|
19500
19299
|
const splitButtonSchema = objOf([
|
|
19501
19300
|
type,
|
|
19502
19301
|
optionalTooltip,
|
|
19302
|
+
optionalChevronTooltip,
|
|
19503
19303
|
optionalIcon,
|
|
19504
19304
|
optionalText,
|
|
19505
19305
|
optionalSelect,
|
|
@@ -19742,7 +19542,6 @@
|
|
|
19742
19542
|
});
|
|
19743
19543
|
|
|
19744
19544
|
const renderImage$1 = (spec, imageUrl) => {
|
|
19745
|
-
var _a, _b;
|
|
19746
19545
|
const spinnerElement = SugarElement.fromTag('div');
|
|
19747
19546
|
add$2(spinnerElement, 'tox-image-selector-loading-spinner');
|
|
19748
19547
|
const addSpinnerElement = (loadingElement) => {
|
|
@@ -19756,7 +19555,7 @@
|
|
|
19756
19555
|
return {
|
|
19757
19556
|
dom: {
|
|
19758
19557
|
tag: spec.tag,
|
|
19759
|
-
attributes:
|
|
19558
|
+
attributes: spec.attributes ?? {},
|
|
19760
19559
|
classes: spec.classes,
|
|
19761
19560
|
},
|
|
19762
19561
|
components: [
|
|
@@ -19778,7 +19577,7 @@
|
|
|
19778
19577
|
...spec.checkMark.toArray()
|
|
19779
19578
|
],
|
|
19780
19579
|
behaviours: derive$1([
|
|
19781
|
-
...
|
|
19580
|
+
...spec.behaviours ?? [],
|
|
19782
19581
|
config('render-image-events', [
|
|
19783
19582
|
runOnAttached((component) => {
|
|
19784
19583
|
addSpinnerElement(component.element);
|
|
@@ -20264,7 +20063,6 @@
|
|
|
20264
20063
|
return hsvColour(Math.round(h), Math.round(s * 100), Math.round(v * 100));
|
|
20265
20064
|
};
|
|
20266
20065
|
|
|
20267
|
-
/* eslint-disable no-console */
|
|
20268
20066
|
const min = Math.min;
|
|
20269
20067
|
const max = Math.max;
|
|
20270
20068
|
const round$1 = Math.round;
|
|
@@ -20815,6 +20613,7 @@
|
|
|
20815
20613
|
const registerTextColorButton = (editor, name, format, lastColor) => {
|
|
20816
20614
|
editor.ui.registry.addSplitButton(name, {
|
|
20817
20615
|
tooltip: getToolTipText(editor, format, lastColor.get()),
|
|
20616
|
+
chevronTooltip: name === 'forecolor' ? 'Text color menu' : 'Background color menu',
|
|
20818
20617
|
presets: 'color',
|
|
20819
20618
|
icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',
|
|
20820
20619
|
select: select$1(editor, format),
|
|
@@ -21113,7 +20912,7 @@
|
|
|
21113
20912
|
},
|
|
21114
20913
|
autofocus: true,
|
|
21115
20914
|
components: [
|
|
21116
|
-
parts$
|
|
20915
|
+
parts$7.widget(Menu.sketch(widgetSpec))
|
|
21117
20916
|
]
|
|
21118
20917
|
};
|
|
21119
20918
|
};
|
|
@@ -21144,7 +20943,7 @@
|
|
|
21144
20943
|
},
|
|
21145
20944
|
autofocus: true,
|
|
21146
20945
|
components: [
|
|
21147
|
-
parts$
|
|
20946
|
+
parts$7.widget(Menu.sketch(widgetSpec))
|
|
21148
20947
|
]
|
|
21149
20948
|
};
|
|
21150
20949
|
};
|
|
@@ -21227,7 +21026,7 @@
|
|
|
21227
21026
|
classes: ['tox-fancymenuitem']
|
|
21228
21027
|
},
|
|
21229
21028
|
autofocus: true,
|
|
21230
|
-
components: [parts$
|
|
21029
|
+
components: [parts$7.widget({
|
|
21231
21030
|
dom: {
|
|
21232
21031
|
tag: 'div',
|
|
21233
21032
|
classes: ['tox-insert-table-picker']
|
|
@@ -21810,7 +21609,7 @@
|
|
|
21810
21609
|
const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));
|
|
21811
21610
|
const icons = providersBackstage.icons();
|
|
21812
21611
|
// TINY-10174: Icon string is either in icon pack or displayed directly
|
|
21813
|
-
const getIcon = (icon) =>
|
|
21612
|
+
const getIcon = (icon) => icons[icon] ?? icon;
|
|
21814
21613
|
const runOnItem = (f) => (comp, se) => {
|
|
21815
21614
|
closest$3(se.event.target, '[data-collection-item-value]').each((target) => {
|
|
21816
21615
|
f(comp, se, target, get$g(target, 'data-collection-item-value'));
|
|
@@ -22113,6 +21912,7 @@
|
|
|
22113
21912
|
};
|
|
22114
21913
|
|
|
22115
21914
|
// TODO: Move this to alloy if the concept works out
|
|
21915
|
+
// eslint-disable-next-line consistent-this
|
|
22116
21916
|
const self = () => Composing.config({
|
|
22117
21917
|
find: Optional.some
|
|
22118
21918
|
});
|
|
@@ -22903,9 +22703,9 @@
|
|
|
22903
22703
|
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
22904
22704
|
|
|
22905
22705
|
const browseFilesEvent = generate$6('browse.files.event');
|
|
22906
|
-
const filterByExtension = (files, providersBackstage) => {
|
|
22706
|
+
const filterByExtension = (files, providersBackstage, allowedFileExtensions) => {
|
|
22907
22707
|
const allowedImageFileTypes = global$2.explode(providersBackstage.getOption('images_file_types'));
|
|
22908
|
-
const isFileInAllowedTypes = (file) => exists(allowedImageFileTypes, (type) => endsWith(file.name.toLowerCase(), `.${type.toLowerCase()}`));
|
|
22708
|
+
const isFileInAllowedTypes = (file) => allowedFileExtensions.fold(() => exists(allowedImageFileTypes, (type) => endsWith(file.name.toLowerCase(), `.${type.toLowerCase()}`)), (exts) => exists(exts, (type) => endsWith(file.name.toLowerCase(), `.${type.toLowerCase()}`)));
|
|
22909
22709
|
return filter$2(from(files), isFileInAllowedTypes);
|
|
22910
22710
|
};
|
|
22911
22711
|
const renderDropZone = (spec, providersBackstage, initialData) => {
|
|
@@ -22920,10 +22720,9 @@
|
|
|
22920
22720
|
});
|
|
22921
22721
|
};
|
|
22922
22722
|
const onDrop = (comp, se) => {
|
|
22923
|
-
var _a;
|
|
22924
22723
|
if (!Disabling.isDisabled(comp)) {
|
|
22925
22724
|
const transferEvent = se.event.raw;
|
|
22926
|
-
emitWith(comp, browseFilesEvent, { files:
|
|
22725
|
+
emitWith(comp, browseFilesEvent, { files: transferEvent.dataTransfer?.files });
|
|
22927
22726
|
}
|
|
22928
22727
|
};
|
|
22929
22728
|
const onSelect = (component, simulatedEvent) => {
|
|
@@ -22932,7 +22731,7 @@
|
|
|
22932
22731
|
};
|
|
22933
22732
|
const handleFiles = (component, files) => {
|
|
22934
22733
|
if (files) {
|
|
22935
|
-
Representing.setValue(component, filterByExtension(files, providersBackstage));
|
|
22734
|
+
Representing.setValue(component, filterByExtension(files, providersBackstage, spec.allowedFileExtensions));
|
|
22936
22735
|
emitWith(component, formChangeEvent, { name: spec.name });
|
|
22937
22736
|
}
|
|
22938
22737
|
};
|
|
@@ -22941,7 +22740,7 @@
|
|
|
22941
22740
|
tag: 'input',
|
|
22942
22741
|
attributes: {
|
|
22943
22742
|
type: 'file',
|
|
22944
|
-
accept: 'image/*'
|
|
22743
|
+
accept: spec.allowedFileTypes.getOr('image/*')
|
|
22945
22744
|
},
|
|
22946
22745
|
styles: {
|
|
22947
22746
|
display: 'none'
|
|
@@ -22965,7 +22764,7 @@
|
|
|
22965
22764
|
classes: ['tox-button', 'tox-button--secondary']
|
|
22966
22765
|
},
|
|
22967
22766
|
components: [
|
|
22968
|
-
text$2(providersBackstage.translate('Browse for an image')),
|
|
22767
|
+
text$2(providersBackstage.translate(spec.buttonLabel.getOr('Browse for an image'))),
|
|
22969
22768
|
memInput.asSpec()
|
|
22970
22769
|
],
|
|
22971
22770
|
action: (comp) => {
|
|
@@ -23015,7 +22814,7 @@
|
|
|
23015
22814
|
tag: 'p'
|
|
23016
22815
|
},
|
|
23017
22816
|
components: [
|
|
23018
|
-
text$2(providersBackstage.translate('Drop an image here'))
|
|
22817
|
+
text$2(providersBackstage.translate(spec.dropAreaLabel.getOr('Drop an image here')))
|
|
23019
22818
|
]
|
|
23020
22819
|
},
|
|
23021
22820
|
pField
|
|
@@ -23399,8 +23198,7 @@
|
|
|
23399
23198
|
spec.for.each((name) => {
|
|
23400
23199
|
getCompByName(name).each((target) => {
|
|
23401
23200
|
label.getOpt(comp).each((labelComp) => {
|
|
23402
|
-
|
|
23403
|
-
const id = (_a = get$g(target.element, 'id')) !== null && _a !== void 0 ? _a : generate$6('form-field');
|
|
23201
|
+
const id = get$g(target.element, 'id') ?? generate$6('form-field');
|
|
23404
23202
|
set$9(target.element, 'id', id);
|
|
23405
23203
|
set$9(labelComp.element, 'for', id);
|
|
23406
23204
|
});
|
|
@@ -24308,7 +24106,9 @@
|
|
|
24308
24106
|
})).toArray();
|
|
24309
24107
|
const placeholder = spec.placeholder.fold(constant$1({}), (p) => ({ placeholder: providersBackstage.translate(p) }));
|
|
24310
24108
|
const inputMode = spec.inputMode.fold(constant$1({}), (mode) => ({ inputmode: mode }));
|
|
24109
|
+
const spellcheck = spec.spellcheck.fold(constant$1({}), (spellchecker) => ({ spellcheck: spellchecker }));
|
|
24311
24110
|
const inputAttributes = {
|
|
24111
|
+
...spellcheck,
|
|
24312
24112
|
...placeholder,
|
|
24313
24113
|
...inputMode,
|
|
24314
24114
|
'data-mce-name': spec.name
|
|
@@ -24361,7 +24161,8 @@
|
|
|
24361
24161
|
validation: Optional.none(),
|
|
24362
24162
|
maximized: spec.maximized,
|
|
24363
24163
|
data: initialData,
|
|
24364
|
-
context: spec.context
|
|
24164
|
+
context: spec.context,
|
|
24165
|
+
spellcheck: Optional.none(),
|
|
24365
24166
|
}, providersBackstage);
|
|
24366
24167
|
const renderTextarea = (spec, providersBackstage, initialData) => renderTextField({
|
|
24367
24168
|
name: spec.name,
|
|
@@ -24375,7 +24176,8 @@
|
|
|
24375
24176
|
validation: Optional.none(),
|
|
24376
24177
|
maximized: spec.maximized,
|
|
24377
24178
|
data: initialData,
|
|
24378
|
-
context: spec.context
|
|
24179
|
+
context: spec.context,
|
|
24180
|
+
spellcheck: spec.spellcheck,
|
|
24379
24181
|
}, providersBackstage);
|
|
24380
24182
|
|
|
24381
24183
|
const getMenuButtonApi = (component) => ({
|
|
@@ -24897,7 +24699,6 @@
|
|
|
24897
24699
|
const isNormalFooterButtonSpec = (spec, buttonType) => buttonType === 'custom' || buttonType === 'cancel' || buttonType === 'submit';
|
|
24898
24700
|
const isToggleButtonSpec = (spec, buttonType) => buttonType === 'togglebutton';
|
|
24899
24701
|
const renderToggleButton = (spec, providers, btnName) => {
|
|
24900
|
-
var _a, _b;
|
|
24901
24702
|
const optMemIcon = spec.icon
|
|
24902
24703
|
.map((memIcon) => renderReplaceableIconFromPack(memIcon, providers.icons))
|
|
24903
24704
|
.map(record);
|
|
@@ -24919,16 +24720,16 @@
|
|
|
24919
24720
|
const buttonType = spec.buttonType.getOr(!spec.primary ? 'secondary' : 'primary');
|
|
24920
24721
|
const buttonSpec = {
|
|
24921
24722
|
...spec,
|
|
24922
|
-
name:
|
|
24723
|
+
name: spec.name ?? '',
|
|
24923
24724
|
primary: buttonType === 'primary',
|
|
24924
24725
|
tooltip: spec.tooltip,
|
|
24925
|
-
enabled:
|
|
24726
|
+
enabled: spec.enabled ?? false,
|
|
24926
24727
|
borderless: false
|
|
24927
24728
|
};
|
|
24928
24729
|
const tooltipAttributes = buttonSpec.tooltip.or(spec.text).map((tooltip) => ({
|
|
24929
24730
|
'aria-label': providers.translate(tooltip),
|
|
24930
24731
|
})).getOr({});
|
|
24931
|
-
const buttonTypeClasses = calculateClassesFromButtonType(buttonType
|
|
24732
|
+
const buttonTypeClasses = calculateClassesFromButtonType(buttonType ?? 'secondary');
|
|
24932
24733
|
const showIconAndText = spec.icon.isSome() && spec.text.isSome();
|
|
24933
24734
|
const dom = {
|
|
24934
24735
|
tag: 'button',
|
|
@@ -25039,17 +24840,15 @@
|
|
|
25039
24840
|
const filterByQuery = (term, menuItems) => {
|
|
25040
24841
|
const lowerCaseTerm = term.toLowerCase();
|
|
25041
24842
|
return filter$2(menuItems, (item) => {
|
|
25042
|
-
var _a;
|
|
25043
24843
|
const text = item.meta !== undefined && item.meta.text !== undefined ? item.meta.text : item.text;
|
|
25044
|
-
const value =
|
|
24844
|
+
const value = item.value ?? '';
|
|
25045
24845
|
return contains$1(text.toLowerCase(), lowerCaseTerm) || contains$1(value.toLowerCase(), lowerCaseTerm);
|
|
25046
24846
|
});
|
|
25047
24847
|
};
|
|
25048
24848
|
|
|
25049
24849
|
const getItems = (fileType, input, urlBackstage) => {
|
|
25050
|
-
var _a, _b;
|
|
25051
24850
|
const urlInputValue = Representing.getValue(input);
|
|
25052
|
-
const term =
|
|
24851
|
+
const term = urlInputValue?.meta?.text ?? urlInputValue.value;
|
|
25053
24852
|
const info = urlBackstage.getLinkInformation();
|
|
25054
24853
|
return info.fold(() => [], (linkInfo) => {
|
|
25055
24854
|
const history = filterByQuery(term, historyTargets(urlBackstage.getHistory(fileType)));
|
|
@@ -25079,8 +24878,7 @@
|
|
|
25079
24878
|
inputClasses: ['tox-textfield'],
|
|
25080
24879
|
sandboxClasses: ['tox-dialog__popups'],
|
|
25081
24880
|
inputAttributes: {
|
|
25082
|
-
'
|
|
25083
|
-
'type': 'url'
|
|
24881
|
+
type: 'url'
|
|
25084
24882
|
},
|
|
25085
24883
|
minChars: 0,
|
|
25086
24884
|
responseTime: 0,
|
|
@@ -25115,10 +24913,12 @@
|
|
|
25115
24913
|
return FutureResult.nu((completer) => {
|
|
25116
24914
|
handler({ type: spec.filetype, url: urlEntry.value }, (validation) => {
|
|
25117
24915
|
if (validation.status === 'invalid') {
|
|
24916
|
+
set$9(input.element, 'aria-errormessage', errorId);
|
|
25118
24917
|
const err = Result.error(validation.message);
|
|
25119
24918
|
completer(err);
|
|
25120
24919
|
}
|
|
25121
24920
|
else {
|
|
24921
|
+
remove$8(input.element, 'aria-errormessage');
|
|
25122
24922
|
const val = Result.value(validation.message);
|
|
25123
24923
|
completer(val);
|
|
25124
24924
|
}
|
|
@@ -25994,12 +25794,11 @@
|
|
|
25994
25794
|
return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;
|
|
25995
25795
|
};
|
|
25996
25796
|
const headerTarget = (elm) => {
|
|
25997
|
-
var _a;
|
|
25998
25797
|
const headerId = getOrGenerateId(elm);
|
|
25999
25798
|
const attach = () => {
|
|
26000
25799
|
elm.id = headerId;
|
|
26001
25800
|
};
|
|
26002
|
-
return create('header',
|
|
25801
|
+
return create('header', getElementText(elm) ?? '', '#' + headerId, getLevel(elm), attach);
|
|
26003
25802
|
};
|
|
26004
25803
|
const anchorTarget = (elm) => {
|
|
26005
25804
|
const anchorId = elm.id || elm.name;
|
|
@@ -26206,6 +26005,15 @@
|
|
|
26206
26005
|
};
|
|
26207
26006
|
};
|
|
26208
26007
|
|
|
26008
|
+
const migrationFrom7x = 'https://www.tiny.cloud/docs/tinymce/latest/migration-from-7x/';
|
|
26009
|
+
const deprecatedFeatures = {
|
|
26010
|
+
skipFocus: `ToggleToolbarDrawer skipFocus is deprecated see migration guide: ${migrationFrom7x}`,
|
|
26011
|
+
};
|
|
26012
|
+
const logFeatureDeprecationWarning = (feature) => {
|
|
26013
|
+
// eslint-disable-next-line no-console
|
|
26014
|
+
console.warn(deprecatedFeatures[feature], new Error().stack);
|
|
26015
|
+
};
|
|
26016
|
+
|
|
26209
26017
|
const setup$b = (editor, mothership, uiMotherships) => {
|
|
26210
26018
|
const broadcastEvent = (name, evt) => {
|
|
26211
26019
|
each$1([mothership, ...uiMotherships], (m) => {
|
|
@@ -26218,6 +26026,13 @@
|
|
|
26218
26026
|
});
|
|
26219
26027
|
};
|
|
26220
26028
|
const fireDismissPopups = (evt) => broadcastOn(dismissPopups(), { target: evt.target });
|
|
26029
|
+
const fireCloseTooltips = (event) => {
|
|
26030
|
+
broadcastOn(closeTooltips(), {
|
|
26031
|
+
closedTooltip: () => {
|
|
26032
|
+
event.preventDefault();
|
|
26033
|
+
}
|
|
26034
|
+
});
|
|
26035
|
+
};
|
|
26221
26036
|
// Document touch events
|
|
26222
26037
|
const doc = getDocument();
|
|
26223
26038
|
const onTouchstart = bind$1(doc, 'touchstart', fireDismissPopups);
|
|
@@ -26293,6 +26108,7 @@
|
|
|
26293
26108
|
editor.on('ResizeEditor', onEditorResize);
|
|
26294
26109
|
editor.on('AfterProgressState', onEditorProgress);
|
|
26295
26110
|
editor.on('DismissPopups', onDismissPopups);
|
|
26111
|
+
editor.on('CloseActiveTooltips', fireCloseTooltips);
|
|
26296
26112
|
each$1([mothership, ...uiMotherships], (gui) => {
|
|
26297
26113
|
gui.element.dom.addEventListener('focusin', onFocusIn);
|
|
26298
26114
|
gui.element.dom.addEventListener('focusout', onFocusOut);
|
|
@@ -26309,6 +26125,7 @@
|
|
|
26309
26125
|
editor.off('ResizeEditor', onEditorResize);
|
|
26310
26126
|
editor.off('AfterProgressState', onEditorProgress);
|
|
26311
26127
|
editor.off('DismissPopups', onDismissPopups);
|
|
26128
|
+
editor.off('CloseActiveTooltips', fireCloseTooltips);
|
|
26312
26129
|
each$1([mothership, ...uiMotherships], (gui) => {
|
|
26313
26130
|
gui.element.dom.removeEventListener('focusin', onFocusIn);
|
|
26314
26131
|
gui.element.dom.removeEventListener('focusout', onFocusOut);
|
|
@@ -26704,7 +26521,7 @@
|
|
|
26704
26521
|
}
|
|
26705
26522
|
});
|
|
26706
26523
|
|
|
26707
|
-
const promotionMessage = '💝Get all features';
|
|
26524
|
+
const promotionMessage = '💝 Get all features';
|
|
26708
26525
|
const promotionLink = 'https://www.tiny.cloud/tinymce-upgrade-to-cloud/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral';
|
|
26709
26526
|
const renderPromotion = (spec) => {
|
|
26710
26527
|
const components = spec.promotionLink ? [
|
|
@@ -26806,7 +26623,7 @@
|
|
|
26806
26623
|
optSlider.each((slider) => {
|
|
26807
26624
|
Replacing.set(slider, [makeSidebar(panelConfigs)]);
|
|
26808
26625
|
// Show the default sidebar
|
|
26809
|
-
const configKey = showSidebar
|
|
26626
|
+
const configKey = showSidebar?.toLowerCase();
|
|
26810
26627
|
if (isString(configKey) && has$2(panelConfigs, configKey)) {
|
|
26811
26628
|
Composing.getCurrent(slider).each((slotContainer) => {
|
|
26812
26629
|
SlotContainer.showSlot(slotContainer, configKey);
|
|
@@ -27074,7 +26891,6 @@
|
|
|
27074
26891
|
});
|
|
27075
26892
|
};
|
|
27076
26893
|
|
|
27077
|
-
// eslint-disable-next-line max-len
|
|
27078
26894
|
const renderToolbarGroupCommon = (toolbarGroup) => {
|
|
27079
26895
|
const attributes = toolbarGroup.label.isNone() ?
|
|
27080
26896
|
toolbarGroup.title.fold(() => ({}), (title) => ({ attributes: { 'aria-label': title } }))
|
|
@@ -27100,8 +26916,7 @@
|
|
|
27100
26916
|
items: toolbarGroup.items,
|
|
27101
26917
|
markers: {
|
|
27102
26918
|
// nav within a group breaks if disabled buttons are first in their group so skip them
|
|
27103
|
-
itemSelector: '
|
|
27104
|
-
'.tox-split-button:not([disabled]), ' +
|
|
26919
|
+
itemSelector: '.tox-tbtn:not([disabled]), ' +
|
|
27105
26920
|
'.tox-toolbar-nav-item:not([disabled]), ' +
|
|
27106
26921
|
'.tox-number-input:not([disabled])'
|
|
27107
26922
|
},
|
|
@@ -27252,7 +27067,6 @@
|
|
|
27252
27067
|
};
|
|
27253
27068
|
|
|
27254
27069
|
const renderButton = (spec, providers) => {
|
|
27255
|
-
var _a, _b;
|
|
27256
27070
|
const isToggleButton = spec.type === 'togglebutton';
|
|
27257
27071
|
const optMemIcon = spec.icon
|
|
27258
27072
|
.map((memIcon) => renderReplaceableIconFromPack(memIcon, providers.icons))
|
|
@@ -27288,7 +27102,7 @@
|
|
|
27288
27102
|
const action = getAction();
|
|
27289
27103
|
const buttonSpec = {
|
|
27290
27104
|
...spec,
|
|
27291
|
-
name: isToggleButton ? spec.text.getOr(spec.icon.getOr('')) :
|
|
27105
|
+
name: isToggleButton ? spec.text.getOr(spec.icon.getOr('')) : spec.text ?? spec.icon.getOr(''),
|
|
27292
27106
|
primary: spec.buttonType === 'primary',
|
|
27293
27107
|
buttonType: Optional.from(spec.buttonType),
|
|
27294
27108
|
tooltip: spec.tooltip,
|
|
@@ -27296,7 +27110,7 @@
|
|
|
27296
27110
|
enabled: true,
|
|
27297
27111
|
borderless: spec.borderless
|
|
27298
27112
|
};
|
|
27299
|
-
const buttonTypeClasses = calculateClassesFromButtonType(
|
|
27113
|
+
const buttonTypeClasses = calculateClassesFromButtonType(spec.buttonType ?? 'secondary');
|
|
27300
27114
|
const optTranslatedText = isToggleButton ? spec.text.map(providers.translate) : Optional.some(providers.translate(spec.text));
|
|
27301
27115
|
const optTranslatedTextComponed = optTranslatedText.map(text$2);
|
|
27302
27116
|
const ariaLabelAttributes = buttonSpec.tooltip.or(optTranslatedText).map((al) => ({
|
|
@@ -27395,7 +27209,7 @@
|
|
|
27395
27209
|
};
|
|
27396
27210
|
const factory$2 = (detail, components, _spec, _externals) => {
|
|
27397
27211
|
const apis = {
|
|
27398
|
-
getPane: (comp) => parts$
|
|
27212
|
+
getPane: (comp) => parts$g.getPart(comp, detail, 'pane'),
|
|
27399
27213
|
getOnShow: (_comp) => detail.viewConfig.onShow,
|
|
27400
27214
|
getOnHide: (_comp) => detail.viewConfig.onHide,
|
|
27401
27215
|
};
|
|
@@ -27588,91 +27402,91 @@
|
|
|
27588
27402
|
};
|
|
27589
27403
|
const apis = {
|
|
27590
27404
|
getSocket: (comp) => {
|
|
27591
|
-
return parts$
|
|
27405
|
+
return parts$g.getPart(comp, detail, 'socket');
|
|
27592
27406
|
},
|
|
27593
27407
|
setSidebar: (comp, panelConfigs, showSidebar) => {
|
|
27594
|
-
parts$
|
|
27408
|
+
parts$g.getPart(comp, detail, 'sidebar').each((sidebar) => setSidebar(sidebar, panelConfigs, showSidebar));
|
|
27595
27409
|
},
|
|
27596
27410
|
toggleSidebar: (comp, name) => {
|
|
27597
|
-
parts$
|
|
27411
|
+
parts$g.getPart(comp, detail, 'sidebar').each((sidebar) => toggleSidebar(sidebar, name));
|
|
27598
27412
|
},
|
|
27599
27413
|
whichSidebar: (comp) => {
|
|
27600
|
-
return parts$
|
|
27414
|
+
return parts$g.getPart(comp, detail, 'sidebar').bind(whichSidebar).getOrNull();
|
|
27601
27415
|
},
|
|
27602
27416
|
getHeader: (comp) => {
|
|
27603
|
-
return parts$
|
|
27417
|
+
return parts$g.getPart(comp, detail, 'header');
|
|
27604
27418
|
},
|
|
27605
27419
|
getToolbar: (comp) => {
|
|
27606
|
-
return parts$
|
|
27420
|
+
return parts$g.getPart(comp, detail, 'toolbar');
|
|
27607
27421
|
},
|
|
27608
27422
|
setToolbar: (comp, groups) => {
|
|
27609
|
-
parts$
|
|
27423
|
+
parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {
|
|
27610
27424
|
const renderedGroups = map$2(groups, renderToolbarGroup);
|
|
27611
27425
|
toolbar.getApis().setGroups(toolbar, renderedGroups);
|
|
27612
27426
|
});
|
|
27613
27427
|
},
|
|
27614
27428
|
setToolbars: (comp, toolbars) => {
|
|
27615
|
-
parts$
|
|
27429
|
+
parts$g.getPart(comp, detail, 'multiple-toolbar').each((mToolbar) => {
|
|
27616
27430
|
const renderedToolbars = map$2(toolbars, (g) => map$2(g, renderToolbarGroup));
|
|
27617
27431
|
CustomList.setItems(mToolbar, renderedToolbars);
|
|
27618
27432
|
});
|
|
27619
27433
|
},
|
|
27620
27434
|
refreshToolbar: (comp) => {
|
|
27621
|
-
const toolbar = parts$
|
|
27435
|
+
const toolbar = parts$g.getPart(comp, detail, 'toolbar');
|
|
27622
27436
|
toolbar.each((toolbar) => toolbar.getApis().refresh(toolbar));
|
|
27623
27437
|
},
|
|
27624
27438
|
toggleToolbarDrawer: (comp) => {
|
|
27625
|
-
parts$
|
|
27439
|
+
parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {
|
|
27626
27440
|
mapFrom(toolbar.getApis().toggle, (toggle) => toggle(toolbar));
|
|
27627
27441
|
});
|
|
27628
27442
|
},
|
|
27629
27443
|
toggleToolbarDrawerWithoutFocusing: (comp) => {
|
|
27630
|
-
parts$
|
|
27444
|
+
parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {
|
|
27631
27445
|
mapFrom(toolbar.getApis().toggleWithoutFocusing, (toggleWithoutFocusing) => toggleWithoutFocusing(toolbar));
|
|
27632
27446
|
});
|
|
27633
27447
|
},
|
|
27634
27448
|
isToolbarDrawerToggled: (comp) => {
|
|
27635
27449
|
// isOpen may not be defined on all toolbars e.g. 'scrolling' and 'wrap'
|
|
27636
|
-
return parts$
|
|
27450
|
+
return parts$g.getPart(comp, detail, 'toolbar')
|
|
27637
27451
|
.bind((toolbar) => Optional.from(toolbar.getApis().isOpen).map((isOpen) => isOpen(toolbar)))
|
|
27638
27452
|
.getOr(false);
|
|
27639
27453
|
},
|
|
27640
27454
|
getThrobber: (comp) => {
|
|
27641
|
-
return parts$
|
|
27455
|
+
return parts$g.getPart(comp, detail, 'throbber');
|
|
27642
27456
|
},
|
|
27643
27457
|
focusToolbar: (comp) => {
|
|
27644
|
-
const optToolbar = parts$
|
|
27458
|
+
const optToolbar = parts$g.getPart(comp, detail, 'toolbar').orThunk(() => parts$g.getPart(comp, detail, 'multiple-toolbar'));
|
|
27645
27459
|
optToolbar.each((toolbar) => {
|
|
27646
27460
|
Keying.focusIn(toolbar);
|
|
27647
27461
|
});
|
|
27648
27462
|
},
|
|
27649
27463
|
setMenubar: (comp, menus) => {
|
|
27650
|
-
parts$
|
|
27464
|
+
parts$g.getPart(comp, detail, 'menubar').each((menubar) => {
|
|
27651
27465
|
SilverMenubar.setMenus(menubar, menus);
|
|
27652
27466
|
});
|
|
27653
27467
|
},
|
|
27654
27468
|
focusMenubar: (comp) => {
|
|
27655
|
-
parts$
|
|
27469
|
+
parts$g.getPart(comp, detail, 'menubar').each((menubar) => {
|
|
27656
27470
|
SilverMenubar.focus(menubar);
|
|
27657
27471
|
});
|
|
27658
27472
|
},
|
|
27659
27473
|
setViews: (comp, viewConfigs) => {
|
|
27660
|
-
parts$
|
|
27474
|
+
parts$g.getPart(comp, detail, 'viewWrapper').each((wrapper) => {
|
|
27661
27475
|
ViewWrapper.setViews(wrapper, viewConfigs);
|
|
27662
27476
|
});
|
|
27663
27477
|
},
|
|
27664
27478
|
toggleView: (comp, name) => {
|
|
27665
|
-
return parts$
|
|
27479
|
+
return parts$g.getPart(comp, detail, 'viewWrapper').exists((wrapper) => ViewWrapper.toggleView(wrapper, () => apis.showMainView(comp), () => apis.hideMainView(comp), name));
|
|
27666
27480
|
},
|
|
27667
27481
|
whichView: (comp) => {
|
|
27668
|
-
return parts$
|
|
27482
|
+
return parts$g.getPart(comp, detail, 'viewWrapper').bind(ViewWrapper.whichView).getOrNull();
|
|
27669
27483
|
},
|
|
27670
27484
|
hideMainView: (comp) => {
|
|
27671
27485
|
toolbarDrawerOpenState = apis.isToolbarDrawerToggled(comp);
|
|
27672
27486
|
if (toolbarDrawerOpenState) {
|
|
27673
27487
|
apis.toggleToolbarDrawer(comp);
|
|
27674
27488
|
}
|
|
27675
|
-
parts$
|
|
27489
|
+
parts$g.getPart(comp, detail, 'editorContainer').each((editorContainer) => {
|
|
27676
27490
|
const element = editorContainer.element;
|
|
27677
27491
|
toggleStatusbar(element);
|
|
27678
27492
|
set$7(element, 'display', 'none');
|
|
@@ -27683,7 +27497,7 @@
|
|
|
27683
27497
|
if (toolbarDrawerOpenState) {
|
|
27684
27498
|
apis.toggleToolbarDrawer(comp);
|
|
27685
27499
|
}
|
|
27686
|
-
parts$
|
|
27500
|
+
parts$g.getPart(comp, detail, 'editorContainer').each((editorContainer) => {
|
|
27687
27501
|
const element = editorContainer.element;
|
|
27688
27502
|
toggleStatusbar(element);
|
|
27689
27503
|
remove$6(element, 'display');
|
|
@@ -27935,8 +27749,8 @@
|
|
|
27935
27749
|
const defaultMenus = {
|
|
27936
27750
|
file: { title: 'File', items: 'newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations' },
|
|
27937
27751
|
edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall | searchreplace' },
|
|
27938
|
-
view: { title: 'View', items: 'code revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
|
|
27939
|
-
insert: { title: 'Insert', items: 'image link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime' },
|
|
27752
|
+
view: { title: 'View', items: 'code suggestededits revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
|
|
27753
|
+
insert: { title: 'Insert', items: 'image video link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime' },
|
|
27940
27754
|
format: { title: 'Format', items: 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat' },
|
|
27941
27755
|
tools: { title: 'Tools', items: 'aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate' },
|
|
27942
27756
|
table: { title: 'Table', items: 'inserttable | cell row column | advtablesort | tableprops deletetable' },
|
|
@@ -28240,7 +28054,6 @@
|
|
|
28240
28054
|
});
|
|
28241
28055
|
};
|
|
28242
28056
|
const renderCommonToolbarButton = (spec, specialisation, providersBackstage, btnName) => {
|
|
28243
|
-
var _d;
|
|
28244
28057
|
const editorOffCell = Cell(noop);
|
|
28245
28058
|
const structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.none(), providersBackstage, spec.context, btnName);
|
|
28246
28059
|
return Button.sketch({
|
|
@@ -28267,7 +28080,7 @@
|
|
|
28267
28080
|
// Here we add the commonButtonDisplayEvent behaviour from the structure so we can listen
|
|
28268
28081
|
// to updateMenuIcon and updateMenuText events and run the defined callbacks as they are
|
|
28269
28082
|
// defined in the renderCommonStructure function and fix the size of the button onAttached.
|
|
28270
|
-
[commonButtonDisplayEvent]:
|
|
28083
|
+
[commonButtonDisplayEvent]: structure.buttonBehaviours?.[commonButtonDisplayEvent],
|
|
28271
28084
|
}
|
|
28272
28085
|
});
|
|
28273
28086
|
};
|
|
@@ -28305,117 +28118,190 @@
|
|
|
28305
28118
|
})
|
|
28306
28119
|
])
|
|
28307
28120
|
}))));
|
|
28308
|
-
|
|
28309
|
-
|
|
28310
|
-
const
|
|
28311
|
-
const
|
|
28312
|
-
|
|
28313
|
-
|
|
28314
|
-
|
|
28315
|
-
|
|
28121
|
+
const makeSplitButtonApi = (tooltipString, sharedBackstage, spec) => (component) => {
|
|
28122
|
+
const system = component.getSystem();
|
|
28123
|
+
const element = component.element;
|
|
28124
|
+
const getComponents = () => {
|
|
28125
|
+
const isChevron = has(element, 'tox-split-button__chevron');
|
|
28126
|
+
const mainOpt = isChevron ?
|
|
28127
|
+
prevSibling(element).bind((el) => system.getByDom(el).toOptional()) :
|
|
28128
|
+
Optional.some(component);
|
|
28129
|
+
const chevronOpt = isChevron ?
|
|
28130
|
+
Optional.some(component) :
|
|
28131
|
+
nextSibling(element).bind((el) => system.getByDom(el).toOptional().filter((comp) => has(comp.element, 'tox-split-button__chevron')));
|
|
28132
|
+
return { mainOpt, chevronOpt };
|
|
28133
|
+
};
|
|
28134
|
+
const applyBoth = (f) => {
|
|
28135
|
+
const { mainOpt, chevronOpt } = getComponents();
|
|
28136
|
+
mainOpt.each(f);
|
|
28137
|
+
chevronOpt.each(f);
|
|
28138
|
+
};
|
|
28139
|
+
return {
|
|
28140
|
+
isEnabled: () => {
|
|
28141
|
+
const { mainOpt } = getComponents();
|
|
28142
|
+
return mainOpt.exists((c) => !Disabling.isDisabled(c));
|
|
28143
|
+
},
|
|
28144
|
+
setEnabled: (state) => applyBoth((c) => Disabling.set(c, !state)),
|
|
28145
|
+
setText: (text) => {
|
|
28146
|
+
const { mainOpt } = getComponents();
|
|
28147
|
+
mainOpt.each((c) => emitWith(c, updateMenuText, { text }));
|
|
28148
|
+
},
|
|
28149
|
+
setIcon: (icon) => {
|
|
28150
|
+
const { mainOpt } = getComponents();
|
|
28151
|
+
mainOpt.each((c) => emitWith(c, updateMenuIcon, { icon }));
|
|
28152
|
+
},
|
|
28153
|
+
setIconFill: (id, value) => applyBoth((c) => {
|
|
28154
|
+
descendant(c.element, `svg path[class="${id}"], rect[class="${id}"]`).each((underlinePath) => {
|
|
28316
28155
|
set$9(underlinePath, 'fill', value);
|
|
28317
28156
|
});
|
|
28157
|
+
}),
|
|
28158
|
+
isActive: () => {
|
|
28159
|
+
const { mainOpt } = getComponents();
|
|
28160
|
+
return mainOpt.exists((c) => Toggling.isOn(c));
|
|
28318
28161
|
},
|
|
28319
28162
|
setActive: (state) => {
|
|
28320
|
-
|
|
28321
|
-
set
|
|
28322
|
-
// Toggle the inner button state, as that's the toggle component of the split button
|
|
28323
|
-
descendant(comp.element, 'span').each((button) => {
|
|
28324
|
-
comp.getSystem().getByDom(button).each((buttonComp) => Toggling.set(buttonComp, state));
|
|
28325
|
-
});
|
|
28163
|
+
const { mainOpt } = getComponents();
|
|
28164
|
+
mainOpt.each((c) => Toggling.set(c, state));
|
|
28326
28165
|
},
|
|
28327
|
-
isActive: () => descendant(comp.element, 'span').exists((button) => comp.getSystem().getByDom(button).exists(Toggling.isOn)),
|
|
28328
|
-
setText: (text) => descendant(comp.element, 'span').each((button) => comp.getSystem().getByDom(button).each((buttonComp) => emitWith(buttonComp, updateMenuText, {
|
|
28329
|
-
text
|
|
28330
|
-
}))),
|
|
28331
|
-
setIcon: (icon) => descendant(comp.element, 'span').each((button) => comp.getSystem().getByDom(button).each((buttonComp) => emitWith(buttonComp, updateMenuIcon, {
|
|
28332
|
-
icon
|
|
28333
|
-
}))),
|
|
28334
28166
|
setTooltip: (tooltip) => {
|
|
28335
|
-
const translatedTooltip = sharedBackstage.providers.translate(tooltip);
|
|
28336
|
-
set$9(comp.element, 'aria-label', translatedTooltip);
|
|
28337
28167
|
tooltipString.set(tooltip);
|
|
28168
|
+
const { mainOpt, chevronOpt } = getComponents();
|
|
28169
|
+
mainOpt.each((c) => set$9(c.element, 'aria-label', sharedBackstage.providers.translate(tooltip)));
|
|
28170
|
+
// For chevron, use the explicit chevronTooltip if provided, otherwise fall back to default behavior
|
|
28171
|
+
const chevronTooltipText = spec.chevronTooltip
|
|
28172
|
+
.map((chevronTooltip) => sharedBackstage.providers.translate(chevronTooltip))
|
|
28173
|
+
.getOr(sharedBackstage.providers.translate(tooltip));
|
|
28174
|
+
chevronOpt.each((c) => set$9(c.element, 'aria-label', chevronTooltipText));
|
|
28338
28175
|
}
|
|
28339
|
-
}
|
|
28176
|
+
};
|
|
28177
|
+
};
|
|
28178
|
+
const renderSplitButton = (spec, sharedBackstage, btnName) => {
|
|
28340
28179
|
const editorOffCell = Cell(noop);
|
|
28341
|
-
const
|
|
28342
|
-
|
|
28343
|
-
|
|
28180
|
+
const tooltipString = Cell(spec.tooltip.getOr(''));
|
|
28181
|
+
const getApi = makeSplitButtonApi(tooltipString, sharedBackstage, spec);
|
|
28182
|
+
const menuId = generate$6('tox-split-menu');
|
|
28183
|
+
const expandedCell = Cell(false);
|
|
28184
|
+
const getAriaAttributes = () => ({
|
|
28185
|
+
'aria-haspopup': 'menu',
|
|
28186
|
+
'aria-expanded': String(expandedCell.get()),
|
|
28187
|
+
'aria-controls': menuId
|
|
28188
|
+
});
|
|
28189
|
+
// Helper to get ARIA label for the main button
|
|
28190
|
+
const getMainButtonAriaLabel = () => {
|
|
28191
|
+
return spec.tooltip.map((tooltip) => sharedBackstage.providers.translate(tooltip))
|
|
28192
|
+
.getOr(sharedBackstage.providers.translate('Text color'));
|
|
28193
|
+
};
|
|
28194
|
+
// Helper to get ARIA label and tooltip for the chevron/dropdown button
|
|
28195
|
+
const getChevronTooltip = () => {
|
|
28196
|
+
return spec.chevronTooltip
|
|
28197
|
+
.map((tooltip) => sharedBackstage.providers.translate(tooltip))
|
|
28198
|
+
.getOrThunk(() => {
|
|
28199
|
+
const mainLabel = getMainButtonAriaLabel();
|
|
28200
|
+
return sharedBackstage.providers.translate(['{0} menu', mainLabel]);
|
|
28201
|
+
});
|
|
28202
|
+
};
|
|
28203
|
+
const updateAriaExpanded = (expanded, comp) => {
|
|
28204
|
+
expandedCell.set(expanded);
|
|
28205
|
+
set$9(comp.element, 'aria-expanded', String(expanded));
|
|
28344
28206
|
};
|
|
28345
|
-
|
|
28207
|
+
const arrow = Dropdown.sketch({
|
|
28346
28208
|
dom: {
|
|
28347
|
-
tag: '
|
|
28348
|
-
classes: ["tox-
|
|
28209
|
+
tag: 'button',
|
|
28210
|
+
classes: ["tox-tbtn" /* ToolbarButtonClasses.Button */, 'tox-split-button__chevron'],
|
|
28211
|
+
innerHtml: get('chevron-down', sharedBackstage.providers.icons),
|
|
28349
28212
|
attributes: {
|
|
28350
|
-
'aria-
|
|
28351
|
-
...
|
|
28352
|
-
...(
|
|
28213
|
+
'aria-label': getChevronTooltip(),
|
|
28214
|
+
...(isNonNullable(btnName) ? { 'data-mce-name': btnName + '-chevron' } : {}),
|
|
28215
|
+
...getAriaAttributes()
|
|
28353
28216
|
}
|
|
28354
28217
|
},
|
|
28355
|
-
|
|
28356
|
-
|
|
28357
|
-
|
|
28358
|
-
spec.onAction(api);
|
|
28359
|
-
}
|
|
28360
|
-
},
|
|
28361
|
-
onItemExecute: (_a, _b, _c) => { },
|
|
28362
|
-
splitDropdownBehaviours: derive$1([
|
|
28218
|
+
components: [],
|
|
28219
|
+
toggleClass: "tox-tbtn--enabled" /* ToolbarButtonClasses.Ticked */,
|
|
28220
|
+
dropdownBehaviours: derive$1([
|
|
28363
28221
|
config('split-dropdown-events', [
|
|
28364
28222
|
runOnAttached((comp, _se) => forceInitialSize(comp)),
|
|
28365
|
-
|
|
28366
|
-
|
|
28367
|
-
|
|
28223
|
+
onControlAttached({ getApi, onSetup: spec.onSetup }, editorOffCell),
|
|
28224
|
+
run$1('alloy-dropdown-open', (comp) => updateAriaExpanded(true, comp)),
|
|
28225
|
+
run$1('alloy-dropdown-close', (comp) => updateAriaExpanded(false, comp)),
|
|
28368
28226
|
]),
|
|
28369
|
-
DisablingConfigs.
|
|
28227
|
+
DisablingConfigs.toolbarButton(() => sharedBackstage.providers.checkUiComponentContext(spec.context).shouldDisable),
|
|
28370
28228
|
toggleOnReceive(() => sharedBackstage.providers.checkUiComponentContext(spec.context)),
|
|
28371
28229
|
Unselecting.config({}),
|
|
28372
|
-
|
|
28373
|
-
|
|
28374
|
-
|
|
28375
|
-
|
|
28376
|
-
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
|
|
28380
|
-
|
|
28381
|
-
|
|
28382
|
-
|
|
28383
|
-
});
|
|
28384
|
-
}).toArray())
|
|
28230
|
+
Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({
|
|
28231
|
+
tooltipText: getChevronTooltip(),
|
|
28232
|
+
onShow: (comp) => {
|
|
28233
|
+
if (tooltipString.get() !== spec.tooltip.getOr('')) {
|
|
28234
|
+
const chevronTooltipText = spec.chevronTooltip
|
|
28235
|
+
.map((chevronTooltip) => sharedBackstage.providers.translate(chevronTooltip))
|
|
28236
|
+
.getOr(`${sharedBackstage.providers.translate(tooltipString.get())} menu`);
|
|
28237
|
+
Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: chevronTooltipText }));
|
|
28238
|
+
}
|
|
28239
|
+
}
|
|
28240
|
+
}))
|
|
28385
28241
|
]),
|
|
28386
|
-
eventOrder: {
|
|
28387
|
-
[attachedToDom()]: ['alloy.base.behaviour', 'split-dropdown-events', 'tooltipping'],
|
|
28388
|
-
[detachedFromDom()]: ['split-dropdown-events', 'tooltipping']
|
|
28389
|
-
},
|
|
28390
|
-
toggleClass: "tox-tbtn--enabled" /* ToolbarButtonClasses.Ticked */,
|
|
28391
28242
|
lazySink: sharedBackstage.getSink,
|
|
28392
28243
|
fetch: fetchChoices(getApi, spec, sharedBackstage.providers),
|
|
28393
|
-
|
|
28394
|
-
|
|
28395
|
-
menu
|
|
28244
|
+
getHotspot: (comp) => prevSibling(comp.element).bind((el) => comp.getSystem().getByDom(el).toOptional()),
|
|
28245
|
+
onOpen: (_anchor, _comp, menu) => {
|
|
28246
|
+
Highlighting.highlightBy(menu, (item) => has(item.element, 'tox-collection__item--active'));
|
|
28247
|
+
Highlighting.getHighlighted(menu).each(Keying.focusIn);
|
|
28396
28248
|
},
|
|
28397
|
-
|
|
28398
|
-
|
|
28399
|
-
|
|
28400
|
-
DisablingConfigs.toolbarButton(never),
|
|
28401
|
-
toggleOnReceive(constant$1({ contextType: 'any', shouldDisable: false }))
|
|
28402
|
-
]), sharedBackstage.providers, spec.context)),
|
|
28403
|
-
SplitDropdown.parts.arrow({
|
|
28249
|
+
parts: {
|
|
28250
|
+
menu: {
|
|
28251
|
+
...part(false, spec.columns, spec.presets),
|
|
28404
28252
|
dom: {
|
|
28405
|
-
|
|
28406
|
-
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
|
|
28410
|
-
|
|
28411
|
-
|
|
28412
|
-
|
|
28413
|
-
|
|
28414
|
-
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
|
|
28253
|
+
...part(false, spec.columns, spec.presets).dom,
|
|
28254
|
+
tag: 'div',
|
|
28255
|
+
attributes: {
|
|
28256
|
+
id: menuId
|
|
28257
|
+
}
|
|
28258
|
+
}
|
|
28259
|
+
}
|
|
28260
|
+
}
|
|
28261
|
+
});
|
|
28262
|
+
const structure = renderCommonStructure(spec.icon, spec.text, Optional.none(), Optional.some([
|
|
28263
|
+
Toggling.config({
|
|
28264
|
+
toggleClass: "tox-tbtn--enabled" /* ToolbarButtonClasses.Ticked */,
|
|
28265
|
+
aria: spec.presets === 'color' ? { mode: 'none' } : { mode: 'pressed' },
|
|
28266
|
+
toggleOnExecute: false
|
|
28267
|
+
}),
|
|
28268
|
+
...(spec.tooltip.isSome() ? [
|
|
28269
|
+
Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({
|
|
28270
|
+
tooltipText: sharedBackstage.providers.translate(spec.tooltip.getOr('')),
|
|
28271
|
+
onShow: (comp) => {
|
|
28272
|
+
if (tooltipString.get() !== spec.tooltip.getOr('')) {
|
|
28273
|
+
const translated = sharedBackstage.providers.translate(tooltipString.get());
|
|
28274
|
+
Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: translated }));
|
|
28275
|
+
}
|
|
28276
|
+
}
|
|
28277
|
+
}))
|
|
28278
|
+
] : [])
|
|
28279
|
+
]), sharedBackstage.providers, spec.context, btnName);
|
|
28280
|
+
const mainButton = Button.sketch({
|
|
28281
|
+
dom: {
|
|
28282
|
+
...structure.dom,
|
|
28283
|
+
classes: [
|
|
28284
|
+
"tox-tbtn" /* ToolbarButtonClasses.Button */,
|
|
28285
|
+
'tox-split-button__main'
|
|
28286
|
+
].concat(spec.text.isSome() ? ["tox-tbtn--select" /* ToolbarButtonClasses.MatchWidth */] : []),
|
|
28287
|
+
attributes: {
|
|
28288
|
+
'aria-label': getMainButtonAriaLabel(),
|
|
28289
|
+
...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})
|
|
28290
|
+
}
|
|
28291
|
+
},
|
|
28292
|
+
components: structure.components,
|
|
28293
|
+
eventOrder: structure.eventOrder,
|
|
28294
|
+
buttonBehaviours: structure.buttonBehaviours,
|
|
28295
|
+
action: (button) => {
|
|
28296
|
+
if (spec.onAction) {
|
|
28297
|
+
const api = getApi(button);
|
|
28298
|
+
if (api.isEnabled()) {
|
|
28299
|
+
spec.onAction(api);
|
|
28300
|
+
}
|
|
28301
|
+
}
|
|
28302
|
+
}
|
|
28418
28303
|
});
|
|
28304
|
+
return [mainButton, arrow];
|
|
28419
28305
|
};
|
|
28420
28306
|
|
|
28421
28307
|
const contextFormInputSelector = '.tox-toolbar-slider__input,.tox-toolbar-textfield';
|
|
@@ -28491,7 +28377,7 @@
|
|
|
28491
28377
|
active$1(getRootNode(comp.element)).fold(() => focus$4(f), (active) => {
|
|
28492
28378
|
// We need this extra check since if the focus is aleady on the iframe we don't want to call focus on it again since that closes the context toolbar
|
|
28493
28379
|
if (!eq(active, f)) {
|
|
28494
|
-
|
|
28380
|
+
spec.focusElement(f);
|
|
28495
28381
|
}
|
|
28496
28382
|
});
|
|
28497
28383
|
});
|
|
@@ -29213,7 +29099,6 @@
|
|
|
29213
29099
|
};
|
|
29214
29100
|
const createFontSizeButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$1(editor), getTooltipPlaceholder$1, 'FontSizeTextUpdate', 'fontsize');
|
|
29215
29101
|
const getConfigFromUnit = (unit) => {
|
|
29216
|
-
var _a;
|
|
29217
29102
|
const baseConfig = { step: 1 };
|
|
29218
29103
|
const configs = {
|
|
29219
29104
|
em: { step: 0.1 },
|
|
@@ -29223,7 +29108,7 @@
|
|
|
29223
29108
|
ch: { step: 0.1 },
|
|
29224
29109
|
rem: { step: 0.1 }
|
|
29225
29110
|
};
|
|
29226
|
-
return
|
|
29111
|
+
return configs[unit] ?? baseConfig;
|
|
29227
29112
|
};
|
|
29228
29113
|
const defaultValue = 16;
|
|
29229
29114
|
const isValidValue = (value) => value >= 0;
|
|
@@ -29459,8 +29344,12 @@
|
|
|
29459
29344
|
const toolbarGroups = createToolbar(toolbarConfig);
|
|
29460
29345
|
const groups = map$2(toolbarGroups, (group) => {
|
|
29461
29346
|
const items = bind$3(group.items, (toolbarItem) => {
|
|
29462
|
-
|
|
29463
|
-
|
|
29347
|
+
if (toolbarItem.trim().length === 0) {
|
|
29348
|
+
return [];
|
|
29349
|
+
}
|
|
29350
|
+
return lookupButton(editor, toolbarConfig.buttons, toolbarItem, toolbarConfig.allowToolbarGroups, backstage, prefixes)
|
|
29351
|
+
.map((spec) => Array.isArray(spec) ? spec : [spec])
|
|
29352
|
+
.getOr([]);
|
|
29464
29353
|
});
|
|
29465
29354
|
return {
|
|
29466
29355
|
title: Optional.from(editor.translate(group.name)),
|
|
@@ -29564,6 +29453,7 @@
|
|
|
29564
29453
|
attachUiMotherships(editor, uiRoot, uiRefs);
|
|
29565
29454
|
editor.on('PostRender', () => {
|
|
29566
29455
|
OuterContainer.setSidebar(outerContainer, rawUiConfig.sidebar, getSidebarShow(editor));
|
|
29456
|
+
OuterContainer.setViews(outerContainer, rawUiConfig.views);
|
|
29567
29457
|
});
|
|
29568
29458
|
// TINY-10343: Using `SkinLoaded` instead of `PostRender` because if the skin loading takes too long you run in to rendering problems since things are measured before the CSS is being applied
|
|
29569
29459
|
editor.on('SkinLoaded', () => {
|
|
@@ -29573,7 +29463,6 @@
|
|
|
29573
29463
|
setToolbar(editor, uiRefs, rawUiConfig, backstage);
|
|
29574
29464
|
lastToolbarWidth.set(editor.getWin().innerWidth);
|
|
29575
29465
|
OuterContainer.setMenubar(outerContainer, identifyMenus(editor, rawUiConfig));
|
|
29576
|
-
OuterContainer.setViews(outerContainer, rawUiConfig.views);
|
|
29577
29466
|
setupEvents$1(editor, uiRefs);
|
|
29578
29467
|
});
|
|
29579
29468
|
const socket = OuterContainer.getSocket(outerContainer).getOrDie('Could not find expected socket element');
|
|
@@ -29593,7 +29482,7 @@
|
|
|
29593
29482
|
OuterContainer.toggleSidebar(outerContainer, value);
|
|
29594
29483
|
fireToggleSidebar(editor);
|
|
29595
29484
|
});
|
|
29596
|
-
editor.addQueryValueHandler('ToggleSidebar', () =>
|
|
29485
|
+
editor.addQueryValueHandler('ToggleSidebar', () => OuterContainer.whichSidebar(outerContainer) ?? '');
|
|
29597
29486
|
editor.addCommand('ToggleView', (_ui, value) => {
|
|
29598
29487
|
if (OuterContainer.toggleView(outerContainer, value)) {
|
|
29599
29488
|
const target = outerContainer.element;
|
|
@@ -29610,7 +29499,7 @@
|
|
|
29610
29499
|
fireToggleView(editor);
|
|
29611
29500
|
}
|
|
29612
29501
|
});
|
|
29613
|
-
editor.addQueryValueHandler('ToggleView', () =>
|
|
29502
|
+
editor.addQueryValueHandler('ToggleView', () => OuterContainer.whichView(outerContainer) ?? '');
|
|
29614
29503
|
const toolbarMode = getToolbarMode(editor);
|
|
29615
29504
|
const refreshDrawer = () => {
|
|
29616
29505
|
OuterContainer.refreshToolbar(uiRefs.mainUi.outerContainer);
|
|
@@ -29801,14 +29690,13 @@
|
|
|
29801
29690
|
const getTop = () => offsetParent.fold(() => isPositionedAtTop()
|
|
29802
29691
|
? Math.max(targetBounds.y - get$d(container.element) + offset, 0)
|
|
29803
29692
|
: targetBounds.bottom, (offsetParent) => {
|
|
29804
|
-
var _a;
|
|
29805
29693
|
// Because for ui_mode: split, the main mothership (which includes the toolbar) is moved and added as a sibling
|
|
29806
29694
|
// If there's any relative position div set as the parent and the offsetParent is no longer the body,
|
|
29807
29695
|
// the absolute top/left positions would no longer be correct
|
|
29808
29696
|
// When there's a relative div and the position is the same as the toolbar container
|
|
29809
29697
|
// then it would produce a negative top as it needs to be positioned on top of the offsetParent
|
|
29810
29698
|
const offsetBox = box$1(offsetParent);
|
|
29811
|
-
const scrollDelta =
|
|
29699
|
+
const scrollDelta = offsetParent.dom.scrollTop ?? 0;
|
|
29812
29700
|
const isOffsetParentBody = eq(offsetParent, body());
|
|
29813
29701
|
const topValue = isOffsetParentBody
|
|
29814
29702
|
? Math.max(targetBounds.y - get$d(container.element) + offset, 0)
|
|
@@ -30223,6 +30111,11 @@
|
|
|
30223
30111
|
}
|
|
30224
30112
|
});
|
|
30225
30113
|
};
|
|
30114
|
+
const getFormParentApi = (comp, valueState, focusfallbackElement) => {
|
|
30115
|
+
const parent$1 = parent(comp.element);
|
|
30116
|
+
const parentCompOpt = parent$1.bind((parent) => comp.getSystem().getByDom(parent).toOptional());
|
|
30117
|
+
return getFormApi(parentCompOpt.getOr(comp), valueState, focusfallbackElement);
|
|
30118
|
+
};
|
|
30226
30119
|
|
|
30227
30120
|
const runOnExecute = (memInput, original, valueState) => run$1(internalToolbarButtonExecute, (comp, se) => {
|
|
30228
30121
|
const input = memInput.get(comp);
|
|
@@ -30466,7 +30359,7 @@
|
|
|
30466
30359
|
|
|
30467
30360
|
const renderContextFormSliderInput = (ctx, providers, onEnter, valueState) => {
|
|
30468
30361
|
const editorOffCell = Cell(noop);
|
|
30469
|
-
const getApi = (comp) =>
|
|
30362
|
+
const getApi = (comp) => getFormParentApi(comp, valueState);
|
|
30470
30363
|
const pLabel = ctx.label.map((label) => FormField.parts.label({
|
|
30471
30364
|
dom: { tag: 'label', classes: ['tox-label'] },
|
|
30472
30365
|
components: [text$2(providers.translate(label))]
|
|
@@ -30520,7 +30413,7 @@
|
|
|
30520
30413
|
|
|
30521
30414
|
const renderContextFormTextInput = (ctx, providers, onEnter, valueState) => {
|
|
30522
30415
|
const editorOffCell = Cell(noop);
|
|
30523
|
-
const getFormApi
|
|
30416
|
+
const getFormApi = (comp) => getFormParentApi(comp, valueState);
|
|
30524
30417
|
const pLabel = ctx.label.map((label) => FormField.parts.label({
|
|
30525
30418
|
dom: { tag: 'label', classes: ['tox-label'] },
|
|
30526
30419
|
components: [text$2(providers.translate(label))]
|
|
@@ -30560,13 +30453,13 @@
|
|
|
30560
30453
|
onSetup: ctx.onSetup,
|
|
30561
30454
|
getApi: (comp) => {
|
|
30562
30455
|
const closestFocussableOpt = ancestor$1(comp.element, '.tox-toolbar').bind((toolbar) => descendant(toolbar, 'button:enabled'));
|
|
30563
|
-
return closestFocussableOpt.fold(() =>
|
|
30456
|
+
return closestFocussableOpt.fold(() => getFormParentApi(comp, valueState), (closestFocussable) => getFormParentApi(comp, valueState, closestFocussable));
|
|
30564
30457
|
},
|
|
30565
30458
|
onBeforeSetup: Keying.focusIn
|
|
30566
30459
|
}, editorOffCell),
|
|
30567
|
-
onContextFormControlDetached({ getApi: getFormApi
|
|
30460
|
+
onContextFormControlDetached({ getApi: getFormApi }, editorOffCell, valueState),
|
|
30568
30461
|
run$1(input(), (comp) => {
|
|
30569
|
-
ctx.onInput(getFormApi
|
|
30462
|
+
ctx.onInput(getFormApi(comp));
|
|
30570
30463
|
})
|
|
30571
30464
|
])
|
|
30572
30465
|
])
|
|
@@ -31020,6 +30913,14 @@
|
|
|
31020
30913
|
},
|
|
31021
30914
|
onBack: () => {
|
|
31022
30915
|
fireContextFormSlideBack(editor);
|
|
30916
|
+
},
|
|
30917
|
+
focusElement: (el) => {
|
|
30918
|
+
if (editor.getBody().contains(el.dom)) {
|
|
30919
|
+
editor.focus();
|
|
30920
|
+
}
|
|
30921
|
+
else {
|
|
30922
|
+
focus$4(el);
|
|
30923
|
+
}
|
|
31023
30924
|
}
|
|
31024
30925
|
});
|
|
31025
30926
|
const contextbar = build$1(contextToolbarResult.sketch);
|
|
@@ -31342,7 +31243,7 @@
|
|
|
31342
31243
|
getOptions: constant$1(settings),
|
|
31343
31244
|
hash: (input) => isUndefined(input.customCode) ? input.code : `${input.code}/${input.customCode}`,
|
|
31344
31245
|
display: (input) => input.title,
|
|
31345
|
-
watcher: (editor, value, callback) =>
|
|
31246
|
+
watcher: (editor, value, callback) => editor.formatter.formatChanged('lang', callback, false, { value: value.code, customValue: value.customCode ?? null }).unbind,
|
|
31346
31247
|
getCurrent: (editor) => {
|
|
31347
31248
|
const node = SugarElement.fromDom(editor.selection.getNode());
|
|
31348
31249
|
return closest(node, (n) => Optional.some(n)
|
|
@@ -31407,7 +31308,7 @@
|
|
|
31407
31308
|
editor.ui.registry.addButton('indent', {
|
|
31408
31309
|
tooltip: 'Increase indent',
|
|
31409
31310
|
icon: 'indent',
|
|
31410
|
-
onSetup: onSetupEditableToggle(editor),
|
|
31311
|
+
onSetup: onSetupEditableToggle(editor, () => editor.queryCommandState('indent')),
|
|
31411
31312
|
onAction: onActionExecCommand(editor, 'indent')
|
|
31412
31313
|
});
|
|
31413
31314
|
};
|
|
@@ -32235,8 +32136,7 @@
|
|
|
32235
32136
|
|
|
32236
32137
|
const isHidden = (elm) => elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus') || elm.getAttribute('data-mce-type') === 'bookmark';
|
|
32237
32138
|
const renderElementPath = (editor, settings, providersBackstage) => {
|
|
32238
|
-
|
|
32239
|
-
const delimiter = (_a = settings.delimiter) !== null && _a !== void 0 ? _a : '\u203A';
|
|
32139
|
+
const delimiter = settings.delimiter ?? '\u203A';
|
|
32240
32140
|
const renderElement = (name, element, index) => Button.sketch({
|
|
32241
32141
|
dom: {
|
|
32242
32142
|
tag: 'div',
|
|
@@ -32348,24 +32248,36 @@
|
|
|
32348
32248
|
ResizeTypes[ResizeTypes["Both"] = 1] = "Both";
|
|
32349
32249
|
ResizeTypes[ResizeTypes["Vertical"] = 2] = "Vertical";
|
|
32350
32250
|
})(ResizeTypes || (ResizeTypes = {}));
|
|
32351
|
-
const
|
|
32352
|
-
const
|
|
32353
|
-
|
|
32251
|
+
const getOriginalDimensions = (editor) => {
|
|
32252
|
+
const container = SugarElement.fromDom(editor.getContainer());
|
|
32253
|
+
const originalHeight = get$d(container);
|
|
32254
|
+
const originalWidth = get$c(container);
|
|
32255
|
+
return {
|
|
32256
|
+
height: originalHeight,
|
|
32257
|
+
width: originalWidth,
|
|
32354
32258
|
};
|
|
32259
|
+
};
|
|
32260
|
+
const getDimensions = (editor, deltas, resizeType, originalDimentions) => {
|
|
32261
|
+
const height = calcCappedSize(originalDimentions.height + deltas.top, getMinHeightOption(editor), getMaxHeightOption(editor));
|
|
32355
32262
|
if (resizeType === ResizeTypes.Both) {
|
|
32356
|
-
|
|
32263
|
+
return {
|
|
32264
|
+
height,
|
|
32265
|
+
width: calcCappedSize(originalDimentions.width + deltas.left, getMinWidthOption(editor), getMaxWidthOption(editor))
|
|
32266
|
+
};
|
|
32357
32267
|
}
|
|
32358
|
-
return
|
|
32268
|
+
return { height };
|
|
32359
32269
|
};
|
|
32360
32270
|
const resize = (editor, deltas, resizeType) => {
|
|
32361
32271
|
const container = SugarElement.fromDom(editor.getContainer());
|
|
32362
|
-
const
|
|
32272
|
+
const originalDimensions = getOriginalDimensions(editor);
|
|
32273
|
+
const dimensions = getDimensions(editor, deltas, resizeType, originalDimensions);
|
|
32363
32274
|
each(dimensions, (val, dim) => {
|
|
32364
32275
|
if (isNumber(val)) {
|
|
32365
32276
|
set$7(container, dim, numToPx(val));
|
|
32366
32277
|
}
|
|
32367
32278
|
});
|
|
32368
32279
|
fireResizeEditor(editor);
|
|
32280
|
+
return dimensions;
|
|
32369
32281
|
};
|
|
32370
32282
|
|
|
32371
32283
|
const getResizeType = (editor) => {
|
|
@@ -32380,10 +32292,19 @@
|
|
|
32380
32292
|
return ResizeTypes.Vertical;
|
|
32381
32293
|
}
|
|
32382
32294
|
};
|
|
32383
|
-
const
|
|
32295
|
+
const getAriaValuetext = (dimensions, resizeType) => {
|
|
32296
|
+
return resizeType === ResizeTypes.Both
|
|
32297
|
+
? global$6.translate([`Editor's height: {0} pixels, Editor's width: {1} pixels`, dimensions.height, dimensions.width])
|
|
32298
|
+
: global$6.translate([`Editor's height: {0} pixels`, dimensions.height]);
|
|
32299
|
+
};
|
|
32300
|
+
const setAriaValuetext = (comp, dimensions, resizeType) => {
|
|
32301
|
+
set$9(comp.element, 'aria-valuetext', getAriaValuetext(dimensions, resizeType));
|
|
32302
|
+
};
|
|
32303
|
+
const keyboardHandler = (editor, comp, resizeType, x, y) => {
|
|
32384
32304
|
const scale = 20;
|
|
32385
32305
|
const delta = SugarPosition(x * scale, y * scale);
|
|
32386
|
-
resize(editor, delta, resizeType);
|
|
32306
|
+
const newDimentions = resize(editor, delta, resizeType);
|
|
32307
|
+
setAriaValuetext(comp, newDimentions, resizeType);
|
|
32387
32308
|
return Optional.some(true);
|
|
32388
32309
|
};
|
|
32389
32310
|
const renderResizeHandler = (editor, providersBackstage) => {
|
|
@@ -32392,8 +32313,8 @@
|
|
|
32392
32313
|
return Optional.none();
|
|
32393
32314
|
}
|
|
32394
32315
|
const resizeLabel = resizeType === ResizeTypes.Both
|
|
32395
|
-
? 'Press the arrow keys to resize the editor.'
|
|
32396
|
-
: 'Press the Up and Down arrow keys to resize the editor.';
|
|
32316
|
+
? global$6.translate('Press the arrow keys to resize the editor.')
|
|
32317
|
+
: global$6.translate('Press the Up and Down arrow keys to resize the editor.');
|
|
32397
32318
|
const cursorClass = resizeType === ResizeTypes.Both
|
|
32398
32319
|
? 'tox-statusbar__resize-cursor-both'
|
|
32399
32320
|
: 'tox-statusbar__resize-cursor-default';
|
|
@@ -32402,28 +32323,48 @@
|
|
|
32402
32323
|
classes: ['tox-statusbar__resize-handle', cursorClass],
|
|
32403
32324
|
attributes: {
|
|
32404
32325
|
'aria-label': providersBackstage.translate(resizeLabel),
|
|
32405
|
-
'data-mce-name': 'resize-handle'
|
|
32326
|
+
'data-mce-name': 'resize-handle',
|
|
32327
|
+
'role': 'separator'
|
|
32406
32328
|
},
|
|
32407
32329
|
behaviours: [
|
|
32408
32330
|
Dragging.config({
|
|
32409
32331
|
mode: 'mouse',
|
|
32410
32332
|
repositionTarget: false,
|
|
32411
|
-
onDrag: (
|
|
32333
|
+
onDrag: (comp, _target, delta) => {
|
|
32334
|
+
const newDimentions = resize(editor, delta, resizeType);
|
|
32335
|
+
setAriaValuetext(comp, newDimentions, resizeType);
|
|
32336
|
+
},
|
|
32412
32337
|
blockerClass: 'tox-blocker'
|
|
32413
32338
|
}),
|
|
32414
32339
|
Keying.config({
|
|
32415
32340
|
mode: 'special',
|
|
32416
|
-
onLeft: () => keyboardHandler(editor, resizeType, -1, 0),
|
|
32417
|
-
onRight: () => keyboardHandler(editor, resizeType, 1, 0),
|
|
32418
|
-
onUp: () => keyboardHandler(editor, resizeType, 0, -1),
|
|
32419
|
-
onDown: () => keyboardHandler(editor, resizeType, 0, 1),
|
|
32341
|
+
onLeft: (comp) => keyboardHandler(editor, comp, resizeType, -1, 0),
|
|
32342
|
+
onRight: (comp) => keyboardHandler(editor, comp, resizeType, 1, 0),
|
|
32343
|
+
onUp: (comp) => keyboardHandler(editor, comp, resizeType, 0, -1),
|
|
32344
|
+
onDown: (comp) => keyboardHandler(editor, comp, resizeType, 0, 1),
|
|
32420
32345
|
}),
|
|
32421
32346
|
Tabstopping.config({}),
|
|
32422
32347
|
Focusing.config({}),
|
|
32423
32348
|
Tooltipping.config(providersBackstage.tooltips.getConfig({
|
|
32424
32349
|
tooltipText: providersBackstage.translate('Resize')
|
|
32425
|
-
}))
|
|
32426
|
-
|
|
32350
|
+
})),
|
|
32351
|
+
config('set-aria-valuetext', [
|
|
32352
|
+
runOnAttached((comp) => {
|
|
32353
|
+
const setInitialValuetext = () => {
|
|
32354
|
+
setAriaValuetext(comp, getOriginalDimensions(editor), resizeType);
|
|
32355
|
+
};
|
|
32356
|
+
if (editor._skinLoaded) {
|
|
32357
|
+
setInitialValuetext();
|
|
32358
|
+
}
|
|
32359
|
+
else {
|
|
32360
|
+
editor.once('SkinLoaded', setInitialValuetext);
|
|
32361
|
+
}
|
|
32362
|
+
})
|
|
32363
|
+
])
|
|
32364
|
+
],
|
|
32365
|
+
eventOrder: {
|
|
32366
|
+
[attachedToDom()]: ['add-focusable', 'set-aria-valuetext']
|
|
32367
|
+
}
|
|
32427
32368
|
}, providersBackstage.icons));
|
|
32428
32369
|
};
|
|
32429
32370
|
|
|
@@ -32906,8 +32847,12 @@
|
|
|
32906
32847
|
editor.addShortcut('alt+F10', 'focus toolbar', () => {
|
|
32907
32848
|
OuterContainer.focusToolbar(outerContainer);
|
|
32908
32849
|
});
|
|
32909
|
-
editor.addCommand('ToggleToolbarDrawer', (_ui, options) => {
|
|
32910
|
-
if (options
|
|
32850
|
+
editor.addCommand('ToggleToolbarDrawer', (_ui, options, args) => {
|
|
32851
|
+
if (options?.skipFocus) {
|
|
32852
|
+
logFeatureDeprecationWarning('skipFocus');
|
|
32853
|
+
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32854
|
+
}
|
|
32855
|
+
else if (args?.skip_focus) {
|
|
32911
32856
|
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32912
32857
|
}
|
|
32913
32858
|
else {
|
|
@@ -32915,6 +32860,11 @@
|
|
|
32915
32860
|
}
|
|
32916
32861
|
});
|
|
32917
32862
|
editor.addQueryStateHandler('ToggleToolbarDrawer', () => OuterContainer.isToolbarDrawerToggled(outerContainer));
|
|
32863
|
+
editor.on('blur', () => {
|
|
32864
|
+
if (getToolbarMode(editor) === ToolbarMode$1.floating && OuterContainer.isToolbarDrawerToggled(outerContainer)) {
|
|
32865
|
+
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32866
|
+
}
|
|
32867
|
+
});
|
|
32918
32868
|
};
|
|
32919
32869
|
const renderUIWithRefs = (uiRefs) => {
|
|
32920
32870
|
const { mainUi, popupUi, uiMotherships } = uiRefs;
|