glib-web 4.9.0 → 4.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
- data/app/controllers/concerns/glib/json/traversal.rb +4 -2
- data/app/controllers/glib/errors_controller.rb +7 -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/json_ui/abstract_builder.rb +1 -1
- 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/view_builder/panels.rb +0 -7
- 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/_partial_update_execute.json.jbuilder +1 -1
- data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +3 -1
- 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/partial_update.json.jbuilder +3 -0
- data/app/views/json_ui/garage/forms/partial_update_response.json.jbuilder +4 -0
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +21 -0
- 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/forms/update_options.json.jbuilder +13 -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/outlined.json.jbuilder +0 -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/tables/panel_content.json.jbuilder +25 -57
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/controls.json.jbuilder +1 -1
- 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/config/routes.rb +1 -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 +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfd1804082f7f14167a579c42e2d1bde31ad7dbd928bc764ca3de0ba0259ad99
|
4
|
+
data.tar.gz: 1cde932d484baa31d4074ce52bdf5d955c51fc70008016b8bbcb6ead85746107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73d15de9c4abe80f6148b67b328ac4c4ece94231900a62c3fcddabd06db453efb462ef296659dfdd8f36674e353815c58dd4a4d337ab15f07385eaa96e2a09e0
|
7
|
+
data.tar.gz: aea3aba2adb595aa2eaaef5275b2bf6b8e1b04731b910678c651d1f170ae1e2127035735955c30bf4d8e7238491fabdb236f9f9b6531239a77f639c799460599
|
File without changes
|
@@ -99,11 +99,13 @@ module Glib::Json::Traversal
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def current_deferred_actions
|
102
|
-
|
102
|
+
# Add "|| []" because it broke on hz
|
103
|
+
@deferred_actions.last || []
|
103
104
|
end
|
104
105
|
|
105
106
|
def current_component_registry
|
106
|
-
|
107
|
+
# Add "|| {}" because it broke on hz
|
108
|
+
@component_registries.last || {}
|
107
109
|
end
|
108
110
|
|
109
111
|
def defer_action(action_crawler, target_id)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -564,13 +564,6 @@ class Glib::JsonUi::ViewBuilder
|
|
564
564
|
# end
|
565
565
|
end
|
566
566
|
|
567
|
-
class Pagination < View
|
568
|
-
int :length
|
569
|
-
int :value
|
570
|
-
action :onChange
|
571
|
-
string :paramNameForFieldName
|
572
|
-
end
|
573
|
-
|
574
567
|
module ModelPanel
|
575
568
|
attr_reader :model_name # See Panels::Form.field_name
|
576
569
|
attr_reader :assoc_order_index
|
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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
name = params[:name]
|
2
|
-
action.components_replace targetId: 'greeting',
|
2
|
+
action.components_replace targetId: 'greeting', newView: ->(update) do
|
3
3
|
update.panels_vertical childViews: ->(vertical) do
|
4
4
|
name = params[:name]
|
5
5
|
vertical.fields_hidden name: 'name', value: name
|
File without changes
|
@@ -35,7 +35,9 @@ page.scroll childViews: ->(scroll) do
|
|
35
35
|
form.spacer height: 20
|
36
36
|
form.h2 text: 'Check without group'
|
37
37
|
form.spacer height: 4
|
38
|
-
form.fields_check name: 'user[
|
38
|
+
form.fields_check name: 'user[choice][]', label: 'Choice 1', checkValue: 'choice_1'
|
39
|
+
form.fields_check name: 'user[choice][]', label: 'Choice 2', checkValue: 'choice_2'
|
40
|
+
|
39
41
|
|
40
42
|
form.spacer height: 20
|
41
43
|
form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
File without changes
|
File without changes
|
@@ -38,6 +38,9 @@ page.scroll childViews: ->(scroll) do
|
|
38
38
|
vertical.button text: 'Update', onClick: ->(action) do
|
39
39
|
action.http_get url: json_ui_garage_url(path: 'forms/partial_update_response'), formData: { name: 'John' }, historyUrl: json_ui_garage_url(path: 'forms/partial_update', name: 'John')
|
40
40
|
end
|
41
|
+
vertical.button text: 'Update with retry', onClick: ->(action) do
|
42
|
+
action.http_get url: json_ui_garage_url(path: 'forms/partial_update_response', error: true)
|
43
|
+
end
|
41
44
|
vertical.spacer height: 18
|
42
45
|
end
|
43
46
|
|
@@ -129,6 +129,27 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
129
129
|
value: ['ja', 'de'],
|
130
130
|
multiple: true
|
131
131
|
|
132
|
+
form.spacer height: 6
|
133
|
+
form.label text: 'Options from http/get'
|
134
|
+
form.spacer height: 6
|
135
|
+
|
136
|
+
form.fields_select \
|
137
|
+
name: 'user[animal_or_plant]',
|
138
|
+
width: 'matchParent',
|
139
|
+
label: 'Animal or Plant',
|
140
|
+
options: [{ text: 'Animal', value: 'animal' }, { text: 'Plant', value: 'plant' }],
|
141
|
+
value: 'animal',
|
142
|
+
onChangeAndLoad: ->(action) do
|
143
|
+
action.http_get url: json_ui_garage_url(path: 'forms/update_options')
|
144
|
+
end
|
145
|
+
|
146
|
+
form.fields_select \
|
147
|
+
id: 'options',
|
148
|
+
name: 'user[choose_animal_or_plant]',
|
149
|
+
width: 'matchParent',
|
150
|
+
label: 'Choose',
|
151
|
+
options: []
|
152
|
+
|
132
153
|
form.spacer height: 20
|
133
154
|
form.h2 text: 'Select fields with empty values'
|
134
155
|
form.spacer height: 6
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
sleep 0.5
|
2
|
+
|
3
|
+
value = params.require(:user).to_unsafe_h['animal_or_plant']
|
4
|
+
options = {
|
5
|
+
'animal' => ['cat', 'dog', 'bird'].map { |v| { text: v.humanize, value: v } },
|
6
|
+
'plant' => ['herb', 'rice', 'vegetable'].map { |v| { text: v.humanize, value: v } }
|
7
|
+
}[value]
|
8
|
+
|
9
|
+
json_ui_response_with_view json do |action|
|
10
|
+
action.components_set targetId: 'options', data: {
|
11
|
+
options: options
|
12
|
+
}
|
13
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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
|
@@ -3,66 +3,34 @@ json.title 'Tables'
|
|
3
3
|
page = json_ui_page json
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
5
|
|
6
|
-
page.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
check_ids = (0..2).map { |i| "item_#{i}" }
|
14
|
-
action.logics_set targetIds: check_ids, conditionalData: {
|
15
|
-
value: { 'var': 'check_all' }
|
16
|
-
}
|
17
|
-
end
|
18
|
-
end
|
19
|
-
header.label text: 'Vertical'
|
20
|
-
header.label text: 'Horizontal'
|
21
|
-
header.label text: 'Unordered List'
|
22
|
-
end
|
23
|
-
|
24
|
-
items = [1, 2, 3]
|
25
|
-
section.rows objects: items, builder: ->(row, item, index) do
|
26
|
-
row.default colStyles: [{ width: 200, backgroundColor: '#eeeeee' }], cellViews: ->(cell) do
|
27
|
-
cell.panels_horizontal childViews: ->(horizontal) do
|
28
|
-
horizontal.fields_check \
|
29
|
-
id: "item_#{index}",
|
30
|
-
name: 'user[items][]',
|
31
|
-
checkValue: index, # In the real-world, this is going to be the ID of a DB record.
|
32
|
-
onChange: ->(action) do
|
33
|
-
# TODO: Fix fields_check so it can support arrays
|
34
|
-
action.logics_set targetId: 'submit_button', conditionalData: {
|
35
|
-
text: {
|
36
|
-
'printf': [
|
37
|
-
'Submit {0} items',
|
38
|
-
{ 'countNonNull': [{ 'var': 'user[items]' }] }
|
39
|
-
]
|
40
|
-
}
|
41
|
-
}
|
42
|
-
end
|
43
|
-
end
|
6
|
+
page.table styleClass: 'table--grid', sections: [
|
7
|
+
->(section) do
|
8
|
+
section.header cellViews: ->(header) do
|
9
|
+
header.label text: 'Vertical'
|
10
|
+
header.label text: 'Horizontal'
|
11
|
+
header.label text: 'Unordered List'
|
12
|
+
end
|
44
13
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
14
|
+
items = [1, 2, 3]
|
15
|
+
section.rows objects: items, builder: ->(row, item, index) do
|
16
|
+
row.default colStyles: [{ width: 200, backgroundColor: '#eeeeee' }], cellViews: ->(cell) do
|
17
|
+
cell.panels_vertical childViews: ->(vertical) do
|
18
|
+
vertical.h3 text: "Title #{item}"
|
19
|
+
vertical.spacer height: 4
|
20
|
+
vertical.label text: "Subtitle #{item}"
|
21
|
+
end
|
50
22
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
23
|
+
cell.panels_horizontal childViews: ->(vertical) do
|
24
|
+
vertical.label text: "Left #{item}"
|
25
|
+
vertical.spacer width: 10
|
26
|
+
vertical.label text: "Right #{item}"
|
27
|
+
end
|
56
28
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
end
|
61
|
-
end
|
29
|
+
cell.panels_ul childViews: ->(ul) do
|
30
|
+
ul.label text: "Item A#{item}"
|
31
|
+
ul.label text: "Item B#{item}"
|
62
32
|
end
|
63
33
|
end
|
64
|
-
|
65
|
-
|
66
|
-
form.fields_submit id: 'submit_button', text: 'Submit'
|
34
|
+
end
|
67
35
|
end
|
68
|
-
|
36
|
+
]
|
File without changes
|
@@ -39,7 +39,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
39
39
|
dialog.body padding: glib_json_padding_body, childViews: ->(view) do
|
40
40
|
view.panels_responsive styleClass: 'popover-menu', width: 200, childViews: ->(res) do
|
41
41
|
res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
42
|
-
saction.
|
42
|
+
saction.windows_open url: 'http://localhost:3000/glib/json_ui_garage?path=pages%2Findex'
|
43
43
|
end
|
44
44
|
res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
45
45
|
saction.popovers_close key: 'menu'
|
File without changes
|
File without changes
|
File without changes
|
data/config/routes.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/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.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- app/controllers/concerns/glib/json/traversal.rb
|
101
101
|
- app/controllers/concerns/glib/json/ui.rb
|
102
102
|
- app/controllers/concerns/glib/json/validation.rb
|
103
|
+
- app/controllers/glib/errors_controller.rb
|
103
104
|
- app/controllers/glib/glib_direct_uploads_controller.rb
|
104
105
|
- app/controllers/glib/home_controller.rb
|
105
106
|
- app/helpers/glib/app_feature_support_helper.rb
|
@@ -234,6 +235,7 @@ files:
|
|
234
235
|
- app/views/json_ui/garage/forms/submit_on_change.json.jbuilder
|
235
236
|
- app/views/json_ui/garage/forms/text_validation.json.jbuilder
|
236
237
|
- app/views/json_ui/garage/forms/timers.json.jbuilder
|
238
|
+
- app/views/json_ui/garage/forms/update_options.json.jbuilder
|
237
239
|
- app/views/json_ui/garage/home/blank.json.jbuilder
|
238
240
|
- app/views/json_ui/garage/home/index.json.jbuilder
|
239
241
|
- app/views/json_ui/garage/home/slow.json.jbuilder
|
@@ -386,8 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
386
388
|
- !ruby/object:Gem::Version
|
387
389
|
version: '0'
|
388
390
|
requirements: []
|
389
|
-
|
390
|
-
rubygems_version: 2.7.6
|
391
|
+
rubygems_version: 3.4.6
|
391
392
|
signing_key:
|
392
393
|
specification_version: 4
|
393
394
|
summary: ''
|