decidim-admin 0.26.2 → 0.27.0.rc2

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

Potentially problematic release.


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

Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/admin/attachments_privacy_warning/show.erb +3 -0
  3. data/app/cells/decidim/admin/attachments_privacy_warning_cell.rb +19 -0
  4. data/app/commands/decidim/admin/block_user.rb +1 -1
  5. data/app/commands/decidim/admin/close_session_managed_user.rb +1 -1
  6. data/app/commands/decidim/admin/create_area.rb +1 -1
  7. data/app/commands/decidim/admin/create_area_type.rb +6 -3
  8. data/app/commands/decidim/admin/create_attachment.rb +14 -6
  9. data/app/commands/decidim/admin/create_attachment_collection.rb +13 -4
  10. data/app/commands/decidim/admin/create_category.rb +6 -4
  11. data/app/commands/decidim/admin/create_component.rb +1 -1
  12. data/app/commands/decidim/admin/create_import.rb +4 -5
  13. data/app/commands/decidim/admin/create_import_example.rb +1 -1
  14. data/app/commands/decidim/admin/create_newsletter.rb +1 -1
  15. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +1 -1
  16. data/app/commands/decidim/admin/create_scope.rb +1 -1
  17. data/app/commands/decidim/admin/create_scope_type.rb +6 -3
  18. data/app/commands/decidim/admin/create_static_page.rb +1 -1
  19. data/app/commands/decidim/admin/create_static_page_topic.rb +1 -1
  20. data/app/commands/decidim/admin/deliver_newsletter.rb +6 -6
  21. data/app/commands/decidim/admin/destroy_area.rb +1 -1
  22. data/app/commands/decidim/admin/destroy_category.rb +6 -3
  23. data/app/commands/decidim/admin/destroy_component.rb +1 -1
  24. data/app/commands/decidim/admin/destroy_newsletter.rb +1 -1
  25. data/app/commands/decidim/admin/destroy_participatory_space_private_user.rb +1 -1
  26. data/app/commands/decidim/admin/destroy_scope.rb +1 -1
  27. data/app/commands/decidim/admin/destroy_share_token.rb +1 -1
  28. data/app/commands/decidim/admin/destroy_static_page.rb +1 -1
  29. data/app/commands/decidim/admin/destroy_static_page_topic.rb +1 -1
  30. data/app/commands/decidim/admin/hide_resource.rb +2 -2
  31. data/app/commands/decidim/admin/impersonate_user.rb +1 -1
  32. data/app/commands/decidim/admin/invite_admin.rb +1 -1
  33. data/app/commands/decidim/admin/officialize_user.rb +1 -1
  34. data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +7 -3
  35. data/app/commands/decidim/admin/process_user_group_verification_csv.rb +8 -4
  36. data/app/commands/decidim/admin/promote_managed_user.rb +1 -1
  37. data/app/commands/decidim/admin/publish_component.rb +1 -1
  38. data/app/commands/decidim/admin/reject_user_group.rb +1 -1
  39. data/app/commands/decidim/admin/remove_admin.rb +1 -1
  40. data/app/commands/decidim/admin/reorder_content_blocks.rb +1 -1
  41. data/app/commands/decidim/admin/transfer_user.rb +1 -1
  42. data/app/commands/decidim/admin/unblock_user.rb +1 -1
  43. data/app/commands/decidim/admin/unhide_resource.rb +1 -1
  44. data/app/commands/decidim/admin/unofficialize_user.rb +1 -1
  45. data/app/commands/decidim/admin/unpublish_component.rb +1 -1
  46. data/app/commands/decidim/admin/unreport_resource.rb +1 -1
  47. data/app/commands/decidim/admin/unreport_user.rb +1 -1
  48. data/app/commands/decidim/admin/update_area.rb +1 -1
  49. data/app/commands/decidim/admin/update_area_type.rb +8 -3
  50. data/app/commands/decidim/admin/update_attachment.rb +4 -3
  51. data/app/commands/decidim/admin/update_attachment_collection.rb +8 -3
  52. data/app/commands/decidim/admin/update_category.rb +9 -5
  53. data/app/commands/decidim/admin/update_component.rb +8 -5
  54. data/app/commands/decidim/admin/update_component_permissions.rb +9 -6
  55. data/app/commands/decidim/admin/update_content_block.rb +1 -1
  56. data/app/commands/decidim/admin/update_external_domain_whitelist.rb +6 -3
  57. data/app/commands/decidim/admin/update_help_sections.rb +17 -3
  58. data/app/commands/decidim/admin/update_newsletter.rb +1 -1
  59. data/app/commands/decidim/admin/update_organization.rb +1 -1
  60. data/app/commands/decidim/admin/update_organization_appearance.rb +1 -1
  61. data/app/commands/decidim/admin/update_organization_tos_version.rb +1 -1
  62. data/app/commands/decidim/admin/update_resource_permissions.rb +2 -2
  63. data/app/commands/decidim/admin/update_scope.rb +1 -1
  64. data/app/commands/decidim/admin/update_scope_type.rb +8 -3
  65. data/app/commands/decidim/admin/update_static_page.rb +1 -1
  66. data/app/commands/decidim/admin/update_static_page_topic.rb +1 -1
  67. data/app/commands/decidim/admin/update_user_groups.rb +1 -1
  68. data/app/commands/decidim/admin/verify_user_group.rb +1 -1
  69. data/app/controllers/concerns/decidim/admin/filterable.rb +1 -1
  70. data/app/controllers/concerns/decidim/admin/participatory_space_export.rb +3 -1
  71. data/app/controllers/decidim/admin/application_controller.rb +1 -0
  72. data/app/controllers/decidim/admin/area_types_controller.rb +6 -3
  73. data/app/controllers/decidim/admin/categories_controller.rb +3 -3
  74. data/app/controllers/decidim/admin/component_permissions_controller.rb +1 -1
  75. data/app/controllers/decidim/admin/components/base_controller.rb +1 -0
  76. data/app/controllers/decidim/admin/components_controller.rb +1 -1
  77. data/app/controllers/decidim/admin/concerns/has_attachment_collections.rb +6 -3
  78. data/app/controllers/decidim/admin/concerns/has_attachments.rb +6 -3
  79. data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +7 -0
  80. data/app/controllers/decidim/admin/dashboard_controller.rb +4 -3
  81. data/app/controllers/decidim/admin/exports_controller.rb +4 -1
  82. data/app/controllers/decidim/admin/help_sections_controller.rb +1 -1
  83. data/app/controllers/decidim/admin/metrics_controller.rb +2 -1
  84. data/app/controllers/decidim/admin/moderations_controller.rb +9 -7
  85. data/app/controllers/decidim/admin/organization_controller.rb +3 -3
  86. data/app/controllers/decidim/admin/organization_external_domain_whitelist_controller.rb +1 -1
  87. data/app/controllers/decidim/admin/reminders_controller.rb +61 -0
  88. data/app/controllers/decidim/admin/resource_permissions_controller.rb +3 -3
  89. data/app/controllers/decidim/admin/scope_types_controller.rb +6 -3
  90. data/app/controllers/decidim/admin/static_pages_controller.rb +1 -7
  91. data/app/forms/decidim/admin/category_form.rb +1 -2
  92. data/app/forms/decidim/admin/component_form.rb +16 -7
  93. data/app/forms/decidim/admin/import_example_form.rb +1 -5
  94. data/app/forms/decidim/admin/import_form.rb +7 -10
  95. data/app/forms/decidim/admin/managed_user_promotion_form.rb +1 -1
  96. data/app/forms/decidim/admin/participatory_space_private_user_csv_import_form.rb +7 -4
  97. data/app/forms/decidim/admin/permission_form.rb +9 -8
  98. data/app/forms/decidim/admin/permissions_form.rb +1 -10
  99. data/app/forms/decidim/admin/user_group_csv_verification_form.rb +2 -2
  100. data/app/helpers/decidim/admin/bulk_actions_helper.rb +0 -4
  101. data/app/helpers/decidim/admin/moderations/reports_helper.rb +11 -2
  102. data/app/helpers/decidim/admin/reminders_helper.rb +12 -0
  103. data/app/helpers/decidim/admin/settings_helper.rb +57 -11
  104. data/app/packs/entrypoints/decidim_admin.js +7 -2
  105. data/app/packs/src/decidim/admin/admin_autocomplete.js +86 -0
  106. data/app/packs/src/decidim/admin/application.js +0 -16
  107. data/app/packs/src/decidim/admin/choose_language.js +11 -9
  108. data/app/packs/src/decidim/admin/dynamic_fields.component.js +1 -0
  109. data/app/packs/stylesheets/decidim/admin/_decidim.scss +0 -1
  110. data/app/packs/stylesheets/decidim/admin/modules/_autocomplete.scss +5 -0
  111. data/app/packs/stylesheets/decidim/admin/modules/_forms.scss +6 -0
  112. data/app/packs/stylesheets/decidim/admin/modules/_modules.scss +2 -0
  113. data/app/packs/stylesheets/decidim/admin/modules/_upload_modal.scss +42 -0
  114. data/app/permissions/decidim/admin/permissions.rb +1 -0
  115. data/app/presenters/decidim/admin/dashboard_metric_charts_presenter.rb +3 -1
  116. data/app/queries/decidim/admin/active_users_counter.rb +1 -1
  117. data/app/queries/decidim/admin/newsletter_recipients.rb +2 -2
  118. data/app/queries/decidim/admin/user_filter.rb +1 -1
  119. data/app/queries/decidim/admin/user_groups_evaluation.rb +1 -1
  120. data/app/views/decidim/admin/attachments/index.html.erb +1 -0
  121. data/app/views/decidim/admin/categories/_form.html.erb +0 -4
  122. data/app/views/decidim/admin/categories/show.html.erb +1 -2
  123. data/app/views/decidim/admin/organization_appearance/form/_images.html.erb +5 -4
  124. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +1 -1
  125. data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +20 -1
  126. data/app/views/decidim/admin/reminders/new.html.erb +21 -0
  127. data/app/views/decidim/admin/resource_permissions/edit.html.erb +1 -1
  128. data/app/views/decidim/admin/shared/_gallery.html.erb +6 -1
  129. data/app/views/decidim/admin/shared/_js-callout.html.erb +6 -0
  130. data/app/views/decidim/admin/users_statistics/_users_count.html.erb +2 -2
  131. data/app/views/layouts/decidim/admin/_application.html.erb +2 -0
  132. data/config/locales/ar.yml +15 -4
  133. data/config/locales/bg.yml +1 -0
  134. data/config/locales/ca.yml +22 -4
  135. data/config/locales/cs.yml +24 -4
  136. data/config/locales/de.yml +22 -4
  137. data/config/locales/el.yml +1 -5
  138. data/config/locales/en.yml +21 -4
  139. data/config/locales/eo.yml +1 -0
  140. data/config/locales/es-MX.yml +22 -4
  141. data/config/locales/es-PY.yml +22 -4
  142. data/config/locales/es.yml +22 -4
  143. data/config/locales/eu.yml +1 -5
  144. data/config/locales/fi-plain.yml +22 -4
  145. data/config/locales/fi.yml +22 -4
  146. data/config/locales/fr-CA.yml +22 -4
  147. data/config/locales/fr.yml +36 -18
  148. data/config/locales/ga-IE.yml +1 -0
  149. data/config/locales/gl.yml +16 -4
  150. data/config/locales/hu.yml +196 -3
  151. data/config/locales/id-ID.yml +1 -3
  152. data/config/locales/is-IS.yml +2 -4
  153. data/config/locales/it.yml +6 -5
  154. data/config/locales/ja.yml +21 -4
  155. data/config/locales/lb.yml +1 -5
  156. data/config/locales/lt.yml +994 -0
  157. data/config/locales/lv.yml +1 -3
  158. data/config/locales/nl.yml +83 -5
  159. data/config/locales/no.yml +27 -4
  160. data/config/locales/pl.yml +77 -5
  161. data/config/locales/pt-BR.yml +1 -5
  162. data/config/locales/pt.yml +1 -5
  163. data/config/locales/ro-RO.yml +7 -5
  164. data/config/locales/ru.yml +1 -3
  165. data/config/locales/sk.yml +1 -3
  166. data/config/locales/sl.yml +1 -0
  167. data/config/locales/sr-CS.yml +1 -2
  168. data/config/locales/sv.yml +22 -3
  169. data/config/locales/tr-TR.yml +1 -3
  170. data/config/locales/uk.yml +1 -2
  171. data/config/locales/val-ES.yml +1 -0
  172. data/config/locales/zh-CN.yml +1 -3
  173. data/lib/decidim/admin/engine.rb +0 -1
  174. data/lib/decidim/admin/import/importer.rb +9 -7
  175. data/lib/decidim/admin/import/readers/json.rb +1 -1
  176. data/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +15 -2
  177. data/lib/decidim/admin/test/commands/create_category_examples.rb +16 -6
  178. data/lib/decidim/admin/test/commands/destroy_category_examples.rb +29 -1
  179. data/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb +15 -2
  180. data/lib/decidim/admin/test/commands/update_category_examples.rb +16 -6
  181. data/lib/decidim/admin/test/filters_participatory_space_user_roles_examples.rb +4 -4
  182. data/lib/decidim/admin/test/filters_participatory_space_users_examples.rb +4 -4
  183. data/lib/decidim/admin/test/forms/category_form_examples.rb +1 -21
  184. data/lib/decidim/admin/test/manage_attachments_examples.rb +9 -2
  185. data/lib/decidim/admin/test/manage_categories_examples.rb +0 -10
  186. data/lib/decidim/admin/test/manage_component_permissions_examples.rb +0 -2
  187. data/lib/decidim/admin/test/manage_moderations_examples.rb +26 -0
  188. data/lib/decidim/admin/version.rb +1 -1
  189. metadata +21 -15
  190. data/app/packs/src/decidim/admin/autocomplete.component.js +0 -146
  191. data/app/packs/src/decidim/admin/autocomplete.component.test.js +0 -19
  192. data/app/packs/stylesheets/decidim/admin/components/_autocomplete_select.component.scss +0 -19
