decidim-decidim_awesome 0.10.2 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-decidim_awesome might be problematic. Click here for more details.

Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +177 -60
  4. data/app/cells/concerns/decidim/decidim_awesome/global_menu_cell_override.rb +20 -0
  5. data/app/cells/concerns/decidim/decidim_awesome/{proposal_m_cell_override.rb → proposal_l_cell_override.rb} +10 -4
  6. data/app/cells/decidim/decidim_awesome/content_blocks/map/show.erb +5 -12
  7. data/app/cells/decidim/decidim_awesome/content_blocks/map_cell.rb +9 -5
  8. data/app/cells/decidim/decidim_awesome/voting/proposal_metadata_cell.rb +54 -0
  9. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/modal.erb +18 -0
  10. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +37 -32
  11. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +9 -4
  12. data/app/commands/concerns/decidim/decidim_awesome/admin/needs_constraint_helpers.rb +2 -2
  13. data/app/commands/concerns/decidim/decidim_awesome/proposals/admin/update_proposal_override.rb +31 -0
  14. data/app/commands/concerns/decidim/decidim_awesome/proposals/create_collaborative_draft_override.rb +27 -0
  15. data/app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb +27 -0
  16. data/app/commands/concerns/decidim/decidim_awesome/proposals/update_collaborative_draft_override.rb +27 -0
  17. data/app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb +26 -0
  18. data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
  19. data/app/commands/decidim/decidim_awesome/admin/create_proposal_custom_field.rb +4 -3
  20. data/app/commands/decidim/decidim_awesome/admin/destroy_custom_redirect.rb +1 -1
  21. data/app/commands/decidim/decidim_awesome/admin/destroy_menu_hack.rb +1 -1
  22. data/app/commands/decidim/decidim_awesome/admin/destroy_proposal_custom_field.rb +6 -3
  23. data/app/commands/decidim/decidim_awesome/admin/rename_scope_label.rb +1 -1
  24. data/app/commands/decidim/decidim_awesome/admin/update_constraint.rb +1 -1
  25. data/app/commands/decidim/decidim_awesome/admin/update_custom_redirect.rb +2 -2
  26. data/app/commands/decidim/decidim_awesome/command.rb +1 -7
  27. data/app/controllers/concerns/decidim/decidim_awesome/admin/maintenance_context.rb +43 -0
  28. data/app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb +1 -1
  29. data/app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb +34 -0
  30. data/app/controllers/concerns/decidim/decidim_awesome/limit_pending_amendments.rb +35 -0
  31. data/app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb +1 -1
  32. data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +3 -3
  33. data/app/controllers/decidim/decidim_awesome/admin/application_controller.rb +2 -0
  34. data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +14 -10
  35. data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +10 -9
  36. data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +23 -20
  37. data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -10
  38. data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +76 -0
  39. data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -10
  40. data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +14 -6
  41. data/app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb +2 -2
  42. data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +2 -2
  43. data/app/controllers/decidim/decidim_awesome/blank_component_controller.rb +8 -3
  44. data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +3 -3
  45. data/app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb +18 -5
  46. data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_form_override.rb +21 -0
  47. data/app/forms/{decidim → concerns/decidim}/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +2 -1
  48. data/app/forms/decidim/decidim_awesome/admin/config_form.rb +28 -14
  49. data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +2 -2
  50. data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +4 -0
  51. data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +4 -4
  52. data/app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb +65 -0
  53. data/app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb +23 -0
  54. data/app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb +110 -0
  55. data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +6 -27
  56. data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
  57. data/app/jobs/decidim/decidim_awesome/destroy_private_data_job.rb +22 -0
  58. data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +5 -4
  59. data/app/middleware/decidim/decidim_awesome/current_config.rb +3 -5
  60. data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +39 -10
  61. data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
  62. data/app/models/decidim/decidim_awesome/paper_trail_version.rb +3 -3
  63. data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +35 -1
  64. data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
  65. data/app/overrides/decidim/proposals/admin/proposals/show/add_private_body.html.erb.deface +7 -0
  66. data/app/overrides/decidim/proposals/admin/proposals/show/replace_body.html.erb.deface +5 -0
  67. data/app/overrides/decidim/proposals/proposals/_proposal_aside/limit_amendments_modal.html.erb.deface +5 -0
  68. data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +1 -1
  69. data/app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface +6 -0
  70. data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +4 -11
  71. data/app/overrides/layouts/decidim/admin/_header/{replace_scripts.html.erb.deface → add_awesome_tags.html.erb.deface} +4 -4
  72. data/app/packs/entrypoints/decidim_admin_decidim_awesome.js +1 -2
  73. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js +4 -0
  74. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss +1 -0
  75. data/app/packs/entrypoints/decidim_decidim_awesome.js +2 -2
  76. data/app/packs/entrypoints/decidim_decidim_awesome_map.scss +1 -1
  77. data/app/packs/entrypoints/decidim_editor.js +14 -0
  78. data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +96 -69
  79. data/app/packs/src/decidim/decidim_awesome/admin/check_redirections.js +46 -41
  80. data/app/packs/src/decidim/decidim_awesome/admin/codemirror.js +3 -3
  81. data/app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js +115 -0
  82. data/app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js +9 -5
  83. data/app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js +22 -11
  84. data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +26 -8
  85. data/app/packs/src/decidim/decidim_awesome/admin/tabs_change.js +31 -0
  86. data/app/packs/src/decidim/decidim_awesome/admin/user_picker.js +34 -21
  87. data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +28 -0
  88. data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +5 -16
  89. data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
  90. data/app/packs/src/decidim/decidim_awesome/awesome_application.js +1 -15
  91. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js +33 -11
  92. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/meetings_fetcher.js +9 -12
  93. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/proposals_fetcher.js +28 -0
  94. data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +3 -4
  95. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +12 -12
  96. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/meetings_controller.js +11 -7
  97. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js +6 -13
  98. data/app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js +51 -20
  99. data/app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js +27 -18
  100. data/app/packs/src/decidim/decidim_awesome/editor/index.js +94 -0
  101. data/app/packs/src/decidim/decidim_awesome/forms/autosave.js +28 -23
  102. data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +29 -25
  103. data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
  104. data/app/packs/src/decidim/decidim_awesome/proposals/custom_fields.js +31 -15
  105. data/app/packs/src/decidim/decidim_awesome/proposals/images.js +16 -10
  106. data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +47 -38
  107. data/app/packs/stylesheets/decidim/decidim_awesome/admin/auto_edits.scss +11 -12
  108. data/app/packs/stylesheets/decidim/decidim_awesome/admin/check_redirections.scss +15 -0
  109. data/app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss +24 -12
  110. data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +49 -29
  111. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -71
  112. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss +48 -0
  113. data/app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss +11 -0
  114. data/app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss +17 -26
  115. data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
  116. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +11 -49
  117. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +19 -0
  118. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +4 -19
  119. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss +1 -1
  120. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss +41 -35
  121. data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
  122. data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +118 -0
  123. data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +26 -0
  124. data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +41 -59
  125. data/app/permissions/decidim/decidim_awesome/admin/permissions.rb +14 -3
  126. data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -4
  127. data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb +23 -0
  128. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_item_presenter_override.rb +10 -2
  129. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_presenter_override.rb +8 -0
  130. data/app/presenters/concerns/decidim/decidim_awesome/proposals/proposal_presenter_override.rb +20 -0
  131. data/app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb +30 -0
  132. data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
  133. data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +70 -0
  134. data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
  135. data/app/queries/decidim/decidim_awesome/private_data_finder.rb +19 -0
  136. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_methods.rb +72 -0
  137. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_override.rb +38 -0
  138. data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +34 -0
  139. data/app/types/concerns/decidim/decidim_awesome/add_proposal_type_custom_fields.rb +59 -0
  140. data/app/types/concerns/decidim/decidim_awesome/{proposal_type_override.rb → add_proposal_type_vote_weights.rb} +3 -1
  141. data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +23 -17
  142. data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +50 -48
  143. data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +7 -2
  144. data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +25 -18
  145. data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +7 -6
  146. data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +12 -16
  147. data/app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb +39 -23
  148. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb +35 -17
  149. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_private_custom_fields.html.erb +1 -0
  150. data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +68 -80
  151. data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +16 -12
  152. data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -6
  153. data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +22 -12
  154. data/app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb +1 -49
  155. data/app/views/decidim/decidim_awesome/admin/constraints/new.html.erb +14 -9
  156. data/app/views/decidim/decidim_awesome/admin/constraints/show.html.erb +14 -9
  157. data/app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb +20 -5
  158. data/app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb +5 -5
  159. data/app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb +14 -13
  160. data/app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb +5 -5
  161. data/app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb +44 -0
  162. data/app/views/decidim/decidim_awesome/admin/maintenance/show.html.erb +44 -0
  163. data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +6 -6
  164. data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +21 -12
  165. data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +39 -42
  166. data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
  167. data/app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb +8 -5
  168. data/app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb +20 -0
  169. data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +14 -18
  170. data/app/views/decidim/decidim_awesome/amendments/_modal.html.erb +23 -0
  171. data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +8 -2
  172. data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +7 -12
  173. data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +53 -37
  174. data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +14 -5
  175. data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +0 -3
  176. data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +9 -7
  177. data/app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb +9 -6
  178. data/app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb +12 -0
  179. data/app/views/layouts/decidim/decidim_awesome/admin/application.html.erb +1 -73
  180. data/app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb +19 -0
  181. data/config/assets.rb +3 -33
  182. data/config/i18n-tasks.yml +23 -3
  183. data/config/locales/ca.yml +28 -17
  184. data/config/locales/cs.yml +39 -14
  185. data/config/locales/de.yml +25 -15
  186. data/config/locales/en.yml +125 -35
  187. data/config/locales/es.yml +26 -16
  188. data/config/locales/eu.yml +7 -3
  189. data/config/locales/fr.yml +25 -16
  190. data/config/locales/hu.yml +43 -8
  191. data/config/locales/it.yml +8 -15
  192. data/config/locales/ja.yml +26 -15
  193. data/config/locales/lt.yml +0 -4
  194. data/config/locales/nl.yml +9 -14
  195. data/config/locales/pt-BR.yml +9 -14
  196. data/config/locales/ro-RO.yml +0 -3
  197. data/config/locales/sv.yml +9 -9
  198. data/config/rubocop/disabled.yml +11 -0
  199. data/config/rubocop/faker.yml +480 -0
  200. data/config/rubocop/rails.yml +88 -0
  201. data/config/rubocop/rspec.yml +65 -0
  202. data/config/rubocop/ruby.yml +1210 -0
  203. data/db/migrate/20240306175331_rename_editor_images_awesome_config.rb +18 -0
  204. data/db/migrate/20240531224204_add_decidim_awesome_proposal_private_fields.rb +29 -0
  205. data/db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +20 -0
  206. data/db/seeds.rb +3 -3
  207. data/lib/decidim/decidim_awesome/admin_engine.rb +26 -7
  208. data/lib/decidim/decidim_awesome/api/types/localized_custom_fields_type.rb +22 -0
  209. data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +51 -0
  210. data/lib/decidim/decidim_awesome/awesome.rb +70 -19
  211. data/lib/decidim/decidim_awesome/awesome_helpers.rb +6 -2
  212. data/lib/decidim/decidim_awesome/checksums.yml +46 -44
  213. data/lib/decidim/decidim_awesome/config.rb +1 -1
  214. data/lib/decidim/decidim_awesome/custom_fields.rb +13 -5
  215. data/lib/decidim/decidim_awesome/engine.rb +165 -56
  216. data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
  217. data/lib/decidim/decidim_awesome/lock.rb +47 -0
  218. data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
  219. data/lib/decidim/decidim_awesome/menu.rb +165 -0
  220. data/lib/decidim/decidim_awesome/menu_hacker.rb +4 -8
  221. data/lib/decidim/decidim_awesome/system_checker.rb +2 -4
  222. data/lib/decidim/decidim_awesome/test/factories.rb +10 -10
  223. data/lib/decidim/decidim_awesome/test/initializer.rb +7 -12
  224. data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -2
  225. data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +2 -2
  226. data/lib/decidim/decidim_awesome/test/shared_examples/{box_label_editor.rb → box_label_editor_examples.rb} +17 -17
  227. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +23 -5
  228. data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +155 -0
  229. data/lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb +7 -7
  230. data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +42 -58
  231. data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +9 -8
  232. data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +32 -24
  233. data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +97 -22
  234. data/lib/decidim/decidim_awesome/version.rb +2 -2
  235. data/lib/decidim/decidim_awesome/voting_manifest.rb +5 -10
  236. data/lib/decidim/decidim_awesome.rb +1 -2
  237. data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +1 -1
  238. data/lib/tasks/decidim_awesome_upgrade_tasks.rake +4 -0
  239. data/package.json +21 -30
  240. metadata +83 -60
  241. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +0 -15
  242. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +0 -15
  243. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +0 -21
  244. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +0 -16
  245. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +0 -20
  246. data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -13
  247. data/app/helpers/decidim/decidim_awesome/amendments_helper_override.rb +0 -48
  248. data/app/helpers/decidim/decidim_awesome/proposals/application_helper_override.rb +0 -78
  249. data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
  250. data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +0 -3
  251. data/app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js +0 -2
  252. data/app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js +0 -1
  253. data/app/packs/src/decidim/decidim_awesome/admin/constraints.js +0 -55
  254. data/app/packs/src/decidim/decidim_awesome/editors/editor.js +0 -218
  255. data/app/packs/src/decidim/decidim_awesome/editors/tabs_focus.js +0 -22
  256. data/app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss +0 -19
  257. data/app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss +0 -58
  258. data/app/packs/stylesheets/vendor/select2-foundation-theme.scss +0 -348
  259. data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +0 -64
  260. data/app/views/decidim/decidim_awesome/admin/config/_modal.html.erb +0 -11
  261. data/app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb +0 -15
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- welcome_text = "Welcome to the Admin Panel."
4
- welcome_text = "Welcome to the Decidim Admin Panel." if legacy_version?
3
+ welcome_text = "Dashboard"
5
4
 
