decidim-dev 0.27.3 → 0.27.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4adab1ecdbf7a4a0c6f468454cf32adcf66fac1206adca9758f3a08d12c0dee2
4
- data.tar.gz: 2a24af5908cb4003fe8d8fc974d2a79f9c3fd941e5bf6e692478a3d451d5f57c
3
+ metadata.gz: 97a5308fe5acbd383f506e3b3ab5fe6a9101f162547ec3f3bc9d1b89e92e8083
4
+ data.tar.gz: a834814950d0ecb210cbcaa47e7643324ec688c8ba2a87d69d1aa3832228b53b
5
5
  SHA512:
6
- metadata.gz: efaaff6ec51fe371673691569f4a8560dc34635c8101576a717770a342e7da3ad56c675a6ee7494ee21336d70e78a7c66b87fbcb19de1000fe77246867d71d79
7
- data.tar.gz: 0f2b37342a8b765a9c7c58161dea1ea64542ba8026873095873b777468c413cc625368c33937070ec68840e98286ffa4d7812b1f89cf1dc9338af685a18d68f2
6
+ metadata.gz: 9eeba596be6522a72d056d3a4339fe2cb75b5f945d3136bdc0c5ae536e830bdc8fee747453562b75845892b9f6d99bdf2430a1c0cccfd94d45bce6f5e0081d3b
7
+ data.tar.gz: 921b38d3e4cd49b1c2e5ea9af6e1fb6a269a9440c37b086cb058e90e1525883499bc25cbab1da149e58ee32851baf0ef6cd3773ebb417572309b7a61cc119c3a
@@ -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
@@ -24,9 +24,9 @@ cs:
24
24
  readonly_attribute: Atribut pouze pro čtení
25
25
  test: Zkouška A
26
26
  test_choices:
27
- a: Volba A
28
- b: Volba B
29
- c: Volba C
27
+ a: Možnost A
28
+ b: Možnost B
29
+ c: Možnost C
30
30
  test_options:
31
31
  bar: Bar
32
32
  baz: Baz
@@ -57,7 +57,7 @@ cs:
57
57
  unearned_own: Dosud jste nevytvořili žádné testy.
58
58
  resource_links:
59
59
  test_link:
60
- dummy_resource_dummy: Související figurína
60
+ dummy_resource_dummy: Související testovací soubor
61
61
  statistics:
62
62
  bar: Bar
63
63
  dummies_count_high: Figuríny vysoké
@@ -3,7 +3,7 @@ de:
3
3
  activemodel:
4
4
  attributes:
5
5
  dummy_resource:
6
- created_at: Hergestellt in
6
+ created_at: Erstellt am
7
7
  decidim_scope_id: Umfang
8
8
  field: Mein Feld
9
9
  start_date: Startdatum
@@ -15,6 +15,12 @@ de:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Geführte Eingabe
19
+ guided_help: Hilfetext
20
+ guided_readonly: Deaktivierte Eingabe
21
+ guided_rich: Geführte reiche Eingabe
22
+ guided_rich_help_html: HTML <strong>Hilfe</strong> Text
23
+ guided_rich_readonly_html: HTML <strong>Hilfe</strong> Text für deaktivierte Eingabe
18
24
  readonly_attribute: Attribut schreibgeschützt
19
25
  test: Test A
20
26
  test_choices:
@@ -23,6 +29,7 @@ de:
23
29
  c: Wahl C
24
30
  test_options:
25
31
  bar: Bar
32
+ baz: Baz
26
33
  foo: Foo
27
34
  step:
28
35
  endorsements_blocked: Befürwortungen blockiert
@@ -30,6 +37,7 @@ de:
30
37
  readonly_step_attribute: Schritt-Attribut schreibgeschützt
31
38
  test_options:
32
39
  bar: Bar
40
+ baz: Baz
33
41
  foo: Foo
34
42
  dummy:
35
43
  admin:
@@ -3,8 +3,8 @@ eu:
3
3
  activemodel:
4
4
  attributes:
5
5
  dummy_resource:
6
- created_at: Sortutako at
7
- decidim_scope_id: Eremua
6
+ created_at: Sortua
7
+ decidim_scope_id: Esparrua
8
8
  field: Nire eremua
9
9
  start_date: Hasiera data
10
10
  title: Izenburua
@@ -15,8 +15,14 @@ eu:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Input gidatua
19
+ guided_help: Laguntza-testua
20
+ guided_readonly: Input desgaitua
21
+ guided_rich: Input gidatu aberastua
22
+ guided_rich_help_html: HTML<strong>ayuda</strong> testua
23
+ guided_rich_readonly_html: HTML<strong>laguntza</strong>testua input desgaiturako
18
24
  readonly_attribute: Soilik irakurtzeko atributua
19
- test: Test bat
25
+ test: Proba bat
20
26
  test_choices:
21
27
  a: A aukera
22
28
  b: B aukera
@@ -36,22 +42,22 @@ eu:
36
42
  dummy:
37
43
  admin:
38
44
  exports:
39
- dummies: Manikiak
45
+ dummies: Probak
40
46
  gamification:
41
47
  badges:
42
48
  test:
43
49
  conditions:
44
50
  - Erabili probako ingurunea erabakitzeko.
45
- description: Erabiltzaileek plaka hau lortzen dute probak sortzeko.
51
+ description: Parte-hartzaileek garaikur hau lortzen dute probak sortzeagatik.
46
52
  description_another: Erabiltzaile honek %{score} proba egin ditu.
47
53
  description_own: '%{score} proba sortu dituzu.'
48
- name: probak
54
+ name: Probak
49
55
  next_level_in: Sortu %{score} proba gehiago hurrengo mailara iristeko!