@@ -21,13 +21,6 @@ module Decidim
21
21
  ca: "Nom"
22
22
  }
23
23
  end
24
- let(:description) do
25
- {
26
- en: "Description",
27
- es: "Descripción",
28
- ca: "Descripció"
29
- }
30
- end
31
24
  let(:parent_id) { nil }
32
25
  let(:attributes) do
33
26
  {
@@ -35,10 +28,7 @@ module Decidim
35
28
  "name_en" => name[:en],
36
29
  "name_es" => name[:es],
37
30
  "name_ca" => name[:ca],
38
- "parent_id" => parent_id,
39
- "description_en" => description[:en],
40
- "description_es" => description[:es],
41
- "description_ca" => description[:ca]
31
+ "parent_id" => parent_id
42
32
  }
43
33
  }
44
34
  end
@@ -59,16 +49,6 @@ module Decidim
59
49
  it { is_expected.to be_invalid }
60
50
  end
61
51
 
62
- context "when some language in description is missing" do
63
- let(:description) do
64
- {
65
- ca: "Descripció"
66
- }
67
- end
68
-
69
- it { is_expected.to be_invalid }
70
- end
71
-
72
52
  context "when the parent_id is set" do
73
53
  let!(:category) { create :category, participatory_space: participatory_space }
74
54
 
