alchemy_cms 7.3.5 → 7.4.1

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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +60 -0
  3. data/Gemfile +3 -3
  4. data/README.md +2 -2
  5. data/alchemy_cms.gemspec +1 -4
  6. data/app/assets/builds/alchemy/admin.css +9 -1
  7. data/app/assets/builds/alchemy/admin.css.map +1 -1
  8. data/app/assets/builds/alchemy/custom-properties.css +1 -1
  9. data/app/assets/builds/alchemy/custom-properties.css.map +1 -1
  10. data/app/assets/builds/alchemy/preview.min.js +1 -0
  11. data/app/assets/builds/alchemy/welcome.css +1 -1
  12. data/app/assets/builds/alchemy/welcome.css.map +1 -1
  13. data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
  14. data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css.map +1 -1
  15. data/app/assets/config/alchemy_manifest.js +0 -4
  16. data/app/assets/javascripts/alchemy/admin.js +8 -6
  17. data/app/assets/stylesheets/alchemy/admin/elements.scss +43 -7
  18. data/app/assets/stylesheets/alchemy/admin/forms.scss +4 -0
  19. data/app/assets/stylesheets/alchemy/admin/navigation.scss +9 -1
  20. data/app/assets/stylesheets/alchemy/admin/preview_window.scss +22 -17
  21. data/app/assets/stylesheets/alchemy/admin.scss +1 -1
  22. data/app/assets/stylesheets/alchemy/custom-properties.css +2 -1
  23. data/app/components/alchemy/ingredients/link_view.rb +7 -1
  24. data/app/components/alchemy/ingredients/picture_view.rb +5 -2
  25. data/app/components/alchemy/ingredients/text_view.rb +4 -1
  26. data/app/components/concerns/alchemy/ingredients/link_target.rb +18 -0
  27. data/app/controllers/alchemy/admin/base_controller.rb +8 -3
  28. data/app/controllers/alchemy/admin/elements_controller.rb +2 -2
  29. data/app/controllers/alchemy/admin/layoutpages_controller.rb +1 -0
  30. data/app/controllers/alchemy/admin/pages_controller.rb +5 -1
  31. data/app/controllers/alchemy/elements_controller.rb +3 -0
  32. data/app/helpers/alchemy/admin/form_helper.rb +1 -1
  33. data/app/helpers/alchemy/admin/navigation_helper.rb +22 -1
  34. data/app/javascript/alchemy_admin/components/action.js +2 -1
  35. data/app/javascript/alchemy_admin/components/dialog_link.js +3 -18
  36. data/app/javascript/alchemy_admin/components/element_editor.js +9 -0
  37. data/app/javascript/alchemy_admin/components/elements_window.js +34 -0
  38. data/app/javascript/alchemy_admin/components/elements_window_handle.js +65 -0
  39. data/app/javascript/alchemy_admin/components/icon.js +2 -2
  40. data/app/javascript/alchemy_admin/components/index.js +1 -0
  41. data/app/javascript/alchemy_admin/components/preview_window.js +5 -5
  42. data/app/javascript/alchemy_admin/components/uploader/file_upload.js +1 -1
  43. data/app/javascript/alchemy_admin/confirm_dialog.js +9 -11
  44. data/app/javascript/alchemy_admin/dialog.js +329 -0
  45. data/app/javascript/alchemy_admin/hotkeys.js +3 -2
  46. data/app/javascript/alchemy_admin/image_cropper.js +56 -48
  47. data/app/javascript/alchemy_admin/image_overlay.js +73 -0
  48. data/app/javascript/alchemy_admin/initializer.js +51 -2
  49. data/app/javascript/alchemy_admin/link_dialog.js +2 -1
  50. data/app/javascript/alchemy_admin/node_tree.js +3 -1
  51. data/app/javascript/alchemy_admin/page_sorter.js +1 -1
  52. data/app/javascript/alchemy_admin/picture_selector.js +2 -1
  53. data/app/javascript/alchemy_admin/shoelace_theme.js +2 -2
  54. data/app/javascript/alchemy_admin/templates/compiled.js +1 -0
  55. data/app/javascript/alchemy_admin.js +10 -6
  56. data/app/javascript/preview.js +117 -0
  57. data/app/models/alchemy/image_cropper_settings.rb +3 -4
  58. data/app/views/alchemy/_preview_mode_code.html.erb +1 -1
  59. data/app/views/alchemy/admin/crop.html.erb +18 -16
  60. data/app/views/alchemy/admin/dashboard/info.html.erb +1 -1
  61. data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +9 -8
  62. data/app/views/alchemy/admin/elements/_clipboard_button.html.erb +14 -0
  63. data/app/views/alchemy/admin/elements/_element.html.erb +2 -0
  64. data/app/views/alchemy/admin/elements/_form.html.erb +15 -13
  65. data/app/views/alchemy/admin/elements/create.turbo_stream.erb +34 -0
  66. data/app/views/alchemy/admin/elements/index.html.erb +3 -15
  67. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +1 -1
  68. data/app/views/alchemy/admin/layoutpages/edit.html.erb +7 -5
  69. data/app/views/alchemy/admin/nodes/_form.html.erb +1 -1
  70. data/app/views/alchemy/admin/pages/_current_page.html.erb +1 -1
  71. data/app/views/alchemy/admin/pages/_form.html.erb +43 -40
  72. data/app/views/alchemy/admin/pages/_locked_page.html.erb +1 -1
  73. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +1 -1
  74. data/app/views/alchemy/admin/pages/_sitemap.html.erb +1 -1
  75. data/app/views/alchemy/admin/pages/_table.html.erb +2 -2
  76. data/app/views/alchemy/admin/pages/edit.html.erb +1 -1
  77. data/app/views/alchemy/admin/pages/update.turbo_stream.erb +39 -0
  78. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +3 -4
  79. data/app/views/alchemy/admin/pictures/_picture_description_field.html.erb +7 -5
  80. data/app/views/alchemy/admin/pictures/index.html.erb +13 -9
  81. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +1 -1
  82. data/app/views/layouts/alchemy/admin.html.erb +8 -4
  83. data/bun.lockb +0 -0
  84. data/bundles/tinymce.js +2 -0
  85. data/config/alchemy/config.yml +3 -3
  86. data/config/alchemy/modules.yml +7 -6
  87. data/config/importmap.rb +4 -0
  88. data/config/routes.rb +1 -1
  89. data/lib/alchemy/engine.rb +6 -0
  90. data/lib/alchemy/modules.rb +0 -27
  91. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +10 -10
  92. data/lib/alchemy/tinymce.rb +2 -1
  93. data/lib/alchemy/upgrader/seven_point_four.rb +26 -0
  94. data/lib/alchemy/version.rb +1 -1
  95. data/lib/alchemy.rb +14 -0
  96. data/lib/alchemy_cms.rb +0 -2
  97. data/lib/generators/alchemy/ingredient/ingredient_generator.rb +5 -0
  98. data/lib/generators/alchemy/ingredient/templates/view.html.erb +1 -1
  99. data/lib/generators/alchemy/ingredient/templates/view_component.rb.tt +10 -0
  100. data/lib/generators/alchemy/install/install_generator.rb +0 -1
  101. data/lib/generators/alchemy/install/templates/elements.yml.tt +1 -1
  102. data/lib/tasks/alchemy/upgrade.rake +19 -20
  103. data/rollup.config.mjs +44 -1
  104. data/vendor/javascript/cropperjs.min.js +10 -0
  105. data/vendor/javascript/handlebars.min.js +29 -0
  106. data/vendor/javascript/jquery.min.js +2 -0
  107. data/vendor/javascript/select2.min.js +23 -0
  108. data/vendor/javascript/tinymce.min.js +1 -1
  109. metadata +40 -92
  110. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +0 -271
  111. data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +0 -54
  112. data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +0 -97
  113. data/app/assets/javascripts/alchemy/preview.js +0 -1
  114. data/app/assets/javascripts/alchemy/templates/index.js +0 -2
  115. data/app/javascript/alchemy_admin/gui.js +0 -12
  116. data/app/views/alchemy/admin/elements/create.js.erb +0 -35
  117. data/app/views/alchemy/admin/pages/update.js.erb +0 -43
  118. data/lib/alchemy/upgrader/seven_point_zero.rb +0 -36
  119. data/vendor/assets/images/Jcrop.gif +0 -0
  120. data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +0 -7
  121. data/vendor/assets/javascripts/jquery_plugins/select2.js +0 -3729
  122. data/vendor/assets/stylesheets/jquery.Jcrop.min.css +0 -2
  123. data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +0 -1
  124. /data/app/{assets/javascripts/alchemy → javascript/alchemy_admin}/templates/node_folder.hbs +0 -0
  125. /data/app/{assets/javascripts/alchemy → javascript/alchemy_admin}/templates/page_folder.hbs +0 -0
  126. /data/app/{assets/javascripts/tinymce/icons/remixicons/icons.js → javascript/tinymce/icons/remixicons/index.js} +0 -0
  127. /data/app/{assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js → javascript/tinymce/plugins/alchemy_link/index.js} +0 -0
  128. /data/vendor/assets/{fonts → images}/remixicon.symbol.svg +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.5
