glib-web 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/app/helpers/glib/json_ui/page_helper.rb +26 -14
 - data/app/views/json_ui/garage/_nav_menu.json.jbuilder +112 -70
 - data/app/views/json_ui/garage/actions/index.json.jbuilder +10 -11
 - data/app/views/json_ui/garage/forms/basic.json.jbuilder +4 -55
 - data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +2 -2
 - data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +2 -31
 - data/app/views/json_ui/garage/forms/index.json.jbuilder +7 -7
 - data/app/views/json_ui/garage/forms/submit_indicator.json.jbuilder +2 -26
 - data/app/views/json_ui/garage/home/index.json.jbuilder +9 -9
 - data/app/views/json_ui/garage/lists/index.json.jbuilder +5 -27
 - data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +17 -10
 - data/app/views/json_ui/garage/lists/templating.json.jbuilder +7 -49
 - data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +46 -38
 - data/app/views/json_ui/garage/pages/index.json.jbuilder +6 -39
 - data/app/views/json_ui/garage/pages/layout.json.jbuilder +2 -34
 - data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +2 -31
 - data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +2 -2
 - data/app/views/json_ui/garage/panels/carousel.json.jbuilder +2 -2
 - data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +2 -123
 - data/app/views/json_ui/garage/panels/index.json.jbuilder +7 -38
 - data/app/views/json_ui/garage/panels/split.json.jbuilder +16 -16
 - data/app/views/json_ui/garage/panels/vertical.json.jbuilder +2 -93
 - data/app/views/json_ui/garage/views/basic.json.jbuilder +2 -20
 - data/app/views/json_ui/garage/views/carousels.json.jbuilder +2 -96
 - data/app/views/json_ui/garage/views/images.json.jbuilder +2 -55
 - data/app/views/json_ui/garage/views/index.json.jbuilder +6 -37
 - data/lib/glib/json_crawler/action_crawlers/windows_open.rb +1 -1
 - metadata +1 -2
 - data/app/helpers/glib/json_ui/json_ui_helper.rb +0 -94
 
| 
         @@ -1,29 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            json.title 'Views'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            render "#{@path_prefix}/nav_menu", json: json
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
3 
     | 
    
         
             
            json_ui_page json do |page|
         
     | 
| 
      
 4 
     | 
    
         
            +
              render "#{@path_prefix}/nav_menu", json: json, page: page
         
     | 
| 
      
 5 
     | 
    
         
            +
              
         
     | 
| 
       6 
6 
     | 
    
         
             
              page.scroll childViews: ->(scroll) do
         
     | 
| 
       7 
7 
     | 
    
         
             
                scroll.label text: "\n"
         
     | 
| 
       8 
8 
     | 
    
         
             
                scroll.h1 text: 'Map'
         
     | 
| 
       9 
9 
     | 
    
         
             
                scroll.map latitude: 13.4837, longitude: 144.7917, zoom: 11, width: 'matchParent', height: 250, dataUrl: json_ui_garage_url(path: 'views/map_data')
         
     | 
| 
       10 
10 
     | 
    
         
             
              end
         
     | 
| 
       11 
11 
     | 
    
         
             
            end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            # json_body_with_scroll json do
         
     | 
| 
       14 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       15 
     | 
    
         
            -
            #     json.view 'label-v1'
         
     | 
| 
       16 
     | 
    
         
            -
            #     json.text "\n"
         
     | 
| 
       17 
     | 
    
         
            -
            #   end
         
     | 
| 
       18 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       19 
     | 
    
         
            -
            #     json.view 'h1-v1'
         
     | 
| 
       20 
     | 
    
         
            -
            #     json.text 'Map'
         
     | 
| 
       21 
     | 
    
         
            -
            #   end
         
     | 
| 
       22 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       23 
     | 
    
         
            -
            #     json.view 'map-v1'
         
     | 
