glib-web 0.5.83 → 0.5.84

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/app/channels/glib/channel/is_typing_channel.rb +34 -34
  3. data/app/channels/glib/channel/online_channel.rb +36 -36
  4. data/app/controllers/concerns/glib/analytics/funnel.rb +61 -61
  5. data/app/controllers/concerns/glib/auth/policy.rb +149 -149
  6. data/app/controllers/concerns/glib/json/dynamic_text.rb +126 -126
  7. data/app/controllers/concerns/glib/json/libs.rb +149 -149
  8. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +122 -122
  9. data/app/controllers/concerns/glib/json/transformation.rb +11 -11
  10. data/app/controllers/concerns/glib/json/traversal.rb +92 -92
  11. data/app/controllers/concerns/glib/json/ui.rb +88 -88
  12. data/app/controllers/concerns/glib/json/validation.rb +13 -13
  13. data/app/controllers/glib/home_controller.rb +54 -54
  14. data/app/helpers/glib/app_feature_support_helper.rb +16 -16
  15. data/app/helpers/glib/dynamic_images_helper.rb +55 -55
  16. data/app/helpers/glib/dynamic_texts_helper.rb +42 -42
  17. data/app/helpers/glib/enum_helper.rb +18 -18
  18. data/app/helpers/glib/forms_helper.rb +15 -15
  19. data/app/helpers/glib/json_ui/abstract_builder.rb +309 -309
  20. data/app/helpers/glib/json_ui/action_builder/dialogs.rb +58 -58
  21. data/app/helpers/glib/json_ui/action_builder/http.rb +39 -39
  22. data/app/helpers/glib/json_ui/action_builder/iap.rb +15 -15
  23. data/app/helpers/glib/json_ui/action_builder/panels.rb +14 -14
  24. data/app/helpers/glib/json_ui/action_builder/sheets.rb +15 -15
  25. data/app/helpers/glib/json_ui/action_builder/snackbars.rb +41 -41
  26. data/app/helpers/glib/json_ui/action_builder/windows.rb +38 -38
  27. data/app/helpers/glib/json_ui/action_builder.rb +140 -140
  28. data/app/helpers/glib/json_ui/analytics_helper.rb +17 -17
  29. data/app/helpers/glib/json_ui/dynamic_field_builders.rb +25 -25
  30. data/app/helpers/glib/json_ui/generic_builders.rb +28 -28
  31. data/app/helpers/glib/json_ui/list_builders.rb +110 -110
  32. data/app/helpers/glib/json_ui/menu_builder.rb +96 -94
  33. data/app/helpers/glib/json_ui/page_helper.rb +221 -221
  34. data/app/helpers/glib/json_ui/response_helper.rb +25 -25
  35. data/app/helpers/glib/json_ui/styling_helper.rb +55 -55
  36. data/app/helpers/glib/json_ui/table_builders.rb +74 -74
  37. data/app/helpers/glib/json_ui/view_builder/banners.rb +26 -26
  38. data/app/helpers/glib/json_ui/view_builder/charts.rb +33 -33
  39. data/app/helpers/glib/json_ui/view_builder/fields.rb +291 -291
  40. data/app/helpers/glib/json_ui/view_builder/iap.rb +11 -11
  41. data/app/helpers/glib/json_ui/view_builder/panels.rb +258 -258
  42. data/app/helpers/glib/json_ui/view_builder.rb +248 -247
  43. data/app/helpers/glib/urls_helper.rb +12 -12
  44. data/app/models/concerns/glib/soft_deletable.rb +68 -68
  45. data/app/models/glib/active_storage/attachment.rb +9 -9
  46. data/app/models/glib/active_storage/blob.rb +9 -9
  47. data/app/models/glib/application_record.rb +18 -18
  48. data/app/models/glib/dynamic_text_record.rb +9 -9
  49. data/app/models/glib/text.rb +95 -95
  50. data/app/policies/glib/application_policy.rb +191 -191
  51. data/app/validators/email_typo_validator.rb +38 -38
  52. data/app/validators/email_validator.rb +7 -7
  53. data/app/validators/url_validator.rb +20 -20
  54. data/app/views/json_ui/garage/_nav_menu.json.jbuilder +70 -70
  55. data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +104 -104
  56. data/app/views/json_ui/garage/actions/_http.json.jbuilder +24 -24
  57. data/app/views/json_ui/garage/actions/_panels.json.jbuilder +18 -18
  58. data/app/views/json_ui/garage/actions/_reload.json.jbuilder +17 -17
  59. data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +18 -18
  60. data/app/views/json_ui/garage/actions/_snackbars.json.jbuilder +33 -33
  61. data/app/views/json_ui/garage/actions/_timeouts.json.jbuilder +24 -24
  62. data/app/views/json_ui/garage/actions/_windows.json.jbuilder +24 -24
  63. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +6 -6
  64. data/app/views/json_ui/garage/actions/index.json.jbuilder +24 -24
  65. data/app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder +10 -10
  66. data/app/views/json_ui/garage/forms/basic.json.jbuilder +21 -21
  67. data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +8 -8
  68. data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +43 -43
  69. data/app/views/json_ui/garage/forms/conditional_value.json.jbuilder +36 -36
  70. data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +39 -39
  71. data/app/views/json_ui/garage/forms/dynamic_select.json.jbuilder +24 -24
  72. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +38 -38
  73. data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +37 -37
  74. data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +19 -19
  75. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +3 -3
  76. data/app/views/json_ui/garage/forms/get_request.json.jbuilder +27 -27
  77. data/app/views/json_ui/garage/forms/index.json.jbuilder +116 -116
  78. data/app/views/json_ui/garage/forms/new_rich_text.json.jbuilder +40 -40
  79. data/app/views/json_ui/garage/forms/online_participant1.json.jbuilder +25 -25
  80. data/app/views/json_ui/garage/forms/online_participant2.json.jbuilder +25 -25
  81. data/app/views/json_ui/garage/forms/payments.json.jbuilder +34 -34
  82. data/app/views/json_ui/garage/forms/pickers.json.jbuilder +81 -81
  83. data/app/views/json_ui/garage/forms/ratings.json.jbuilder +49 -49
  84. data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +40 -40
  85. data/app/views/json_ui/garage/forms/selects.json.jbuilder +91 -91
  86. data/app/views/json_ui/garage/forms/show_hide.json.jbuilder +150 -150
  87. data/app/views/json_ui/garage/forms/styled_boxes.json.jbuilder +35 -35
  88. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +17 -17
  89. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +26 -26
  90. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +63 -63
  91. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +25 -25
  92. data/app/views/json_ui/garage/forms/text_validation.json.jbuilder +65 -65
  93. data/app/views/json_ui/garage/forms/timers.json.jbuilder +120 -120
  94. data/app/views/json_ui/garage/home/blank.json.jbuilder +10 -10
  95. data/app/views/json_ui/garage/home/index.json.jbuilder +36 -36
  96. data/app/views/json_ui/garage/home/slow.json.jbuilder +11 -11
  97. data/app/views/json_ui/garage/lists/_autoload_section.json.jbuilder +30 -30
  98. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +32 -32
  99. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +35 -35
  100. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +94 -94
  101. data/app/views/json_ui/garage/lists/edit_actions.json.jbuilder +62 -62
  102. data/app/views/json_ui/garage/lists/fab.json.jbuilder +12 -12
  103. data/app/views/json_ui/garage/lists/index.json.jbuilder +38 -38
  104. data/app/views/json_ui/garage/lists/reordering.json.jbuilder +34 -34
  105. data/app/views/json_ui/garage/lists/templating.json.jbuilder +35 -35
  106. data/app/views/json_ui/garage/notifications/action_cable.json.jbuilder +114 -114
  107. data/app/views/json_ui/garage/notifications/android_post.json.jbuilder +48 -48
  108. data/app/views/json_ui/garage/notifications/index.json.jbuilder +36 -36
  109. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +60 -60
  110. data/app/views/json_ui/garage/pages/flat_centered.json.jbuilder +29 -29
  111. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +29 -29
  112. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +16 -16
  113. data/app/views/json_ui/garage/pages/index.json.jbuilder +62 -62
  114. data/app/views/json_ui/garage/pages/layout.json.jbuilder +18 -18
  115. data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +13 -13
  116. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +10 -10
  117. data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +21 -21
  118. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +40 -40
  119. data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +66 -31
  120. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +78 -78
  121. data/app/views/json_ui/garage/panels/card.json.jbuilder +4 -4
  122. data/app/views/json_ui/garage/panels/carousel.json.jbuilder +38 -38
  123. data/app/views/json_ui/garage/panels/custom.json.jbuilder +17 -17
  124. data/app/views/json_ui/garage/panels/flow.json.jbuilder +59 -59
  125. data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +91 -91
  126. data/app/views/json_ui/garage/panels/index.json.jbuilder +138 -138
  127. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +4 -4
  128. data/app/views/json_ui/garage/panels/responsive.json.jbuilder +98 -98
  129. data/app/views/json_ui/garage/panels/split.json.jbuilder +182 -182
  130. data/app/views/json_ui/garage/panels/ul.json.jbuilder +33 -33
  131. data/app/views/json_ui/garage/panels/vertical.json.jbuilder +55 -55
  132. data/app/views/json_ui/garage/panels/web.json.jbuilder +15 -15
  133. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +13 -13
  134. data/app/views/json_ui/garage/services/image.json.jbuilder +47 -47
  135. data/app/views/json_ui/garage/services/index.json.jbuilder +17 -17
  136. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +16 -16
  137. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +43 -43
  138. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +50 -50
  139. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +29 -29
  140. data/app/views/json_ui/garage/tables/horizontal_scroll.json.jbuilder +26 -26
  141. data/app/views/json_ui/garage/tables/index.json.jbuilder +25 -25
  142. data/app/views/json_ui/garage/tables/layout.json.jbuilder +40 -40
  143. data/app/views/json_ui/garage/views/_chart_data.json.jbuilder +17 -17
  144. data/app/views/json_ui/garage/views/banners.json.jbuilder +67 -63
  145. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +30 -30
  146. data/app/views/json_ui/garage/views/charts.json.jbuilder +115 -115
  147. data/app/views/json_ui/garage/views/controls.json.jbuilder +37 -37
  148. data/app/views/json_ui/garage/views/iap.json.jbuilder +21 -21
  149. data/app/views/json_ui/garage/views/icon_names.json.jbuilder +1450 -1450
  150. data/app/views/json_ui/garage/views/icons.json.jbuilder +15 -15
  151. data/app/views/json_ui/garage/views/images.json.jbuilder +89 -89
  152. data/app/views/json_ui/garage/views/index.json.jbuilder +83 -83
  153. data/app/views/json_ui/garage/views/links.json.jbuilder +70 -70
  154. data/app/views/json_ui/garage/views/map_cluster_data.json.jbuilder +41 -41
  155. data/app/views/json_ui/garage/views/map_data.json.jbuilder +51 -51
  156. data/app/views/json_ui/garage/views/maps.json.jbuilder +31 -31
  157. data/app/views/json_ui/garage/views/markdowns.json.jbuilder +41 -41
  158. data/app/views/json_ui/garage/views/misc.json.jbuilder +34 -34
  159. data/app/views/json_ui/garage/views/progress.json.jbuilder +31 -31
  160. data/app/views/json_ui/garage/views/texts.json.jbuilder +35 -35
  161. data/app/views/layouts/json_ui/renderer.html.erb +35 -35
  162. data/config/routes.rb +7 -7
  163. data/lib/generators/glib/install_generator.rb +24 -24
  164. data/lib/generators/templates/20191017062519_create_texts.rb +12 -12
  165. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +7 -7
  166. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +7 -7
  167. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +27 -27
  168. data/lib/generators/templates/database.yml +107 -107
  169. data/lib/generators/templates/dynamic_text.rb +2 -2
  170. data/lib/glib/crypt/utils.rb +26 -26
  171. data/lib/glib/dynamic_text/config.rb +21 -21
  172. data/lib/glib/engine.rb +7 -7
  173. data/lib/glib/json_crawler/action_crawler.rb +23 -23
  174. data/lib/glib/json_crawler/action_crawlers/action_http.rb +11 -11
  175. data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +48 -48
  176. data/lib/glib/json_crawler/action_crawlers/menu.rb +12 -12
  177. data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +19 -19
  178. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +13 -13
  179. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +33 -33
  180. data/lib/glib/json_crawler/coverage.rb +20 -20
  181. data/lib/glib/json_crawler/http.rb +120 -120
  182. data/lib/glib/json_crawler/router.rb +90 -90
  183. data/lib/glib/json_crawler.rb +11 -11
  184. data/lib/glib/mailer_tester.rb +36 -36
  185. data/lib/glib/test_helpers.rb +52 -52
  186. data/lib/glib/value.rb +7 -7
  187. data/lib/glib/version.rb +5 -5
  188. data/lib/glib-web.rb +9 -9
  189. data/lib/tasks/db.rake +95 -95
  190. metadata +2 -3