4
+ version: 7.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -12,7 +12,7 @@ authors:
12
12
  - Martin Meyerhoff
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2025-01-24 00:00:00.000000000 Z
15
+ date: 2025-03-05 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: actionmailer
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: '7.0'
24
24
  - - "<"
25
25
  - !ruby/object:Gem::Version
26
- version: '7.3'
26
+ version: '8.1'
27
27
  type: :runtime
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '7.0'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '7.3'
36
+ version: '8.1'
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: actionpack
39
39
  requirement: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '7.0'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '7.3'
46
+ version: '8.1'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  version: '7.0'
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
- version: '7.3'
56
+ version: '8.1'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: actionview
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -63,7 +63,7 @@ dependencies:
63
63
  version: '7.0'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
- version: '7.3'
66
+ version: '8.1'
67
67
  type: :runtime
68
68
  prerelease: false
69
69
  version_requirements: !ruby/object:Gem::Requirement
@@ -73,7 +73,7 @@ dependencies:
73
73
  version: '7.0'
74
74
  - - "<"
75
75
  - !ruby/object:Gem::Version
76
- version: '7.3'
76
+ version: '8.1'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: activejob
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +83,7 @@ dependencies:
83
83
  version: '7.0'
84
84
  - - "<"
85
85
  - !ruby/object:Gem::Version
