glib-web 4.8.2 → 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 +27 -22
- 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/bulk_edit_post2.json.jbuilder +12 -13
- 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/bulk_edit.json.jbuilder +4 -8
- 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/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
|
@@ -326,36 +326,18 @@ class Glib::JsonUi::ViewBuilder
|
|
326
326
|
end
|
327
327
|
end
|
328
328
|
|
329
|
-
class
|
329
|
+
class Table2 < View
|
330
330
|
attr_reader :template
|
331
331
|
|
332
|
-
hash :
|
333
|
-
|
334
|
-
|
335
|
-
action :onLoadRows
|
336
|
-
action :onCellChange
|
337
|
-
|
338
|
-
string :paramNameForFormData
|
339
|
-
|
340
|
-
array :viewHeaders
|
341
|
-
action :onRowSelected
|
332
|
+
hash :nextPage
|
333
|
+
action :onScrollToTop
|
334
|
+
action :onScrollToBottom
|
342
335
|
|
343
336
|
def initialize(json, page)
|
344
337
|
super
|
345
338
|
@template = Glib::JsonUi::TableBuilders::Template.new(json, self)
|
346
339
|
end
|
347
340
|
|
348
|
-
# Experimental
|
349
|
-
panels_builder :accessory, :header, :footer
|
350
|
-
|
351
|
-
def viewCells(values)
|
352
|
-
json.set! 'viewCells' do
|
353
|
-
values.each do |value|
|
354
|
-
value.call(page.view_builder)
|
355
|
-
end
|
356
|
-
end
|
357
|
-
end
|
358
|
-
|
359
341
|
def header(options = {})
|
360
342
|
json.header do
|
361
343
|
json.backgroundColor options.delete(:backgroundColor)
|
@@ -383,6 +365,29 @@ class Glib::JsonUi::ViewBuilder
|
|
383
365
|
|
384
366
|
raise "Invalid properties: #{options.keys}" if options.size > 0
|
385
367
|
end
|
368
|
+
end
|
369
|
+
|
370
|
+
class BulkEdit2 < View
|
371
|
+
hash :import, required: [:submitUrl, :paramName]
|
372
|
+
|
373
|
+
string :statusViewIdPrefix
|
374
|
+
array :viewHeaders
|
375
|
+
|
376
|
+
action :onLoadRows
|
377
|
+
action :onCellChange
|
378
|
+
string :paramNameForFormData
|
379
|
+
action :onRowSelected
|
380
|
+
|
381
|
+
# Experimental
|
382
|
+
panels_builder :accessory, :header, :footer
|
383
|
+
|
384
|
+
def viewCells(values)
|
385
|
+
json.set! 'viewCells' do
|
386
|
+
values.each do |value|
|
387
|
+
value.call(page.view_builder)
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
386
391
|
|
387
392
|
def dataRows(value)
|
388
393
|
json.dataRows value
|
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
|
@@ -1,16 +1,15 @@
|
|
1
|
+
sleep 0.1
|
2
|
+
status_cell = params[:user]['statusCompId']
|
1
3
|
json_ui_response json do |action|
|
2
|
-
action.
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
material: {
|
12
|
-
name: 'verified'
|
13
|
-
}
|
4
|
+
action.components_set \
|
5
|
+
targetId: status_cell,
|
6
|
+
data: {
|
7
|
+
styleClasses: ['success'],
|
8
|
+
material: {
|
9
|
+
name: 'verified'
|
10
|
+
},
|
11
|
+
tooltip: {
|
12
|
+
text: 'Saved'
|
14
13
|
}
|
15
|
-
|
14
|
+
}
|
16
15
|
end
|
@@ -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
|
@@ -45,7 +45,6 @@ page.scroll childViews: ->(scroll) do
|
|
45
45
|
backgroundColor: '#e2e2e2',
|
46
46
|
import: { submitUrl: json_ui_garage_url(path: 'forms/bulk_edit_post2'), paramName: 'user' },
|
47
47
|
viewHeaders: [
|
48
|
-
{ text: '', id: 'status', minWidth: 24 },
|
49
48
|
{ text: 'Month', id: 'month', importable: true },
|
50
49
|
{ text: 'Electricity usage', id: 'electricity_usage', importable: true },
|
51
50
|
{ text: 'Gas usage', id: 'gas_usage', importable: true },
|
@@ -53,19 +52,16 @@ page.scroll childViews: ->(scroll) do
|
|
53
52
|
],
|
54
53
|
viewCells: [
|
55
54
|
->(view) do
|
56
|
-
view.
|
55
|
+
view.fields_number width: 'matchParent'
|
57
56
|
end,
|
58
57
|
->(view) do
|
59
|
-
view.fields_number width:
|
58
|
+
view.fields_number width: 'matchParent'
|
60
59
|
end,
|
61
60
|
->(view) do
|
62
|
-
view.fields_number width:
|
61
|
+
view.fields_number width: 'matchParent'
|
63
62
|
end,
|
64
63
|
->(view) do
|
65
|
-
view.
|
66
|
-
end,
|
67
|
-
->(view) do
|
68
|
-
view.fields_select options: options
|
64
|
+
view.fields_select width: 'matchParent', options: options
|
69
65
|
end
|
70
66
|
],
|
71
67
|
paramNameForFormData: 'message',
|
File without changes
|
File without changes
|
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: ''
|