| 
       24 
     | 
    
         
            -
            #     json.latitude 13.4837
         
     | 
| 
       25 
     | 
    
         
            -
            #     json.longitude 144.7917
         
     | 
| 
       26 
     | 
    
         
            -
            #     json.zoom 11
         
     | 
| 
       27 
     | 
    
         
            -
            #     json.height '250px'
         
     | 
| 
       28 
     | 
    
         
            -
            #   end
         
     | 
| 
       29 
     | 
    
         
            -
            # end
         
     | 
| 
         @@ -1,11 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            json.title 'Views'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            render "#{@path_prefix}/nav_menu", json: json
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
3 
     | 
    
         
             
            image_url1 = 'http://ichef.bbci.co.uk/news/976/cpsprodpb/18106/production/_97266589_gettyimages-474547165.jpg'
         
     | 
| 
       6 
4 
     | 
    
         
             
            image_url2 = 'https://s.abcnews.com/images/International/Guam03-gty-jrl-170809_16x9_992.jpg'
         
     | 
| 
       7 
5 
     | 
    
         | 
| 
       8 
6 
     | 
    
         
             
            json_ui_page json do |page|
         
     | 
| 
      
 7 
     | 
    
         
            +
              render "#{@path_prefix}/nav_menu", json: json, page: page
         
     | 
| 
      
 8 
     | 
    
         
            +
              
         
     | 
| 
       9 
9 
     | 
    
         
             
              page.scroll childViews: ->(scroll) do
         
     | 
| 
       10 
10 
     | 
    
         
             
                scroll.label text: "\n"
         
     | 
| 
       11 
11 
     | 
    
         
             
                scroll.h1 text: 'Carousel with labels'
         
     | 
| 
         @@ -35,97 +35,3 @@ json_ui_page json do |page| 
     | 
|
| 
       35 
35 
     | 
    
         
             
                end
         
     | 
| 
       36 
36 
     | 
    
         
             
              end
         
     | 
| 
       37 
37 
     | 
    
         
             
            end
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
            # json_body_with_scroll json do
         
     | 
| 
       40 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       41 
     | 
    
         
            -
            #     json.view 'label-v1'
         
     | 
| 
       42 
     | 
    
         
            -
            #     json.text "\n"
         
     | 
| 
       43 
     | 
    
         
            -
            #   end
         
     | 
| 
       44 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       45 
     | 
    
         
            -
            #     json.view 'h1-v1'
         
     | 
| 
       46 
     | 
    
         
            -
            #     json.text 'Carousel with labels'
         
     | 
| 
       47 
     | 
    
         
            -
            #   end
         
     | 
| 
       48 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       49 
     | 
    
         
            -
            #     json.view 'panels/carousel-v1'
         
     | 
| 
       50 
     | 
    
         
            -
            #     json.childViews do
         
     | 
| 
       51 
     | 
    
         
            -
            #       json.child! do
         
     | 
| 
       52 
     | 
    
         
            -
            #         json.view 'label-v1'
         
     | 
| 
       53 
     | 
    
         
            -
            #         json.text "Item 1"
         
     | 
| 
       54 
     | 
    
         
            -
            #       end
         
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
            #       json.child! do
         
     | 
| 
       57 
     | 
    
         
            -
            #         json.view 'label-v1'
         
     | 
| 
       58 
     | 
    
         
            -
            #         json.text "Item 2"
         
     | 
| 
       59 
     | 
    
         
            -
            #       end
         
     | 
| 
       60 
     | 
    
         
            -
            #     end
         
     | 
| 
       61 
     | 
    
         
            -
            #   end
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       64 
     | 
    
         
            -
            #     json.view 'label-v1'
         
     | 
| 
       65 
     | 
    
         
            -
            #     json.text "\n"
         
     | 
| 
       66 
     | 
    
         
            -
            #   end
         
     | 
| 
       67 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       68 
     | 
    
         
            -
            #     json.view 'h1-v1'
         
     | 