86
- version: '7.3'
86
+ version: '8.1'
87
87
  type: :runtime
88
88
  prerelease: false
89
89
  version_requirements: !ruby/object:Gem::Requirement
@@ -93,7 +93,7 @@ dependencies:
93
93
  version: '7.0'
94
94
  - - "<"
95
95
  - !ruby/object:Gem::Version
96
- version: '7.3'
96
+ version: '8.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: activemodel
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -103,7 +103,7 @@ dependencies:
103
103
  version: '7.0'
104
104
  - - "<"
105
105
  - !ruby/object:Gem::Version
106
- version: '7.3'
106
+ version: '8.1'
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
@@ -113,7 +113,7 @@ dependencies:
113
113
  version: '7.0'
114
114
  - - "<"
115
115
  - !ruby/object:Gem::Version
116
- version: '7.3'
116
+ version: '8.1'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: activerecord
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ dependencies:
123
123
  version: '7.0'
124
124
  - - "<"
125
125
  - !ruby/object:Gem::Version
126
- version: '7.3'
126
+ version: '8.1'
127
127
  type: :runtime
128
128
  prerelease: false
129
129
  version_requirements: !ruby/object:Gem::Requirement
@@ -133,7 +133,7 @@ dependencies:
133
133
  version: '7.0'
134
134
  - - "<"
135
135
  - !ruby/object:Gem::Version
136
- version: '7.3'
136
+ version: '8.1'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: activesupport
139
139
  requirement: !ruby/object:Gem::Requirement
@@ -143,7 +143,7 @@ dependencies:
143
143
  version: '7.0'
144
144
  - - "<"
145
145
  - !ruby/object:Gem::Version
146
- version: '7.3'
146
+ version: '8.1'
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
@@ -153,7 +153,7 @@ dependencies:
153
153
  version: '7.0'
154
154
  - - "<"
155
155
  - !ruby/object:Gem::Version
156
- version: '7.3'
156
+ version: '8.1'
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: railties
159
159
  requirement: !ruby/object:Gem::Requirement
@@ -163,7 +163,7 @@ dependencies:
163
163
  version: '7.0'
164
164
  - - "<"
165
165
  - !ruby/object:Gem::Version
166
- version: '7.3'
166
+ version: '8.1'
167
167
  type: :runtime
168
168
  prerelease: false
169
169
  version_requirements: !ruby/object:Gem::Requirement
@@ -173,7 +173,7 @@ dependencies:
173
173
  version: '7.0'
174
174
  - - "<"
175
175
  - !ruby/object:Gem::Version
176
- version: '7.3'
176
+ version: '8.1'
177
177
  - !ruby/object:Gem::Dependency
178
178
  name: active_model_serializers
179
179
  requirement: !ruby/object:Gem::Requirement
@@ -248,26 +248,6 @@ dependencies:
248
248
  - - "<"
249
249
  - !ruby/object:Gem::Version
250
250
  version: '4.0'
