decidim-navigation_maps 1.1.1 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -5
  3. data/Rakefile +18 -0
  4. data/app/cells/decidim/navigation_maps/content_blocks/groups_navigation_map_cell.rb +21 -0
  5. data/app/cells/decidim/navigation_maps/content_blocks/navigation_map/_tabs_content.erb +1 -1
  6. data/app/cells/decidim/navigation_maps/content_blocks/navigation_map/show.erb +6 -6
  7. data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_cell.rb +31 -0
  8. data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form/_form.erb +4 -4
  9. data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form/_tabs_content.erb +0 -1
  10. data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form/show.erb +7 -3
  11. data/app/cells/decidim/navigation_maps/content_blocks/navigation_map_settings_form_cell.rb +10 -1
  12. data/app/commands/decidim/navigation_maps/save_blueprints.rb +7 -1
  13. data/app/controllers/decidim/navigation_maps/admin/blueprints_controller.rb +3 -3
  14. data/app/forms/decidim/navigation_maps/area_form.rb +1 -1
  15. data/app/forms/decidim/navigation_maps/blueprint_form.rb +1 -0
  16. data/app/forms/decidim/navigation_maps/blueprint_forms.rb +1 -0
  17. data/app/jobs/decidim/navigation_maps/migrate_legacy_images_job.rb +32 -0
  18. data/app/models/decidim/navigation_maps/blueprint.rb +5 -3
  19. data/app/packs/entrypoints/decidim_admin_navigation_maps.js +4 -0
  20. data/app/packs/entrypoints/decidim_admin_navigation_maps.scss +1 -0
  21. data/app/packs/entrypoints/decidim_navigation_maps.js +7 -0
  22. data/app/packs/entrypoints/decidim_navigation_maps.scss +1 -0
  23. data/app/packs/src/decidim/navigation_maps/admin/map_editor.js +83 -0
  24. data/app/packs/src/decidim/navigation_maps/admin/navigation_maps.js +154 -0
  25. data/app/packs/src/decidim/navigation_maps/map_view.js +125 -0
  26. data/app/packs/src/decidim/navigation_maps/navigation_maps.js +43 -0
  27. data/app/{assets → packs}/stylesheets/decidim/navigation_maps/_variables.scss +0 -0
  28. data/app/{assets → packs}/stylesheets/decidim/navigation_maps/admin/navigation_maps.scss +4 -4
  29. data/app/{assets → packs}/stylesheets/decidim/navigation_maps/navigation_maps.scss +1 -2
  30. data/app/queries/decidim/navigation_maps/content_block_blueprints.rb +20 -0
  31. data/app/uploaders/decidim/navigation_maps/blueprint_uploader.rb +4 -12
  32. data/app/uploaders/decidim/navigation_maps/cw/blueprint_uploader.rb +24 -0
  33. data/config/assets.rb +41 -0
  34. data/config/locales/ca.yml +1 -0
  35. data/config/locales/cs.yml +2 -1
  36. data/config/locales/en.yml +1 -0
  37. data/config/locales/es.yml +1 -0
  38. data/db/migrate/20201105130724_add_reference_to_content_block_to_blueprints_table.rb +12 -0
  39. data/db/seeds/pla-cerda.jpg +0 -0
  40. data/db/seeds.rb +62 -11
  41. data/lib/decidim/navigation_maps/admin_engine.rb +0 -4
  42. data/lib/decidim/navigation_maps/engine.rb +16 -4
  43. data/lib/decidim/navigation_maps/navigation_map_cell_helpers.rb +4 -4
  44. data/lib/decidim/navigation_maps/test/factories.rb +1 -0
  45. data/lib/decidim/navigation_maps/version.rb +2 -2
  46. data/lib/decidim/navigation_maps.rb +0 -2
  47. data/lib/tasks/custom_seeds.rake +8 -0
  48. data/lib/tasks/decidim_navigation_maps_webpacker_tasks.rake +58 -0
  49. data/lib/tasks/navigation_maps_active_storage_migration_tasks.rake +37 -0
  50. data/package.json +197 -0
  51. metadata +39 -48
  52. data/app/assets/config/admin/decidim_navigation_maps_manifest.css +0 -3
  53. data/app/assets/config/admin/decidim_navigation_maps_manifest.js +0 -3
  54. data/app/assets/config/decidim_navigation_maps_manifest.css +0 -3
  55. data/app/assets/config/decidim_navigation_maps_manifest.js +0 -1
  56. data/app/assets/images/decidim/navigation_maps/icon.svg +0 -1
  57. data/app/assets/javascripts/decidim/navigation_maps/admin/map_editor.js +0 -88
  58. data/app/assets/javascripts/decidim/navigation_maps/admin/navigation_maps.js +0 -143
  59. data/app/assets/javascripts/decidim/navigation_maps/map_view.js +0 -123
  60. data/app/assets/javascripts/decidim/navigation_maps/navigation_maps.js +0 -44
  61. data/vendor/assets/images/draw/layers-2x.png +0 -0
  62. data/vendor/assets/images/draw/layers.png +0 -0
  63. data/vendor/assets/images/draw/marker-icon-2x.png +0 -0
  64. data/vendor/assets/images/draw/marker-icon.png +0 -0
  65. data/vendor/assets/images/draw/marker-shadow.png +0 -0
  66. data/vendor/assets/images/draw/spritesheet-2x.png +0 -0
  67. data/vendor/assets/images/draw/spritesheet.png +0 -0
  68. data/vendor/assets/images/draw/spritesheet.svg +0 -156
  69. data/vendor/assets/images/images/layers-2x.png +0 -0
  70. data/vendor/assets/images/images/layers.png +0 -0
  71. data/vendor/assets/images/images/marker-icon-2x.png +0 -0
  72. data/vendor/assets/images/images/marker-icon.png +0 -0
  73. data/vendor/assets/images/images/marker-shadow.png +0 -0
  74. data/vendor/assets/javascripts/jquery.form.js +0 -1277
  75. data/vendor/assets/javascripts/jsrender.min.js +0 -4
  76. data/vendor/assets/javascripts/jsrender.min.js.map +0 -1
  77. data/vendor/assets/javascripts/leaflet-geoman.min.js +0 -1
  78. data/vendor/assets/javascripts/leaflet.js +0 -5
  79. data/vendor/assets/stylesheets/leaflet-geoman.css +0 -164
