decidim-core 0.29.6 → 0.30.0.rc1

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 (607) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/activity/show.erb +6 -6
  3. data/app/cells/decidim/address/show.erb +3 -3
  4. data/app/cells/decidim/amendable/amend_button_card/show.erb +6 -4
  5. data/app/cells/decidim/amendable/amend_button_card_cell.rb +8 -0
  6. data/app/cells/decidim/amendable/amendments/show.erb +1 -1
  7. data/app/cells/decidim/amendable/promote_button_card/show.erb +2 -0
  8. data/app/cells/decidim/author/flag.erb +6 -0
  9. data/app/cells/decidim/author/flag_user.erb +14 -0
  10. data/app/cells/decidim/author/show.erb +2 -6
  11. data/app/cells/decidim/author_cell.rb +1 -11
  12. data/app/cells/decidim/card_l/extra_data.erb +1 -0
  13. data/app/cells/decidim/card_metadata_cell.rb +9 -16
  14. data/app/cells/decidim/comments_button_cell.rb +14 -2
  15. data/app/cells/decidim/content_blocks/highlighted_elements_cell.rb +2 -0
  16. data/app/cells/decidim/content_blocks/highlighted_elements_with_cell_for_list_cell.rb +1 -1
  17. data/app/cells/decidim/content_blocks/participatory_space_extra_data/extra_data.erb +2 -2
  18. data/app/cells/decidim/content_blocks/participatory_space_main_data/title.erb +2 -11
  19. data/app/cells/decidim/endorsement_block/show.erb +0 -1
  20. data/app/cells/decidim/endorsement_block_cell.rb +6 -0
  21. data/app/cells/decidim/endorsement_buttons/button_content.erb +1 -1
  22. data/app/cells/decidim/endorsement_buttons/select_identity_button.erb +1 -1
  23. data/app/cells/decidim/endorsement_buttons/show.erb +7 -7
  24. data/app/cells/decidim/endorsement_buttons/verification_modal.erb +4 -2
  25. data/app/cells/decidim/endorsers_list/empty.erb +3 -0
  26. data/app/cells/decidim/endorsers_list/full.erb +17 -5
  27. data/app/cells/decidim/endorsers_list/show.erb +19 -10
  28. data/app/cells/decidim/endorsers_list_cell.rb +19 -6
  29. data/app/cells/decidim/flag_modal/flag_user.erb +34 -0
  30. data/app/cells/decidim/flag_modal/show.erb +52 -0
  31. data/app/cells/decidim/flag_modal_cell.rb +56 -0
  32. data/app/cells/decidim/follow_button/show.erb +1 -2
  33. data/app/cells/decidim/follow_button_cell.rb +5 -0
  34. data/app/cells/decidim/footer_topics/show.erb +2 -2
  35. data/app/cells/decidim/group_admins/show.erb +1 -3
  36. data/app/cells/decidim/group_members/show.erb +2 -6
  37. data/app/cells/decidim/images_panel/show.erb +2 -5
  38. data/app/cells/decidim/map/show.erb +3 -0
  39. data/app/cells/decidim/map/template.erb +14 -0
  40. data/app/cells/decidim/map_cell.rb +39 -0
  41. data/app/cells/decidim/notification_actions/buttons_cell.rb +1 -1
  42. data/app/cells/decidim/onboarding_action_message/show.erb +15 -0
  43. data/app/cells/decidim/onboarding_action_message_cell.rb +81 -0
  44. data/app/cells/decidim/participatory_space_dropdown_metadata/metadata.erb +4 -4
  45. data/app/cells/decidim/participatory_space_dropdown_metadata/show.erb +3 -5
  46. data/app/cells/decidim/participatory_space_private_user/show.erb +23 -0
  47. data/app/cells/decidim/participatory_space_private_user_cell.rb +21 -0
  48. data/app/cells/decidim/profile/avatar.erb +2 -0
  49. data/app/cells/decidim/profile/badge.erb +3 -3
  50. data/app/cells/decidim/profile/details.erb +1 -2
  51. data/app/cells/decidim/profile_actions/show.erb +1 -1
  52. data/app/cells/decidim/profile_sidebar/show.erb +167 -0
  53. data/app/cells/decidim/profile_sidebar_cell.rb +68 -0
  54. data/app/cells/decidim/progress_bar/show.erb +2 -2
  55. data/app/cells/decidim/report_button/already_reported_modal.erb +2 -2
  56. data/app/cells/decidim/report_button/flag_modal.erb +36 -24
  57. data/app/cells/decidim/report_button_cell.rb +9 -2
  58. data/app/cells/decidim/resource_history/show.erb +20 -0
  59. data/app/cells/decidim/resource_history_cell.rb +66 -0
  60. data/app/cells/decidim/resource_types_filter/show.erb +1 -1
  61. data/app/cells/decidim/resource_types_filter_cell.rb +6 -6
  62. data/app/cells/decidim/share_button_cell.rb +0 -4
  63. data/app/cells/decidim/share_widget/modal.erb +26 -0
  64. data/app/cells/decidim/share_widget/show.erb +2 -0
  65. data/app/cells/decidim/share_widget_cell.rb +20 -0
  66. data/app/cells/decidim/tags/show.erb +7 -4
  67. data/app/cells/decidim/tags_cell.rb +11 -72
  68. data/app/cells/decidim/upload_modal/files.erb +4 -4
  69. data/app/cells/decidim/upload_modal_cell.rb +3 -5
  70. data/app/cells/decidim/user_activity/show.erb +1 -1
  71. data/app/cells/decidim/user_activity_cell.rb +1 -6
  72. data/app/commands/decidim/amendable/accept.rb +1 -2
  73. data/app/commands/decidim/amendable/create_draft.rb +2 -2
  74. data/app/commands/decidim/create_ephemeral_user.rb +52 -0
  75. data/app/commands/decidim/create_omniauth_registration.rb +21 -17
  76. data/app/commands/decidim/create_report.rb +8 -11
  77. data/app/commands/decidim/create_user_group.rb +6 -2
  78. data/app/commands/decidim/destroy_ephemeral_user.rb +47 -0
  79. data/app/commands/decidim/invite_user.rb +1 -1
  80. data/app/commands/decidim/search.rb +0 -14
  81. data/app/commands/decidim/update_account.rb +11 -3
  82. data/app/commands/decidim/update_notifications_settings.rb +1 -0
  83. data/app/commands/decidim/update_resources_taxonomies.rb +67 -0
  84. data/app/commands/decidim/update_user_group.rb +7 -1
  85. data/app/constraints/decidim/current_component.rb +1 -1
  86. data/app/controllers/concerns/decidim/ajax_permission_handler.rb +21 -0
  87. data/app/controllers/concerns/decidim/devise_authentication_methods.rb +3 -6
  88. data/app/controllers/concerns/decidim/devise_controllers.rb +2 -0
  89. data/app/controllers/concerns/decidim/disable_redirection_to_external_host.rb +1 -1
  90. data/app/controllers/concerns/decidim/ephemeral_session_checker.rb +87 -0
  91. data/app/controllers/concerns/decidim/filter_resource.rb +4 -2
  92. data/app/controllers/concerns/decidim/has_members_page.rb +25 -0
  93. data/app/controllers/concerns/decidim/locale_switcher.rb +2 -2
  94. data/app/controllers/concerns/decidim/needs_password_change.rb +0 -1
  95. data/app/controllers/concerns/decidim/needs_permission.rb +2 -1
  96. data/app/controllers/concerns/decidim/needs_tos_accepted.rb +4 -5
  97. data/app/controllers/concerns/decidim/onboarding_action_methods.rb +52 -0
  98. data/app/controllers/concerns/decidim/participatory_space_context.rb +1 -4
  99. data/app/controllers/decidim/amendments_controller.rb +3 -3
  100. data/app/controllers/decidim/application_controller.rb +9 -0
  101. data/app/controllers/decidim/authorization_modals_controller.rb +8 -2
  102. data/app/controllers/decidim/components/base_controller.rb +3 -7
  103. data/app/controllers/decidim/devise/confirmations_controller.rb +4 -0
  104. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +8 -1
  105. data/app/controllers/decidim/devise/registrations_controller.rb +1 -1
  106. data/app/controllers/decidim/devise/sessions_controller.rb +2 -0
  107. data/app/controllers/decidim/download_your_data_controller.rb +33 -2
  108. data/app/controllers/decidim/editor_images_controller.rb +1 -11
  109. data/app/controllers/decidim/follows_controller.rb +1 -1
  110. data/app/controllers/decidim/geolocation_controller.rb +19 -0
  111. data/app/controllers/decidim/homepage_controller.rb +0 -1
  112. data/app/controllers/decidim/open_data_controller.rb +33 -8
  113. data/app/controllers/decidim/profiles_controller.rb +2 -2
  114. data/app/controllers/decidim/reports_controller.rb +2 -7
  115. data/app/controllers/decidim/user_activities_controller.rb +1 -1
  116. data/app/controllers/decidim/user_conversations_controller.rb +1 -11
  117. data/app/events/decidim/soft_delete_resource_event.rb +15 -0
  118. data/app/forms/decidim/account_form.rb +2 -5
  119. data/app/forms/decidim/amendable/form.rb +4 -2
  120. data/app/forms/decidim/ephemeral_user_form.rb +22 -0
  121. data/app/forms/decidim/notifications_settings_form.rb +1 -0
  122. data/app/forms/decidim/omniauth_registration_form.rb +15 -2
  123. data/app/forms/decidim/registration_form.rb +1 -1
  124. data/app/forms/decidim/user_group_form.rb +0 -2
  125. data/app/helpers/concerns/decidim/flash_helper_extensions.rb +17 -2
  126. data/app/helpers/decidim/action_authorization_helper.rb +75 -14
  127. data/app/helpers/decidim/amendments_helper.rb +1 -11
  128. data/app/helpers/decidim/application_helper.rb +6 -2
  129. data/app/helpers/decidim/breadcrumb_helper.rb +6 -0
  130. data/app/helpers/decidim/cache_helper.rb +1 -1
  131. data/app/helpers/decidim/check_boxes_tree_helper.rb +25 -53
  132. data/app/helpers/decidim/decidim_form_helper.rb +0 -44
  133. data/app/helpers/decidim/endorsable_helper.rb +0 -10
  134. data/app/helpers/decidim/filters_helper.rb +0 -25
  135. data/app/helpers/decidim/layout_helper.rb +6 -6
  136. data/app/helpers/decidim/map_helper.rb +1 -1
  137. data/app/helpers/decidim/menu_helper.rb +2 -2
  138. data/app/helpers/decidim/messaging/conversation_helper.rb +2 -3
  139. data/app/helpers/decidim/meta_tags_helper.rb +32 -23
  140. data/app/helpers/decidim/modal_helper.rb +23 -0
  141. data/app/helpers/decidim/omniauth_helper.rb +5 -5
  142. data/app/helpers/decidim/onboarding_action_helper.rb +13 -0
  143. data/app/helpers/decidim/orders_helper.rb +1 -2
  144. data/app/helpers/decidim/paginate_helper.rb +1 -1
  145. data/app/helpers/decidim/participatory_space_helpers.rb +1 -1
  146. data/app/helpers/decidim/passwords_helper.rb +2 -2
  147. data/app/helpers/decidim/taxonomies_helper.rb +40 -0
  148. data/app/helpers/decidim/tooltip_helper.rb +1 -4
  149. data/app/jobs/decidim/download_your_data_export_job.rb +2 -19
  150. data/app/jobs/decidim/event_publisher_job.rb +18 -9
  151. data/app/jobs/decidim/export_job.rb +5 -1
  152. data/app/jobs/decidim/export_participatory_space_job.rb +4 -1
  153. data/app/jobs/decidim/open_data_job.rb +4 -4
  154. data/app/mailers/decidim/export_mailer.rb +7 -12
  155. data/app/mailers/decidim/notifications_digest_mailer.rb +1 -7
  156. data/app/mailers/decidim/reported_mailer.rb +2 -18
  157. data/app/models/decidim/action_log.rb +20 -1
  158. data/app/models/decidim/category.rb +4 -0
  159. data/app/models/decidim/component.rb +25 -3
  160. data/app/models/decidim/metric.rb +2 -1
  161. data/app/models/decidim/moderation.rb +16 -0
  162. data/app/models/decidim/newsletter.rb +12 -8
  163. data/app/models/decidim/organization.rb +7 -3
  164. data/app/models/decidim/participatory_space_private_user.rb +20 -0
  165. data/app/models/decidim/private_export.rb +24 -0
  166. data/app/models/decidim/push_notification_message.rb +1 -1
  167. data/app/models/decidim/report.rb +1 -1
  168. data/app/models/decidim/scope.rb +4 -0
  169. data/app/models/decidim/share_token.rb +36 -10
  170. data/app/models/decidim/taxonomization.rb +23 -0
  171. data/app/models/decidim/taxonomy.rb +139 -0
  172. data/app/models/decidim/taxonomy_filter.rb +130 -0
  173. data/app/models/decidim/taxonomy_filter_item.rb +33 -0
  174. data/app/models/decidim/user.rb +13 -23
  175. data/app/models/decidim/user_base_entity.rb +12 -4
  176. data/app/models/decidim/user_moderation.rb +9 -0
  177. data/app/models/decidim/user_report.rb +4 -0
  178. data/app/packs/entrypoints/decidim_core.js +1 -0
  179. data/app/packs/entrypoints/decidim_geocoding.js +2 -0
  180. data/app/packs/images/decidim/brands/facebook.svg +10 -0
  181. data/app/packs/images/decidim/brands/google.svg +7 -1
  182. data/app/packs/images/decidim/brands/twitter-x.svg +3 -0
  183. data/app/packs/images/decidim/default-avatar.svg +1 -1
  184. data/app/packs/src/decidim/callout.js +8 -13
  185. data/app/packs/src/decidim/check_boxes_tree.js +0 -1
  186. data/app/packs/src/decidim/clipboard.js +18 -9
  187. data/app/packs/src/decidim/datepicker/datepicker_functions.js +3 -3
  188. data/app/packs/src/decidim/datepicker/generate_datepicker.js +0 -2
  189. data/app/packs/src/decidim/datepicker/generate_timepicker.js +0 -2
  190. data/app/packs/src/decidim/decidim_application.js +1 -0
  191. data/app/packs/src/decidim/direct_uploads/upload_field.js +4 -3
  192. data/app/packs/src/decidim/direct_uploads/upload_modal.js +9 -8
  193. data/app/packs/src/decidim/editor/common/suggestion.js +1 -11
  194. data/app/packs/src/decidim/form_filter.js +0 -6
  195. data/app/packs/src/decidim/geocoding/reverse_geocoding.js +60 -0
  196. data/app/packs/src/decidim/index.js +9 -5
  197. data/app/packs/src/decidim/input_character_counter.js +1 -1
  198. data/app/packs/src/decidim/map/provider/here.js +1 -1
  199. data/app/packs/src/decidim/onboarding_pending_action.js +24 -0
  200. data/app/packs/src/decidim/sticky_footer.js +29 -0
  201. data/app/packs/src/decidim/sticky_header.js +6 -31
  202. data/app/packs/src/decidim/user_registrations.js +13 -0
  203. data/app/packs/src/decidim/vendor/leaflet-tilelayer-here.js +212 -0
  204. data/app/packs/stylesheets/decidim/_accordion.scss +30 -0
  205. data/app/packs/stylesheets/decidim/_activity.scss +4 -4
  206. data/app/packs/stylesheets/decidim/_author.scss +0 -8
  207. data/app/packs/stylesheets/decidim/_buttons.scss +19 -0
  208. data/app/packs/stylesheets/decidim/_cards.scss +1 -9
  209. data/app/packs/stylesheets/decidim/_content_blocks.scss +0 -4
  210. data/app/packs/stylesheets/decidim/_dropdown.scss +1 -1
  211. data/app/packs/stylesheets/decidim/_endorsers_list.scss +26 -20
  212. data/app/packs/stylesheets/decidim/_filters.scss +1 -1
  213. data/app/packs/stylesheets/decidim/_forms.scss +2 -2
  214. data/app/packs/stylesheets/decidim/_header.scss +39 -70
  215. data/app/packs/stylesheets/decidim/_layout.scss +34 -4
  216. data/app/packs/stylesheets/decidim/_login.scss +53 -6
  217. data/app/packs/stylesheets/decidim/_modal.scss +47 -1
  218. data/app/packs/stylesheets/decidim/_modal_tos_refuse.scss +4 -0
  219. data/app/packs/stylesheets/decidim/_modal_update.scss +1 -5
  220. data/app/packs/stylesheets/decidim/_participatory_spaces.scss +46 -0
  221. data/app/packs/stylesheets/decidim/_profile.scss +7 -7
  222. data/app/packs/stylesheets/decidim/_success_image.scss +64 -0
  223. data/app/packs/stylesheets/decidim/_tribute.scss +36 -0
  224. data/app/packs/stylesheets/decidim/application.scss +1 -1
  225. data/app/packs/stylesheets/decidim/editor.scss +1 -3
  226. data/app/packs/stylesheets/decidim/geocoding_addons.scss +5 -0
  227. data/app/packs/stylesheets/decidim/map.scss +7 -10
  228. data/app/packs/stylesheets/decidim/resource_history.scss +31 -0
  229. data/app/permissions/decidim/default_permissions.rb +0 -2
  230. data/app/permissions/decidim/permissions.rb +9 -15
  231. data/app/presenters/decidim/admin_log/base_user_presenter.rb +67 -0
  232. data/app/presenters/decidim/admin_log/component_presenter.rb +32 -3
  233. data/app/presenters/decidim/admin_log/moderation_presenter.rb +30 -3
  234. data/app/presenters/decidim/admin_log/share_token_presenter.rb +39 -0
  235. data/app/presenters/decidim/admin_log/taxonomy_filter_presenter.rb +57 -0
  236. data/app/presenters/decidim/admin_log/taxonomy_presenter.rb +48 -0
  237. data/app/presenters/decidim/admin_log/user_group_presenter.rb +6 -6
  238. data/app/presenters/decidim/admin_log/user_presenter.rb +4 -18
  239. data/app/presenters/decidim/log/user_presenter.rb +0 -1
  240. data/app/presenters/decidim/log/value_types/date_presenter.rb +1 -0
  241. data/app/presenters/decidim/log/value_types/taxonomy_presenter.rb +29 -0
  242. data/app/presenters/decidim/notification_to_mailer_presenter.rb +3 -7
  243. data/app/presenters/decidim/participatory_space_private_user_presenter.rb +50 -0
  244. data/app/presenters/decidim/taxonomy_filter_presenter.rb +19 -0
  245. data/app/presenters/decidim/taxonomy_presenter.rb +14 -0
  246. data/app/presenters/decidim/user_presenter.rb +1 -1
  247. data/app/queries/decidim/last_activity.rb +0 -25
  248. data/app/queries/decidim/metrics/blocked_users_metric_manage.rb +2 -2
  249. data/app/queries/decidim/metrics/users_metric_manage.rb +2 -2
  250. data/app/queries/decidim/public_activities.rb +1 -12
  251. data/app/queries/decidim/stats_users_count.rb +2 -2
  252. data/app/resolvers/decidim/meta_image_url_resolver.rb +128 -0
  253. data/app/serializers/decidim/exporters/open_data_blocked_user_serializer.rb +25 -0
  254. data/app/serializers/decidim/exporters/open_data_metric_serializer.rb +22 -0
  255. data/app/serializers/decidim/exporters/open_data_moderation_serializer.rb +30 -0
  256. data/app/serializers/decidim/exporters/open_data_taxonomy_serializer.rb +30 -0
  257. data/app/serializers/decidim/exporters/open_data_user_group_serializer.rb +38 -0
  258. data/app/serializers/decidim/exporters/open_data_user_serializer.rb +39 -0
  259. data/app/serializers/decidim/exporters/participatory_space_serializer.rb +104 -0
  260. data/app/serializers/decidim/exporters/serializer.rb +25 -0
  261. data/app/serializers/decidim/schema_org_breadcrumb_list_serializer.rb +52 -0
  262. data/app/services/decidim/action_authorizer.rb +32 -3
  263. data/app/services/decidim/base_diff_renderer.rb +1 -3
  264. data/app/services/decidim/download_your_data_exporter.rb +58 -24
  265. data/app/services/decidim/onboarding_manager.rb +272 -0
  266. data/app/services/decidim/open_data_exporter.rb +139 -13
  267. data/app/services/decidim/static_map_generator.rb +1 -1
  268. data/app/services/decidim/traceability.rb +13 -0
  269. data/app/uploaders/decidim/application_uploader.rb +1 -1
  270. data/app/validators/etiquette_validator.rb +9 -2
  271. data/app/validators/passthru_validator.rb +1 -1
  272. data/app/validators/password_validator.rb +1 -3
  273. data/app/validators/translated_etiquette_validator.rb +32 -0
  274. data/app/views/decidim/account/_password_fields.html.erb +2 -2
  275. data/app/views/decidim/application/_accordion_section.html.erb +14 -0
  276. data/app/views/decidim/application/_collection.html.erb +30 -18
  277. data/app/views/decidim/application/_document.html.erb +2 -2
  278. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +5 -1
  279. data/app/views/decidim/devise/omniauth_registrations/new_tos_fields.html.erb +29 -0
  280. data/app/views/decidim/devise/registrations/new.html.erb +10 -22
  281. data/app/views/decidim/devise/sessions/new.html.erb +24 -29
  282. data/app/views/decidim/devise/shared/_omniauth_buttons.html.erb +2 -4
  283. data/app/views/decidim/devise/shared/_tos_fields.html.erb +16 -0
  284. data/app/views/decidim/download_your_data/_export.html.erb +15 -0
  285. data/app/views/decidim/download_your_data/show.html.erb +51 -5
  286. data/app/views/decidim/endorsements/update_buttons_and_counters.js.erb +16 -19
  287. data/app/views/decidim/errors/internal_server_error.html.erb +1 -1
  288. data/app/views/decidim/errors/not_found.html.erb +1 -1
  289. data/app/views/decidim/export_mailer/download_your_data_export.html.erb +2 -2
  290. data/app/views/decidim/export_mailer/export.html.erb +5 -1
  291. data/app/views/decidim/last_activities/index.html.erb +1 -1
  292. data/app/views/decidim/messaging/conversations/_reply_form.html.erb +2 -1
  293. data/app/views/decidim/messaging/conversations/_start.html.erb +1 -1
  294. data/app/views/decidim/newsletters/unsubscribe.html.erb +4 -16
  295. data/app/views/decidim/notifications_settings/show.html.erb +22 -0
  296. data/app/views/decidim/open_data/_how_to_open_accordion_section.html.erb +15 -0
  297. data/app/views/decidim/open_data/index.html.erb +108 -0
  298. data/app/views/decidim/pages/show.html.erb +2 -1
  299. data/app/views/decidim/participatory_space_private_users/_participatory_space_private_user.html.erb +1 -0
  300. data/app/views/decidim/reported_mailer/hide.html.erb +9 -0
  301. data/app/views/decidim/reported_mailer/report.html.erb +1 -1
  302. data/app/views/decidim/searches/_count.html.erb +1 -1
  303. data/app/views/decidim/searches/_filters.html.erb +39 -76
  304. data/app/views/decidim/shared/_component_announcement.html.erb +1 -1
  305. data/app/views/decidim/shared/_confirm_modal.html.erb +5 -3
  306. data/app/views/decidim/shared/_filters.html.erb +5 -7
  307. data/app/views/decidim/shared/_login_modal.html.erb +26 -20
  308. data/app/views/decidim/shared/_orders.html.erb +2 -2
  309. data/app/views/decidim/shared/_resource_actions.html.erb +21 -0
  310. data/app/views/decidim/shared/_results_per_page.html.erb +1 -1
  311. data/app/views/decidim/shared/filters/_check_boxes_tree.html.erb +1 -2
  312. data/app/views/decidim/shared/filters/_collection.html.erb +1 -1
  313. data/app/views/decidim/shared/filters/_dropdown_label.html.erb +7 -4
  314. data/app/views/kaminari/decidim/_page.html.erb +1 -1
  315. data/app/views/kaminari/decidim/_paginator.html.erb +1 -1
  316. data/app/views/layouts/decidim/_application.html.erb +1 -2
  317. data/app/views/layouts/decidim/_logo.html.erb +2 -2
  318. data/app/views/layouts/decidim/_logo_mobile.html.erb +1 -1
  319. data/app/views/layouts/decidim/_meta_tags_config.html.erb +6 -11
  320. data/app/views/layouts/decidim/_schema_org_breadcrumb_list.html.erb +3 -0
  321. data/app/views/layouts/decidim/_wrapper.html.erb +15 -9
  322. data/app/views/layouts/decidim/footer/_main.html.erb +1 -1
  323. data/app/views/layouts/decidim/footer/_main_intro.html.erb +1 -1
  324. data/app/views/layouts/decidim/footer/_main_legal.html.erb +1 -1
  325. data/app/views/layouts/decidim/footer/_main_links.html.erb +1 -1
  326. data/app/views/layouts/decidim/footer/_mini.html.erb +2 -2
  327. data/app/views/layouts/decidim/header/_close_ephemeral_session.html.erb +25 -0
  328. data/app/views/layouts/decidim/header/_main.html.erb +14 -10
  329. data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +0 -6
  330. data/app/views/layouts/decidim/header/_main_links_dropdown.html.erb +0 -2
  331. data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +1 -1
  332. data/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb +2 -0
  333. data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_desktop.html.erb +11 -5
  334. data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +5 -5
  335. data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +1 -1
  336. data/app/views/layouts/decidim/shared/_layout_item.html.erb +1 -1
  337. data/config/assets.rb +2 -1
  338. data/config/locales/ar.yml +38 -74
  339. data/config/locales/bg-BG.yml +2 -2
  340. data/config/locales/bg.yml +38 -74
  341. data/config/locales/bs-BA.yml +0 -2
  342. data/config/locales/ca.yml +382 -138
  343. data/config/locales/cs.yml +379 -121
  344. data/config/locales/de.yml +370 -133
  345. data/config/locales/el.yml +26 -58
  346. data/config/locales/en.yml +354 -110
  347. data/config/locales/eo.yml +0 -4
  348. data/config/locales/es-MX.yml +368 -127
  349. data/config/locales/es-PY.yml +373 -132
  350. data/config/locales/es.yml +374 -130
  351. data/config/locales/eu.yml +491 -245
  352. data/config/locales/fi-plain.yml +367 -130
  353. data/config/locales/fi.yml +372 -132
  354. data/config/locales/fr-CA.yml +180 -125
  355. data/config/locales/fr-LU.yml +3 -3
  356. data/config/locales/fr.yml +180 -122
  357. data/config/locales/ga-IE.yml +4 -25
  358. data/config/locales/gl.yml +23 -58
  359. data/config/locales/hu.yml +35 -62
  360. data/config/locales/id-ID.yml +24 -57
  361. data/config/locales/is-IS.yml +6 -25
  362. data/config/locales/it.yml +39 -218
  363. data/config/locales/ja.yml +235 -141
  364. data/config/locales/lb-LU.yml +2 -2
  365. data/config/locales/lb.yml +31 -76
  366. data/config/locales/lt.yml +29 -64
  367. data/config/locales/lv.yml +24 -58
  368. data/config/locales/nl.yml +26 -75
  369. data/config/locales/no.yml +26 -70
  370. data/config/locales/pl.yml +35 -72
  371. data/config/locales/pt-BR.yml +44 -63
  372. data/config/locales/pt.yml +26 -70
  373. data/config/locales/ro-RO.yml +118 -183
  374. data/config/locales/ru.yml +16 -43
  375. data/config/locales/sk-SK.yml +3 -3
  376. data/config/locales/sk.yml +27 -72
  377. data/config/locales/sl.yml +0 -4
  378. data/config/locales/sr-CS.yml +0 -2
  379. data/config/locales/sv.yml +141 -133
  380. data/config/locales/tr-TR.yml +32 -75
  381. data/config/locales/uk.yml +8 -29
  382. data/config/locales/zh-CN.yml +24 -68
  383. data/config/locales/zh-TW.yml +28 -62
  384. data/config/routes.rb +4 -10
  385. data/db/migrate/20171212103803_create_unique_nicknames.rb +1 -1
  386. data/db/migrate/20180221101934_fix_nickname_index.rb +1 -1
  387. data/db/migrate/20180706104107_add_nickname_to_managed_users.rb +1 -1
  388. data/db/migrate/20181001124950_move_users_groups_to_users_table.rb +1 -1
  389. data/db/migrate/20181025082245_add_timestamps_to_components.rb +2 -0
  390. data/db/migrate/20190412131728_fix_user_names.rb +1 -1
  391. data/db/migrate/20240628111905_add_visible_to_components.rb +7 -0
  392. data/db/migrate/20240704115429_create_decidim_taxonomies.rb +23 -0
  393. data/db/migrate/20240717093514_add_registered_only_to_decidim_share_tokens.rb +7 -0
  394. data/db/migrate/20240722215500_change_object_changes_on_versions.rb +39 -0
  395. data/db/migrate/20240806065417_create_decidim_taxonomy_filters.rb +23 -0
  396. data/db/migrate/20240822161348_add_deleted_at_to_decidim_components.rb +8 -0
  397. data/db/migrate/20240906162524_add_part_of_to_taxonomies.rb +26 -0
  398. data/db/migrate/20241001135825_add_role_to_participatory_space_private_users.rb +7 -0
  399. data/db/migrate/20241001140408_add_published_to_participatory_space_private_users.rb +7 -0
  400. data/db/migrate/20241022002600_create_private_exports.rb +18 -0
  401. data/db/migrate/20241028114430_add_component_counter_to_taxonomy_filters.rb +7 -0
  402. data/db/migrate/20241111104357_add_names_and_space_boolean_to_taxonomy_filters.rb +9 -0
  403. data/db/migrate/20241127093708_add_taxonomy_to_metrics.rb +7 -0
  404. data/db/migrate/20241204121445_add_participatory_space_manifests_from_taxonomy_filters.rb +9 -0
  405. data/decidim-core.gemspec +14 -17
  406. data/lib/decidim/action_authorization.rb +3 -2
  407. data/lib/decidim/amendable.rb +1 -1
  408. data/lib/decidim/api/input_filters/category_input_filter.rb +5 -3
  409. data/lib/decidim/api/input_filters/component_input_filter.rb +33 -20
  410. data/lib/decidim/api/input_filters/user_entity_input_filter.rb +53 -44
  411. data/lib/decidim/api/input_sorts/component_input_sort.rb +15 -13
  412. data/lib/decidim/api/input_sorts/user_entity_input_sort.rb +4 -4
  413. data/lib/decidim/api/interfaces/author_interface.rb +3 -2
  414. data/lib/decidim/api/interfaces/coauthorable_interface.rb +5 -5
  415. data/lib/decidim/api/interfaces/endorsable_interface.rb +2 -2
  416. data/lib/decidim/api/interfaces/participatory_space_interface.rb +5 -10
  417. data/lib/decidim/api/interfaces/taxonomizable_interface.rb +13 -0
  418. data/lib/decidim/api/types/amendment_type.rb +5 -7
  419. data/lib/decidim/api/types/area_api_type.rb +3 -3
  420. data/lib/decidim/api/types/attachment_type.rb +3 -3
  421. data/lib/decidim/api/types/category_type.rb +2 -2
  422. data/lib/decidim/api/types/decidim_type.rb +5 -1
  423. data/lib/decidim/api/types/fingerprint_type.rb +1 -1
  424. data/lib/decidim/api/types/localized_string_type.rb +1 -1
  425. data/lib/decidim/api/types/metric_history_type.rb +2 -0
  426. data/lib/decidim/api/types/metric_type.rb +1 -1
  427. data/lib/decidim/api/types/organization_type.rb +5 -0
  428. data/lib/decidim/api/types/participatory_space_link_type.rb +2 -2
  429. data/lib/decidim/api/types/participatory_space_manifest_type.rb +1 -1
  430. data/lib/decidim/api/types/quantifiable_translated_field_type.rb +1 -1
  431. data/lib/decidim/api/types/scope_api_type.rb +2 -3
  432. data/lib/decidim/api/types/session_type.rb +1 -2
  433. data/lib/decidim/api/types/taxonomy_type.rb +15 -0
  434. data/lib/decidim/api/types/trace_version_type.rb +2 -2
  435. data/lib/decidim/api/types/translated_field_type.rb +3 -5
  436. data/lib/decidim/api/types/user_group_type.rb +7 -20
  437. data/lib/decidim/api/types/user_type.rb +7 -20
  438. data/lib/decidim/asset_router/storage.rb +10 -15
  439. data/lib/decidim/assets/tailwind/tailwind.config.js.erb +3 -3
  440. data/lib/decidim/attachment_attributes.rb +1 -1
  441. data/lib/decidim/attribute_encryptor.rb +1 -1
  442. data/lib/decidim/attribute_object/nested_validator.rb +1 -1
  443. data/lib/decidim/attributes/integer_with_units.rb +27 -0
  444. data/lib/decidim/attributes/time_with_zone.rb +1 -5
  445. data/lib/decidim/attributes.rb +2 -0
  446. data/lib/decidim/authorization_form_builder.rb +0 -7
  447. data/lib/decidim/coauthorable.rb +1 -1
  448. data/lib/decidim/command.rb +3 -3
  449. data/lib/decidim/commands/destroy_resource.rb +5 -1
  450. data/lib/decidim/commands/resource_handler.rb +2 -2
  451. data/lib/decidim/commands/restore_resource.rb +45 -0
  452. data/lib/decidim/commands/soft_delete_resource.rb +63 -0
  453. data/lib/decidim/component_manifest.rb +7 -0
  454. data/lib/decidim/content_parsers/blob_parser.rb +8 -10
  455. data/lib/decidim/content_parsers/user_parser.rb +1 -1
  456. data/lib/decidim/core/api.rb +2 -0
  457. data/lib/decidim/core/engine.rb +21 -7
  458. data/lib/decidim/core/menu.rb +0 -5
  459. data/lib/decidim/core/seeds.rb +42 -2
  460. data/lib/decidim/core/test/factories.rb +107 -4
  461. data/lib/decidim/core/test/shared_examples/admin_resource_gallery_examples.rb +85 -0
  462. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +0 -4
  463. data/lib/decidim/core/test/shared_examples/comments_examples.rb +393 -38
  464. data/lib/decidim/core/test/shared_examples/components_controller_hide_shared_examples.rb +11 -0
  465. data/lib/decidim/core/test/shared_examples/components_controller_reorder_shared_examples.rb +21 -0
  466. data/lib/decidim/core/test/shared_examples/download_open_data_shared_context.rb +36 -0
  467. data/lib/decidim/core/test/shared_examples/download_open_data_shared_examples.rb +45 -0
  468. data/lib/decidim/core/test/shared_examples/download_your_data_shared_examples.rb +17 -0
  469. data/lib/decidim/core/test/shared_examples/etiquette_validator_examples.rb +25 -0
  470. data/lib/decidim/core/test/shared_examples/follows_examples.rb +43 -0
  471. data/lib/decidim/core/test/shared_examples/has_taxonomies.rb +94 -0
  472. data/lib/decidim/core/test/shared_examples/manage_share_tokens_examples.rb +237 -0
  473. data/lib/decidim/core/test/shared_examples/map_examples.rb +2 -0
  474. data/lib/decidim/core/test/shared_examples/open_data_exporter_examples.rb +102 -0
  475. data/lib/decidim/core/test/shared_examples/participatory_space_members_page_examples.rb +46 -0
  476. data/lib/decidim/core/test/shared_examples/participatory_space_search_examples.rb +98 -0
  477. data/lib/decidim/core/test/shared_examples/permissions.rb +7 -7
  478. data/lib/decidim/core/test/shared_examples/preview_with_share_token_examples.rb +94 -0
  479. data/lib/decidim/core/test/shared_examples/reports_examples.rb +15 -53
  480. data/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +2 -2
  481. data/lib/decidim/core/test/shared_examples/resource_search_examples.rb +75 -69
  482. data/lib/decidim/core/test/shared_examples/searchable_resources_shared_context.rb +1 -1
  483. data/lib/decidim/core/test/shared_examples/simple_event.rb +33 -19
  484. data/lib/decidim/core/test/shared_examples/social_share_examples.rb +7 -14
  485. data/lib/decidim/core/test/shared_examples/softdeleteable_components_examples.rb +173 -0
  486. data/lib/decidim/core/test/shared_examples/system_endorse_resource_examples.rb +54 -8
  487. data/lib/decidim/core/test/shared_examples/taxonomizable_interface_examples.rb +20 -0
  488. data/lib/decidim/core/test/shared_examples/taxonomizable_resource_examples.rb +37 -0
  489. data/lib/decidim/core/test/shared_examples/taxonomy_settings.rb +49 -0
  490. data/lib/decidim/core/test/shared_examples/translated_event_examples.rb +1 -1
  491. data/lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb +0 -26
  492. data/lib/decidim/core/test/shared_examples/versions_controller_examples.rb +2 -28
  493. data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
  494. data/lib/decidim/core/test.rb +9 -5
  495. data/lib/decidim/core/version.rb +1 -1
  496. data/lib/decidim/core.rb +58 -0
  497. data/lib/decidim/download_your_data_serializers/download_your_data_identity_serializer.rb +0 -4
  498. data/lib/decidim/download_your_data_serializers/download_your_data_participatory_space_private_user_serializer.rb +3 -1
  499. data/lib/decidim/download_your_data_serializers/download_your_data_report_serializer.rb +2 -1
  500. data/lib/decidim/download_your_data_serializers/download_your_data_user_serializer.rb +6 -7
  501. data/lib/decidim/download_your_data_serializers.rb +19 -0
  502. data/lib/decidim/exporters/csv.rb +6 -0
  503. data/lib/decidim/exporters/export_manifest.rb +14 -0
  504. data/lib/decidim/exporters/pdf.rb +26 -22
  505. data/lib/decidim/filter_form_builder.rb +12 -15
  506. data/lib/decidim/form_builder.rb +7 -144
  507. data/lib/decidim/has_category.rb +5 -1
  508. data/lib/decidim/has_private_users.rb +4 -0
  509. data/lib/decidim/has_taxonomy_settings.rb +47 -0
  510. data/lib/decidim/has_upload_validations.rb +1 -1
  511. data/lib/decidim/legacy_form_builder.rb +118 -0
  512. data/lib/decidim/maintenance/import_models/application_record.rb +93 -0
  513. data/lib/decidim/maintenance/import_models/area.rb +82 -0
  514. data/lib/decidim/maintenance/import_models/area_type.rb +12 -0
  515. data/lib/decidim/maintenance/import_models/assembly_type.rb +49 -0
  516. data/lib/decidim/maintenance/import_models/categorization.rb +14 -0
  517. data/lib/decidim/maintenance/import_models/category.rb +107 -0
  518. data/lib/decidim/maintenance/import_models/participatory_process_type.rb +21 -0
  519. data/lib/decidim/maintenance/import_models/scope.rb +163 -0
  520. data/lib/decidim/maintenance/import_models.rb +19 -0
  521. data/lib/decidim/maintenance/taxonomy_importer.rb +132 -0
  522. data/lib/decidim/maintenance/taxonomy_plan.rb +78 -0
  523. data/lib/decidim/maintenance.rb +12 -0
  524. data/lib/decidim/map/autocomplete.rb +52 -8
  525. data/lib/decidim/map/dynamic_map.rb +1 -1
  526. data/lib/decidim/map/provider/dynamic_map/here.rb +40 -1
  527. data/lib/decidim/map/provider/geocoding/here.rb +9 -3
  528. data/lib/decidim/map/provider/static_map/here.rb +0 -34
  529. data/lib/decidim/map.rb +3 -6
  530. data/lib/decidim/moderation_tools.rb +16 -19
  531. data/lib/decidim/newsletter_encryptor.rb +1 -1
  532. data/lib/decidim/nicknamizable.rb +9 -6
  533. data/lib/decidim/paddable.rb +1 -1
  534. data/lib/decidim/participable.rb +10 -10
  535. data/lib/decidim/participatory_space_user.rb +10 -0
  536. data/lib/decidim/private_download_helper.rb +15 -0
  537. data/lib/decidim/record_encryptor.rb +51 -46
  538. data/lib/decidim/reportable.rb +2 -6
  539. data/lib/decidim/resourceable.rb +16 -0
  540. data/lib/decidim/seeds.rb +18 -20
  541. data/lib/decidim/settings_manifest.rb +34 -1
  542. data/lib/decidim/soft_deletable.rb +17 -0
  543. data/lib/decidim/taxonomizable.rb +72 -0
  544. data/lib/decidim/translatable_attributes.rb +1 -5
  545. data/lib/decidim/view_model.rb +0 -1
  546. data/lib/tasks/decidim_download_your_data_tasks.rake +2 -4
  547. data/lib/tasks/decidim_procfile.rake +6 -0
  548. data/lib/tasks/decidim_tasks.rake +1 -0
  549. data/lib/tasks/decidim_taxonomies.rake +155 -0
  550. data/lib/tasks/upgrade/{decidim_fix_categorization.rake → clean.rake} +25 -18
  551. data/lib/tasks/upgrade/decidim_active_storage_migration_tasks.rake +1 -1
  552. data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +20 -23
  553. data/lib/tasks/upgrade/migrations.rake +91 -0
  554. metadata +201 -114
  555. data/app/cells/decidim/amendable/amenders_list/show.erb +0 -0
  556. data/app/cells/decidim/author/badge.erb +0 -6
  557. data/app/cells/decidim/content_blocks/base/content.erb +0 -0
  558. data/app/cells/decidim/endorsers_list/full_endorsers_list.erb +0 -3
  559. data/app/cells/decidim/endorsers_list_button/content.erb +0 -1
  560. data/app/cells/decidim/endorsers_list_button_cell.rb +0 -15
  561. data/app/cells/decidim/report_user_button/already_reported_modal.erb +0 -11
  562. data/app/cells/decidim/report_user_button/flag_modal.erb +0 -47
  563. data/app/cells/decidim/report_user_button/show.erb +0 -2
  564. data/app/cells/decidim/report_user_button_cell.rb +0 -59
  565. data/app/cells/decidim/scopes_picker/scope_picker_prompt.erb +0 -3
  566. data/app/cells/decidim/scopes_picker/scope_picker_values.erb +0 -5
  567. data/app/cells/decidim/scopes_picker/show.erb +0 -14
  568. data/app/cells/decidim/scopes_picker_cell.rb +0 -92
  569. data/app/commands/decidim/update_user_interests.rb +0 -41
  570. data/app/controllers/decidim/scopes_controller.rb +0 -84
  571. data/app/controllers/decidim/user_interests_controller.rb +0 -30
  572. data/app/forms/decidim/user_interest_scope_form.rb +0 -25
  573. data/app/forms/decidim/user_interests_form.rb +0 -17
  574. data/app/helpers/decidim/categories_helper.rb +0 -26
  575. data/app/helpers/decidim/scopes_helper.rb +0 -105
  576. data/app/jobs/decidim/hide_child_resources_job.rb +0 -24
  577. data/app/packs/images/decidim/vendor/leaflet/layers-2x.png +0 -0
  578. data/app/packs/images/decidim/vendor/leaflet/layers.png +0 -0
  579. data/app/packs/images/decidim/vendor/leaflet/marker-icon-2x.png +0 -0
  580. data/app/packs/images/decidim/vendor/leaflet/marker-icon.png +0 -0
  581. data/app/packs/images/decidim/vendor/leaflet/marker-shadow.png +0 -0
  582. data/app/packs/src/decidim/dropdown_menu.js +0 -18
  583. data/app/packs/stylesheets/decidim/_hashtags.scss +0 -5
  584. data/app/packs/stylesheets/decidim/legacy/MarkerCluster.Default.scss +0 -67
  585. data/app/packs/stylesheets/decidim/legacy/MarkerCluster.scss +0 -18
  586. data/app/packs/stylesheets/decidim/legacy/leaflet.scss +0 -705
  587. data/app/validators/scope_belongs_to_component_validator.rb +0 -16
  588. data/app/views/decidim/account/_user_groups.html.erb +0 -0
  589. data/app/views/decidim/reported_mailer/hidden_automatically.html.erb +0 -25
  590. data/app/views/decidim/reported_mailer/hidden_manually.html.erb +0 -25
  591. data/app/views/decidim/scopes/_scopes_picker_input.html.erb +0 -19
  592. data/app/views/decidim/scopes/picker.html.erb +0 -53
  593. data/app/views/decidim/shared/_comments.html.erb +0 -0
  594. data/app/views/decidim/shared/_share_modal.html.erb +0 -26
  595. data/app/views/decidim/shared/_tags.html.erb +0 -1
  596. data/app/views/decidim/user_interests/_areas.html.erb +0 -14
  597. data/app/views/decidim/user_interests/_scopes.html.erb +0 -22
  598. data/app/views/decidim/user_interests/show.html.erb +0 -22
  599. data/config/initializers/foundation_rails_helper.rb +0 -4
  600. data/config/locales/ca-IT.yml +0 -2146
  601. data/lib/decidim/core/test/shared_examples/has_category.rb +0 -38
  602. data/lib/decidim/core/test/shared_examples/has_scope.rb +0 -11
  603. data/lib/decidim/core/test/shared_examples/manage_component_share_tokens.rb +0 -83
  604. data/lib/decidim/core/test/shared_examples/preview_component_with_share_token_examples.rb +0 -49
  605. data/lib/decidim/core/test/shared_examples/scope_helper_examples.rb +0 -93
  606. data/lib/decidim/seven_zip_wrapper.rb +0 -29
  607. data/lib/tasks/upgrade/clean_hidden_resources.rake +0 -33
