decidim-decidim_awesome 0.10.2 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -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_l_cell_override.rb +24 -0
  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 +4 -3
  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/orderable_override.rb +9 -22
  33. data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +3 -3
  34. data/app/controllers/decidim/decidim_awesome/admin/admin_accountability_controller.rb +7 -7
  35. data/app/controllers/decidim/decidim_awesome/admin/application_controller.rb +2 -0
  36. data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +14 -10
  37. data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +10 -9
  38. data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +23 -20
  39. data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -10
  40. data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +76 -0
  41. data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -10
  42. data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +14 -6
  43. data/app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb +2 -2
  44. data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +2 -2
  45. data/app/controllers/decidim/decidim_awesome/blank_component_controller.rb +8 -3
  46. data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +3 -3
  47. data/app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb +18 -5
  48. data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_form_override.rb +21 -0
  49. data/app/forms/{decidim → concerns/decidim}/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +2 -1
  50. data/app/forms/decidim/decidim_awesome/admin/config_form.rb +28 -14
  51. data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +2 -2
  52. data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +4 -0
  53. data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +4 -4
  54. data/app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb +65 -0
  55. data/app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb +23 -0
  56. data/app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb +110 -0
  57. data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +6 -27
  58. data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
  59. data/app/jobs/decidim/decidim_awesome/destroy_private_data_job.rb +22 -0
  60. data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +5 -4
  61. data/app/middleware/decidim/decidim_awesome/current_config.rb +3 -5
  62. data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +39 -10
  63. data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
  64. data/app/models/decidim/decidim_awesome/paper_trail_version.rb +8 -4
  65. data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +35 -1
  66. data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
  67. data/app/overrides/decidim/proposals/admin/proposals/show/add_private_body.html.erb.deface +7 -0
  68. data/app/overrides/decidim/proposals/admin/proposals/show/replace_body.html.erb.deface +5 -0
  69. data/app/overrides/decidim/proposals/proposals/_proposal_aside/limit_amendments_modal.html.erb.deface +5 -0
  70. data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +1 -1
  71. data/app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface +6 -0
  72. data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +4 -11
  73. data/app/overrides/layouts/decidim/admin/_header/{replace_scripts.html.erb.deface → add_awesome_tags.html.erb.deface} +4 -4
  74. data/app/packs/entrypoints/decidim_admin_decidim_awesome.js +1 -2
  75. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js +4 -0
  76. data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss +1 -0
  77. data/app/packs/entrypoints/decidim_decidim_awesome.js +2 -2
  78. data/app/packs/entrypoints/decidim_decidim_awesome_map.scss +1 -1
  79. data/app/packs/entrypoints/decidim_editor.js +14 -0
  80. data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +96 -69
  81. data/app/packs/src/decidim/decidim_awesome/admin/check_redirections.js +46 -41
  82. data/app/packs/src/decidim/decidim_awesome/admin/codemirror.js +3 -3
  83. data/app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js +115 -0
  84. data/app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js +9 -5
  85. data/app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js +22 -11
  86. data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +26 -8
  87. data/app/packs/src/decidim/decidim_awesome/admin/tabs_change.js +31 -0
  88. data/app/packs/src/decidim/decidim_awesome/admin/user_picker.js +34 -21
  89. data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +28 -0
  90. data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +5 -16
  91. data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
  92. data/app/packs/src/decidim/decidim_awesome/awesome_application.js +1 -15
  93. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js +33 -11
  94. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/meetings_fetcher.js +9 -12
  95. data/app/packs/src/decidim/decidim_awesome/awesome_map/api/proposals_fetcher.js +28 -0
  96. data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +3 -4
  97. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +12 -12
  98. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/meetings_controller.js +11 -7
  99. data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js +6 -13
  100. data/app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js +51 -20
  101. data/app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js +27 -18
  102. data/app/packs/src/decidim/decidim_awesome/editor/index.js +94 -0
  103. data/app/packs/src/decidim/decidim_awesome/forms/autosave.js +28 -23
  104. data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +29 -25
  105. data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
  106. data/app/packs/src/decidim/decidim_awesome/proposals/custom_fields.js +31 -15
  107. data/app/packs/src/decidim/decidim_awesome/proposals/images.js +16 -10
  108. data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +47 -38
  109. data/app/packs/stylesheets/decidim/decidim_awesome/admin/auto_edits.scss +11 -12
  110. data/app/packs/stylesheets/decidim/decidim_awesome/admin/check_redirections.scss +15 -0
  111. data/app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss +24 -12
  112. data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +49 -29
  113. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -71
  114. data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss +48 -0
  115. data/app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss +11 -0
  116. data/app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss +17 -26
  117. data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
  118. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +11 -49
  119. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +19 -0
  120. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +4 -19
  121. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss +1 -1
  122. data/app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss +41 -35
  123. data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
  124. data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +118 -0
  125. data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +26 -0
  126. data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +41 -59
  127. data/app/permissions/decidim/decidim_awesome/admin/permissions.rb +14 -3
  128. data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -4
  129. data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb +23 -0
  130. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_item_presenter_override.rb +10 -2
  131. data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_presenter_override.rb +8 -0
  132. data/app/presenters/concerns/decidim/decidim_awesome/proposals/proposal_presenter_override.rb +20 -0
  133. data/app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb +30 -0
  134. data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
  135. data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +70 -0
  136. data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
  137. data/app/queries/decidim/decidim_awesome/private_data_finder.rb +19 -0
  138. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_methods.rb +72 -0
  139. data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_override.rb +38 -0
  140. data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +34 -0
  141. data/app/types/concerns/decidim/decidim_awesome/add_proposal_type_custom_fields.rb +59 -0
  142. data/app/types/concerns/decidim/decidim_awesome/{proposal_type_override.rb → add_proposal_type_vote_weights.rb} +3 -1
  143. data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +23 -17
  144. data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +50 -48
  145. data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +7 -2
  146. data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +25 -18
  147. data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +7 -6
  148. data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +12 -16
  149. data/app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb +39 -23
  150. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb +35 -17
  151. data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_private_custom_fields.html.erb +1 -0
  152. data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +68 -80
  153. data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +16 -12
  154. data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -6
  155. data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +22 -12
  156. data/app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb +1 -49
  157. data/app/views/decidim/decidim_awesome/admin/constraints/new.html.erb +14 -9
  158. data/app/views/decidim/decidim_awesome/admin/constraints/show.html.erb +14 -9
  159. data/app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb +20 -5
  160. data/app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb +5 -5
  161. data/app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb +14 -13
  162. data/app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb +5 -5
  163. data/app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb +44 -0
  164. data/app/views/decidim/decidim_awesome/admin/maintenance/show.html.erb +44 -0
  165. data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +6 -6
  166. data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +21 -12
  167. data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +39 -42
  168. data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
  169. data/app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb +8 -5
  170. data/app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb +20 -0
  171. data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +14 -18
  172. data/app/views/decidim/decidim_awesome/amendments/_modal.html.erb +23 -0
  173. data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +8 -2
  174. data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +7 -12
  175. data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +53 -37
  176. data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +14 -5
  177. data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +0 -3
  178. data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +9 -7
  179. data/app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb +9 -6
  180. data/app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb +12 -0
  181. data/app/views/layouts/decidim/decidim_awesome/admin/application.html.erb +1 -73
  182. data/app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb +19 -0
  183. data/config/assets.rb +3 -33
  184. data/config/i18n-tasks.yml +23 -3
  185. data/config/locales/ca.yml +110 -23
  186. data/config/locales/cs.yml +121 -19
  187. data/config/locales/de.yml +61 -20
  188. data/config/locales/en.yml +125 -35
  189. data/config/locales/es.yml +109 -22
  190. data/config/locales/eu.yml +22 -5
  191. data/config/locales/fr.yml +107 -20
  192. data/config/locales/hu.yml +53 -12
  193. data/config/locales/it.yml +22 -20
  194. data/config/locales/ja.yml +107 -20
  195. data/config/locales/lt.yml +0 -8
  196. data/config/locales/nl.yml +16 -17
  197. data/config/locales/pt-BR.yml +23 -20
  198. data/config/locales/pt-PT.yml +0 -1
  199. data/config/locales/ro-RO.yml +11 -7
  200. data/config/locales/sv.yml +24 -13
  201. data/config/rubocop/disabled.yml +11 -0
  202. data/config/rubocop/faker.yml +480 -0
  203. data/config/rubocop/rails.yml +88 -0
  204. data/config/rubocop/rspec.yml +65 -0
  205. data/config/rubocop/ruby.yml +1210 -0
  206. data/db/migrate/20240306175331_rename_editor_images_awesome_config.rb +18 -0
  207. data/db/migrate/20240531224204_add_decidim_awesome_proposal_private_fields.rb +29 -0
  208. data/db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +20 -0
  209. data/db/seeds.rb +3 -3
  210. data/lib/decidim/decidim_awesome/admin_engine.rb +26 -7
  211. data/lib/decidim/decidim_awesome/api/types/localized_custom_fields_type.rb +22 -0
  212. data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +51 -0
  213. data/lib/decidim/decidim_awesome/awesome.rb +74 -23
  214. data/lib/decidim/decidim_awesome/awesome_helpers.rb +6 -2
  215. data/lib/decidim/decidim_awesome/checksums.yml +47 -44
  216. data/lib/decidim/decidim_awesome/config.rb +1 -1
  217. data/lib/decidim/decidim_awesome/custom_fields.rb +13 -5
  218. data/lib/decidim/decidim_awesome/engine.rb +165 -56
  219. data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
  220. data/lib/decidim/decidim_awesome/lock.rb +47 -0
  221. data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
  222. data/lib/decidim/decidim_awesome/menu.rb +165 -0
  223. data/lib/decidim/decidim_awesome/menu_hacker.rb +4 -8
  224. data/lib/decidim/decidim_awesome/system_checker.rb +2 -4
  225. data/lib/decidim/decidim_awesome/test/factories.rb +10 -10
  226. data/lib/decidim/decidim_awesome/test/initializer.rb +7 -12
  227. data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -2
  228. data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +2 -2
  229. data/lib/decidim/decidim_awesome/test/shared_examples/{box_label_editor.rb → box_label_editor_examples.rb} +17 -17
  230. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +23 -5
  231. data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +155 -0
  232. data/lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb +7 -7
  233. data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +42 -58
  234. data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +9 -8
  235. data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +32 -24
  236. data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +97 -22
  237. data/lib/decidim/decidim_awesome/version.rb +2 -2
  238. data/lib/decidim/decidim_awesome/voting_manifest.rb +5 -10
  239. data/lib/decidim/decidim_awesome.rb +1 -2
  240. data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +1 -1
  241. data/lib/tasks/decidim_awesome_upgrade_tasks.rake +4 -0
  242. data/package.json +21 -30
  243. metadata +86 -63
  244. data/app/cells/concerns/decidim/decidim_awesome/proposal_m_cell_override.rb +0 -38
  245. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +0 -15
  246. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +0 -15
  247. data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +0 -21
  248. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +0 -16
  249. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +0 -20
  250. data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -13
  251. data/app/helpers/decidim/decidim_awesome/amendments_helper_override.rb +0 -48
  252. data/app/helpers/decidim/decidim_awesome/proposals/application_helper_override.rb +0 -78
  253. data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
  254. data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +0 -3
  255. data/app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js +0 -2
  256. data/app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js +0 -1
  257. data/app/packs/src/decidim/decidim_awesome/admin/constraints.js +0 -55
  258. data/app/packs/src/decidim/decidim_awesome/editors/editor.js +0 -218
  259. data/app/packs/src/decidim/decidim_awesome/editors/tabs_focus.js +0 -22
  260. data/app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss +0 -19
  261. data/app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss +0 -58
  262. data/app/packs/stylesheets/vendor/select2-foundation-theme.scss +0 -348
  263. data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +0 -64
  264. data/app/views/decidim/decidim_awesome/admin/config/_modal.html.erb +0 -11
  265. data/app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb +0 -15