| 
       69 
     | 
    
         
            -
            #     json.text 'Carousel with images'
         
     | 
| 
       70 
     | 
    
         
            -
            #   end
         
     | 
| 
       71 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       72 
     | 
    
         
            -
            #     json.view 'panels/carousel-v1'
         
     | 
| 
       73 
     | 
    
         
            -
            #     json.childViews do
         
     | 
| 
       74 
     | 
    
         
            -
            #       json.child! do
         
     | 
| 
       75 
     | 
    
         
            -
            #         json.view 'image-v1'
         
     | 
| 
       76 
     | 
    
         
            -
            #         json.url image_url1
         
     | 
| 
       77 
     | 
    
         
            -
            #       end
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
            #       json.child! do
         
     | 
| 
       80 
     | 
    
         
            -
            #         json.view 'image-v1'
         
     | 
| 
       81 
     | 
    
         
            -
            #         json.url image_url2
         
     | 
| 
       82 
     | 
    
         
            -
            #       end
         
     | 
| 
       83 
     | 
    
         
            -
            #     end
         
     | 
| 
       84 
     | 
    
         
            -
            #   end
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       87 
     | 
    
         
            -
            #     json.view 'label-v1'
         
     | 
| 
       88 
     | 
    
         
            -
            #     json.text "\n"
         
     | 
| 
       89 
     | 
    
         
            -
            #   end
         
     | 
| 
       90 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       91 
     | 
    
         
            -
            #     json.view 'h1-v1'
         
     | 
| 
       92 
     | 
    
         
            -
            #     json.text 'Carousel with complex layout'
         
     | 
| 
       93 
     | 
    
         
            -
            #   end
         
     | 
| 
       94 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       95 
     | 
    
         
            -
            #     json.view 'panels/carousel-v1'
         
     | 
| 
       96 
     | 
    
         
            -
            #     json.width 'matchParent'
         
     | 
| 
       97 
     | 
    
         
            -
            #     json.childViews do
         
     | 
| 
       98 
     | 
    
         
            -
            #       json.child! do
         
     | 
| 
       99 
     | 
    
         
            -
            #         json.view 'panels/vertical-v1'
         
     | 
| 
       100 
     | 
    
         
            -
            #         json.childViews do
         
     | 
| 
       101 
     | 
    
         
            -
            #           json.child! do
         
     | 
| 
       102 
     | 
    
         
            -
            #             json.view 'h3-v1'
         
     | 
| 
       103 
     | 
    
         
            -
            #             json.text "Item 1"
         
     | 
| 
       104 
     | 
    
         
            -
            #           end
         
     | 
| 
       105 
     | 
    
         
            -
            #           json.child! do
         
     | 
| 
       106 
     | 
    
         
            -
            #             json.view 'image-v1'
         
     | 
| 
       107 
     | 
    
         
            -
            #             json.width 'matchParent'
         
     | 
| 
       108 
     | 
    
         
            -
            #             json.url image_url1
         
     | 
| 
       109 
     | 
    
         
            -
            #           end
         
     | 
| 
       110 
     | 
    
         
            -
            #         end
         
     | 
| 
       111 
     | 
    
         
            -
            #       end
         
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
            #       json.child! do
         
     | 
| 
       114 
     | 
    
         
            -
            #         json.view 'panels/vertical-v1'
         
     | 
| 
       115 
     | 
    
         
            -
            #         json.childViews do
         
     | 
| 
       116 
     | 
    
         
            -
            #           json.child! do
         
     | 
| 
       117 
     | 
    
         
            -
            #             json.view 'h3-v1'
         
     | 
| 
       118 
     | 
    
         
            -
            #             json.text "Item 2"
         
     | 
| 
       119 
     | 
    
         
            -
            #           end
         
     | 
| 
       120 
     | 
    
         
            -
            #           json.child! do
         
     | 