@@ -48,8 +48,11 @@ shared_examples "manage attachments examples" do
48
48
  es: "Este documento contiene información importante",
49
49
  ca: "Aquest document conté informació important"
50
50
  )
51
+ end
52
+
53
+ dynamically_attach_file(:attachment_file, Decidim::Dev.asset("Exampledocument.pdf"))
51
54
 
52
- attach_file :attachment_file, Decidim::Dev.asset("Exampledocument.pdf")
55
+ within ".new_attachment" do
53
56
  find("*[type=submit]").click
54
57
  end
55
58
 
@@ -81,7 +84,11 @@ shared_examples "manage attachments examples" do
81
84
  )
82
85
 
83
86
  select translated(attachment_collection.name, locale: :en), from: "attachment_attachment_collection_id"
84
- attach_file :attachment_file, Decidim::Dev.asset("Exampledocument.pdf")
87
+ end
88
+
89
+ dynamically_attach_file(:attachment_file, Decidim::Dev.asset("Exampledocument.pdf"))
90
+
91
+ within ".new_attachment" do
85
92
  find("*[type=submit]").click
86
93
  end
87
94
 
@@ -14,9 +14,6 @@ shared_examples "manage categories examples" do
14
14
 
15
15
  expect(page).to have_selector("input#category_name_en[value='#{translated(category.name, locale: :en)}']")
