glib-web 4.27.2 → 4.28.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/json_ui/action_builder/windows.rb +16 -4
  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 +2 -1
  9. data/app/helpers/glib/json_ui/view_builder.rb +1 -0
  10. data/app/models/glib/active_storage/attachment.rb +0 -0
  11. data/app/models/glib/active_storage/blob.rb +0 -0
  12. data/app/models/glib/dynamic_text_record.rb +0 -0
  13. data/app/models/glib/text.rb +0 -0
  14. data/app/validators/email_typo_validator.rb +0 -0
  15. data/app/validators/email_validator.rb +0 -0
  16. data/app/validators/url_validator.rb +0 -0
  17. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  18. data/app/views/json_ui/garage/actions/sheet_content.json.jbuilder +1 -1
  19. data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +0 -0
  20. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +7 -1
  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 +9 -10
  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 +2 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4a0aab745b5e20c6e9efebab091d0fa40952051e4249658ed27a774efe83107
4
- data.tar.gz: ba637f854bdbf4dace1b57b67af072d681f2b550bdc03934f819cb8a771fdbbf
3
+ metadata.gz: ee8313aa1ae50db85b81497dfa6d47de690106be60c0988f78140c58b4675684
4
+ data.tar.gz: af785896e1910e22e8976d6c704cdafd8526493af8e10c5f277bb39cf0c29dea
5
5
  SHA512:
6
- metadata.gz: 8c8d125cb4cf521513913523de7777c18ff6a48c9088fb64bcb3e762585a0fb16555fe9774ba948d309475483803d614e78d061167283c8016153a1d282b6592
7
- data.tar.gz: d682807a285e9b26bede2348e9553bf518554fbeab9d4c8fec80a28af9b1358b46f04190caf871cc917f52452b1b31a437793e174973d13852066add1a98aeb6
6
+ metadata.gz: 7a74d29938372885d743d1b4fedadff59f09c68b253e3cd02992c474012911226b83393d934ab0844512d9cfdbc1a9fb40c5a6fec2c97d2ea23c9379aa69a5b6
7
+ data.tar.gz: 07f3267385aaf07bf5a1267d8788142d07633377604ccc0ff43c5218e18dceebaefbe5f6cb09f453861429767919999c5c5a3db59536b981bc2b49ee88bb67a6
File without changes
File without changes
@@ -19,20 +19,32 @@ class Glib::JsonUi::ActionBuilder
19
19
  # string :url
20
20
 
21
21
  def url(value, options = {})
22
+ other_host = !!options[:other_host]
22
23
  regex = /\/.+\.json|format=json/
23
24
 
24
- if Rails.env.development? || Rails.env.test?
25
+ if Rails.env.development? || Rails.env.test? && !other_host
25
26
  raise "JSON url detected #{value}" if value.to_s.match?(regex)
26
27
  end
27
28
 
28
- if value.to_s.match?(regex) && Rails.env.production?
29
- # Rollbar.error("JSON url detected #{value}")
30
- value = value.gsub('.json', '')
29
+ if value.to_s.match?(regex) && Rails.env.production? && !other_host
30
+ Rollbar.error("JSON url detected #{value}")
31
+ # value = value.gsub('.json', '')
31
32
  end
32
33
 
33
34
  instance_variable_set('@url', value) if options[:cache]
34
35
  json.set! 'url', value
35
36
  end
37
+
38
+ # private
39
+
40
+ # def same_host?(url)
41
+ # host = URI(url.to_s).host
42
+
43
+ # return true if host == request.host
44
+ # return false unless host.nil?
45
+ # return false unless url.to_s.start_with?("/")
46
+ # !url.to_s.start_with?("//")
47
+ # end
36
48
  end
37
49
 
38
50
  class Reload < Action
File without changes
File without changes
@@ -41,10 +41,11 @@ class Glib::JsonUi::ViewBuilder
41
41
  array :colors
42
42
  string :prefix
43
43
  string :suffix
44
+ bool :formatYAxis
44
45
  int :min
45
46
  int :max
46
47
  # https://www.chartjs.org/docs/latest/configuration/legend.html
47
- 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]
48
49
  hash :plugins, optional: [:datalabels, :centerLabel, :customTooltip]
49
50
  end
