katalyst-navigation 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -5
  3. data/app/assets/builds/katalyst/navigation.esm.js +911 -0
  4. data/app/assets/builds/katalyst/navigation.js +911 -0
  5. data/app/assets/builds/katalyst/navigation.min.js +2 -0
  6. data/app/assets/builds/katalyst/navigation.min.js.map +1 -0
  7. data/app/assets/config/katalyst-navigation.js +1 -1
  8. data/app/components/katalyst/navigation/editor/base_component.rb +48 -0
  9. data/app/components/katalyst/navigation/editor/errors_component.html.erb +12 -0
  10. data/app/components/katalyst/navigation/editor/errors_component.rb +15 -0
  11. data/app/components/katalyst/navigation/editor/item_component.html.erb +27 -0
  12. data/app/components/katalyst/navigation/editor/item_component.rb +30 -0
  13. data/app/components/katalyst/navigation/editor/item_editor_component.rb +51 -0
  14. data/app/components/katalyst/navigation/editor/new_item_component.html.erb +14 -0
  15. data/app/components/katalyst/navigation/editor/new_item_component.rb +49 -0
  16. data/app/components/katalyst/navigation/editor/new_items_component.html.erb +3 -0
  17. data/app/components/katalyst/navigation/editor/new_items_component.rb +20 -0
  18. data/app/{views/katalyst/navigation/menus/_list_item.html.erb → components/katalyst/navigation/editor/row_component.html.erb} +1 -1
  19. data/{lib/katalyst/navigation/version.rb → app/components/katalyst/navigation/editor/row_component.rb} +4 -1
  20. data/app/{helpers/katalyst/navigation/editor/status_bar.rb → components/katalyst/navigation/editor/status_bar_component.rb} +17 -13
  21. data/app/components/katalyst/navigation/editor/table_component.html.erb +11 -0
  22. data/app/components/katalyst/navigation/editor/table_component.rb +36 -0
  23. data/app/components/katalyst/navigation/editor_component.html.erb +9 -0
  24. data/app/components/katalyst/navigation/editor_component.rb +47 -0
  25. data/app/controllers/concerns/katalyst/navigation/has_navigation.rb +5 -14
  26. data/app/controllers/katalyst/navigation/items_controller.rb +24 -12
  27. data/app/controllers/katalyst/navigation/menus_controller.rb +25 -13
  28. data/app/helpers/katalyst/navigation/frontend_helper.rb +7 -7
  29. data/app/javascript/navigation/application.js +30 -0
  30. data/app/{assets/javascripts/controllers → javascript}/navigation/editor/item_controller.js +1 -1
  31. data/app/{assets/javascripts/utils → javascript}/navigation/editor/menu.js +1 -1
  32. data/app/{assets/javascripts/controllers → javascript}/navigation/editor/menu_controller.js +3 -3
  33. data/app/models/katalyst/navigation/menu.rb +2 -0
  34. data/app/models/katalyst/navigation/types/nodes_type.rb +2 -2
  35. data/app/views/katalyst/navigation/items/_button.html.erb +6 -0
  36. data/app/views/katalyst/navigation/items/_form_errors.html.erb +5 -0
  37. data/app/views/katalyst/navigation/items/_heading.html.erb +1 -0
  38. data/app/views/katalyst/navigation/items/_link.html.erb +11 -0
  39. data/app/views/katalyst/navigation/items/edit.html.erb +4 -3
  40. data/app/views/katalyst/navigation/items/edit.turbo_stream.erb +3 -0
  41. data/app/views/katalyst/navigation/items/new.html.erb +1 -1
  42. data/app/views/katalyst/navigation/items/update.turbo_stream.erb +2 -5
  43. data/app/views/katalyst/navigation/menus/edit.html.erb +1 -1
  44. data/app/views/katalyst/navigation/menus/index.html.erb +1 -1
  45. data/app/views/katalyst/navigation/menus/show.html.erb +3 -13
  46. data/config/importmap.rb +1 -4
  47. data/lib/katalyst/navigation/config.rb +4 -0
  48. data/lib/katalyst/navigation/engine.rb +1 -1
  49. data/lib/katalyst/navigation.rb +6 -1
  50. data/spec/factories/katalyst/navigation/menus.rb +1 -1
  51. metadata +93 -27
  52. data/app/controllers/katalyst/navigation/base_controller.rb +0 -12
  53. data/app/helpers/katalyst/navigation/editor/base.rb +0 -41
  54. data/app/helpers/katalyst/navigation/editor/errors.rb +0 -24
  55. data/app/helpers/katalyst/navigation/editor/item.rb +0 -62
  56. data/app/helpers/katalyst/navigation/editor/list.rb +0 -41
  57. data/app/helpers/katalyst/navigation/editor/menu.rb +0 -47
  58. data/app/helpers/katalyst/navigation/editor/new_item.rb +0 -53
  59. data/app/helpers/katalyst/navigation/editor_helper.rb +0 -52
  60. data/app/views/katalyst/navigation/menus/_item.html.erb +0 -15
  61. data/app/views/katalyst/navigation/menus/_new_item.html.erb +0 -3
  62. data/app/views/katalyst/navigation/menus/_new_items.html.erb +0 -5
  63. /data/app/{assets/javascripts/utils → javascript}/navigation/editor/item.js +0 -0
  64. /data/app/{assets/javascripts/controllers → javascript}/navigation/editor/list_controller.js +0 -0
  65. /data/app/{assets/javascripts/controllers → javascript}/navigation/editor/new_item_controller.js +0 -0
  66. /data/app/{assets/javascripts/utils → javascript}/navigation/editor/rules-engine.js +0 -0
  67. /data/app/{assets/javascripts/controllers → javascript}/navigation/editor/status_bar_controller.js +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83045ad7f39df98e03b15381de07ac417d8357755678454dc2e72f0d629b6b78