6
5
  shared_examples "redirects to index" do |_link|
7
6
  it "display index page" do
@@ -34,7 +33,7 @@ shared_examples "allows awesome access" do
34
33
 
35
34
  it "allows module access" do
36
35
  visit decidim_admin_decidim_awesome.config_path(:editors)
37
- expect(page).to have_content("Tweaks for editors")
36
+ expect(page).to have_content("Tweaks for Editor Hacks")
38
37
  end
39
38
  end
40
39
 
@@ -88,7 +87,7 @@ shared_examples "allows external accesses" do
88
87
 
89
88
  it "shows participants access" do
90
89
  visit decidim_admin.users_path
91
- expect(page).to have_content(legacy_version? ? "New user" : "New admin")
90
+ expect(page).to have_content("New admin")
92
91
  end
93
92
 
94
93
  it "shows pages access" do
@@ -110,6 +109,10 @@ end
110
109
  shared_examples "allows all admin routes" do
111
110
  before do
112
111
  visit decidim_admin.root_path
112
+ # this is a workaround to wait for the page to load
113
+ # it seems that the test might fail randomly otherwise
114
+ # underlaying issue is unknown, maybe capybara is faster clicking than ruby is at storing class variables?
115
+ sleep 0.1
113
116
  end
114
117
 
