coprl 3.0.0.beta.4 → 3.0.0.beta.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +11 -16
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +37 -0
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +43 -47
  7. data/README.md +3 -3
  8. data/app/demo/components/dialogs.pom +1 -1
  9. data/app/demo/components/snackbar.pom +9 -3
  10. data/app/demo/events/content_as_form.pom +3 -3
  11. data/app/demo/events/halted.pom +23 -0
  12. data/app/demo/events/nav/drawer.pom +1 -1
  13. data/app/demo/events/tagged_input.pom +2 -2
  14. data/app/demo/patterns/search_select.pom +1 -1
  15. data/coprl.gemspec +1 -2
  16. data/lib/coprl/presenters/dsl/components/actions/base.rb +5 -1
  17. data/lib/coprl/presenters/dsl/components/base.rb +6 -4
  18. data/lib/coprl/presenters/dsl/components/multi_select.rb +3 -3
  19. data/lib/coprl/presenters/dsl/components/table.rb +2 -2
  20. data/lib/coprl/presenters/dsl/definition.rb +2 -2
  21. data/lib/coprl/presenters/dsl/user_interface.rb +2 -2
  22. data/lib/coprl/presenters/helpers/rails/routes.rb +14 -0
  23. data/lib/coprl/presenters/helpers/rails.rb +8 -6
  24. data/lib/coprl/presenters/rails/concerns/coprl_partial.rb +51 -0
  25. data/lib/coprl/presenters/rails/engine.rb +5 -0
  26. data/lib/coprl/presenters/rails/railtie.rb +6 -14
  27. data/lib/coprl/presenters/rails/reloader.rb +15 -0
  28. data/lib/coprl/presenters/version.rb +1 -1
  29. data/lib/coprl/presenters/web_client/helpers/headers.rb +8 -6
  30. data/lib/coprl/presenters/web_client/helpers/rails/template_helper.rb +10 -0
  31. data/lib/coprl/presenters/web_client/helpers/rails.rb +1 -0
  32. data/lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb +20 -0
  33. data/lib/coprl/presenters/web_client/helpers/sinatra.rb +1 -0
  34. data/lib/coprl/presenters/web_client/plugin_views_path.rb +5 -5
  35. data/public/bundle.js +10 -4
  36. data/public/wc.js +10 -4
  37. data/rails-engine/app/controllers/coprl_controller.rb +0 -17
  38. data/rails-engine/app/views/layouts/coprl.html.erb +4 -4
  39. data/rails-engine/config/initializers/presenters.rb +4 -2
  40. data/rails-engine/config/initializers/routes.rb +5 -0
  41. data/views/mdc/assets/js/components/events/posts.js +10 -6
  42. data/views/mdc/body/{_preamble.erb → _wrapper.erb} +16 -5
  43. data/views/mdc/components/_card.erb +2 -2
  44. data/views/mdc/components/_checkbox.erb +1 -1
  45. data/views/mdc/components/_chip.erb +2 -2
  46. data/views/mdc/components/_content.erb +2 -2
  47. data/views/mdc/components/_datetime.erb +1 -1
  48. data/views/mdc/components/_dialog.erb +2 -2
  49. data/views/mdc/components/_form.erb +2 -2
  50. data/views/mdc/components/_grid.erb +2 -2
  51. data/views/mdc/components/_hidden_field.erb +1 -1
  52. data/views/mdc/components/_multi_select.erb +1 -1
  53. data/views/mdc/components/_number_field.erb +1 -1
  54. data/views/mdc/components/_radio_button.erb +1 -1
  55. data/views/mdc/components/_rich_text_area.erb +1 -1
  56. data/views/mdc/components/_select.erb +1 -1
  57. data/views/mdc/components/_slider.erb +2 -2
  58. data/views/mdc/components/_stepper.erb +4 -4
  59. data/views/mdc/components/_switch.erb +1 -1
  60. data/views/mdc/components/_text_area.erb +1 -1
  61. data/views/mdc/components/_text_field.erb +1 -1
  62. data/views/mdc/components/buttons/_image.erb +1 -1
  63. data/views/mdc/layout.erb +4 -4
  64. metadata +17 -26
  65. data/app/demo/components/snackbar_attached.pom +0 -6
  66. data/views/mdc/body/_postamble.erb +0 -17
@@ -22,4 +22,4 @@
22
22
  <%= partial "components/icon", :locals => {comp: comp.icon, class_name: 'mdc-button__icon', position: [:right, :center]} if comp.icon %>