251
- - !ruby/object:Gem::Dependency
252
- name: coffee-rails
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - ">="
256
- - !ruby/object:Gem::Version
257
- version: '4.0'
258
- - - "<"
259
- - !ruby/object:Gem::Version
260
- version: '6.0'
261
- type: :runtime
262
- prerelease: false
263
- version_requirements: !ruby/object:Gem::Requirement
264
- requirements:
265
- - - ">="
266
- - !ruby/object:Gem::Version
267
- version: '4.0'
268
- - - "<"
269
- - !ruby/object:Gem::Version
270
- version: '6.0'
271
251
  - !ruby/object:Gem::Dependency
272
252
  name: csv
273
253
  requirement: !ruby/object:Gem::Requirement
@@ -330,20 +310,6 @@ dependencies:
330
310
  - - ">="
331
311
  - !ruby/object:Gem::Version
332
312
  version: 2.2.1
333
- - !ruby/object:Gem::Dependency
334
- name: handlebars_assets
335
- requirement: !ruby/object:Gem::Requirement
336
- requirements:
337
- - - "~>"
338
- - !ruby/object:Gem::Version
339
- version: '0.23'
340
- type: :runtime
341
- prerelease: false
342
- version_requirements: !ruby/object:Gem::Requirement
343
- requirements:
344
- - - "~>"
345
- - !ruby/object:Gem::Version
346
- version: '0.23'
347
313
  - !ruby/object:Gem::Dependency
348
314
  name: importmap-rails
349
315
  requirement: !ruby/object:Gem::Requirement
@@ -364,26 +330,6 @@ dependencies:
364
330
  - - ">="
365
331
  - !ruby/object:Gem::Version
366
332
  version: 1.2.1
367
- - !ruby/object:Gem::Dependency
368
- name: jquery-rails
369
- requirement: !ruby/object:Gem::Requirement
370
- requirements:
371
- - - "~>"
372
- - !ruby/object:Gem::Version
373
- version: '4.0'
374
- - - ">="
375
- - !ruby/object:Gem::Version
376
- version: 4.0.4
377
- type: :runtime
378
- prerelease: false
379
- version_requirements: !ruby/object:Gem::Requirement
380
- requirements:
381
- - - "~>"
382
- - !ruby/object:Gem::Version
383
- version: '4.0'
384
- - - ">="
385
- - !ruby/object:Gem::Version
386
- version: 4.0.4
387
333
  - !ruby/object:Gem::Dependency
388
334
  name: kaminari
389
335
  requirement: !ruby/object:Gem::Requirement
@@ -712,6 +658,7 @@ files:
712
658
  - app/assets/builds/alchemy/admin/print.css.map
713
659
  - app/assets/builds/alchemy/custom-properties.css
714
660
  - app/assets/builds/alchemy/custom-properties.css.map
661
+ - app/assets/builds/alchemy/preview.min.js
715
662
  - app/assets/builds/alchemy/welcome.css
716
663
  - app/assets/builds/alchemy/welcome.css.map
717
664
  - app/assets/builds/tinymce/skins/content/alchemy/content.min.css
@@ -726,15 +673,6 @@ files:
726
673
  - app/assets/images/alchemy/icon.svg
727
674
  - app/assets/images/alchemy/missing-image.svg
728
675
  - app/assets/javascripts/alchemy/admin.js
729
- - app/assets/javascripts/alchemy/alchemy.dialog.js.coffee
730
- - app/assets/javascripts/alchemy/alchemy.image_overlay.coffee
731
- - app/assets/javascripts/alchemy/alchemy.preview.js.coffee
732
- - app/assets/javascripts/alchemy/preview.js
733
- - app/assets/javascripts/alchemy/templates/index.js
734
- - app/assets/javascripts/alchemy/templates/node_folder.hbs
735
- - app/assets/javascripts/alchemy/templates/page_folder.hbs
736
- - app/assets/javascripts/tinymce/icons/remixicons/icons.js
737
- - app/assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js
738
676
  - app/assets/stylesheets/alchemy/_defaults.scss
739
677
  - app/assets/stylesheets/alchemy/_deprecated_variables.scss
740
678
  - app/assets/stylesheets/alchemy/_deprecation.scss
@@ -831,6 +769,7 @@ files:
831
769
  - app/components/alchemy/ingredients/select_view.rb
832
770
  - app/components/alchemy/ingredients/text_view.rb
833
771
  - app/components/alchemy/ingredients/video_view.rb
772
+ - app/components/concerns/alchemy/ingredients/link_target.rb
834
773
  - app/controllers/alchemy/admin/attachments_controller.rb
835
774
  - app/controllers/alchemy/admin/base_controller.rb