115
118
  it "allows the admin root page" do
@@ -117,13 +120,12 @@ shared_examples "allows all admin routes" do
117
120
  end
118
121
 
119
122
  it "allows the assemblies page" do
120
- click_link "Assemblies"
121
-
123
+ click_link_or_button "Assemblies"
122
124
  expect(page).to have_content("New assembly")
123
125
  end
124
126
 
125
127
  it "allows the processes page" do
126
- click_link "Processes"
128
+ click_link_or_button "Processes"
127
129
 
128
130
  expect(page).to have_content("New process")
129
131
  end
@@ -132,6 +134,7 @@ end
132
134
  shared_examples "allows scoped admin routes" do
133
135
  before do
134
136
  visit decidim_admin.root_path
137
+ sleep 0.1
135
138
  end
136
139
 
137
140
  it "allows the admin root page" do
@@ -139,14 +142,14 @@ shared_examples "allows scoped admin routes" do
139
142
  end
140
143
 
141
144
  it "allows the assemblies page" do
142
- click_link "Assemblies"
145
+ click_link_or_button "Assemblies"
143
146
 
144
147
  expect(page).to have_content("New assembly")
145
148
  end
146
149
 
147
150
  describe "forbids processes" do
148
151
  before do
149
- click_link "Processes"
152
+ click_link_or_button "Processes"
150
153
  end
