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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
  3. data/app/helpers/glib/app_feature_support_helper.rb +0 -0
  4. data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
  5. data/app/helpers/glib/enum_helper.rb +3 -3
  6. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  7. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  8. data/app/helpers/glib/json_ui/view_builder/charts.rb +1 -1
  9. data/app/helpers/glib/json_ui/view_builder.rb +1 -0
  10. data/app/models/concerns/glib/enum_humanization.rb +8 -8
  11. data/app/models/glib/active_storage/attachment.rb +0 -0
  12. data/app/models/glib/active_storage/blob.rb +0 -0
  13. data/app/models/glib/dynamic_text_record.rb +0 -0
  14. data/app/models/glib/text.rb +0 -0
  15. data/app/validators/email_typo_validator.rb +0 -0
  16. data/app/validators/email_validator.rb +0 -0
  17. data/app/validators/url_validator.rb +0 -0
  18. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  19. data/app/views/json_ui/garage/actions/sheet_content.json.jbuilder +1 -1
  20. data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  22. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  23. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/views/charts.json.jbuilder +2 -2
  53. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/views/progress.json.jbuilder +5 -1
  56. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  57. data/lib/generators/glib/install_generator.rb +0 -0
  58. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  59. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  60. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  61. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  62. data/lib/generators/templates/database.yml +0 -0
  63. data/lib/generators/templates/dynamic_text.rb +0 -0
  64. data/lib/glib/dynamic_text/config.rb +0 -0
  65. data/lib/glib/dynamic_text.rb +0 -0
  66. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  67. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  68. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  69. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  70. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  71. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  72. data/lib/glib/json_crawler/coverage.rb +0 -0
  73. data/lib/glib/value.rb +0 -0
  74. data/lib/glib/version.rb +0 -0
  75. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 487e158495266c1b750d920c00fb564c5769a0b639a1e0d0d5c24e6bebacf2e4
4
- data.tar.gz: 2aa552aab47063a06e104e919db4810070222c115313b5a41435684a3a078388
3
+ metadata.gz: 0a07fbc8b0073fa52868b3e79f133568487d2b16c230f8b93481992d61dab930
4
+ data.tar.gz: c949b616ab4a3e7f774d5fc21b1e9046c5f653e62c4ce5b25d619b96e54d701d
5
5
  SHA512:
6
- metadata.gz: 14effb4ee6956ed11a6a43cf38d6df7d8ff04026e42f97147b0fd5869469a7fd618cb65b4f6262f4709ae0cd7cbdd329339a6d34a7b0c9f23044ec71758acef2
7
- data.tar.gz: 9fe27e7f70c616537b6aaf940bfc55e915755124cac8a141e9450a5c7e679d38e848399b72437119c50b333c3269635f3a39dc4a7220d007597fc7101184448b
6
+ metadata.gz: eca316a8bf2e3694f4f023a785bb6c15f20168d1f4a61335cb9645e095c17f91073a8d918589c23e663d253187c34232bf965ec3ccd977f2c592ea22e4d96ea2
7
+ data.tar.gz: 2215d6aaf581273cb6a5672d8baa73c4f79b8aa360bc24938d8953c7d2bbd965ce8c2e8284d1846ed7381103d1df4eb5111b7e15852e2232d202a4fb595ea7f0
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
@@ -332,6 +332,7 @@ module Glib
332
332
  color :color
333
333
  string :text
334
334
  bool :indeterminate
335
+ bool :half
335
336
  end
336
337
 
337
338
  class ShareButton < View
@@ -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
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.p text: "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."
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
@@ -136,7 +136,7 @@ else
136
136
  end
137
137
  ],
138
138
  plugins: default_plugins,
139
- colors: ['lightgreen', 'whitesmoke', 'skyblue'], legend: { position: 'left' }
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 \
@@ -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, text: '35%', width: 25, color: '#272551'
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
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.27.3
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
- rubygems_version: 3.4.6
416
- signing_key:
415
+ rubyforge_project:
416
+ rubygems_version: 2.7.6
417
+ signing_key:
417
418
  specification_version: 4
418
419
  summary: ''
419
420
  test_files: []