836
775
  - app/controllers/alchemy/admin/clipboard_controller.rb
@@ -895,6 +834,7 @@ files:
895
834
  - app/javascript/alchemy_admin/components/element_editor/delete_element_button.js
896
835
  - app/javascript/alchemy_admin/components/element_editor/publish_element_button.js
897
836
  - app/javascript/alchemy_admin/components/elements_window.js
837
+ - app/javascript/alchemy_admin/components/elements_window_handle.js
898
838
  - app/javascript/alchemy_admin/components/growl.js
899
839
  - app/javascript/alchemy_admin/components/icon.js
900
840
  - app/javascript/alchemy_admin/components/index.js
@@ -917,15 +857,16 @@ files:
917
857
  - app/javascript/alchemy_admin/components/uploader/file_upload.js
918
858
  - app/javascript/alchemy_admin/components/uploader/progress.js
919
859
  - app/javascript/alchemy_admin/confirm_dialog.js
860
+ - app/javascript/alchemy_admin/dialog.js
920
861
  - app/javascript/alchemy_admin/dirty.js
921
862
  - app/javascript/alchemy_admin/file_editors.js
922
863
  - app/javascript/alchemy_admin/fixed_elements.js
923
864
  - app/javascript/alchemy_admin/growler.js
924
- - app/javascript/alchemy_admin/gui.js
925
865
  - app/javascript/alchemy_admin/hotkeys.js
926
866
  - app/javascript/alchemy_admin/i18n.js
927
867
  - app/javascript/alchemy_admin/image_cropper.js
928
868
  - app/javascript/alchemy_admin/image_loader.js
869
+ - app/javascript/alchemy_admin/image_overlay.js
929
870
  - app/javascript/alchemy_admin/ingredient_anchor_link.js
930
871
  - app/javascript/alchemy_admin/initializer.js
931
872
  - app/javascript/alchemy_admin/link_dialog.js
@@ -940,6 +881,9 @@ files:
940
881
  - app/javascript/alchemy_admin/sitemap.js
941
882
  - app/javascript/alchemy_admin/sortable_elements.js
942
883
  - app/javascript/alchemy_admin/spinner.js
884
+ - app/javascript/alchemy_admin/templates/compiled.js
885
+ - app/javascript/alchemy_admin/templates/node_folder.hbs
886
+ - app/javascript/alchemy_admin/templates/page_folder.hbs
943
887
  - app/javascript/alchemy_admin/utils/ajax.js
944
888
  - app/javascript/alchemy_admin/utils/debounce.js
945
889
  - app/javascript/alchemy_admin/utils/dom_helpers.js
@@ -947,6 +891,9 @@ files:
947
891
  - app/javascript/alchemy_admin/utils/format.js
948
892
  - app/javascript/alchemy_admin/utils/max.js
949
893
  - app/javascript/alchemy_admin/utils/string_conversions.js
894
+ - app/javascript/preview.js
895
+ - app/javascript/tinymce/icons/remixicons/index.js
896
+ - app/javascript/tinymce/plugins/alchemy_link/index.js
950
897
  - app/jobs/alchemy/base_job.rb
951
898
  - app/jobs/alchemy/publish_page_job.rb
952
899
  - app/mailers/alchemy/base_mailer.rb
@@ -1062,12 +1009,13 @@ files:
1062
1009
  - app/views/alchemy/admin/dashboard/widgets/_sites.html.erb
1063
1010
  - app/views/alchemy/admin/dashboard/widgets/_users.html.erb
1064
1011
  - app/views/alchemy/admin/elements/_add_nested_element_form.html.erb
1012
+ - app/views/alchemy/admin/elements/_clipboard_button.html.erb
1065
1013
  - app/views/alchemy/admin/elements/_element.html.erb
1066
1014
  - app/views/alchemy/admin/elements/_footer.html.erb
1067
1015
  - app/views/alchemy/admin/elements/_form.html.erb
1068
1016
  - app/views/alchemy/admin/elements/_header.html.erb
1069
1017
  - app/views/alchemy/admin/elements/_toolbar.html.erb
1070
- - app/views/alchemy/admin/elements/create.js.erb
1018
+ - app/views/alchemy/admin/elements/create.turbo_stream.erb
1071
1019
  - app/views/alchemy/admin/elements/index.html.erb
1072
1020
  - app/views/alchemy/admin/elements/new.html.erb
1073
1021
  - app/views/alchemy/admin/ingredients/_audio_fields.html.erb
@@ -1131,7 +1079,7 @@ files:
1131
1079
  - app/views/alchemy/admin/pages/new.html.erb