@@ -1,31 +1,6 @@
1
- // hide custom-fields inside tabs, an extra (unique) container is used instead
2
- .color-box {
3
- display: inline-block;
4
- height: 1em;
5
- width: 1em;
6
- margin-left: 1em;
7
- vertical-align: middle;
8
-
9
- &:first-child {
10
- margin-left: 0;
11
- }
12
- $colors: (
13
- "primary": #{$primary},
14
- "secondary": #{$secondary},
15
- "success": #{$success},
16
- "warning": #{$warning},
17
- "alert": #{$alert},
18
- "highlight": #{$highlight},
19
- "highlight_alternative": #{$highlight_alternative}
20
- );
21
-
22
- @each $name, $color in $colors {
23
- &.#{$name} {
24
- background-color: #{$color};
25
- }
26
- }
27
- }
1
+ @import "stylesheets/decidim/editor";
28
2
 
3
+ // hide custom-fields inside tabs, an extra (unique) container is used instead
29
4
  .tabs-content {
30
5
  .proposal_custom_field {
31
6
  display: none;
@@ -34,60 +9,42 @@
34
9
 
35
10
  .proposal_custom_fields {
36
11
  &_editor {
37
- background-color: #e0e0e0;
38
- padding: .5em .5em 1em;
39
- border-top-left-radius: 5px;
40
- border-top-right-radius: 5px;
41
-
42
- label {
43
- display: inline-block;
44
- max-width: 100%;
45
- font-weight: 600 !important;
12
+ ul.frmb,
13
+ .form-wrap.form-builder .frmb li.form-field,
14
+ .form-wrap.form-builder .stage-wrap.empty {
15
+ @apply bg-background mr-2;
46
16
  }
47
17
 
48
- li[type] {
49
- display: inherit;
50
- width: 100%;
51
- height: inherit;
52
- margin: inherit;
53
- border: inherit;
54
- box-shadow: inherit;
55
- font-size: inherit;
56
- font-weight: inherit;
57
- line-height: inherit;
58
- color: inherit;
59
- }
18
+ border-top-left-radius: 5px;
19
+ border-top-right-radius: 5px;
60
20
 
61
- .form-group {
62
- background-color: inherit;
63
- margin: 0;
64
- padding: 0;
21
+ svg {
22
+ @apply fill-black;
65
23
  }
66
24
 
67
- .form-wrap.form-builder .form-group {
68
- margin-bottom: 10px !important;
25
+ li > label {
26
+ line-height: 27px !important;
27
+ font-size: 16px !important;
69
28
  }
70
29
 
71
- .form-control {
72
- color: #555;
30
+ input.form-control {
73
31
  background-color: #fff;
74
- border: 1px solid #ccc;
75
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
76
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
77
- margin: 0;
78
- padding: 6px 12px;
32
+ border: 1px solid #ccc !important;
33
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
34
+
35
+ &:focus {
36
+ outline: 0;
37
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
38
+ 0 0 8px rgba(102, 175, 233, 0.6) !important;
39
+ }
79
40
  }
80
- }
81
41
 
82
- &_container {
83
- .constraints-editor {
84
- border-top-left-radius: 0;
85
- border-top-right-radius: 0;
42
+ .frmb-control li {
43
+ cursor: cell !important;
44
+ }
45
+ // drag and drop is disabled, let's not show the move cursor
46
+ .frmb .prev-holder {
47
+ cursor: default !important;
86
48
  }
87
49
  }
88
50
  }
89
-
90
- // Custom fields tunning
91
- .rendered-form .form-control.ql-container {
92
- height: auto !important;
93
- }
@@ -0,0 +1,48 @@
1
+ .color-box {
2
+ display: inline-block;
3
+ height: 1em;
4
+ width: 1em;
5
+ margin-left: 1em;
6
+ vertical-align: middle;
7
+
8
+ &:first-child {
9
+ margin-left: 0;
10
+ }
11
+
12
+ &.primary {
13
+ background-color: var(--primary);
14
+ }
15
+
16
+ &.secondary {
17
+ background-color: var(--secondary);
18
+ }
19
+
20
+ &.tertiary {
21
+ background-color: var(--tertiary);
22
+ }
23
+
24
+ &.alert {
25
+ background-color: var(--alert);
26
+ }
27
+
28
+ &.warning {
29
+ background-color: var(--warning);
30
+ }
31
+
32
+ &.success {
33
+ background-color: var(--success);
34
+ }
35
+ }
36
+
37
+ .colors-help {
38
+ p {
39
+ @apply block text-sm text-gray-2 font-normal prose-a:text-secondary prose-a:underline;
40
+
41
+ margin-bottom: 1em;
42
+ }
43
+
44
+ .colors {
45
+ white-space: unset;
46
+ font-size: 0.7rem;
47
+ }
48
+ }
@@ -0,0 +1,11 @@
1
+ #intergramRoot {
2
+ bottom: 3.5rem;
3
+ right: -0.5rem;
4
+ position: fixed;
5
+ z-index: 1000;
6
+ width: 100%;
7
+
8
+ > div {
9
+ position: absolute !important;
10
+ }
11
+ }
@@ -1,29 +1,20 @@
1
- @import "select2/dist/css/select2.css";
2
- @import "stylesheets/vendor/select2-foundation-theme";
1
+ @import "tom-select/dist/scss/tom-select";
3
2
 
4
- .multiusers-select-container {
5
- form label {
6
- margin-bottom: 1rem;
7
- }
3
+ /* overwrite tom-select defaults */
4
+ .ts {
5
+ &-control {
6
+ @apply border-gray text-md min-h-[40px];
8
7
 
9
- .switch-paddle {
10
- display: inline-block;
11
- vertical-align: middle;
12
- margin-right: 1em;
13
- }
14
- }
15
-
16
- .select2-container--foundation .select2-selection--multiple {
17
- .select2-selection__choice {
18
- display: inline-block;
19
- float: none;
20
- font-weight: normal;
8
+ input {
9
+ @apply font-normal text-black text-md;
10
+ }
21
11
 
22
12
  .is-admin {
23
13
  &::before {
24
- content: '';
14
+ content: "";
25
15
  display: inline-block;
26
- margin-right: .3em;
16
+ margin-right: 0.3em;
17
+ text-decoration: none;
27
18
  }
28
19
 
29
20
  text-decoration: line-through;
@@ -31,11 +22,11 @@
31
22
  }
32
23
  }
33
24
 
34
- textarea.select2-search__field {
35
- resize: none;
36
- }
37
- }
25
+ &-dropdown {
26
+ @apply text-md text-gray-2 font-normal;
38
27
 
39
- .form-conversations-submit {
40
- margin-top: 2rem;
28
+ .active {
29
+ @apply text-white bg-secondary;
30
+ }
31
+ }
41
32
  }
@@ -0,0 +1,5 @@
1
+ #LimitAmendmentsModal {
2
+ .instructions {
3
+ @apply grid gap-4 prose-a:text-secondary;
4
+ }
5
+ }
@@ -1,38 +1,24 @@
1
- @import "entrypoints/decidim_admin";
2
1
  @import "stylesheets/decidim/decidim_awesome/admin/constraints";
2
+ @import "stylesheets/decidim/decidim_awesome/admin/custom_styles";
3
3
  @import "stylesheets/decidim/decidim_awesome/admin/custom_fields";
4
4
  @import "stylesheets/decidim/decidim_awesome/admin/auto_edits";
5
5
  @import "stylesheets/decidim/decidim_awesome/admin/check_redirections";
6
- @import "stylesheets/decidim/decidim_awesome/editors/markdown_editor";
7
- @import "stylesheets/decidim/decidim_awesome/editors/quill_editor";
6
+ @import "stylesheets/decidim/decidim_awesome/admin/user_picker";
7
+ @import "stylesheets/decidim/decidim_awesome/admin/codemirror";
8
+ @import "stylesheets/decidim/decidim_awesome/shared/spinner";
9
+
10
+ // Remove the 20% right column from the item__edit class
11
+ // .item__edit {
12
+ // @apply grid grid-cols-1 md:grid-cols-[100%_0%] mb-8;
13
+ // }
8
14
 
9
15
  .pokecode-credits {
10
16
  float: right;
11
- margin: 0 1em .5em 0;
12
-
13
- // position: absolute;
14
- // bottom: 0;
15
- // right: 0;
16
- // margin: 1em;
17
- font-size: .8em;
17
+ margin: 0 1em 0.5em 0;
18
+ font-size: 0.8em;
18
19
  }
19
20
 
20
21
  .decidim_awesome {
21
- &.modal {
22
- .spinner {
23
- @include spinner(25px, #aaa, var(--secondary), 800ms);
24
-
25
- vertical-align: middle;
26
- display: none;
27
- }
28
-
29
- &.loading {
30
- .spinner {
31
- display: inline-block;
32
- }
33
- }
34
- }
35
-
36
22
  &-form {
37
23
  margin-bottom: 2em;
38
24
  border-bottom: 1px solid #999;
@@ -48,27 +34,3 @@
48
34
  padding-bottom: 0;
49
35
  }
50
36
  }
51
-
52
- // Some global fixes
53
- .form label {
54
- .help-text {
55
- display: block;
56
- margin-top: -1.5em;
57
- font-weight: normal;
58
- margin-bottom: 1.5em;
59
- }
60
- }
61
-
62
- .form-input-extra-before ~ .form-error {
63
- margin-top: -2.5rem;
64
- }
65
-
66
- tbody tr.menu_hack-addition {
67
- background: rgb(255, 248, 222);
68
- }
69
-
70
- .secondary-nav {
71
- li .icon {
72
- margin-right: .5rem;
73
- }
74
- }
@@ -0,0 +1,19 @@
1
+ @import "stylesheets/decidim/decidim_awesome/shared/spinner";
2
+ @import "stylesheets/decidim/decidim_awesome/admin/intergram_fixes";
3
+ @import "stylesheets/decidim/decidim_awesome/forms/custom_fields";
4
+
5
+ .component__show {
6
+ &_private_data {
7
+ &-grid {
8
+ @apply bg-background grid-cols-2 gap-4 my-4 p-2;
9
+
10
+ .date_info {
11
+ @apply italic text-gray text-sm mt-4;
12
+
13
+ a {
14
+ @apply not-italic text-secondary;
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
@@ -1,20 +1,5 @@
1
- @import "codemirror/lib/codemirror"; // used by inscribemde
2
- @import "stylesheets/decidim/decidim_awesome/editors/markdown_editor";
3
- @import "stylesheets/decidim/decidim_awesome/editors/quill_editor";
4
- @import "stylesheets/decidim/decidim_awesome/forms/autosave";
5
1
  @import "stylesheets/decidim/decidim_awesome/voting/voting_cards";
6
-
7
- .decidim_awesome-custom_fields {
8
- dd {
9
- >div:last-child {
10
- margin-bottom: 1rem;
11
- }
12
-
13
- &[name="textarea"] {
14
- >div > p {
15
- margin-top: 1rem;
16
- margin-bottom: 0;
17
- }
18
- }
19
- }
20
- }
2
+ @import "stylesheets/decidim/decidim_awesome/shared/spinner";
3
+ @import "stylesheets/decidim/decidim_awesome/forms/autosave";
4
+ @import "stylesheets/decidim/decidim_awesome/forms/custom_fields";
5
+ @import "stylesheets/decidim/decidim_awesome/amendments/modal";
@@ -1,4 +1,4 @@
1
- .wrapper {
1
+ .participatory-space__container {
2
2
  .awesome-iframe {
3
3
  margin: 0 auto;
4
4
 
@@ -2,18 +2,6 @@
2
2
  .dropdown-pane {
3
3
  z-index: 1000;
4
4
  }
5
- // Override padding in this component
6
- .wrapper {
7
- padding: 0;
8
-
9
- .callout.announcement {
10
- margin-top: 2rem;
11
- }
12
-
13
- .google-map {
14
- margin-bottom: 0;
15
- }
16
- }
17
5
 
18
6
  #awesome-map {
19
7
  width: 100%;
@@ -21,21 +9,35 @@
21
9
  justify-content: center;
22
10
  align-items: center;
23
11
 
24
- // .leaflet-marker-icon.svg-icon svg path{
25
- // filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, .7));
26
- // }
27
-
28
12
  .loading-spinner {
29
13
  z-index: 10000;
30
14
  position: absolute;
31
- right: 0;
32
- top: 0;
15
+ right: 50%;
16
+ top: 50%;
33
17
  }
34
18
 
35
- .leaflet-container {
19
+ .leaflet-popup-content {
36
20
  font: inherit;
37
21
 
38
- #bodyContent .description {
22
+ h3 {
23
+ @apply mb-2;
24
+ }
25
+
26
+ a {
27
+ @apply text-white;
28
+ }
29
+
30
+ .description {
31
+ @apply m-0 px-0 text-sm font-sans text-white;
32
+
33
+ p {
34
+ @apply mt-0;
35
+ }
36
+
37
+ a {
38
+ @apply underline;
39
+ }
40
+
39
41
  img,
40
42
  iframe {
41
43
  max-height: 5em;
@@ -45,7 +47,7 @@
45
47
 
46
48
  .leaflet-control-layers-list {
47
49
  hr {
48
- margin: .5em 0;
50
+ margin: 0.5em 0;
49
51
  }
50
52
 
51
53
  b {
@@ -55,13 +57,13 @@
55
57
 
56
58
  label {
57
59
  line-height: 1;
58
- font-size: .8rem;
59
- margin: 0 .5em .5em;
60
+ font-size: 0.8rem;
61
+ margin: 0 0.5em 0.5em;
60
62
 
61
63
  i {
62
64
  display: inline-block;
63
- width: .8rem;
64
- height: .8rem;
65
+ width: 0.8rem;
66
+ height: 0.8rem;
65
67
  background-color: var(--primary);
66
68
  }
67
69
  }
@@ -72,7 +74,7 @@
72
74
  }
73
75
 
74
76
  .map-legend {
75
- background: rgba(255, 255, 255, .8);
77
+ background: rgba(255, 255, 255, 0.8);
76
78
  padding: 1em;
77
79
  border: 2px solid #bbb;
78
80
  border-radius: 4px;
@@ -83,7 +85,7 @@
83
85
  cursor: pointer;
84
86
 
85
87
  &::after {
86
- content: '';
88
+ content: "";
87
89
  width: 0;
88
90
  height: 0;
89
91
  border-left: 5px solid transparent;
@@ -103,6 +105,10 @@
103
105
  }
104
106
  }
105
107
 
108
+ .participatory-space__container #awesome-map {
109
+ @apply mt-8 mb-8;
110
+ }
111
+
106
112
  #awesome_map- {
107
113
  &categories-control {
108
114
  display: none;
@@ -112,10 +118,10 @@
112
118
  display: none;
113
119
 
114
120
  i {
115
- margin-left: .5em;
121
+ margin-left: 0.5em;
116
122
  display: inline-block;
117
- width: .8rem;
118
- height: .8rem;
123
+ width: 0.8rem;
124
+ height: 0.8rem;
119
125
  border-radius: 50%;
120
126
  background-color: var(-- primary);
121
127
  }
@@ -144,11 +150,11 @@
144
150
  line-height: 1;
145
151
  background-color: #f0f0f0;
146
152
  border-radius: 5px;
147
- margin: .5rem;
148
- padding: .5rem;
153
+ margin: 0.5rem;
154
+ padding: 0.5rem;
149
155
 
150
156
  span {
151
- margin: 0 .5rem 2px 0;
157
+ margin: 0 0 2px 0.4em;
152
158
  }
153
159
 
154
160
  input {
@@ -157,8 +163,8 @@
157
163
  }
158
164
 
159
165
  .awesome_map-toggle_all_tags {
160
- margin: .5rem 1rem;
161
- font-size: .875rem;
166
+ margin: 0.5rem 1rem;
167
+ font-size: 0.875rem;
162
168
  }
163
169
 
164
170
  .hashtags-container,
@@ -1,10 +1,10 @@
1
1
  .awesome_autosave-notice {
2
- background-color: rgba(var(--success-rgb), .8);
2
+ background-color: rgb(var(--success-rgb) / 90%);
3
3
  position: fixed;
4
- top: 0;
5
- right: 0;
6
- margin: 2em;
7
- padding: .5em 1em;
4
+ top: 90%;
5
+ left: 50%;
6
+ transform: translate(-50%, -50%);
7
+ padding: 1em 2em;
8
8
  border-radius: 4px;
9
9
  border: 1px solid var(--success);
10
10
  font-weight: 600;
@@ -12,6 +12,6 @@
12
12
  z-index: 1000;
13
13
 
14
14
  &.error {
15
- background-color: rgba(var(--alert-rgb), .8);
15
+ background-color: rgb(var(--alert-rgb) / 90%);
16
16
  }
17
17
  }
@@ -0,0 +1,118 @@
1
+ .decidim_awesome-custom_fields {
2
+ &.private_body {
3
+ @apply px-4 py-6 mt-8 border border-gray rounded-s rounded-ee bg-gray-5 text-black font-normal;
4
+ }
5
+
6
+ .private_body-disclosure {
7
+ @apply -mt-4 mb-8 text-lg italic;
8
+
9
+ svg {
10
+ @apply inline-block w-6 h-6 mr-2 align-bottom;
11
+ }
12
+ }
13
+
14
+ dt {
15
+ @apply font-sans font-semibold;
16
+ }
17
+
18
+ dd {
19
+ @apply px-0;
20
+ }
21
+
22
+ // styles to tune a bit the form presentation in proposals creation
23
+ .proposal_custom_field {
24
+ h1 {
25
+ @apply font-sans font-bold text-4xl mt-4;
26
+ }
27
+
28
+ h2 {
29
+ @apply font-sans font-bold text-3xl mt-4;
30
+ }
31
+
32
+ h3 {
33
+ @apply font-sans font-semibold text-2xl mt-4;
34
+ }
35
+
36
+ h4 {
37
+ @apply font-sans font-semibold text-xl mt-4;
38
+ }
39
+
40
+ h5 {
41
+ @apply font-sans font-semibold text-lg mt-4;
42
+ }
43
+
44
+ h6 {
45
+ @apply font-sans font-semibold text-md mt-4;
46
+ }
47
+
48
+ p {
49
+ @apply mt-4;
50
+ }
51
+
52
+ // replace tooltips javascript with css
53
+ label {
54
+ .tooltip-element {
55
+ @apply m-0 p-0 invisible block;
56
+
57
+ &::before {
58
+ @apply visible text-xs text-gray-2 italic font-thin;
59
+
60
+ content: attr(tooltip);
61
+ }
62
+ }
63
+ }
64
+
65
+ .form-group:not(:first-of-type) {
66
+ @apply mt-6;
67
+ }
68
+
69
+ .form-control {
70
+ @apply w-full block mt-4;
71
+
72
+ &:not(.reset-defaults) {
73
+ @apply inline-block px-4 py-2 border border-gray outline outline-1 outline-transparent rounded bg-background-2 text-black font-normal placeholder:text-gray focus:outline-2 focus:outline-secondary disabled:bg-background-3 disabled:text-gray-2 disabled:cursor-not-allowed;
74
+
75
+ &.sm {
76
+ @apply px-1 py-0.5 text-sm;
77
+ }
78
+
79
+ &.sm-icon {
80
+ @apply pr-1 pl-6 py-0.5 text-sm;
81
+ }
82
+
83
+ &.is-invalid-input:not(:focus) {
84
+ @apply outline-2 outline-alert;
85
+ }
86
+ }
87
+
88
+ /* read-only can be applied only to input and textarea, otherwise selects will be set as readonly */
89
+ &:not(select) {
90
+ @apply read-only:bg-background read-only:border-0 read-only:text-gray-2;
91
+ }
92
+ }
93
+
94
+ .formbuilder-checkbox {
95
+ > label {
96
+ @apply font-normal;
97
+ }
98
+ }
99
+
100
+ .formbuilder-autocomplete {
101
+ @apply relative;
102
+
103
+ .formbuilder-autocomplete-list {
104
+ @apply z-20 max-h-52 outline outline-1 outline-transparent rounded border border-gray text-black font-normal;
105
+
106
+ li {
107
+ @apply cursor-pointer rounded px-4 py-2 bg-background-2;
108
+
109
+ &.active-option {
110
+ @apply bg-background;
111
+ }
112
+ }
113
+
114
+ display: none;
115
+ }
116
+ }
117
+ }
118
+ }
@@ -0,0 +1,26 @@
1
+ // Loading spinner does not ocuppy all the width and height as the new spinner-container
2
+ .loading-spinner {
3
+ @apply relative cursor-wait;
4
+
5
+ &::before {
6
+ @apply content-[""] ml-[50%] md:ml-[calc(50%-0.75rem)] block w-6 h-6 rounded-full animate-spin border-4 border-l-background border-y-background border-r-secondary z-20;
7
+ }
8
+
9
+ &.alert {
10
+ &::before {
11
+ @apply border-r-alert;
12
+ }
13
+ }
14
+
15
+ &.warning {
16
+ &::before {
17
+ @apply border-r-warning;
18
+ }
19
+ }
20
+
21
+ &.primary {
22
+ &::before {
23
+ @apply border-r-primary;
24
+ }
25
+ }
26
+ }