decidim-dev 0.26.7 → 0.26.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 119ef97add3f53531ee8847b70d8f86b6b1e4a490e4f1ccb5ee542fa3d1ae749
4
- data.tar.gz: aac00b66271bbecb6e236b42a4c3abd1da0c2e2ca660bb9e88b0354be6daac90
3
+ metadata.gz: e4f0ecb7ea62101dcbfb23c680215480aa30347d63a8e6bf761242e570905d8e
4
+ data.tar.gz: 2813fd9504741b8181d000db7c971bd83fd159ab399d8e43b219a13a59e85175
5
5
  SHA512:
6
- metadata.gz: 3c1af120c4e9e2268713424cab565f642eff90ff668926aebdb6f7a4b3ef86f898ede76e8908ab2cae11b474ac1d85f8927c24c780c8bbfbdb54900989b1a0a9
7
- data.tar.gz: 1952122960497e058aef2b6d72a4265314bafea382358cdb27f6636f931196577756b653ac7d67082ad5db4bc3e8311c4c6685b217071dd312febf2fc3d1cffa
6
+ metadata.gz: 9f5f706144e6452fa33af9419b7454fa1c7f465170ee7d64d8d0b9140b62fb6500f349f63dd6c512bf3ae1cc2dfd46080554972e933c3e85f2b503cba6e67e74
7
+ data.tar.gz: '055957ada7b160781d95d5aacfa771701cca93005400fcf3417c40a4e9c7ae3643f6d30ebf60f8cdd8d136babf77eb3057681bc4905dc5822fc2f60e7ebc87ab'
@@ -0,0 +1 @@
1
+ import "src/decidim/dev/test/custom_map_factory";
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Example of a custom map controller and how to override the
3
+ * `createMapController` factory method. To use it in the ERB view, add the
4
+ * following snippet to any view:
5
+ *
6
+ * <%= dynamic_map_for type: "custom", markers: [{ title: "Test 1", latitude: 41.385063, longitude: 2.173404 }], popup_template_id: "custom-popup" do %>
7
+ * <% javascript_pack_tag("decidim_dev_test_custom_map") %>
8
+ * <template id="custom-popup">
9
+ * <div>
10
+ * <h3>${title}</h3>
11
+ * </div>
12
+ * </template>
13
+ * <% end %>
14
+ */
15
+
16
+ import MapMarkersController from "src/decidim/map/controller/markers";
17
+
18
+ const appendToBody = (content) => {
19
+ const p = document.createElement("p");
20
+ p.innerHTML = content;
21
+ document.body.appendChild(p);
22
+ }
23
+
24
+ class CustomMapController extends MapMarkersController {
25
+ start() {
26
+ this.markerClusters = null;
27
+ this.addMarkers(this.config.markers);
28
+
29
+ appendToBody("Custom map started");
30
+ }
31
+ }
32
+
33
+ const origCreateMapController = window.Decidim.createMapController;
34
+
35
+ const createMapController = (mapId, config) => {
36
+ if (config.type === "custom") {
37
+ return new CustomMapController(mapId, config);
38
+ }
39
+
40
+ return origCreateMapController(mapId, config);
41
+ }
42
+
43
+ window.Decidim.createMapController = createMapController;
44
+
45
+ // Prevent external requests to the Here URLs during tests
46
+ if (L.TileLayer.HERE) {
47
+ L.TileLayer.HERE.prototype.onAdd = function(map) {};
48
+ }
49
+
50
+ // Test that the map events are working correctly
51
+ $("[data-decidim-map]").on("ready.decidim", (ev, _map, mapConfig) => {
52
+ appendToBody("Custom map ready");
53
+ });
54
+
55
+ appendToBody("LOADED");
data/config/assets.rb CHANGED
@@ -4,5 +4,6 @@ base_path = File.expand_path("..", __dir__)
4
4
 
5
5
  Decidim::Webpacker.register_path("#{base_path}/app/packs")
6
6
  Decidim::Webpacker.register_entrypoints(
7
- decidim_dev: "#{base_path}/app/packs/entrypoints/decidim_dev.js"
7
+ decidim_dev: "#{base_path}/app/packs/entrypoints/decidim_dev.js",
8
+ decidim_dev_test_custom_map: "#{base_path}/app/packs/entrypoints/decidim_dev_test_custom_map.js"
8
9
  )
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Empty line for playing nice with tpope/vim-rails
@@ -23,9 +23,9 @@ cs:
23
23
  readonly_attribute: Atribut pouze pro čtení
24
24
  test: Zkouška A
25
25
  test_choices:
26
- a: Volba A
27
- b: Volba B
28
- c: Volba C
26
+ a: Možnost A
27
+ b: Možnost B
28
+ c: Možnost C
29
29
  test_options:
