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
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-add-line" xmlns="http://www.w3.org/2000/svg"><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2h6Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-alert-line" xmlns="http://www.w3.org/2000/svg"><path d="m12.866 3 9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0Zm-8.66 16h15.588L12 5.5 4.206 19ZM11 16h2v2h-2v-2Zm0-7h2v5h-2V9Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-archive-drawer-line" xmlns="http://www.w3.org/2000/svg"><path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992ZM19 11V4H5v7h14Zm0 2H5v7h14v-7ZM9 6h6v2H9V6Zm0 9h6v2H9v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-down-line" xmlns="http://www.w3.org/2000/svg"><path d="m13 16.172 5.364-5.364 1.414 1.414L12 20l-7.778-7.778 1.414-1.414L11 16.172V4h2v12.172Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-down-s-line" xmlns="http://www.w3.org/2000/svg"><path d="m12 13.171 4.95-4.95 1.414 1.415L12 16 5.636 9.636 7.05 8.222l4.95 4.95Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-left-right-line" xmlns="http://www.w3.org/2000/svg"><path d="M16.05 12.05 21 17l-4.95 4.95-1.414-1.415L17.172 18H4v-2h13.172l-2.536-2.535 1.414-1.414Zm-8.1-10 1.414 1.414-2.536 2.535H20v2H6.828l2.536 2.536L7.95 11.95 3 7l4.95-4.95Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-left-s-line" xmlns="http://www.w3.org/2000/svg"><path d="m10.828 12 4.95 4.95-1.414 1.415L8 12l6.364-6.364 1.414 1.414-4.95 4.95Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-left-wide-line" xmlns="http://www.w3.org/2000/svg"><path d="m8.368 12 4.748-8.968 1.768.936L10.632 12l4.252 8.032-1.768.936L8.368 12Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-right-s-line" xmlns="http://www.w3.org/2000/svg"><path d="m13.172 12-4.95-4.95 1.414-1.413L16 12l-6.364 6.364-1.414-1.415 4.95-4.95Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-right-wide-line" xmlns="http://www.w3.org/2000/svg"><path d="m15.632 12-4.748-8.968-1.768.936L13.368 12l-4.252 8.032 1.768.936L15.632 12Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-arrow-up-line" xmlns="http://www.w3.org/2000/svg"><path d="M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-article-line" xmlns="http://www.w3.org/2000/svg"><path d="M20 22H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Zm-1-2V4H5v16h14ZM7 6h4v4H7V6Zm0 6h10v2H7v-2Zm0 4h10v2H7v-2Zm6-9h4v2h-4V7Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-book-3-line" xmlns="http://www.w3.org/2000/svg"><path d="M21 4H7a2 2 0 1 0 0 4h14v13a1 1 0 0 1-1 1H7a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h13a1 1 0 0 1 1 1v1ZM5 18a2 2 0 0 0 2 2h12V10H7a3.982 3.982 0 0 1-2-.535V18ZM20 7H7a1 1 0 0 1 0-2h13v2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-bookmark-fill" xmlns="http://www.w3.org/2000/svg"><path d="M5 2h14a1 1 0 0 1 1 1v19.143a.5.5 0 0 1-.766.424L12 18.03l-7.234 4.536A.5.5 0 0 1 4 22.143V3a1 1 0 0 1 1-1Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-bookmark-line" xmlns="http://www.w3.org/2000/svg"><path d="M5 2h14a1 1 0 0 1 1 1v19.143a.5.5 0 0 1-.766.424L12 18.03l-7.234 4.536A.5.5 0 0 1 4 22.143V3a1 1 0 0 1 1-1Zm13 2H6v15.432l6-3.761 6 3.761V4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-bug-line" xmlns="http://www.w3.org/2000/svg"><path d="M13 19.9a5.002 5.002 0 0 0 4-4.9v-3c0-.701-.144-1.378-.415-2h-9.17A4.981 4.981 0 0 0 7 12v3a5.002 5.002 0 0 0 4 4.9V14h2v5.9Zm-7.464-2.21A6.98 6.98 0 0 1 5 15H2v-2h3v-1c0-.643.087-1.265.249-1.856L3.036 8.866l1-1.732L6.056 8.3a7.01 7.01 0 0 1 .199-.3h11.49c.069.098.135.199.199.3l2.02-1.166 1 1.732-2.213 1.278c.162.59.249 1.213.249 1.856v1h3v2h-3c0 .953-.19 1.862-.536 2.69l2.5 1.444-1 1.732-2.526-1.458A6.986 6.986 0 0 1 12 22a6.986 6.986 0 0 1-5.438-2.592l-2.526 1.458-1-1.732 2.5-1.443ZM8 6a4 4 0 1 1 8 0H8Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-calendar-line" xmlns="http://www.w3.org/2000/svg"><path d="M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2Zm11 10H4v8h16v-8ZM7 5H4v4h16V5h-3v2h-2V5H9v2H7V5Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-camera-line" xmlns="http://www.w3.org/2000/svg"><path d="m9.828 5-2 2H4v12h16V7h-3.828l-2-2H9.828ZM9 3h6l2 2h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4l2-2Zm3 15a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11Zm0-2a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-check-line" xmlns="http://www.w3.org/2000/svg"><path d="m10 15.17 9.192-9.191 1.414 1.414L10 17.999l-6.364-6.364 1.414-1.414 4.95 4.95Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-checkbox-multiple-line" xmlns="http://www.w3.org/2000/svg"><path d="M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.992C17 21.55 16.551 22 15.992 22H3.008A1.006 1.006 0 0 1 2 20.992l.003-12.985C2.003 7.451 2.452 7 3.01 7H7Zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3Zm6 2H4.003L4 20h11V9Zm-6.498 9-3.535-3.536L6.38 13.05l2.121 2.122 4.243-4.243 1.414 1.414L8.502 18Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-clipboard-fill" xmlns="http://www.w3.org/2000/svg"><path d="M6 4v4h12V4h2.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.993.993 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H6Zm2-2h8v4H8V2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-clipboard-line" xmlns="http://www.w3.org/2000/svg"><path d="M7 4V2h10v2h3.007c.548 0 .993.445.993.993v16.014a.994.994 0 0 1-.993.993H3.993A.993.993 0 0 1 3 21.007V4.993C3 4.445 3.445 4 3.993 4H7Zm0 2H5v14h14V6h-2v2H7V6Zm2-2v2h6V4H9Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-close-line" xmlns="http://www.w3.org/2000/svg"><path d="m12 10.586 4.95-4.95 1.414 1.415-4.95 4.95 4.95 4.95-1.415 1.414-4.95-4.95-4.949 4.95-1.414-1.415 4.95-4.95-4.95-4.95L7.05 5.638l4.95 4.95Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-cloud-line" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a7 7 0 0 1 6.992 7.339A6 6 0 0 1 17 21H7A6 6 0 0 1 5.008 9.339 7 7 0 0 1 12 2Zm0 2a5 5 0 0 0-4.994 5.243l.07 1.488-1.404.494A4.002 4.002 0 0 0 7 19h10a4 4 0 1 0-3.796-5.265l-1.898-.633A6.003 6.003 0 0 1 17 9a5 5 0 0 0-5-5Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-cloud-off-line" xmlns="http://www.w3.org/2000/svg"><path d="m3.515 2.1 19.092 19.092-1.415 1.415-2.014-2.015A5.984 5.984 0 0 1 17 21H7A6 6 0 0 1 5.008 9.339a6.992 6.992 0 0 1 .353-2.563L2.1 3.514 3.515 2.1ZM7 9c0 .081.002.163.006.243l.07 1.488-1.404.494A4.002 4.002 0 0 0 7 19h10c.186 0 .369-.013.548-.037L7.03 8.445C7.01 8.627 7 8.812 7 9Zm5-7a7 7 0 0 1 6.992 7.339 6.003 6.003 0 0 1 3.212 8.65l-1.493-1.494a3.999 3.999 0 0 0-5.207-5.206L14.01 9.796C14.891 9.29 15.911 9 17 9a5 5 0 0 0-7.876-4.09l-1.43-1.43A6.97 6.97 0 0 1 12 2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-computer-line" xmlns="http://www.w3.org/2000/svg"><path d="M4 16h16V5H4v11Zm9 2v2h4v2H7v-2h4v-2H2.992A.998.998 0 0 1 2 16.992V4.008C2 3.451 2.455 3 2.992 3h18.016c.548 0 .992.449.992 1.007v12.985c0 .557-.455 1.008-.992 1.008H13Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-contract-right-line" xmlns="http://www.w3.org/2000/svg"><path d="M12.171 11 7.516 6.343 8.929 4.93l7.07 7.07-7.07 7.072-1.414-1.414L12.17 13H3v-2h9.171ZM18 19V5h2v14h-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-contract-up-down-line" xmlns="http://www.w3.org/2000/svg"><path d="M5.793 5.207 12 11.414l6.207-6.207-1.414-1.414L12 8.586 7.207 3.793 5.793 5.207Zm12.414 13.586L12 12.586l-6.207 6.207 1.414 1.414L12 15.414l4.793 4.793 1.414-1.414Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-crop-line" xmlns="http://www.w3.org/2000/svg"><path d="M15 17v2H6a1 1 0 0 1-1-1V7H2V5h3V2h2v15h8Zm2 5V7H9V5h9a1 1 0 0 1 1 1v11h3v2h-3v3h-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-delete-bin-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3Zm1 2H6v12h12V8Zm-4.586 6 1.768 1.768-1.414 1.414L12 15.414l-1.768 1.768-1.414-1.414L10.586 14l-1.768-1.768 1.414-1.414L12 12.586l1.768-1.768 1.414 1.414L13.414 14ZM9 4v2h6V4H9Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-download-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M13 10h5l-6 6-6-6h5V3h2v7Zm-9 9h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-draggable" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 6.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm1.5 5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM15.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm1.5 5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm-1.5 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-edit-line" xmlns="http://www.w3.org/2000/svg"><path d="M6.414 15.89 16.556 5.748l-1.414-1.414L5 14.476v1.414h1.414Zm.829 2H3v-4.243L14.435 2.212a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 17.89ZM3 19.89h18v2H3v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-eraser-line" xmlns="http://www.w3.org/2000/svg"><path d="m8.586 8.854-4.95 4.95 5.194 5.194H10v-.001h1.171l3.779-3.779-6.364-6.364ZM10 7.44l6.364 6.364 2.828-2.828-6.364-6.364L10 7.44Zm4 11.557h7v2h-9l-3.998.002-6.487-6.488a1 1 0 0 1 0-1.414L12.12 2.491a1 1 0 0 1 1.414 0l7.779 7.778a1 1 0 0 1 0 1.414L14 18.997Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-expand-left-line" xmlns="http://www.w3.org/2000/svg"><path d="m10.071 4.929 1.414 1.414L6.828 11H16v2H6.828l4.657 4.657-1.414 1.414L3 12l7.071-7.071ZM18.001 19V5h2v14h-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-expand-right-line" xmlns="http://www.w3.org/2000/svg"><path d="m17.172 11-4.657-4.657 1.414-1.414L21 12l-7.071 7.071-1.414-1.414L17.172 13H8v-2h9.172ZM4 19V5h2v14H4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-external-link-line" xmlns="http://www.w3.org/2000/svg"><path d="M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6Zm11-3v8h-2V6.413l-7.793 7.794-1.414-1.414L17.585 5H13V3h8Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-3-line" xmlns="http://www.w3.org/2000/svg"><path d="M21 8v12.993A1 1 0 0 1 20.007 22H3.993A.993.993 0 0 1 3 21.008V2.992C3 2.455 3.449 2 4.002 2h10.995L21 8Zm-2 1h-5V4H5v16h14V9Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-add-line" xmlns="http://www.w3.org/2000/svg"><path d="M15 4H5v16h14V8h-4V4ZM3 2.992C3 2.444 3.447 2 3.998 2H16l5 5v13.992A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008V2.992ZM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2h3Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-cloud-line" xmlns="http://www.w3.org/2000/svg"><path d="M14.997 2 21 8l.001 4.26a5.472 5.472 0 0 0-2-1.053L19 9h-5V4H5v16h5.06a4.73 4.73 0 0 0 .817 2H3.993a.993.993 0 0 1-.986-.876L3 21.008V2.992c0-.498.387-.927.885-.985L4.002 2h10.995ZM17.5 13a3.5 3.5 0 0 1 3.5 3.5l-.002.103a2.75 2.75 0 0 1-.58 5.392L20.25 22h-5.5l-.168-.005a2.75 2.75 0 0 1-.579-5.393L14 16.5a3.5 3.5 0 0 1 3.5-3.5Zm0 2a1.5 1.5 0 0 0-1.473 1.215l-.02.14L16 16.5v1.62l-1.444.406a.75.75 0 0 0 .08 1.465l.109.01h5.51a.75.75 0 0 0 .19-1.475l-1.013-.283L19 18.12V16.5l-.007-.145A1.5 1.5 0 0 0 17.5 15Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-copy-line" xmlns="http://www.w3.org/2000/svg"><path d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1H7ZM5.002 8 5 20h10V8H5.002ZM9 6h8v10h2V4H9v2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-damage-line" xmlns="http://www.w3.org/2000/svg"><path d="M19 9h-5V4H5v7.857l1.5 1.393L10 9.5l3 5 2-2.5 3 3-3-.5-2 2.5-3-4-3 3.5-2-1.25V20h14V9Zm2-1v12.993A1 1 0 0 1 20.007 22H3.993A.993.993 0 0 1 3 21.008V2.992C3 2.455 3.449 2 4.002 2h10.995L21 8Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-edit-line" xmlns="http://www.w3.org/2000/svg"><path d="m21 6.757-2 2V4h-9v5H5v11h14v-2.757l2-2v5.765a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8l6.003-6h10.995C20.55 2 21 2.455 21 2.992v3.765Zm.778 2.05 1.414 1.415L15.414 18l-1.416-.002.002-1.412 7.778-7.778Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-excel-2-line" xmlns="http://www.w3.org/2000/svg"><path d="m2.859 2.877 12.57-1.795a.5.5 0 0 1 .571.494v20.848a.5.5 0 0 1-.57.494L2.858 21.123a1 1 0 0 1-.859-.99V3.867a1 1 0 0 1 .859-.99ZM4 4.735v14.53l10 1.429V3.306L4 4.735ZM17 19h3V5h-3V3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-4v-2Zm-6.8-7 2.8 4h-2.4L9 13.714 7.4 16H5l2.8-4L5 8h2.4L9 10.286 10.6 8H13l-2.8 4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-forbid-line" xmlns="http://www.w3.org/2000/svg"><path d="M11.29 20c.215.722.543 1.396.965 2H3.993A1 1 0 0 1 3 21.008V2.992C3 2.444 3.447 2 3.998 2H16l5 5v4.674a6.95 6.95 0 0 0-2-.603V8h-4V4H5v16h6.29ZM18 23a5 5 0 1 1 0-10 5 5 0 0 1 0 10Zm-1.293-2.292a3 3 0 0 0 4.001-4.001l-4.001 4Zm-1.415-1.415 4.001-4a3 3 0 0 0-4.001 4.001Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-image-line" xmlns="http://www.w3.org/2000/svg"><path d="M15 8V4H5v16h14V8h-4ZM3 2.992C3 2.444 3.447 2 3.998 2H16l5 5v13.992A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008V2.992ZM11 9.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm6.5 7.5-4-7L8 17h9.5Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-line" xmlns="http://www.w3.org/2000/svg"><path d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8l6-5.997ZM5.83 8H9V4.83L5.83 8ZM11 4v5a1 1 0 0 1-1 1H5v10h14V4h-8Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-music-line" xmlns="http://www.w3.org/2000/svg"><path d="M16 8v2h-3v4.5a2.5 2.5 0 1 1-2-2.45V8h4V4H5v16h14V8h-3ZM3 2.992C3 2.444 3.447 2 3.998 2H16l5 5v13.992A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008V2.992Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-pdf-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M5 4h10v4h4v12H5V4ZM3.998 2A.995.995 0 0 0 3 2.992v18.016a1 1 0 0 0 .993.992h16.014A1 1 0 0 0 21 20.992V7l-5-5H3.998ZM10.5 7.5c0 1.577-.456 3.437-1.225 5.153-.772 1.723-1.814 3.197-2.9 4.066l1.18 1.613c2.927-1.952 6.168-3.29 9.303-2.842l.458-1.939C14.644 12.661 12.5 9.99 12.5 7.5h-2Zm.6 5.972c.267-.597.504-1.216.704-1.843a9.66 9.66 0 0 0 1.706 1.966c-.982.176-1.944.465-2.875.833.165-.314.32-.633.465-.956Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-ppt-2-line" xmlns="http://www.w3.org/2000/svg"><path d="m2.859 2.877 12.57-1.795a.5.5 0 0 1 .571.494v20.848a.5.5 0 0 1-.57.494L2.858 21.123a1 1 0 0 1-.859-.99V3.867a1 1 0 0 1 .859-.99ZM4 4.735v14.53l10 1.429V3.306L4 4.735ZM17 19h3V5h-3V3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-4v-2ZM5 8h8v6H7v2H5V8Zm2 2v2h4v-2H7Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-text-line" xmlns="http://www.w3.org/2000/svg"><path d="M21 8v12.993A1 1 0 0 1 20.007 22H3.993A.993.993 0 0 1 3 21.008V2.992C3 2.455 3.449 2 4.002 2h10.995L21 8Zm-2 1h-5V4H5v16h14V9ZM8 7h3v2H8V7Zm0 4h8v2H8v-2Zm0 4h8v2H8v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-upload-line" xmlns="http://www.w3.org/2000/svg"><path d="M15 4H5v16h14V8h-4V4ZM3 2.992C3 2.444 3.447 2 3.998 2H16l5 5v13.992A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008V2.992ZM13 12v4h-2v-4H8l4-4 4 4h-3Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-video-line" xmlns="http://www.w3.org/2000/svg"><path d="M15 4v4h4v12H5V4h10ZM3.998 2A.995.995 0 0 0 3 2.992v18.016a1 1 0 0 0 .993.992h16.014A1 1 0 0 0 21 20.992V7l-5-5H3.998Zm11.003 9.667-4.88-3.253a.4.4 0 0 0-.621.333v6.505a.4.4 0 0 0 .622.333L15 12.333a.401.401 0 0 0 0-.666Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-word-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M17 19h3V5h-3V3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-4v-2ZM2.859 2.877l12.57-1.795a.5.5 0 0 1 .571.494v20.848a.5.5 0 0 1-.57.494L2.858 21.123a1 1 0 0 1-.859-.99V3.867a1 1 0 0 1 .859-.99ZM4 4.735v14.53l10 1.429V3.306L4 4.735ZM11 8h2v8h-2l-2-2-2 2H5V8h2l.01 5L9 11l2 1.989V8Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-file-zip-line" xmlns="http://www.w3.org/2000/svg"><path d="M20 22H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Zm-1-2V4H5v16h14Zm-5-8v5h-4v-3h2v-2h2Zm-2-8h2v2h-2V4Zm-2 2h2v2h-2V6Zm2 2h2v2h-2V8Zm-2 2h2v2h-2v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-folder-line" xmlns="http://www.w3.org/2000/svg"><path d="M4 5v14h16V7h-8.414l-2-2H4Zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-folder-open-line" xmlns="http://www.w3.org/2000/svg"><path d="M3 21a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2H20a1 1 0 0 1 1 1v3h-2V7h-7.414l-2-2H4v11.998L5.5 11h17l-2.31 9.242a1 1 0 0 1-.97.758H3Zm16.938-8H7.062l-1.5 6h12.876l1.5-6Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-global-line" xmlns="http://www.w3.org/2000/svg"><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.008 8.008 0 0 0 5.648 6.667ZM10.03 13c.151 2.439.848 4.73 1.97 6.752A15.905 15.905 0 0 0 13.97 13h-3.94Zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.008 8.008 0 0 0 19.938 13ZM4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333 8.008 8.008 0 0 0 4.062 11Zm5.969 0h3.938A15.905 15.905 0 0 0 12 4.248 15.905 15.905 0 0 0 10.03 11Zm4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.008 8.008 0 0 0-5.648-6.667Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-group-line" xmlns="http://www.w3.org/2000/svg"><path d="M2 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0H2Zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6Zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4Zm8.284 3.703A8.002 8.002 0 0 1 23 22h-2a6.001 6.001 0 0 0-3.537-5.473l.82-1.824Zm-.688-11.29A5.5 5.5 0 0 1 21 8.5a5.499 5.499 0 0 1-5 5.478v-2.013a3.5 3.5 0 0 0 1.041-6.609l.555-1.943Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-home-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.389a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1ZM6 19h12V9.157l-6-5.454-6 5.454V19Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-image-add-line" xmlns="http://www.w3.org/2000/svg"><path d="M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2Zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016ZM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-image-line" xmlns="http://www.w3.org/2000/svg"><path d="M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992ZM20 15V5H4v14L14 9l6 6Zm0 2.828-6-6L6.828 19H20v-1.172ZM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-information-line" xmlns="http://www.w3.org/2000/svg"><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM11 7h2v2h-2V7Zm0 4h2v6h-2v-6Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-link-m" xmlns="http://www.w3.org/2000/svg"><path d="m17.657 14.828-1.415-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414L9.17 6.343l1.415-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414Zm-2.829 2.829-1.414 1.414a6 6 0 0 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 0 0 12 17.657l1.414-1.414 1.414 1.414Zm0-9.9 1.415 1.415-7.072 7.07-1.414-1.414 7.071-7.07Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-link-unlink-m" xmlns="http://www.w3.org/2000/svg"><path d="m17.657 14.828-1.414-1.414L17.657 12A4 4 0 1 0 12 6.343l-1.414 1.414-1.414-1.414 1.414-1.414a6 6 0 0 1 8.485 8.485l-1.414 1.414Zm-2.828 2.829-1.415 1.414a6 6 0 0 1-8.485-8.485l1.414-1.414 1.414 1.414L6.343 12A4 4 0 0 0 12 17.657l1.414-1.414 1.415 1.414Zm0-9.9 1.414 1.415-7.071 7.07-1.415-1.414 7.072-7.07ZM5.775 2.293l1.932-.518L8.743 5.64l-1.932.518-1.036-3.864Zm9.483 16.068 1.932-.518 1.035 3.864-1.932.518-1.035-3.864ZM2.293 5.775l3.864 1.036-.518 1.931-3.864-1.035.518-1.932Zm16.068 9.483 3.864 1.035-.518 1.932-3.864-1.036.518-1.931Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-lock-line" xmlns="http://www.w3.org/2000/svg"><path d="M19 10h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1V9a7 7 0 0 1 14 0v1ZM5 12v8h14v-8H5Zm6 2h2v4h-2v-4Zm6-4V9A5 5 0 0 0 7 9v1h10Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-lock-unlock-line" xmlns="http://www.w3.org/2000/svg"><path d="M7 10h13a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1V9a7 7 0 0 1 13.262-3.131l-1.789.894A5 5 0 0 0 7 9v1Zm-2 2v8h14v-8H5Zm5 3h4v2h-4v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-logout-box-r-line" xmlns="http://www.w3.org/2000/svg"><path d="M5 22a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v3h-2V4H6v16h12v-2h2v3a1 1 0 0 1-1 1H5Zm13-6v-3h-7v-2h7V8l5 4-5 4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-mail-line" xmlns="http://www.w3.org/2000/svg"><path d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm17 4.238-7.928 7.1L4 7.216V19h16V7.238ZM4.511 5l7.55 6.662L19.502 5H4.511Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-menu-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M3 4h18v2H3V4Zm0 7h12v2H3v-2Zm0 7h18v2H3v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-menu-add-line" xmlns="http://www.w3.org/2000/svg"><path d="m18 15-.001 3H21v2h-3.001L18 23h-2l-.001-3H13v-2h2.999L16 15h2Zm-7 3v2H3v-2h8Zm10-7v2H3v-2h18Zm0-7v2H3V4h18Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-menu-fold-line" xmlns="http://www.w3.org/2000/svg"><path d="M21 18v2H3v-2h18ZM6.596 3.903 8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597ZM21 11v2h-9v-2h9Zm0-7v2h-9V4h9Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-menu-unfold-line" xmlns="http://www.w3.org/2000/svg"><path d="M21 18v2H3v-2h18ZM17.404 3.903 22 8.5l-4.596 4.596-1.414-1.415L19.172 8.5 15.99 5.318l1.414-1.415ZM12 11v2H3v-2h9Zm0-7v2H3V4h9Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-more-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M12 3c-.825 0-1.5.675-1.5 1.5S11.175 6 12 6s1.5-.675 1.5-1.5S12.825 3 12 3Zm0 15c-.825 0-1.5.675-1.5 1.5S11.175 21 12 21s1.5-.675 1.5-1.5S12.825 18 12 18Zm0-7.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5 1.5-.675 1.5-1.5-.675-1.5-1.5-1.5Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-more-line" xmlns="http://www.w3.org/2000/svg"><path d="M4.5 10.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S6 12.825 6 12s-.675-1.5-1.5-1.5Zm15 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S21 12.825 21 12s-.675-1.5-1.5-1.5Zm-7.5 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5 1.5-.675 1.5-1.5-.675-1.5-1.5-1.5Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-newspaper-line" xmlns="http://www.w3.org/2000/svg"><path d="M16 20V4H4v15a1 1 0 0 0 1 1h11Zm3 2H5a3 3 0 0 1-3-3V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v7h4v9a3 3 0 0 1-3 3Zm-1-10v7a1 1 0 1 0 2 0v-7h-2ZM6 6h6v6H6V6Zm2 2v2h2V8H8Zm-2 5h8v2H6v-2Zm0 3h8v2H6v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-pages-line" xmlns="http://www.w3.org/2000/svg"><path d="M5 8v12h14V8H5Zm0-2h14V4H5v2Zm15 16H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1ZM7 10h4v4H7v-4Zm0 6h10v2H7v-2Zm6-5h4v2h-4v-2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-palette-line" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c5.522 0 10 3.978 10 8.889a5.558 5.558 0 0 1-5.556 5.555h-1.966c-.922 0-1.667.745-1.667 1.667 0 .422.167.811.422 1.1.267.3.434.689.434 1.122C13.667 21.256 12.9 22 12 22 6.478 22 2 17.522 2 12S6.478 2 12 2Zm-1.189 16.111a3.664 3.664 0 0 1 3.667-3.667h1.966A3.558 3.558 0 0 0 20 10.89C20 7.139 16.468 4 12 4a8 8 0 0 0-.676 15.972 3.648 3.648 0 0 1-.513-1.86ZM7.5 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm9 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3ZM12 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-pencil-ruler-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M7.05 14.121 4.93 16.243l2.828 2.828L19.071 7.757 16.243 4.93 14.12 7.05l1.415 1.414L14.12 9.88l-1.414-1.415-1.414 1.415 1.414 1.414-1.414 1.414-1.414-1.414-1.414 1.414 1.414 1.414-1.414 1.415L7.05 14.12Zm9.9-11.313 4.242 4.242a1 1 0 0 1 0 1.414L8.465 21.192a1 1 0 0 1-1.415 0L2.808 16.95a1 1 0 0 1 0-1.414L15.536 2.808a1 1 0 0 1 1.414 0ZM14.12 18.363l1.415-1.414 2.242 2.243h1.414v-1.414l-2.242-2.243 1.414-1.414L21 16.756V21h-4.242l-2.637-2.637ZM5.636 9.878 2.808 7.05a1 1 0 0 1 0-1.415l2.828-2.828a1 1 0 0 1 1.414 0L9.88 5.635 8.464 7.05l-2.12-2.122-1.415 1.415 2.121 2.12-1.414 1.415Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-price-tag-3-line" xmlns="http://www.w3.org/2000/svg"><path d="m10.904 2.1 9.9 1.414 1.414 9.9-9.193 9.192a1 1 0 0 1-1.414 0l-9.9-9.9a1 1 0 0 1 0-1.413L10.905 2.1Zm.707 2.122L3.833 12l8.485 8.485 7.779-7.778-1.061-7.425-7.425-1.06Zm2.122 6.363a2 2 0 1 1 2.828-2.828 2 2 0 0 1-2.828 2.829Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-profile-line" xmlns="http://www.w3.org/2000/svg"><path d="M21.008 3c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016ZM20 5H4v14h16V5Zm-2 10v2H6v-2h12Zm-6-8v6H6V7h6Zm6 4v2h-4v-2h4Zm-8-2H8v2h2V9Zm8-2v2h-4V7h4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-prohibited-line" xmlns="http://www.w3.org/2000/svg"><path d="M7.094 5.68 18.32 16.906A8 8 0 0 0 7.094 5.68Zm9.812 12.64L5.68 7.094A8 8 0 0 0 16.906 18.32ZM4.929 4.929A9.972 9.972 0 0 1 12 2c5.523 0 10 4.477 10 10a9.972 9.972 0 0 1-2.929 7.071A9.972 9.972 0 0 1 12 22C6.477 22 2 17.523 2 12a9.972 9.972 0 0 1 2.929-7.071Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-question-line" xmlns="http://www.w3.org/2000/svg"><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm-1-5h2v2h-2v-2Zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1 1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.501 3.501 0 1 1 13 13.355Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-refresh-line" xmlns="http://www.w3.org/2000/svg"><path d="M5.463 4.433A9.961 9.961 0 0 1 12 2c5.523 0 10 4.477 10 10 0 2.136-.67 4.116-1.81 5.74L17 12h3A8 8 0 0 0 6.46 6.228l-.997-1.795Zm13.074 15.134A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12c0-2.136.67-4.116 1.81-5.74L7 12H4a8 8 0 0 0 13.54 5.772l.997 1.795Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-robot-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M13.5 2c0 .444-.193.843-.5 1.118V5h5a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h5V3.118A1.5 1.5 0 1 1 13.5 2ZM6 7a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H6Zm-4 3H0v6h2v-6Zm20 0h2v6h-2v-6ZM9 14.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm6 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-scissors-cut-line" xmlns="http://www.w3.org/2000/svg"><path d="M10 5.997c0 .732-.197 1.419-.54 2.01L12 10.581l6.728-6.727a2 2 0 0 1 2.828 0l-12.11 12.11a4 4 0 1 1-1.414-1.414l2.554-2.554-2.554-2.554A4 4 0 1 1 10 5.997Zm-2 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0Zm13.556 14.142a2 2 0 0 1-2.828 0l-5.317-5.317 1.415-1.414 6.73 6.73ZM16 10.997h2v2h-2v-2Zm4 0h2v2h-2v-2Zm-14 0h2v2H6v-2Zm-4 0h2v2H2v-2Zm4 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-search-line" xmlns="http://www.w3.org/2000/svg"><path d="m18.031 16.617 4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7 3.133 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-settings-3-line" xmlns="http://www.w3.org/2000/svg"><path d="M3.34 17a10.017 10.017 0 0 1-.979-2.326 3 3 0 0 0 .003-5.347 9.99 9.99 0 0 1 2.5-4.337 3 3 0 0 0 4.632-2.674 9.99 9.99 0 0 1 5.007.003 3 3 0 0 0 4.632 2.671c.578.59 1.093 1.262 1.525 2.01.432.749.757 1.53.978 2.326a3 3 0 0 0-.002 5.347 9.99 9.99 0 0 1-2.501 4.337 3 3 0 0 0-4.632 2.674 9.99 9.99 0 0 1-5.007-.002 3 3 0 0 0-4.631-2.672A10.018 10.018 0 0 1 3.339 17Zm5.66.196a4.992 4.992 0 0 1 2.25 2.77c.499.047 1 .048 1.499.002a4.993 4.993 0 0 1 2.25-2.772 4.993 4.993 0 0 1 3.526-.564c.29-.408.54-.843.748-1.298A4.993 4.993 0 0 1 18 12c0-1.26.47-2.437 1.273-3.334a8.152 8.152 0 0 0-.75-1.298A4.993 4.993 0 0 1 15 6.804a4.993 4.993 0 0 1-2.25-2.77c-.5-.047-1-.048-1.5-.001A4.993 4.993 0 0 1 9 6.804a4.993 4.993 0 0 1-3.526.564c-.29.408-.54.843-.747 1.298A4.993 4.993 0 0 1 6 12c0 1.26-.471 2.437-1.273 3.334a8.16 8.16 0 0 0 .75 1.298A4.993 4.993 0 0 1 9 17.196ZM12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6Zm0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-shake-hands-line" xmlns="http://www.w3.org/2000/svg"><path d="M11.861 2.39a3 3 0 0 1 3.275-.034L19.29 5H21a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-1.52a2.65 2.65 0 0 1-1.285 2.449l-5.093 3.056a2 2 0 0 1-2.07-.008c-.7.62-1.779.688-2.561.073l-5.14-4.039a2.001 2.001 0 0 1-.565-2.446A2 2 0 0 1 2 13.51V6a1 1 0 0 1 1-1h4.947l3.914-2.61ZM4.173 13.646l.692-.605a3 3 0 0 1 4.195.24l2.702 2.972a3 3 0 0 1 .396 3.487l5.008-3.005a.657.657 0 0 0 .279-.79l-4.427-6.198a1 1 0 0 0-1.101-.377l-2.486.745a3 3 0 0 1-2.983-.752l-.293-.292A1.997 1.997 0 0 1 5.68 7H4v6.51l.173.135Zm9.89-9.602a1 1 0 0 0-1.093.012l-5.4 3.6.292.293a1 1 0 0 0 .995.25l2.485-.745a3 3 0 0 1 3.303 1.13L18.515 14H20V7h-.709a2 2 0 0 1-1.074-.313l-4.155-2.644ZM6.181 14.545l-1.616 1.414 5.14 4.039.705-1.232a1 1 0 0 0-.129-1.169L7.58 14.625a1 1 0 0 0-1.398-.08Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-shopping-cart-line" xmlns="http://www.w3.org/2000/svg"><path d="M4.005 16V4h-2V2h3a1 1 0 0 1 1 1v12h12.438l2-8H8.005V5h13.72a1 1 0 0 1 .97 1.243l-2.5 10a1 1 0 0 1-.97.757H5.004a1 1 0 0 1-1-1Zm2 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4Zm12 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-skip-left-line" xmlns="http://www.w3.org/2000/svg"><path d="m13.914 12 4.793-4.793-1.414-1.414L11.086 12l6.207 6.207 1.414-1.414L13.914 12ZM7 18V6h2v12H7Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-skip-right-line" xmlns="http://www.w3.org/2000/svg"><path d="m10.086 12-4.793 4.793 1.414 1.414L12.914 12 6.707 5.793 5.293 7.207 10.086 12ZM17 6v12h-2V6h2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-sort-asc" xmlns="http://www.w3.org/2000/svg"><path d="m19 3 4 5h-3v12h-2V8h-3l4-5Zm-5 15v2H3v-2h11Zm0-7v2H3v-2h11Zm-2-7v2H3V4h9Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-sort-desc" xmlns="http://www.w3.org/2000/svg"><path d="M20 4v12h3l-4 5-4-5h3V4h2Zm-8 14v2H3v-2h9Zm2-7v2H3v-2h11Zm0-7v2H3V4h11Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-stack-line" xmlns="http://www.w3.org/2000/svg"><path d="m20.083 15.2 1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85Zm0-4.7 1.202.721a.5.5 0 0 1 0 .858L12 17.649l-9.285-5.57a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85Zm-7.569-9.191 8.771 5.262a.5.5 0 0 1 0 .858L12 12.999 2.715 7.43a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0ZM12 3.332 5.887 7 12 10.668 18.113 7 12 3.332Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-table-line" xmlns="http://www.w3.org/2000/svg"><path d="M4 8h16V5H4v3Zm10 11v-9h-4v9h4Zm2 0h4v-9h-4v9Zm-8 0v-9H4v9h4ZM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-ticket-line" xmlns="http://www.w3.org/2000/svg"><path d="M21.005 3a1 1 0 0 1 1 1v5.5a2.5 2.5 0 0 0 0 5V20a1 1 0 0 1-1 1h-18a1 1 0 0 1-1-1v-5.5a2.5 2.5 0 0 0 0-5V4a1 1 0 0 1 1-1h18Zm-1 2h-16v2.968l.156.08a4.5 4.5 0 0 1 2.339 3.74l.005.212a4.499 4.499 0 0 1-2.344 3.95l-.156.08V19h16v-2.97l-.156-.08a4.5 4.5 0 0 1-2.34-3.738L17.506 12c0-1.704.947-3.187 2.344-3.951l.156-.081V5Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-translate-2" xmlns="http://www.w3.org/2000/svg"><path d="m18.5 10 4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2ZM10 2v2h6v2h-1.968a18.221 18.221 0 0 1-3.62 6.301 14.865 14.865 0 0 0 2.335 1.707l-.75 1.878A17.016 17.016 0 0 1 9 13.725a16.677 16.677 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.031 16.031 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2Zm7.5 10.885L16.253 16h2.492L17.5 12.885Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-upload-2-line" xmlns="http://www.w3.org/2000/svg"><path d="M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7Zm9-10v7h-2V9H6l6-6 6 6h-5Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-upload-cloud-2-line" xmlns="http://www.w3.org/2000/svg"><path d="m12 12.586 4.243 4.242-1.415 1.415L13 16.415V22h-2v-5.587l-1.828 1.83-1.415-1.415L12 12.586ZM12 2a7.001 7.001 0 0 1 6.954 6.194A5.5 5.5 0 0 1 18 18.978v-2.014a3.5 3.5 0 1 0-1.111-6.91 5 5 0 1 0-9.777 0 3.5 3.5 0 0 0-1.292 6.88l.18.03v2.014a5.5 5.5 0 0 1-.954-10.784A7 7 0 0 1 12 2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-user-fill" xmlns="http://www.w3.org/2000/svg"><path d="M4 22a8 8 0 1 1 16 0H4Zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-user-line" xmlns="http://www.w3.org/2000/svg"><path d="M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0H4Zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6Zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-window-line" xmlns="http://www.w3.org/2000/svg"><path d="M21 3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18Zm-1 8H4v8h16v-8Zm0-6H4v4h16V5Zm-9 1v2H9V6h2ZM7 6v2H5V6h2Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-zoom-in-line" xmlns="http://www.w3.org/2000/svg"><path d="m18.031 16.617 4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7 3.133 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15ZM10 10V7h2v3h3v2h-3v3h-2v-3H7v-2h3Z"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="ri-zoom-out-line" xmlns="http://www.w3.org/2000/svg"><path d="m18.031 16.617 4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7 3.133 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15ZM7 10h8v2H7v-2Z"/></symbol></svg>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Alchemy
|
2
|
+
module Admin
|
3
|
+
class ElementSelect < ViewComponent::Base
|
4
|
+
delegate :alchemy, to: :helpers
|
5
|
+
|
6
|
+
attr_reader :elements, :field_name
|
7
|
+
|
8
|
+
def initialize(elements, field_name: "element[name]")
|
9
|
+
@field_name = field_name
|
10
|
+
@elements = elements
|
11
|
+
end
|
12
|
+
|
13
|
+
def call
|
14
|
+
text_field_tag(field_name, nil, {
|
15
|
+
"data-options": elements_options.to_json,
|
16
|
+
"data-placeholder": Alchemy.t(:select_element),
|
17
|
+
is: "alchemy-element-select",
|
18
|
+
autofocus: true,
|
19
|
+
required: true,
|
20
|
+
value: elements.many? ? nil : elements.first&.name
|
21
|
+
})
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def elements_options
|
27
|
+
return [] if elements.nil?
|
28
|
+
|
29
|
+
elements.sort_by(&:name).map do |element|
|
30
|
+
{
|
31
|
+
text: Element.display_name_for(element.name),
|
32
|
+
icon: element.icon_file,
|
33
|
+
id: element.name
|
34
|
+
}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module Admin
|
5
|
+
module Resource
|
6
|
+
class AppliedFilter < ViewComponent::Base
|
7
|
+
attr_reader :applied_filter_label, :applied_filter_value, :link
|
8
|
+
|
9
|
+
erb_template <<~ERB
|
10
|
+
<div class="applied-filter">
|
11
|
+
<span class="applied-filter-label">
|
12
|
+
<%= applied_filter_label -%><%= ": " if applied_filter_value.present? -%>
|
13
|
+
</span>
|
14
|
+
<%= applied_filter_value %>
|
15
|
+
<%= link_to link, class: 'dismiss-filter' do %>
|
16
|
+
<%= render Alchemy::Admin::Icon.new(:times, size: "1x") %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
ERB
|
20
|
+
|
21
|
+
def initialize(applied_filter_label:, link:, applied_filter_value: nil)
|
22
|
+
@applied_filter_label = applied_filter_label
|
23
|
+
@link = link
|
24
|
+
@applied_filter_value = applied_filter_value
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module Admin
|
5
|
+
module Resource
|
6
|
+
class CheckboxFilter < ViewComponent::Base
|
7
|
+
attr_reader :name, :label, :checked, :search_form
|
8
|
+
|
9
|
+
erb_template <<~ERB
|
10
|
+
<div class="filter-input">
|
11
|
+
<label>
|
12
|
+
<%= check_box_tag checkbox_name, form: "resource_search", checked: checked %>
|
13
|
+
<%= label %>
|
14
|
+
</label>
|
15
|
+
</div>
|
16
|
+
ERB
|
17
|
+
|
18
|
+
def initialize(name:, label:, params:)
|
19
|
+
@name = name
|
20
|
+
@label = label
|
21
|
+
@checked = get_checked_from(params)
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def get_checked_from(params)
|
27
|
+
params.dig(:q, name)
|
28
|
+
end
|
29
|
+
|
30
|
+
def checkbox_name
|
31
|
+
"q[#{name}]"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module Admin
|
5
|
+
module Resource
|
6
|
+
class DatepickerFilter < ViewComponent::Base
|
7
|
+
attr_reader :name, :label, :value, :input_type
|
8
|
+
|
9
|
+
erb_template <<~ERB
|
10
|
+
<div class="filter-input">
|
11
|
+
<%= label_tag datepicker_name, label %>
|
12
|
+
<alchemy-datepicker input_type="<%= input_type %>">
|
13
|
+
<%= text_field_tag(
|
14
|
+
datepicker_name,
|
15
|
+
value,
|
16
|
+
form: "resource_search"
|
17
|
+
) %>
|
18
|
+
</alchemy-datepicker>
|
19
|
+
</div>
|
20
|
+
ERB
|
21
|
+
|
22
|
+
def initialize(name:, label:, input_type: :datetime, params: {})
|
23
|
+
@name = name
|
24
|
+
@label = label
|
25
|
+
@input_type = input_type
|
26
|
+
@params = params
|
27
|
+
@value = get_value(params)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def get_value(params)
|
33
|
+
params.dig(:q, name)
|
34
|
+
end
|
35
|
+
|
36
|
+
def datepicker_name
|
37
|
+
"q[#{name}]"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module Admin
|
5
|
+
module Resource
|
6
|
+
class SelectFilter < ViewComponent::Base
|
7
|
+
attr_reader :name, :resource_name, :label, :include_blank, :options, :selected
|
8
|
+
|
9
|
+
erb_template <<~ERB
|
10
|
+
<div class="filter-input">
|
11
|
+
<%= label_tag select_name, label %>
|
12
|
+
<%= select_tag(
|
13
|
+
select_name,
|
14
|
+
options_for_select(options, selected),
|
15
|
+
include_blank: include_blank,
|
16
|
+
form: "resource_search",
|
17
|
+
is: 'alchemy-select'
|
18
|
+
) %>
|
19
|
+
</div>
|
20
|
+
ERB
|
21
|
+
|
22
|
+
def initialize(name:, resource_name:, label:, include_blank:, options:, params:)
|
23
|
+
@name = name
|
24
|
+
@options = options
|
25
|
+
@label = label
|
26
|
+
@include_blank = include_blank
|
27
|
+
@resource_name = resource_name
|
28
|
+
@selected = get_selected_value_from(params)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def get_selected_value_from(params)
|
34
|
+
params.dig(:q, name)
|
35
|
+
end
|
36
|
+
|
37
|
+
def select_name
|
38
|
+
"q[#{name}]"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -33,7 +33,7 @@ module Alchemy
|
|
33
33
|
#
|
34
34
|
class ToolbarButton < ViewComponent::Base
|
35
35
|
erb_template <<-ERB
|
36
|
-
<div class="toolbar_button">
|
36
|
+
<div class="toolbar_button" id="<%= id %>">
|
37
37
|
<sl-tooltip content="<%= label %>" placement="<%= tooltip_placement %>">
|
38
38
|
<%= link_to(render_icon(icon, style: icon_style), url, {
|
39
39
|
class: css_classes,
|
@@ -57,6 +57,7 @@ module Alchemy
|
|
57
57
|
:if_permitted_to,
|
58
58
|
:active,
|
59
59
|
:link_options,
|
60
|
+
:id,
|
60
61
|
:icon_style,
|
61
62
|
:tooltip_placement
|
62
63
|
|
@@ -72,6 +73,7 @@ module Alchemy
|
|
72
73
|
if_permitted_to: [],
|
73
74
|
active: false,
|
74
75
|
link_options: {},
|
76
|
+
id: nil,
|
75
77
|
icon_style: "line",
|
76
78
|
tooltip_placement: "top-start"
|
77
79
|
)
|
@@ -85,6 +87,7 @@ module Alchemy
|
|
85
87
|
@if_permitted_to = if_permitted_to
|
86
88
|
@active = active
|
87
89
|
@link_options = link_options
|
90
|
+
@id = id
|
88
91
|
@icon_style = icon_style
|
89
92
|
@tooltip_placement = tooltip_placement
|
90
93
|
end
|
@@ -100,7 +103,7 @@ module Alchemy
|
|
100
103
|
def permission_options = if_permitted_to.presence || permissions_from_url
|
101
104
|
|
102
105
|
def permissions_from_url
|
103
|
-
action_controller = url.
|
106
|
+
action_controller = url.delete_prefix("/").split("/")
|
104
107
|
[
|
105
108
|
action_controller.last.to_sym,
|
106
109
|
action_controller[0..action_controller.length - 2].join("_").to_sym
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Alchemy
|
2
|
+
module Ingredients
|
3
|
+
class NumberView < BaseView
|
4
|
+
def initialize(ingredient, options = {})
|
5
|
+
super(ingredient)
|
6
|
+
@options = {
|
7
|
+
units: {
|
8
|
+
unit: settings_value(:unit, value: options[:unit])
|
9
|
+
}.merge(options[:units] || {})
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
def call
|
14
|
+
number_to_human(value, @options)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -6,6 +6,13 @@ module Alchemy
|
|
6
6
|
include UploaderResponses
|
7
7
|
include ArchiveOverlay
|
8
8
|
|
9
|
+
add_alchemy_filter :by_file_type, type: :select,
|
10
|
+
options: -> { Alchemy::Attachment.file_types(_1.result) }
|
11
|
+
add_alchemy_filter :recent, type: :checkbox
|
12
|
+
add_alchemy_filter :last_upload, type: :checkbox
|
13
|
+
add_alchemy_filter :without_tag, type: :checkbox
|
14
|
+
add_alchemy_filter :deletable, type: :checkbox
|
15
|
+
|
9
16
|
helper "alchemy/admin/tags"
|
10
17
|
|
11
18
|
before_action(only: :assign) do
|
@@ -21,10 +28,6 @@ module Alchemy
|
|
21
28
|
@attachments = @attachments.tagged_with(search_filter_params[:tagged_with])
|
22
29
|
end
|
23
30
|
|
24
|
-
if search_filter_params[:filter].present?
|
25
|
-
@attachments = apply_filters(@attachments)
|
26
|
-
end
|
27
|
-
|
28
31
|
@attachments = @attachments
|
29
32
|
.page(params[:page] || 1)
|
30
33
|
.per(items_per_page)
|
@@ -36,6 +39,7 @@ module Alchemy
|
|
36
39
|
|
37
40
|
# The resources controller renders the edit form as default for show actions.
|
38
41
|
def show
|
42
|
+
@assignments = @attachment.related_ingredients.joins(element: :page)
|
39
43
|
render :show
|
40
44
|
end
|
41
45
|
|
@@ -58,18 +62,9 @@ module Alchemy
|
|
58
62
|
end
|
59
63
|
|
60
64
|
def destroy
|
61
|
-
name = @attachment.name
|
62
65
|
@attachment.destroy
|
63
|
-
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
def download
|
68
|
-
@attachment = Attachment.find(params[:id])
|
69
|
-
send_file @attachment.file.path, {
|
70
|
-
filename: @attachment.file_name,
|
71
|
-
type: @attachment.file_mime_type
|
72
|
-
}
|
66
|
+
flash[:notice] = Alchemy.t("File deleted successfully", name: @attachment.name)
|
67
|
+
redirect_to alchemy.admin_attachments_path(**search_filter_params)
|
73
68
|
end
|
74
69
|
|
75
70
|
private
|
@@ -8,6 +8,8 @@ module Alchemy
|
|
8
8
|
authorize_resource class: :alchemy_admin_clipboard
|
9
9
|
before_action :set_clipboard
|
10
10
|
|
11
|
+
helper_method :remarkable_type
|
12
|
+
|
11
13
|
def index
|
12
14
|
@clipboard_items = model_class.all_from_clipboard(@clipboard)
|
13
15
|
respond_to do |format|
|
@@ -23,17 +25,11 @@ module Alchemy
|
|
23
25
|
"action" => params[:remove] ? "cut" : "copy"
|
24
26
|
}
|
25
27
|
end
|
26
|
-
respond_to do |format|
|
27
|
-
format.js
|
28
|
-
end
|
29
28
|
end
|
30
29
|
|
31
30
|
def remove
|
32
31
|
@item = model_class.find(remarkable_params[:remarkable_id])
|
33
32
|
@clipboard.delete_if { |item| item["id"] == remarkable_params[:remarkable_id] }
|
34
|
-
respond_to do |format|
|
35
|
-
format.js
|
36
|
-
end
|
37
33
|
end
|
38
34
|
|
39
35
|
def clear
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module Alchemy
|
4
4
|
module Admin
|
5
5
|
class ElementsController < Alchemy::Admin::BaseController
|
6
|
+
helper Alchemy::Admin::IngredientsHelper
|
7
|
+
|
6
8
|
before_action :load_element, only: [:update, :destroy, :collapse, :expand, :publish]
|
7
9
|
authorize_resource class: Alchemy::Element
|
8
10
|
|
@@ -35,7 +37,7 @@ module Alchemy
|
|
35
37
|
else
|
36
38
|
Element.new(create_element_params)
|
37
39
|
end
|
38
|
-
if @page.definition
|
40
|
+
if @page.definition.insert_elements_at == "top"
|
39
41
|
@insert_at_top = true
|
40
42
|
@element.position = 1
|
41
43
|
end
|
@@ -37,6 +37,16 @@ module Alchemy
|
|
37
37
|
if: :run_on_page_layout_callbacks?,
|
38
38
|
only: [:show]
|
39
39
|
|
40
|
+
add_alchemy_filter :by_page_layout, type: :select, options: ->(_q) do
|
41
|
+
PageDefinition.all.map { |p| [Alchemy.t(p[:name], scope: "page_layout_names"), p[:name]] }
|
42
|
+
end
|
43
|
+
|
44
|
+
add_alchemy_filter :updated_at_gteq, type: :datepicker
|
45
|
+
add_alchemy_filter :updated_at_lteq, type: :datepicker
|
46
|
+
add_alchemy_filter :published, type: :checkbox
|
47
|
+
add_alchemy_filter :not_public, type: :checkbox
|
48
|
+
add_alchemy_filter :restricted, type: :checkbox
|
49
|
+
|
40
50
|
def index
|
41
51
|
@query = @current_language.pages.contentpages.ransack(search_filter_params[:q])
|
42
52
|
|
@@ -48,10 +58,6 @@ module Alchemy
|
|
48
58
|
items = items.tagged_with(search_filter_params[:tagged_with])
|
49
59
|
end
|
50
60
|
|
51
|
-
if search_filter_params[:filter].present?
|
52
|
-
items = apply_filters(items)
|
53
|
-
end
|
54
|
-
|
55
61
|
items = items.page(params[:page] || 1).per(items_per_page)
|
56
62
|
@pages = items
|
57
63
|
end
|
@@ -71,7 +77,7 @@ module Alchemy
|
|
71
77
|
Current.preview_page = @page
|
72
78
|
# Setting the locale to pages language, so the page content has it's correct translations.
|
73
79
|
::I18n.locale = @page.language.locale
|
74
|
-
render(layout: Alchemy
|
80
|
+
render(layout: Alchemy.config.admin_page_preview_layout || "application")
|
75
81
|
end
|
76
82
|
|
77
83
|
def info
|
@@ -157,16 +163,10 @@ module Alchemy
|
|
157
163
|
flash[:warning] = @page.errors.full_messages.to_sentence
|
158
164
|
end
|
159
165
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
else
|
165
|
-
alchemy.admin_pages_path
|
166
|
-
end
|
167
|
-
|
168
|
-
render :redirect
|
169
|
-
end
|
166
|
+
if @page.layoutpage?
|
167
|
+
redirect_to alchemy.admin_layoutpages_path
|
168
|
+
else
|
169
|
+
redirect_to alchemy.admin_pages_path
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -11,7 +11,7 @@ module Alchemy
|
|
11
11
|
helper "alchemy/admin/tags"
|
12
12
|
|
13
13
|
before_action :load_resource,
|
14
|
-
only: [:
|
14
|
+
only: [:edit, :update, :url, :destroy]
|
15
15
|
|
16
16
|
before_action :set_size, only: [:index, :show, :edit_multiple, :update]
|
17
17
|
|
@@ -21,9 +21,16 @@ module Alchemy
|
|
21
21
|
@picture = Picture.find(params[:id])
|
22
22
|
end
|
23
23
|
|
24
|
+
add_alchemy_filter :by_file_format, type: :select, options: ->(query) do
|
25
|
+
Alchemy::Picture.file_formats(query.result)
|
26
|
+
end
|
27
|
+
add_alchemy_filter :recent, type: :checkbox
|
28
|
+
add_alchemy_filter :last_upload, type: :checkbox
|
29
|
+
add_alchemy_filter :without_tag, type: :checkbox
|
30
|
+
add_alchemy_filter :deletable, type: :checkbox
|
31
|
+
|
24
32
|
def index
|
25
|
-
@
|
26
|
-
@pictures = filtered_pictures.includes(:thumbs)
|
33
|
+
@pictures = filtered_pictures
|
27
34
|
|
28
35
|
if in_overlay?
|
29
36
|
archive_overlay
|
@@ -31,10 +38,12 @@ module Alchemy
|
|
31
38
|
end
|
32
39
|
|
33
40
|
def show
|
34
|
-
@
|
35
|
-
@
|
36
|
-
@
|
37
|
-
@
|
41
|
+
@pictures = filtered_pictures(per_page: 1)
|
42
|
+
@picture = @pictures.first
|
43
|
+
@previous = @pictures.prev_page
|
44
|
+
@next = @pictures.next_page
|
45
|
+
|
46
|
+
@assignments = @picture.related_ingredients.joins(element: :page)
|
38
47
|
@picture_description = @picture.descriptions.find_or_initialize_by(
|
39
48
|
language_id: Alchemy::Current.language.id
|
40
49
|
)
|
@@ -93,32 +102,12 @@ module Alchemy
|
|
93
102
|
end
|
94
103
|
|
95
104
|
def delete_multiple
|
96
|
-
if
|
97
|
-
|
98
|
-
|
99
|
-
not_deletable = []
|
100
|
-
pictures.each do |picture|
|
101
|
-
if picture.deletable?
|
102
|
-
names << picture.name
|
103
|
-
picture.destroy
|
104
|
-
else
|
105
|
-
not_deletable << picture.name
|
106
|
-
end
|
107
|
-
end
|
108
|
-
if not_deletable.any?
|
109
|
-
flash[:warn] = Alchemy.t(
|
110
|
-
"These pictures could not be deleted, because they were in use",
|
111
|
-
names: not_deletable.to_sentence
|
112
|
-
)
|
113
|
-
else
|
114
|
-
flash[:notice] = Alchemy.t("Pictures deleted successfully", names: names.to_sentence)
|
115
|
-
end
|
105
|
+
if params[:picture_ids].present?
|
106
|
+
params[:picture_ids].each { DeletePictureJob.perform_later(_1) }
|
107
|
+
flash[:notice] = Alchemy.t(:pictures_will_be_deleted_now)
|
116
108
|
else
|
117
109
|
flash[:warn] = Alchemy.t("Could not delete Pictures")
|
118
110
|
end
|
119
|
-
rescue => e
|
120
|
-
flash[:error] = e.message
|
121
|
-
ensure
|
122
111
|
redirect_to_index
|
123
112
|
end
|
124
113
|
|
@@ -132,20 +121,21 @@ module Alchemy
|
|
132
121
|
redirect_to_index
|
133
122
|
end
|
134
123
|
|
135
|
-
def filtered_pictures
|
124
|
+
def filtered_pictures(per_page: items_per_page)
|
125
|
+
@query = Picture.ransack(search_filter_params[:q])
|
126
|
+
@query.sorts = default_sort_order if @query.sorts.empty?
|
136
127
|
pictures = @query.result
|
137
128
|
|
138
129
|
if params[:tagged_with].present?
|
139
130
|
pictures = pictures.tagged_with(params[:tagged_with])
|
140
131
|
end
|
141
132
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
pictures = pictures.page(params[:page] || 1).per(items_per_page)
|
133
|
+
pictures = pictures.page(params[:page] || 1).per(per_page)
|
134
|
+
Alchemy.storage_adapter.preloaded_pictures(pictures)
|
135
|
+
end
|
147
136
|
|
148
|
-
|
137
|
+
def default_sort_order
|
138
|
+
"created_at desc"
|
149
139
|
end
|
150
140
|
|
151
141
|
def items_per_page
|