glib-web 4.27.3 → 4.29.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/enum_helper.rb +3 -3
- 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/charts.rb +1 -1
- data/app/helpers/glib/json_ui/view_builder.rb +1 -0
- data/app/models/concerns/glib/enum_humanization.rb +8 -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/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/actions/sheet_content.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/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/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/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/charts.json.jbuilder +2 -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/progress.json.jbuilder +5 -1
- 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 +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a07fbc8b0073fa52868b3e79f133568487d2b16c230f8b93481992d61dab930
|
4
|
+
data.tar.gz: c949b616ab4a3e7f774d5fc21b1e9046c5f653e62c4ce5b25d619b96e54d701d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eca316a8bf2e3694f4f023a785bb6c15f20168d1f4a61335cb9645e095c17f91073a8d918589c23e663d253187c34232bf965ec3ccd977f2c592ea22e4d96ea2
|
7
|
+
data.tar.gz: 2215d6aaf581273cb6a5672d8baa73c4f79b8aa360bc24938d8953c7d2bbd965ce8c2e8284d1846ed7381103d1df4eb5111b7e15852e2232d202a4fb595ea7f0
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Glib
|
2
2
|
module EnumHelper
|
3
|
-
def glib_enum_options(clazz, enum_field, keys: nil, hint_suffix: false, hint_subtitle: false)
|
3
|
+
def glib_enum_options(clazz, enum_field, keys: nil, hint_suffix: false, hint_subtitle: false, i18n_args: {})
|
4
4
|
enum_name = enum_field.to_s
|
5
5
|
keys ||= clazz.defined_enums[enum_name].keys
|
6
6
|
keys.map do |i|
|
7
|
-
text = clazz.glib_enum_humanize(enum_field, i, hint_suffix: hint_suffix)
|
7
|
+
text = clazz.glib_enum_humanize(enum_field, i, hint_suffix: hint_suffix, i18n_args: i18n_args)
|
8
8
|
option = { text: text, value: i }
|
9
|
-
if hint_subtitle && (hint = clazz.glib_enum_hint(enum_field, i))
|
9
|
+
if hint_subtitle && (hint = clazz.glib_enum_hint(enum_field, i, i18n_args: i18n_args))
|
10
10
|
option[:subtitle] = hint
|
11
11
|
end
|
12
12
|
option
|
File without changes
|
File without changes
|
@@ -45,7 +45,7 @@ class Glib::JsonUi::ViewBuilder
|
|
45
45
|
int :min
|
46
46
|
int :max
|
47
47
|
# https://www.chartjs.org/docs/latest/configuration/legend.html
|
48
|
-
hash :legend, optional: [:position, :align, :display, :maxHeight, :maxWidth, :fullSize, :reverse, :labels, :rtl, :title]
|
48
|
+
hash :legend, optional: [:position, :align, :display, :maxHeight, :maxWidth, :fullSize, :reverse, :labels, :rtl, :title, :override]
|
49
49
|
hash :plugins, optional: [:datalabels, :centerLabel, :customTooltip]
|
50
50
|
end
|
51
51
|
end
|
@@ -11,23 +11,23 @@ module Glib
|
|
11
11
|
extend ClassMethods
|
12
12
|
end
|
13
13
|
|
14
|
-
def glib_enum_humanize(enum_name, default_enum_value = nil, hint_suffix: false)
|
15
|
-
self.class.glib_enum_humanize(enum_name, send(enum_name) || default_enum_value, hint_suffix: hint_suffix)
|
14
|
+
def glib_enum_humanize(enum_name, default_enum_value = nil, hint_suffix: false, i18n_args: {})
|
15
|
+
self.class.glib_enum_humanize(enum_name, send(enum_name) || default_enum_value, hint_suffix: hint_suffix, i18n_args: i18n_args)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
19
|
module ClassMethods
|
20
|
-
def glib_enum_humanize(enum_name, enum_value, default_translation = nil, hint_suffix: false)
|
20
|
+
def glib_enum_humanize(enum_name, enum_value, default_translation = nil, hint_suffix: false, i18n_args: {})
|
21
21
|
if enum_value
|
22
22
|
translation_key = "activerecord.attributes.#{model_name.i18n_key}.#{enum_name.to_s.pluralize}.#{enum_value}"
|
23
23
|
|
24
24
|
if default_translation.nil? && (Rails.env.development? || Rails.env.test?)
|
25
|
-
text = I18n.t(translation_key, raise: I18n::MissingTranslationData)
|
25
|
+
text = I18n.t(translation_key, **i18n_args.merge(raise: I18n::MissingTranslationData))
|
26
26
|
else
|
27
|
-
text = I18n.t(translation_key, default: default_translation)
|
27
|
+
text = I18n.t(translation_key, **i18n_args.merge(default: default_translation))
|
28
28
|
end
|
29
29
|
|
30
|
-
if hint_suffix && (hint = glib_enum_hint(enum_name, enum_value))
|
30
|
+
if hint_suffix && (hint = glib_enum_hint(enum_name, enum_value, i18n_args: i18n_args))
|
31
31
|
text += " #{hint}"
|
32
32
|
end
|
33
33
|
|
@@ -35,9 +35,9 @@ module Glib
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
def glib_enum_hint(enum_name, enum_value)
|
38
|
+
def glib_enum_hint(enum_name, enum_value, i18n_args: {})
|
39
39
|
i18n_key = self.model_name.i18n_key
|
40
|
-
if (hint = I18n.t("dt_models.#{i18n_key}.#{enum_name.to_s.pluralize}.#{enum_value}.hint")).present?
|
40
|
+
if (hint = I18n.t("dt_models.#{i18n_key}.#{enum_name.to_s.pluralize}.#{enum_value}.hint", **i18n_args)).present?
|
41
41
|
# text += " #{hint}"
|
42
42
|
return hint
|
43
43
|
end
|
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
|
@@ -2,7 +2,7 @@ page = json_ui_page json
|
|
2
2
|
|
3
3
|
page.body childViews: ->(body) do
|
4
4
|
body.panels_responsive padding: { all: 16 }, childViews: ->(res) do
|
5
|
-
res.
|
5
|
+
res.fields_richText value: "<p>#{DateTime.current.to_fs(:rfc822)}</p><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>"
|
6
6
|
res.spacer height: 8
|
7
7
|
res.button text: 'close', onClick: ->(action) do
|
8
8
|
action.sheets_close onClose: ->(saction) 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
|
@@ -136,7 +136,7 @@ else
|
|
136
136
|
end
|
137
137
|
],
|
138
138
|
plugins: default_plugins,
|
139
|
-
colors: ['
|
139
|
+
colors: ['#7A71F4', '#53B3E4', 'skyblue'], legend: { override: true }
|
140
140
|
|
141
141
|
scroll.h2 text: 'Column chart (Stacked)'
|
142
142
|
scroll.charts_column stacked: true, dataGroups: [
|
@@ -197,7 +197,7 @@ else
|
|
197
197
|
}
|
198
198
|
}),
|
199
199
|
dataPoints: [{ title: 'Strawberry', value: 25 }, { title: 'Banana', value: 75 }],
|
200
|
-
legend: { position: 'right' }
|
200
|
+
legend: { position: 'right', override: true }
|
201
201
|
|
202
202
|
scroll.h2 text: 'Area chart'
|
203
203
|
scroll.charts_area \
|
File without changes
|
File without changes
|
@@ -32,5 +32,9 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
32
32
|
|
33
33
|
scroll.h2 text: 'Progress circle'
|
34
34
|
scroll.spacer height: 6
|
35
|
-
scroll.progressCircle size: 150, value: 35,
|
35
|
+
scroll.progressCircle size: 150, value: 35, width: 25, color: '#272551'
|
36
|
+
|
37
|
+
scroll.h2 text: 'Half Progress circle'
|
38
|
+
scroll.spacer height: 6
|
39
|
+
scroll.progressCircle size: 250, width: 35, value: 80, text: 'Section A Score', color: '#9E0A0A', half: true
|
36
40
|
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
|
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,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glib-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-10-04 00:00:00.000000000 Z
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email: ''
|
99
99
|
executables: []
|
100
100
|
extensions: []
|
@@ -394,10 +394,10 @@ files:
|
|
394
394
|
- lib/glib/value.rb
|
395
395
|
- lib/glib/version.rb
|
396
396
|
- lib/tasks/db.rake
|
397
|
-
homepage:
|
397
|
+
homepage:
|
398
398
|
licenses: []
|
399
399
|
metadata: {}
|
400
|
-
post_install_message:
|
400
|
+
post_install_message:
|
401
401
|
rdoc_options: []
|
402
402
|
require_paths:
|
403
403
|
- lib
|
@@ -412,8 +412,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
412
412
|
- !ruby/object:Gem::Version
|
413
413
|
version: '0'
|
414
414
|
requirements: []
|
415
|
-
|
416
|
-
|
415
|
+
rubyforge_project:
|
416
|
+
rubygems_version: 2.7.6
|
417
|
+
signing_key:
|
417
418
|
specification_version: 4
|
418
419
|
summary: ''
|
419
420
|
test_files: []
|