16
16
  expect(page).to have_selector("input#category_weight[value='#{category.weight}']")
17
- within ".editor .editor-container" do
18
- expect(page).to have_content(strip_tags(translated(category.description, locale: :en)))
19
- end
20
17
 
21
18
  expect(page).to have_selector("select#category_parent_id")
22
19
  end
@@ -32,13 +29,6 @@ shared_examples "manage categories examples" do
32
29
  es: "Mi categoría",
33
30
  ca: "La meva categoria"
34
31
  )
35
- fill_in_i18n_editor(
36
- :category_description,
37
- "#category-description-tabs",
38
- en: "Description",
39
- es: "Descripción",
40
- ca: "Descripció"
41
- )
42
32
 
43
33
  find("*[type=submit]").click
44
34
  end
@@ -52,9 +52,7 @@ shared_examples "Managing component permissions" do
52
52
 
53
53
  context "when failing to set permissions" do
54
54
  before do
55
- # rubocop:disable RSpec/AnyInstance
56
55
  allow_any_instance_of(Decidim::Admin::PermissionsForm).to receive(:valid?).and_return(false)
57
- # rubocop:enable RSpec/AnyInstance
58
56
  within ".component-#{component.id}" do
59
57
  click_link "Permissions"
60
58
  end
@@ -1,5 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ shared_examples "sorted moderations" do
4
+ let!(:moderations) do
5
+ reportables.first(reportables.length - 1).map do |reportable|
6
+ moderation = create(:moderation, reportable: reportable, report_count: 1, reported_content: reportable.reported_searchable_content_text)
7
+ create(:report, moderation: moderation)
8
+ moderation
9
+ end
10
+ end
11
+ let!(:moderation) { moderations.first }
12
+ let(:moderations_link_text) { "Moderations" }
13
+
14
+ before do
15
+ visit participatory_space_path
16
+ click_link moderations_link_text
17
+ end
18
+
19
+ it "sorts the most recent first" do
20
+ within ".pagination" do
21
+ click_link "Last"
22
+ end
23
+ all("tbody tr").each_with_index do |row, _index|
24
+ expect(row.find("td:first-child")).to have_content(reportables.first.id)
25
+ end
26
+ end
27
+ end
28
+
3
29
  shared_examples "manage moderations" do
