glib-web 4.2.0 → 4.4.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/controllers/glib/glib_direct_uploads_controller.rb +1 -1
- data/app/controllers/glib/home_controller.rb +5 -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/browsers.rb +12 -0
- data/app/helpers/glib/json_ui/action_builder/components.rb +7 -1
- data/app/helpers/glib/json_ui/action_builder/fields.rb +6 -0
- data/app/helpers/glib/json_ui/action_builder/logics.rb +30 -0
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/storage_items.rb +23 -0
- data/app/helpers/glib/json_ui/action_builder.rb +0 -18
- 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/menu_builder.rb +1 -1
- data/app/helpers/glib/json_ui/view_builder/charts.rb +3 -2
- data/app/helpers/glib/json_ui/view_builder/fields.rb +20 -22
- data/app/helpers/glib/json_ui/view_builder/panels.rb +26 -11
- data/app/helpers/glib/json_ui/view_builder.rb +20 -8
- data/app/models/glib/active_storage/attachment.rb +0 -0
- data/app/models/glib/active_storage/blob.rb +0 -0
- data/app/models/glib/dummy_job_application.rb +3 -2
- 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/_nav_menu.json.jbuilder +1 -1
- 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/file_upload.json.jbuilder +2 -2
- 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/show_hide.json.jbuilder +16 -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/forms/submit_on_change.json.jbuilder +1 -1
- data/app/views/json_ui/garage/forms/text_validation.json.jbuilder +13 -8
- 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/test_page/_header.json.jbuilder +14 -0
- data/app/views/json_ui/garage/test_page/auto_validate.json.jbuilder +77 -0
- data/app/views/json_ui/garage/test_page/dialog.json.jbuilder +38 -0
- data/app/views/json_ui/garage/test_page/dialog_open.json.jbuilder +14 -0
- data/app/views/json_ui/garage/test_page/form.json.jbuilder +111 -0
- data/app/views/json_ui/garage/test_page/form_dynamic.json.jbuilder +63 -0
- data/app/views/json_ui/garage/test_page/multiupload.json.jbuilder +65 -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/mailer_tester.rb +1 -1
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- metadata +12 -3
- data/app/views/json_ui/garage/test_page/index.json.jbuilder +0 -120
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
json.title 'Test Page (Form)'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
|
|
5
|
+
page.body childViews: ->(body) do
|
|
6
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
7
|
+
|
|
8
|
+
body.panels_responsive padding: glib_json_padding_body, childViews: ->(res) do
|
|
9
|
+
res.h2 text: 'MultiUpload'
|
|
10
|
+
res.spacer height: 8
|
|
11
|
+
res.panels_form \
|
|
12
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
13
|
+
method: 'post',
|
|
14
|
+
childViews: ->(form) do
|
|
15
|
+
|
|
16
|
+
form.spacer height: 16
|
|
17
|
+
form.label text: 'Simple file upload'
|
|
18
|
+
form.spacer height: 8
|
|
19
|
+
form.fields_multiUpload \
|
|
20
|
+
name: 'user[multi][]',
|
|
21
|
+
id: 'upload_1',
|
|
22
|
+
width: 360,
|
|
23
|
+
accepts: { fileType: 'image', maxFileSize: 10 },
|
|
24
|
+
directUploadUrl: glib_direct_uploads_url,
|
|
25
|
+
uploadTitle: 'Files uploaded:',
|
|
26
|
+
storagePrefix: 'glib',
|
|
27
|
+
metadata: {
|
|
28
|
+
foo: 'bar',
|
|
29
|
+
zoo: 'baz'
|
|
30
|
+
},
|
|
31
|
+
# tagging: 'key=value&key1=value1',
|
|
32
|
+
tags: { key: 'value', key1: 'value1' },
|
|
33
|
+
files: [
|
|
34
|
+
{ name: 'File (Example)', signed_id: ActiveStorage::Attachment.first&.signed_id }
|
|
35
|
+
]
|
|
36
|
+
form.button text: 'clear files', onClick: ->(action) do
|
|
37
|
+
action.components_set targetId: 'upload_1', data: { files: [], value: nil }
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
form.spacer height: 16
|
|
41
|
+
form.label text: 'File upload with onFinishUpload'
|
|
42
|
+
form.spacer height: 8
|
|
43
|
+
form.fields_multiUpload \
|
|
44
|
+
name: 'user[multi2][]',
|
|
45
|
+
id: 'upload_2',
|
|
46
|
+
width: 360,
|
|
47
|
+
accepts: { fileType: 'image', maxFileSize: 5000 },
|
|
48
|
+
directUploadUrl: glib_direct_uploads_url,
|
|
49
|
+
uploadTitle: 'Files uploaded:',
|
|
50
|
+
onFinishUpload: ->(action) { action.forms_submit }
|
|
51
|
+
form.button text: 'populate files', onClick: ->(action) do
|
|
52
|
+
action.components_set targetId: 'upload_2', data: {
|
|
53
|
+
files: [
|
|
54
|
+
{ name: 'File (Example)', signed_id: ActiveStorage::Attachment.last&.signed_id }
|
|
55
|
+
],
|
|
56
|
+
value: [1]
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
form.fields_submit text: 'submit'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
res.spacer height: 16
|
|
64
|
+
end
|
|
65
|
+
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
|
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/mailer_tester.rb
CHANGED
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.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -111,6 +111,7 @@ files:
|
|
|
111
111
|
- app/helpers/glib/json_ui/abstract_builder.rb
|
|
112
112
|
- app/helpers/glib/json_ui/action_builder.rb
|
|
113
113
|
- app/helpers/glib/json_ui/action_builder/bottom_banners.rb
|
|
114
|
+
- app/helpers/glib/json_ui/action_builder/browsers.rb
|
|
114
115
|
- app/helpers/glib/json_ui/action_builder/commands.rb
|
|
115
116
|
- app/helpers/glib/json_ui/action_builder/components.rb
|
|
116
117
|
- app/helpers/glib/json_ui/action_builder/dialogs.rb
|
|
@@ -123,6 +124,7 @@ files:
|
|
|
123
124
|
- app/helpers/glib/json_ui/action_builder/popovers.rb
|
|
124
125
|
- app/helpers/glib/json_ui/action_builder/sheets.rb
|
|
125
126
|
- app/helpers/glib/json_ui/action_builder/snackbars.rb
|
|
127
|
+
- app/helpers/glib/json_ui/action_builder/storage_items.rb
|
|
126
128
|
- app/helpers/glib/json_ui/action_builder/tours.rb
|
|
127
129
|
- app/helpers/glib/json_ui/action_builder/windows.rb
|
|
128
130
|
- app/helpers/glib/json_ui/analytics_helper.rb
|
|
@@ -287,7 +289,13 @@ files:
|
|
|
287
289
|
- app/views/json_ui/garage/tables/index.json.jbuilder
|
|
288
290
|
- app/views/json_ui/garage/tables/layout.json.jbuilder
|
|
289
291
|
- app/views/json_ui/garage/tables/panel_content.json.jbuilder
|
|
290
|
-
- app/views/json_ui/garage/test_page/
|
|
292
|
+
- app/views/json_ui/garage/test_page/_header.json.jbuilder
|
|
293
|
+
- app/views/json_ui/garage/test_page/auto_validate.json.jbuilder
|
|
294
|
+
- app/views/json_ui/garage/test_page/dialog.json.jbuilder
|
|
295
|
+
- app/views/json_ui/garage/test_page/dialog_open.json.jbuilder
|
|
296
|
+
- app/views/json_ui/garage/test_page/form.json.jbuilder
|
|
297
|
+
- app/views/json_ui/garage/test_page/form_dynamic.json.jbuilder
|
|
298
|
+
- app/views/json_ui/garage/test_page/multiupload.json.jbuilder
|
|
291
299
|
- app/views/json_ui/garage/views/_chart_data.json.jbuilder
|
|
292
300
|
- app/views/json_ui/garage/views/banners.json.jbuilder
|
|
293
301
|
- app/views/json_ui/garage/views/calendar_data.json.jbuilder
|
|
@@ -368,7 +376,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
368
376
|
- !ruby/object:Gem::Version
|
|
369
377
|
version: '0'
|
|
370
378
|
requirements: []
|
|
371
|
-
|
|
379
|
+
rubyforge_project:
|
|
380
|
+
rubygems_version: 2.7.6
|
|
372
381
|
signing_key:
|
|
373
382
|
specification_version: 4
|
|
374
383
|
summary: ''
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
json.title 'Test Page'
|
|
2
|
-
|
|
3
|
-
page = json_ui_page json
|
|
4
|
-
|
|
5
|
-
page.body childViews: ->(body) do
|
|
6
|
-
body.panels_responsive padding: glib_json_padding_body, childViews: ->(res) do
|
|
7
|
-
res.panels_column lg: { cols: 6 }, childViews: ->(col) do
|
|
8
|
-
res.h2 text: 'Reactivity & validation'
|
|
9
|
-
res.spacer height: 8
|
|
10
|
-
res.panels_form \
|
|
11
|
-
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
12
|
-
method: 'post',
|
|
13
|
-
childViews: ->(form) do
|
|
14
|
-
form.panels_flow innerPadding: { bottom: 0 }, width: 'matchParent', childViews: ->(hori) do
|
|
15
|
-
hori.button text: 'components/set', onClick: ->(action) do
|
|
16
|
-
action.runMultiple childActions: ->(saction) do
|
|
17
|
-
saction.components_set targetId: 'text', data: { value: 'Doe John' }
|
|
18
|
-
saction.components_set targetId: 'textarea', data: { value: 'The quick brown fox jumps over the lazy dog' }
|
|
19
|
-
new_options = [{ text: 'Option99', value: 'option99' }]
|
|
20
|
-
['select', 'chip_group'].each do |id|
|
|
21
|
-
saction.components_set targetId: id, data: { options: new_options, value: ['option99'] }
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
hori.spacer width: 4
|
|
26
|
-
hori.button text: 'logics/set', onClick: ->(action) do
|
|
27
|
-
action.logics_set targetId: 'date', conditionalData: { value: { "+": [{ "var": ['user[date]'] }, 60 * 60 * 24 * 3] } }
|
|
28
|
-
end
|
|
29
|
-
hori.spacer width: 4
|
|
30
|
-
hori.button text: 'components/replace', onClick: ->(action) do
|
|
31
|
-
action.runMultiple childActions: ->(saction) do
|
|
32
|
-
saction.components_replace targetId: 'radio_group', newView: ->(view) do
|
|
33
|
-
view.fields_radioGroup value: '', childViews: ->(sview) do
|
|
34
|
-
sview.fields_radio label: 'Option99', value: 'option99'
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
saction.components_replace targetId: 'check_group', newView: ->(view) do
|
|
39
|
-
view.fields_checkGroup value: '', childViews: ->(sview) do
|
|
40
|
-
sview.fields_check label: 'Option99', value: nil, checkValue: 'option99'
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
hori.spacer width: 4
|
|
46
|
-
hori.button text: 'hide select', onClick: ->(action) do
|
|
47
|
-
action.components_set targetId: 'select', data: { displayed: false }
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
form.spacer height: 8
|
|
52
|
-
form.hr width: 'matchParent'
|
|
53
|
-
form.spacer height: 8
|
|
54
|
-
|
|
55
|
-
validation = { required: { message: 'Required' } }
|
|
56
|
-
options = ['option1', 'option2', 'option3', 'option4'].map { |option| { 'text'=> option.humanize, 'value' => option } }
|
|
57
|
-
|
|
58
|
-
form.fields_date width: 'matchParent', name: 'user[date]', id: 'date', value: Date.new(2024, 7, 24), validation: validation
|
|
59
|
-
form.hr width: 'matchParent'
|
|
60
|
-
form.fields_select multiple: true, width: 'matchParent', name: 'user[select][]', id: 'select', options: options, value: ['option1', 'option2'], validation: validation
|
|
61
|
-
form.hr width: 'matchParent'
|
|
62
|
-
form.fields_chipGroup width: 'matchParent', name: 'user[chip_group]', id: 'chip_group', options: options, value: ['option2'], validation: validation
|
|
63
|
-
form.hr width: 'matchParent'
|
|
64
|
-
form.fields_radioGroup width: 'matchParent', name: 'user[radio_group]', id: 'radio_group', value: 'option3', validation: validation, childViews: ->(radio) do
|
|
65
|
-
options.each do |option|
|
|
66
|
-
radio.fields_radio label: option['text'], value: option['value']
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
form.hr width: 'matchParent'
|
|
70
|
-
check_group_value = ['option3', 'option1']
|
|
71
|
-
form.fields_checkGroup width: 'matchParent', name: 'user[check_group]', id: 'check_group', value: check_group_value, validation: validation, childViews: ->(radio) do
|
|
72
|
-
options.each do |option|
|
|
73
|
-
radio.fields_check label: option['text'], checkValue: option['value']
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
form.hr width: 'matchParent'
|
|
77
|
-
form.fields_text width: 'matchParent', name: 'user[text]', id: 'text', value: 'John Doe', validation: validation
|
|
78
|
-
|
|
79
|
-
form.hr width: 'matchParent'
|
|
80
|
-
|
|
81
|
-
form.fields_textarea width: 'matchParent', name: 'user[textarea]', id: 'textarea', value: 'Lorem ipsum et dumet bla bla bla...'
|
|
82
|
-
|
|
83
|
-
form.hr width: 'matchParent'
|
|
84
|
-
form.fields_submit text: 'submit'
|
|
85
|
-
form.spacer height: 2
|
|
86
|
-
form.fields_submit text: 'submit (if form valid)', disableIfFormInvalid: true
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
res.spacer height: 16
|
|
91
|
-
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
res.panels_column lg: { cols: 6 }, childViews: ->(col) do
|
|
96
|
-
res.h2 text: 'Dialog'
|
|
97
|
-
res.spacer height: 8
|
|
98
|
-
res.button text: 'Dialog updateExisting', onClick: ->(action) do
|
|
99
|
-
action.runMultiple childActions: ->(saction) do
|
|
100
|
-
saction.dialogs_show updateExisting: true, content: ->(dialog) do
|
|
101
|
-
dialog.body padding: glib_json_padding_body, childViews: ->(sbody) do
|
|
102
|
-
sbody.h1 text: 'Hello world'
|
|
103
|
-
sbody.button text: 'change dialog content', onClick: ->(ssaction) do
|
|
104
|
-
ssaction.dialogs_show updateExisting: true, disableCloseButton: true, content: ->(sdialog) do
|
|
105
|
-
sdialog.body padding: glib_json_padding_body, childViews: ->(ssbody) do
|
|
106
|
-
ssbody.h1 text: 'Hello world (updated)'
|
|
107
|
-
ssbody.spacer height: 8
|
|
108
|
-
ssbody.button text: 'close', onClick: ->(xaction) do
|
|
109
|
-
xaction.dialogs_close
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
end
|