decidim-dev 0.27.3 → 0.27.5
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 +4 -4
- data/app/packs/entrypoints/decidim_dev_test_custom_map.js +1 -0
- data/app/packs/src/decidim/dev/test/custom_map_factory.js +55 -0
- data/config/assets.rb +2 -1
- data/config/environment.rb +3 -0
- data/config/locales/cs.yml +4 -4
- data/config/locales/de.yml +9 -1
- data/config/locales/eu.yml +15 -9
- data/config/locales/pt-BR.yml +6 -0
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sv.yml +1 -0
- data/config/locales/th-TH.yml +1 -0
- data/lib/decidim/dev/test/rspec_support/geocoder.rb +4 -4
- data/lib/decidim/dev/version.rb +1 -1
- metadata +13 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97a5308fe5acbd383f506e3b3ab5fe6a9101f162547ec3f3bc9d1b89e92e8083
|
4
|
+
data.tar.gz: a834814950d0ecb210cbcaa47e7643324ec688c8ba2a87d69d1aa3832228b53b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
)
|
data/config/locales/cs.yml
CHANGED
@@ -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:
|
28
|
-
b:
|
29
|
-
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í
|
60
|
+
dummy_resource_dummy: Související testovací soubor
|
61
61
|
statistics:
|
62
62
|
bar: Bar
|
63
63
|
dummies_count_high: Figuríny vysoké
|
data/config/locales/de.yml
CHANGED
@@ -3,7 +3,7 @@ de:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
dummy_resource:
|
6
|
-
created_at:
|
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:
|
data/config/locales/eu.yml
CHANGED
@@ -3,8 +3,8 @@ eu:
|
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
dummy_resource:
|
6
|
-
created_at:
|
7
|
-
decidim_scope_id:
|
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:
|
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:
|
45
|
+
dummies: Probak
|
40
46
|
gamification:
|
41
47
|
badges:
|
42
48
|
test:
|
43
49
|
conditions:
|
44
50
|
- Erabili probako ingurunea erabakitzeko.
|
45
|
-
description:
|
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:
|
54
|
+
name: Probak
|
49
55
|
next_level_in: Sortu %{score} proba gehiago hurrengo mailara iristeko!
|
50
|
-
unearned_another: Erabiltzaile honek ez du
|
51
|
-
unearned_own: Oraindik ez duzu
|
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
|
60
|
+
dummy_resource_dummy: ' Honi lotutakoa'
|
55
61
|
statistics:
|
56
62
|
bar: Bar
|
57
63
|
dummies_count_high: Dummies altua
|
data/config/locales/pt-BR.yml
CHANGED
@@ -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:
|
data/config/locales/sv.yml
CHANGED
@@ -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: [
|
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: [
|
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: [
|
151
|
+
coordinates: [6.678, 5.567]
|
152
152
|
}
|
153
153
|
}
|
154
154
|
]
|
data/lib/decidim/dev/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
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.
|
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: []
|