@@ -0,0 +1,29 @@
1
+ // This script add margin to the footer when the sticky CTA Buttons are shown on mobile devices,
2
+ // so the footer is always visible.
3
+ //
4
+ // The sticky buttons show some of the main Call to Actions (CTAs) so that they remain accessible on the
5
+ // screen as the participant scrolls through the detailed view of the Meetings, Proposals, Surveys, and Budgets
6
+ // components.
7
+ //
8
+
9
+ const footer = document.querySelector("footer");
10
+ const stickyButtons = document.querySelector("[data-sticky-buttons]");
11
+
12
+ const adjustCtasButtons = () => {
13
+ if (!stickyButtons) {
14
+ return;
15
+ }
16
+
17
+ const marginBottom = stickyButtons.offsetHeight;
18
+ footer.style.marginBottom = `${marginBottom}px`;
19
+ };
20
+
21
+ if (stickyButtons) {
22
+ document.addEventListener("scroll", () => {
23
+ adjustCtasButtons();
24
+ });
25
+
26
+ document.addEventListener("on:toggle", () => {
27
+ adjustCtasButtons();
28
+ });
29
+ }
@@ -1,33 +1,14 @@
1
- // This script implements the sticky header and the sticky buttons. The sticky header hides when participants scroll down and shows when they scroll up.
2
- // Sticky headers allow users to quickly access the navigation, search, and utility-navigation elements without scrolling up to the top of the page. They increase the discoverability of the elements in the header.
3
- // The sticky buttons in the other hand, those are some of the main Call to Actions (CTAs) that remain accessible on the screen as the user scrolls through the detailed view of the Meetings, Proposals, Surveys, and Budgets components.
1
+ // This script implements the sticky header on mobile devices.
2
+ //
3
+ // The sticky header hides when participants scroll down and shows when they scroll up.
4
+ // Sticky headers allow users to quickly access the navigation, search, and utility-navigation
5
+ // elements without scrolling up to the top of the page. They increase the discoverability of the elements in the header.
6
+ //
4
7
 