151
154
 
152
155
  it_behaves_like "redirects to index"
@@ -159,16 +162,16 @@ end
159
162
 
160
163
  shared_examples "has admin link" do
161
164
  it "has menu link" do
162
- within ".topbar__dropmenu.topbar__user__logged" do
163
- expect(page).to have_selector("#user-menu li", text: "Admin dashboard", visible: :hidden)
165
+ within "header" do
166
+ expect(page).to have_css("#admin-bar", text: "Admin dashboard")
164
167
  end
165
168
  end
166
169
  end
167
170
 
168
171
  shared_examples "has no admin link" do
169
- it "has menu link" do
170
- within ".topbar__dropmenu.topbar__user__logged" do
171
- expect(page).not_to have_selector("#user-menu li", text: "Admin dashboard", visible: :hidden)
172
+ it "has no menu link" do
173
+ within "header" do
174
+ expect(page).not_to have_css("#admin-bar", text: "Admin dashboard")
172
175
  end
173
176
  end
174
177
  end
@@ -216,7 +219,7 @@ shared_examples "can edit assembly" do
216
219
  ca: "Assamblea editada",
217
220
  es: "Asamblea editada"
218
221
  )
219
- find("*[type=submit]").click
222
+ click_link_or_button "Update"
220
223
  expect(page).to have_admin_callout("successfully")
221
224
  end
222
225
  end
@@ -265,7 +268,7 @@ shared_examples "can manage component" do
265
268
  expect(page).to have_content("Title")
266
269
  expect(page).to have_content(proposal.title["en"])
267
270
 
268
- click_link "Edit proposal"
271
+ click_link_or_button "Edit proposal"
269
272
  expect(page).to have_content("Update proposal")
270
273
  fill_in_i18n(
271
274
  :proposal_title,
@@ -274,14 +277,14 @@ shared_examples "can manage component" do
274
277
  ca: "Proposta editada",
275
278
  es: "Propuesta editada"
276
279
  )
277
- find("*[type=submit]").click
280
+ click_link_or_button "Update"
278
281
  expect(page).to have_admin_callout("successfully")
279
282
  end
280
283
 
281
284
  it "can create a proposal" do
282
285
  visit manage_component_path(component)
283
286
 
284
- click_link "New proposal"
287
+ click_link_or_button "New proposal"
285
288
  expect(page).to have_content("Create proposal")
286
289
  fill_in_i18n(
287
290
  :proposal_title,
@@ -297,7 +300,7 @@ shared_examples "can manage component" do
297
300
  ca: "Body creat",
298
301
  es: "Body creat"
299
302
  )
300
- find("*[type=submit]").click
303
+ click_link_or_button "Create"
301
304
  expect(page).to have_admin_callout("successfully")
302
305
  end
303
306
  end
@@ -305,6 +308,7 @@ end
305
308
  shared_examples "edits allowed components" do
306
309
  before do
307
310
  visit decidim_admin.root_path
311
+ sleep 0.1
308
312
  end
309
313
 
310
314
  it_behaves_like "can manage component"
@@ -365,8 +369,10 @@ shared_examples "allows access to group processes" do
365
369
  end
366
370
 
367
371
  it "shows the list of processes" do
368
- expect(page).to have_content("Participatory processes")
369
- expect(page).to have_content(participatory_process.title["en"])
372
+ within("[data-content]") do
373
+ expect(page).to have_content("Processes")
374
+ expect(page).to have_content(participatory_process.title["en"])
375
+ end
370
376
  end
371
377
 
372
378
  describe "forbids editing processes" do
@@ -383,8 +389,10 @@ shared_examples "allows access to group processes" do
383
389
  end
384
390
 
385
391
  it "shows the list of groups" do
386
- expect(page).to have_content("Participatory process groups")
387
- expect(page).to have_content(process_group.title["en"])
392
+ within("[data-content]") do
393
+ expect(page).to have_content("Process groups")
394
+ expect(page).to have_content(process_group.title["en"])
395
+ end
388
396
  end
389
397
  end
390
398
  end
@@ -403,7 +411,7 @@ shared_examples "allows edit any group process" do
403
411
  ca: "Proces grup editat",
404
412
  es: "Grupo de procesos editado"
405
413
  )
406
- find("*[type=submit]").click
414
+ click_link_or_button "Update"
407
415
  expect(page).to have_admin_callout("successfully")