@@ -9,10 +9,6 @@ module Decidim
9
9
  class Engine < ::Rails::Engine
10
10
  isolate_namespace Decidim::NavigationMaps
11
11
 
12
- initializer "decidim_navigation_maps.assets" do |app|
13
- app.config.assets.precompile += %w(decidim_navigation_maps_manifest.js decidim_navigation_maps_manifest.css)
14
- end
15
-
16
12
  initializer "decidim.navigation_maps.content_blocks" do
17
13
  Decidim.content_blocks.register(:homepage, :navigation_map) do |content_block|
18
14
  content_block.cell = "decidim/navigation_maps/content_blocks/navigation_map"
@@ -21,6 +17,18 @@ module Decidim
21
17
 
22
18
  content_block.settings do |settings|
23
19
  settings.attribute :title, type: :text, translated: true
20
+ settings.attribute :autohide_tabs, type: :boolean, default: false
21
+ end
22
+ end
23
+
24
+ Decidim.content_blocks.register(:participatory_process_group_homepage, :navigation_map) do |content_block|
25
+ content_block.cell = "decidim/navigation_maps/content_blocks/groups_navigation_map"
26
+ content_block.public_name_key = "decidim.navigation_maps.content_blocks.name"
27
+ content_block.settings_form_cell = "decidim/navigation_maps/content_blocks/navigation_map_settings_form"
28
+
29
+ content_block.settings do |settings|
30
+ settings.attribute :title, type: :text, translated: true
31
+ settings.attribute :autohide_tabs, type: :boolean, default: false
24
32
  end
25
33
  end
26
34
  end
@@ -29,6 +37,10 @@ module Decidim
29
37
  Cell::ViewModel.view_paths << File.expand_path("#{Decidim::NavigationMaps::Engine.root}/app/cells")
30
38
  Cell::ViewModel.view_paths << File.expand_path("#{Decidim::NavigationMaps::Engine.root}/app/views") # for partials
31
39
  end
40
+
41
+ initializer "decidim_notify.webpacker.assets_path" do
42
+ Decidim.register_assets_path File.expand_path("app/packs", root)
43
+ end
32
44
  end
33
45
  end
34
46
  end
@@ -7,7 +7,7 @@ module Decidim
7
7
  delegate :available_locales, to: :current_organization
8
8
 
9
9
  def valid_blueprints
10
- organization_blueprints.where.not(image: [nil, ""]).order(:created_at)
10
+ content_block_blueprints.joins(:image_attachment).order(:created_at)
11
11
  end