23
23
  </button>
24
24
  <%= partial "components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} if comp.tooltip %>
25
- <%= partial "components/menu", :locals => {comp: comp.menu, parent_id: comp.id} if comp.menus %>
25
+ <%= partial "components/menu", :locals => {comp: comp.menu, parent_id: comp.id} if comp.menu %>
data/views/mdc/layout.erb CHANGED
@@ -7,12 +7,12 @@
7
7
  <title><%= @pom.page.title if @pom.page %></title>
8
8
  <meta name="description" content="">
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1">
10
- <%= coprl_headers(@base_url, request, @pom) %>
10
+ <%= coprl_headers %>
11
11
  </head>
12
12
  <body class="mdc-typography">
13
- <%= partial "body/preamble", :locals => {pom:@pom} %>
14
- <%= yield %>
15
- <%= partial "body/postamble", :locals => {pom:@pom} %>
13
+ <% with_presenters_wrapper do %>
14
+ <%= yield %>
15
+ <% end %>
16
16
  <noscript><p>JavaScript must be enabled to continue.</p></noscript>
17
17
  </body>
18
18
  </html>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coprl
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta.4
4
+ version: 3.0.0.beta.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Edens
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2021-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ice_nine
@@ -140,20 +140,6 @@ dependencies:
140
140
  - - "~>"
141
141
  - !ruby/object:Gem::Version
142
142
  version: '3.4'
143
- - !ruby/object:Gem::Dependency
144
- name: filewatcher
145
- requirement: !ruby/object:Gem::Requirement
146
- requirements:
147
- - - "~>"
148
- - !ruby/object:Gem::Version
149
- version: 1.1.1
150
- type: :runtime
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- requirements:
154
- - - "~>"
155
- - !ruby/object:Gem::Version
156
- version: 1.1.1
157
143
  - !ruby/object:Gem::Dependency
158
144
  name: zeitwerk
159
145
  requirement: !ruby/object:Gem::Requirement
@@ -267,33 +253,33 @@ dependencies:
267
253
  - !ruby/object:Gem::Version
268
254
  version: '3.0'
269
255
  - !ruby/object:Gem::Dependency
270
- name: gem-release
256
+ name: shotgun
271
257
  requirement: !ruby/object:Gem::Requirement
272
258
  requirements:
273
259
  - - "~>"
274
260
  - !ruby/object:Gem::Version
275
- version: '2.0'
261
+ version: '0.9'
276
262
  type: :development
277
263
  prerelease: false
278
264
  version_requirements: !ruby/object:Gem::Requirement
279
265
  requirements:
280
266
  - - "~>"
281
267
  - !ruby/object:Gem::Version
282
- version: '2.0'
268
+ version: '0.9'
283
269
  - !ruby/object:Gem::Dependency
284
- name: shotgun
270
+ name: timecop
285
271
  requirement: !ruby/object:Gem::Requirement
286
272
  requirements:
287
273
  - - "~>"
288
274
  - !ruby/object:Gem::Version
289
- version: '0.9'
275
+ version: 0.9.4
290
276
  type: :development
291
277
  prerelease: false
292
278
  version_requirements: !ruby/object:Gem::Requirement
293
279
  requirements:
294
280
  - - "~>"
295
281
  - !ruby/object:Gem::Version
296
- version: '0.9'
282
+ version: 0.9.4
297
283
  description:
298
284
  email:
299
285
  - 'rx@russelledens.net
@@ -359,7 +345,6 @@ files:
359
345
  - app/demo/components/selects.pom
360
346
  - app/demo/components/sliders.pom
361
347
  - app/demo/components/snackbar.pom
362
- - app/demo/components/snackbar_attached.pom
363
348
  - app/demo/components/steppers.pom
364
349
  - app/demo/components/tab_bars.pom
365
350
  - app/demo/components/tables.pom
@@ -390,6 +375,7 @@ files:
390
375
  - app/demo/events/content_as_form.pom
391
376
  - app/demo/events/field_level.pom
392
377
  - app/demo/events/form_level.pom
378
+ - app/demo/events/halted.pom
393
379
  - app/demo/events/nav/drawer.pom
394
380
  - app/demo/events/parallel.pom
395
381
  - app/demo/events/tagged_input.pom
@@ -597,14 +583,17 @@ files:
597
583
  - lib/coprl/presenters/helpers/rails.rb
598
584
  - lib/coprl/presenters/helpers/rails/currency.rb