5
8
  import { screens } from "tailwindcss/defaultTheme"
6
9
 
7
10
  let prevScroll = window.scrollY;
8
11
  const stickyHeader = document.querySelector("[data-sticky-header]");
9
- const footer = document.querySelector("footer");
10
- const stickyButtons = document.querySelectorAll("[data-sticky-buttons]");
11
-
12
- const isElementInViewport = (element) => {
13
- const rect = element.getBoundingClientRect();
14
- return rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight);
15
- };
16
-
17
- const adjustCtasButtons = () => {
18
- if (!stickyButtons || !stickyButtons.length) {
19
- return;
20
- }
21
-
22
- let visibleButtons = Array.from(stickyButtons).filter(isElementInViewport);
23
-
24
- if (visibleButtons.length > 0) {
25
- const marginBottom = Math.max(...visibleButtons.map((ctasButton) => ctasButton.offsetHeight));
26
- footer.style.marginBottom = `${marginBottom}px`;
27
- } else {
28
- footer.style.marginBottom = 0;
29
- }
30
- };
31
12
 
32
13
  // Fix the menu bar container margin top when there are multiple elements in the sticky header
33
14
  // As there could be different heights and we cannot know beforehand, we need to adjust this in a dynamic way
@@ -76,12 +57,6 @@ if (stickyHeader) {
76
57
  }