| 
       121 
     | 
    
         
            -
            #             json.view 'image-v1'
         
     | 
| 
       122 
     | 
    
         
            -
            #             json.width 'matchParent'
         
     | 
| 
       123 
     | 
    
         
            -
            #             json.url image_url2
         
     | 
| 
       124 
     | 
    
         
            -
            #           end
         
     | 
| 
       125 
     | 
    
         
            -
            #         end
         
     | 
| 
       126 
     | 
    
         
            -
            #       end
         
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
            #     end
         
     | 
| 
       129 
     | 
    
         
            -
            #   end
         
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
            # end
         
     | 
| 
         @@ -1,8 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            json.title 'Views'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            render "#{@path_prefix}/nav_menu", json: json
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
3 
     | 
    
         
             
            json_ui_page json do |page|
         
     | 
| 
      
 4 
     | 
    
         
            +
              render "#{@path_prefix}/nav_menu", json: json, page: page
         
     | 
| 
      
 5 
     | 
    
         
            +
              
         
     | 
| 
       6 
6 
     | 
    
         
             
              page.scroll childViews: ->(scroll) do
         
     | 
| 
       7 
7 
     | 
    
         
             
                scroll.label text: "\n"
         
     | 
| 
       8 
8 
     | 
    
         
             
                scroll.h1 text: 'Image with URL'
         
     | 
| 
         @@ -22,56 +22,3 @@ json_ui_page json do |page| 
     | 
|
| 
       22 
22 
     | 
    
         
             
                end
         
     | 
| 
       23 
23 
     | 
    
         
             
              end
         
     | 
| 
       24 
24 
     | 
    
         
             
            end
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
            # json_body_with_scroll json do
         
     | 
| 
       27 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       28 
     | 
    
         
            -
            #     json.view 'label-v1'
         
     | 
| 
       29 
     | 
    
         
            -
            #     json.text "\n"
         
     | 
| 
       30 
     | 
    
         
            -
            #   end
         
     | 
| 
       31 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       32 
     | 
    
         
            -
            #     json.view 'h1-v1'
         
     | 
| 
       33 
     | 
    
         
            -
            #     json.text 'Image with URL'
         
     | 
| 
       34 
     | 
    
         
            -
            #   end
         
     | 
| 
       35 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       36 
     | 
    
         
            -
            #     json.view 'image-v1'
         
     | 
| 
       37 
     | 
    
         
            -
            #     json.width 100
         
     | 
| 
       38 
     | 
    
         
            -
            #     json.url @sample_image_url
         
     | 
| 
       39 
     | 
    
         
            -
            #   end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       42 
     | 
    
         
            -
            #     json.view 'label-v1'
         
     | 
| 
       43 
     | 
    
         
            -
            #     json.text "\n"
         
     | 
| 
       44 
     | 
    
         
            -
            #   end
         
     | 
| 
       45 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       46 
     | 
    
         
            -
            #     json.view 'h1-v1'
         
     | 
| 
       47 
     | 
    
         
            -
            #     json.text 'Image with base64 data'
         
     | 
| 
       48 
     | 
    
         
            -
            #   end
         
     | 
| 
       49 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       50 
     | 
    
         
            -
            #     json.view 'image-v1'
         
     | 
| 
       51 
     | 
    
         
            -
            #     json.height 100
         
     | 