599
585
  - lib/coprl/presenters/helpers/rails/model_table.rb
586
+ - lib/coprl/presenters/helpers/rails/routes.rb
600
587
  - lib/coprl/presenters/helpers/redact.rb
601
588
  - lib/coprl/presenters/helpers/route.rb
602
589
  - lib/coprl/presenters/helpers/time.rb
603
590
  - lib/coprl/presenters/namespace.rb
604
591
  - lib/coprl/presenters/pluggable.rb
605
592
  - lib/coprl/presenters/plugins.rb
593
+ - lib/coprl/presenters/rails/concerns/coprl_partial.rb
606
594
  - lib/coprl/presenters/rails/engine.rb
607
595
  - lib/coprl/presenters/rails/railtie.rb
596
+ - lib/coprl/presenters/rails/reloader.rb
608
597
  - lib/coprl/presenters/registry.rb
609
598
  - lib/coprl/presenters/router.rb
610
599
  - lib/coprl/presenters/settings.rb
@@ -634,6 +623,7 @@ files:
634
623
  - lib/coprl/presenters/web_client/helpers/rails/partials.rb
635
624
  - lib/coprl/presenters/web_client/helpers/rails/raw.rb
636
625
  - lib/coprl/presenters/web_client/helpers/rails/safe_markdown.rb
626
+ - lib/coprl/presenters/web_client/helpers/rails/template_helper.rb
637
627
  - lib/coprl/presenters/web_client/helpers/render_component.rb
638
628
  - lib/coprl/presenters/web_client/helpers/shared.rb
639
629
  - lib/coprl/presenters/web_client/helpers/sinatra.rb
@@ -642,6 +632,7 @@ files:
642
632
  - lib/coprl/presenters/web_client/helpers/sinatra/partials.rb
643
633
  - lib/coprl/presenters/web_client/helpers/sinatra/raw.rb
644
634
  - lib/coprl/presenters/web_client/helpers/sinatra/safe_markdown.rb
635
+ - lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb
645
636
  - lib/coprl/presenters/web_client/helpers/snake_to_camel.rb
646
637
  - lib/coprl/presenters/web_client/helpers/transform_hash.rb
647
638
  - lib/coprl/presenters/web_client/helpers/unique_id.rb
@@ -683,6 +674,7 @@ files:
683
674
  - rails-engine/app/views/layouts/coprl.html.erb
684
675
  - rails-engine/config.ru
685
676
  - rails-engine/config/initializers/presenters.rb
677
+ - rails-engine/config/initializers/routes.rb
686
678
  - rails-engine/config/initializers/session.rb
687
679
  - rails-engine/config/routes.rb
688
680
  - scripts/build.sh
@@ -814,9 +806,8 @@ files:
814
806
  - views/mdc/body/_footer.erb
815
807
  - views/mdc/body/_header.erb
816
808
  - views/mdc/body/_modal-drawer.erb
817
- - views/mdc/body/_postamble.erb
818
- - views/mdc/body/_preamble.erb
819
809
  - views/mdc/body/_snackbar.erb
810
+ - views/mdc/body/_wrapper.erb
820
811
  - views/mdc/body/drawer/_divider.erb
821
812
  - views/mdc/body/drawer/_item.erb
822
813
  - views/mdc/body/drawer/_label.erb
@@ -948,7 +939,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
948
939
  - !ruby/object:Gem::Version
949
940
  version: 1.3.1
950
941
  requirements: []
951
- rubygems_version: 3.1.4
942
+ rubygems_version: 3.1.6
952
943
  signing_key:
953
944
  specification_version: 4
954
945
  summary: COmmon PResenter Language - A Ruby gem for joyfully writing modern user interfaces
@@ -1,6 +0,0 @@
1
-
2
- Coprl::Presenters.define(:snackbar_attached) do
3
- title 'In Attached'
4
- body 'This can be done in an attached presenter as well'
5
- snackbar 'Attached Snackbar Displayed!'
6
- end
@@ -1,17 +0,0 @@
1
- <%
2
- drawer = pom.drawer
3
- footer = pom.footer
4
- %>
5
- </div>
6
- </div>
7
- <% if drawer %>
8
- </div>
9
- </div>
10
- </div>
11
- <% end %>
12
-
13
- <%= partial "body/snackbar" %>
14
- <% if footer %>
15
- <%= partial "body/footer", :locals => {:footer => footer} %>
16
- <% end %>
17
- </div>