408
416
  end
409
417
  end
@@ -25,31 +25,115 @@ end
25
25
  shared_examples "activated concerns" do |enabled|
26
26
  it "common concerns are registered" do
27
27
  expect(ActionView::Base.included_modules).to include(Decidim::DecidimAwesome::AwesomeHelpers)
28
- expect(Decidim::MenuPresenter.included_modules).to include(Decidim::DecidimAwesome::MenuPresenterOverride)
29
- expect(Decidim::MenuItemPresenter.included_modules).to include(Decidim::DecidimAwesome::MenuItemPresenterOverride)
28
+ expect(Decidim::ViewModel.included_modules).to include(Decidim::DecidimAwesome::AwesomeHelpers)
29
+ expect(Decidim::ApplicationController.included_modules).to include(Decidim::DecidimAwesome::ContentSecurityPolicy)
30
+ expect(Decidim::Admin::ApplicationController.included_modules).to include(Decidim::DecidimAwesome::ContentSecurityPolicy)
30
31
  end
31
32
 
32
33
  if enabled
33
34
  it "concerns are registered" do
34
35
  expect(Decidim::User.included_modules).to include(Decidim::DecidimAwesome::UserOverride)
36
+ expect(Decidim::MenuPresenter.included_modules).to include(Decidim::DecidimAwesome::MenuPresenterOverride)
37
+ expect(Decidim::MenuItemPresenter.included_modules).to include(Decidim::DecidimAwesome::MenuItemPresenterOverride)
35
38
  expect(Decidim::ErrorsController.included_modules).to include(Decidim::DecidimAwesome::NotFoundRedirect)
36
39
  expect(Decidim::Proposals::ApplicationHelper.included_modules).to include(Decidim::DecidimAwesome::Proposals::ApplicationHelperOverride)
37
40
  expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalWizardCreateStepFormOverride)
41
+ expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
42
+ expect(Decidim::Proposals::Admin::ProposalForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
38
43
  expect(Decidim::AmendmentsHelper.included_modules).to include(Decidim::DecidimAwesome::AmendmentsHelperOverride)
39
44
  expect(EtiquetteValidator.included_modules).to include(Decidim::DecidimAwesome::EtiquetteValidatorOverride)
45
+ expect(Decidim::Proposals::ProposalVote.included_modules).to include(Decidim::DecidimAwesome::HasVoteWeight)
46
+ expect(Decidim::Proposals::ProposalType.included_modules).to include(Decidim::DecidimAwesome::AddProposalTypeVoteWeights)
47
+ expect(Decidim::Proposals::ProposalType.included_modules).to include(Decidim::DecidimAwesome::AddProposalTypeCustomFields)
48
+ expect(Decidim::Proposals::ProposalLCell.included_modules).to include(Decidim::DecidimAwesome::ProposalLCellOverride)
49
+ expect(Decidim::Proposals::Proposal.included_modules).to include(Decidim::DecidimAwesome::HasProposalExtraFields)
50
+ expect(Decidim::Proposals::CollaborativeDraft.included_modules).to include(Decidim::DecidimAwesome::HasProposalExtraFields)
51
+ expect(Decidim::ContentBlocks::GlobalMenuCell.included_modules).to include(Decidim::DecidimAwesome::GlobalMenuCellOverride)
52
+ expect(Decidim::BreadcrumbHelper.included_modules).to include(Decidim::DecidimAwesome::BreadcrumbHelperOverride)
53
+ expect(Decidim::BreadcrumbRootMenuItemPresenter.included_modules).to include(Decidim::DecidimAwesome::BreadcrumbRootMenuItemPresenterOverride)
54
+ expect(Decidim::Proposals::ProposalSerializer.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalSerializerOverride)
55
+ expect(Decidim::Proposals::ProposalVotesController.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalVotesControllerOverride)
56
+ expect(Decidim::AmendmentsController.included_modules).to include(Decidim::DecidimAwesome::LimitPendingAmendments)
57
+ expect(Decidim::Proposals::ProposalsController.included_modules).to include(Decidim::DecidimAwesome::Proposals::OrderableOverride)
58
+ expect(Decidim::AdminLog::ComponentPresenter.included_modules).to include(Decidim::DecidimAwesome::AdminLog::ComponentPresenterOverride)
40
59
  end
60
+
41
61
  else
42
62
  it "concerns are not registered" do
43
63
  expect(Decidim::User.included_modules).not_to include(Decidim::DecidimAwesome::UserOverride)
64
+ expect(Decidim::MenuPresenter.included_modules).not_to include(Decidim::DecidimAwesome::MenuPresenterOverride)
65
+ expect(Decidim::MenuItemPresenter.included_modules).not_to include(Decidim::DecidimAwesome::MenuItemPresenterOverride)
44
66
  expect(Decidim::ErrorsController.included_modules).not_to include(Decidim::DecidimAwesome::NotFoundRedirect)
45
67
  expect(Decidim::Proposals::ApplicationHelper.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ApplicationHelperOverride)
46
68
  expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalWizardCreateStepFormOverride)
69
+ expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
70
+ expect(Decidim::Proposals::Admin::ProposalForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
47
71
  expect(Decidim::AmendmentsHelper.included_modules).not_to include(Decidim::DecidimAwesome::AmendmentsHelperOverride)
48
72
  expect(EtiquetteValidator.included_modules).not_to include(Decidim::DecidimAwesome::EtiquetteValidatorOverride)
73
+ expect(Decidim::Proposals::ProposalVote.included_modules).not_to include(Decidim::DecidimAwesome::HasVoteWeight)
74
+ expect(Decidim::Proposals::ProposalType.included_modules).not_to include(Decidim::DecidimAwesome::AddProposalTypeVoteWeights)
75
+ expect(Decidim::Proposals::ProposalType.included_modules).not_to include(Decidim::DecidimAwesome::AddProposalTypeCustomFields)
76
+ expect(Decidim::Proposals::ProposalLCell.included_modules).not_to include(Decidim::DecidimAwesome::ProposalLCellOverride)
77
+ expect(Decidim::Proposals::Proposal.included_modules).not_to include(Decidim::DecidimAwesome::HasProposalExtraFields)
78
+ expect(Decidim::Proposals::CollaborativeDraft.included_modules).not_to include(Decidim::DecidimAwesome::HasProposalExtraFields)
79
+ expect(Decidim::ContentBlocks::GlobalMenuCell.included_modules).not_to include(Decidim::DecidimAwesome::GlobalMenuCellOverride)
80
+ expect(Decidim::BreadcrumbHelper.included_modules).not_to include(Decidim::DecidimAwesome::BreadcrumbHelperOverride)
81
+ expect(Decidim::BreadcrumbRootMenuItemPresenter.included_modules).not_to include(Decidim::DecidimAwesome::BreadcrumbRootMenuItemPresenterOverride)
82
+ expect(Decidim::Proposals::ProposalSerializer.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalSerializerOverride)
83
+ expect(Decidim::Proposals::ProposalVotesController.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalVotesControllerOverride)
84
+ expect(Decidim::AmendmentsController.included_modules).not_to include(Decidim::DecidimAwesome::LimitPendingAmendments)
85
+ expect(Decidim::Proposals::ProposalsController.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::OrderableOverride)
86
+ expect(Decidim::AdminLog::ComponentPresenter.included_modules).not_to include(Decidim::DecidimAwesome::AdminLog::ComponentPresenterOverride)
49
87
  end
50
88
  end
51
89
  end
52
90
 
91
+ shared_examples "csp directives" do |enabled|
92
+ let(:organization) { create(:organization) }
93
+ let(:fonts) { controller.content_security_policy.send(:policy)["font-src"] }
94
+ let(:scripts) { controller.content_security_policy.send(:policy)["script-src"] }
95
+ let(:frames) { controller.content_security_policy.send(:policy)["frame-src"] }
96
+
97
+ shared_examples "controller directives" do
98
+ if enabled
99
+ it "has CSP directives" do
100
+ get :show do
101
+ expect(fonts).to eq(["'self'", "data:"])
102
+ expect(scripts).to eq(["'self'", "'unsafe-inline'", "'unsafe-eval'", "https://www.intergram.xyz"])
103
+ expect(frames).to eq(["'self'", "www.youtube-nocookie.com", "player.vimeo.com", "https://www.intergram.xyz"])
104
+ end
105
+ end
106
+ else
107
+ it "has no CSP directives" do
108
+ get :show do
109
+ expect(fonts).to eq(["'self'"])
110
+ expect(scripts).to eq(["'self'", "'unsafe-inline'", "'unsafe-eval'"])
111
+ expect(frames).to eq(["'self'", "www.youtube-nocookie.com", "player.vimeo.com"])
112
+ end
113
+ end
114
+ end
115
+ end
116
+
117
+ describe Decidim::HomepageController, type: :controller do
118
+ routes { Decidim::Core::Engine.routes }
119
+ before do
120
+ request.env["decidim.current_organization"] = user.organization
121
+ end
122
+
123
+ it_behaves_like "controller directives"
124
+ end
125
+
126
+ describe Decidim::Admin::DashboardController, type: :controller do
127
+ routes { Decidim::Admin::Engine.routes }
128
+
129
+ before do
130
+ request.env["decidim.current_organization"] = user.organization
131
+ end
132
+
133
+ it_behaves_like "controller directives"
134
+ end
135
+ end
136
+
53
137
  shared_examples "custom menus" do |enabled|
54
138
  describe Decidim::MenuPresenter, type: :helper do
55
139
  before do
@@ -74,11 +158,9 @@ shared_examples "basic rendering" do |enabled|
74
158
  let(:image_vars) do
75
159
  [
76
160
  :allow_images_in_proposals,
77
- :allow_images_in_small_editor,
78
- :allow_images_in_full_editor,
161
+ :allow_videos_in_editors,
162
+ :allow_images_in_editors,
79
163
  :allow_images_in_proposals,
80
- :use_markdown_editor,
81
- :allow_images_in_markdown_editor,
82
164
  :auto_save_forms,
83
165
  :intergram_for_admins,
84
166
  :intergram_for_public
@@ -91,7 +173,7 @@ shared_examples "basic rendering" do |enabled|
91
173
  end
92
174
 
93
175
  it "renders the home page" do
94
- expect(page).to have_content("Home")
176
+ expect(page).to have_css(".home")
95
177
  end
96
178
 
97
179
  it "has DecidimAwesome object" do
@@ -111,7 +193,7 @@ shared_examples "basic rendering" do |enabled|
111
193
  end
112
194
 
113
195
  it "has custom fields javascript" do
114
- expect(page).to have_xpath("//script[contains(@src,'decidim_decidim_awesome_proposals_custom_fields')]", visible: :all)
196
+ expect(page).to have_xpath("//script[contains(@src,'decidim_decidim_awesome_custom_fields')]", visible: :all)
115
197
  end
116
198
 
117
199
  it "has custom styles CSS" do
@@ -125,7 +207,7 @@ shared_examples "basic rendering" do |enabled|
125
207
  end
126
208
 
127
209
  it "do not have custom fields javascript" do
128
- expect(page).not_to have_xpath("//script[contains(@src,'decidim_decidim_awesome_proposals_custom_fields')]", visible: :all)
210
+ expect(page).not_to have_xpath("//script[contains(@src,'decidim_decidim_awesome_custom_fields')]", visible: :all)
129
211
  end
130
212
 
131
213
  it "do not have custom styles CSS" do
@@ -143,7 +225,8 @@ shared_examples "basic rendering" do |enabled|
143
225
  "config/styles",
144
226
  "config/proposal_custom_fields",
145
227
  "config/admins",
146
- "menu_hacks",
228
+ "menus/menu/hacks",
229
+ "menus/home_content_block_menu/hacks",
147
230
  "custom_redirects",
148
231
  "config/livechat"
149
232
  ]
@@ -167,32 +250,24 @@ shared_examples "basic rendering" do |enabled|
167
250
 
168
251
  if enabled
169
252
  it "renders the editors page" do
170
- expect(page).to have_content("Tweaks for editors")
171
- end
172
-
173
- it "has custom fields javascript" do
174
- expect(page).to have_xpath("//script[contains(@src,'decidim_admin_decidim_awesome_custom_fields')]", visible: :all)
253
+ expect(page).to have_content("Tweaks for Editor Hacks")
175
254
  end
176
255
 
177
256
  it "has all admin menus" do
178
257
  menus.each do |menu|
179
- within ".secondary-nav" do
258
+ within ".sidebar-menu" do
180
259
  expect(page).to have_link(href: "/admin/decidim_awesome/#{menu}")
181
260
  end
182
261
  end
183
262
  end
184
263
  else
185
264
  it "renders the compatibility checks page" do
186
- expect(page).to have_content("System compatibility checks")
187
- end
188
-
189
- it "do not have custom fields javascript" do
190
- expect(page).not_to have_xpath("//script[contains(@src,'decidim_admin_decidim_awesome_custom_fields')]", visible: :all)
265
+ expect(page).to have_content("Maintenance tools: System Compatibility Checks")
191
266
  end
192
267
 
193
268
  it "has no admin menus" do
194
269
  menus.each do |menu|
195
- within ".secondary-nav" do
270
+ within ".sidebar-menu" do
196
271
  expect(page).not_to have_link(href: "/admin/decidim_awesome/#{menu}")
197
272
  end
198
273
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  # This holds the decidim-decidim_awesome version.
5
5
  module DecidimAwesome
6
- VERSION = "0.10.2"
7
- COMPAT_DECIDIM_VERSION = [">= 0.26.0", "< 0.28"].freeze
6
+ VERSION = "0.11.1"
7
+ COMPAT_DECIDIM_VERSION = [">= 0.28.0", "< 0.29"].freeze
8
8
  end
9
9
  end
@@ -4,12 +4,7 @@ module Decidim
4
4
  module DecidimAwesome
5
5
  class VotingManifest
6
6
  include ActiveModel::Model
7
- # From 0.27 onwards, Virtus is deprecated
8
- if defined? Decidim::AttributeObject::Model
9
- include Decidim::AttributeObject::Model
10
- else
11
- include Virtus.model
12
- end
7
+ include Decidim::AttributeObject::Model
13
8
 
14
9
  attribute :name, Symbol
15
10
 
@@ -17,12 +12,12 @@ module Decidim
17
12
  # not defining it will use the original view from Decidim
18
13
  # setting it to an empty string will hide the original content
19
14
 
20
- # original is decidim-proposals/app/views/proposals/proposals/_vote_button.html.erb
15
+ # original is decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb
21
16
  attribute :show_vote_button_view, String
22
- # original is decidim-proposals/app/views/proposals/proposals/_votes_count.html.erb
17
+ # original is decidim-proposals/app/views/decidim/proposals/proposals/_votes_count.html.erb
23
18
  attribute :show_votes_count_view, String
24
- # original is decidim-proposals/app/cells/proposals/proposal_m/footer.erb
25
- attribute :proposal_m_cell_footer, String
19
+ # original is from decidim-proposals/app/cells/decidim/proposals/proposal_metadata_cell.rb
20
+ attribute :proposal_metadata_cell, String
26
21
 
27
22
  # a callback that will be called by the method valid_weight?
28
23
  # Do not access this parameter directly, use the weight_validator method to register a block
@@ -14,9 +14,8 @@ require "decidim/decidim_awesome/iframe_component/component"
14
14
  require "decidim/decidim_awesome/content_parsers/editor_images_parser"
15
15
 
16
16
  # Engines to handle logic unrelated to participatory spaces or components
17
-
18
17
  Decidim.register_global_engine(
19
18
  :decidim_decidim_awesome, # this is the name of the global method to access engine routes
20
- ::Decidim::DecidimAwesome::Engine,
19
+ Decidim::DecidimAwesome::Engine,
21
20
  at: "/decidim_awesome"
22
21
  )
@@ -28,7 +28,7 @@ namespace :decidim_awesome do
28
28
  cw_attribute: "image",
29
29
  cw_uploader: Decidim::Cw::DecidimAwesome::ImageUploader,
30
30
  as_attribute: "file",
31
- logger: logger
31
+ logger:
32
32
  )
