glib-web 4.4.0 → 4.6.0
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/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
- data/app/helpers/glib/app_feature_support_helper.rb +0 -0
- data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
- data/app/helpers/glib/enum_helper.rb +5 -6
- data/app/helpers/glib/json_ui/action_builder/files.rb +8 -0
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/json_ui/list_builders.rb +17 -1
- data/app/helpers/glib/json_ui/page_helper.rb +3 -2
- data/app/helpers/glib/json_ui/table_builders.rb +1 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +28 -7
- data/app/helpers/glib/json_ui/view_builder/panels.rb +18 -0
- data/app/models/glib/active_storage/attachment.rb +0 -0
- data/app/models/glib/active_storage/blob.rb +0 -0
- data/app/models/glib/dynamic_text_record.rb +0 -0
- data/app/models/glib/text.rb +0 -0
- data/app/validators/email_typo_validator.rb +0 -0
- data/app/validators/email_validator.rb +0 -0
- data/app/validators/url_validator.rb +0 -0
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/_alert_post_all_data.json.jbuilder +4 -0
- data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/generic_post_all.json.jbuilder +3 -0
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +0 -1
- data/app/views/json_ui/garage/forms/show_hide.json.jbuilder +25 -2
- data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
- data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/index.json.jbuilder +4 -0
- data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/tree.json.jbuilder +113 -0
- data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
- data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
- data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/test_page/form.json.jbuilder +2 -2
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
- data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
- data/lib/generators/glib/install_generator.rb +0 -0
- data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
- data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
- data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
- data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
- data/lib/generators/templates/database.yml +0 -0
- data/lib/generators/templates/dynamic_text.rb +0 -0
- data/lib/glib/dynamic_text/config.rb +0 -0
- data/lib/glib/dynamic_text.rb +0 -0
- data/lib/glib/json_crawler/action_crawler.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
- data/lib/glib/json_crawler/coverage.rb +0 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7da379749ad7926e906360b7b5c9745f2b045d356a6243c288d604f6771ffdef
|
|
4
|
+
data.tar.gz: 232afbb6f1375f6051d479b9484078c8db4cf7542fa7d97978b1294220bb0c6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c95fec35e27845b1dd69eae972056a6b65afdc8b26a50c3fb0732ca3bdbddc32d21c829bde0a7cf69e91d19de9c95b6842ca36d210c0ed217e0661edd396819
|
|
7
|
+
data.tar.gz: ab56beeee17a57e7fd37bb670a7135504694c003f52f033611c56faf325903623e25f6733e49755160c6f40ce7423412e9a58b42bd1a92e60280c42ba81a1073
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -19,12 +19,11 @@ module Glib
|
|
|
19
19
|
# TZInfo::Timezone.default_dst = true
|
|
20
20
|
return [] if Rails.env.test?
|
|
21
21
|
|
|
22
|
-
ActiveSupport::TimeZone.all.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
22
|
+
ActiveSupport::TimeZone.all.group_by { |tz| tz.tzinfo.identifier }.map do |identifier, timezones|
|
|
23
|
+
utc_offset = "#{timezones.first.utc_offset >= 0 ? '+' : ''}#{timezones.first.utc_offset / 60 / 60}h"
|
|
24
|
+
locations = timezones.map(&:name).join(', ')
|
|
25
|
+
{ value: identifier, text: "#{utc_offset} #{locations}" }
|
|
26
|
+
end
|
|
28
27
|
end
|
|
29
28
|
end
|
|
30
29
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Glib
|
|
2
2
|
module JsonUi
|
|
3
3
|
module ListBuilders
|
|
4
|
-
class
|
|
4
|
+
class ListTemplate < AbstractBuilder
|
|
5
5
|
def method_missing(m, *args)
|
|
6
6
|
add_element_to_array 'template', m, *args
|
|
7
7
|
end
|
|
@@ -76,6 +76,22 @@ module Glib
|
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
class TreeTemplate < AbstractBuilder
|
|
80
|
+
def method_missing(m, *args)
|
|
81
|
+
add_element_to_array 'template', m, *args
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class Standard < JsonUiElement
|
|
85
|
+
string :id
|
|
86
|
+
string :title
|
|
87
|
+
string :subtitle
|
|
88
|
+
action :onClick
|
|
89
|
+
hash :dropData
|
|
90
|
+
hash :icon, required: [:name], optional: [:color, :size]
|
|
91
|
+
array :rows
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
79
95
|
class Section < AbstractBuilder
|
|
80
96
|
def initialize(json, page, template)
|
|
81
97
|
super json, page
|
|
@@ -85,7 +85,7 @@ module Glib
|
|
|
85
85
|
include Glib::JsonUi::Default
|
|
86
86
|
|
|
87
87
|
attr_reader :json, :context, :view_builder, :sview_builder, :action_builder, :menu_builder
|
|
88
|
-
attr_reader :list_section_builder, :table_section_builder, :drawer_content_builder
|
|
88
|
+
attr_reader :list_section_builder, :table_section_builder, :drawer_content_builder, :tree_section_builder
|
|
89
89
|
|
|
90
90
|
# See Panels::Form
|
|
91
91
|
attr_accessor :current_form
|
|
@@ -99,7 +99,8 @@ module Glib
|
|
|
99
99
|
@action_builder = ActionBuilder.new(json, self, false)
|
|
100
100
|
@menu_builder = MenuBuilder.new(json, self)
|
|
101
101
|
|
|
102
|
-
@list_section_builder = ListBuilders::Section.new(json, self, ListBuilders::
|
|
102
|
+
@list_section_builder = ListBuilders::Section.new(json, self, ListBuilders::ListTemplate.new(json, self))
|
|
103
|
+
@tree_section_builder = ListBuilders::Section.new(json, self, ListBuilders::TreeTemplate.new(json, self))
|
|
103
104
|
@drawer_content_builder = ListBuilders::Section.new(json, self, @menu_builder)
|
|
104
105
|
@table_section_builder = TableBuilders::Section.new(json, self, TableBuilders::Template.new(json, self))
|
|
105
106
|
# @split_content_builder = SplitBuilders::Content.new(json, self, @view_builder)
|
|
@@ -75,7 +75,9 @@ class Glib::JsonUi::ViewBuilder
|
|
|
75
75
|
@label ||= context.field_label(@prop, @label_args || {})
|
|
76
76
|
@hint ||= context.hint_label(@prop, @hint_args || {})
|
|
77
77
|
@placeholder ||= context.placeholder_label(@prop, @placeholder_args || {})
|
|
78
|
-
|
|
78
|
+
if form._autoValidate && @autoValidate.nil? || !@autoValidate.nil? && @autoValidate
|
|
79
|
+
@validation ||= context.field_validation(@prop)
|
|
80
|
+
end
|
|
79
81
|
|
|
80
82
|
if form.current_dynamic_group.nil?
|
|
81
83
|
# This is not relevant inside a dynamic group
|
|
@@ -151,6 +153,8 @@ class Glib::JsonUi::ViewBuilder
|
|
|
151
153
|
string :text
|
|
152
154
|
color :color
|
|
153
155
|
icon :icon
|
|
156
|
+
# This will not work if the form contains multiple fields with the same name,
|
|
157
|
+
# even if only one field is showing at any one time"
|
|
154
158
|
bool :disableIfFormInvalid
|
|
155
159
|
end
|
|
156
160
|
|
|
@@ -165,6 +169,7 @@ class Glib::JsonUi::ViewBuilder
|
|
|
165
169
|
string :onIcon
|
|
166
170
|
string :offIcon
|
|
167
171
|
string :onLabel
|
|
172
|
+
hash :image, required: [:url, :template], optional: [:width, :height]
|
|
168
173
|
|
|
169
174
|
def value(value)
|
|
170
175
|
@value = value if value != Glib::Value::DEFAULT
|
|
@@ -192,6 +197,17 @@ class Glib::JsonUi::ViewBuilder
|
|
|
192
197
|
hash :append, optional: [:icon]
|
|
193
198
|
|
|
194
199
|
panels_builder :accessory, :header, :footer
|
|
200
|
+
|
|
201
|
+
def searchable(value)
|
|
202
|
+
@searchable = value
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
def created
|
|
206
|
+
super
|
|
207
|
+
|
|
208
|
+
@searchable = @searchable.nil? ? true : @searchable
|
|
209
|
+
json.set! 'searchable', @searchable
|
|
210
|
+
end
|
|
195
211
|
end
|
|
196
212
|
|
|
197
213
|
class ChipGroup < AbstractField
|
|
@@ -266,10 +282,15 @@ class Glib::JsonUi::ViewBuilder
|
|
|
266
282
|
action :onClick
|
|
267
283
|
string :offIcon
|
|
268
284
|
string :onIcon
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
285
|
+
hash :image, required: [:url, :template], optional: [:width, :height]
|
|
286
|
+
hash :icon, required: [:name, :template], optional: [:color, :size]
|
|
287
|
+
# bool :featured
|
|
288
|
+
# bool :thumbnail
|
|
289
|
+
# hash :image
|
|
290
|
+
# string :imageUrl
|
|
291
|
+
# string :icon
|
|
292
|
+
# string :iconColor
|
|
293
|
+
# string :iconSize
|
|
273
294
|
|
|
274
295
|
views :childViews
|
|
275
296
|
end
|
|
@@ -352,10 +373,10 @@ class Glib::JsonUi::ViewBuilder
|
|
|
352
373
|
@responseMessages[status] = I18n.t(key) if I18n.exists?(key)
|
|
353
374
|
end
|
|
354
375
|
json.responseMessages (@responseMessages || {}).reverse_merge({
|
|
355
|
-
'200' => '
|
|
376
|
+
'200' => 'Completed',
|
|
356
377
|
'403' => 'Forbidden',
|
|
357
378
|
'401' => 'Session expired',
|
|
358
|
-
'else' => '
|
|
379
|
+
'else' => 'Failed'
|
|
359
380
|
})
|
|
360
381
|
|
|
361
382
|
json.placeholder @placeholder if @placeholder
|
|
@@ -424,6 +424,24 @@ class Glib::JsonUi::ViewBuilder
|
|
|
424
424
|
views :childViews
|
|
425
425
|
end
|
|
426
426
|
|
|
427
|
+
class Tree < View
|
|
428
|
+
include Glib::JsonUi::Upload
|
|
429
|
+
|
|
430
|
+
string :selected
|
|
431
|
+
action :onDropFile
|
|
432
|
+
action :onDropView
|
|
433
|
+
|
|
434
|
+
def sections(blocks)
|
|
435
|
+
json.sections do
|
|
436
|
+
blocks.each do |block|
|
|
437
|
+
json.child! do
|
|
438
|
+
block.call page.tree_section_builder
|
|
439
|
+
end
|
|
440
|
+
end
|
|
441
|
+
end
|
|
442
|
+
end
|
|
443
|
+
end
|
|
444
|
+
|
|
427
445
|
class Web < View
|
|
428
446
|
string :url
|
|
429
447
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/models/glib/text.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -54,7 +54,6 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
|
54
54
|
value: ['melbourne', 'sydney'],
|
|
55
55
|
multiple: true,
|
|
56
56
|
onChange: ->(action) do
|
|
57
|
-
# TODO: Fix needed. When closing this dialog, the dirty prompt appears.
|
|
58
57
|
action.dialogs_alert message: 'Options selected'
|
|
59
58
|
end
|
|
60
59
|
|
|
@@ -76,6 +76,23 @@ page.form \
|
|
|
76
76
|
form.spacer height: 10
|
|
77
77
|
form.label id: 'label5', text: 'Both Checked'
|
|
78
78
|
|
|
79
|
+
form.spacer height: 6
|
|
80
|
+
form.fields_check\
|
|
81
|
+
image: { template: 'thumbnail', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 24, height: 24 },
|
|
82
|
+
name: 'user[check22]', checkValue: 'on', label: 'check thumbnail', uncheckValue: 'off', onChangeAndLoad: ->(action) do
|
|
83
|
+
action.logics_set targetId: 'label22', conditionalData: { displayed: { "==": [{ "var": 'user[check22]' }, 'on'] } }
|
|
84
|
+
end
|
|
85
|
+
form.fields_check\
|
|
86
|
+
image: { template: 'featured', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 80, height: 80 },
|
|
87
|
+
name: 'user[check25]', checkValue: 'on', label: 'Check featured', uncheckValue: 'off', onChangeAndLoad: ->(action) do
|
|
88
|
+
action.logics_set targetId: 'label25', conditionalData: { displayed: { "==": [{ "var": 'user[check25]' }, 'on'] } }
|
|
89
|
+
end
|
|
90
|
+
form.spacer height: 10
|
|
91
|
+
form.label id: 'label25', text: 'Is Checked25'
|
|
92
|
+
|
|
93
|
+
form.spacer height: 10
|
|
94
|
+
form.label id: 'label22', text: 'Is Checked22'
|
|
95
|
+
|
|
79
96
|
form.spacer height: 20
|
|
80
97
|
form.h1 text: 'Radio Group'
|
|
81
98
|
form.fields_radioGroup \
|
|
@@ -106,8 +123,14 @@ page.form \
|
|
|
106
123
|
end
|
|
107
124
|
end,
|
|
108
125
|
childViews: ->(group) do
|
|
109
|
-
group.fields_radio
|
|
110
|
-
|
|
126
|
+
group.fields_radio\
|
|
127
|
+
value: 'show', label: 'Show', icon: { template: 'featured', name: 'edit', size: 40, color: '#d1d1d1' }
|
|
128
|
+
group.fields_radio\
|
|
129
|
+
value: 'hide', label: 'Hide',
|
|
130
|
+
image: { template: 'featured', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 80, height: 80 }
|
|
131
|
+
group.fields_radio\
|
|
132
|
+
value: 'no', label: 'No',
|
|
133
|
+
image: { template: 'thumbnail', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 24, height: 24 }
|
|
111
134
|
group.fields_radio value: '', label: 'Empty'
|
|
112
135
|
end
|
|
113
136
|
form.spacer height: 10
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -131,6 +131,10 @@ json_ui_page json do |page|
|
|
|
131
131
|
action.windows_open url: json_ui_garage_url(path: 'panels/grid')
|
|
132
132
|
end
|
|
133
133
|
|
|
134
|
+
template.thumbnail title: 'Tree', subtitle: 'Tree like view just like folder and subfolder', onClick: ->(action) do
|
|
135
|
+
action.windows_open url: json_ui_garage_url(path: 'panels/tree')
|
|
136
|
+
end
|
|
137
|
+
|
|
134
138
|
template.thumbnail title: 'List Template Accessory', onClick: ->(action) do
|
|
135
139
|
# TODO
|
|
136
140
|
end
|
|
File without changes
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
json.title 'Panels'
|
|
2
|
+
|
|
3
|
+
onDropFile = ->(action) do
|
|
4
|
+
action.files_upload directUploadUrl: glib_direct_uploads_url, onFinished: ->(saction) do
|
|
5
|
+
saction.http_post url: json_ui_garage_url(path: 'forms/generic_post_all')
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
onDropView = ->(action) do
|
|
9
|
+
action.http_post url: json_ui_garage_url(path: 'forms/generic_post_all')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
json_ui_page json do |page|
|
|
13
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
|
14
|
+
|
|
15
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
16
|
+
scroll.h2 text: 'Standard'
|
|
17
|
+
scroll.spacer height: 4
|
|
18
|
+
|
|
19
|
+
scroll.panels_column md: { cols: 4 }, childViews: ->(col) do
|
|
20
|
+
scroll.panels_tree \
|
|
21
|
+
onDropFile: onDropFile,
|
|
22
|
+
onDropView: onDropView,
|
|
23
|
+
selected: params[:selected] || 'arabian-1.mp3',
|
|
24
|
+
width: 300,
|
|
25
|
+
sections: [
|
|
26
|
+
->(section) do
|
|
27
|
+
section.header childViews: ->(header) do
|
|
28
|
+
header.h2 text: 'Music 🎶'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
section.rows builder: ->(template) do
|
|
32
|
+
template.standard \
|
|
33
|
+
id: 'pop',
|
|
34
|
+
title: 'Pop',
|
|
35
|
+
icon: { name: 'folder', size: 24, color: '#6e6e6e' },
|
|
36
|
+
onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'pop') },
|
|
37
|
+
subtitle: params['selected'] == 'pop' ? 'Pop music is a genre of popular music that originated in its modern' : nil,
|
|
38
|
+
rows: ['pop-1.mp3', 'pop-2.mp3', 'pop-3.mp3']
|
|
39
|
+
template.standard \
|
|
40
|
+
id: 'arab',
|
|
41
|
+
title: 'Arabian',
|
|
42
|
+
icon: { name: 'folder', size: 24, color: '#6e6e6e' },
|
|
43
|
+
onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'arab') },
|
|
44
|
+
subtitle: params['selected'] == 'arab' ? 'Arabic music is the music of the Arab world' : nil,
|
|
45
|
+
rows: ['arabian-1.mp3', 'arabian-2.mp3', 'arabian-3.mp3']
|
|
46
|
+
template.standard \
|
|
47
|
+
id: 'phonk',
|
|
48
|
+
title: 'Phonk',
|
|
49
|
+
onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'phonk') },
|
|
50
|
+
icon: { name: 'folder', size: 24, color: '#6e6e6e' },
|
|
51
|
+
subtitle: params['selected'] == 'phonk' ? 'Phonk is a subgenre of hip hop and trap music' : nil,
|
|
52
|
+
rows: ['phonk1.mp3', 'phonk-2.mp3', { id: 'hard-phonk', title: 'Hard Phonk', rows: ['hard-phonk-1.mp3', 'hard-phonk-2.mp3'] }]
|
|
53
|
+
end
|
|
54
|
+
end,
|
|
55
|
+
->(section) do
|
|
56
|
+
section.header childViews: ->(header) do
|
|
57
|
+
header.h2 text: 'Video 📹'
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
section.rows builder: ->(template) do
|
|
61
|
+
template.standard title: 'funny-video.mp4', id: 'fun', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'fun') }
|
|
62
|
+
template.standard title: 'animal-planet.mp4', id: 'animal', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'animal') }
|
|
63
|
+
template.standard title: 'wedding.mp4', id: 'wedding', onClick: ->(action) { action.windows_reload url: json_ui_garage_current_url(selected: 'wedding') }
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
scroll.panels_column md: { cols: 6 }, childViews: ->(col) do
|
|
70
|
+
col.h2 text: 'Drag me to folder!'
|
|
71
|
+
col.spacer height: 16
|
|
72
|
+
col.panels_table width: 'matchParent', sections: [
|
|
73
|
+
->(section) do
|
|
74
|
+
section.header cellViews: ->(header) do
|
|
75
|
+
header.label text: 'Name'
|
|
76
|
+
header.label text: 'Size'
|
|
77
|
+
header.label text: 'Last modified'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
section.rows builder: ->(row) do
|
|
81
|
+
row.default dragData: { music: 'dads-fav-song.mp3' }, cellViews: ->(cell) do
|
|
82
|
+
cell.label text: 'dads-fav-song.mp3'
|
|
83
|
+
cell.label text: '3mb'
|
|
84
|
+
cell.label text: '2024/06/22'
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
row.default dragData: { music: '1-hours-sound-of-rain-asmr.mp3' }, cellViews: ->(cell) do
|
|
88
|
+
cell.label text: '1-hours-sound-of-rain-asmr.mp3'
|
|
89
|
+
cell.label text: '15mb'
|
|
90
|
+
cell.label text: '2024/02/12'
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
row.default dragData: { music: 'i-dont-know-the-name.mp3' }, cellViews: ->(cell) do
|
|
94
|
+
cell.label text: 'i-dont-know-the-name.mp3'
|
|
95
|
+
cell.label text: '10mb'
|
|
96
|
+
cell.label text: '2024/01/4'
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
]
|
|
102
|
+
|
|
103
|
+
col.spacer height: 8
|
|
104
|
+
col.panels_ul childViews: ->(li) do
|
|
105
|
+
li.label text: '🍌 Banana', dragData: { item: 'banana' }
|
|
106
|
+
li.label text: '💣 Bomb', dragData: { item: 'bomb' }
|
|
107
|
+
li.label text: '🍈 Melon', dragData: { item: 'melon' }
|
|
108
|
+
li.label text: '🐻 Bear', dragData: { item: 'bear' }
|
|
109
|
+
li.label text: '🍴 Fork and knife', dragData: { item: 'fork_and_knife' }
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
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
|
|
@@ -82,13 +82,13 @@ page.body childViews: ->(body) do
|
|
|
82
82
|
end
|
|
83
83
|
form.hr width: 'matchParent'
|
|
84
84
|
check_group_value = ['option3', 'option1']
|
|
85
|
-
form.fields_checkGroup width: 'matchParent', name: 'user[check_group]', id: 'check_group', value: check_group_value, validation: validation, childViews: ->(radio) do
|
|
85
|
+
form.fields_checkGroup width: 'matchParent', name: 'user[check_group][]', id: 'check_group', value: check_group_value, validation: validation, childViews: ->(radio) do
|
|
86
86
|
options.each do |option|
|
|
87
87
|
radio.fields_check label: option['text'], checkValue: option['value']
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
form.hr width: 'matchParent'
|
|
91
|
-
form.
|
|
91
|
+
form.panels_responsive width: 'matchParent', id: 'ver', childViews: ->(ver) do
|
|
92
92
|
form.fields_text width: 'matchParent', name: 'user[text]', id: 'text', value: 'John Doe', validation: validation.merge(format: { regex: /Doe\z/, message: 'Must end with Doe' })
|
|
93
93
|
end
|
|
94
94
|
form.panels_vertical width: 'matchParent', id: 'ver1', displayed: false, childViews: ->(ver) do
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/glib/dynamic_text.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/glib/value.rb
CHANGED
|
File without changes
|
data/lib/glib/version.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: 4.
|
|
4
|
+
version: 4.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -116,6 +116,7 @@ files:
|
|
|
116
116
|
- app/helpers/glib/json_ui/action_builder/components.rb
|
|
117
117
|
- app/helpers/glib/json_ui/action_builder/dialogs.rb
|
|
118
118
|
- app/helpers/glib/json_ui/action_builder/fields.rb
|
|
119
|
+
- app/helpers/glib/json_ui/action_builder/files.rb
|
|
119
120
|
- app/helpers/glib/json_ui/action_builder/global_states.rb
|
|
120
121
|
- app/helpers/glib/json_ui/action_builder/http.rb
|
|
121
122
|
- app/helpers/glib/json_ui/action_builder/iap.rb
|
|
@@ -178,6 +179,7 @@ files:
|
|
|
178
179
|
- app/views/json_ui/garage/actions/index.json.jbuilder
|
|
179
180
|
- app/views/json_ui/garage/actions/partial_update.json.jbuilder
|
|
180
181
|
- app/views/json_ui/garage/empty.json.jbuilder
|
|
182
|
+
- app/views/json_ui/garage/forms/_alert_post_all_data.json.jbuilder
|
|
181
183
|
- app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder
|
|
182
184
|
- app/views/json_ui/garage/forms/_conditional_banner.json.jbuilder
|
|
183
185
|
- app/views/json_ui/garage/forms/_partial_update_execute.json.jbuilder
|
|
@@ -203,6 +205,7 @@ files:
|
|
|
203
205
|
- app/views/json_ui/garage/forms/full_page_form.json.jbuilder
|
|
204
206
|
- app/views/json_ui/garage/forms/full_page_form_dialog.json.jbuilder
|
|
205
207
|
- app/views/json_ui/garage/forms/generic_post.json.jbuilder
|
|
208
|
+
- app/views/json_ui/garage/forms/generic_post_all.json.jbuilder
|
|
206
209
|
- app/views/json_ui/garage/forms/index.json.jbuilder
|
|
207
210
|
- app/views/json_ui/garage/forms/local_request.json.jbuilder
|
|
208
211
|
- app/views/json_ui/garage/forms/new_rich_text.json.jbuilder
|
|
@@ -275,6 +278,7 @@ files:
|
|
|
275
278
|
- app/views/json_ui/garage/panels/responsive.json.jbuilder
|
|
276
279
|
- app/views/json_ui/garage/panels/split.json.jbuilder
|
|
277
280
|
- app/views/json_ui/garage/panels/timeline.json.jbuilder
|
|
281
|
+
- app/views/json_ui/garage/panels/tree.json.jbuilder
|
|
278
282
|
- app/views/json_ui/garage/panels/ul.json.jbuilder
|
|
279
283
|
- app/views/json_ui/garage/panels/vertical.json.jbuilder
|
|
280
284
|
- app/views/json_ui/garage/panels/web.json.jbuilder
|
|
@@ -376,8 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
376
380
|
- !ruby/object:Gem::Version
|
|
377
381
|
version: '0'
|
|
378
382
|
requirements: []
|
|
379
|
-
|
|
380
|
-
rubygems_version: 2.7.6
|
|
383
|
+
rubygems_version: 3.4.6
|
|
381
384
|
signing_key:
|
|
382
385
|
specification_version: 4
|
|
383
386
|
summary: ''
|