4
30
  let!(:moderations) do
5
31
  reportables.first(reportables.length - 1).map do |reportable|
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-admin version.
5
5
  module Admin
6
6
  def self.version
7
- "0.26.2"
7
+ "0.27.0.rc2"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.2
4
+ version: 0.27.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-06-14 00:00:00.000000000 Z
13
+ date: 2022-09-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_link_to
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.26.2
35
+ version: 0.27.0.rc2
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.26.2
42
+ version: 0.27.0.rc2
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: devise
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -88,28 +88,28 @@ dependencies:
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.26.2
91
+ version: 0.27.0.rc2
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.26.2
98
+ version: 0.27.0.rc2
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-participatory_processes
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.26.2
105
+ version: 0.27.0.rc2
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.26.2
112
+ version: 0.27.0.rc2
113
113
  description: Organization administration to manage a single organization.
114
114
  email:
115
115
  - josepjaume@gmail.com
@@ -121,6 +121,8 @@ extra_rdoc_files: []
121
121
  files:
122
122
  - README.md
123
123
  - Rakefile
124
+ - app/cells/decidim/admin/attachments_privacy_warning/show.erb
125
+ - app/cells/decidim/admin/attachments_privacy_warning_cell.rb
124
126
  - app/cells/decidim/admin/content_block/show.erb