12
12
 
13
13
  def valid_blueprints?
@@ -15,13 +15,13 @@ module Decidim
15
15
  end
16
16
 
17
17
  def blueprints
18
- organization_blueprints.order(:created_at)
18
+ content_block_blueprints.order(:created_at)
19
19
  end
20
20
 
21
21
  private
22
22
 
23
- def organization_blueprints
24
- @organization_blueprints ||= OrganizationBlueprints.new(current_organization).query
23
+ def content_block_blueprints
24
+ @content_block_blueprints ||= (OrganizationBlueprints.new(current_organization) | ContentBlockBlueprints.new(content_block)).query
25
25
  end
26
26
  end
27
27
  end
@@ -8,6 +8,7 @@ FactoryBot.define do
8
8
  image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
9
9
  title { Decidim::Faker::Localized.word }
10
10
  description { generate_localized_title }
11
+ content_block { create(:content_block, organization: organization) }
11
12
  end
12
13
 
13
14
  factory :blueprint_area, class: "Decidim::NavigationMaps::BlueprintArea" do
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  # This holds the decidim-meetings version.
5
5
  module NavigationMaps
6
- VERSION = "1.1.1"
7
- DECIDIM_VERSION = [">= 0.22", "< 0.24"].freeze
6
+ VERSION = "1.3.1"
7
+ DECIDIM_VERSION = [">= 0.25", "< 0.27"].freeze
8
8
  end
9
9
  end
@@ -5,8 +5,6 @@ require "decidim/navigation_maps/engine"
5
5
  require "decidim/navigation_maps/admin_engine"
6
6
 
7
7
  module Decidim
8
- # This namespace holds the logic of the `NavigationMaps` component. This component
9
- # allows users to create navigation_maps in a participatory space.
10
8
  module NavigationMaps
11
9
  autoload :NavigationMapCellHelpers, "decidim/navigation_maps/navigation_map_cell_helpers"