50
- unearned_another: Erabiltzaile honek ez du proba oraindik sortu.
51
- unearned_own: Oraindik ez duzu probak sortu.
56
+ unearned_another: Erabiltzaile honek ez du probarik sortu oraindik.
57
+ unearned_own: Oraindik ez duzu probarik sortu.
52
58
  resource_links:
53
59
  test_link:
54
- dummy_resource_dummy: ' Honi buruzko adibidea '
60
+ dummy_resource_dummy: ' Honi lotutakoa'
55
61
  statistics:
56
62
  bar: Bar
57
63
  dummies_count_high: Dummies altua
@@ -15,6 +15,12 @@ pt-BR:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Entrada guiada
19
+ guided_help: Texto de ajuda
20
+ guided_readonly: Entrada desabilitada
21
+ guided_rich: Entrada de rich text guiada
22
+ guided_rich_help_html: HTML <strong>ajuda</strong> texto
23
+ guided_rich_readonly_html: HTML <strong>ajuda</strong> texto para entrada desativada
18
24
  readonly_attribute: Atributo somente leitura
19
25
  test: Teste A
20
26
  test_choices:
@@ -0,0 +1 @@
1
+ sq:
@@ -16,6 +16,7 @@ sv:
16
16
  settings:
17
17
  global:
18
18
  guided: Guidad ingång
19
+ guided_help: Hjälptext
19
20
  readonly_attribute: Skrivskyddat attribut
20
21
  test: Ett test
21
22
  test_choices:
@@ -0,0 +1 @@
1
+ th:
@@ -49,7 +49,7 @@ module Decidim::Map::Provider
49
49
  def self.add_stub(address, coordinates)
50
50
  stubs.push(
51
51
  properties: address.is_a?(Hash) ? address : { street: address },
52
- geometry: { coordinates: coordinates }
52
+ geometry: { coordinates: coordinates.reverse }
53
53
  )
54
54
  end
55
55
 
@@ -125,7 +125,7 @@ RSpec.configure do |config|
125
125
  country: "Country1"
126
126
  },
127
127
  geometry: {
128
- coordinates: [1.123, 2.234]
128
+ coordinates: [2.234, 1.123]
129
129
  }
130
130
  },
131
131
  {
@@ -136,7 +136,7 @@ RSpec.configure do |config|
136
136
  country: "Country2"
137
137
  },
138
138
  geometry: {
139
- coordinates: [3.345, 4.456]
139
+ coordinates: [4.456, 3.345]
140
140
  }
141
141
  },
142
142
  {
@@ -148,7 +148,7 @@ RSpec.configure do |config|
148
148
  country: "Country3"
149
149
  },
150
150
  geometry: {
151
- coordinates: [5.567, 6.678]
151
+ coordinates: [6.678, 5.567]
152
152
  }
153
153
  }
154
154
  ]
@@ -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.27.3"
7
+ "0.27.5"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.3
4
+ version: 0.27.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
8
8
  - Marc Riera Casals
9
9
  - Oriol Gual Oliva
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-05-11 00:00:00.000000000 Z
13
+ date: 2023-12-20 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.27.3
35
+ version: 0.27.5
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.27.3
42
+ version: 0.27.5
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: factory_bot_rails
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -408,15 +408,18 @@ files:
408
408
  - app/mailers/decidim/dummy_resources/dummy_resource_mailer.rb
409
409
  - app/packs/entrypoints/decidim_dev.js
410
410
  - app/packs/entrypoints/decidim_dev.scss
411
+ - app/packs/entrypoints/decidim_dev_test_custom_map.js
411
412
  - app/packs/images/decidim/decidim_dev_dummy.svg
412
413
  - app/packs/images/decidim/gamification/badges/decidim_gamification_badges_test.svg
413
414
  - app/packs/src/decidim/dev/accessibility.js
415
+ - app/packs/src/decidim/dev/test/custom_map_factory.js
414
416
  - app/packs/stylesheets/decidim/dev.scss
415
417
  - app/packs/stylesheets/decidim/dev/_accessibility.scss
416
418
  - app/views/decidim/dummy_resource/_linked_dummys.html.erb
417
419
  - app/views/decidim/dummy_resources/dummy_resources/foo.html.erb
418
420
  - app/views/decidim/dummy_resources/dummy_resources/show.html.erb
419
421
  - config/assets.rb
422
+ - config/environment.rb
420
423
  - config/locales/am-ET.yml
421
424
  - config/locales/ar-SA.yml
422
425
  - config/locales/ar.yml
@@ -483,9 +486,11 @@ files:
483
486
  - config/locales/sk.yml
484
487
  - config/locales/sl.yml
485
488
  - config/locales/so-SO.yml
489
+ - config/locales/sq-AL.yml
486
490
  - config/locales/sr-CS.yml
487
491
  - config/locales/sv.yml
488
492
  - config/locales/sw-KE.yml
493
+ - config/locales/th-TH.yml
489
494
  - config/locales/ti-ER.yml
490
495
  - config/locales/tr-TR.yml
491
496
  - config/locales/uk.yml
@@ -606,7 +611,7 @@ homepage: https://github.com/decidim/decidim
606
611
  licenses:
607
612
  - AGPL-3.0
608
613
  metadata: {}
609
- post_install_message:
614
+ post_install_message:
610
615
  rdoc_options: []
611
616
  require_paths:
612
617
  - lib
@@ -621,8 +626,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
621
626
  - !ruby/object:Gem::Version
622
627
  version: '0'
623
628
  requirements: []
624
- rubygems_version: 3.2.22
625
- signing_key:
629
+ rubygems_version: 3.4.22
630
+ signing_key:
626
631
  specification_version: 4
627
632
  summary: Decidim dev tools
628
633
  test_files: []