125
127
  - app/cells/decidim/admin/content_block_cell.rb
126
128
  - app/cells/decidim/admin/results_per_page/show.erb
@@ -243,6 +245,7 @@ files:
243
245
  - app/controllers/decidim/admin/organization_external_domain_whitelist_controller.rb
244
246
  - app/controllers/decidim/admin/organization_homepage_content_blocks_controller.rb
245
247
  - app/controllers/decidim/admin/organization_homepage_controller.rb
248
+ - app/controllers/decidim/admin/reminders_controller.rb
246
249
  - app/controllers/decidim/admin/resource_permissions_controller.rb
247
250
  - app/controllers/decidim/admin/scope_types_controller.rb
248
251
  - app/controllers/decidim/admin/scopes_controller.rb
@@ -303,6 +306,7 @@ files:
303
306
  - app/helpers/decidim/admin/moderations_helper.rb
304
307
  - app/helpers/decidim/admin/newsletters_helper.rb
305
308
  - app/helpers/decidim/admin/paginable/per_page_helper.rb
309
+ - app/helpers/decidim/admin/reminders_helper.rb
306
310
  - app/helpers/decidim/admin/resource_permissions_helper.rb
307
311
  - app/helpers/decidim/admin/resource_scope_helper.rb
308
312
  - app/helpers/decidim/admin/scopes_helper.rb
@@ -320,11 +324,10 @@ files:
320
324
  - app/models/decidim/admin/fake_newsletter.rb
321
325
  - app/packs/entrypoints/decidim_admin.js
322
326
  - app/packs/entrypoints/decidim_admin.scss
327
+ - app/packs/src/decidim/admin/admin_autocomplete.js
323
328
  - app/packs/src/decidim/admin/application.js
324
329
  - app/packs/src/decidim/admin/auto_buttons_by_position.component.js
325
330
  - app/packs/src/decidim/admin/auto_label_by_position.component.js
326
- - app/packs/src/decidim/admin/autocomplete.component.js
327
- - app/packs/src/decidim/admin/autocomplete.component.test.js
328
331
  - app/packs/src/decidim/admin/budget_rule_toggler.component.js
329
332
  - app/packs/src/decidim/admin/choose_language.js
330
333
  - app/packs/src/decidim/admin/draggable-list.js
@@ -351,7 +354,6 @@ files:
351
354
  - app/packs/stylesheets/decidim/admin/application.scss
352
355
  - app/packs/stylesheets/decidim/admin/bundle.scss
353
356
  - app/packs/stylesheets/decidim/admin/components/_accordion.scss
354
- - app/packs/stylesheets/decidim/admin/components/_autocomplete_select.component.scss
355
357
  - app/packs/stylesheets/decidim/admin/components/_dropdown-menu.scss
356
358
  - app/packs/stylesheets/decidim/admin/components/_sortable.scss
357
359
  - app/packs/stylesheets/decidim/admin/extra/_action-icon.scss
@@ -373,6 +375,7 @@ files:
373
375
  - app/packs/stylesheets/decidim/admin/extra/_title_bar.scss
374
376
  - app/packs/stylesheets/decidim/admin/modules/_action-icon.scss
375
377
  - app/packs/stylesheets/decidim/admin/modules/_agenda.scss
378
+ - app/packs/stylesheets/decidim/admin/modules/_autocomplete.scss
376
379
  - app/packs/stylesheets/decidim/admin/modules/_buttons.scss
377
380
  - app/packs/stylesheets/decidim/admin/modules/_callouts.scss
378
381
  - app/packs/stylesheets/decidim/admin/modules/_card-grid.scss
@@ -398,6 +401,7 @@ files:
398
401
  - app/packs/stylesheets/decidim/admin/modules/_tabs.scss
399
402
  - app/packs/stylesheets/decidim/admin/modules/_title-bar.scss
400
403
  - app/packs/stylesheets/decidim/admin/modules/_typography.scss