1132
1080
  - app/views/alchemy/admin/pages/show.html.erb
1133
1081
  - app/views/alchemy/admin/pages/unlock.js.erb
1134
- - app/views/alchemy/admin/pages/update.js.erb
1082
+ - app/views/alchemy/admin/pages/update.turbo_stream.erb
1135
1083
  - app/views/alchemy/admin/partials/_autocomplete_tag_list.html.erb
1136
1084
  - app/views/alchemy/admin/partials/_flash_notices.html.erb
1137
1085
  - app/views/alchemy/admin/partials/_language_tree_select.html.erb
@@ -1347,8 +1295,8 @@ files:
1347
1295
  - lib/alchemy/test_support/shared_uploader_examples.rb
1348
1296
  - lib/alchemy/tinymce.rb
1349
1297
  - lib/alchemy/upgrader.rb
1298
+ - lib/alchemy/upgrader/seven_point_four.rb
1350
1299
  - lib/alchemy/upgrader/seven_point_three.rb
1351
- - lib/alchemy/upgrader/seven_point_zero.rb
1352
1300
  - lib/alchemy/upgrader/tasks/.keep
1353
1301
  - lib/alchemy/version.rb
1354
1302
  - lib/alchemy_cms.rb
@@ -1361,6 +1309,7 @@ files:
1361
1309
  - lib/generators/alchemy/ingredient/templates/editor.html.erb
1362
1310
  - lib/generators/alchemy/ingredient/templates/model.rb.tt
1363
1311
  - lib/generators/alchemy/ingredient/templates/view.html.erb
1312
+ - lib/generators/alchemy/ingredient/templates/view_component.rb.tt
1364
1313
  - lib/generators/alchemy/install/files/_article.html.erb
1365
1314
  - lib/generators/alchemy/install/files/_standard.html.erb
1366
1315
  - lib/generators/alchemy/install/files/alchemy.en.yml
@@ -1403,17 +1352,16 @@ files:
1403
1352
  - lib/tasks/alchemy/upgrade.rake
1404
1353
  - lib/tasks/alchemy/usage.rake
1405
1354
  - rollup.config.mjs
1406
- - vendor/assets/fonts/remixicon.symbol.svg
1407
- - vendor/assets/images/Jcrop.gif
1408
- - vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js
1409
- - vendor/assets/javascripts/jquery_plugins/select2.js
1355
+ - vendor/assets/images/remixicon.symbol.svg
1410
1356
  - vendor/assets/stylesheets/alchemy_admin/select2.css
1411
- - vendor/assets/stylesheets/jquery.Jcrop.min.css
1412
- - vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css
1413
1357
  - vendor/javascript/clipboard.min.js
1358
+ - vendor/javascript/cropperjs.min.js
1414
1359
  - vendor/javascript/flatpickr.min.js
1360
+ - vendor/javascript/handlebars.min.js
1361
+ - vendor/javascript/jquery.min.js
1415
1362
  - vendor/javascript/keymaster.min.js
1416
1363
  - vendor/javascript/rails-ujs.min.js
1364
+ - vendor/javascript/select2.min.js
1417
1365
  - vendor/javascript/shoelace.min.js
1418
1366
  - vendor/javascript/sortable.min.js
1419
1367
  - vendor/javascript/tinymce.min.js
@@ -1458,7 +1406,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1458
1406
  version: '0'
1459
1407
  requirements:
1460
1408
  - ImageMagick (libmagick), v6.6 or greater.
1461
- rubygems_version: 3.6.3
1409
+ rubygems_version: 3.6.5
1462
1410
  specification_version: 4
1463
1411
  summary: A powerful, userfriendly and flexible CMS for Rails
1464
1412
  test_files: []
