glib-web 3.19.2 → 3.20.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/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/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +12 -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/_sheets.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/chip_group.json.jbuilder +27 -0
- 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/index.json.jbuilder +3 -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/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/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/lifecycle_hooks.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/links.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/crypt/utils.rb +0 -0
- data/lib/glib/crypt.rb +0 -0
- data/lib/glib/direct_uploads_controller.rb +24 -0
- data/lib/glib/dynamic_text/config.rb +0 -0
- data/lib/glib/dynamic_text.rb +0 -0
- data/lib/glib/engine.rb +5 -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/json_crawler.rb +0 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- data/lib/glib-web.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: f7d54630cdd25d883da692e88f98d775f50718d1b0f9edb5ce1bef914044883a
|
|
4
|
+
data.tar.gz: a1c732849861960b1822ba8ae7ff72d237e0206c7e90780b3f3e36a9ca0cdae0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88f51b200e02d93754093488d74ccaae5a21cc2deb8ad80801bb21db2a3353301b209de2163a50200a0568867650ca5e24a2c467d4e127464ba504f9dcbbab7c
|
|
7
|
+
data.tar.gz: b5dbf27b9c38e17d22d359f5845704fc5ac6a11ab612fd2feebee2d9271ef38d241824dcf21c8776039cfc3070b8ab8816825f1bdf781bfe9d001b28ac0ca9c8
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,6 +2,8 @@ class Glib::JsonUi::ViewBuilder
|
|
|
2
2
|
module Fields
|
|
3
3
|
|
|
4
4
|
class AbstractField < View
|
|
5
|
+
include Rails.application.routes.url_helpers
|
|
6
|
+
|
|
5
7
|
bool :readOnly
|
|
6
8
|
bool :disabled
|
|
7
9
|
hash :validation
|
|
@@ -9,6 +11,10 @@ class Glib::JsonUi::ViewBuilder
|
|
|
9
11
|
action :onChange
|
|
10
12
|
string :paramNameForFormData
|
|
11
13
|
|
|
14
|
+
def default_url_options
|
|
15
|
+
{ only_path: true }
|
|
16
|
+
end
|
|
17
|
+
|
|
12
18
|
def label(label)
|
|
13
19
|
@label = label
|
|
14
20
|
end
|
|
@@ -179,6 +185,11 @@ class Glib::JsonUi::ViewBuilder
|
|
|
179
185
|
panels_builder :accessory, :header, :footer
|
|
180
186
|
end
|
|
181
187
|
|
|
188
|
+
class ChipGroup < AbstractField
|
|
189
|
+
array :options
|
|
190
|
+
bool :multiple
|
|
191
|
+
end
|
|
192
|
+
|
|
182
193
|
class TimeZone < AbstractField
|
|
183
194
|
include Glib::EnumHelper
|
|
184
195
|
|
|
@@ -347,7 +358,7 @@ class Glib::JsonUi::ViewBuilder
|
|
|
347
358
|
# association = form.nested_associations.last
|
|
348
359
|
# context = association || form
|
|
349
360
|
|
|
350
|
-
@files ||= context.field_value(@prop, collect_ids: false).to_a.map { |file| { name: file.blob&.filename, signed_id: file.signed_id } }
|
|
361
|
+
@files ||= context.field_value(@prop, collect_ids: false).to_a.map { |file| { name: file.blob&.filename, signed_id: file.signed_id, url: url_for(file) } }
|
|
351
362
|
end
|
|
352
363
|
|
|
353
364
|
json.files @files if @files.present?
|
|
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
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
json.title 'Forms'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
|
5
|
+
|
|
6
|
+
options = [{ text: 'Option 1', value: 'option_1' }, { text: 'Option 2', value: 'option_2' }, { text: 'Option 3', value: 'option_3' }, { text: 'Option 4', value: 'option_4' }]
|
|
7
|
+
|
|
8
|
+
page.form \
|
|
9
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
10
|
+
method: 'post',
|
|
11
|
+
padding: glib_json_padding_body,
|
|
12
|
+
childViews: ->(form) do
|
|
13
|
+
|
|
14
|
+
form.spacer height: 20
|
|
15
|
+
|
|
16
|
+
form.h2 text: 'Simple'
|
|
17
|
+
form.fields_chipGroup name: 'user[chip_group1]', options: options, value: ['option_2']
|
|
18
|
+
|
|
19
|
+
form.h2 text: 'Multiple'
|
|
20
|
+
form.fields_chipGroup multiple: true, name: 'user[chip_group2][]', options: options, value: ['option_3', 'option_1']
|
|
21
|
+
|
|
22
|
+
form.h2 text: 'onChange'
|
|
23
|
+
form.fields_chipGroup name: 'user[chip_group3]', options: options, value: ['option_4'], onChange: ->(action) { action.snackbars_alert message: 'change!' }
|
|
24
|
+
|
|
25
|
+
form.spacer height: 20
|
|
26
|
+
form.fields_submit text: 'Submit'
|
|
27
|
+
end
|
|
File without changes
|
|
File without changes
|
|
@@ -87,6 +87,9 @@ page.list sections: [
|
|
|
87
87
|
template.thumbnail title: 'OTP Field', onClick: ->(action) do
|
|
88
88
|
action.windows_open url: json_ui_garage_url(path: 'forms/otp_field')
|
|
89
89
|
end
|
|
90
|
+
template.thumbnail title: 'Chip group', onClick: ->(action) do
|
|
91
|
+
action.windows_open url: json_ui_garage_url(path: 'forms/chip_group')
|
|
92
|
+
end
|
|
90
93
|
end
|
|
91
94
|
end, ->(section) do
|
|
92
95
|
section.header padding: glib_json_padding_list, childViews: ->(header) 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
|
|
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/crypt/utils.rb
CHANGED
|
File without changes
|
data/lib/glib/crypt.rb
CHANGED
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
::ActiveStorage::DirectUploadsController.class_eval do
|
|
2
|
+
# include Rails.application.routes.url_helpers
|
|
3
|
+
before_action :authenticate_user!
|
|
4
|
+
|
|
5
|
+
rescue_from StandardError do
|
|
6
|
+
render json: { message: 'Upload failed' }, status: 500
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
rescue_from Glib::Auth::Policy::UnauthorizedError do
|
|
10
|
+
render json: { message: 'Forbidden' }, status: 403
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
rescue_from ActionController::InvalidAuthenticityToken do
|
|
14
|
+
render json: { message: 'Session expired. Please refresh page' }, status: 401
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def authenticate_user!
|
|
18
|
+
current_user.present? ? nil : raise_error
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def raise_error
|
|
22
|
+
raise Glib::Auth::Policy::UnauthorizedError
|
|
23
|
+
end
|
|
24
|
+
end
|
|
File without changes
|
data/lib/glib/dynamic_text.rb
CHANGED
|
File without changes
|
data/lib/glib/engine.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/glib/json_crawler.rb
CHANGED
|
File without changes
|
data/lib/glib/value.rb
CHANGED
|
File without changes
|
data/lib/glib/version.rb
CHANGED
|
File without changes
|
data/lib/glib-web.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: 3.
|
|
4
|
+
version: 3.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -160,6 +160,7 @@ files:
|
|
|
160
160
|
- app/views/json_ui/garage/forms/basic.json.jbuilder
|
|
161
161
|
- app/views/json_ui/garage/forms/basic_post.json.jbuilder
|
|
162
162
|
- app/views/json_ui/garage/forms/checkboxes.json.jbuilder
|
|
163
|
+
- app/views/json_ui/garage/forms/chip_group.json.jbuilder
|
|
163
164
|
- app/views/json_ui/garage/forms/conditional_value.json.jbuilder
|
|
164
165
|
- app/views/json_ui/garage/forms/dialogs_close.json.jbuilder
|
|
165
166
|
- app/views/json_ui/garage/forms/dialogs_update.json.jbuilder
|
|
@@ -290,6 +291,7 @@ files:
|
|
|
290
291
|
- lib/glib-web.rb
|
|
291
292
|
- lib/glib/crypt.rb
|
|
292
293
|
- lib/glib/crypt/utils.rb
|
|
294
|
+
- lib/glib/direct_uploads_controller.rb
|
|
293
295
|
- lib/glib/dynamic_text.rb
|
|
294
296
|
- lib/glib/dynamic_text/config.rb
|
|
295
297
|
- lib/glib/engine.rb
|
|
@@ -329,8 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
329
331
|
- !ruby/object:Gem::Version
|
|
330
332
|
version: '0'
|
|
331
333
|
requirements: []
|
|
332
|
-
|
|
333
|
-
rubygems_version: 2.7.6
|
|
334
|
+
rubygems_version: 3.4.6
|
|
334
335
|
signing_key:
|
|
335
336
|
specification_version: 4
|
|
336
337
|
summary: ''
|