33
33
  end
34
34
  end
@@ -4,6 +4,10 @@ Rake::Task["decidim:webpacker:install"].enhance do
4
4
  Rake::Task["decidim_decidim_awesome:webpacker:install"].invoke
5
5
  end
6
6
 
7
+ Rake::Task["decidim:choose_target_plugins"].enhance do
8
+ ENV["FROM"] = "#{ENV.fetch("FROM", nil)},decidim_decidim_awesome"
9
+ end
10
+
7
11
  Rake::Task["decidim:webpacker:upgrade"].enhance do
8
12
  Rake::Task["decidim_decidim_awesome:webpacker:install"].invoke
9
13
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decidim-module-decidim_awesome",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "Mods and tweaks for Decidim",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -12,7 +12,9 @@
12
12
  "lint": "eslint -c .eslintrc.json --ext .js app/packs/",
13
13
  "lint-fix": "eslint -c .eslintrc.json --ext .js app/packs/ --fix",
14
14
  "stylelint": "stylelint **/*.scss",
15
- "stylelint-fix": "stylelint **/*.scss --fix"
15
+ "stylelint-fix": "stylelint **/*.scss --fix",
16
+ "prettier": "prettier --check '**/*.scss'",
17
+ "prettify": "prettier --write '**/*.scss'"
16
18
  },
