alchemy_cms 7.4.10 → 8.0.0.b
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.
Potentially problematic release.
This version of alchemy_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +16 -5
- data/app/assets/builds/alchemy/admin/page-select.css +1 -1
- data/app/assets/builds/alchemy/admin/print.css +1 -1
- data/app/assets/builds/alchemy/admin.css +2 -2
- data/app/assets/builds/alchemy/dark-theme.css +1 -0
- data/app/assets/builds/alchemy/light-theme.css +1 -0
- data/app/assets/builds/alchemy/theme.css +1 -0
- data/app/assets/builds/alchemy/welcome.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy-dark/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy-dark/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy-dark/skin.min.css +1 -0
- data/app/assets/config/alchemy_manifest.js +0 -2
- data/app/assets/images/alchemy/element_icons/default.svg +1 -0
- data/app/assets/images/alchemy/icons-sprite.svg +1 -0
- data/app/components/alchemy/admin/element_select.rb +39 -0
- data/app/components/alchemy/admin/resource/applied_filter.rb +29 -0
- data/app/components/alchemy/admin/resource/checkbox_filter.rb +36 -0
- data/app/components/alchemy/admin/resource/datepicker_filter.rb +42 -0
- data/app/components/alchemy/admin/resource/select_filter.rb +43 -0
- data/app/components/alchemy/admin/toolbar_button.rb +5 -2
- data/app/components/alchemy/ingredients/number_view.rb +18 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +10 -15
- data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -6
- data/app/controllers/alchemy/admin/elements_controller.rb +3 -1
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +15 -15
- data/app/controllers/alchemy/admin/pictures_controller.rb +27 -37
- data/app/controllers/alchemy/admin/resources_controller.rb +16 -106
- data/app/controllers/alchemy/attachments_controller.rb +43 -14
- data/app/controllers/alchemy/messages_controller.rb +1 -1
- data/app/controllers/alchemy/pages_controller.rb +26 -4
- data/app/controllers/concerns/alchemy/admin/resource_filter.rb +93 -0
- data/app/decorators/alchemy/element_editor.rb +5 -48
- data/app/decorators/alchemy/ingredient_editor.rb +3 -53
- data/app/helpers/alchemy/admin/attachments_helper.rb +5 -5
- data/app/helpers/alchemy/admin/base_helper.rb +14 -84
- data/app/helpers/alchemy/admin/pages_helper.rb +1 -1
- data/app/helpers/alchemy/base_helper.rb +0 -30
- data/app/helpers/alchemy/elements_block_helper.rb +0 -14
- data/app/helpers/alchemy/pages_helper.rb +1 -1
- data/{lib → app/helpers}/alchemy/resources_helper.rb +5 -45
- data/app/javascript/alchemy_admin/components/action.js +2 -0
- data/app/javascript/alchemy_admin/components/alchemy_html_element.js +3 -3
- data/app/javascript/alchemy_admin/components/auto_submit.js +20 -0
- data/app/javascript/alchemy_admin/components/datepicker.js +18 -7
- data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +8 -7
- data/app/javascript/alchemy_admin/components/element_editor.js +25 -15
- data/app/javascript/alchemy_admin/components/element_select.js +43 -0
- data/app/javascript/alchemy_admin/components/index.js +3 -0
- data/app/javascript/alchemy_admin/components/link_buttons.js +6 -2
- data/app/javascript/alchemy_admin/components/remote_select.js +9 -2
- data/app/javascript/alchemy_admin/components/tags_autocomplete.js +5 -1
- data/app/javascript/alchemy_admin/components/tinymce.js +93 -14
- data/app/javascript/alchemy_admin/components/update_check.js +42 -0
- data/app/javascript/alchemy_admin/components/uploader/file_upload.js +15 -8
- data/app/javascript/alchemy_admin/components/uploader/progress.js +12 -6
- data/app/javascript/alchemy_admin/components/uploader.js +4 -2
- data/app/javascript/alchemy_admin/confirm_dialog.js +27 -57
- data/app/javascript/alchemy_admin/dialog.js +1 -1
- data/app/javascript/alchemy_admin/dirty.js +3 -2
- data/app/javascript/alchemy_admin/file_editors.js +1 -1
- data/app/javascript/alchemy_admin/i18n.js +15 -16
- data/app/javascript/alchemy_admin/image_loader.js +4 -2
- data/app/javascript/alchemy_admin/initializer.js +1 -49
- data/app/javascript/alchemy_admin/picture_editors.js +7 -4
- data/app/javascript/alchemy_admin/picture_selector.js +4 -4
- data/app/javascript/alchemy_admin/utils/ajax.js +51 -44
- data/app/javascript/alchemy_admin.js +3 -8
- data/app/jobs/alchemy/delete_picture_job.rb +12 -0
- data/app/models/alchemy/admin/filters/base.rb +38 -0
- data/app/models/alchemy/admin/filters/checkbox.rb +24 -0
- data/app/models/alchemy/admin/filters/datepicker.rb +53 -0
- data/app/models/alchemy/admin/filters/select.rb +70 -0
- data/app/models/alchemy/admin/resource_name.rb +27 -0
- data/app/models/alchemy/attachment.rb +49 -44
- data/app/models/alchemy/base_record.rb +2 -0
- data/app/models/alchemy/element/definitions.rb +1 -1
- data/app/models/alchemy/element/element_ingredients.rb +6 -6
- data/app/models/alchemy/element/presenters.rb +3 -12
- data/app/models/alchemy/element.rb +10 -27
- data/app/models/alchemy/element_definition.rb +190 -0
- data/app/models/alchemy/ingredient.rb +10 -43
- data/app/models/alchemy/ingredient_definition.rb +134 -0
- data/app/models/alchemy/ingredient_validator.rb +7 -3
- data/app/models/alchemy/ingredients/number.rb +19 -0
- data/app/models/alchemy/language.rb +2 -21
- data/app/models/alchemy/message.rb +3 -7
- data/app/models/alchemy/node.rb +1 -1
- data/app/models/alchemy/page/{page_layouts.rb → definitions.rb} +12 -19
- data/app/models/alchemy/page/fixed_attributes.rb +1 -1
- data/app/models/alchemy/page/page_elements.rb +13 -14
- data/app/models/alchemy/page/page_naming.rb +3 -11
- data/app/models/alchemy/page/page_natures.rb +20 -15
- data/app/models/alchemy/page/page_scopes.rb +1 -1
- data/app/models/alchemy/page.rb +12 -39
- data/app/models/alchemy/page_definition.rb +115 -0
- data/app/models/alchemy/picture.rb +71 -99
- data/app/models/alchemy/picture_variant.rb +115 -5
- data/{lib → app/models}/alchemy/resource.rb +4 -18
- data/{lib → app/models}/alchemy/searchable_resource.rb +15 -0
- data/app/models/alchemy/site/layout.rb +5 -5
- data/app/models/alchemy/site.rb +1 -21
- data/app/models/alchemy/storage_adapter/active_storage/attachment_url.rb +41 -0
- data/app/models/alchemy/storage_adapter/active_storage/picture_url.rb +55 -0
- data/app/models/alchemy/storage_adapter/active_storage/preprocessor.rb +40 -0
- data/app/models/alchemy/storage_adapter/active_storage.rb +173 -0
- data/app/models/alchemy/{attachment/url.rb → storage_adapter/dragonfly/attachment_url.rb} +12 -12
- data/app/models/alchemy/storage_adapter/dragonfly/picture_url.rb +75 -0
- data/app/models/alchemy/{picture → storage_adapter/dragonfly}/preprocessor.rb +4 -4
- data/app/models/alchemy/storage_adapter/dragonfly.rb +205 -0
- data/app/models/alchemy/storage_adapter.rb +74 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +19 -6
- data/app/models/concerns/alchemy/relatable_resource.rb +28 -0
- data/app/serializers/alchemy/element_serializer.rb +0 -1
- data/app/services/alchemy/dragonfly_to_image_processing.rb +100 -0
- data/app/stylesheets/alchemy/_custom-properties.scss +162 -0
- data/app/stylesheets/alchemy/_defaults.scss +3 -0
- data/app/stylesheets/alchemy/_extends.scss +69 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/_mixins.scss +40 -68
- data/app/stylesheets/alchemy/_themes.scss +540 -0
- data/app/stylesheets/alchemy/_variables.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/archive.scss +45 -42
- data/app/stylesheets/alchemy/admin/attachments.scss +17 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/base.scss +20 -15
- data/app/stylesheets/alchemy/admin/buttons.scss +135 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/clipboard.scss +2 -2
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dashboard.scss +13 -16
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dialogs.scss +33 -16
- data/app/stylesheets/alchemy/admin/element-select.scss +11 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/elements.scss +239 -133
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/errors.scss +5 -5
- data/app/stylesheets/alchemy/admin/filters.scss +57 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flatpickr.scss +54 -76
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/form_fields.scss +10 -11
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/forms.scss +28 -21
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/frame.scss +20 -18
- data/app/stylesheets/alchemy/admin/hints.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/icons.scss +1 -1
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/image_library.scss +21 -61
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/images.scss +1 -1
- data/app/stylesheets/alchemy/admin/labels.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/lists.scss +3 -3
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/navigation.scss +55 -59
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/node-select.scss +1 -10
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/nodes.scss +21 -18
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/notices.scss +20 -19
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/page-select.scss +18 -2
- data/app/stylesheets/alchemy/admin/pagination.scss +137 -0
- data/app/stylesheets/alchemy/admin/preview_window.scss +46 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/print.scss +1 -1
- data/app/stylesheets/alchemy/admin/resource_info.scss +148 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/search.scss +10 -7
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/selects.scss +85 -46
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/shoelace.scss +37 -68
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/sitemap.scss +39 -34
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tables.scss +9 -7
- data/app/stylesheets/alchemy/admin/tags.scss +143 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/toolbar.scss +6 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/typography.scss +3 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/upload.scss +7 -5
- data/app/stylesheets/alchemy/admin.scss +44 -0
- data/app/stylesheets/alchemy/dark-theme.scss +5 -0
- data/app/stylesheets/alchemy/light-theme.scss +6 -0
- data/app/stylesheets/alchemy/theme.scss +13 -0
- data/app/stylesheets/alchemy/welcome.scss +75 -0
- data/app/stylesheets/tinymce/skins/content/alchemy/content.scss +69 -0
- data/app/{assets/stylesheets/tinymce/skins/content/alchemy → stylesheets/tinymce/skins/content/alchemy-dark}/content.scss +12 -12
- data/app/stylesheets/tinymce/skins/ui/alchemy/content.scss +1 -0
- data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/skin.scss +158 -176
- data/app/stylesheets/tinymce/skins/ui/alchemy-dark/content.scss +1 -0
- data/app/stylesheets/tinymce/skins/ui/alchemy-dark/skin.scss +3784 -0
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +22 -12
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/assign.js.erb +4 -3
- data/app/views/alchemy/admin/attachments/show.html.erb +55 -43
- data/app/views/alchemy/admin/{elements/_clipboard_button.html.erb → clipboard/_button.html.erb} +3 -5
- data/app/views/alchemy/admin/clipboard/_update_nested_element_button.turbo_stream.erb +11 -0
- data/app/views/alchemy/admin/clipboard/clear.turbo_stream.erb +4 -0
- data/app/views/alchemy/admin/clipboard/index.html.erb +15 -13
- data/app/views/alchemy/admin/clipboard/insert.turbo_stream.erb +18 -0
- data/app/views/alchemy/admin/clipboard/remove.turbo_stream.erb +9 -0
- data/app/views/alchemy/admin/crop.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/info.html.erb +17 -31
- data/app/views/alchemy/admin/elements/_element.html.erb +4 -8
- data/app/views/alchemy/admin/elements/_form.html.erb +9 -9
- data/app/views/alchemy/admin/elements/_header.html.erb +5 -1
- data/app/views/alchemy/admin/elements/_toolbar.html.erb +4 -6
- data/app/views/alchemy/admin/elements/create.turbo_stream.erb +2 -1
- data/app/views/alchemy/admin/elements/index.html.erb +2 -2
- data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +3 -16
- data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +0 -9
- data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
- data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
- data/app/views/alchemy/admin/languages/index.html.erb +5 -2
- data/app/views/alchemy/admin/layoutpages/index.html.erb +1 -12
- data/app/views/alchemy/admin/pages/_form.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_page.html.erb +2 -3
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +1 -15
- data/app/views/alchemy/admin/pages/index.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +9 -12
- data/app/views/alchemy/admin/partials/_search_form.html.erb +4 -9
- data/app/views/alchemy/admin/pictures/_archive.html.erb +16 -29
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +3 -7
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_infos.html.erb +21 -52
- data/app/views/alchemy/admin/pictures/_library_sidebar.html.erb +7 -0
- data/app/views/alchemy/admin/pictures/_picture.html.erb +14 -20
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +20 -16
- data/app/views/alchemy/admin/pictures/_sorting_select.html.erb +13 -0
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +1 -6
- data/app/views/alchemy/admin/pictures/index.html.erb +5 -19
- data/app/views/alchemy/admin/pictures/show.html.erb +10 -5
- data/app/views/alchemy/admin/resources/_applied_filters.html.erb +8 -0
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +5 -25
- data/app/views/alchemy/admin/resources/_pagination.html.erb +6 -0
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +4 -2
- data/app/views/alchemy/admin/resources/_resource_table.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_resource_usage_info.html.erb +36 -0
- data/app/views/alchemy/admin/resources/_table_header.html.erb +1 -15
- data/app/views/alchemy/admin/sites/index.html.erb +5 -1
- data/app/views/alchemy/admin/styleguide/index.html.erb +118 -58
- data/app/views/alchemy/admin/tags/index.html.erb +1 -1
- data/app/views/alchemy/admin/tinymce/_setup.html.erb +7 -7
- data/app/{javascript/alchemy_admin/locales/en.js → views/alchemy/admin/translations/_en.js} +5 -2
- data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
- data/app/views/alchemy/admin/uploader/_setup.html.erb +4 -4
- data/app/views/alchemy/base/error_notice.html.erb +1 -1
- data/app/views/alchemy/ingredients/_number_editor.html.erb +24 -0
- data/app/views/alchemy/no_index.html.erb +31 -0
- data/app/views/alchemy/welcome.html.erb +12 -10
- data/app/views/kaminari/alchemy/_first_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_last_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_next_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_paginator.html.erb +18 -13
- data/app/views/kaminari/alchemy/_prev_page.html.erb +5 -3
- data/app/views/layouts/alchemy/admin.html.erb +25 -24
- data/config/alchemy/config.yml +3 -2
- data/config/initializers/dragonfly.rb +0 -1
- data/config/initializers/mime_types.rb +1 -0
- data/config/locales/alchemy.en.yml +57 -21
- data/config/routes.rb +0 -2
- data/db/migrate/20250905140323_add_created_at_index_to_pictures_and_attachments.rb +14 -0
- data/lib/alchemy/admin/preview_url.rb +4 -5
- data/lib/alchemy/cache_digests/template_tracker.rb +6 -9
- data/lib/alchemy/config_missing.rb +14 -0
- data/lib/alchemy/configuration/base_option.rb +24 -0
- data/lib/alchemy/configuration/boolean_option.rb +16 -0
- data/lib/alchemy/configuration/class_option.rb +15 -0
- data/lib/alchemy/configuration/class_set_option.rb +46 -0
- data/lib/alchemy/configuration/integer_list_option.rb +13 -0
- data/lib/alchemy/configuration/integer_option.rb +12 -0
- data/lib/alchemy/configuration/list_option.rb +22 -0
- data/lib/alchemy/configuration/regexp_option.rb +11 -0
- data/lib/alchemy/configuration/string_list_option.rb +13 -0
- data/lib/alchemy/configuration/string_option.rb +11 -0
- data/lib/alchemy/configuration.rb +115 -0
- data/lib/alchemy/configuration_methods.rb +3 -1
- data/lib/alchemy/configurations/default_language.rb +12 -0
- data/lib/alchemy/configurations/default_site.rb +10 -0
- data/lib/alchemy/configurations/format_matchers.rb +11 -0
- data/lib/alchemy/configurations/mailer.rb +16 -0
- data/lib/alchemy/configurations/main.rb +223 -0
- data/lib/alchemy/configurations/page_cache.rb +19 -0
- data/lib/alchemy/configurations/preview.rb +32 -0
- data/lib/alchemy/configurations/sitemap.rb +10 -0
- data/lib/alchemy/configurations/uploader.rb +34 -0
- data/lib/alchemy/engine.rb +81 -24
- data/lib/alchemy/hints.rb +3 -7
- data/lib/alchemy/install/tasks.rb +0 -12
- data/lib/alchemy/on_page_layout.rb +2 -2
- data/lib/alchemy/propshaft/tinymce_asset.rb +15 -0
- data/lib/alchemy/seeder.rb +2 -2
- data/lib/alchemy/tasks/tidy.rb +18 -0
- data/lib/alchemy/tasks/usage.rb +4 -4
- data/lib/alchemy/test_support/config_stubbing.rb +1 -7
- data/lib/alchemy/test_support/factories/attachment_factory.rb +13 -2
- data/lib/alchemy/test_support/factories/language_factory.rb +1 -1
- data/lib/alchemy/test_support/factories/page_factory.rb +2 -3
- data/lib/alchemy/test_support/factories/picture_factory.rb +31 -2
- data/lib/alchemy/test_support/factories/site_factory.rb +2 -2
- data/lib/alchemy/test_support/having_crop_action_examples.rb +2 -2
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +80 -26
- data/lib/alchemy/test_support/relatable_resource_examples.rb +58 -0
- data/lib/alchemy/test_support/shared_ingredient_examples.rb +5 -5
- data/lib/alchemy/tinymce.rb +0 -1
- data/lib/alchemy/upgrader/eight_zero.rb +14 -0
- data/lib/alchemy/upgrader.rb +33 -20
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +185 -172
- data/lib/alchemy_cms.rb +1 -7
- data/lib/generators/alchemy/ingredient/ingredient_generator.rb +0 -3
- data/lib/generators/alchemy/install/files/_article.html.erb +6 -4
- data/lib/generators/alchemy/install/files/alchemy.en.yml +22 -3
- data/lib/generators/alchemy/install/files/application.html.erb +5 -0
- data/lib/generators/alchemy/install/install_generator.rb +25 -23
- data/lib/generators/alchemy/install/templates/alchemy.rb.tt +200 -0
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +0 -1
- data/lib/generators/alchemy/install/templates/elements.yml.tt +3 -1
- data/lib/generators/alchemy/install/templates/menus.yml.tt +1 -1
- data/lib/generators/alchemy/install/templates/page_layouts.yml.tt +2 -2
- data/lib/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -2
- data/lib/tasks/alchemy/assets.rake +14 -0
- data/lib/tasks/alchemy/tidy.rake +6 -0
- data/lib/tasks/alchemy/upgrade.rake +12 -47
- data/vendor/assets/stylesheets/tinymce/skins/content/dark/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide/skin.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- data/vendor/javascript/clipboard.min.js +1 -1
- data/vendor/javascript/cropperjs.min.js +1 -1
- data/vendor/javascript/handlebars.min.js +3 -3
- data/vendor/javascript/jquery.min.js +1 -1
- data/vendor/javascript/select2.min.js +3 -3
- data/vendor/javascript/shoelace.min.js +92 -76
- data/vendor/javascript/sortable.min.js +2 -2
- data/vendor/javascript/tinymce.min.js +1 -1
- data/vendor/javascript/ungap-custom-elements.min.js +2 -2
- metadata +223 -208
- data/CHANGELOG.md +0 -2041
- data/CODE_OF_CONDUCT.md +0 -13
- data/CONTRIBUTING.md +0 -73
- data/Gemfile +0 -71
- data/Rakefile +0 -102
- data/SECURITY.md +0 -13
- data/alchemy_cms.gemspec +0 -88
- data/app/assets/builds/alchemy/admin/page-select.css.map +0 -1
- data/app/assets/builds/alchemy/admin/print.css.map +0 -1
- data/app/assets/builds/alchemy/admin.css.map +0 -1
- data/app/assets/builds/alchemy/custom-properties.css +0 -1
- data/app/assets/builds/alchemy/custom-properties.css.map +0 -1
- data/app/assets/builds/alchemy/welcome.css.map +0 -1
- data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css.map +0 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css.map +0 -1
- data/app/assets/javascripts/alchemy/admin.js +0 -10
- data/app/assets/stylesheets/alchemy/_defaults.scss +0 -3
- data/app/assets/stylesheets/alchemy/_deprecated_variables.scss +0 -45
- data/app/assets/stylesheets/alchemy/_deprecation.scss +0 -17
- data/app/assets/stylesheets/alchemy/_extends.scss +0 -62
- data/app/assets/stylesheets/alchemy/_variables.scss +0 -201
- data/app/assets/stylesheets/alchemy/admin/attachments.scss +0 -40
- data/app/assets/stylesheets/alchemy/admin/buttons.scss +0 -123
- data/app/assets/stylesheets/alchemy/admin/hints.scss +0 -5
- data/app/assets/stylesheets/alchemy/admin/labels.scss +0 -3
- data/app/assets/stylesheets/alchemy/admin/pagination.scss +0 -92
- data/app/assets/stylesheets/alchemy/admin/preview_window.scss +0 -33
- data/app/assets/stylesheets/alchemy/admin/resource_info.scss +0 -42
- data/app/assets/stylesheets/alchemy/admin/tags.scss +0 -158
- data/app/assets/stylesheets/alchemy/admin.scss +0 -42
- data/app/assets/stylesheets/alchemy/custom-properties.css +0 -98
- data/app/assets/stylesheets/alchemy/welcome.scss +0 -57
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +0 -711
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +0 -705
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +0 -29
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +0 -677
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +0 -7
- data/app/controllers/alchemy/elements_controller.rb +0 -32
- data/app/helpers/alchemy/admin/elements_helper.rb +0 -25
- data/app/models/alchemy/element/dom_id.rb +0 -31
- data/app/models/alchemy/picture/calculations.rb +0 -49
- data/app/models/alchemy/picture/transformations.rb +0 -115
- data/app/models/alchemy/picture/url.rb +0 -54
- data/app/views/alchemy/admin/attachments/destroy.js.erb +0 -1
- data/app/views/alchemy/admin/clipboard/clear.js.erb +0 -3
- data/app/views/alchemy/admin/clipboard/insert.js.erb +0 -29
- data/app/views/alchemy/admin/clipboard/remove.js.erb +0 -10
- data/app/views/alchemy/admin/resources/_filter.html.erb +0 -12
- data/app/views/alchemy/admin/resources/_resource.html.erb +0 -34
- data/app/views/alchemy/admin/resources/_table.html.erb +0 -29
- data/app/views/alchemy/elements/show.html.erb +0 -1
- data/app/views/alchemy/elements/show.js.erb +0 -1
- data/app/views/alchemy/ingredients/_audio_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_boolean_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_datetime_view.html.erb +0 -3
- data/app/views/alchemy/ingredients/_file_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_headline_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_html_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_link_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_node_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_page_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_picture_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_richtext_view.html.erb +0 -3
- data/app/views/alchemy/ingredients/_select_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_text_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_video_view.html.erb +0 -3
- data/babel.config.js +0 -12
- data/bin/importmap +0 -4
- data/bin/rails +0 -9
- data/bin/rspec +0 -3
- data/bin/setup +0 -30
- data/bin/start +0 -17
- data/bun.lockb +0 -0
- data/bundles/shoelace.js +0 -12
- data/bundles/tinymce.js +0 -22
- data/config/initializers/assets.rb +0 -4
- data/eslint.config.js +0 -17
- data/lib/alchemy/config.rb +0 -114
- data/lib/alchemy/element_definition.rb +0 -73
- data/lib/alchemy/page_layout.rb +0 -73
- data/lib/alchemy/resource_filter.rb +0 -40
- data/lib/alchemy/upgrader/seven_point_four.rb +0 -26
- data/lib/alchemy/upgrader/seven_point_three.rb +0 -52
- data/lib/alchemy/upgrader/tasks/.keep +0 -0
- data/lib/generators/alchemy/ingredient/templates/view.html.erb +0 -1
- data/lib/generators/alchemy/install/files/alchemy_admin.js +0 -1
- data/lib/generators/alchemy/install/files/all.js +0 -11
- data/lib/generators/alchemy/install/files/article.css +0 -25
- data/rollup.config.mjs +0 -108
- data/vendor/assets/images/remixicon.symbol.svg +0 -11
- /data/app/{assets/stylesheets → stylesheets}/alchemy/_fonts.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/attachment-select.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flash.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/list_filter.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/spinner.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/skintool.json +0 -0
- /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
data/bundles/shoelace.js
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
// Used to bundle our own Shoelace build with Rollup
|
2
|
-
import "@shoelace-style/shoelace/dist/utilities/animation-registry.js"
|
3
|
-
import "@shoelace-style/shoelace/dist/components/switch/switch.js"
|
4
|
-
import "@shoelace-style/shoelace/dist/components/tab/tab.js"
|
5
|
-
import "@shoelace-style/shoelace/dist/components/tab-group/tab-group.js"
|
6
|
-
import "@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js"
|
7
|
-
import "@shoelace-style/shoelace/dist/components/tooltip/tooltip.js"
|
8
|
-
import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js"
|
9
|
-
import "@shoelace-style/shoelace/dist/components/dialog/dialog.js"
|
10
|
-
import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js"
|
11
|
-
import { setDefaultAnimation } from "@shoelace-style/shoelace/dist/utilities/animation-registry.js"
|
12
|
-
export { registerIconLibrary, setDefaultAnimation }
|
data/bundles/tinymce.js
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
/* Import TinyMCE */
|
2
|
-
import tinymce from "tinymce"
|
3
|
-
|
4
|
-
/* Default icons are required. After that, import custom icons if applicable */
|
5
|
-
import "tinymce/icons/default"
|
6
|
-
import "tinymce/icons/remixicons"
|
7
|
-
|
8
|
-
/* Required TinyMCE components */
|
9
|
-
import "tinymce/themes/silver"
|
10
|
-
import "tinymce/models/dom"
|
11
|
-
|
12
|
-
/* Import plugins */
|
13
|
-
import "tinymce/plugins/anchor"
|
14
|
-
import "tinymce/plugins/charmap"
|
15
|
-
import "tinymce/plugins/code"
|
16
|
-
import "tinymce/plugins/directionality"
|
17
|
-
import "tinymce/plugins/fullscreen"
|
18
|
-
import "tinymce/plugins/link"
|
19
|
-
import "tinymce/plugins/lists"
|
20
|
-
import "tinymce/plugins/alchemy_link"
|
21
|
-
|
22
|
-
export default tinymce
|
data/eslint.config.js
DELETED
data/lib/alchemy/config.rb
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Alchemy
|
4
|
-
class Config
|
5
|
-
class << self
|
6
|
-
# Returns the configuration for given parameter name.
|
7
|
-
#
|
8
|
-
# @param name [String]
|
9
|
-
#
|
10
|
-
def get(name)
|
11
|
-
check_deprecation(name)
|
12
|
-
key = check_replacement(name)
|
13
|
-
show[key.to_s]
|
14
|
-
end
|
15
|
-
|
16
|
-
alias_method :parameter, :get
|
17
|
-
|
18
|
-
# Returns a merged configuration of the following files
|
19
|
-
#
|
20
|
-
# Alchemys default config: +gems/../alchemy_cms/config/alchemy/config.yml+
|
21
|
-
# Your apps default config: +your_app/config/alchemy/config.yml+
|
22
|
-
# Environment specific config: +your_app/config/alchemy/development.config.yml+
|
23
|
-
#
|
24
|
-
# An environment specific config overwrites the settings of your apps default config,
|
25
|
-
# while your apps default config has precedence over Alchemys default config.
|
26
|
-
#
|
27
|
-
def show
|
28
|
-
@config ||= merge_configs!(alchemy_config, main_app_config, env_specific_config)
|
29
|
-
end
|
30
|
-
|
31
|
-
# A list of deprecated configuration values
|
32
|
-
# a value of nil means there is no new default
|
33
|
-
# any not nil value is the new default
|
34
|
-
def deprecated_configs
|
35
|
-
{}
|
36
|
-
end
|
37
|
-
|
38
|
-
# A list of replaced configuration keys
|
39
|
-
def replaced_config_keys
|
40
|
-
{
|
41
|
-
output_image_quality: :output_image_jpg_quality
|
42
|
-
}
|
43
|
-
end
|
44
|
-
|
45
|
-
private
|
46
|
-
|
47
|
-
# Alchemy default configuration
|
48
|
-
def alchemy_config
|
49
|
-
read_file Engine.root.join("config/alchemy/config.yml")
|
50
|
-
end
|
51
|
-
|
52
|
-
# Application specific configuration
|
53
|
-
def main_app_config
|
54
|
-
read_file Rails.root.join("config/alchemy/config.yml")
|
55
|
-
end
|
56
|
-
|
57
|
-
# Rails Environment specific configuration
|
58
|
-
def env_specific_config
|
59
|
-
read_file Rails.root.join("config/alchemy/#{Rails.env}.config.yml")
|
60
|
-
end
|
61
|
-
|
62
|
-
# Tries to load yaml file from given path.
|
63
|
-
# If it does not exist, or its empty, it returns an empty Hash.
|
64
|
-
#
|
65
|
-
def read_file(file)
|
66
|
-
YAML.safe_load(
|
67
|
-
ERB.new(File.read(file)).result,
|
68
|
-
permitted_classes: YAML_PERMITTED_CLASSES,
|
69
|
-
aliases: true
|
70
|
-
) || {}
|
71
|
-
rescue Errno::ENOENT
|
72
|
-
{}
|
73
|
-
end
|
74
|
-
|
75
|
-
# Merges all given configs together
|
76
|
-
#
|
77
|
-
def merge_configs!(*config_files)
|
78
|
-
raise LoadError, "No Alchemy config file found!" if config_files.map(&:blank?).all?
|
79
|
-
|
80
|
-
config = {}
|
81
|
-
config_files.each { |h| config.merge!(h.stringify_keys!) }
|
82
|
-
config
|
83
|
-
end
|
84
|
-
|
85
|
-
def check_deprecation(name)
|
86
|
-
if deprecated_configs.key?(name.to_sym)
|
87
|
-
config = deprecated_configs[name.to_sym]
|
88
|
-
if config.nil?
|
89
|
-
Alchemy::Deprecation.warn("#{name} configuration is deprecated and will be removed from Alchemy #{Alchemy::Deprecation.deprecation_horizon}")
|
90
|
-
else
|
91
|
-
value = show[name.to_s]
|
92
|
-
if value != config
|
93
|
-
Alchemy::Deprecation.warn("Setting #{name} configuration to #{value} is deprecated and will be always #{config} in Alchemy #{Alchemy::Deprecation.deprecation_horizon}")
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
def check_replacement(name)
|
100
|
-
if replaced_config_keys.key?(name.to_sym)
|
101
|
-
old_key = replaced_config_keys[name.to_sym]
|
102
|
-
if show[old_key.to_s]
|
103
|
-
Alchemy::Deprecation.warn("Using #{old_key} configuration is deprecated and will be removed in Alchemy #{Alchemy::Deprecation.deprecation_horizon}. Please use #{name} instead.")
|
104
|
-
old_key
|
105
|
-
else
|
106
|
-
name
|
107
|
-
end
|
108
|
-
else
|
109
|
-
name
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Alchemy
|
4
|
-
class ElementDefinition
|
5
|
-
class << self
|
6
|
-
# Returns the definitions from elements.yml file.
|
7
|
-
#
|
8
|
-
# Place a +elements.yml+ file inside your apps +config/alchemy+ folder to define
|
9
|
-
# your own set of elements
|
10
|
-
#
|
11
|
-
def all
|
12
|
-
@definitions ||= read_definitions_file.map(&:with_indifferent_access)
|
13
|
-
end
|
14
|
-
|
15
|
-
# Add additional page definitions to collection.
|
16
|
-
#
|
17
|
-
# Useful for extending the elements from an Alchemy module.
|
18
|
-
#
|
19
|
-
# === Usage Example
|
20
|
-
#
|
21
|
-
# Call +Alchemy::ElementDefinition.add(your_definition)+ in your engine.rb file.
|
22
|
-
#
|
23
|
-
# @param [Array || Hash]
|
24
|
-
# You can pass a single element definition as Hash, or a collection of elements as Array.
|
25
|
-
#
|
26
|
-
def add(element)
|
27
|
-
all
|
28
|
-
if element.is_a?(Array)
|
29
|
-
@definitions += element
|
30
|
-
elsif element.is_a?(Hash)
|
31
|
-
@definitions << element
|
32
|
-
else
|
33
|
-
raise TypeError
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
# Returns one element definition by given name.
|
38
|
-
#
|
39
|
-
def get(name)
|
40
|
-
return {} if name.blank?
|
41
|
-
|
42
|
-
all.detect { |a| a["name"] == name }
|
43
|
-
end
|
44
|
-
|
45
|
-
def reset!
|
46
|
-
@definitions = nil
|
47
|
-
end
|
48
|
-
|
49
|
-
# The absolute +elements.yml+ file path
|
50
|
-
# @return [Pathname]
|
51
|
-
def definitions_file_path
|
52
|
-
Rails.root.join("config", "alchemy", "elements.yml")
|
53
|
-
end
|
54
|
-
|
55
|
-
private
|
56
|
-
|
57
|
-
# Reads the element definitions from +config/alchemy/elements.yml+.
|
58
|
-
#
|
59
|
-
def read_definitions_file
|
60
|
-
if File.exist?(definitions_file_path)
|
61
|
-
YAML.safe_load(
|
62
|
-
ERB.new(File.read(definitions_file_path)).result,
|
63
|
-
permitted_classes: YAML_PERMITTED_CLASSES,
|
64
|
-
aliases: true
|
65
|
-
) || []
|
66
|
-
else
|
67
|
-
raise LoadError,
|
68
|
-
"Could not find elements.yml file! Please run `rails generate alchemy:install`"
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
data/lib/alchemy/page_layout.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Alchemy
|
4
|
-
class PageLayout
|
5
|
-
class << self
|
6
|
-
# Returns all page layouts.
|
7
|
-
#
|
8
|
-
# They are defined in +config/alchemy/page_layout.yml+ file.
|
9
|
-
#
|
10
|
-
def all
|
11
|
-
@definitions ||= read_definitions_file.map(&:with_indifferent_access)
|
12
|
-
end
|
13
|
-
|
14
|
-
# Add additional page definitions to collection.
|
15
|
-
#
|
16
|
-
# Useful for extending the page layouts from an Alchemy module.
|
17
|
-
#
|
18
|
-
# === Usage Example
|
19
|
-
#
|
20
|
-
# Call +Alchemy::PageLayout.add(your_definition)+ in your engine.rb file.
|
21
|
-
#
|
22
|
-
# @param [Array || Hash]
|
23
|
-
# You can pass a single layout definition as Hash, or a collection of page layouts as Array.
|
24
|
-
#
|
25
|
-
def add(page_layout)
|
26
|
-
all
|
27
|
-
if page_layout.is_a?(Array)
|
28
|
-
@definitions += page_layout
|
29
|
-
elsif page_layout.is_a?(Hash)
|
30
|
-
@definitions << page_layout
|
31
|
-
else
|
32
|
-
raise TypeError
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
# Returns one page definition by given name.
|
37
|
-
#
|
38
|
-
def get(name)
|
39
|
-
return {} if name.blank?
|
40
|
-
|
41
|
-
all.detect { |a| a["name"].casecmp(name).zero? }
|
42
|
-
end
|
43
|
-
|
44
|
-
def reset!
|
45
|
-
@definitions = nil
|
46
|
-
end
|
47
|
-
|
48
|
-
# The absolute +page_layouts.yml+ file path
|
49
|
-
# @return [Pathname]
|
50
|
-
def layouts_file_path
|
51
|
-
Rails.root.join("config", "alchemy", "page_layouts.yml")
|
52
|
-
end
|
53
|
-
|
54
|
-
private
|
55
|
-
|
56
|
-
# Reads the layout definitions from +config/alchemy/page_layouts.yml+.
|
57
|
-
#
|
58
|
-
def read_definitions_file
|
59
|
-
if File.exist?(layouts_file_path)
|
60
|
-
Array.wrap(
|
61
|
-
YAML.safe_load(
|
62
|
-
ERB.new(File.read(layouts_file_path)).result,
|
63
|
-
permitted_classes: YAML_PERMITTED_CLASSES,
|
64
|
-
aliases: true
|
65
|
-
) || []
|
66
|
-
)
|
67
|
-
else
|
68
|
-
raise LoadError, "Could not find page_layouts.yml file! Please run `rails generate alchemy:install`"
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Alchemy
|
4
|
-
class ResourceFilter
|
5
|
-
attr_reader :name
|
6
|
-
|
7
|
-
def initialize(filter, resource_name)
|
8
|
-
@filter = filter
|
9
|
-
@name = filter[:name]
|
10
|
-
@resource_name = resource_name
|
11
|
-
@values = filter[:values].presence || []
|
12
|
-
end
|
13
|
-
|
14
|
-
def options_for_select
|
15
|
-
translated_values.zip(values)
|
16
|
-
end
|
17
|
-
|
18
|
-
def values
|
19
|
-
if translated?
|
20
|
-
@values.map { |v| v[1] }
|
21
|
-
else
|
22
|
-
@values
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def translated?
|
29
|
-
@values.first.is_a?(Array)
|
30
|
-
end
|
31
|
-
|
32
|
-
def translated_values
|
33
|
-
if translated?
|
34
|
-
@values.map { |a| a[0] }
|
35
|
-
else
|
36
|
-
@values.map { |v| Alchemy.t(v.to_sym, scope: ["filters", @resource_name, @name, "values"]) }
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "fileutils"
|
4
|
-
require "thor"
|
5
|
-
|
6
|
-
module Alchemy
|
7
|
-
class Upgrader::SevenPointFour < Upgrader
|
8
|
-
include Thor::Base
|
9
|
-
include Thor::Actions
|
10
|
-
|
11
|
-
class << self
|
12
|
-
def update_custom_css_config
|
13
|
-
if File.exist? "app/assets/config/manifest.js"
|
14
|
-
log "Removing alchemy/admin/custom.css from assets config file."
|
15
|
-
task.gsub_file "app/assets/config/manifest.js", %r{//= link alchemy/admin/custom.css\n}, ""
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def task
|
22
|
-
@_task || new
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "fileutils"
|
4
|
-
require "thor"
|
5
|
-
|
6
|
-
module Alchemy
|
7
|
-
class Upgrader::SevenPointThree < Upgrader
|
8
|
-
include Thor::Base
|
9
|
-
include Thor::Actions
|
10
|
-
|
11
|
-
source_root Alchemy::Engine.root.join("lib/generators/alchemy/install/files")
|
12
|
-
|
13
|
-
class << self
|
14
|
-
def remove_admin_stylesheets
|
15
|
-
if File.exist? "vendor/assets/stylesheets/alchemy/admin/all.css"
|
16
|
-
log "Removing Alchemy admin stylesheets."
|
17
|
-
FileUtils.rm_f "vendor/assets/stylesheets/alchemy/admin/all.css"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def generate_custom_css_entrypoint
|
22
|
-
if File.exist? "app/assets/config/manifest.js"
|
23
|
-
log "Generating alchemy/admin/custom.css entrypoint file."
|
24
|
-
task.copy_file "custom.css", "app/assets/stylesheets/alchemy/admin/custom.css"
|
25
|
-
task.append_to_file "app/assets/config/manifest.js", "//= link alchemy/admin/custom.css\n"
|
26
|
-
todo(<<~TODO, "Custom styles have been moved to `app/assets/alchemy/admin/custom.css`")
|
27
|
-
Check the new `app/assets/alchemy/admin/custom.css` file for any custom styles you might
|
28
|
-
have added to the old `vendor/assets/stylesheets/alchemy/admin/all.css` file.
|
29
|
-
TODO
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def show_resource_table_notice
|
34
|
-
custom_modules = Alchemy::Modules.alchemy_modules.reject { _1["engine_name"] == "alchemy" }
|
35
|
-
return if custom_modules.none?
|
36
|
-
|
37
|
-
todo(<<~TODO, "Resource templates have been updated.")
|
38
|
-
We updated the resource templates to use the newly introduced
|
39
|
-
`Alchemy::Admin::Resource::Table` view component.
|
40
|
-
|
41
|
-
Please update your resource templates accordingly.
|
42
|
-
TODO
|
43
|
-
end
|
44
|
-
|
45
|
-
private
|
46
|
-
|
47
|
-
def task
|
48
|
-
@_task || new
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
<%%= render Alchemy::Ingredients::<%= @ingredient_view_component_class %>.new(<%= @ingredient_view_local %>) %>
|
@@ -1 +0,0 @@
|
|
1
|
-
import "@alchemy_cms/admin"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
// This is the AlchemyCMS javascript manifest that'll be compiled into alchemy/admin/all.js
|
2
|
-
//
|
3
|
-
// In order to add custom scripts to Alchemy's admin interface just require the files here.
|
4
|
-
//
|
5
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
6
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
7
|
-
//
|
8
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
9
|
-
// about supported directives.
|
10
|
-
//
|
11
|
-
//= require alchemy/admin
|
@@ -1,25 +0,0 @@
|
|
1
|
-
article {
|
2
|
-
width: 50%;
|
3
|
-
font: 16px/20px Helvetica, Arial, sans-serif;
|
4
|
-
color: #333;
|
5
|
-
margin: 1em auto;
|
6
|
-
padding: 0.5em 1em;
|
7
|
-
background: #f4f4f4;
|
8
|
-
}
|
9
|
-
article h2 {
|
10
|
-
font-size: 24px;
|
11
|
-
line-height: 1.25;
|
12
|
-
font-weight: bold;
|
13
|
-
}
|
14
|
-
article a {
|
15
|
-
color: #5588D3;
|
16
|
-
}
|
17
|
-
article img {
|
18
|
-
max-width: 100%;
|
19
|
-
}
|
20
|
-
article figure {
|
21
|
-
margin: 0;
|
22
|
-
}
|
23
|
-
article figcaption {
|
24
|
-
font-size: 14px;
|
25
|
-
}
|
data/rollup.config.mjs
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
import resolve from "@rollup/plugin-node-resolve"
|
2
|
-
import commonjs from "@rollup/plugin-commonjs"
|
3
|
-
import terser from "@rollup/plugin-terser"
|
4
|
-
|
5
|
-
export default [
|
6
|
-
{
|
7
|
-
input: "node_modules/clipboard/dist/clipboard.min.js",
|
8
|
-
output: {
|
9
|
-
file: "vendor/javascript/clipboard.min.js"
|
10
|
-
},
|
11
|
-
context: "window"
|
12
|
-
},
|
13
|
-
{
|
14
|
-
input: "node_modules/cropperjs/dist/cropper.esm.js",
|
15
|
-
output: {
|
16
|
-
file: "vendor/javascript/cropperjs.min.js"
|
17
|
-
},
|
18
|
-
plugins: [terser()],
|
19
|
-
context: "window"
|
20
|
-
},
|
21
|
-
{
|
22
|
-
input: "node_modules/flatpickr/dist/esm/index.js",
|
23
|
-
output: {
|
24
|
-
file: "vendor/javascript/flatpickr.min.js"
|
25
|
-
},
|
26
|
-
plugins: [resolve(), terser()],
|
27
|
-
context: "window"
|
28
|
-
},
|
29
|
-
{
|
30
|
-
input: "node_modules/handlebars/dist/handlebars.min.js",
|
31
|
-
output: {
|
32
|
-
file: "vendor/javascript/handlebars.min.js"
|
33
|
-
},
|
34
|
-
context: "window"
|
35
|
-
},
|
36
|
-
{
|
37
|
-
input: "node_modules/jquery/dist/jquery.min.js",
|
38
|
-
output: {
|
39
|
-
file: "vendor/javascript/jquery.min.js"
|
40
|
-
},
|
41
|
-
context: "window"
|
42
|
-
},
|
43
|
-
{
|
44
|
-
input: "node_modules/keymaster/keymaster.js",
|
45
|
-
output: {
|
46
|
-
file: "vendor/javascript/keymaster.min.js"
|
47
|
-
},
|
48
|
-
plugins: [terser()],
|
49
|
-
context: "window"
|
50
|
-
},
|
51
|
-
{
|
52
|
-
input: "node_modules/sortablejs/modular/sortable.esm.js",
|
53
|
-
output: {
|
54
|
-
file: "vendor/javascript/sortable.min.js"
|
55
|
-
},
|
56
|
-
plugins: [terser()]
|
57
|
-
},
|
58
|
-
{
|
59
|
-
input: "node_modules/select2/select2.min.js",
|
60
|
-
output: {
|
61
|
-
file: "vendor/javascript/select2.min.js"
|
62
|
-
},
|
63
|
-
context: "window"
|
64
|
-
},
|
65
|
-
{
|
66
|
-
input: "node_modules/@ungap/custom-elements/min.js",
|
67
|
-
output: {
|
68
|
-
file: "vendor/javascript/ungap-custom-elements.min.js"
|
69
|
-
}
|
70
|
-
},
|
71
|
-
{
|
72
|
-
input: "node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js",
|
73
|
-
output: {
|
74
|
-
file: "vendor/javascript/rails-ujs.min.js"
|
75
|
-
},
|
76
|
-
plugins: [terser()]
|
77
|
-
},
|
78
|
-
{
|
79
|
-
input: "bundles/shoelace.js",
|
80
|
-
output: {
|
81
|
-
file: "vendor/javascript/shoelace.min.js"
|
82
|
-
},
|
83
|
-
plugins: [resolve(), terser()]
|
84
|
-
},
|
85
|
-
{
|
86
|
-
input: "bundles/tinymce.js",
|
87
|
-
output: {
|
88
|
-
file: "vendor/javascript/tinymce.min.js",
|
89
|
-
name: "tinymce",
|
90
|
-
format: "esm"
|
91
|
-
},
|
92
|
-
plugins: [
|
93
|
-
resolve({
|
94
|
-
modulePaths: ["app/javascript"]
|
95
|
-
}),
|
96
|
-
commonjs(),
|
97
|
-
terser()
|
98
|
-
]
|
99
|
-
},
|
100
|
-
{
|
101
|
-
input: "app/javascript/preview.js",
|
102
|
-
output: {
|
103
|
-
file: "app/assets/builds/alchemy/preview.min.js"
|
104
|
-
},
|
105
|
-
context: "window",
|
106
|
-
plugins: [terser()]
|
107
|
-
}
|
108
|
-
]
|