@@ -1,51 +1,51 @@
1
-
2
- page = json_ui_page json
3
-
4
- json.pins do
5
- latitude = params[:lat]&.to_f
6
- longitude = params[:long]&.to_f
7
-
8
- json.child! do
9
- json.latitude 13.516680
10
- json.longitude 144.817322
11
- json.infoWindow do
12
- json.title 'Place 1'
13
- json.subtitle 'Big shopping mall'
14
- end
15
- end
16
-
17
- json.child! do
18
- json.latitude 13.473001
19
- json.longitude 144.771303
20
- json.infoWindow do
21
- json.title 'Place 2'
22
- json.subtitle 'High class restaurant'
23
- end
24
- end
25
-
26
- json.child! do
27
- json.latitude 13.375903 + rand(0..0.1)
28
- json.longitude 144.749791 + rand(0..0.1)
29
- json.infoWindow do
30
- json.title 'Place 3'
31
- json.subtitle 'Random location'
32
- end
33
- end
34
-
35
- json.child! do
36
- json.latitude latitude
37
- json.longitude longitude
38
- json.infoWindow do
39
- json.title 'You'
40
- json.subtitle 'Current location'
41
-
42
- json.body do
43
- page.vertical_content padding: { top: 10 }, childViews: ->(body) do
44
- body.button text: 'Info', onClick: ->(action) do
45
- action.dialogs_alert message: "#{latitude}, #{longitude}"
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
1
+
2
+ page = json_ui_page json
3
+
4
+ json.pins do
5
+ latitude = params[:lat]&.to_f
6
+ longitude = params[:long]&.to_f
7
+
8
+ json.child! do
9
+ json.latitude 13.516680
10
+ json.longitude 144.817322
11
+ json.infoWindow do
12
+ json.title 'Place 1'
13
+ json.subtitle 'Big shopping mall'
14
+ end
15
+ end
16
+
17
+ json.child! do
18
+ json.latitude 13.473001
19
+ json.longitude 144.771303
20
+ json.infoWindow do
21
+ json.title 'Place 2'
22
+ json.subtitle 'High class restaurant'
23
+ end
24
+ end
25
+
26
+ json.child! do
27
+ json.latitude 13.375903 + rand(0..0.1)
28
+ json.longitude 144.749791 + rand(0..0.1)
29
+ json.infoWindow do
30
+ json.title 'Place 3'
31
+ json.subtitle 'Random location'
32
+ end
33
+ end
34
+
35
+ json.child! do
36
+ json.latitude latitude
37
+ json.longitude longitude
38
+ json.infoWindow do
39
+ json.title 'You'
40
+ json.subtitle 'Current location'
41
+
42
+ json.body do
43
+ page.vertical_content padding: { top: 10 }, childViews: ->(body) do
44
+ body.button text: 'Info', onClick: ->(action) do
45
+ action.dialogs_alert message: "#{latitude}, #{longitude}"
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -1,31 +1,31 @@
1
- json.title 'Views'
2
-
3
- json_ui_page json do |page|
4
- render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
6
- page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
- scroll.spacer height: 20
8
- scroll.h2 text: 'Map with Markers'
9
- scroll.spacer height: 6
10
- scroll.map \
11
- width: 'matchParent',
12
- latitude: 13.4837,
13
- longitude: 144.7917,
14
- zoom: 11,
15
- height: 250,
16
- dataUrl: json_ui_garage_url(path: 'views/map_data')
17
-
18
- scroll.spacer height: 20
19
- scroll.h2 text: 'Map with Clustered Markers'
20
- scroll.spacer height: 6
21
- scroll.map \
22
- width: 'matchParent',
23
- latitude: -42.162376,
24
- longitude: 172.671437,
25
- zoom: 7,
26
- height: 480,
27
- cluster: true,
28
- dataUrl: json_ui_garage_url(path: 'views/map_cluster_data')
29
-
30
- end
31
- end
1
+ json.title 'Views'
2
+
3
+ json_ui_page json do |page|
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.spacer height: 20
8
+ scroll.h2 text: 'Map with Markers'
9
+ scroll.spacer height: 6
10
+ scroll.map \
11
+ width: 'matchParent',
12
+ latitude: 13.4837,
13
+ longitude: 144.7917,
14
+ zoom: 11,
15
+ height: 250,
16
+ dataUrl: json_ui_garage_url(path: 'views/map_data')
17
+
18
+ scroll.spacer height: 20
19
+ scroll.h2 text: 'Map with Clustered Markers'
20
+ scroll.spacer height: 6
21
+ scroll.map \
22
+ width: 'matchParent',
23
+ latitude: -42.162376,
24
+ longitude: 172.671437,
25
+ zoom: 7,
26
+ height: 480,
27
+ cluster: true,
28
+ dataUrl: json_ui_garage_url(path: 'views/map_cluster_data')
29
+
30
+ end
31
+ end
@@ -1,41 +1,41 @@
1
- json.title 'Views'
2
-
3
- json_ui_page json do |page|
4
- render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
6
- page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
- scroll.spacer height: 20
8
- scroll.h2 text: 'Markdown'
9
- scroll.spacer height: 6
10
- scroll.markdown text:
11
- '# h1 Heading' + "\n" +
12
- '## h2 Heading' + "\n" +
13
- '### h3 Heading' + "\n" +
14
- '#### h4 Heading' + "\n" +
15
- '##### h5 Heading' + "\n" +
16
- '###### h6 Heading' + "\n" +
17
- "\n" +
18
- '## Emphasis' + "\n" +
19
- "\n" +
20
- '**This is bold text**' + "\n" +
21
- "\n" +
22
- '__This is bold text__' + "\n" +
23
- "\n" +
24
- '*This is italic text*' + "\n" +
25
- "\n" +
26
- '_This is italic text_' + "\n" +
27
- "\n" +
28
- '~~Strikethrough~~' + "\n" +
29
- "\n" +
30
- 'https://www.google.com' + "\n"
31
-
32
- scroll.spacer height: 20
33
- scroll.h2 text: 'Markdown with preview (Web Only)'
34
- scroll.spacer height: 6
35
- scroll.markdown text: 'Here is the video: https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
36
-
37
- scroll.spacer height: 10
38
- scroll.markdown text: 'Some videos: https://youtu.be/ATnpEOo3GJA, https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
39
-
40
- end
41
- end
1
+ json.title 'Views'
2
+
3
+ json_ui_page json do |page|
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.spacer height: 20
8
+ scroll.h2 text: 'Markdown'
9
+ scroll.spacer height: 6
10
+ scroll.markdown text:
11
+ '# h1 Heading' + "\n" +
12
+ '## h2 Heading' + "\n" +
13
+ '### h3 Heading' + "\n" +
14
+ '#### h4 Heading' + "\n" +
15
+ '##### h5 Heading' + "\n" +
16
+ '###### h6 Heading' + "\n" +
17
+ "\n" +
18
+ '## Emphasis' + "\n" +
19
+ "\n" +
20
+ '**This is bold text**' + "\n" +
21
+ "\n" +
22
+ '__This is bold text__' + "\n" +
23
+ "\n" +
24
+ '*This is italic text*' + "\n" +
25
+ "\n" +
26
+ '_This is italic text_' + "\n" +
27
+ "\n" +
28
+ '~~Strikethrough~~' + "\n" +
29
+ "\n" +
30
+ 'https://www.google.com' + "\n"
31
+
32
+ scroll.spacer height: 20
33
+ scroll.h2 text: 'Markdown with preview (Web Only)'
34
+ scroll.spacer height: 6
35
+ scroll.markdown text: 'Here is the video: https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
36
+
37
+ scroll.spacer height: 10
38
+ scroll.markdown text: 'Some videos: https://youtu.be/ATnpEOo3GJA, https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
39
+
40
+ end
41
+ end
@@ -1,34 +1,34 @@
1
- json.title 'Views'
2
-
3
- json_ui_page json do |page|
4
- render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
6
- page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
-
8
- # scroll.h2 text: 'Unordered List'
9
- # scroll.spacer height: 6
10
- # scroll.panels_ul childViews: ->(ul) do
11
- # ul.button text: 'Button', styleClass: 'link', onClick: ->(action) do
12
- # action.windows_open url: json_ui_garage_url(path: 'home/blank')
13
- # end
14
- # ul.label text: 'Label'
15
- # end
16
-
17
- scroll.spacer height: 20
18
- scroll.h2 text: 'Time'
19
- scroll.spacer height: 6
20
- scroll.datetime value: 1.week.ago, format: 'YYYY-MM-DD'
21
- scroll.datetime value: DateTime.current, format: 'hh:mm:ss', tick: true
22
-
23
- # scroll.spacer height: 20
24
- # scroll.h2 text: 'Map'
25
- # scroll.spacer height: 6
26
- # scroll.map width: 'matchParent', latitude: 13.4837, longitude: 144.7917, zoom: 11, height: 250, dataUrl: json_ui_garage_url(path: 'views/map_data')
27
-
28
- scroll.spacer height: 20
29
- scroll.h2 text: 'Calendar'
30
- scroll.spacer height: 6
31
- scroll.calendar width: 'matchParent', height: 500, dataUrl: json_ui_garage_url(path: 'views/calendar_data')
32
-
33
- end
34
- end
1
+ json.title 'Views'
2
+
3
+ json_ui_page json do |page|
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+
8
+ # scroll.h2 text: 'Unordered List'
9
+ # scroll.spacer height: 6
10
+ # scroll.panels_ul childViews: ->(ul) do
11
+ # ul.button text: 'Button', styleClass: 'link', onClick: ->(action) do
12
+ # action.windows_open url: json_ui_garage_url(path: 'home/blank')
13
+ # end
14
+ # ul.label text: 'Label'
15
+ # end
16
+
17
+ scroll.spacer height: 20
18
+ scroll.h2 text: 'Time'
19
+ scroll.spacer height: 6
20
+ scroll.datetime value: 1.week.ago, format: 'YYYY-MM-DD'
21
+ scroll.datetime value: DateTime.current, format: 'hh:mm:ss', tick: true
22
+
23
+ # scroll.spacer height: 20
24
+ # scroll.h2 text: 'Map'
25
+ # scroll.spacer height: 6
26
+ # scroll.map width: 'matchParent', latitude: 13.4837, longitude: 144.7917, zoom: 11, height: 250, dataUrl: json_ui_garage_url(path: 'views/map_data')
27
+
28
+ scroll.spacer height: 20
29
+ scroll.h2 text: 'Calendar'
30
+ scroll.spacer height: 6
31
+ scroll.calendar width: 'matchParent', height: 500, dataUrl: json_ui_garage_url(path: 'views/calendar_data')
32
+
33
+ end
34
+ end
@@ -1,31 +1,31 @@
1
- json.title 'Views'
2
-
3
- page = json_ui_page json
4
- render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
6
- page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
- scroll.h2 text: 'Progress Bar'
8
- scroll.spacer height: 6
9
- scroll.progressBar value: 0.1
10
- scroll.spacer height: 20
11
-
12
- scroll.h2 text: 'Thin Progress Bar'
13
- scroll.spacer height: 6
14
- scroll.progressBar value: 0.25, height: 5, styleClass: 'no-text'
15
- scroll.spacer height: 20
16
-
17
- scroll.h2 text: 'Striped Progress Bar'
18
- scroll.spacer height: 6
19
- scroll.progressBar value: 0.5, styleClass: 'striped'
20
- scroll.spacer height: 20
21
-
22
- scroll.h2 text: 'Progress Bar with custom colors'
23
- scroll.spacer height: 6
24
- scroll.progressBar value: 0.75, color: '#272551', backgroundColor: '#FFFF00', styleClass: 'light'
25
- scroll.spacer height: 20
26
-
27
- scroll.h2 text: 'Reversed Progress Bar'
28
- scroll.spacer height: 6
29
- scroll.progressBar value: 0.1, reversed: true
30
- scroll.spacer height: 20
31
- end
1
+ json.title 'Views'
2
+
3
+ page = json_ui_page json
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.h2 text: 'Progress Bar'
8
+ scroll.spacer height: 6
9
+ scroll.progressBar value: 0.1
10
+ scroll.spacer height: 20
11
+
12
+ scroll.h2 text: 'Thin Progress Bar'
13
+ scroll.spacer height: 6
14
+ scroll.progressBar value: 0.25, height: 5, styleClass: 'no-text'
15
+ scroll.spacer height: 20
16
+
17
+ scroll.h2 text: 'Striped Progress Bar'
18
+ scroll.spacer height: 6
19
+ scroll.progressBar value: 0.5, styleClass: 'striped'
20
+ scroll.spacer height: 20
21
+
22
+ scroll.h2 text: 'Progress Bar with custom colors'
23
+ scroll.spacer height: 6
24
+ scroll.progressBar value: 0.75, color: '#272551', backgroundColor: '#FFFF00', styleClass: 'light'
25
+ scroll.spacer height: 20
26
+
27
+ scroll.h2 text: 'Reversed Progress Bar'
28
+ scroll.spacer height: 6
29
+ scroll.progressBar value: 0.1, reversed: true
30
+ scroll.spacer height: 20
31
+ end
@@ -1,35 +1,35 @@
1
- json.title 'Views'
2
-
3
- page = json_ui_page json
4
- render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
6
- page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
- scroll.h1 text: 'Heading 1'
8
-
9
- scroll.spacer height: 10
10
- scroll.h2 text: 'Heading 2'
11
-
12
- scroll.spacer height: 10
13
- scroll.h3 text: 'Heading 3'
14
-
15
- scroll.spacer height: 10
16
- scroll.h4 text: 'Heading 4'
17
-
18
- scroll.spacer height: 10
19
- scroll.label text: 'Label'
20
-
21
- scroll.spacer height: 20
22
- scroll.hr width: 'matchParent'
23
-
24
- scroll.spacer height: 20
25
- scroll.h2 text: 'Paragraph'
26
- scroll.spacer height: 6
27
- scroll.p text: 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC,'\
28
- ' making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words,'\
29
- ' consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'\
30
- ' Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC.'\
31
- ' This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..",'\
32
- ' comes from a line in section 1.10.32.' + "\n\n" +
33
- 'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum"'\
34
- ' by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.'
35
- end
1
+ json.title 'Views'
2
+
3
+ page = json_ui_page json
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.h1 text: 'Heading 1'
8
+
9
+ scroll.spacer height: 10
10
+ scroll.h2 text: 'Heading 2'
11
+
12
+ scroll.spacer height: 10
13
+ scroll.h3 text: 'Heading 3'
14
+
15
+ scroll.spacer height: 10
16
+ scroll.h4 text: 'Heading 4'
17
+
18
+ scroll.spacer height: 10
19
+ scroll.label text: 'Label'
20
+
21
+ scroll.spacer height: 20
22
+ scroll.hr width: 'matchParent'
23
+
24
+ scroll.spacer height: 20
25
+ scroll.h2 text: 'Paragraph'
26
+ scroll.spacer height: 6
27
+ scroll.p text: 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC,'\
28
+ ' making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words,'\
29
+ ' consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'\
30
+ ' Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC.'\
31
+ ' This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..",'\
32
+ ' comes from a line in section 1.10.32.' + "\n\n" +
33
+ 'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum"'\
34
+ ' by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.'
35
+ end
@@ -1,35 +1,35 @@
1
- <!DOCTYPE html>
2
- <html lang="<%= I18n.locale %>">
3
-
4
- <head>
5
- <meta charset="utf-8" />
6
- <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
7
-
8
- <title>App</title>
9
- <%= csrf_meta_tags %>
10
-
11
- <%= javascript_pack_tag 'vue_renderer', defer: true %>
12
- <%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
13
-
14
- <%= stylesheet_pack_tag 'vue_renderer' %>
15
-
16
- <link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
17
-
18
- <%# Without this, checkboxes and radio buttons will not display. %>
19
- <link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
20
-
21
- <%= yield :head %>
22
- </head>
23
-
24
- <body>
25
- <noscript>Please enable JavaScript to view this web site.</noscript>
26
- <div id="app"></div>
27
-
28
- <script>
29
- var __page = <%= raw @__json_ui_orig_page%>;
30
- </script>
31
-
32
- <%= yield :footer %>
33
- </body>
34
-
35
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="<%= I18n.locale %>">
3
+
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
7
+
8
+ <title>App</title>
9
+ <%= csrf_meta_tags %>
10
+
11
+ <%= javascript_pack_tag 'vue_renderer', defer: true %>
12
+ <%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
13
+
14
+ <%= stylesheet_pack_tag 'vue_renderer' %>
15
+
16
+ <link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
17
+
18
+ <%# Without this, checkboxes and radio buttons will not display. %>
19
+ <link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
20
+
21
+ <%= yield :head %>
22
+ </head>
23
+
24
+ <body>
25
+ <noscript>Please enable JavaScript to view this web site.</noscript>
26
+ <div id="app"></div>
27
+
28
+ <script>
29
+ var __page = <%= raw @__json_ui_orig_page%>;
30
+ </script>
31
+
32
+ <%= yield :footer %>
33
+ </body>
34
+
35
+ </html>
data/config/routes.rb CHANGED
@@ -1,8 +1,8 @@
1
- Glib::Web::Engine.routes.draw do
2
- scope module: :glib do
3
- get 'json_ui_garage', to: 'home#json_ui_garage'
4
- post 'json_ui_garage', to: 'home#json_ui_garage'
5
- patch 'json_ui_garage', to: 'home#json_ui_garage'
6
- delete 'json_ui_garage', to: 'home#json_ui_garage'
7
- end
1
+ Glib::Web::Engine.routes.draw do
2
+ scope module: :glib do
3
+ get 'json_ui_garage', to: 'home#json_ui_garage'
4
+ post 'json_ui_garage', to: 'home#json_ui_garage'
5
+ patch 'json_ui_garage', to: 'home#json_ui_garage'
6
+ delete 'json_ui_garage', to: 'home#json_ui_garage'
7
+ end
8
8
  end