12
10
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :decidim_navigation_maps do
4
+ desc "custom seeding"
5
+ task seed: :environment do
6
+ Decidim::NavigationMaps::Engine.load_seed
7
+ end
8
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/gem_manager"
4
+
5
+ namespace :decidim_navigation_maps do
6
+ namespace :webpacker do
7
+ desc "Installs Decidim Awesome webpacker files in Rails instance application"
8
+ task install: :environment do
9
+ raise "Decidim gem is not installed" if decidim_path.nil?
10
+
11
+ install_navigation_maps_npm
12
+ end
13
+
14
+ desc "Adds Decidim Awesome dependencies in package.json"
15
+ task upgrade: :environment do
16
+ raise "Decidim gem is not installed" if decidim_path.nil?
17
+
18
+ install_navigation_maps_npm
19
+ end
20
+
21
+ def install_navigation_maps_npm
22
+ navigation_maps_npm_dependencies.each do |type, packages|
23
+ system! "npm i --save-#{type} #{packages.join(" ")}"
24
+ end
25
+ end
26
+
27
+ def navigation_maps_npm_dependencies
28
+ @navigation_maps_npm_dependencies ||= begin
29
+ package_json = JSON.parse(File.read(navigation_maps_path.join("package.json")))
30
+
31
+ {
32
+ prod: package_json["dependencies"].map { |package, version| "#{package}@#{version}" },
33
+ dev: package_json["devDependencies"].map { |package, version| "#{package}@#{version}" }
34
+ }.freeze
35
+ end
36
+ end
37
+
38
+ def navigation_maps_path
39
+ @navigation_maps_path ||= Pathname.new(navigation_maps_gemspec.full_gem_path) if Gem.loaded_specs.has_key?(gem_name)
40
+ end
41
+
42
+ def navigation_maps_gemspec
43
+ @navigation_maps_gemspec ||= Gem.loaded_specs[gem_name]
44
+ end
45
+
46
+ def rails_app_path
47
+ @rails_app_path ||= Rails.root
48
+ end
49
+
50
+ def system!(command)
51
+ system("cd #{rails_app_path} && #{command}") || abort("\n== Command #{command} failed ==")
52
+ end
53
+
54
+ def gem_name
55
+ "decidim-navigation_maps"
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :navigation_maps do
4
+ namespace :active_storage_migrations do
5
+ desc "Migrates editor images from Carrierwave to ActiveStorage"
6
+ task migrate_from_carrierwave: :environment do
7
+ stdout = Logger.new($stdout)
8
+ stdout.level = Logger::INFO
9
+ Rails.logger.extend(ActiveSupport::Logger.broadcast(stdout))
10
+ Decidim::Organization.find_each do |organization|
11
+ puts "Migrating Organization #{organization.id} (#{organization.host})..."
12
+ routes_mappings = []
13
+ Decidim::NavigationMaps::MigrateLegacyImagesJob.perform_now(organization.id, routes_mappings)
14
+
15
+ path = Rails.root.join("tmp/navigation_maps_editor_images_mappings.csv")
16
+ dirname = File.dirname(path)
17
+ FileUtils.mkdir_p(dirname) unless File.directory?(dirname)
18
+ File.open(path, "wb") do |file|
19
+ file.write(Decidim::Exporters::CSV.new(routes_mappings).export.read)
20
+ end
21
+ end
22
+ end
23
+
24
+ desc "Checks editor images migrated from Carrierwave to ActiveStorage"
25
+ task check_migration_from_carrierwave: :environment do
26
+ logger = ActiveSupport::TaggedLogging.new(Logger.new($stdout))
27
+
28
+ Decidim::CarrierWaveMigratorService.check_migration(
29
+ klass: Decidim::NavigationMaps::Blueprint,
30
+ cw_attribute: "image",
31
+ cw_uploader: Decidim::NavigationMaps::Cw::BlueprintUploader,
32
+ as_attribute: "image",
33
+ logger: logger
34
+ )
35
+ end
36
+ end
37
+ end
data/package.json ADDED
@@ -0,0 +1,197 @@
1
+ {
2
+ "name": "decidim-module-navigation_maps",
3
+ "version": "1.0.0",
4
+ "description": "A Blueprint/Map navigation for Decidim",
5
+ "scripts": {
6
+ "lint": "eslint -c .eslintrc.json --ext .js app/packs/",
7
+ "lint-fix": "eslint -c .eslintrc.json --ext .js app/packs/ --fix",
8
+ "stylelint": "stylelint **/*.scss",
9
+ "stylelint-fix": "stylelint **/*.scss --fix"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/Platoniq/decidim-module-navigation_maps.git"
14
+ },
15
+ "keywords": [
16
+ "decidim"
17
+ ],
18
+ "author": "Ivan Verges <ivan@platoniq.net>",
19
+ "license": "AGPL-3.0-or-later",
20
+ "bugs": {
21
+ "url": "https://github.com/Platoniq/decidim-module-navigation_maps/issues"
22
+ },
23
+ "homepage": "https://github.com/Platoniq/decidim-module-navigation_maps#readme",
24
+ "stylelint": {
25
+ "rules": {
26
+ "at-rule-empty-line-before": [
27
+ "always",
28
+ {
29
+ "except": [
30
+ "blockless-after-same-name-blockless",
31
+ "first-nested"
32
+ ],
33
+ "ignore": [
34
+ "after-comment"
35
+ ],
36
+ "ignoreAtRules": [
37
+ "else"
38
+ ]
39
+ }
40
+ ],
41
+ "at-rule-name-case": "lower",
42
+ "at-rule-semicolon-newline-after": "always",
43
+ "block-closing-brace-empty-line-before": "never",
44
+ "block-closing-brace-newline-after": "always",
45
+ "block-closing-brace-newline-before": "always-multi-line",
46
+ "block-closing-brace-space-before": "always-single-line",
47
+ "block-no-empty": true,
48
+ "block-opening-brace-newline-after": "always-multi-line",
49
+ "block-opening-brace-space-after": "always-single-line",
50
+ "block-opening-brace-space-before": "never",
51
+ "color-hex-case": "lower",
52
+ "color-hex-length": "short",
53
+ "color-no-invalid-hex": true,
54
+ "comment-empty-line-before": [
55
+ "always",
56
+ {
57
+ "except": [
58
+ "first-nested"
59
+ ],
60
+ "ignore": [
61
+ "stylelint-commands"
62
+ ]
63
+ }
64
+ ],
65
+ "comment-no-empty": true,
66
+ "comment-whitespace-inside": "always",
67
+ "custom-property-empty-line-before": [
68
+ "always",
69
+ {
70
+ "except": [
71
+ "after-custom-property",
72
+ "first-nested"
73
+ ],
74
+ "ignore": [
75
+ "after-comment",
76
+ "inside-single-line-block"
77
+ ]
78
+ }
79
+ ],
80
+ "declaration-bang-space-after": "never",
81
+ "declaration-bang-space-before": "always",
82
+ "declaration-block-no-duplicate-properties": [
83
+ true,
84
+ {
85
+ "ignore": [
86
+ "consecutive-duplicates-with-different-values"
87
+ ]
88
+ }
89
+ ],
90
+ "declaration-block-no-redundant-longhand-properties": true,
91
+ "declaration-block-no-shorthand-property-overrides": true,
92
+ "declaration-block-semicolon-newline-after": "always-multi-line",
93
+ "declaration-block-semicolon-space-after": "always-single-line",
94
+ "declaration-block-semicolon-space-before": "never",
95
+ "declaration-block-single-line-max-declarations": 1,
96
+ "declaration-block-trailing-semicolon": "always",
97
+ "declaration-colon-newline-after": "always-multi-line",
98
+ "declaration-colon-space-after": "always-single-line",
99
+ "declaration-colon-space-before": "never",
100
+ "declaration-empty-line-before": [
101
+ "always",
102
+ {
103
+ "except": [
104
+ "after-declaration",
105
+ "first-nested"
106
+ ],
107
+ "ignore": [
108
+ "after-comment",
109
+ "inside-single-line-block"
110
+ ]
111
+ }
112
+ ],
113
+ "function-calc-no-unspaced-operator": true,
114
+ "function-comma-newline-after": "always-multi-line",
115
+ "function-comma-space-after": "always-single-line",
116
+ "function-comma-space-before": "never",
117
+ "function-linear-gradient-no-nonstandard-direction": true,
118
+ "function-max-empty-lines": 0,
119
+ "function-name-case": "lower",
120
+ "function-parentheses-newline-inside": "always-multi-line",
121
+ "function-parentheses-space-inside": "never-single-line",
122
+ "function-whitespace-after": "always",
123
+ "indentation": 2,
124
+ "keyframe-declaration-no-important": true,
125
+ "length-zero-no-unit": true,
126
+ "max-empty-lines": 1,
127
+ "media-feature-colon-space-after": "always",
128
+ "media-feature-colon-space-before": "never",
129
+ "media-feature-name-case": "lower",
130
+ "media-feature-name-no-unknown": true,
131
+ "media-feature-parentheses-space-inside": "never",
132
+ "media-feature-range-operator-space-after": "always",
133
+ "media-feature-range-operator-space-before": "always",
134
+ "media-query-list-comma-newline-after": "always-multi-line",
135
+ "media-query-list-comma-space-after": "always-single-line",
136
+ "media-query-list-comma-space-before": "never",
137
+ "no-empty-source": true,
138
+ "no-eol-whitespace": true,
139
+ "no-extra-semicolons": true,
140
+ "no-invalid-double-slash-comments": true,
141
+ "no-missing-end-of-source-newline": true,
142
+ "number-leading-zero": "never",
143
+ "number-no-trailing-zeros": true,
144
+ "property-case": "lower",
145
+ "property-no-unknown": true,
146
+ "rule-empty-line-before": [
147
+ "always-multi-line",
148
+ {
149
+ "except": [
150
+ "first-nested"
151
+ ],
152
+ "ignore": [
153
+ "after-comment"
154
+ ]
155
+ }
156
+ ],
157
+ "selector-attribute-brackets-space-inside": "never",
158
+ "selector-attribute-operator-space-after": "never",
159
+ "selector-attribute-operator-space-before": "never",
160
+ "selector-combinator-space-after": "always",
161
+ "selector-combinator-space-before": "always",
162
+ "selector-descendant-combinator-no-non-space": true,
163
+ "selector-list-comma-newline-after": "always",
164
+ "selector-list-comma-space-before": "never",
165
+ "selector-max-empty-lines": 0,
166
+ "selector-pseudo-class-case": "lower",
167
+ "selector-pseudo-class-no-unknown": true,
168
+ "selector-pseudo-class-parentheses-space-inside": "never",
169
+ "selector-pseudo-element-case": "lower",
170
+ "selector-pseudo-element-colon-notation": "double",
171
+ "selector-pseudo-element-no-unknown": true,
172
+ "selector-type-case": "lower",
173
+ "selector-type-no-unknown": true,
174
+ "shorthand-property-no-redundant-values": true,
175
+ "string-no-newline": true,
176
+ "unit-case": "lower",
177
+ "unit-no-unknown": true,
178
+ "value-list-comma-newline-after": "always-multi-line",
179
+ "value-list-comma-space-after": "always-single-line",
180
+ "value-list-comma-space-before": "never",
181
+ "value-list-max-empty-lines": 0
182
+ }
183
+ },
184
+ "dependencies": {
185
+ "@geoman-io/leaflet-geoman-free": "^2.11.4",
186
+ "jquery-form": "^4.3.0",
187
+ "jsviews": "^1.0.11"
188
+ },
189
+ "devDependencies": {
190
+ "eslint": "^7.32.0",
191
+ "eslint": "^7.25.0",
192
+ "eslint-config-prettier": "^8.2.0",
193
+ "eslint-config-standard": "^11.0.0",
194
+ "eslint-plugin-import": "^2.22.0",
195
+ "stylelint": "13.11.0"
196
+ }
197
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-navigation_maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2022-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,61 +16,61 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.22'
19
+ version: '0.25'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '0.24'
22
+ version: '0.27'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.22'
29
+ version: '0.25'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.24'
32
+ version: '0.27'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: decidim-core
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0.22'
39
+ version: '0.25'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '0.24'
42
+ version: '0.27'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '0.22'
49
+ version: '0.25'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '0.24'
52
+ version: '0.27'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: decidim-dev
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '0.22'
59
+ version: '0.25'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '0.24'
62
+ version: '0.27'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '0.22'
69
+ version: '0.25'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '0.24'
73
- description: Allows to map processes to image parts using maps.
72
+ version: '0.27'
73
+ description: Allows to create visual guiding maps in content blocks for Decidim.
74
74
  email:
75
75
  - ivan@platoniq.net
76
76
  executables: []
@@ -80,18 +80,7 @@ files:
80
80
  - LICENSE-AGPLv3.txt
81
81
  - README.md
82
82
  - Rakefile
83
- - app/assets/config/admin/decidim_navigation_maps_manifest.css
84
- - app/assets/config/admin/decidim_navigation_maps_manifest.js
85
- - app/assets/config/decidim_navigation_maps_manifest.css
86
- - app/assets/config/decidim_navigation_maps_manifest.js
87
- - app/assets/images/decidim/navigation_maps/icon.svg
88
- - app/assets/javascripts/decidim/navigation_maps/admin/map_editor.js
89
- - app/assets/javascripts/decidim/navigation_maps/admin/navigation_maps.js
90
- - app/assets/javascripts/decidim/navigation_maps/map_view.js
91
- - app/assets/javascripts/decidim/navigation_maps/navigation_maps.js
92
- - app/assets/stylesheets/decidim/navigation_maps/_variables.scss
93
- - app/assets/stylesheets/decidim/navigation_maps/admin/navigation_maps.scss
94
- - app/assets/stylesheets/decidim/navigation_maps/navigation_maps.scss
83
+ - app/cells/decidim/navigation_maps/content_blocks/groups_navigation_map_cell.rb
95
84
  - app/cells/decidim/navigation_maps/content_blocks/navigation_map/_styles.erb
96
85
  - app/cells/decidim/navigation_maps/content_blocks/navigation_map/_tabs.erb
97
86
  - app/cells/decidim/navigation_maps/content_blocks/navigation_map/_tabs_content.erb
@@ -112,14 +101,29 @@ files:
112
101
  - app/forms/decidim/navigation_maps/area_form.rb
113
102
  - app/forms/decidim/navigation_maps/blueprint_form.rb
114
103
  - app/forms/decidim/navigation_maps/blueprint_forms.rb
104
+ - app/jobs/decidim/navigation_maps/migrate_legacy_images_job.rb
115
105
  - app/models/decidim/navigation_maps/application_record.rb
116
106
  - app/models/decidim/navigation_maps/blueprint.rb
117
107
  - app/models/decidim/navigation_maps/blueprint_area.rb
108
+ - app/packs/entrypoints/decidim_admin_navigation_maps.js
109
+ - app/packs/entrypoints/decidim_admin_navigation_maps.scss
110
+ - app/packs/entrypoints/decidim_navigation_maps.js
111
+ - app/packs/entrypoints/decidim_navigation_maps.scss
112
+ - app/packs/src/decidim/navigation_maps/admin/map_editor.js
113
+ - app/packs/src/decidim/navigation_maps/admin/navigation_maps.js
114
+ - app/packs/src/decidim/navigation_maps/map_view.js
115
+ - app/packs/src/decidim/navigation_maps/navigation_maps.js
116
+ - app/packs/stylesheets/decidim/navigation_maps/_variables.scss
117
+ - app/packs/stylesheets/decidim/navigation_maps/admin/navigation_maps.scss
118
+ - app/packs/stylesheets/decidim/navigation_maps/navigation_maps.scss
119
+ - app/queries/decidim/navigation_maps/content_block_blueprints.rb
118
120
  - app/queries/decidim/navigation_maps/organization_blueprints.rb
119
121
  - app/uploaders/decidim/navigation_maps/blueprint_uploader.rb
122
+ - app/uploaders/decidim/navigation_maps/cw/blueprint_uploader.rb
120
123
  - app/views/decidim/navigation_maps/admin/areas/_form.html.erb
121
124
  - app/views/decidim/navigation_maps/admin/areas/new.html.erb
122
125
  - app/views/decidim/navigation_maps/admin/areas/show.html.erb
126
+ - config/assets.rb
123
127
  - config/i18n-tasks.yml
124
128
  - config/locales/ca.yml
125
129
  - config/locales/cs.yml
@@ -131,10 +135,12 @@ files:
131
135
  - db/migrate/20191126045831_add_link_type_to_decidim_navigation_maps_blueprint_areas.rb
132
136
  - db/migrate/20191126154019_add_area_id_to_decidim_navigation_maps_blueprint_areas.rb
133
137
  - db/migrate/20191127093746_add_color_to_navigation_maps_blueprint_areas.rb
138
+ - db/migrate/20201105130724_add_reference_to_content_block_to_blueprints_table.rb
134
139
  - db/migrate/20210112135817_add_height_to_navigation_maps_blueprints.rb
135
140
  - db/seeds.rb
136
141
  - db/seeds/antarctica.png
137
142
  - db/seeds/penguins.jpg
143
+ - db/seeds/pla-cerda.jpg
138
144
  - lib/decidim/navigation_maps.rb
139
145
  - lib/decidim/navigation_maps/admin.rb
140
146
  - lib/decidim/navigation_maps/admin_engine.rb
@@ -142,25 +148,10 @@ files:
142
148
  - lib/decidim/navigation_maps/navigation_map_cell_helpers.rb
143
149
  - lib/decidim/navigation_maps/test/factories.rb
144
150
  - lib/decidim/navigation_maps/version.rb
145
- - vendor/assets/images/draw/layers-2x.png
146
- - vendor/assets/images/draw/layers.png
147
- - vendor/assets/images/draw/marker-icon-2x.png
148
- - vendor/assets/images/draw/marker-icon.png
149
- - vendor/assets/images/draw/marker-shadow.png
150
- - vendor/assets/images/draw/spritesheet-2x.png
151
- - vendor/assets/images/draw/spritesheet.png
152
- - vendor/assets/images/draw/spritesheet.svg
153
- - vendor/assets/images/images/layers-2x.png
154
- - vendor/assets/images/images/layers.png
155
- - vendor/assets/images/images/marker-icon-2x.png
156
- - vendor/assets/images/images/marker-icon.png
157
- - vendor/assets/images/images/marker-shadow.png
158
- - vendor/assets/javascripts/jquery.form.js
159
- - vendor/assets/javascripts/jsrender.min.js
160
- - vendor/assets/javascripts/jsrender.min.js.map
161
- - vendor/assets/javascripts/leaflet-geoman.min.js
162
- - vendor/assets/javascripts/leaflet.js
163
- - vendor/assets/stylesheets/leaflet-geoman.css
151
+ - lib/tasks/custom_seeds.rake
152
+ - lib/tasks/decidim_navigation_maps_webpacker_tasks.rake
153
+ - lib/tasks/navigation_maps_active_storage_migration_tasks.rake
154
+ - package.json
164
155
  homepage: https://github.com/Platoniq/decidim-module-navigation_maps
165
156
  licenses:
166
157
  - AGPL-3.0
@@ -173,14 +164,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
164
  requirements:
174
165
  - - ">="
175
166
  - !ruby/object:Gem::Version
176
- version: '2.6'
167
+ version: '2.7'
177
168
  required_rubygems_version: !ruby/object:Gem::Requirement
178
169
  requirements:
179
170
  - - ">="
180
171
  - !ruby/object:Gem::Version
181
172
  version: '0'
182
173
  requirements: []
183
- rubygems_version: 3.1.4
174
+ rubygems_version: 3.1.6
184
175
  signing_key:
185
176
  specification_version: 4
186
177
  summary: A decidim navigation_maps module
@@ -1,3 +0,0 @@
1
- /*
2
- *= link decidim/navigation_maps/admin/navigation_maps.css
3
- */
@@ -1,3 +0,0 @@
1
- //= link decidim/navigation_maps/admin/navigation_maps.js
2
- //= require jquery.form
3
- //= require leaflet
@@ -1,3 +0,0 @@
1
- /*
2
- *= link decidim/navigation_maps/navigation_maps.css
3
- */
@@ -1 +0,0 @@
1
- //= link decidim/navigation_maps/navigation_maps.js
@@ -1 +0,0 @@
1
- <svg height="35px" width="35px" fill="#000000" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 1 511 511" style="enable-background:new 0 1 511 511;" xml:space="preserve"><g><path d="M205.6,146.9c-22.2,0-40.2,18-40.2,40.2c0,22.2,18,40.2,40.2,40.2c22.2,0,40.2-18,40.2-40.2 C245.9,165,227.8,146.9,205.6,146.9z M205.6,206.6c-10.7,0-19.3-8.7-19.3-19.3c0-10.7,8.7-19.3,19.3-19.3 c10.6,0,19.3,8.7,19.3,19.3C225,197.9,216.3,206.6,205.6,206.6z"/><path d="M406.6,178V70.3c0-5.8-4.2-10.1-10-10.1H10.6C4.8,60.3,0,64.6,0,70.3v304.9c0,5.8,4.8,10.9,10.6,10.9h242 c24.5,39.8,68.7,66.7,119.1,66.7c77,0,139.4-62.8,139.4-139.7C511,248.4,467.4,193.7,406.6,178z M21,365.2v-284h364.7v92.9 c-4.2-0.5-9.1-0.7-14-0.7c-0.3,0-0.6,0-0.6,0v-66.4c0-5.8-5-10-10.9-10H47.2c-5.8,0-10.5,4.2-10.5,10v231.8 c0,5.8,4.7,10.8,10.5,10.8h189.7c1.5,5.2,3.1,10.5,5.2,15.7H21z M232.9,328.6H57.6v-40.4l61.5-54.3c2.8-2.5,7-2.6,10-0.2l63.3,50.6 c10.7,8.6,26,8.4,36.5-0.5l7.6-6.5c-3,11.4-4.6,23.6-4.6,35.8C232,318.3,232.3,323.3,232.9,328.6z M215.7,267.8 c-2.8,2.4-7,2.4-10,0.1l-63.4-50.6c-10.9-8.7-26.5-8.4-37,0.9l-47.7,42V117.9H350v57.2c-37.7,6-70.1,26.8-91.4,56.4L215.7,267.8z M371.6,431.7C306.2,431.7,253,378.4,253,313s53.2-118.6,118.6-118.6c65.4,0,118.6,53.2,118.6,118.6 C490.4,378.4,437.1,431.7,371.6,431.7z"/><path d="M435.4,234c-34.8-34.6-91-34.6-125.6,0c-13.7,13.7-22.4,31.2-25,50.4c-2.5,18.5,0.9,37.8,9.9,54.4c0,0,0,0.1,0.1,0.1 c4.4,8,9.4,14.7,15.2,20.4l55.1,55.1c2,2,4.6,3,7.4,3s5.5-1.2,7.4-3l55.1-55.1c16.9-16.9,26.2-39.2,26.2-62.8 C461.4,273,452.2,250.7,435.4,234z M420.1,344.6l-47.7,47.7l-47.7-47.7c-4.4-4.4-8.2-9.5-11.6-15.7c-14.2-26.6-9.6-58.8,11.6-80.1 c26.4-26.4,69.4-26.4,95.8,0c12.8,12.8,19.8,29.8,19.7,47.7C440.2,314.6,433,331.7,420.1,344.6z"/><path d="M372.3,241.7c-29,0-52.7,23.7-52.7,52.7c0,29,23.7,52.7,52.7,52.7s52.7-23.7,52.7-52.7 C425.1,265.4,401.5,241.7,372.3,241.7z M372.3,326c-17.5,0-31.8-14.2-31.8-31.8c0-17.5,14.3-31.8,31.8-31.8 c17.5,0,31.8,14.3,31.8,31.8C404.1,311.8,389.9,326,372.3,326z"/></g></svg>