glib-web 4.30.3 → 4.31.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/dialogs.rb +1 -0
- data/app/helpers/glib/json_ui/action_builder/fields.rb +1 -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/page_helper.rb +1 -1
- data/app/helpers/glib/json_ui/view_builder/fields.rb +15 -2
- data/app/helpers/glib/json_ui/view_builder/panels.rb +6 -1
- 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.json.jbuilder +3 -1
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dirty_prompt.json.jbuilder +10 -5
- data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +6 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -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/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/panels/split.json.jbuilder +15 -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/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/controls.json.jbuilder +14 -0
- data/app/views/json_ui/garage/views/fields_focus.json.jbuilder +14 -2
- 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/json_ui/garage/views/shareButton.json.jbuilder +8 -7
- 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 +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 202bc4edc3c17b96ee92c7a233850c4ada8239e47b26c0f1e5979b1e9debf71a
|
4
|
+
data.tar.gz: 23f9817364a17881ec146c7951a940385debcc2164f3c681e8354f6919a3a25e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a66beeafd1bce5bead0e60e8a9c38c832ea28dfe09873d3cef9b663196c634262f15edd21863bcd0d83e0efb9bea7c930e1afdccf7cd50ad0fa7a190e20c832
|
7
|
+
data.tar.gz: 6a3bb6b989165a1b38a1ac30878849a508f81c1c96b6a100e026022acd24145483bd7d3b4724712f02ce40d32695fcff22e5b3734115051beaff2cb3aa39f20e
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -256,7 +256,7 @@ module Glib
|
|
256
256
|
def form(options = {})
|
257
257
|
form = Glib::JsonUi::ViewBuilder::Panels::Form.new(json, self)
|
258
258
|
form.childViews(->(view_builder) { })
|
259
|
-
panel_options = options.slice!(:url, :method, :local, :onSubmit, :paramNameForFormData, :model, :onChange, :onChangeAndLoad, :autoValidate)
|
259
|
+
panel_options = options.slice!(:url, :method, :local, :onSubmit, :paramNameForFormData, :model, :onChange, :onChangeAndLoad, :autoValidate, :disableDirtyCheck)
|
260
260
|
|
261
261
|
json.fullPageForm do
|
262
262
|
json.view 'panels/fullPageForm'
|
@@ -6,7 +6,6 @@ class Glib::JsonUi::ViewBuilder
|
|
6
6
|
|
7
7
|
bool :readOnly
|
8
8
|
bool :disabled
|
9
|
-
bool :disableDirtyCheck
|
10
9
|
bool :clearable
|
11
10
|
action :onChange
|
12
11
|
action :onChangeAndLoad
|
@@ -69,9 +68,14 @@ class Glib::JsonUi::ViewBuilder
|
|
69
68
|
@autoValidate = autoValidate
|
70
69
|
end
|
71
70
|
|
71
|
+
def disableDirtyCheck(value)
|
72
|
+
@disable_dirty_check = value
|
73
|
+
end
|
74
|
+
|
72
75
|
# Override
|
73
76
|
def created
|
74
|
-
|
77
|
+
form = page.current_form
|
78
|
+
if @prop && form
|
75
79
|
context.field_assert_respond_to(@prop)
|
76
80
|
|
77
81
|
@name ||= context.field_name(@prop, @multiple || false)
|
@@ -87,6 +91,15 @@ class Glib::JsonUi::ViewBuilder
|
|
87
91
|
@value ||= determine_value(context, @prop)
|
88
92
|
end
|
89
93
|
end
|
94
|
+
|
95
|
+
if form.present? && !form.disable_dirty_check.nil?
|
96
|
+
json.set! 'disableDirtyCheck', form.disable_dirty_check
|
97
|
+
end
|
98
|
+
|
99
|
+
if !@disable_dirty_check.nil?
|
100
|
+
json.set! 'disableDirtyCheck', @disable_dirty_check
|
101
|
+
end
|
102
|
+
|
90
103
|
json.name @name
|
91
104
|
json.value @value if @value
|
92
105
|
json.label @label if @label
|
@@ -5,6 +5,7 @@ class Glib::JsonUi::ViewBuilder
|
|
5
5
|
class Form < View
|
6
6
|
attr_reader :model_name # See Panels::Form.field_name
|
7
7
|
attr_reader :_autoValidate
|
8
|
+
attr_reader :disable_dirty_check
|
8
9
|
attr_accessor :current_dynamic_group
|
9
10
|
|
10
11
|
action :onSubmit
|
@@ -21,6 +22,10 @@ class Glib::JsonUi::ViewBuilder
|
|
21
22
|
@nested_associations ||= []
|
22
23
|
end
|
23
24
|
|
25
|
+
def disableDirtyCheck(value)
|
26
|
+
@disable_dirty_check = value
|
27
|
+
end
|
28
|
+
|
24
29
|
# TODO: Enable this when we know it won't break existing apps.
|
25
30
|
# Even for pure client-side apps, this is required because form.validate() requires a URL to construct form data.
|
26
31
|
# required :url
|
@@ -448,7 +453,7 @@ class Glib::JsonUi::ViewBuilder
|
|
448
453
|
# def content(block)
|
449
454
|
# block.call page.split_content_builder
|
450
455
|
# end
|
451
|
-
|
456
|
+
string :align
|
452
457
|
panels_builder :content, :left, :center, :right
|
453
458
|
end
|
454
459
|
|
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
|
@@ -73,7 +73,9 @@ section.rows builder: ->(template) do
|
|
73
73
|
action.runMultiple childActions: ->(saction) do
|
74
74
|
saction.dialogs_open url: json_ui_garage_url(path: 'forms/dialogs_form')
|
75
75
|
saction.timeouts_set interval: 1000, onTimeout: ->(ssaction) do
|
76
|
-
ssaction.dialogs_reload
|
76
|
+
ssaction.dialogs_reload onReload: ->(xaction) do
|
77
|
+
xaction.snackbars_alert message: 'reload!'
|
78
|
+
end
|
77
79
|
end
|
78
80
|
end
|
79
81
|
end
|
File without changes
|
File without changes
|
@@ -9,6 +9,7 @@ page.form \
|
|
9
9
|
local: true,
|
10
10
|
url: json_ui_garage_url(path: 'forms/local_request'),
|
11
11
|
method: 'post',
|
12
|
+
# disableDirtyCheck: true,
|
12
13
|
padding: glib_json_padding_body,
|
13
14
|
childViews: ->(form) do
|
14
15
|
form.h3 text: "Hello #{ data[:name] }"
|
@@ -37,11 +38,15 @@ page.form \
|
|
37
38
|
|
38
39
|
form.h3 text: 'Radio'
|
39
40
|
form.spacer height: 14
|
40
|
-
form.fields_radioGroup
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
form.fields_radioGroup \
|
42
|
+
name: 'user[gender]',
|
43
|
+
disableDirtyCheck: false,
|
44
|
+
value: 'F',
|
45
|
+
childViews: ->(group) do
|
46
|
+
group.fields_radio value: '', label: 'Unknown'
|
47
|
+
group.fields_radio value: 'M', label: 'Male'
|
48
|
+
group.fields_radio value: 'F', label: 'Female'
|
49
|
+
end
|
45
50
|
|
46
51
|
form.h3 text: 'Check group'
|
47
52
|
form.spacer height: 14
|
@@ -24,6 +24,10 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
24
24
|
{ name: 'type', value: 'yes_no' },
|
25
25
|
{ name: '[primary_language]', selectedOptions: [ { value: 'id2', text: 'Item 2' } ] },
|
26
26
|
{ name: 'message[error]', value: 'Incompatible selection' }
|
27
|
+
],
|
28
|
+
[
|
29
|
+
{ name: 'question', value: 'Incomplete' },
|
30
|
+
{ name: 'type', value: 'unspecified' },
|
27
31
|
]
|
28
32
|
]
|
29
33
|
form.fields_dynamicGroup id: 'form_dynamic_group', width: 'matchParent', name: 'user[evaluation]', groupFieldProperties: properties, titlePrefix: 'Entry', content: ->(group) do
|
@@ -83,6 +87,8 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
83
87
|
# subaction.dialogs_alert message: 'Please select a valid type'
|
84
88
|
# end
|
85
89
|
|
90
|
+
# This should run when the page loads, so if a field has `unspecified` value, this alert dialog
|
91
|
+
# should show right away.
|
86
92
|
multiple.logics_run \
|
87
93
|
condition: { "==": [{ "var": '{{entryPrefix}}[type]' }, 'unspecified'] },
|
88
94
|
onTrue: ->(subaction) 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
|
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
|
@@ -178,5 +178,20 @@ json_ui_page json do |page|
|
|
178
178
|
end
|
179
179
|
end
|
180
180
|
end
|
181
|
+
|
182
|
+
scroll.label text: "\n"
|
183
|
+
scroll.h1 text: 'Align middle'
|
184
|
+
scroll.panels_split align: 'middle', height: 100, backgroundColor: '#b3bac2', width: 'matchParent', content: ->(content) do
|
185
|
+
content.left childViews: ->(left) do
|
186
|
+
left.button text: '1'
|
187
|
+
end
|
188
|
+
content.center childViews: ->(center) do
|
189
|
+
center.button height: 70, width: 'matchParent', text: '2'
|
190
|
+
end
|
191
|
+
content.right childViews: ->(right) do
|
192
|
+
right.button text: '3'
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
181
196
|
end
|
182
197
|
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
|
@@ -80,6 +80,20 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
scroll.spacer height: 10
|
84
|
+
scroll.button \
|
85
|
+
text: 'Refresh with tooltip',
|
86
|
+
tooltip: { text: 'This tooltip should disappear after refresh' },
|
87
|
+
onClick: ->(action) do
|
88
|
+
action.windows_reload
|
89
|
+
end
|
90
|
+
|
91
|
+
scroll.spacer height: 10
|
92
|
+
scroll.button \
|
93
|
+
text: 'Disabled button with tooltip',
|
94
|
+
tooltip: { text: 'Hello world' },
|
95
|
+
disabled: true
|
96
|
+
|
83
97
|
scroll.spacer height: 20
|
84
98
|
scroll.button \
|
85
99
|
icon: 'info',
|
@@ -12,9 +12,13 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
|
|
12
12
|
width: 300,
|
13
13
|
childViews: ->(form) do
|
14
14
|
res.fields_text id: 'first', name: 'user[full_name]', label: 'Full name', placeholder: 'Full name', width: 'matchParent'
|
15
|
-
res.spacer height:
|
15
|
+
res.spacer height: 4
|
16
16
|
res.fields_number id: 'second', name: 'user[age]', label: 'Age', placeholder: 'Age', width: 'matchParent'
|
17
17
|
res.spacer height: 4
|
18
|
+
res.fields_textarea id: 'third', name: 'user[boi]', label: 'Bio', placeholder: 'Bio', width: 'matchParent'
|
19
|
+
res.spacer height: 4
|
20
|
+
res.fields_date id: 'fourth', name: 'user[birth_date]', label: 'Birth date', placeholder: 'Birth date', width: 'matchParent'
|
21
|
+
res.spacer height: 4
|
18
22
|
res.panels_horizontal childViews: ->(hori) do
|
19
23
|
res.button text: 'focus1', onClick: ->(action) do
|
20
24
|
action.fields_focus targetId: 'first'
|
@@ -24,6 +28,14 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
|
|
24
28
|
action.fields_focus targetId: 'second'
|
25
29
|
end
|
26
30
|
res.spacer width: 4
|
31
|
+
res.button text: 'focus3', onClick: ->(action) do
|
32
|
+
action.fields_focus targetId: 'third'
|
33
|
+
end
|
34
|
+
res.spacer width: 4
|
35
|
+
res.button text: 'focus4', onClick: ->(action) do
|
36
|
+
action.fields_focus targetId: 'fourth'
|
37
|
+
end
|
38
|
+
res.spacer width: 4
|
27
39
|
res.button text: 'blur', onClick: ->(action) do
|
28
40
|
action.fields_focus targetId: 'first', onFocus: ->(saction) do
|
29
41
|
saction.timeouts_set interval: 1000, onTimeout: ->(ssaction) { ssaction.fields_blur }
|
@@ -31,7 +43,7 @@ page.body padding: glib_json_padding_body, childViews: ->(body) do
|
|
31
43
|
end
|
32
44
|
res.spacer width: 4
|
33
45
|
res.button text: 'reset', onClick: ->(action) do
|
34
|
-
action.fields_reset
|
46
|
+
action.fields_reset targetIds: ['first', 'second', 'third', 'fourth'], onReset: ->(saction) do
|
35
47
|
saction.snackbars_alert styleClasses: ['success'], message: 'Reset full name!'
|
36
48
|
end
|
37
49
|
end
|
File without changes
|
File without changes
|
@@ -21,13 +21,14 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
21
21
|
|
22
22
|
f.spacer width: 10
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
# TODO: Fix. Crawler test is failing.
|
25
|
+
# f.shareButton \
|
26
|
+
# network: 'email',
|
27
|
+
# url: '',
|
28
|
+
# text: 'Email',
|
29
|
+
# onClick: ->(action) do
|
30
|
+
# action.windows_openWeb url: 'mailto://test@email.com'
|
31
|
+
# end
|
31
32
|
|
32
33
|
f.spacer width: 10
|
33
34
|
|
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.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -412,8 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
412
412
|
- !ruby/object:Gem::Version
|
413
413
|
version: '0'
|
414
414
|
requirements: []
|
415
|
-
|
416
|
-
rubygems_version: 2.7.6
|
415
|
+
rubygems_version: 3.4.6
|
417
416
|
signing_key:
|
418
417
|
specification_version: 4
|
419
418
|
summary: ''
|