glib-web 0.2.16 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -5
  2. data/app/controllers/concerns/application/json/libs.rb +0 -0
  3. data/app/controllers/concerns/application/json/transformation.rb +0 -0
  4. data/app/controllers/concerns/application/json/ui.rb +0 -0
  5. data/app/controllers/concerns/application/json/validation.rb +0 -0
  6. data/app/controllers/glib/home_controller.rb +0 -0
  7. data/app/helpers/glib/json_ui/abstract_builder.rb +0 -0
  8. data/app/helpers/glib/json_ui/action_builder.rb +0 -0
  9. data/app/helpers/glib/json_ui/list_builders.rb +0 -0
  10. data/app/helpers/glib/json_ui/menu_builder.rb +0 -0
  11. data/app/helpers/glib/json_ui/page_helper.rb +0 -0
  12. data/app/helpers/glib/json_ui/response_helper.rb +0 -0
  13. data/app/helpers/glib/json_ui/styling_helper.rb +0 -0
  14. data/app/helpers/glib/json_ui/table_builders.rb +0 -0
  15. data/app/helpers/glib/json_ui/view_builder.rb +0 -0
  16. data/app/helpers/glib/json_ui/view_builder/banners.rb +0 -0
  17. data/app/helpers/glib/json_ui/view_builder/fields.rb +20 -2
  18. data/app/helpers/glib/json_ui/view_builder/panels.rb +8 -0
  19. data/app/views/app/views/json_ui/vue/renderer.html.erb +0 -0
  20. data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/actions/index.json.jbuilder +0 -0
  22. data/app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder +0 -0
  23. data/app/views/json_ui/garage/forms/basic.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/forms/dynamic_select.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/forms/get_request.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/forms/index.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/forms/pickers.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/forms/selects.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/forms/text_validation.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/home/index.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/lists/edit_actions.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/lists/index.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/lists/templating.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/pages/flat_centered.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/pages/index.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/panels/carousel.json.jbuilder +0 -0
  58. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  59. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +0 -0
  60. data/app/views/json_ui/garage/panels/index.json.jbuilder +0 -0
  61. data/app/views/json_ui/garage/panels/responsive.json.jbuilder +0 -0
  62. data/app/views/json_ui/garage/panels/split.json.jbuilder +0 -0
  63. data/app/views/json_ui/garage/panels/table.json.jbuilder +0 -0
  64. data/app/views/json_ui/garage/panels/vertical.json.jbuilder +0 -0
  65. data/app/views/json_ui/garage/views/banners.json.jbuilder +0 -0
  66. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  67. data/app/views/json_ui/garage/views/carousels.json.jbuilder +0 -0
  68. data/app/views/json_ui/garage/views/charts.json.jbuilder +0 -0
  69. data/app/views/json_ui/garage/views/images.json.jbuilder +0 -0
  70. data/app/views/json_ui/garage/views/index.json.jbuilder +0 -0
  71. data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
  72. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  73. data/app/views/json_ui/garage/views/misc.json.jbuilder +0 -0
  74. data/app/views/json_ui/garage/views/texts.json.jbuilder +0 -0
  75. data/config/routes.rb +0 -0
  76. data/lib/glib-web.rb +0 -0
  77. data/lib/glib/engine.rb +0 -0
  78. data/lib/glib/json_crawler.rb +0 -0
  79. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  80. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  81. data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +0 -0
  82. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  83. data/lib/glib/json_crawler/http.rb +0 -0
  84. data/lib/glib/json_crawler/router.rb +0 -0
  85. data/lib/glib/value.rb +0 -0
  86. data/lib/glib/version.rb +0 -0
  87. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: f4659dc535d33147116f41a6dfe7baa4d4b3c978c01b11da299b5ecf307ed7f4
4
- data.tar.gz: 7b5c0dcd35db7c5e6c57cbc88f65dce685d012ed764555696d40f7eef6ebbaa0
2
+ SHA1:
3
+ metadata.gz: 88b1d9b7003edc234ba88cce7d35f5e36f884984
4
+ data.tar.gz: e9af1f62d108767b64137910b0ef7beeb39a5577
5
5
  SHA512:
6
- metadata.gz: a86060ac0d5c6ac8c83ec26ff3217cd51c4272b9bf83abe7afc3e2197729141d13288030b46060df528ab54edbf3929ea56fb750cb226e544aae18fda428115f
7
- data.tar.gz: 13c6ebcd8df2436ba9bd927740645fcb834440996a8c2bb108191e534ba75f081c89e29edd52483fd71eb38a214195d5020e6e820b85e5f43ec81e338de54af6
6
+ metadata.gz: 7acfef633d39da9867f25f57f820fdcd4cf311340f8fbab9a41841328edf00333cf8b532ca158bdd56c5b968ee7ffb8f8e5e9bc9bf64d7384bf0f117a950162f
7
+ data.tar.gz: 6e008f5246a55f16c2f6acbdca998b8affce920aa2e857511a52a30e010fd1e0aa8c33aa32fe1a4fd103db73229abd9fbd0c16bafda3684294aa25b05ad5f51f
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -2,7 +2,21 @@ class Glib::JsonUi::ViewBuilder
2
2
  module Fields
3
3
 
4
4
  class AbstractField < View
5
- string :label
5
+ def label(label)
6
+ @label = label
7
+ end
8
+
9
+ def label_args(label_args)
10
+ @label_args = label_args
11
+ end
12
+
13
+ def hint(hint)
14
+ @hint = hint
15
+ end
16
+
17
+ def hint_args(hint_args)
18
+ @hint_args = hint_args
19
+ end
6
20
 
7
21
  def name(name)
8
22
  @name = name if name != Glib::Value::DEFAULT
@@ -25,9 +39,13 @@ class Glib::JsonUi::ViewBuilder
25
39
  if (@prop && form = page.current_form)
26
40
  @name ||= form.field_name(@prop, @multiple || false)
27
41
  @value ||= form.field_value(@prop)
42
+ @label ||= form.field_label(@prop, @label_args || {})
43
+ @hint ||= form.hint_label(@prop, @hint_args || {})
28
44
  end
29
45
  json.name @name
30
- json.value @value
46
+ json.value @value if @value
47
+ json.label @label if @label
48
+ json.hint @hint if @hint
31
49
  end
32
50
 
33
51
  end
@@ -24,6 +24,14 @@ class Glib::JsonUi::ViewBuilder
24
24
  end
25
25
  end
26
26
 
27
+ def field_label(prop, args)
28
+ I18n.t("activerecord.attributes.#{@model_name}.#{prop}", args)
29
+ end
30
+
31
+ def hint_label(prop, args)
32
+ I18n.t("glib_models.#{@model_name}.#{prop}.hint", args.merge(default: nil))
33
+ end
34
+
27
35
  def url(url)
28
36
  @url = url
29
37
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  requirements: []
136
136
  rubyforge_project:
137
- rubygems_version: 2.7.6
137
+ rubygems_version: 2.6.8
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: ''