glib-web 3.20.2 → 3.20.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ json_ui_page json do |page|
11
11
 
12
12
  section.rows builder: ->(template) do
13
13
  ['texts', 'controls', 'images', 'multimedia', 'charts', 'banners',
14
- 'maps', 'misc', 'icons', 'progress', 'shareButton', 'steppers'].each do |component|
14
+ 'maps', 'misc', 'icons', 'progress', 'shareButton', 'steppers', 'treeView'].each do |component|
15
15
  template.thumbnail title: component.humanize, onClick: ->(action) do
16
16
  action.windows_open url: json_ui_garage_url(path: "views/#{component}")
17
17
  end
@@ -0,0 +1,50 @@
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.h2 text: 'Treeview'
8
+ scroll.spacer height: 8
9
+ scroll.panels_form width: 'matchParent', childViews: ->(form) do
10
+ scroll.panels_flow innerPadding: { bottom: 0 }, childViews: ->(flow) do
11
+ flow.treeView \
12
+ inputName: 'user',
13
+ url: json_ui_garage_url(path: 'forms/generic_post'),
14
+ directUploadUrl: rails_direct_uploads_url,
15
+ width: 240,
16
+ selected: 'parent-1',
17
+ items: [
18
+ {
19
+ id: 'parent-1',
20
+ icon: 'folder',
21
+ label: 'Parent folder',
22
+ children: [
23
+ { label: 'Child 1', id: 'parent-1-child-1' },
24
+ { label: 'Child 2', id: 'parent-1-child-2' },
25
+ { label: 'Child 3', id: 'parent-1-child-3' }
26
+ ]
27
+ },
28
+ {
29
+ id: 'parent-2',
30
+ icon: 'folder',
31
+ label: 'Custom drop',
32
+ children: [
33
+ { label: 'Child 1', id: 'parent-2-child-1', dropData: { to: 'child1' } },
34
+ { label: 'Child 2', id: 'parent-2-child-2', dropData: { to: 'child2' } },
35
+ { label: 'Child 3', id: 'parent-2-child-3', dropData: { to: 'child3' } }
36
+ ]
37
+ },
38
+ ]
39
+ flow.spacer width: 24
40
+ flow.panels_ul childViews: ->(li) do
41
+ li.label text: '🍌 Banana', dragData: { tem: 'banana' }
42
+ li.label text: '💣 Bomb', dragData: { item: 'bomb' }
43
+ li.label text: '🍈 Melon', dragData: { item: 'melon' }
44
+ li.label text: '🐻 Bear', dragData: { item: 'bear' }
45
+ li.label text: '🍴 Fork and knife', dragData: { item: 'fork_and_knife' }
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -5,7 +5,7 @@
5
5
  <meta charset="utf-8" />
6
6
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
7
7
 
8
- <title>App</title>
8
+ <title><%= yield(:title) || 'App'%></title>
9
9
  <%= csrf_meta_tags %>
10
10
 
11
11
  <%= vite_javascript_tag 'vue_renderer', defer: true %>
data/lib/glib-web.rb CHANGED
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: 3.20.2
4
+ version: 3.20.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -225,6 +225,7 @@ files:
225
225
  - app/views/json_ui/garage/pages/loading_indicator.json.jbuilder
226
226
  - app/views/json_ui/garage/pages/nav_buttons.json.jbuilder
227
227
  - app/views/json_ui/garage/pages/nested_scroll.json.jbuilder
228
+ - app/views/json_ui/garage/pages/paste_file.jbuilder
228
229
  - app/views/json_ui/garage/pages/redirect_onload.json.jbuilder
229
230
  - app/views/json_ui/garage/pages/tab_bar.json.jbuilder
230
231
  - app/views/json_ui/garage/panels/_hover_views_content.json.jbuilder
@@ -278,6 +279,7 @@ files:
278
279
  - app/views/json_ui/garage/views/shareButton.json.jbuilder
279
280
  - app/views/json_ui/garage/views/steppers.json.jbuilder
280
281
  - app/views/json_ui/garage/views/texts.json.jbuilder
282
+ - app/views/json_ui/garage/views/treeView.json.jbuilder
281
283
  - app/views/layouts/json_ui/no_custom.html.erb
282
284
  - app/views/layouts/json_ui/renderer.html.erb
283
285
  - config/routes.rb