30
30
  bar: Bar
31
31
  baz: Baz
@@ -56,7 +56,7 @@ cs:
56
56
  unearned_own: Dosud jste nevytvořili žádné testy.
57
57
  resource_links:
58
58
  test_link:
59
- dummy_resource_dummy: Související figurína
59
+ dummy_resource_dummy: Související testovací soubor
60
60
  statistics:
61
61
  bar: Bar
62
62
  dummies_count_high: Figuríny vysoké
@@ -2,7 +2,7 @@ de:
2
2
  activemodel:
3
3
  attributes:
4
4
  dummy_resource:
5
- created_at: Hergestellt in
5
+ created_at: Erstellt am
6
6
  decidim_scope_id: Umfang
7
7
  field: Mein Feld
8
8
  start_date: Startdatum
@@ -14,6 +14,12 @@ de:
14
14
  dummy:
15
15
  settings:
16
16
  global:
17
+ guided: Geführte Eingabe
18
+ guided_help: Hilfetext
19
+ guided_readonly: Deaktivierte Eingabe
20
+ guided_rich: Geführte reiche Eingabe
21
+ guided_rich_help_html: HTML <strong>Hilfe</strong> Text
22
+ guided_rich_readonly_html: HTML <strong>Hilfe</strong> Text für deaktivierte Eingabe
17
23
  readonly_attribute: Attribut schreibgeschützt
18
24
  test: Test A
19
25
  test_choices:
@@ -22,6 +28,7 @@ de:
22
28
  c: Wahl C
23
29
  test_options:
24
30
  bar: Bar
31
+ baz: Baz
25
32
  foo: Foo
26
33
  step:
27
34
  endorsements_blocked: Befürwortungen blockiert
@@ -29,6 +36,7 @@ de:
29
36
  readonly_step_attribute: Schritt-Attribut schreibgeschützt
30
37
  test_options:
31
38
  bar: Bar
39
+ baz: Baz
32
40
  foo: Foo
33
41
  dummy:
34
42
  admin:
@@ -2,8 +2,8 @@ eu:
2
2
  activemodel:
3
3
  attributes:
4
4
  dummy_resource:
5
- created_at: Sortutako at
6
- decidim_scope_id: Eremua
5
+ created_at: Sortua
6
+ decidim_scope_id: Esparrua
7
7
  field: Nire eremua
8
8
  start_date: Hasiera data
9
9
  title: Izenburua
@@ -14,8 +14,14 @@ eu:
14
14
  dummy:
15
15
  settings:
16
16
  global:
17
+ guided: Input gidatua
18
+ guided_help: Laguntza-testua
19
+ guided_readonly: Input desgaitua
20
+ guided_rich: Input gidatu aberastua
21
+ guided_rich_help_html: HTML<strong>ayuda</strong> testua
22
+ guided_rich_readonly_html: HTML<strong>laguntza</strong>testua input desgaiturako
17
23
  readonly_attribute: Soilik irakurtzeko atributua
18
- test: Test bat
24
+ test: Proba bat
19
25
  test_choices:
20
26
  a: A aukera
21
27
  b: B aukera
@@ -35,22 +41,22 @@ eu:
35
41
  dummy:
36
42
  admin:
37
43
  exports:
38
- dummies: Manikiak
44
+ dummies: Probak
39
45
  gamification:
40
46
  badges:
41
47
  test:
42
48
  conditions:
43
49
  - Erabili probako ingurunea erabakitzeko.
44
- description: Erabiltzaileek plaka hau lortzen dute probak sortzeko.
50
+ description: Parte-hartzaileek garaikur hau lortzen dute probak sortzeagatik.
45
51
  description_another: Erabiltzaile honek %{score} proba egin ditu.
46
52
  description_own: '%{score} proba sortu dituzu.'
47
- name: probak
53
+ name: Probak
48
54
  next_level_in: Sortu %{score} proba gehiago hurrengo mailara iristeko!
49
55
  unearned_another: Erabiltzaile honek ez du proba oraindik sortu.
50
- unearned_own: Oraindik ez duzu probak sortu.
56
+ unearned_own: Oraindik ez duzu probarik sortu.
51
57
  resource_links:
52
58
  test_link:
53
- dummy_resource_dummy: ' Honi buruzko adibidea '
59
+ dummy_resource_dummy: ' Honekin lotutako proba'
54
60
  statistics:
55
61
  bar: Bar
56
62
  dummies_count_high: Dummies altua
@@ -14,6 +14,12 @@ pt-BR:
14
14
  dummy:
15
15
  settings:
16
16
  global:
17
+ guided: Entrada guiada
18
+ guided_help: Texto de ajuda
19
+ guided_readonly: Entrada desabilitada
20
+ guided_rich: Entrada de rich text guiada
21
+ guided_rich_help_html: HTML <strong>ajuda</strong> texto
22
+ guided_rich_readonly_html: HTML <strong>ajuda</strong> texto para entrada desativada
17
23
  readonly_attribute: Atributo somente leitura
18
24
  test: Teste A
19
25
  test_choices:
@@ -0,0 +1 @@
1
+ sq:
@@ -15,6 +15,7 @@ sv:
15
15
  settings:
16
16
  global:
17
17
  guided: Guidad ingång
18
+ guided_help: Hjälptext
18
19
  readonly_attribute: Skrivskyddat attribut
19
20
  test: Ett test
20
21
  test_choices:
@@ -0,0 +1 @@
1
+ th:
@@ -47,7 +47,7 @@ module Decidim::Map::Provider
47
47
  def self.add_stub(address, coordinates)
48
48
  stubs.push(
49
49
  properties: address.is_a?(Hash) ? address : { street: address },
50
- geometry: { coordinates: coordinates }
50
+ geometry: { coordinates: coordinates.reverse }
51
51
  )
52
52
  end
53
53
 
@@ -121,7 +121,7 @@ RSpec.configure do |config|
121
121
  country: "Country1"
122
122
  },
123
123
  geometry: {
124
- coordinates: [1.123, 2.234]
124
+ coordinates: [2.234, 1.123]
125
125
  }
126
126
  },
127
127
  {
@@ -132,7 +132,7 @@ RSpec.configure do |config|
132
132
  country: "Country2"
133
133
  },
134
134
  geometry: {
135
- coordinates: [3.345, 4.456]
135
+ coordinates: [4.456, 3.345]
136
136
  }
137
137
  },
138
138
  {
@@ -144,7 +144,7 @@ RSpec.configure do |config|
144
144
  country: "Country3"
145
145
  },
146
146
  geometry: {
147
- coordinates: [5.567, 6.678]
147
+ coordinates: [6.678, 5.567]
148
148
  }
149
149
  }
150
150
  ]
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-dev version.
5
5
  module Dev
6
6
  def self.version
7
- "0.26.7"
7
+ "0.26.9"
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-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.7
4
+ version: 0.26.9
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: 2023-05-11 00:00:00.000000000 Z
13
+ date: 2023-12-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capybara
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.26.7
35
+ version: 0.26.9
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.7
42
+ version: 0.26.9
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: factory_bot_rails
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -54,6 +54,20 @@ dependencies:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
56
  version: '4.8'
57
+ - !ruby/object:Gem::Dependency
58
+ name: axe-core-api
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: 4.7.0
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: 4.7.0
57
71
  - !ruby/object:Gem::Dependency
58
72
  name: axe-core-rspec
59
73
  requirement: !ruby/object:Gem::Requirement
@@ -408,15 +422,18 @@ files:
408
422
  - app/mailers/decidim/dummy_resources/dummy_resource_mailer.rb
409
423
  - app/packs/entrypoints/decidim_dev.js
410
424
  - app/packs/entrypoints/decidim_dev.scss
425
+ - app/packs/entrypoints/decidim_dev_test_custom_map.js
411
426
  - app/packs/images/decidim/decidim_dev_dummy.svg
412
427
  - app/packs/images/decidim/gamification/badges/decidim_gamification_badges_test.svg
413
428
  - app/packs/src/decidim/dev/accessibility.js
429
+ - app/packs/src/decidim/dev/test/custom_map_factory.js
414
430
  - app/packs/stylesheets/decidim/dev.scss
415
431
  - app/packs/stylesheets/decidim/dev/_accessibility.scss
416
432
  - app/views/decidim/dummy_resource/_linked_dummys.html.erb
417
433
  - app/views/decidim/dummy_resources/dummy_resources/foo.html.erb
418
434
  - app/views/decidim/dummy_resources/dummy_resources/show.html.erb
419
435
  - config/assets.rb
436
+ - config/environment.rb
420
437
  - config/locales/am-ET.yml
421
438
  - config/locales/ar-SA.yml
422
439
  - config/locales/ar.yml
@@ -483,9 +500,11 @@ files:
483
500
  - config/locales/sk.yml
484
501
  - config/locales/sl.yml
485
502
  - config/locales/so-SO.yml
503
+ - config/locales/sq-AL.yml
486
504
  - config/locales/sr-CS.yml
487
505
  - config/locales/sv.yml
488
506
  - config/locales/sw-KE.yml
507
+ - config/locales/th-TH.yml
489
508
  - config/locales/ti-ER.yml
490
509
  - config/locales/tr-TR.yml
491
510
  - config/locales/uk.yml