glib-web 4.2.0 → 4.3.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/json_ui/action_builder/components.rb +7 -1
- data/app/helpers/glib/json_ui/action_builder/logics.rb +21 -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/view_builder/panels.rb +3 -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/dynamic_group.json.jbuilder +35 -13
- 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/selects.json.jbuilder +39 -5
- 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/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/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 +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 414da1c14521998494a3274989ed77b5db19a4bea80d386aee773aefb3af390d
|
|
4
|
+
data.tar.gz: a1b803901c4c2da2c7dc618905c3b5d05c995dffc02cfd84f69be2826d0326af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17ca569d203c3b13bcae9f666e04693e0dd0a38f31c785be4d9d62d405568db41532c1a5229ef5892d37a1e9d7f21047593798b396d8f3286584d88e5f9e5edf
|
|
7
|
+
data.tar.gz: b9a6f5a64dac552532c2152ce28d1db7365e8a32bd71a6d1547f2d712baa84975fa9a594227f0874d0cc8bde6d1f4bc03d23ac72bf8558a3d790ea287379c948
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -16,7 +16,7 @@ class Glib::JsonUi::ActionBuilder
|
|
|
16
16
|
views :childViews
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
#
|
|
19
|
+
# Consider deprecating this. See `components_set` example in app/views/json_ui/garage/forms/selects.json.jbuilder
|
|
20
20
|
class Replace < Action
|
|
21
21
|
string :targetId
|
|
22
22
|
action :onReplace
|
|
@@ -32,6 +32,12 @@ class Glib::JsonUi::ActionBuilder
|
|
|
32
32
|
string :targetId
|
|
33
33
|
hash :data
|
|
34
34
|
action :onSet
|
|
35
|
+
|
|
36
|
+
def dataBuilder(block)
|
|
37
|
+
json.data do
|
|
38
|
+
block.call(page.sview_builder)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
35
41
|
end
|
|
36
42
|
end
|
|
37
43
|
end
|
|
@@ -7,6 +7,27 @@ class Glib::JsonUi::ActionBuilder
|
|
|
7
7
|
hash :data
|
|
8
8
|
hash :variables
|
|
9
9
|
action :onSet
|
|
10
|
+
|
|
11
|
+
def dataBuilder(block)
|
|
12
|
+
json.data do
|
|
13
|
+
block.call(page.sview_builder)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
10
16
|
end
|
|
17
|
+
|
|
18
|
+
# Under consideration, likely not a good idea.
|
|
19
|
+
# class Append < Action
|
|
20
|
+
# string :targetId
|
|
21
|
+
# hash :condition
|
|
22
|
+
# string :prop # Property name, e.g. rows, childViews
|
|
23
|
+
# array :data
|
|
24
|
+
# action :onAppend
|
|
25
|
+
|
|
26
|
+
# def dataBuilder(block)
|
|
27
|
+
# json.data do
|
|
28
|
+
# block.call(page.view_builder)
|
|
29
|
+
# end
|
|
30
|
+
# end
|
|
31
|
+
# end
|
|
11
32
|
end
|
|
12
33
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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
|
|
@@ -27,20 +27,42 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
|
27
27
|
template.spacer height: 10
|
|
28
28
|
template.fields_text width: 'matchParent', name: 'question', label: 'Question', placeholder: 'Question'
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
form.panels_responsive childViews: ->(column) do
|
|
31
|
+
options = [:rating, :yes_no]
|
|
32
|
+
template.fields_select \
|
|
33
|
+
width: 'matchParent',
|
|
34
|
+
name: 'type',
|
|
35
|
+
label: 'Answer Type',
|
|
36
|
+
placeholder: 'Answer Type',
|
|
37
|
+
options: options.map { |o| { text: o.to_s.humanize, value: o } },
|
|
38
|
+
onChange: ->(action) do
|
|
39
|
+
action.components_findClosest view: 'panels/responsive', onFind: ->(find) do
|
|
40
|
+
find.logics_set dataBuilder: ->(set) do
|
|
41
|
+
set.panels_responsive accessory: ->(accessory) do
|
|
42
|
+
accessory.footer childViews: ->(footer) do
|
|
43
|
+
# TODO: Is there a way to only show this if the selected option is "rating".
|
|
44
|
+
# I.e. `showIf: { "==": [{ "var": 'user[evaluation][{{index}}][type]' }, 'rating'] }`
|
|
45
|
+
footer.fields_check \
|
|
46
|
+
width: 'matchParent',
|
|
47
|
+
name: 'enabled',
|
|
48
|
+
label: 'Enable',
|
|
49
|
+
checkValue: '1'
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end, accessory: ->(accessory) do
|
|
56
|
+
accessory.footer childViews: ->(footer) do
|
|
57
|
+
end
|
|
58
|
+
end
|
|
37
59
|
|
|
38
|
-
template.fields_check \
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
60
|
+
# template.fields_check \
|
|
61
|
+
# width: 'matchParent',
|
|
62
|
+
# name: 'enabled',
|
|
63
|
+
# label: 'Enable',
|
|
64
|
+
# checkValue: '1',
|
|
65
|
+
# showIf: { "==": [{ "var": 'user[evaluation][{{index}}][type]' }, 'rating'] }
|
|
44
66
|
|
|
45
67
|
template.spacer height: 14
|
|
46
68
|
end
|
|
File without changes
|
|
File without changes
|
|
@@ -15,14 +15,48 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
|
15
15
|
'melbourne' => 'Melbourne',
|
|
16
16
|
'sydney' => 'Sydney',
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
form.panels_responsive childViews: ->(column) do
|
|
20
|
+
form.fields_select \
|
|
21
|
+
name: 'user[city]',
|
|
22
|
+
width: 'matchParent',
|
|
23
|
+
label: 'City1',
|
|
24
|
+
placeholder: 'This is a placeholder',
|
|
25
|
+
options: languages.map { |k, v| { value: k, text: v } },
|
|
26
|
+
value: 'canberra',
|
|
27
|
+
onChange: ->(action) do
|
|
28
|
+
action.components_findClosest view: 'panels/responsive', onFind: ->(find) do
|
|
29
|
+
# This is to demonstrate that `components_set` can be a more flexible version
|
|
30
|
+
# of `components_replace`.
|
|
31
|
+
find.components_set dataBuilder: ->(set) do
|
|
32
|
+
# Don't update the childViews, just update the footer
|
|
33
|
+
set.panels_responsive accessory: ->(accessory) do
|
|
34
|
+
accessory.footer childViews: ->(footer) do
|
|
35
|
+
footer.label text: 'New footer'
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end, accessory: ->(accessory) do
|
|
42
|
+
accessory.footer childViews: ->(footer) do
|
|
43
|
+
footer.label text: 'Original footer'
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
form.spacer height: 6
|
|
48
|
+
|
|
18
49
|
form.fields_select \
|
|
19
|
-
name: 'user[
|
|
50
|
+
name: 'user[cities][]',
|
|
20
51
|
width: 'matchParent',
|
|
21
|
-
label: '
|
|
22
|
-
placeholder: 'This is a placeholder',
|
|
52
|
+
label: 'Cities',
|
|
23
53
|
options: languages.map { |k, v| { value: k, text: v } },
|
|
24
|
-
value: '
|
|
25
|
-
|
|
54
|
+
value: ['melbourne', 'sydney'],
|
|
55
|
+
multiple: true,
|
|
56
|
+
onChange: ->(action) do
|
|
57
|
+
# TODO: Fix needed. When closing this dialog, the dirty prompt appears.
|
|
58
|
+
action.dialogs_alert message: 'Options selected'
|
|
59
|
+
end
|
|
26
60
|
|
|
27
61
|
form.spacer height: 20
|
|
28
62
|
form.h2 text: 'Select fields with grouping'
|
|
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
|
|
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
|
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.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -368,7 +368,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
368
368
|
- !ruby/object:Gem::Version
|
|
369
369
|
version: '0'
|
|
370
370
|
requirements: []
|
|
371
|
-
|
|
371
|
+
rubyforge_project:
|
|
372
|
+
rubygems_version: 2.7.6
|
|
372
373
|
signing_key:
|
|
373
374
|
specification_version: 4
|
|
374
375
|
summary: ''
|