404
+ - app/packs/stylesheets/decidim/admin/modules/_upload_modal.scss
401
405
  - app/packs/stylesheets/decidim/admin/modules/_user-login.scss
402
406
  - app/packs/stylesheets/decidim/admin/modules/_users_statistics.scss
403
407
  - app/packs/stylesheets/decidim/admin/plugins/_foundation-datepicker.scss
@@ -529,6 +533,7 @@ files:
529
533
  - app/views/decidim/admin/participatory_space_private_users/index.html.erb
530
534
  - app/views/decidim/admin/participatory_space_private_users/new.html.erb
531
535
  - app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb
536
+ - app/views/decidim/admin/reminders/new.html.erb
532
537
  - app/views/decidim/admin/resource_permissions/_options_form.html.erb
533
538
  - app/views/decidim/admin/resource_permissions/edit.html.erb
534
539
  - app/views/decidim/admin/scope_types/_form.html.erb
@@ -542,6 +547,7 @@ files:
542
547
  - app/views/decidim/admin/share_tokens/_share_tokens.html.erb
543
548
  - app/views/decidim/admin/shared/_filters.html.erb
544
549
  - app/views/decidim/admin/shared/_gallery.html.erb
550
+ - app/views/decidim/admin/shared/_js-callout.html.erb
545
551
  - app/views/decidim/admin/shared/landing_page/edit.html.erb
546
552
  - app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb
547
553
  - app/views/decidim/admin/static_page_topics/_form.html.erb
@@ -698,14 +704,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
698
704
  requirements:
699
705
  - - ">="
700
706
  - !ruby/object:Gem::Version
701
- version: '2.7'
707
+ version: '3.0'
702
708
  required_rubygems_version: !ruby/object:Gem::Requirement
703
709
  requirements:
704
- - - ">="
710
+ - - ">"
705
711
  - !ruby/object:Gem::Version
706
- version: '0'
712
+ version: 1.3.1
707
713
  requirements: []
708
- rubygems_version: 3.1.6
714
+ rubygems_version: 3.2.22
709
715
  signing_key:
710
716
  specification_version: 4
711
717
  summary: Decidim organization administration