| 
       52 
     | 
    
         
            -
            #     json.base64Data 'data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAKgALAAAAAA9AEQAAAj/AFEJHEiwoMGDCBMqXMiwocAbBww4nEhxoYkUpzJGrMixogkfGUNqlNixJEIDB0SqHGmyJSojM1bKZOmyop0gM3Oe2liTISKMOoPy7GnwY9CjIYcSRYm0aVKSLmE6nfq05QycVLPuhDrxBlCtYJUqNAq2bNWEBj6ZXRuyxZyDRtqwnXvkhACDV+euTeJm1Ki7A73qNWtFiF+/gA95Gly2CJLDhwEHMOUAAuOpLYDEgBxZ4GRTlC1fDnpkM+fOqD6DDj1aZpITp0dtGCDhr+fVuCu3zlg49ijaokTZTo27uG7Gjn2P+hI8+PDPERoUB318bWbfAJ5sUNFcuGRTYUqV/3ogfXp1rWlMc6awJjiAAd2fm4ogXjz56aypOoIde4OE5u/F9x199dlXnnGiHZWEYbGpsAEA3QXYnHwEFliKAgswgJ8LPeiUXGwedCAKABACCN+EA1pYIIYaFlcDhytd51sGAJbo3onOpajiihlO92KHGaUXGwWjUBChjSPiWJuOO/LYIm4v1tXfE6J4gCSJEZ7YgRYUNrkji9P55sF/ogxw5ZkSqIDaZBV6aSGYq/lGZplndkckZ98xoICbTcIJGQAZcNmdmUc210hs35nCyJ58fgmIKX5RQGOZowxaZwYA+JaoKQwswGijBV4C6SiTUmpphMspJx9unX4KaimjDv9aaXOEBteBqmuuxgEHoLX6Kqx+yXqqBANsgCtit4FWQAEkrNbpq7HSOmtwag5w57GrmlJBASEU18ADjUYb3ADTinIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw=='
         
     | 
| 
       53 
     | 
    
         
            -
            #   end
         
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       56 
     | 
    
         
            -
            #     json.view 'label-v1'
         
     | 
| 
       57 
     | 
    
         
            -
            #     json.text "\n"
         
     | 
| 
       58 
     | 
    
         
            -
            #   end
         
     | 
| 
       59 
     | 
    
         
            -
            #   json.child! do
         
     | 
| 
       60 
     | 
    
         
            -
            #     json.view 'h1-v1'
         
     | 
| 
       61 
     | 
    
         
            -
            #     json.text 'QR Code as base64 image'
         
     | 
| 
       62 
     | 
    
         
            -
            #   end
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
            #   if defined? RQRCode
         
     | 
| 
       65 
     | 
    
         
            -
            #     json.child! do
         
     | 
| 
       66 
     | 
    
         
            -
            #       json.view 'image-v1'
         
     | 
| 
       67 
     | 
    
         
            -
            #       qr_content = { version: 1, message: 'This is a test' }
         
     | 
| 
       68 
     | 
    
         
            -
            #       qr = RQRCode::QRCode.new(qr_content.to_json)
         
     | 
| 
       69 
     | 
    
         
            -
            #       json.base64Data qr.as_png(size: 300).to_data_url
         
     | 
| 
       70 
     | 
    
         
            -
            #     end
         
     | 
| 
       71 
     | 
    
         
            -
            #   else
         
     | 
| 
       72 
     | 
    
         
            -
            #     json.child! do
         
     | 
| 
       73 
     | 
    
         
            -
            #       json.view 'label-v1'
         
     | 
| 
       74 
     | 
    
         
            -
            #       json.text 'Include "rqrcode" gem to enable this'
         
     | 
| 
       75 
     | 
    
         
            -
            #     end
         
     | 
| 
       76 
     | 
    
         
            -
            #   end
         
     | 
| 
       77 
     | 
    
         
            -
            # end
         
     | 
| 
         @@ -1,51 +1,20 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            json.title 'Views'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            render "#{@path_prefix}/nav_menu", json: json
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
3 
     | 
    
         
             
            json_ui_page json do |page|
         
     | 
| 
      
 4 
     | 
    
         
            +
              render "#{@path_prefix}/nav_menu", json: json, page: page
         
     | 
| 
      
 5 
     | 
    
         
            +
              
         
     | 
| 
       6 
6 
     | 
    
         
             
              page.list firstSection: ->(section) do
         
     | 
| 
       7 
     | 
    
         
            -
                section.rows do 
     | 