17
19
  "repository": {
18
20
  "type": "git",
@@ -21,50 +23,39 @@
21
23
  "keywords": [
22
24
  "decidim"
23
25
  ],
24
- "author": "ivan@platoniq.net",
26
+ "author": "ivan@pokecode.net",
25
27
  "license": "AGPL-3.0-or-later",
26
28
  "bugs": {
27
29
  "url": "https://github.com/decidim-ice/decidim-module-decidim_awesome/issues"
28
30
  },
29
31
  "homepage": "https://github.com/decidim-ice/decidim-module-decidim_awesome#readme",
30
32
  "stylelint": {
31
- "extends": "@decidim/stylelint-config",
32
- "rules": {
33
- "block-opening-brace-space-before": "always"
34
- }
33
+ "extends": "@decidim/stylelint-config"
35
34
  },
35
+ "prettier": "@decidim/prettier-config",
36
36
  "devDependencies": {
37
- "@babel/eslint-parser": "^7.19.1",
38
- "@babel/plugin-proposal-class-properties": "^7.18.6",
39
- "@babel/plugin-proposal-private-methods": "^7.18.6",
40
- "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
41
- "@babel/plugin-transform-classes": "^7.20.7",
42
- "@babel/plugin-transform-regenerator": "^7.20.5",
43
- "@babel/plugin-transform-runtime": "^7.19.6",
44
- "@babel/preset-env": "^7.20.2",
45
- "@babel/preset-react": "^7.18.6",
46
- "@decidim/dev": "0.27.4",
47
- "@decidim/eslint-config": "0.27.4",
48
- "@decidim/stylelint-config": "0.27.4",
49
- "eslint-config-prettier": "^8.2.0",
50
- "eslint-config-standard": "^11.0.0",
51
- "eslint-plugin-import": "^2.22.0",
52
- "eslint-plugin-standard": "^3.1.0",
37
+ "@babel/eslint-parser": "^7.23.10",
38
+ "@babel/plugin-transform-classes": "^7.23.8",
39
+ "@babel/plugin-transform-regenerator": "^7.23.3",
40
+ "@babel/plugin-transform-runtime": "^7.23.9",
41
+ "@babel/preset-env": "^7.23.9",
42
+ "@babel/preset-react": "^7.23.3",
43
+ "@decidim/dev": "0.28.0",
44
+ "@decidim/eslint-config": "0.28.0",
45
+ "@decidim/prettier-config": "0.28.0",
46
+ "@decidim/stylelint-config": "0.28.0",
47
+ "postcss-scss": "^4.0.9",
53
48
  "sass-embedded": "~1.57.1"
54
49
  },
55
50
  "dependencies": {
56
51
  "@rails/actioncable": "^6.1.7-6",
57
52
  "codemirror": "^5.65.0",
58
- "europa": "^4.0.0",
59
53
  "form-storage": "^1.3.5",
60
- "formBuilder": "^3.6.1",
54
+ "formBuilder": "^3.19.12",
61
55
  "highlight.js": "^11.4.0",
62
- "inline-attachment": "^2.0.3",
63
- "inscrybmde": "^1.11.6",
64
- "jquery-ui": "^1.13.0",
56
+ "inline-attacher": "^0.0.7",
65
57
  "jsrender": "^1.0.9",
66
58
  "leaflet.featuregroup.subgroup": "^1.0.2",
67
- "marked": "^5.1.2",
68
- "select2": "^4.1.0-rc.0"
59
+ "tom-select": "2.2.2"
69
60
  }
70
61
  }