@@ -1,146 +0,0 @@
1
- /* eslint no-unused-vars: 0 */
2
- /* eslint consistent-return: 0 */
3
-
4
- import axios from "axios";
5
- import * as React from "react";
6
- import { Async as AsyncSelect } from "react-select";
7
- import "react-select/scss/default.scss";
8
- import PropTypes from "prop-types";
9
-
10
- export class Autocomplete extends React.Component {
11
- constructor(props) {
12
- super(props);
13
-
14
- this.minCharactersToSearch = 3;
15
-
16
- this.handleChange = (selectedOption) => {
17
- this.setState({ selectedOption });
18
- if (this.props.changeURL) {
19
- axios.get(this.props.changeURL, {
20
- headers: {
21
- Accept: "text/javascript"
22
- },
23
- withCredentials: true,
24
- params: {
25
- id: selectedOption.value
26
- }
27
- }).
28
- then((response) => {
29
- const script = document.createElement("script");
30
- script.type = "text/javascript";
31
- script.innerHTML = response.data;
32
- document.getElementsByTagName("head")[0].appendChild(script);
33
- }).
34
- catch((error) => {
35
- if (axios.isCancel(error)) {
36
- // console.log("Request canceled", error.message);
37
- }
38
- else {
39
- //
40
- }
41
- });
42
- }
43
- };
44
-
45
- this.filterOptions = (options, filter, excludeOptions) => {
46
- // Do no filtering, just return all options because
47
- // we return a filtered set from server
48
- return options;
49
- };
50
-
51
- this.onInputChange = (query) => {
52
- if (query.length < this.minCharactersToSearch) {
53
- this.setState({ noResultsText: this.props.searchPromptText });
54
- }
55
- else {
56
- this.setState({ noResultsText: this.props.noResultsText });
57
- }
58
- };
59
-
60
- this.loadOptions = (query, callback) => {
61
- const lowerQuery = query.toLowerCase();
62
-
63
- if (this.cancelTokenSource) {
64
- this.cancelTokenSource.cancel();
65
- }
66
-
67
- if (lowerQuery.length < this.minCharactersToSearch) {
68
- return callback(null, { options: [], complete: false });
69
- }
70
-
71
- this.cancelTokenSource = axios.CancelToken.source();
72
- axios.get(this.props.searchURL, {
73
- cancelToken: this.cancelTokenSource.token,
74
- headers: {
75
- Accept: "application/json"
76
- },
77
- withCredentials: true,
78
- params: {
79
- term: lowerQuery
80
- }
81
- }).
82
- then((response) => {
83
- // CAREFUL! Only set complete to true when there are no more options,
84
- // or more specific queries will not be sent to the server.
85
- return callback(null, { options: response.data, complete: true });
86
- }).
87
- catch((error) => {
88
- if (!axios.isCancel(error)) {
89
- return callback(error, { options: [], complete: false });
90
- }
91
- });
92
- };
93
-
94
- this.state = {
95
- options: props.options,
96
- selectedOption: props.selected,
97
- searchPromptText: props.searchPromptText,
98
- noResultsText: props.noResultsText
99
- };
100
- }
101
-
102
- render() {
103
- const { autoload, name, placeholder } = this.props;
104
- const { selectedOption, options, searchPromptText, noResultsText } = this.state;
105
-
106
- return (
107
- React.createElement("div", { className: "autocomplete-field" },
108
- React.createElement(AsyncSelect, {
109
- cache: false,
110
- name: name,
111
- value: selectedOption,
112
- options: options,
113
- placeholder: placeholder,
114
- searchPromptText: searchPromptText,
115
- noResultsText: noResultsText,
116
- onChange: this.handleChange,
117
- onInputChange: this.onInputChange,
118
- loadOptions: this.loadOptions,
119
- filterOptions: this.filterOptions,
120
- autoload: autoload,
121
- removeSelected: true,
122
- escapeClearsValue: false,
123
- onCloseResetsInput: false
124
- })
125
- )
126
- );
127
- }
128
- }
129
-
130
- Autocomplete.defaultProps = {
131
- autoload: false
132
- };
133
-
134
- Autocomplete.propTypes = {
135
- changeURL: PropTypes.string,
136
- searchPromptText: PropTypes.string,
137
- noResultsText: PropTypes.string,
138
- searchURL: PropTypes.string,
139
- selected: PropTypes.string,
140
- options: PropTypes.array,
141
- autoload: PropTypes.bool,
142
- name: PropTypes.string,
143
- placeholder: PropTypes.string
144
- }
145
-
146
- export default Autocomplete;
@@ -1,19 +0,0 @@
1
- import { shallow } from "enzyme";
2
- import * as React from "react";
3
- import Autocomplete from "./autocomplete.component";
4
-
5
- describe("<Autocomplete />", () => {
6
- const name = "custom[name]";
7
- const selected = "";
8
- const options = [];
9
- const placeholder = "Pick a value";
10
- const noResultsText = "No results found";
11
- const searchPromptText = "Type to search";
12
- const searchURL = "/some/url";
13
- const changeURL = "/some/other/url";
14
-
15
- it("renders a div of Select", () => {
16
- const wrapper = shallow(<Autocomplete name={name} selected={selected} options={options} noResultsText={noResultsText} placeholder={placeholder} searchPromptText={searchPromptText} searchURL={searchURL} changeURL={changeURL} />);
17
- expect(wrapper.find(".autocomplete-field").exists()).toBeTruthy();
18
- });
19
- });
@@ -1,19 +0,0 @@
1
- .autocomplete-field{
2
- margin-bottom: 1.5rem;
3
-
4
- .Select{
5
- .Select-control,
6
- .Select-input,
7
- .Select-placeholder,
8
- &.Select--single > .Select-control .Select-value{
9
- height: 3rem;
10
- line-height: 3rem;
11
- }
12
- }
13
- }
14
-
15
- .autocomplete-field--results-inline{
16
- .Select-menu-outer{
17
- position: relative;
18
- }
19
- }