77
58
  prevScroll = currentScroll;
78
59
  }
79
-
80
- adjustCtasButtons();
81
60
  }
82
61
  });
83
-
84
- document.addEventListener("on:toggle", () => {
85
- adjustCtasButtons();
86
- });
87
62
  };
@@ -2,6 +2,7 @@ import PasswordToggler from "src/decidim/password_toggler";
2
2
 
3
3
  $(() => {
4
4
  const $userRegistrationForm = $("#register-form");
5
+ const $userOmniauthRegistrationForm = $("#omniauth-register-form");
5
6
  const $userGroupFields = $userRegistrationForm.find(".user-group-fields");
6
7
  const userPassword = document.querySelector(".user-password");
7
8
  const inputSelector = 'input[name="user[sign_up_as]"]';
@@ -19,9 +20,11 @@ $(() => {
19
20
 
20
21
  const checkNewsletter = (check) => {
21
22
  $userRegistrationForm.find(newsletterSelector).prop("checked", check);
23
+ $userOmniauthRegistrationForm.find(newsletterSelector).prop("checked", check);
22
24
  $newsletterModal.data("continue", true);
23
25
  window.Decidim.currentDialogs["sign-up-newsletter-modal"].close()
24
26
  $userRegistrationForm.submit();
27
+ $userOmniauthRegistrationForm.submit();
25
28
  }
26
29
 
27
30
  setGroupFieldsVisibility($userRegistrationForm.find(`${inputSelector}:checked`).val());
@@ -42,6 +45,16 @@ $(() => {
42
45
  }
43
46
  });
44
47
 
48
+ $userOmniauthRegistrationForm.on("submit", (event) => {
49
+ const newsletterChecked = $userOmniauthRegistrationForm.find(newsletterSelector);
50
+ if (!$newsletterModal.data("continue")) {
51
+ if (!newsletterChecked.prop("checked")) {
52
+ event.preventDefault();
53
+ window.Decidim.currentDialogs["sign-up-newsletter-modal"].open()
54
+ }
55
+ }
56
+ });
57
+
45
58
  $newsletterModal.find("[data-check]").on("click", (event) => {
46
59
  checkNewsletter($(event.target).data("check"));
47
60
  });
@@ -0,0 +1,212 @@
1
+ /* eslint-disable */
2
+
3
+ // 🍂class TileLayer.HERE
4
+ // Tile layer for HERE maps tiles.
5
+ L.TileLayer.HERE = L.TileLayer.extend({
6
+
7
+ options: {
8
+ subdomains: '1234',
9
+ minZoom: 2,
10
+ maxZoom: 18,
11
+
12
+ // 🍂option scheme: String = 'normal.day'
13
+ // The "map scheme", as documented in the HERE API.
14
+ scheme: 'normal.day',
15
+
16
+ // 🍂option resource: String = 'maptile'
17
+ // The "map resource", as documented in the HERE API.
18
+ resource: 'maptile',
19
+
20
+ // 🍂option mapId: String = 'newest'
21
+ // Version of the map tiles to be used, or a hash of an unique map
22
+ mapId: 'newest',
23
+
24
+ // 🍂option format: String = 'png8'
25
+ // Image format to be used (`png8`, `png`, or `jpg`)
26
+ format: 'png8',
27
+
28
+ // 🍂option appId: String = ''
29
+ // Required option. The `app_id` provided as part of the HERE credentials
30
+ appId: '',
31
+
32
+ // 🍂option appCode: String = ''
33
+ // Required option. The `app_code` provided as part of the HERE credentials
34
+ appCode: '',
35
+
36
+ // 🍂option useCIT: boolean = false
37
+ // Whether to use the CIT when loading the here-maptiles
38
+ useCIT: false,
39
+
40
+ // 🍂option useHTTPS: boolean = true
41
+ // Whether to use HTTPS when loading the here-maptiles
42
+ useHTTPS: true,
43
+
44
+ // 🍂option language: String = ''
45
+ // The language of the descriptions on the maps that are loaded
46
+ language: '',
47
+
48
+ // 🍂option language: String = ''
49
+ // The second language of the descriptions on the maps that are loaded
50
+ language2: '',
51
+ },
52
+
53
+
54
+ initialize: function initialize(options) {
55
+ options = L.setOptions(this, options);
56
+
57
+ // Decide if this scheme uses the aerial servers or the basemap servers
58
+ var schemeStart = options.scheme.split('.')[0];
59
+ options.tileResolution = 256;
60
+
61
+ // {Base URL}{Path}/{resource (tile type)}/{map id}/{scheme}/{zoom}/{column}/{row}/{size}/{format}
62
+ // ?apiKey={YOUR_API_KEY}
63
+ // &{param}={value}
64
+
65
+ var params = [
66
+ 'apiKey=' + encodeURIComponent(options.apiKey)
67
+ ];
68
+ // Fallback to old app_id,app_code if no apiKey passed
69
+ if(!options.apiKey) {
70
+ params = [
71
+ 'app_id=' + encodeURIComponent(options.appId),
72
+ 'app_code=' + encodeURIComponent(options.appCode),
73
+ ];
74
+ }
75
+ if(options.language) {
76
+ params.push('lg=' + encodeURIComponent(options.language));
77
+ }
78
+ if(options.language2) {
79
+ params.push('lg2=' + encodeURIComponent(options.language2));
80
+ }
81
+ var urlQuery = '?' + params.join('&');
82
+
83
+ var path = '/maptile/2.1/{resource}/{mapId}/{scheme}/{z}/{x}/{y}/{tileResolution}/{format}' + urlQuery;
84
+ var attributionPath = '/maptile/2.1/copyright/{mapId}?apiKey={apiKey}';
85
+
86
+ var baseUrl = 'maps.ls.hereapi.com';
87
+
88
+ // Old style with apiId/apiCode for compatibility
89
+ if(!options.apiKey) {
90
+ // make sure the CIT-url can be used
91
+ baseUrl = 'maps' + (options.useCIT ? '.cit' : '') + '.api.here.com';
92
+ attributionPath = '/maptile/2.1/copyright/{mapId}?app_id={appId}&app_code={appCode}';
93
+ }
94
+
95
+ var tileServer = 'base.' + baseUrl;
96
+ if (schemeStart == 'satellite' || schemeStart == 'terrain' || schemeStart == 'hybrid') {
97
+ tileServer = 'aerial.' + baseUrl;
98
+ }
99
+ if (options.scheme.indexOf('.traffic.') !== -1) {
100
+ tileServer = 'traffic' + baseUrl;
101
+ }
102
+
103
+ var protocol = 'http' + (options.useHTTPS ? 's' : '');
104
+ var tileUrl = protocol + '://{s}.' + tileServer + path;
105
+
106
+ this._attributionUrl = L.Util.template(protocol + '://1.' + tileServer + attributionPath, this.options);
107
+
108
+ L.TileLayer.prototype.initialize.call(this, tileUrl, options);
109
+
110
+ this._attributionText = '';
111
+
112
+ },
113
+
114
+ onAdd: function onAdd(map) {
115
+ L.TileLayer.prototype.onAdd.call(this, map);
116
+
117
+ if (!this._attributionBBoxes) {
118
+ this._fetchAttributionBBoxes();
119
+ }
120
+ },
121
+
122
+ onRemove: function onRemove(map) {
123
+ //
124
+ // Remove the attribution text, and clear the cached text so it will be recalculated
125
+ // if/when we are shown again.
126
+ //
127
+ this._map.attributionControl.removeAttribution(this._attributionText);
128
+ this._attributionText = '';
129
+
130
+ this._map.off('moveend zoomend resetview', this._findCopyrightBBox, this);
131
+
132
+ //
133
+ // Call the prototype last, once we have tidied up our own changes
134
+ //
135
+ L.TileLayer.prototype.onRemove.call(this, map);
136
+ },
137
+
138
+ _fetchAttributionBBoxes: function _onMapMove() {
139
+ var xmlhttp = new XMLHttpRequest();
140
+ xmlhttp.onreadystatechange = L.bind(function(){
141
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
142
+ this._parseAttributionBBoxes(JSON.parse(xmlhttp.responseText));
143
+ }
144
+ }, this);
145
+ xmlhttp.open("GET", this._attributionUrl, true);
146
+ xmlhttp.send();
147
+ },
148
+
149
+ _parseAttributionBBoxes: function _parseAttributionBBoxes(json) {
150
+ if (!this._map) { return; }
151
+ var providers = json[this.options.scheme.split('.')[0]] || json.normal;
152
+ for (var i=0; i<providers.length; i++) {
153
+ if (providers[i].boxes) {
154
+ for (var j=0; j<providers[i].boxes.length; j++) {
155
+ var box = providers[i].boxes[j];
156
+ providers[i].boxes[j] = L.latLngBounds( [ [box[0], box[1]], [box[2], box[3]] ]);
157
+ }
158
+ }
159
+ }
160
+
161
+ this._map.on('moveend zoomend resetview', this._findCopyrightBBox, this);
162
+
163
+ this._attributionProviders = providers;
164
+
165
+ this._findCopyrightBBox();
166
+ },
167
+
168
+ _findCopyrightBBox: function _findCopyrightBBox() {
169
+ if (!this._map) { return; }
170
+ var providers = this._attributionProviders;
171
+ var visibleProviders = [];
172
+ var zoom = this._map.getZoom();
173
+ var visibleBounds = this._map.getBounds();
174
+
175
+ for (var i=0; i<providers.length; i++) {
176
+ if (providers[i].minLevel <= zoom && providers[i].maxLevel >= zoom) {
177
+
178
+ if (!providers[i].boxes) {
179
+ // No boxes = attribution always visible
180
+ visibleProviders.push(providers[i]);
181
+ } else {
182
+ for (var j=0; j<providers[i].boxes.length; j++) {
183
+ var box = providers[i].boxes[j];
184
+ if (visibleBounds.intersects(box)) {
185
+ visibleProviders.push(providers[i]);
186
+ break;
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+
193
+ var attributions = ['<a href="https://legal.here.com/en-gb/terms" target="_blank" rel="noopener noreferrer">HERE maps</a>'];
194
+ for (var i=0; i<visibleProviders.length; i++) {
195
+ var provider = visibleProviders[i];
196
+ attributions.push('<abbr title="' + provider.alt + '">' + provider.label + '</abbr>');
197
+ }
198
+
199
+ var attributionText = '© ' + attributions.join(', ') + '. ';
200
+
201
+ if (attributionText !== this._attributionText) {
202
+ this._map.attributionControl.removeAttribution(this._attributionText);
203
+ this._map.attributionControl.addAttribution(this._attributionText = attributionText);
204
+ }
205
+ },
206
+
207
+ });
208
+
209
+
210
+ L.tileLayer.here = function(opts){
211
+ return new L.TileLayer.HERE(opts);
212
+ }
@@ -11,3 +11,33 @@
11
11
  [id*="comment"][class="comment-reply"][aria-hidden="false"] {
12
12
  display: block;
13
13
  }
14
+
15
+ .card-accordion {
16
+ @apply border-b border-gray-3 mt-6;
17
+
18
+ &-title {
19
+ @apply text-primary font-semibold text-xl inline-block;
20
+ }
21
+
22
+ &-divider-button {
23
+ @apply flex items-center justify-between items-end w-full;
24
+
25
+ svg {
26
+ @apply inline-block w-6 h-6 fill-primary;
27
+ }
28
+
29
+ &[aria-expanded="true"] {
30
+ svg {
31
+ @apply rotate-180 transition-transform;
32
+ }
33
+ }
34
+ }
35
+
36
+ &-section {
37
+ @apply pb-8;
38
+
39
+ ul {
40
+ @apply mb-0;
41
+ }
42
+ }
43
+ }
@@ -12,12 +12,12 @@
12
12
  &__content {
13
13
  @apply col-span-2 md:col-span-1 order-first md:order-none space-y-2;
14
14
 
15
- > div:first-child {
16
- p {
17
- @apply text-gray-2 text-sm inline-block;
15
+ > span:first-child {
16
+ span {
17
+ @apply text-gray-2 text-sm;
18
18
 
19
19
  svg {
20
- @apply text-gray fill-current inline;
20
+ @apply text-gray fill-current;
21
21
  }
22
22
  }
23
23
 
@@ -14,10 +14,6 @@
14
14
 
15
15
  &-container {
16
16
  @apply rounded-full overflow-hidden inline-block w-6 h-6 align-top;
17
-
18
- &:focus-within {
19
- @apply ring-2 ring-primary;
20
- }
21
17
  }
22
18
 
23
19
  &-counter {
@@ -33,10 +29,6 @@
33
29
  @apply text-secondary font-semibold;
34
30
  }
35
31
 
36
- &__badge svg {
37
- @apply grid overflow-hidden place-items-center bg-primary rounded-full w-4 h-4 text-white fill-current;
38
- }
39
-
40
32
  &__metadata {
41
33
  @apply flex items-center gap-1 text-gray-2 text-sm;
42
34
 
@@ -98,3 +98,22 @@
98
98
  @apply rounded-full bg-secondary text-white inline-grid place-items-center h-[18px] w-[18px] ml-2 text-xs;
99
99
  }
100
100
  }
101
+
102
+ .layout-main__buttons {
103
+ .button {
104
+ &__sm {
105
+ @apply text-2xl [&:not([class*="button\\_\\_text"])]:px-1.5 [&:not([class*="button\\_\\_text"])]:py-1.5 gap-1.5
106
+ lg:text-sm lg:[&:not([class*="button\\_\\_text"])]:px-4;
107
+
108
+ span {
109
+ @apply hidden lg:flex;
110
+ }
111
+ }
112
+
113
+ &__transparent {
114
+ &-secondary {
115
+ @apply p-0 border-0 lg:border lg:border-secondary;
116
+ }
117
+ }
118
+ }
119
+ }
@@ -59,11 +59,7 @@
59
59
  }
60
60
 
61
61
  &-title {
62
- @apply h4;
63
- }
64
-
65
- a &-title {
66
- @apply text-secondary;
62
+ @apply h4 text-secondary;
67
63
 
68
64
  overflow: hidden;
69
65
  display: -webkit-box;
@@ -168,10 +164,6 @@
168
164
  svg {
169
165
  @apply flex-none text-gray fill-current;
170
166
  }
171
-
172
- [data-author] {
173
- @apply flex first:[&>*]:max-w-40 -mr-8;
174
- }
175
167
  }
176
168
 
177
169
  /* shared styles */
@@ -27,10 +27,6 @@
27
27
  @apply block;
28
28
  }
29
29
  }
30
-
31
- > h3:not([class~="not-prose"]) {
32
- @apply mb-[-0.4rem] pt-4 pb-2;
33
- }
34
30
  }
35
31
 
36
32
  &__span {
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  > svg {
22
- @apply w-8 h-8 flex-none text-secondary fill-current;
22
+ @apply w-6 h-6 flex-none text-secondary fill-current;
23
23
  }
24
24
 
25
25
  &[aria-expanded="false"] > svg:last-of-type,
@@ -2,44 +2,50 @@
2
2
  @apply space-y-3 opacity-0 -translate-y-full invisible transition-all absolute;
3
3
 
4
4
  &__text {
5
- @apply text-sm text-gray-2;
5
+ @apply text-md text-gray-2 ml-4 leading-normal;
6
+
7
+ a {
8
+ @apply text-md;
9
+ }
6
10
  }
7
11
 
8
12
  &__grid {
9
13
  @apply flex flex-wrap gap-y-3;
10
14
  }
11
15
 
12
- &__avatar,
13
- &__counter {
16
+ &__avatar {
14
17
  @apply rounded-full overflow-hidden border border-white inline-grid w-6 h-6;
15
18
  }
16
19
 
17
- &__counter {
18
- @apply bg-background place-items-center text-secondary text-xs font-semibold transition;
19
- }
20
-
21
20
  &__button {
22
21
  @apply block ml-auto text-right text-xs text-secondary cursor-pointer;
23
22
  }
24
23
 
25
- &__trigger {
26
- @apply flex justify-start -space-x-4;
27
- }
28
-
29
- &__trigger:hover &__counter,
30
- &__trigger[aria-expanded="true"] &__counter {
31
- @apply text-white bg-secondary border-secondary;
32
- }
33
-
34
- &__trigger[data-target*="dropdown"] {
35
- @apply p-0 w-auto;
24
+ &__container {
25
+ @apply w-full flex justify-start -space-x-4 p-0 gap-2;
36
26
 
37
27
  > span {
38
28
  @apply inline-grid;
39
29
  }
40
30
  }
41
31
 
42
- &[id*="dropdown-menu"][aria-hidden="false"] {
43
- @apply opacity-100 visible translate-y-0 transition-all relative;
32
+ &__modal {
33
+ .list-item__author {
34
+ @apply flex w-full justify-between;
35
+
36
+ .author__avatar-container {
37
+ @apply w-8 h-8;
38
+ }
39
+
40
+ .button {
41
+ @apply [&>svg]:hidden;
42
+ }
43
+ }
44
+
45
+ .list-item__author + .list-item__author {
46
+ --vertical-spacing: 1rem;
47
+
48
+ @apply mt-[var(--vertical-spacing)];
49
+ }
44
50
  }
45
51
  }
@@ -89,7 +89,7 @@
89
89
  }
90
90
 
91
91
  span {
92
- @apply text-sm text-gray-2 first-letter:uppercase;
92
+ @apply text-sm text-gray-2 truncate whitespace-nowrap first-letter:uppercase;
93
93
  }
94
94
 
95
95
  [data-controls*="panel"] {
@@ -79,10 +79,10 @@
79
79
  }
80
80
 
81
81
  .form__wrapper {
82
- @apply flex flex-col py-10 gap-10 last:pb-0;
82
+ @apply flex flex-col pt-10 pb-4 gap-10 last:pb-0;
83
83
 
84
84
  &-block {
85
- @apply py-10 last:pb-0 border-t-2 border-background flex flex-col gap-4 only:[&_*]:ml-auto [&_p]:text-gray-2;
85
+ @apply py-10 last:pb-0 border-background flex flex-col gap-4 [&_p]:text-gray-2;
86
86
  }
87
87
 
88
88
  &-checkbox-label {