50
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
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
@@ -35,6 +35,12 @@ page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', pad
35
35
  action.forms_submit overrideUrl: json_ui_garage_url(path: 'forms/rich_text_preview')
36
36
  end
37
37
 
38
+ avatar = 'https://png.pngtree.com/png-vector/20190710/ourmid/pngtree-user-vector-avatar-png-image_1541962.jpg'
39
+ mention_list = [
40
+ { id: 'johndoe', value: 'johndoe', text: 'John Doe', avatar: avatar, group: 'Programmer' },
41
+ { id: 'budi', value: 'budi', text: 'Budi', avatar: avatar, group: 'Programmer' },
42
+ { id: 'Setiawan', value: 'setiawan', text: 'Setiawan', avatar: avatar, group: 'Desainer' }
43
+ ]
38
44
  column.fields_richText \
39
45
  width: 'matchParent',
40
46
  produce: :markdown,
@@ -43,7 +49,7 @@ page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', pad
43
49
  # value: "<p>Test <img src='{{image1}}'</p>",
44
50
  # value: glib_format_markdown(initial_message),
45
51
  value: initial_message,
46
- mentionList: ['ikhwanh', 'hgani', 'fahmiaga', 'dwirendra', 'nazlifs'],
52
+ mentionList: mention_list,
47
53
  imageUploader: {
48
54
  name: 'user[images_attributes][]',
49
55
  accepts: { fileType: ['image', 'csv', 'xlsx', 'pptx', 'docx'], maxFileSize: 5000 },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -29,13 +29,13 @@ else
29
29
  json.title 'Line 1'
30
30
 
31
31
  points = {
32
- 'Sat, 10 Nov 2018' => 1,
33
- 'Sun, 11 Nov 2018' => 7,
34
- 'Mon, 12 Nov 2018' => 2,
32
+ 'Sat, 10 Nov 2018' => 1000000,
33
+ 'Sun, 11 Nov 2018' => 700000,
34
+ 'Mon, 12 Nov 2018' => 20000,
35
35
  'Tue, 13 Nov 2018' => 0,
36
- 'Wed, 14 Nov 2018' => 1,
37
- 'Thu, 15 Nov 2018' => 1,
38
- 'Fri, 16 Nov 2018' => 5,
36
+ 'Wed, 14 Nov 2018' => 1000,
37
+ 'Thu, 15 Nov 2018' => 100000,
38
+ 'Fri, 16 Nov 2018' => 50000,
39
39
  }
40
40
  json.points points.map { |k, v| { x: k, y: v, label: v > 5 ? 'Greater than five' : v } }
41
41
  end,
@@ -55,7 +55,7 @@ else
55
55
  end
56
56
  ],
57
57
  plugins: default_plugins,
58
- colors: ['#79AC78', '#3085C3'], legend: { display: false }
58
+ colors: ['#79AC78', '#3085C3'], legend: { display: false }, formatYAxis: true
59
59
 
60
60
  # scroll.spacer height: 20
61
61
  # scroll.h1 text: 'Line chart using remote data'
@@ -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: [
@@ -173,7 +173,6 @@ else
173
173
  plugins[:datalabels][:formatType] = 'label'
174
174
  scroll.h2 text: 'Pie chart'
175
175
  scroll.charts_pie \
176
- legend: { display: false },
177
176
  colors: ['#fc5a8d', '#F5E216'],
178
177
  plugins: plugins,
179
178
  dataPoints: [{ title: 'Strawberry', value: 25, label: '❤ Strawberry' }, { title: 'Banana', value: 75, label: '❤ Banana' }], legend: { display: false }
@@ -198,7 +197,7 @@ else
198
197
  }
199
198
  }),
200
199
  dataPoints: [{ title: 'Strawberry', value: 25 }, { title: 'Banana', value: 75 }],
201
- legend: { position: 'right' }
200
+ legend: { position: 'right', override: true }
202
201
 
203
202
  scroll.h2 text: 'Area chart'
204
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.27.2
4
+ version: 4.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -412,8 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
412
412
  - !ruby/object:Gem::Version
413
413
  version: '0'
414
414
  requirements: []
415
- rubyforge_project:
416
- rubygems_version: 2.7.6
415
+ rubygems_version: 3.4.6
417
416
  signing_key:
418
417
  specification_version: 4
419
418
  summary: ''