| 
       8 
     | 
    
         
            -
                   
     | 
| 
      
 7 
     | 
    
         
            +
                section.rows builder: ->(template) do
         
     | 
| 
      
 8 
     | 
    
         
            +
                  template.thumbnail title: 'Basic', onClick: ->(action) do
         
     | 
| 
       9 
9 
     | 
    
         
             
                    action.windows_open url: json_ui_garage_url(path: 'views/basic')
         
     | 
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
     | 
    
         
            -
                   
     | 
| 
      
 11 
     | 
    
         
            +
                  template.thumbnail title: 'Images', onClick: ->(action) do
         
     | 
| 
       12 
12 
     | 
    
         
             
                    action.windows_open url: json_ui_garage_url(path: 'views/images')
         
     | 
| 
       13 
13 
     | 
    
         
             
                  end
         
     | 
| 
       14 
     | 
    
         
            -
                   
     | 
| 
      
 14 
     | 
    
         
            +
                  template.thumbnail title: 'Carousel', onClick: ->(action) do
         
     | 
| 
       15 
15 
     | 
    
         
             
                    action.windows_open url: json_ui_garage_url(path: 'views/carousels')
         
     | 
| 
       16 
16 
     | 
    
         
             
                  end
         
     | 
| 
       17 
17 
     | 
    
         
             
                end
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
              end
         
     | 
| 
       20 
20 
     | 
    
         
             
            end
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
            # json_body_with_list json do
         
     | 
| 
       23 
     | 
    
         
            -
            #   json.rows do
         
     | 
| 
       24 
     | 
    
         
            -
            #     json.child! do
         
     | 
| 
       25 
     | 
    
         
            -
            #       json.template 'thumbnail-v1'
         
     | 
| 
       26 
     | 
    
         
            -
            #       json.title 'Basic'
         
     | 
| 
       27 
     | 
    
         
            -
            #       json.onClick do
         
     | 
| 
       28 
     | 
    
         
            -
            #         json.action 'windows/open-v1'
         
     | 
| 
       29 
     | 
    
         
            -
            #         json.url json_ui_garage_url(path: 'views/basic')
         
     | 
| 
       30 
     | 
    
         
            -
            #       end
         
     | 
| 
       31 
     | 
    
         
            -
            #     end
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
            #     json.child! do
         
     | 
| 
       34 
     | 
    
         
            -
            #       json.template 'thumbnail-v1'
         
     | 
| 
       35 
     | 
    
         
            -
            #       json.title 'Images'
         
     | 
| 
       36 
     | 
    
         
            -
            #       json.onClick do
         
     | 
| 
       37 
     | 
    
         
            -
            #         json.action 'windows/open-v1'
         
     | 
| 
       38 
     | 
    
         
            -
            #         json.url json_ui_garage_url(path: 'views/images')
         
     | 
| 
       39 
     | 
    
         
            -
            #       end
         
     | 
| 
       40 
     | 
    
         
            -
            #     end
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
            #     json.child! do
         
     | 
| 
       43 
     | 
    
         
            -
            #       json.template 'thumbnail-v1'
         
     | 
| 
       44 
     | 
    
         
            -
            #       json.title 'Carousels'
         
     | 
| 
       45 
     | 
    
         
            -
            #       json.onClick do
         
     | 
| 
       46 
     | 
    
         
            -
            #         json.action 'windows/open-v1'
         
     | 
| 
       47 
     | 
    
         
            -
            #         json.url json_ui_garage_url(path: 'views/carousels')
         
     | 
| 
       48 
     | 
    
         
            -
            #       end
         
     | 
| 
       49 
     | 
    
         
            -
            #     end
         
     | 
| 
       50 
     | 
    
         
            -
            #   end
         
     | 
| 
       51 
     | 
    
         
            -
            # end
         
     | 
    
        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.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - ''
         
     | 