@@ -1,24 +1,24 @@
1
- module Glib
2
- module Generators
3
- class InstallGenerator < Rails::Generators::Base
4
- source_root File.expand_path('../../templates', __FILE__)
5
-
6
- class_option :redis_env_key, type: :string, default: 'DT_REDIS_URL'
7
- class_option :database_env_key, type: :string, default: 'DT_DATABASE_URL'
8
- class_option :app_name, type: :string, default: Rails.application.class.parent_name
9
-
10
- def copy_initializer
11
- [
12
- '20191017062519_create_texts.rb',
13
- '20191024063257_add_scope_to_texts.rb',
14
- '20191112095018_add_lang_to_texts.rb',
15
- '20191126071051_create_active_storage_tables.active_storage.rb'
16
- ].each do |migration_file|
17
- template migration_file, "db/dynamic_text_migrate/#{migration_file}"
18
- end
19
- template 'dynamic_text.rb', 'config/initializers/dynamic_text.rb'
20
- template 'database.yml', 'config/database.yml'
21
- end
22
- end
23
- end
24
- end
1
+ module Glib
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../../templates', __FILE__)
5
+
6
+ class_option :redis_env_key, type: :string, default: 'DT_REDIS_URL'
7
+ class_option :database_env_key, type: :string, default: 'DT_DATABASE_URL'
8
+ class_option :app_name, type: :string, default: Rails.application.class.parent_name
9
+
10
+ def copy_initializer
11
+ [
12
+ '20191017062519_create_texts.rb',
13
+ '20191024063257_add_scope_to_texts.rb',
14
+ '20191112095018_add_lang_to_texts.rb',
15
+ '20191126071051_create_active_storage_tables.active_storage.rb'
16
+ ].each do |migration_file|
17
+ template migration_file, "db/dynamic_text_migrate/#{migration_file}"
18
+ end
19
+ template 'dynamic_text.rb', 'config/initializers/dynamic_text.rb'
20
+ template 'database.yml', 'config/database.yml'
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,12 +1,12 @@
1
- class CreateTexts < ActiveRecord::Migration[6.0]
2
- def change
3
- create_table :texts do |t|
4
- t.string :key
5
- t.text :content
6
-
7
- t.timestamps
8
- end
9
-
10
- add_index :texts, :key, unique: true
11
- end
12
- end
1
+ class CreateTexts < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :texts do |t|
4
+ t.string :key
5
+ t.text :content
6
+
7
+ t.timestamps
8
+ end
9
+
10
+ add_index :texts, :key, unique: true
11
+ end
12
+ end
@@ -1,7 +1,7 @@
1
- class AddScopeToTexts < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :texts, :scope, :string
4
- remove_index :texts, :key
5
- add_index :texts, [:scope, :key], unique: true
6
- end
7
- end
1
+ class AddScopeToTexts < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :texts, :scope, :string
4
+ remove_index :texts, :key
5
+ add_index :texts, [:scope, :key], unique: true
6
+ end
7
+ end
@@ -1,7 +1,7 @@
1
- class AddLangToTexts < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :texts, :lang, :string
4
- remove_index :texts, [:scope, :key]
5
- add_index :texts, [:scope, :lang, :key], unique: true
6
- end
7
- end
1
+ class AddLangToTexts < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :texts, :lang, :string
4
+ remove_index :texts, [:scope, :key]
5
+ add_index :texts, [:scope, :lang, :key], unique: true
6
+ end
7
+ end