maglevcms 2.0.0 → 3.0.0.beta1
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.
- checksums.yaml +4 -4
- data/README.md +53 -13
- data/Rakefile +0 -4
- data/app/assets/builds/maglev/tailwind.css +14393 -0
- data/app/assets/config/maglev_manifest.js +7 -0
- data/app/assets/javascripts/maglev/client/dom-operations.js +282 -0
- data/app/{frontend/live-preview-client → assets/javascripts/maglev/client}/iframe-decorator.js +81 -15
- data/app/{frontend/live-preview-client/message.js → assets/javascripts/maglev/client/incoming-messages.js} +14 -12
- data/app/assets/javascripts/maglev/client/index.js +26 -0
- data/app/{frontend/live-preview-client → assets/javascripts/maglev/client}/utils.js +4 -0
- data/app/assets/javascripts/maglev/editor/controllers/app/forms/section_form_controller.js +46 -0
- data/app/assets/javascripts/maglev/editor/controllers/app/forms/style_form_controller.js +19 -0
- data/app/assets/javascripts/maglev/editor/controllers/app/index.js +15 -0
- data/app/assets/javascripts/maglev/editor/controllers/app/page_preview_controller.js +163 -0
- data/app/assets/javascripts/maglev/editor/controllers/app/preview_notification_center_controller.js +151 -0
- data/app/assets/javascripts/maglev/editor/controllers/app/setting_controller.js +42 -0
- data/app/assets/javascripts/maglev/editor/controllers/application.js +9 -0
- data/app/assets/javascripts/maglev/editor/controllers/index.js +3 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/auto_save_controller.js +16 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/broken_image_controller.js +16 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/copy_to_clipboard_controller.js +36 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/disappearance_controller.js +21 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/dispatcher_controller.js +12 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/form_refresh_controller.js +15 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/index.js +27 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/max_length_controller.js +30 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/prevent_same_path.js +20 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/reload_page_controller.js +7 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/sortable_controller.js +64 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/submit_button_controller.js +45 -0
- data/app/assets/javascripts/maglev/editor/controllers/shared/transition_controller.js +14 -0
- data/app/assets/javascripts/maglev/editor/controllers/uikit.js +39 -0
- data/app/assets/javascripts/maglev/editor/controllers/utils.js +10 -0
- data/app/assets/javascripts/maglev/editor/index.js +66 -0
- data/app/assets/stylesheets/maglev/application.css +88 -0
- data/app/{frontend/editor/design/components/rich-text-editor.scss → assets/stylesheets/maglev/tailwind.css.erb} +30 -15
- data/app/components/maglev/editor/setting_registry.rb +59 -0
- data/app/components/maglev/editor/settings/base_component.rb +55 -0
- data/app/components/maglev/editor/settings/checkbox/checkbox_component.html.erb +16 -0
- data/app/components/maglev/editor/settings/checkbox/checkbox_component.rb +12 -0
- data/app/components/maglev/editor/settings/collection_item/collection_item_component.html.erb +25 -0
- data/app/components/maglev/editor/settings/collection_item/collection_item_component.rb +19 -0
- data/app/components/maglev/editor/settings/color/color_component.html.erb +17 -0
- data/app/components/maglev/editor/settings/color/color_component.rb +12 -0
- data/app/components/maglev/editor/settings/divider/divider_component.html.erb +12 -0
- data/app/components/maglev/editor/settings/divider/divider_component.rb +15 -0
- data/app/components/maglev/editor/settings/hint/hint_component.html.erb +3 -0
- data/app/components/maglev/editor/settings/hint/hint_component.rb +12 -0
- data/app/components/maglev/editor/settings/icon/icon_component.html.erb +21 -0
- data/app/components/maglev/editor/settings/icon/icon_component.rb +15 -0
- data/app/components/maglev/editor/settings/image/image_component.html.erb +26 -0
- data/app/components/maglev/editor/settings/image/image_component.rb +23 -0
- data/app/components/maglev/editor/settings/link/link_component.html.erb +22 -0
- data/app/components/maglev/editor/settings/link/link_component.rb +19 -0
- data/app/components/maglev/editor/settings/select/select_component.html.erb +20 -0
- data/app/components/maglev/editor/settings/select/select_component.rb +27 -0
- data/app/components/maglev/editor/settings/text/richtext_component.html.erb +22 -0
- data/app/components/maglev/editor/settings/text/richtext_component.rb +12 -0
- data/app/components/maglev/editor/settings/text/text_component.html.erb +18 -0
- data/app/components/maglev/editor/settings/text/text_component.rb +12 -0
- data/app/components/maglev/editor/settings/text/textarea_component.html.erb +21 -0
- data/app/components/maglev/editor/settings/text/textarea_component.rb +12 -0
- data/app/components/maglev/editor/settings_group_component.html.erb +5 -0
- data/app/components/maglev/editor/settings_group_component.rb +30 -0
- data/app/components/maglev/section_component.rb +10 -7
- data/app/components/maglev/uikit/app_layout/layout_component.html.erb +15 -0
- data/app/components/maglev/uikit/app_layout/layout_component.rb +19 -0
- data/app/components/maglev/uikit/app_layout/sidebar/link_component.html.erb +5 -0
- data/app/components/maglev/uikit/app_layout/sidebar/link_component.rb +40 -0
- data/app/components/maglev/uikit/app_layout/sidebar_component.html.erb +19 -0
- data/app/components/maglev/uikit/app_layout/sidebar_component.rb +11 -0
- data/app/components/maglev/uikit/app_layout/topbar/logo_component.html.erb +3 -0
- data/app/components/maglev/uikit/app_layout/topbar/logo_component.rb +18 -0
- data/app/components/maglev/uikit/app_layout/topbar/page_info_component.html.erb +26 -0
- data/app/components/maglev/uikit/app_layout/topbar/page_info_component.rb +28 -0
- data/app/components/maglev/uikit/app_layout/topbar_component.html.erb +15 -0
- data/app/components/maglev/uikit/app_layout/topbar_component.rb +21 -0
- data/app/components/maglev/uikit/badge_component.rb +40 -0
- data/app/components/maglev/uikit/base_component.rb +15 -0
- data/app/components/maglev/uikit/breadcrumbs/breadcrumbs_component.html.erb +10 -0
- data/app/components/maglev/uikit/breadcrumbs/breadcrumbs_component.rb +11 -0
- data/app/components/maglev/uikit/breadcrumbs/link_component.html.erb +12 -0
- data/app/components/maglev/uikit/breadcrumbs/link_component.rb +25 -0
- data/app/components/maglev/uikit/collapsible/collapsible_component.html.erb +5 -0
- data/app/components/maglev/uikit/collapsible/collapsible_component.rb +11 -0
- data/app/components/maglev/uikit/collapsible/collapsible_controller.js +9 -0
- data/app/components/maglev/uikit/collapsible/item_component.html.erb +17 -0
- data/app/components/maglev/uikit/collapsible/item_component.rb +11 -0
- data/app/components/maglev/uikit/device_toggler_component/device_toggler_component.html.erb +16 -0
- data/app/components/maglev/uikit/device_toggler_component/device_toggler_controller.js +25 -0
- data/app/components/maglev/uikit/device_toggler_component.rb +28 -0
- data/app/components/maglev/uikit/dropdown_component/dropdown_component.html.erb +18 -0
- data/app/components/maglev/uikit/dropdown_component/dropdown_controller.js +69 -0
- data/app/components/maglev/uikit/dropdown_component.rb +15 -0
- data/app/components/maglev/uikit/form/checkbox_component.html.erb +17 -0
- data/app/components/maglev/uikit/form/checkbox_component.rb +26 -0
- data/app/components/maglev/uikit/form/checkbox_controller.js +7 -0
- data/app/components/maglev/uikit/form/color_field_component.html.erb +76 -0
- data/app/components/maglev/uikit/form/color_field_component.rb +57 -0
- data/app/components/maglev/uikit/form/color_field_controller.js +25 -0
- data/app/components/maglev/uikit/form/combobox/list_component.html.erb +14 -0
- data/app/components/maglev/uikit/form/combobox/list_component.rb +13 -0
- data/app/components/maglev/uikit/form/combobox/option_component.html.erb +16 -0
- data/app/components/maglev/uikit/form/combobox/option_component.rb +22 -0
- data/app/components/maglev/uikit/form/combobox_component.html.erb +75 -0
- data/app/components/maglev/uikit/form/combobox_component.rb +64 -0
- data/app/components/maglev/uikit/form/combobox_controller.js +385 -0
- data/app/components/maglev/uikit/form/icon_field_component.html.erb +76 -0
- data/app/components/maglev/uikit/form/icon_field_component.rb +35 -0
- data/app/components/maglev/uikit/form/icon_field_controller.js +38 -0
- data/app/components/maglev/uikit/form/image_field_component.html.erb +101 -0
- data/app/components/maglev/uikit/form/image_field_component.rb +52 -0
- data/app/components/maglev/uikit/form/image_field_controller.js +74 -0
- data/app/components/maglev/uikit/form/link/base_component.rb +19 -0
- data/app/components/maglev/uikit/form/link/email_link_component.html.erb +16 -0
- data/app/components/maglev/uikit/form/link/email_link_component.rb +12 -0
- data/app/components/maglev/uikit/form/link/page_link_component.html.erb +17 -0
- data/app/components/maglev/uikit/form/link/page_link_component.rb +12 -0
- data/app/components/maglev/uikit/form/link/static_page_link_component.html.erb +16 -0
- data/app/components/maglev/uikit/form/link/static_page_link_component.rb +12 -0
- data/app/components/maglev/uikit/form/link/url_link_component.html.erb +16 -0
- data/app/components/maglev/uikit/form/link/url_link_component.rb +19 -0
- data/app/components/maglev/uikit/form/link_component.html.erb +55 -0
- data/app/components/maglev/uikit/form/link_component.rb +80 -0
- data/app/components/maglev/uikit/form/link_controller.js +36 -0
- data/app/components/maglev/uikit/form/richtext/block_button_component.html.erb +38 -0
- data/app/components/maglev/uikit/form/richtext/block_button_component.rb +22 -0
- data/app/components/maglev/uikit/form/richtext/button_component.html.erb +16 -0
- data/app/components/maglev/uikit/form/richtext/button_component.rb +19 -0
- data/app/components/maglev/uikit/form/richtext/button_group_component.html.erb +7 -0
- data/app/components/maglev/uikit/form/richtext/button_group_component.rb +13 -0
- data/app/components/maglev/uikit/form/richtext/toolbar_component.html.erb +23 -0
- data/app/components/maglev/uikit/form/richtext/toolbar_component.rb +19 -0
- data/app/components/maglev/uikit/form/richtext_component.html.erb +28 -0
- data/app/components/maglev/uikit/form/richtext_component.rb +54 -0
- data/app/components/maglev/uikit/form/richtext_controller.js +248 -0
- data/app/components/maglev/uikit/form/search_form_component.html.erb +24 -0
- data/app/components/maglev/uikit/form/search_form_component.rb +42 -0
- data/app/components/maglev/uikit/form/search_form_controller.js +31 -0
- data/app/components/maglev/uikit/form/select_component.html.erb +19 -0
- data/app/components/maglev/uikit/form/select_component.rb +52 -0
- data/app/components/maglev/uikit/form/select_controller.js +7 -0
- data/app/components/maglev/uikit/form/text_field_component.html.erb +26 -0
- data/app/components/maglev/uikit/form/text_field_component.rb +42 -0
- data/app/components/maglev/uikit/form/text_field_controller.js +18 -0
- data/app/components/maglev/uikit/form/textarea_component.html.erb +43 -0
- data/app/components/maglev/uikit/form/textarea_component.rb +53 -0
- data/app/components/maglev/uikit/icon_button_component/icon_button_component.html.erb +3 -0
- data/app/components/maglev/uikit/icon_button_component.rb +18 -0
- data/app/components/maglev/uikit/icon_component.rb +140 -0
- data/app/components/maglev/uikit/image_library/card_component.html.erb +41 -0
- data/app/components/maglev/uikit/image_library/card_component.rb +52 -0
- data/app/components/maglev/uikit/image_library/list_component.html.erb +7 -0
- data/app/components/maglev/uikit/image_library/list_component.rb +11 -0
- data/app/components/maglev/uikit/image_library/uploader_component.html.erb +30 -0
- data/app/components/maglev/uikit/image_library/uploader_component.rb +29 -0
- data/app/components/maglev/uikit/image_library/uploader_controller.js +74 -0
- data/app/components/maglev/uikit/list/insert_button_component.html.erb +7 -0
- data/app/components/maglev/uikit/list/insert_button_component.rb +40 -0
- data/app/components/maglev/uikit/list/list_component.html.erb +17 -0
- data/app/components/maglev/uikit/list/list_component.rb +34 -0
- data/app/components/maglev/uikit/list/list_item_component.html.erb +47 -0
- data/app/components/maglev/uikit/list/list_item_component.rb +85 -0
- data/app/components/maglev/uikit/locale_switcher_component/locale_switcher_component.html.erb +22 -0
- data/app/components/maglev/uikit/locale_switcher_component.rb +18 -0
- data/app/components/maglev/uikit/menu_dropdown_component/menu_dropdown_component.html.erb +15 -0
- data/app/components/maglev/uikit/menu_dropdown_component.rb +32 -0
- data/app/components/maglev/uikit/modal_component/modal_component.html.erb +63 -0
- data/app/components/maglev/uikit/modal_component/modal_controller.js +47 -0
- data/app/components/maglev/uikit/modal_component.rb +33 -0
- data/app/components/maglev/uikit/page_actions_dropdown_component/page_actions_dropdown_component.html.erb +56 -0
- data/app/components/maglev/uikit/page_actions_dropdown_component.rb +24 -0
- data/app/components/maglev/uikit/page_layout_component/back_link_component.html.erb +4 -0
- data/app/components/maglev/uikit/page_layout_component/page_layout_component.html.erb +58 -0
- data/app/components/maglev/uikit/page_layout_component/page_layout_controller.js +34 -0
- data/app/components/maglev/uikit/page_layout_component.rb +42 -0
- data/app/components/maglev/uikit/pagination_component/pagination_component.html.erb +70 -0
- data/app/components/maglev/uikit/pagination_component.rb +25 -0
- data/app/components/maglev/uikit/section_toolbar/bottom_component.html.erb +13 -0
- data/app/components/maglev/uikit/section_toolbar/bottom_component.rb +27 -0
- data/app/components/maglev/uikit/section_toolbar/section_toolbar_component.html.erb +17 -0
- data/app/components/maglev/uikit/section_toolbar/section_toolbar_component.rb +18 -0
- data/app/components/maglev/uikit/section_toolbar/section_toolbar_controller.js +90 -0
- data/app/components/maglev/uikit/section_toolbar/top_left_corner_component.html.erb +16 -0
- data/app/components/maglev/uikit/section_toolbar/top_left_corner_component.rb +15 -0
- data/app/components/maglev/uikit/section_toolbar/top_right_corner_component.html.erb +28 -0
- data/app/components/maglev/uikit/section_toolbar/top_right_corner_component.rb +28 -0
- data/app/components/maglev/uikit/tabs_component/tabs_component.html.erb +35 -0
- data/app/components/maglev/uikit/tabs_component/tabs_controller.js +57 -0
- data/app/components/maglev/uikit/tabs_component.rb +71 -0
- data/app/controllers/concerns/maglev/content_locale_concern.rb +5 -1
- data/app/controllers/concerns/maglev/editor/errors_concern.rb +45 -0
- data/app/controllers/concerns/maglev/fetchers_concern.rb +3 -6
- data/app/controllers/concerns/maglev/flash_i18n_concern.rb +11 -0
- data/app/controllers/maglev/application_controller.rb +1 -7
- data/app/controllers/maglev/editor/assets_controller.rb +59 -0
- data/app/controllers/maglev/editor/base_controller.rb +111 -0
- data/app/controllers/maglev/editor/combobox/collection_items_controller.rb +17 -0
- data/app/controllers/maglev/editor/combobox/pages_controller.rb +20 -0
- data/app/controllers/maglev/editor/home_controller.rb +25 -0
- data/app/controllers/maglev/editor/icons_controller.rb +24 -0
- data/app/controllers/maglev/editor/links_controller.rb +52 -0
- data/app/controllers/maglev/editor/page_clone_controller.rb +20 -0
- data/app/controllers/maglev/editor/pages_controller.rb +77 -0
- data/app/controllers/maglev/editor/publication_controller.rb +14 -0
- data/app/controllers/maglev/editor/section_blocks_controller.rb +101 -0
- data/app/controllers/maglev/editor/sections_controller.rb +96 -0
- data/app/controllers/maglev/editor/style_controller.rb +31 -0
- data/app/controllers/maglev/page_preview_controller.rb +1 -5
- data/app/controllers/maglev/published_page_preview_controller.rb +50 -0
- data/app/controllers/maglev/sitemap_controller.rb +1 -1
- data/app/helpers/maglev/application_helper.rb +148 -18
- data/app/helpers/maglev/editor/pages_helper.rb +23 -0
- data/app/helpers/maglev/editor/section_blocks_helper.rb +124 -0
- data/app/helpers/maglev/editor/settings_helper.rb +52 -0
- data/app/helpers/maglev/page_preview_helper.rb +1 -1
- data/app/lib/maglev/form/form_builder.rb +38 -0
- data/app/lib/maglev/form/inputs/check_box.rb +20 -0
- data/app/lib/maglev/form/inputs/combobox.rb +33 -0
- data/app/lib/maglev/form/inputs/image_field.rb +39 -0
- data/app/lib/maglev/form/inputs/richtext.rb +34 -0
- data/app/lib/maglev/form/inputs/select.rb +34 -0
- data/app/lib/maglev/form/inputs/text_field.rb +32 -0
- data/app/lib/maglev/form/inputs/textarea.rb +30 -0
- data/app/lib/maglev/turbo/streams/tag_builder.rb +17 -0
- data/app/models/concerns/maglev/content/enhanced_value_concern.rb +40 -0
- data/app/models/concerns/maglev/sections_concern.rb +30 -1
- data/app/models/concerns/maglev/translatable.rb +23 -4
- data/app/models/maglev/application_record.rb +10 -0
- data/app/models/maglev/asset.rb +1 -3
- data/app/models/maglev/content/block_content.rb +96 -0
- data/app/models/maglev/content/editor_link.rb +49 -0
- data/app/models/maglev/content/section_content.rb +85 -0
- data/app/models/maglev/content/setting_content.rb +33 -0
- data/app/models/maglev/page/path_concern.rb +7 -0
- data/app/models/maglev/page/search_concern.rb +24 -7
- data/app/models/maglev/page.rb +3 -0
- data/app/models/maglev/section/block.rb +43 -6
- data/app/models/maglev/section/content_concern.rb +15 -1
- data/app/models/maglev/section/setting.rb +12 -0
- data/app/models/maglev/section.rb +52 -4
- data/app/models/maglev/sections_content_store.rb +36 -0
- data/app/models/maglev/setting_types/base.rb +8 -0
- data/app/models/maglev/setting_types/collection_item.rb +5 -1
- data/app/models/maglev/setting_types/image.rb +4 -0
- data/app/models/maglev/setting_types/link.rb +4 -0
- data/app/models/maglev/setting_types/text.rb +5 -0
- data/app/models/maglev/site/locales_concern.rb +4 -14
- data/app/models/maglev/site/style_value.rb +19 -13
- data/app/models/maglev/site.rb +8 -0
- data/app/models/maglev/theme/section_category.rb +6 -1
- data/app/models/maglev/theme/style_setting.rb +1 -1
- data/app/models/maglev/theme.rb +13 -0
- data/app/services/concerns/maglev/content/helpers_concern.rb +100 -0
- data/app/services/concerns/maglev/get_page_sections/transform_section_concern.rb +97 -0
- data/app/services/maglev/app_container.rb +27 -2
- data/app/services/maglev/content/add_section_block_service.rb +53 -0
- data/app/services/maglev/content/add_section_service.rb +99 -0
- data/app/services/maglev/content/delete_section_block_service.rb +45 -0
- data/app/services/maglev/content/delete_section_service.rb +34 -0
- data/app/services/maglev/content/sort_section_blocks_service.rb +47 -0
- data/app/services/maglev/content/update_section_block_service.rb +52 -0
- data/app/services/maglev/content/update_section_service.rb +50 -0
- data/app/services/maglev/create_page_service.rb +39 -0
- data/app/services/maglev/fetch_section_screenshot_url.rb +12 -1
- data/app/services/maglev/fetch_style.rb +22 -12
- data/app/services/maglev/get_base_url.rb +3 -1
- data/app/services/maglev/get_page_section_names.rb +1 -1
- data/app/services/maglev/get_page_sections.rb +11 -82
- data/app/services/maglev/get_published_page_sections_service.rb +48 -0
- data/app/services/maglev/persist_section_screenshot.rb +1 -1
- data/app/services/maglev/persist_style_service.rb +36 -0
- data/app/services/maglev/publish_service.rb +30 -0
- data/app/services/maglev/reset_section_content.rb +64 -0
- data/app/services/maglev/search_pages.rb +6 -2
- data/app/services/maglev/setup_pages.rb +44 -33
- data/app/types/maglev/locales_type.rb +9 -0
- data/app/views/layouts/maglev/editor/_head.html.erb +0 -0
- data/app/views/layouts/maglev/editor/_sidebar.html.erb +39 -0
- data/app/views/layouts/maglev/editor/_topbar.html.erb +45 -0
- data/app/views/layouts/maglev/editor/application.html.erb +67 -0
- data/app/views/maglev/editor/assets/_list.html.erb +33 -0
- data/app/views/maglev/editor/assets/index.html.erb +29 -0
- data/app/views/maglev/editor/combobox/collection_items/index.turbo_stream.erb +18 -0
- data/app/views/maglev/editor/combobox/pages/index.turbo_stream.erb +7 -0
- data/app/views/maglev/editor/home/index.html.erb +1 -0
- data/app/views/maglev/editor/icons/_list.html.erb +27 -0
- data/app/views/maglev/editor/icons/index.html.erb +23 -0
- data/app/views/maglev/editor/links/edit/_email.html.erb +5 -0
- data/app/views/maglev/editor/links/edit/_page.html.erb +29 -0
- data/app/views/maglev/editor/links/edit/_tabs.html.erb +11 -0
- data/app/views/maglev/editor/links/edit/_url.html.erb +7 -0
- data/app/views/maglev/editor/links/edit.html.erb +31 -0
- data/app/views/maglev/editor/links/update.turbo_stream.erb +9 -0
- data/app/views/maglev/editor/pages/_list.html.erb +28 -0
- data/app/views/maglev/editor/pages/_preview.html.erb +35 -0
- data/app/views/maglev/editor/pages/_preview_empty_message.html.erb +14 -0
- data/app/views/maglev/editor/pages/edit.html.erb +32 -0
- data/app/views/maglev/editor/pages/form/_main.html.erb +7 -0
- data/app/views/maglev/editor/pages/form/_seo.html.erb +11 -0
- data/app/views/maglev/editor/pages/form/_tabs.html.erb +8 -0
- data/app/views/maglev/editor/pages/index.html.erb +23 -0
- data/app/views/maglev/editor/pages/new.html.erb +28 -0
- data/app/views/maglev/editor/publication/create.turbo_stream.erb +1 -0
- data/app/views/maglev/editor/section_blocks/_form.html.erb +15 -0
- data/app/views/maglev/editor/section_blocks/_new.html.erb +21 -0
- data/app/views/maglev/editor/section_blocks/edit.html.erb +28 -0
- data/app/views/maglev/editor/section_blocks/index/_list.html.erb +41 -0
- data/app/views/maglev/editor/section_blocks/index/_tree.html.erb +56 -0
- data/app/views/maglev/editor/section_blocks/index.html.erb +20 -0
- data/app/views/maglev/editor/section_blocks/update.turbo_stream.erb +5 -0
- data/app/views/maglev/editor/sections/_form.html.erb +21 -0
- data/app/views/maglev/editor/sections/_list.html.erb +50 -0
- data/app/views/maglev/editor/sections/_theme_list.html.erb +32 -0
- data/app/views/maglev/editor/sections/_toolbar_list.html.erb +17 -0
- data/app/views/maglev/editor/sections/edit.html.erb +24 -0
- data/app/views/maglev/editor/sections/index.html.erb +11 -0
- data/app/views/maglev/editor/sections/new.html.erb +20 -0
- data/app/views/maglev/editor/sections/update.turbo_stream.erb +5 -0
- data/app/views/maglev/editor/shared/_button_label.html.erb +18 -0
- data/app/views/maglev/editor/shared/errors/not_authorized_error.turbo_stream.erb +17 -0
- data/app/views/maglev/editor/shared/errors/stale_object_error.turbo_stream.erb +21 -0
- data/app/views/maglev/editor/shared/errors/standard_error.turbo_stream.erb +17 -0
- data/app/views/maglev/editor/style/edit.html.erb +24 -0
- data/app/views/maglev/sitemap/index.xml.builder +1 -1
- data/config/client_importmap.rb +4 -0
- data/config/editor_importmap.rb +26 -0
- data/config/initializers/active_record_types.rb +5 -0
- data/config/initializers/migration_patches.rb +9 -0
- data/config/initializers/pagy.rb +3 -0
- data/config/locales/activerecord.ar.yml +20 -2
- data/config/locales/activerecord.en.yml +20 -2
- data/config/locales/activerecord.es.yml +15 -14
- data/config/locales/activerecord.fr.yml +15 -14
- data/config/locales/activerecord.pt-BR.yml +22 -4
- data/config/locales/editor.ar.yml +268 -0
- data/config/locales/editor.en.yml +268 -0
- data/config/locales/editor.es.yml +268 -0
- data/config/locales/editor.fr.yml +268 -0
- data/config/locales/editor.pt-BR.yml +268 -0
- data/config/locales/uikit.ar.yml +14 -0
- data/config/locales/uikit.en.yml +14 -0
- data/config/locales/uikit.es.yml +14 -0
- data/config/locales/uikit.fr.yml +14 -0
- data/config/locales/uikit.pt-BR.yml +14 -0
- data/config/routes.rb +34 -35
- data/db/migrate/20200831101942_create_maglev_section_content.rb +4 -0
- data/db/migrate/20210819092740_switch_to_localized_page_fields.rb +8 -2
- data/db/migrate/20211008064437_add_locales_to_sites.rb +2 -0
- data/db/migrate/20211013210954_translate_section_content.rb +6 -2
- data/db/migrate/20211203224112_add_open_graph_tags_to_pages.rb +4 -0
- data/db/migrate/20220612092235_add_style_to_sites.rb +2 -0
- data/db/migrate/20250929203214_create_maglev_sections_content_stores.rb +21 -0
- data/exe/tailwind-cli +29 -0
- data/lib/commands/maglev/change_site_locales_command.rb +1 -1
- data/lib/commands/maglev/create_site_command.rb +1 -1
- data/lib/commands/maglev/publish_site_command.rb +46 -0
- data/lib/commands/maglev/sections/remove_command.rb +1 -1
- data/lib/commands/maglev/sections/rename_command.rb +6 -2
- data/lib/commands/maglev/sections/reset_command.rb +56 -0
- data/lib/generators/maglev/install_generator.rb +1 -6
- data/lib/generators/maglev/templates/install/config/initializers/maglev.rb +6 -2
- data/lib/generators/maglev/templates/theme/app/views/theme/layout.html.erb.tt +2 -2
- data/lib/maglev/config.rb +2 -1
- data/lib/maglev/engine.rb +34 -42
- data/lib/maglev/errors.rb +3 -0
- data/lib/maglev/version.rb +1 -1
- data/lib/maglev.rb +4 -2
- data/lib/tasks/maglev/tailwindcss.rake +38 -0
- data/lib/tasks/maglev_tasks.rake +4 -34
- metadata +355 -342
- data/.babelrc +0 -9
- data/.yarn/install-state.gz +0 -0
- data/.yarn/releases/yarn-4.4.0.cjs +0 -925
- data/.yarnrc.yml +0 -3
- data/app/controllers/maglev/admin/base_controller.rb +0 -20
- data/app/controllers/maglev/admin/dashboard_controller.rb +0 -11
- data/app/controllers/maglev/admin/sections/previews_controller.rb +0 -52
- data/app/controllers/maglev/admin/sections/screenshots_controller.rb +0 -17
- data/app/controllers/maglev/admin/themes_controller.rb +0 -19
- data/app/controllers/maglev/api/assets_controller.rb +0 -44
- data/app/controllers/maglev/api/collection_items_controller.rb +0 -21
- data/app/controllers/maglev/api/page_clones_controller.rb +0 -21
- data/app/controllers/maglev/api/pages_controller.rb +0 -65
- data/app/controllers/maglev/api/publications_controller.rb +0 -15
- data/app/controllers/maglev/api/sites_controller.rb +0 -21
- data/app/controllers/maglev/api_controller.rb +0 -61
- data/app/controllers/maglev/editor_controller.rb +0 -59
- data/app/frontend/admin/controllers/dropdown_controller.js +0 -9
- data/app/frontend/admin/controllers/iframe_controller.js +0 -16
- data/app/frontend/admin/controllers/screenshot_controller.js +0 -69
- data/app/frontend/admin/index.js +0 -10
- data/app/frontend/admin/utils/axios.js +0 -16
- data/app/frontend/editor/App.vue +0 -43
- data/app/frontend/editor/assets/remixicons/add-box-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/arrow-down-s-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/arrow-drop-left.svg +0 -1
- data/app/frontend/editor/assets/remixicons/arrow-drop-right.svg +0 -1
- data/app/frontend/editor/assets/remixicons/arrow-up-s-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/camera-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/clipboard-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/close-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/computer-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/delete-bin-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/file-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-blockquote.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-bold.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-code.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-heading-2.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-heading-3.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-heading-4.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-italic.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-link-unlink.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-link.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-list-ordered.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-list-unordered.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-paragraph.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-strikethrough.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-superscript.svg +0 -1
- data/app/frontend/editor/assets/remixicons/format-underline.svg +0 -1
- data/app/frontend/editor/assets/remixicons/home-4-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/image-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/logout-box-r-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-add-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-alert-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-book-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-bug-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-check-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-close-circle-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-close-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-delete-column.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-delete-row.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-draggable.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-drop-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-external-link-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-eye-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-eye-off-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-file-copy-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-file-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-folders-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-global-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-insert-column-left.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-insert-column-right.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-insert-row-bottom.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-insert-row-top.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-loader-4-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-mail-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-more-2-fill.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-more-fill.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-palette-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-pencil-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-play-list-add-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-settings-5-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-shadow-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-stack-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-table-2.svg +0 -1
- data/app/frontend/editor/assets/remixicons/ri-table-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/search-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/settings-4-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/smartphone-line.svg +0 -1
- data/app/frontend/editor/assets/remixicons/tablet-line.svg +0 -1
- data/app/frontend/editor/components/dynamic-form/dynamic-input.vue +0 -141
- data/app/frontend/editor/components/dynamic-form/index.vue +0 -36
- data/app/frontend/editor/components/errors/forbidden.vue +0 -24
- data/app/frontend/editor/components/errors/stale-record.vue +0 -24
- data/app/frontend/editor/components/header-nav/device-toggler.vue +0 -40
- data/app/frontend/editor/components/header-nav/index.vue +0 -77
- data/app/frontend/editor/components/header-nav/locale-toggler/index.vue +0 -51
- data/app/frontend/editor/components/header-nav/locale-toggler/locale-link.vue +0 -32
- data/app/frontend/editor/components/header-nav/page-info.vue +0 -41
- data/app/frontend/editor/components/header-nav/preview-button.vue +0 -20
- data/app/frontend/editor/components/header-nav/preview-toggler.vue +0 -40
- data/app/frontend/editor/components/header-nav/publish-button.vue +0 -77
- data/app/frontend/editor/components/header-nav/save-button.vue +0 -33
- data/app/frontend/editor/components/header-nav/separator.vue +0 -11
- data/app/frontend/editor/components/icon-library/index.vue +0 -39
- data/app/frontend/editor/components/image-library/index.vue +0 -107
- data/app/frontend/editor/components/image-library/list-item.vue +0 -93
- data/app/frontend/editor/components/image-library/list.vue +0 -26
- data/app/frontend/editor/components/image-library/uploader.vue +0 -76
- data/app/frontend/editor/components/kit/accordion.vue +0 -68
- data/app/frontend/editor/components/kit/checkbox-input.vue +0 -59
- data/app/frontend/editor/components/kit/collection-item-input.vue +0 -79
- data/app/frontend/editor/components/kit/color-input/core-input.vue +0 -92
- data/app/frontend/editor/components/kit/color-input/preset-button.vue +0 -61
- data/app/frontend/editor/components/kit/color-input/preset-dropdown.vue +0 -47
- data/app/frontend/editor/components/kit/color-input.vue +0 -41
- data/app/frontend/editor/components/kit/confirmation-button.vue +0 -65
- data/app/frontend/editor/components/kit/copy-paste-button.vue +0 -26
- data/app/frontend/editor/components/kit/divider.vue +0 -22
- data/app/frontend/editor/components/kit/dropdown.vue +0 -66
- data/app/frontend/editor/components/kit/hint.vue +0 -12
- data/app/frontend/editor/components/kit/icon-button.vue +0 -24
- data/app/frontend/editor/components/kit/icon-input.vue +0 -96
- data/app/frontend/editor/components/kit/icon.vue +0 -36
- data/app/frontend/editor/components/kit/image-input.vue +0 -124
- data/app/frontend/editor/components/kit/index.js +0 -56
- data/app/frontend/editor/components/kit/link-input.vue +0 -121
- data/app/frontend/editor/components/kit/modal-root.vue +0 -85
- data/app/frontend/editor/components/kit/modal.vue +0 -39
- data/app/frontend/editor/components/kit/page-icon.vue +0 -21
- data/app/frontend/editor/components/kit/pagination/button.vue +0 -35
- data/app/frontend/editor/components/kit/pagination/index.vue +0 -116
- data/app/frontend/editor/components/kit/rich-text-input/block-button.vue +0 -75
- data/app/frontend/editor/components/kit/rich-text-input/extensions/Doc.js +0 -12
- data/app/frontend/editor/components/kit/rich-text-input/extensions/LineBreak.js +0 -38
- data/app/frontend/editor/components/kit/rich-text-input/extensions/marks/Link.js +0 -57
- data/app/frontend/editor/components/kit/rich-text-input/extensions/marks/Superscript.js +0 -43
- data/app/frontend/editor/components/kit/rich-text-input/format-buttons.vue +0 -47
- data/app/frontend/editor/components/kit/rich-text-input/link-buttons.vue +0 -91
- data/app/frontend/editor/components/kit/rich-text-input/list-buttons.vue +0 -29
- data/app/frontend/editor/components/kit/rich-text-input/menu-button.vue +0 -22
- data/app/frontend/editor/components/kit/rich-text-input/table-button.vue +0 -112
- data/app/frontend/editor/components/kit/rich-text-input.vue +0 -187
- data/app/frontend/editor/components/kit/search-input.vue +0 -54
- data/app/frontend/editor/components/kit/select-input.vue +0 -200
- data/app/frontend/editor/components/kit/simple-select.vue +0 -56
- data/app/frontend/editor/components/kit/submit-button.vue +0 -117
- data/app/frontend/editor/components/kit/tabs.vue +0 -99
- data/app/frontend/editor/components/kit/text-input.vue +0 -63
- data/app/frontend/editor/components/kit/textarea-input.vue +0 -61
- data/app/frontend/editor/components/link-picker/actions.vue +0 -32
- data/app/frontend/editor/components/link-picker/email.vue +0 -32
- data/app/frontend/editor/components/link-picker/index.vue +0 -97
- data/app/frontend/editor/components/link-picker/page.vue +0 -126
- data/app/frontend/editor/components/link-picker/url.vue +0 -43
- data/app/frontend/editor/components/page/edit.vue +0 -99
- data/app/frontend/editor/components/page/form/main.vue +0 -64
- data/app/frontend/editor/components/page/form/seo.vue +0 -94
- data/app/frontend/editor/components/page/list/actions-button.vue +0 -159
- data/app/frontend/editor/components/page/list/index.vue +0 -58
- data/app/frontend/editor/components/page/list/list-item.vue +0 -96
- data/app/frontend/editor/components/page/new.vue +0 -79
- data/app/frontend/editor/components/section-block-pane/index.vue +0 -69
- data/app/frontend/editor/components/section-block-pane/setting-list.vue +0 -53
- data/app/frontend/editor/components/section-highlighter/bottom-actions.vue +0 -60
- data/app/frontend/editor/components/section-highlighter/index.vue +0 -125
- data/app/frontend/editor/components/section-highlighter/top-left-actions.vue +0 -78
- data/app/frontend/editor/components/section-highlighter/top-right-actions.vue +0 -130
- data/app/frontend/editor/components/section-list/add-button.vue +0 -39
- data/app/frontend/editor/components/section-list/index.vue +0 -79
- data/app/frontend/editor/components/section-list/list-item.vue +0 -60
- data/app/frontend/editor/components/section-pane/block-list/index.vue +0 -68
- data/app/frontend/editor/components/section-pane/block-list/list-item.vue +0 -74
- data/app/frontend/editor/components/section-pane/block-list/new-block-button.vue +0 -74
- data/app/frontend/editor/components/section-pane/block-tree/index.vue +0 -63
- data/app/frontend/editor/components/section-pane/block-tree/new-nested-block-button.vue +0 -67
- data/app/frontend/editor/components/section-pane/block-tree/tree-node.vue +0 -109
- data/app/frontend/editor/components/section-pane/index.vue +0 -94
- data/app/frontend/editor/components/section-pane/setting-list.vue +0 -50
- data/app/frontend/editor/components/sidebar-nav/index.vue +0 -102
- data/app/frontend/editor/components/sidebar-nav/link.vue +0 -60
- data/app/frontend/editor/components/style-pane/index.vue +0 -48
- data/app/frontend/editor/components/theme-section-list/category.vue +0 -47
- data/app/frontend/editor/components/theme-section-list/index.vue +0 -27
- data/app/frontend/editor/components/theme-section-list/list-item.vue +0 -95
- data/app/frontend/editor/design/application.scss +0 -17
- data/app/frontend/editor/design/components/buttons.scss +0 -25
- data/app/frontend/editor/design/components/modal.scss +0 -49
- data/app/frontend/editor/design/components/tooltip.scss +0 -123
- data/app/frontend/editor/design/components/tree.scss +0 -6
- data/app/frontend/editor/design/helpers.scss +0 -9
- data/app/frontend/editor/design/transitions.scss +0 -121
- data/app/frontend/editor/layouts/app.vue +0 -42
- data/app/frontend/editor/layouts/default.vue +0 -57
- data/app/frontend/editor/layouts/slide-pane.vue +0 -87
- data/app/frontend/editor/locales/editor.ar.json +0 -265
- data/app/frontend/editor/locales/editor.en.json +0 -265
- data/app/frontend/editor/locales/editor.es.json +0 -265
- data/app/frontend/editor/locales/editor.fr.json +0 -265
- data/app/frontend/editor/locales/editor.pt-BR.json +0 -265
- data/app/frontend/editor/locales/index.js +0 -23
- data/app/frontend/editor/main.js +0 -21
- data/app/frontend/editor/misc/__tests__/utils.spec.js +0 -43
- data/app/frontend/editor/misc/utils.js +0 -177
- data/app/frontend/editor/mixins/error-modal.js +0 -28
- data/app/frontend/editor/mixins/focused-input.js +0 -20
- data/app/frontend/editor/mixins/global.js +0 -140
- data/app/frontend/editor/mixins/grouped-dropdowns.js +0 -17
- data/app/frontend/editor/mixins/index.js +0 -1
- data/app/frontend/editor/mixins/preview-transformation.js +0 -59
- data/app/frontend/editor/plugins/event-bus.js +0 -3
- data/app/frontend/editor/plugins/filters.js +0 -7
- data/app/frontend/editor/plugins/i18n.js +0 -13
- data/app/frontend/editor/plugins/index.js +0 -3
- data/app/frontend/editor/plugins/tooltip.js +0 -4
- data/app/frontend/editor/router/index.js +0 -41
- data/app/frontend/editor/router/routes/base.js +0 -59
- data/app/frontend/editor/router/routes/index.js +0 -3
- data/app/frontend/editor/router/routes/page.js +0 -30
- data/app/frontend/editor/router/routes/section-block.js +0 -29
- data/app/frontend/editor/router/routes/section.js +0 -67
- data/app/frontend/editor/router/routes/style.js +0 -17
- data/app/frontend/editor/services/__tests__/page.spec.js +0 -38
- data/app/frontend/editor/services/__tests__/section.spec.js +0 -39
- data/app/frontend/editor/services/api.js +0 -40
- data/app/frontend/editor/services/block.js +0 -26
- data/app/frontend/editor/services/collection-item.js +0 -20
- data/app/frontend/editor/services/image.js +0 -26
- data/app/frontend/editor/services/index.js +0 -21
- data/app/frontend/editor/services/live-preview.js +0 -131
- data/app/frontend/editor/services/page.js +0 -107
- data/app/frontend/editor/services/section.js +0 -214
- data/app/frontend/editor/services/site.js +0 -21
- data/app/frontend/editor/services/theme.js +0 -9
- data/app/frontend/editor/spec/__mocks__/page.js +0 -434
- data/app/frontend/editor/spec/__mocks__/section.js +0 -232
- data/app/frontend/editor/spec/__mocks__/services.js +0 -84
- data/app/frontend/editor/spec/__mocks__/site.js +0 -95
- data/app/frontend/editor/spec/__mocks__/theme.js +0 -518
- data/app/frontend/editor/store/__tests__/getters.spec.js +0 -158
- data/app/frontend/editor/store/actions/__tests__/page.spec.js +0 -97
- data/app/frontend/editor/store/actions/__tests__/section-block.spec.js +0 -105
- data/app/frontend/editor/store/actions/__tests__/section.spec.js +0 -62
- data/app/frontend/editor/store/actions/index.js +0 -35
- data/app/frontend/editor/store/actions/page.js +0 -66
- data/app/frontend/editor/store/actions/section-block.js +0 -57
- data/app/frontend/editor/store/actions/section.js +0 -75
- data/app/frontend/editor/store/actions/site.js +0 -32
- data/app/frontend/editor/store/default-state.js +0 -27
- data/app/frontend/editor/store/getters.js +0 -113
- data/app/frontend/editor/store/index.js +0 -29
- data/app/frontend/editor/store/mutations.js +0 -187
- data/app/frontend/editor/views/content-pane.vue +0 -109
- data/app/frontend/editor/views/page-preview.vue +0 -160
- data/app/frontend/editor/views/pages/edit.vue +0 -26
- data/app/frontend/editor/views/pages/index.vue +0 -65
- data/app/frontend/editor/views/sections/add-pane.vue +0 -23
- data/app/frontend/editor/views/sections/list-pane.vue +0 -20
- data/app/frontend/editor/views/slide-pane.vue +0 -14
- data/app/frontend/editor/views/slide-pane2.vue +0 -14
- data/app/frontend/editor/views/style/edit-pane.vue +0 -22
- data/app/frontend/entrypoints/admin.js +0 -3
- data/app/frontend/entrypoints/admin.scss +0 -5
- data/app/frontend/entrypoints/editor.js +0 -8
- data/app/frontend/entrypoints/live-preview-client.js +0 -6
- data/app/frontend/entrypoints/live-preview-rails-client.js +0 -9
- data/app/frontend/live-preview-client/index.js +0 -11
- data/app/frontend/live-preview-client/rails.js +0 -217
- data/app/helpers/maglev/editor_helper.rb +0 -95
- data/app/services/maglev/persist_page.rb +0 -97
- data/app/views/layouts/maglev/admin/_header_actions.html.erb +0 -5
- data/app/views/layouts/maglev/admin/application.html.erb +0 -26
- data/app/views/maglev/admin/sections/previews/show.html.erb +0 -47
- data/app/views/maglev/admin/themes/_empty.html.erb +0 -20
- data/app/views/maglev/admin/themes/_section_categories.html.erb +0 -9
- data/app/views/maglev/admin/themes/_sections.html.erb +0 -54
- data/app/views/maglev/admin/themes/show.html.erb +0 -21
- data/app/views/maglev/api/_pagination.json.jbuilder +0 -6
- data/app/views/maglev/api/assets/_show.json.jbuilder +0 -8
- data/app/views/maglev/api/assets/index.json.jbuilder +0 -9
- data/app/views/maglev/api/assets/show.json.jbuilder +0 -3
- data/app/views/maglev/api/collection_items/_show.json.jbuilder +0 -5
- data/app/views/maglev/api/collection_items/index.json.jbuilder +0 -5
- data/app/views/maglev/api/collection_items/show.json.jbuilder +0 -7
- data/app/views/maglev/api/page_clones/create.json.jbuilder +0 -3
- data/app/views/maglev/api/pages/_show.json.jbuilder +0 -23
- data/app/views/maglev/api/pages/index.json.jbuilder +0 -18
- data/app/views/maglev/api/pages/show.json.jbuilder +0 -3
- data/app/views/maglev/api/sites/_show.json.jbuilder +0 -15
- data/app/views/maglev/api/sites/show.json.jbuilder +0 -3
- data/app/views/maglev/api/themes/_show.json.jbuilder +0 -17
- data/app/views/maglev/editor/_header.html.erb +0 -1
- data/app/views/maglev/editor/show.html.erb +0 -41
- data/app/views/maglev/settings/index.html.erb +0 -11
- data/bin/vite +0 -29
- data/config/initializers/kaminari.rb +0 -16
- data/config/vite.json +0 -17
- data/lib/tasks/maglev/vite.rake +0 -62
- data/package.json +0 -58
- data/postcss.config.cjs +0 -6
- data/tailwind.config.js +0 -68
- data/vite.config.ts +0 -18
- data/yarn.lock +0 -4749
- /data/app/{frontend/images → assets/images/maglev}/favicon.svg +0 -0
- /data/app/{frontend/images → assets/images/maglev}/logo.svg +0 -0
- /data/app/{frontend/live-preview-client → assets/javascripts/maglev/client}/run-scripts.js +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="bg-gray-100 rounded-md pr-2 flex items-center text-gray-800"
|
|
4
|
-
:class="{ 'pl-4': !isList }"
|
|
5
|
-
>
|
|
6
|
-
<div class="flex flex-col cursor-move px-2 py-3" v-if="isList">
|
|
7
|
-
<uikit-icon name="ri-draggable" />
|
|
8
|
-
</div>
|
|
9
|
-
<router-link
|
|
10
|
-
:to="{
|
|
11
|
-
name: 'editSectionBlock',
|
|
12
|
-
params: { sectionBlockId: sectionBlock.id },
|
|
13
|
-
}"
|
|
14
|
-
class="flex items-center py-3 overflow-hidden"
|
|
15
|
-
>
|
|
16
|
-
<div class="h-8 w-8 bg-gray-400 mr-3" v-if="image">
|
|
17
|
-
<img
|
|
18
|
-
:src="image"
|
|
19
|
-
class="object-cover w-full h-full"
|
|
20
|
-
:class="{ hidden: !imageLoaded }"
|
|
21
|
-
@load="() => (imageLoaded = true)"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
<span class="truncate">{{ label | truncate(40) }}</span>
|
|
25
|
-
</router-link>
|
|
26
|
-
<div class="flex items-center ml-auto pl-2">
|
|
27
|
-
<slot name="actions"></slot>
|
|
28
|
-
<uikit-confirmation-button
|
|
29
|
-
@confirm="removeSectionBlock(sectionBlock.id)"
|
|
30
|
-
v-on="$listeners"
|
|
31
|
-
>
|
|
32
|
-
<uikit-icon-button iconName="delete-bin-line" />
|
|
33
|
-
</uikit-confirmation-button>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script>
|
|
39
|
-
import { mapActions } from 'vuex'
|
|
40
|
-
|
|
41
|
-
export default {
|
|
42
|
-
name: 'SectionBlockListItem',
|
|
43
|
-
props: {
|
|
44
|
-
sectionBlock: { type: Object, required: true },
|
|
45
|
-
index: { type: Number, required: true },
|
|
46
|
-
},
|
|
47
|
-
data() {
|
|
48
|
-
return {
|
|
49
|
-
imageLoaded: false,
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
computed: {
|
|
53
|
-
isList() {
|
|
54
|
-
return this.currentSectionDefinition.blocksPresentation !== 'tree'
|
|
55
|
-
},
|
|
56
|
-
presentation() {
|
|
57
|
-
const label = this.$store.getters.sectionBlockLabel(
|
|
58
|
-
this.sectionBlock,
|
|
59
|
-
this.index + 1,
|
|
60
|
-
)
|
|
61
|
-
return { label: label[0], image: label[1] }
|
|
62
|
-
},
|
|
63
|
-
label() {
|
|
64
|
-
return this.presentation.label
|
|
65
|
-
},
|
|
66
|
-
image() {
|
|
67
|
-
return this.presentation.image
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
methods: {
|
|
71
|
-
...mapActions(['removeSectionBlock']),
|
|
72
|
-
},
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="hasTypes" class="w-full button-wrapper">
|
|
3
|
-
<uikit-dropdown
|
|
4
|
-
ref="dropdown"
|
|
5
|
-
placement="top"
|
|
6
|
-
v-on="$listeners"
|
|
7
|
-
v-if="hasMultipleTypes"
|
|
8
|
-
>
|
|
9
|
-
<template v-slot:button>
|
|
10
|
-
<button class="big-submit-button bg-editor-primary">
|
|
11
|
-
<uikit-icon name="ri-add-line" size="1.5rem" />
|
|
12
|
-
<span class="ml-3">{{ $t('sectionPane.blockList.add') }}</span>
|
|
13
|
-
</button>
|
|
14
|
-
</template>
|
|
15
|
-
<template v-slot:content>
|
|
16
|
-
<div class="w-full flex flex-col">
|
|
17
|
-
<button
|
|
18
|
-
v-for="blockType in blockTypes"
|
|
19
|
-
:key="blockType.type"
|
|
20
|
-
class="mb-2 text-base text-gray-900 py-2 px-14 hover:bg-gray-100 transition-colors"
|
|
21
|
-
@click="addSectionBlockAndClose(blockType.type)"
|
|
22
|
-
>
|
|
23
|
-
{{ blockType.name }}
|
|
24
|
-
</button>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
</uikit-dropdown>
|
|
28
|
-
<button
|
|
29
|
-
class="big-submit-button bg-editor-primary"
|
|
30
|
-
@click="addSectionBlock"
|
|
31
|
-
v-else
|
|
32
|
-
>
|
|
33
|
-
<uikit-icon name="ri-add-line" size="1.5rem" />
|
|
34
|
-
<span class="ml-3">{{ $t('sectionPane.blockList.add') }}</span>
|
|
35
|
-
</button>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script>
|
|
40
|
-
import { mapActions } from 'vuex'
|
|
41
|
-
|
|
42
|
-
export default {
|
|
43
|
-
name: 'NewSectionBlockButton',
|
|
44
|
-
computed: {
|
|
45
|
-
hasTypes() {
|
|
46
|
-
return this.blockTypes.length > 0
|
|
47
|
-
},
|
|
48
|
-
hasMultipleTypes() {
|
|
49
|
-
return this.blockTypes.length > 1
|
|
50
|
-
},
|
|
51
|
-
blockTypes() {
|
|
52
|
-
if (this.currentSectionDefinition.blocksPresentation === 'tree')
|
|
53
|
-
return this.services.block.filterRoot(
|
|
54
|
-
this.currentSectionDefinition.blocks,
|
|
55
|
-
this.currentSectionBlocks,
|
|
56
|
-
)
|
|
57
|
-
else return this.currentSectionDefinition.blocks
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
methods: {
|
|
61
|
-
...mapActions(['addSectionBlock']),
|
|
62
|
-
addSectionBlockAndClose(blockType) {
|
|
63
|
-
this.addSectionBlock({ blockType })
|
|
64
|
-
this.$refs.dropdown.close()
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
}
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style scoped>
|
|
71
|
-
.button-wrapper >>> .trigger {
|
|
72
|
-
@apply w-full;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex flex-col h-full">
|
|
3
|
-
<div class="relative flex-auto h-0 overflow-y-auto">
|
|
4
|
-
<transition-group type="transition" name="flip-list">
|
|
5
|
-
<tree-node
|
|
6
|
-
v-for="(treeNode, index) in treeData"
|
|
7
|
-
:key="treeNode.sectionBlock.id"
|
|
8
|
-
:treeNode="treeNode"
|
|
9
|
-
:siblings="treeData"
|
|
10
|
-
:depth="0"
|
|
11
|
-
:index="index"
|
|
12
|
-
:last="index === treeData.length - 1"
|
|
13
|
-
@on-dropdown-toggle="onDropdownToggle"
|
|
14
|
-
@change="change"
|
|
15
|
-
class="mb-3"
|
|
16
|
-
/>
|
|
17
|
-
</transition-group>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="mt-auto relative">
|
|
20
|
-
<new-block-button @on-dropdown-toggle="onDropdownToggle" />
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import { mapActions } from 'vuex'
|
|
27
|
-
import GroupedDropdownsMixin from '@/mixins/grouped-dropdowns'
|
|
28
|
-
import TreeNode from './tree-node.vue'
|
|
29
|
-
import NewBlockButton from '../block-list/new-block-button.vue'
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
name: 'SectionBlockTree',
|
|
33
|
-
mixins: [GroupedDropdownsMixin],
|
|
34
|
-
components: { TreeNode, NewBlockButton },
|
|
35
|
-
data() {
|
|
36
|
-
return { treeData: null }
|
|
37
|
-
},
|
|
38
|
-
methods: {
|
|
39
|
-
...mapActions(['sortSectionBlocks']),
|
|
40
|
-
change() {
|
|
41
|
-
const list = this.services.block.decodeTree(this.treeData)
|
|
42
|
-
this.sortSectionBlocks(list)
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
watch: {
|
|
46
|
-
currentSectionBlocks: {
|
|
47
|
-
immediate: true,
|
|
48
|
-
handler() {
|
|
49
|
-
this.treeData = this.services.block.encodeToTree(
|
|
50
|
-
this.currentSectionBlocks,
|
|
51
|
-
)
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<style scoped>
|
|
59
|
-
.flip-list-move {
|
|
60
|
-
@apply transition-transform;
|
|
61
|
-
@apply duration-300;
|
|
62
|
-
}
|
|
63
|
-
</style>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="w-full">
|
|
3
|
-
<uikit-dropdown
|
|
4
|
-
placement="left"
|
|
5
|
-
ref="dropdown"
|
|
6
|
-
:fullWidth="true"
|
|
7
|
-
v-on="$listeners"
|
|
8
|
-
v-if="hasMultipleTypes"
|
|
9
|
-
>
|
|
10
|
-
<template v-slot:button>
|
|
11
|
-
<uikit-icon-button iconName="ri-add-line" />
|
|
12
|
-
</template>
|
|
13
|
-
<template v-slot:content>
|
|
14
|
-
<div class="w-full flex flex-col">
|
|
15
|
-
<button
|
|
16
|
-
v-for="blockType in blockTypes"
|
|
17
|
-
:key="blockType.type"
|
|
18
|
-
class="mb-2 text-base text-gray-900 py-2 px-4 hover:bg-gray-100 transition-colors"
|
|
19
|
-
@click="addNestedSectionBlockAndClose(blockType.type)"
|
|
20
|
-
>
|
|
21
|
-
{{ blockType.name }}
|
|
22
|
-
</button>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
</uikit-dropdown>
|
|
26
|
-
<uikit-icon-button
|
|
27
|
-
iconName="ri-add-line"
|
|
28
|
-
@click.native="addNestedSectionBlock"
|
|
29
|
-
v-else
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
import { mapActions } from 'vuex'
|
|
36
|
-
|
|
37
|
-
export default {
|
|
38
|
-
name: 'NewNestedSectionBlockButton',
|
|
39
|
-
props: {
|
|
40
|
-
parentId: { type: String, required: true },
|
|
41
|
-
accept: { type: Array, required: true },
|
|
42
|
-
},
|
|
43
|
-
computed: {
|
|
44
|
-
hasMultipleTypes() {
|
|
45
|
-
return this.blockTypes.length > 1
|
|
46
|
-
},
|
|
47
|
-
blockTypes() {
|
|
48
|
-
return this.currentSectionDefinition.blocks.filter(
|
|
49
|
-
(block) => this.accept.indexOf(block.type) !== -1,
|
|
50
|
-
)
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
methods: {
|
|
54
|
-
...mapActions(['addSectionBlock']),
|
|
55
|
-
addNestedSectionBlock() {
|
|
56
|
-
this.addSectionBlock({
|
|
57
|
-
blockType: this.blockTypes[0].type,
|
|
58
|
-
parentId: this.parentId,
|
|
59
|
-
})
|
|
60
|
-
},
|
|
61
|
-
addNestedSectionBlockAndClose(blockType) {
|
|
62
|
-
this.addSectionBlock({ blockType, parentId: this.parentId })
|
|
63
|
-
this.$refs.dropdown.close()
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
}
|
|
67
|
-
</script>
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :style="{ 'margin-left': marginLeft }">
|
|
3
|
-
<list-item
|
|
4
|
-
:sectionBlock="treeNode.sectionBlock"
|
|
5
|
-
:index="index"
|
|
6
|
-
v-on="$listeners"
|
|
7
|
-
>
|
|
8
|
-
<template v-slot:actions>
|
|
9
|
-
<div class="flex items-center">
|
|
10
|
-
<new-nested-block-button
|
|
11
|
-
:parentId="treeNode.sectionBlock.id"
|
|
12
|
-
:accept="acceptedNestedSectionBlocks"
|
|
13
|
-
v-if="canAdd"
|
|
14
|
-
v-on="$listeners"
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<uikit-icon-button
|
|
18
|
-
iconName="arrow-up-s-line"
|
|
19
|
-
@click.native="moveSectionBlockUp"
|
|
20
|
-
v-if="index > 0"
|
|
21
|
-
/>
|
|
22
|
-
|
|
23
|
-
<uikit-icon-button
|
|
24
|
-
iconName="arrow-down-s-line"
|
|
25
|
-
@click.native="moveSectionBlockDown"
|
|
26
|
-
v-if="!last"
|
|
27
|
-
/>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
</list-item>
|
|
31
|
-
|
|
32
|
-
<div class="mt-3" v-if="hasChildren">
|
|
33
|
-
<transition-group type="transition" name="flip-list">
|
|
34
|
-
<block-tree-node
|
|
35
|
-
v-for="(childNode, index) in children"
|
|
36
|
-
:key="childNode.sectionBlock.id"
|
|
37
|
-
:treeNode="childNode"
|
|
38
|
-
:siblings="children"
|
|
39
|
-
:depth="depth + 1"
|
|
40
|
-
:index="index"
|
|
41
|
-
:last="index === children.length - 1"
|
|
42
|
-
class="mb-3"
|
|
43
|
-
v-on="$listeners"
|
|
44
|
-
/>
|
|
45
|
-
</transition-group>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import ListItem from '../block-list/list-item.vue'
|
|
52
|
-
import NewNestedBlockButton from './new-nested-block-button.vue'
|
|
53
|
-
|
|
54
|
-
export default {
|
|
55
|
-
name: 'BlockTreeNode',
|
|
56
|
-
components: { ListItem, NewNestedBlockButton },
|
|
57
|
-
props: {
|
|
58
|
-
treeNode: { type: Object, required: true },
|
|
59
|
-
siblings: { type: Array },
|
|
60
|
-
depth: { type: Number, required: true },
|
|
61
|
-
index: { type: Number, required: true },
|
|
62
|
-
last: { type: Boolean, required: false, default: false },
|
|
63
|
-
},
|
|
64
|
-
computed: {
|
|
65
|
-
children() {
|
|
66
|
-
return this.treeNode.children
|
|
67
|
-
},
|
|
68
|
-
hasChildren() {
|
|
69
|
-
return this.children?.length > 0
|
|
70
|
-
},
|
|
71
|
-
sectionBlockDefinition() {
|
|
72
|
-
return this.currentSectionDefinition.blocks.find(
|
|
73
|
-
(block) => block.type === this.treeNode.sectionBlock.type,
|
|
74
|
-
)
|
|
75
|
-
},
|
|
76
|
-
acceptedNestedSectionBlocks() {
|
|
77
|
-
return this.sectionBlockDefinition?.accept
|
|
78
|
-
},
|
|
79
|
-
canAdd() {
|
|
80
|
-
return this.acceptedNestedSectionBlocks?.length > 0
|
|
81
|
-
},
|
|
82
|
-
marginLeft() {
|
|
83
|
-
return `${this.depth * 1.25}rem`
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
methods: {
|
|
87
|
-
moveSectionBlockUp() {
|
|
88
|
-
this.swapSectionBlockWith(this.index - 1)
|
|
89
|
-
},
|
|
90
|
-
moveSectionBlockDown() {
|
|
91
|
-
this.swapSectionBlockWith(this.index + 1)
|
|
92
|
-
},
|
|
93
|
-
swapSectionBlockWith(newIndex) {
|
|
94
|
-
;[this.siblings[this.index], this.siblings[newIndex]] = [
|
|
95
|
-
this.siblings[newIndex],
|
|
96
|
-
this.siblings[this.index],
|
|
97
|
-
]
|
|
98
|
-
this.$emit('change')
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
}
|
|
102
|
-
</script>
|
|
103
|
-
|
|
104
|
-
<style scoped>
|
|
105
|
-
.flip-list-move {
|
|
106
|
-
@apply transition-transform;
|
|
107
|
-
@apply duration-300;
|
|
108
|
-
}
|
|
109
|
-
</style>
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<uikit-tabs
|
|
3
|
-
:tabs="tabs"
|
|
4
|
-
:firstIndex="tabIndexFromRoute"
|
|
5
|
-
:otherProps="{ sectionId: currentSection.id, settingId }"
|
|
6
|
-
class="overflow-y-hidden"
|
|
7
|
-
navClass="px-4"
|
|
8
|
-
panelClass="px-3"
|
|
9
|
-
ref="tabs"
|
|
10
|
-
/>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import SettingList from './setting-list.vue'
|
|
15
|
-
import BlockList from './block-list/index.vue'
|
|
16
|
-
import BlockTree from './block-tree/index.vue'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: 'SectionPane',
|
|
20
|
-
props: {
|
|
21
|
-
settingId: { type: String, default: undefined },
|
|
22
|
-
},
|
|
23
|
-
computed: {
|
|
24
|
-
unfilteredTabs() {
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
name: this.$t('sectionPane.tabs.settings'),
|
|
28
|
-
tab: SettingList,
|
|
29
|
-
type: 'content',
|
|
30
|
-
condition: () => this.hasSettings,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: this.blocksLabel,
|
|
34
|
-
tab: this.blocksComponent,
|
|
35
|
-
type: 'blocks',
|
|
36
|
-
condition: () => this.hasBlocks,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: this.$t('sectionPane.tabs.advanced'),
|
|
40
|
-
tab: SettingList,
|
|
41
|
-
type: 'advanced',
|
|
42
|
-
condition: () => this.hasAdvancedSettings,
|
|
43
|
-
props: () => ({ advanced: true }),
|
|
44
|
-
},
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
tabs() {
|
|
48
|
-
return this.unfilteredTabs.filter(
|
|
49
|
-
(tab) => !tab.condition || tab.condition(),
|
|
50
|
-
)
|
|
51
|
-
},
|
|
52
|
-
tabIndexFromRoute() {
|
|
53
|
-
return this.findTabIndexFromRoute()
|
|
54
|
-
},
|
|
55
|
-
hasSettings() {
|
|
56
|
-
return !this.isBlank(this.currentSectionSettings)
|
|
57
|
-
},
|
|
58
|
-
hasAdvancedSettings() {
|
|
59
|
-
return !this.isBlank(this.currentSectionAdvancedSettings)
|
|
60
|
-
},
|
|
61
|
-
hasBlocks() {
|
|
62
|
-
return !this.isBlank(this.currentSectionDefinition.blocks)
|
|
63
|
-
},
|
|
64
|
-
blocksLabel() {
|
|
65
|
-
return (
|
|
66
|
-
this.$st(`${this.currentSectionI18nScope}.blocks.label`) ||
|
|
67
|
-
this.currentSectionDefinition.blocksLabel ||
|
|
68
|
-
this.$t('sectionPane.tabs.blocks')
|
|
69
|
-
)
|
|
70
|
-
},
|
|
71
|
-
blocksComponent() {
|
|
72
|
-
return this.currentSectionDefinition.blocksPresentation === 'tree'
|
|
73
|
-
? BlockTree
|
|
74
|
-
: BlockList
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
methods: {
|
|
78
|
-
findTabIndexFromRoute() {
|
|
79
|
-
const type = this.$route.hash.replace('#', '')
|
|
80
|
-
const index = this.tabs.findIndex((tab) => tab.type === type)
|
|
81
|
-
return index === -1 ? 0 : index
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
watch: {
|
|
85
|
-
'$route.hash': {
|
|
86
|
-
immediate: true,
|
|
87
|
-
handler() {
|
|
88
|
-
if (!this.$refs.tabs) return
|
|
89
|
-
this.$refs.tabs.selectTab(this.findTabIndexFromRoute())
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<dynamic-form
|
|
3
|
-
class="mt-2"
|
|
4
|
-
:parentKey="currentSection.id"
|
|
5
|
-
:settings="sectionSettings"
|
|
6
|
-
:content="currentSectionContent"
|
|
7
|
-
:focusedSetting="settingId"
|
|
8
|
-
:i18nScope="i18nScope"
|
|
9
|
-
@blur="onBlur"
|
|
10
|
-
@change="updateSectionContent"
|
|
11
|
-
/>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
import { mapActions } from 'vuex'
|
|
16
|
-
import DynamicForm from '@/components/dynamic-form/index.vue'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: 'SectionSettingList',
|
|
20
|
-
components: { DynamicForm },
|
|
21
|
-
props: {
|
|
22
|
-
sectionId: { type: String, default: undefined },
|
|
23
|
-
settingId: { type: String, default: undefined },
|
|
24
|
-
advanced: { type: Boolean, default: false },
|
|
25
|
-
},
|
|
26
|
-
computed: {
|
|
27
|
-
sectionSettings() {
|
|
28
|
-
return this.advanced
|
|
29
|
-
? this.currentSectionAdvancedSettings
|
|
30
|
-
: this.services.section.filterSettings(
|
|
31
|
-
this.currentSectionSettings,
|
|
32
|
-
this.currentSectionContent,
|
|
33
|
-
)
|
|
34
|
-
},
|
|
35
|
-
i18nScope() {
|
|
36
|
-
return `${this.currentSectionI18nScope}.settings`
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
...mapActions(['updateSectionContent']),
|
|
41
|
-
onBlur() {
|
|
42
|
-
this.$router
|
|
43
|
-
.push({ name: 'editSection', params: { sectionId: this.sectionId } })
|
|
44
|
-
.catch((err) => {
|
|
45
|
-
if (err.name !== 'NavigationDuplicated') throw err
|
|
46
|
-
})
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
</script>
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nav class="w-16 flex flex-col justify-between">
|
|
3
|
-
<div
|
|
4
|
-
class="flex justify-center h-full w-full animate-pulse"
|
|
5
|
-
v-if="!currentPage"
|
|
6
|
-
>
|
|
7
|
-
<div class="w-6 bg-gray-200 rounded h-48 my-6"></div>
|
|
8
|
-
</div>
|
|
9
|
-
<ol class="divide-y divide-gray-300 px-4" v-else>
|
|
10
|
-
<li>
|
|
11
|
-
<sidebar-nav-link
|
|
12
|
-
routerLinkName="listPages"
|
|
13
|
-
:active="isListPagesActive"
|
|
14
|
-
iconName="ri-file-copy-line"
|
|
15
|
-
:tooltipMessage="$t('sidebarNav.listPagesTooltip')"
|
|
16
|
-
/>
|
|
17
|
-
</li>
|
|
18
|
-
<li>
|
|
19
|
-
<sidebar-nav-link
|
|
20
|
-
:routerLinkName="'listSections'"
|
|
21
|
-
:active="isSectionListPaneActive"
|
|
22
|
-
iconName="ri-stack-line"
|
|
23
|
-
:tooltipMessage="$t('sidebarNav.managePageSectionsTooltip')"
|
|
24
|
-
/>
|
|
25
|
-
</li>
|
|
26
|
-
<li v-if="hasStyle">
|
|
27
|
-
<sidebar-nav-link
|
|
28
|
-
:routerLinkName="'editStyle'"
|
|
29
|
-
:active="isEditStylePaneActive"
|
|
30
|
-
iconName="ri-drop-line"
|
|
31
|
-
iconSize="1.25rem"
|
|
32
|
-
:tooltipMessage="$t('sidebarNav.editStyleTooltip')"
|
|
33
|
-
/>
|
|
34
|
-
</li>
|
|
35
|
-
<li>
|
|
36
|
-
<sidebar-nav-link
|
|
37
|
-
:isRouterLink="false"
|
|
38
|
-
iconName="image-line"
|
|
39
|
-
:tooltipMessage="$t('sidebarNav.openImageLibraryTooltip')"
|
|
40
|
-
@click.prevent="openImageLibraryModal"
|
|
41
|
-
/>
|
|
42
|
-
</li>
|
|
43
|
-
<li></li>
|
|
44
|
-
</ol>
|
|
45
|
-
|
|
46
|
-
<ol class="divide-y divide-gray-300 px-4">
|
|
47
|
-
<li></li>
|
|
48
|
-
<li>
|
|
49
|
-
<sidebar-nav-link
|
|
50
|
-
:isRouterLink="false"
|
|
51
|
-
:linkUrl="leaveEditorUrl"
|
|
52
|
-
iconName="logout-box-r-line"
|
|
53
|
-
:tooltipMessage="$t('sidebarNav.leaveEditorTooltip')"
|
|
54
|
-
/>
|
|
55
|
-
</li>
|
|
56
|
-
</ol>
|
|
57
|
-
</nav>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
<script>
|
|
61
|
-
import ImageLibrary from '@/components/image-library/index.vue'
|
|
62
|
-
import SidebarNavLink from './link.vue'
|
|
63
|
-
|
|
64
|
-
export default {
|
|
65
|
-
name: 'SidebarNav',
|
|
66
|
-
components: {
|
|
67
|
-
SidebarNavLink
|
|
68
|
-
},
|
|
69
|
-
computed: {
|
|
70
|
-
hasStyle() {
|
|
71
|
-
return !this.isBlank(this.currentStyle)
|
|
72
|
-
},
|
|
73
|
-
isListPagesActive() {
|
|
74
|
-
return this.$route.name === 'listPages'
|
|
75
|
-
},
|
|
76
|
-
isAddSectionPaneActive() {
|
|
77
|
-
return this.$route.name === 'addSection'
|
|
78
|
-
},
|
|
79
|
-
isSectionListPaneActive() {
|
|
80
|
-
return this.$route.name === 'listSections'
|
|
81
|
-
},
|
|
82
|
-
isEditStylePaneActive() {
|
|
83
|
-
return this.$route.name === 'editStyle'
|
|
84
|
-
},
|
|
85
|
-
isEditPageActive() {
|
|
86
|
-
return this.$route.name === 'editPageSettings'
|
|
87
|
-
},
|
|
88
|
-
leaveEditorUrl() {
|
|
89
|
-
return window.leaveUrl
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
methods: {
|
|
93
|
-
openImageLibraryModal() {
|
|
94
|
-
this.openModal({
|
|
95
|
-
title: this.$t('imageLibrary.title'),
|
|
96
|
-
component: ImageLibrary,
|
|
97
|
-
props: { modalClass: 'w-216' },
|
|
98
|
-
})
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
}
|
|
102
|
-
</script>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="isRouterLink ? 'router-link' : 'a'"
|
|
4
|
-
v-bind="linkProps"
|
|
5
|
-
v-on="$listeners"
|
|
6
|
-
class="flex justify-center py-5 -ml-4 -mr-4 hover:bg-editor-primary hover:bg-opacity-5 transition-colors duration-200"
|
|
7
|
-
:class="{
|
|
8
|
-
'bg-white': !active,
|
|
9
|
-
'bg-editor-primary bg-opacity-5': active,
|
|
10
|
-
}"
|
|
11
|
-
v-tooltip.right="tooltipMessage"
|
|
12
|
-
>
|
|
13
|
-
<uikit-icon :name="iconName" :size="iconSize" />
|
|
14
|
-
</component>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
export default {
|
|
19
|
-
name: 'SidebarNavLink',
|
|
20
|
-
props: {
|
|
21
|
-
isRouterLink: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: true,
|
|
24
|
-
},
|
|
25
|
-
routerLinkName: {
|
|
26
|
-
type: String,
|
|
27
|
-
required: false,
|
|
28
|
-
},
|
|
29
|
-
linkUrl: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: '#',
|
|
32
|
-
required: false,
|
|
33
|
-
},
|
|
34
|
-
active: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false,
|
|
37
|
-
},
|
|
38
|
-
iconName: {
|
|
39
|
-
type: String,
|
|
40
|
-
required: true,
|
|
41
|
-
},
|
|
42
|
-
iconSize: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: '1.5rem',
|
|
45
|
-
},
|
|
46
|
-
tooltipMessage: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: null,
|
|
49
|
-
required: false,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
computed: {
|
|
53
|
-
linkProps() {
|
|
54
|
-
return this.isRouterLink ? {
|
|
55
|
-
to: { name: this.routerLinkName },
|
|
56
|
-
} : { href: this.linkUrl }
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
}
|
|
60
|
-
</script>
|