| 
         @@ -37,7 +37,6 @@ files: 
     | 
|
| 
       37 
37 
     | 
    
         
             
            - app/controllers/glib/home_controller.rb
         
     | 
| 
       38 
38 
     | 
    
         
             
            - app/helpers/glib/json_ui/abstract_builder.rb
         
     | 
| 
       39 
39 
     | 
    
         
             
            - app/helpers/glib/json_ui/action_builder.rb
         
     | 
| 
       40 
     | 
    
         
            -
            - app/helpers/glib/json_ui/json_ui_helper.rb
         
     | 
| 
       41 
40 
     | 
    
         
             
            - app/helpers/glib/json_ui/list_builders.rb
         
     | 
| 
       42 
41 
     | 
    
         
             
            - app/helpers/glib/json_ui/menu_builder.rb
         
     | 
| 
       43 
42 
     | 
    
         
             
            - app/helpers/glib/json_ui/page_helper.rb
         
     | 
| 
         @@ -1,94 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module Glib
         
     | 
| 
       2 
     | 
    
         
            -
              module JsonUi
         
     | 
| 
       3 
     | 
    
         
            -
                # TODO: Remove (deprecated)
         
     | 
| 
       4 
     | 
    
         
            -
                module JsonUiHelper
         
     | 
| 
       5 
     | 
    
         
            -
                  # class Builder
         
     | 
| 
       6 
     | 
    
         
            -
                  #   def initialize(json)
         
     | 
| 
       7 
     | 
    
         
            -
                  #     @json = json
         
     | 
| 
       8 
     | 
    
         
            -
                  #   end
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
                  #   def optional(options, *props)
         
     | 
| 
       11 
     | 
    
         
            -
                  #     props.each do |prop|
         
     | 
| 
       12 
     | 
    
         
            -
                  #       @json.set! prop, options[prop]
         
     | 
| 
       13 
     | 
    
         
            -
                  #     end
         
     | 
| 
       14 
     | 
    
         
            -
                  #   end
         
     | 
| 
       15 
     | 
    
         
            -
                  # end
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                  # def json_body_with_list(json, header = nil, footer = nil, options = {})
         
     | 
| 
       18 
     | 
    
         
            -
                  #   json.header header
         
     | 
| 
       19 
     | 
    
         
            -
                  #   json.content do
         
     | 
| 
       20 
     | 
    
         
            -
                  #     json.childViews [1] do
         
     | 
| 
       21 
     | 
    
         
            -
                  #       json.view 'panels/list-v1'
         
     | 
| 
       22 
     | 
    
         
            -
                  #       json.width 'matchParent'
         
     | 
| 
       23 
     | 
    
         
            -
                  #       json.nextPage options[:nextPage]
         
     | 
| 
       24 
     | 
    
         
            -
                  #       json.sections [1] do
         
     | 
| 
       25 
     | 
    
         
            -
                  #         yield
         
     | 
| 
       26 
     | 
    
         
            -
                  #       end
         
     | 
| 
       27 
     | 
    
         
            -
                  #     end
         
     | 
| 
       28 
     | 
    
         
            -
                  #   end
         
     | 
| 
       29 
     | 
    
         
            -
                  #   json.footer footer
         
     | 
| 
       30 
     | 
    
         
            -
                  # end
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
                  # def json_body_with_scroll(json, header = nil, footer = nil, options = {})
         
     | 
| 
       33 
     | 
    
         
            -
                  #   builder = Builder.new(json)
         
     | 
| 
       34 
     | 
    
         
            -
                    
         
     | 
| 
       35 
     | 
    
         
            -
                  #   json.header header
         
     | 
| 
       36 
     | 
    
         
            -
                  #   json.content do
         
     | 
| 
       37 
     | 
    
         
            -
                  #     json.childViews [1] do
         
     | 
| 
       38 
     | 
    
         
            -
                  #       json.view 'panels/scroll-v1'
         
     | 