4
- data.tar.gz: 4fbdd6dbca7a65332354e348ede2f9b5c1b61b48f65e28e6798c52298ddb586e
3
+ metadata.gz: b7959306448abfc59d046b1ebb116c1866b16ebdf632f505ebdb659afea13e90
4
+ data.tar.gz: 03660c839246adc0989a6d20835171258eb64182d3308dd5111711108806f8cb
5
5
  SHA512:
6
- metadata.gz: 497fda35e70f9055741573cb6a059c3f140d5dbd70fa4cfbb09ab96b6b8ec27cc9e3bae768428d64ee67da8c9239166635874f013b857859c8e15a7a072fcbc3
7
- data.tar.gz: e52b138b2a2c5b5e17b7ce938a86124949ab352d7a75d282481b59a3a8066a1fb032f5346dd897d0b5821298389eea90173cf312a512b03fbcb6916fa59f3978
6
+ metadata.gz: 831e2c1d9bcb2f43348e811a9659a0bb64664bc7694ff37ffb9ff146e135966ada5c3c336552717a5fca006b78a2ad7b3208db3cdbd46ee82d7d64dbfe2df273
7
+ data.tar.gz: 1097aa6c6b8008ae52b4246ab01a7892b23daa3a6f45a50635720616d7f0c5b9d72df511d580fd32b3b222a516d7f61e7965e37af84fdb4f4b2103b046935039
data/README.md CHANGED
@@ -4,17 +4,41 @@ Generates and edits navigation menus.
4
4
 
5
5
  ## Installation
6
6
 
7
- Install the gem and add to the application's Gemfile by executing:
7
+ Install the gem as usual
8
8
 
9
- $ bundle add katalyst-navigation
9
+ ```ruby
10
+ gem "katalyst-navigation"
11
+ ```
10
12
 
11
- If bundler is not being used to manage dependencies, install the gem by executing:
13
+ Mount the engine in your `routes.rb` file:
12
14
 
13
- $ gem install katalyst-navigation
15
+ ```ruby
16
+ mount Katalyst::Navigation::Engine, at: "navigation"
17
+ ```
18
+
19
+ Add the Gem's migrations to your application:
20
+
21
+ ```ruby
22
+ rake katalyst_navigation:install:migrations
23
+ ```
24
+
25
+ Add the Gem's javascript and CSS to your build pipeline. This assumes that
26
+ you're using `rails-dartsass` and `importmaps` to manage your assets.
27
+
28
+ ```javascript
29
+ // app/javascript/controllers/application.js
30
+ import { application } from "controllers/application";
31
+ import navigation from "@katalyst/navigation";
32
+ application.load(navigation);
33
+ ```
34
+
35
+ ```sass
36
+ @use "katalyst/navigation";
37
+ ```
14
38
 
15
39
  ## Usage
16
40
 
17
- This gem is still experimental and is not yet ready for public consumption. See dummy app for example usage.
41
+ See the dummy app for examples.
18
42
 
19
43
  ## Contributing
20
44