@@ -1,271 +0,0 @@
1
- # Dialog windows
2
- #
3
- class window.Alchemy.Dialog
4
-
5
- DEFAULTS:
6
- header_height: 36
7
- size: '400x300'
8
- padding: true
9
- title: ''
10
- modal: true
11
- overflow: 'visible'
12
- ready: ->
13
- closed: ->
14
-
15
- # Arguments:
16
- # - url: The url to load the content from via ajax
17
- # - options: A object holding options
18
- # - size: The maximum size of the Dialog
19
- # - title: The title of the Dialog
20
- constructor: (@url, @options = {}) ->
21
- @options = $.extend({}, @DEFAULTS, @options)
22
- @$document = $(document)
23
- @$window = $(window)
24
- @$body = $('body')
25
- size = @options.size.split('x')
26
- @width = parseInt(size[0], 10)
27
- @height = parseInt(size[1], 10)
28
- @build()
29
-
30
- # Opens the Dialog and loads the content via ajax.
31
- open: ->
32
- @dialog.trigger 'Alchemy.DialogOpen'
33
- @bind_close_events()
34
- window.requestAnimationFrame =>
35
- @dialog_container.addClass('open')
36
- @overlay.addClass('open') if @overlay?
37
- @$body.addClass('prevent-scrolling')
38
- Alchemy.currentDialogs.push(this)
39
- @load()
40
- true
41
-
42
- # Closes the Dialog and removes it from the DOM
43
- close: ->
44
- @dialog.trigger 'DialogClose.Alchemy'
45
- @$document.off 'keydown'
46
- @dialog_container.removeClass('open')
47
- @overlay.removeClass('open') if @overlay?
48
- @$document.on 'webkitTransitionEnd transitionend oTransitionEnd', =>
49
- @$document.off 'webkitTransitionEnd transitionend oTransitionEnd'
50
- @dialog_container.remove()
51
- @overlay.remove() if @overlay?
52
- @$body.removeClass('prevent-scrolling')
53
- Alchemy.currentDialogs.pop(this)
54
- if @options.closed?
55
- @options.closed()
56
- true
57
-
58
- # Loads the content via ajax and replaces the Dialog body with server response.
59
- load: ->
60
- @show_spinner()
61
- $.get @url, (data) =>
62
- @replace(data)
63
- .fail (xhr) =>
64
- @show_error(xhr)
65
- true
66
-
67
- # Reloads the Dialog content
68
- reload: ->
69
- @dialog_body.empty()
70
- @load()
71
-
72
- # Replaces the dialog body with given content and initializes it.
73
- replace: (data) ->
74
- @remove_spinner()
75
- @dialog_body.hide()
76
- @dialog_body.html(data)
77
- @init()
78
- @dialog[0].dispatchEvent(new CustomEvent(
79
- "DialogReady.Alchemy",
80
- bubbles: true
81
- detail:
82
- body: @dialog_body[0]
83
- ))
84
- if @options.ready?
85
- @options.ready(@dialog_body)
86
- @dialog_body.show()
87
- true
88
-
89
- # Adds a spinner into Dialog body
90
- show_spinner: ->
91
- @spinner = new Alchemy.Spinner('medium')
92
- @spinner.spin(@dialog_body[0])
93
-
94
- # Removes the spinner from Dialog body
95
- remove_spinner: ->
96
- @spinner.stop()
97
-
98
- # Initializes the Dialog body
99
- init: ->
100
- Alchemy.GUI.init(@dialog_body)
101
- @watch_remote_forms()
102
-
103
- # Watches ajax requests inside of dialog body and replaces the content accordingly
104
- watch_remote_forms: ->
105
- form = $('[data-remote="true"]', @dialog_body)
106
- form.bind "ajax:success", (event) =>
107
- xhr = event.detail[2]
108
- content_type = xhr.getResponseHeader('Content-Type')
109
- if content_type.match(/javascript/)
110
- return
111
- else
112
- @dialog_body.html(xhr.responseText)
113
- @init()
114
- return
115
- form.bind "ajax:error", (event, b, c) =>
116
- statusText = event.detail[1]
117
- xhr = event.detail[2]
118
- @show_error(xhr, statusText)
119
- return
120
-
121
- # Displays an error message
122
- show_error: (xhr, status_message, $container = @dialog_body) ->
123
- error_type = "warning"
124
- switch xhr.status
125
- when 0
126
- error_header = "The server does not respond."
127
- error_body = "Please check server and try again."
128
- when 403
129
- error_header = "You are not authorized!"
130
- error_body = "Please close this window."
131
- when 422
132
- @dialog_body.html(xhr.responseText)
133
- @init()
134
- return
135
- else
136
- error_type = "error"
137
- if status_message
138
- error_header = status_message
139
- console.error(xhr.responseText)
140
- else
141
- error_header = "#{xhr.statusText} (#{xhr.status})"
142
- error_body = "Please check log and try again."
143
- $errorDiv = $("<alchemy-message type=\"#{error_type}\">
144
- <h1>#{error_header}</h1>
145
- <p>#{error_body}</p>
146
- </alchemy-message>")
147
- $container.html $errorDiv
148
-
149
- # Binds close events on:
150
- # - Close button
151
- # - Overlay (if the Dialog is a modal)
152
- # - ESC Key
153
- bind_close_events: ->
154
- @close_button.on "click", =>
155
- @close()
156
- false
157
- @dialog_container.addClass('closable').on "click", (e) =>
158
- return true if e.target != @dialog_container.get(0)
159
- @close()
160
- false
161
- @$document.keydown (e) =>
162
- if e.which == 27
163
- @close()
164
- false
165
- else
166
- true
167
-
168
- # Builds the html structure of the Dialog
169
- build: ->
170
- @dialog_container = $('<div class="alchemy-dialog-container" />')
171
- @dialog = $('<div class="alchemy-dialog" />')
172
- @dialog_body = $('<div class="alchemy-dialog-body" />')
173
- @dialog_header = $('<div class="alchemy-dialog-header" />')
174
- @dialog_title = $('<div class="alchemy-dialog-title" />')
175
- @close_button = $('<a class="alchemy-dialog-close"><alchemy-icon name="close"></alchemy-icon></a>')
176
- @dialog_title.text(@options.title)
177
- @dialog_header.append(@dialog_title)
178
- @dialog_header.append(@close_button)
179
- @dialog.append(@dialog_header)
180
- @dialog.append(@dialog_body)
181
- @dialog_container.append(@dialog)
182
- @dialog.addClass('modal') if @options.modal
183
- @dialog_body.addClass('padded') if @options.padding
184
- if @options.modal
185
- @overlay = $('<div class="alchemy-dialog-overlay" />')
186
- @$body.append(@overlay)
187
- @$body.append(@dialog_container)
188
- @resize()
189
- @dialog
190
-
191
- # Sets the correct size of the dialog
192
- # It normalizes the given size, so that it never acceeds the window size.
193
- resize: ->
194
- padding = 16
195
- $doc_width = @$window.width()
196
- $doc_height = @$window.height()
197
- if @options.size == 'fullscreen'
198
- [@width, @height] = [$doc_width, $doc_height]
199
- if @width >= $doc_width
200
- @width = $doc_width - padding
201
- if @height >= $doc_height
202
- @height = $doc_height - padding - @DEFAULTS.header_height
203
- @dialog.css
204
- 'width': @width
205
- 'min-height': @height
206
- overflow: @options.overflow
207
- if @options.overflow == 'hidden'
208
- @dialog_body.css
209
- height: @height
210
- overflow: 'auto'
211
- else
212
- @dialog_body.css
213
- 'min-height': @height
214
- overflow: 'visible'
215
- return
216
-
217
- # Collection of all current dialog instances
218
- window.Alchemy.currentDialogs = []
219
-
220
- # Gets the last dialog instantiated, which is the current one.
221
- window.Alchemy.currentDialog = ->
222
- length = Alchemy.currentDialogs.length
223
- return if length == 0
224
- Alchemy.currentDialogs[length - 1]
225
-
226
- # Utility function to close the current Dialog
227
- #
228
- # You can pass a callback function, that gets triggered after the Dialog gets closed.
229
- #
230
- window.Alchemy.closeCurrentDialog = (callback) ->
231
- dialog = Alchemy.currentDialog()
232
- if dialog?
233
- dialog.options.closed = callback
234
- dialog.close()
235
-
236
- # Utility function to open a new Dialog
237
- window.Alchemy.openDialog = (url, options) ->
238
- if !url
239
- throw('No url given! Please provide an url.')
240
- dialog = new Alchemy.Dialog(url, options)
241
- dialog.open()
242
-
243
- # Watches elements for Alchemy Dialogs
244
- #
245
- # Links having a data-alchemy-confirm-delete
246
- # and input/buttons having a data-alchemy-confirm attribute get watched.
247
- #
248
- # You can pass a scope so that only elements inside this scope are queried.
249
- #
250
- # The href attribute of the link is the url for the overlay window.
251
- #
252
- # See Alchemy.Dialog for further options you can add to the data attribute
253
- #
254
- window.Alchemy.watchForDialogs = (scope = '#alchemy') ->
255
- $(scope).on 'click', '[data-alchemy-confirm-delete]', (event) ->
256
- $this = $(this)
257
- options = $this.data('alchemy-confirm-delete')
258
- Alchemy.confirmToDeleteDialog($this.attr('href'), options)
259
- event.preventDefault()
260
- return
261
- $(scope).on 'click', '[data-alchemy-confirm]', (event) ->
262
- options = $(this).data('alchemy-confirm')
263
- Alchemy.openConfirmDialog options.message, $.extend options,
264
- ok_label: options.ok_label
265
- cancel_label: options.cancel_label
266
- on_ok: =>
267
- Alchemy.pleaseWaitOverlay()
268
- @form.submit()
269
- return
270
- event.preventDefault()
271
- return