| 
       39 
     | 
    
         
            -
                  #       json.width 'matchParent'
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                  #       builder.optional(options, :padding, :backgroundColor)
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                  #       json.childViews do
         
     | 
| 
       44 
     | 
    
         
            -
                  #         yield
         
     | 
| 
       45 
     | 
    
         
            -
                  #       end
         
     | 
| 
       46 
     | 
    
         
            -
                  #     end
         
     | 
| 
       47 
     | 
    
         
            -
                  #   end
         
     | 
| 
       48 
     | 
    
         
            -
                  #   json.footer footer
         
     | 
| 
       49 
     | 
    
         
            -
                  # end
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
                  # def json_body_with_form(json, header = nil, footer = nil, options = {})
         
     | 
| 
       52 
     | 
    
         
            -
                  #   json.header header
         
     | 
| 
       53 
     | 
    
         
            -
                  #   json_body_with_scroll json do
         
     | 
| 
       54 
     | 
    
         
            -
                  #     method = options[:method].to_sym
         
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
                  #     json.child! do
         
     | 
| 
       57 
     | 
    
         
            -
                  #       json.view 'panels/form-v1'
         
     | 
| 
       58 
     | 
    
         
            -
                  #       json.width 'matchParent'
         
     | 
| 
       59 
     | 
    
         
            -
                  #       json.(options, :url)
         
     | 
| 
       60 
     | 
    
         
            -
                        
         
     | 
| 
       61 
     | 
    
         
            -
                  #       case method
         
     | 
| 
       62 
     | 
    
         
            -
                  #       when :patch, :put, :delete
         
     | 
| 
       63 
     | 
    
         
            -
                  #         json.method :post
         
     | 
| 
       64 
     | 
    
         
            -
                  #       else
         
     | 
| 
       65 
     | 
    
         
            -
                  #         json.method method
         
     | 
| 
       66 
     | 
    
         
            -
                  #       end
         
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
                  #       json.padding options[:padding]
         
     | 
| 
       69 
     | 
    
         
            -
                  #       json.local options[:local]
         
     | 
| 
       70 
     | 
    
         
            -
                  #       json.childViews do
         
     | 
| 
       71 
     | 
    
         
            -
                  #         json.child! do
         
     | 
| 
       72 
     | 
    
         
            -
                  #           json.view 'fields/hidden-v1'
         
     | 
| 
       73 
     | 
    
         
            -
                  #           json.name 'authenticity_token'
         
     | 
| 
       74 
     | 
    
         
            -
                  #           json.value form_authenticity_token
         
     | 
| 
       75 
     | 
    
         
            -
                  #         end
         
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
                  #         case method
         
     | 
| 
       78 
     | 
    
         
            -
                  #         when :patch, :put, :delete
         
     | 
| 
       79 
     | 
    
         
            -
                  #           json.child! do
         
     | 
| 
       80 
     | 
    
         
            -
                  #             json.view 'fields/hidden-v1'
         
     | 
| 
       81 
     | 
    
         
            -
                  #             json.name '_method'
         
     | 
| 
       82 
     | 
    
         
            -
                  #             json.value method
         
     | 
| 
       83 
     | 
    
         
            -
                  #           end
         
     | 
| 
       84 
     | 
    
         
            -
                  #         end
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
                  #         yield
         
     | 
| 
       87 
     | 
    
         
            -
                  #       end
         
     | 
| 
       88 
     | 
    
         
            -
                  #     end
         
     | 
| 
       89 
     | 
    
         
            -
                  #   end
         
     | 
| 
       90 
     | 
    
         
            -
                  #   json.footer footer
         
     | 
| 
       91 
     | 
    
         
            -
                  # end
         
     | 
| 
       92 
     | 
    
         
            -
                end
         
     | 
| 
       93 
     | 
    
         
            -
              end
         
     | 
| 
       94 
     | 
    
         
            -
            end
         
     |