app_rail-steps 0.2.5 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca74f487f4684642560554261e441d4df0b2eed0ada21e69ed2ac9c71f739fc8
4
- data.tar.gz: cd1aca03335d201619cf3fb4470ec3725d63dbdb626e0d48ede2658f4302bbe1
3
+ metadata.gz: 1d0a2c468bb3b453ff93e93ac803fe9324bf980cc163bd8414671da9a13555b2
4
+ data.tar.gz: 92466c77d31fc18967683165cfed515f4dafcb5fe223fd1b12e13978b1bb89ff
5
5
  SHA512:
6
- metadata.gz: a7679afece3e67d9b261b928885644484fe4af7e66cc9d91c7d5761262f257414919c2d9a18c3284967d7a3e5881715ca15d8e8701ac7c644d650e844ce03155
7
- data.tar.gz: b09961425c5d21e7c134368c745e0cee24eee31fcf6c35eb2d693481bee6585671465cb1b55f845ecdf00d9bd5750269ea2ff4b02b933e1f3703084218672b41
6
+ metadata.gz: e5dc6f5f0cd3dde62e3f75bced4e6f89898979f7e866ded7480393bf38e09eaebe618c6ab4012b49c205b5b8e1abd8f371cb3bd5320a0b4281727974cb532b69
7
+ data.tar.gz: cc025b7a0775e2c4eeedeb46242f243a24146129a08e6d0edf65712037859983a35b0253301b85418742e8edf42ced5df45b6da712e897f4fa8d48a8a52e98a3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-steps (0.2.5)
4
+ app_rail-steps (0.2.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -22,7 +22,22 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ ```ruby
26
+ #require the gem in your script
27
+ require 'app_rail/steps'
28
+
29
+ ...
30
+ #inside your module/class include the displayable modile
31
+ include AppRail::Steps::Displayable
32
+
33
+ ...
34
+ #now you can use the methods from the gem for example:
35
+ def ar_list_item_as_json
36
+ ar_core_list_item(id: self.id, text: self.name, detail_text: self.detail_text)
37
+ end
38
+
39
+
40
+ ```
26
41
 
27
42
  ## Development
28
43
 
@@ -32,7 +47,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
47
 
33
48
  ## Contributing
34
49
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/app_rail-steps.
50
+ Bug reports and pull requests are welcome on GitHub at https://github.com/FutureWorkshops/app_rail-steps.
36
51
 
37
52
  ## License
38
53
 
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AppRail
4
+ module Steps
5
+ module Charts
6
+ module Dashboard
7
+ def ar_charts_dashboard_statistic(id:, title:, text:)
8
+ {
9
+ id: id.to_s,
10
+ chartType: :statistic,
11
+ title: title,
12
+ text: text
13
+ }.compact
14
+ end
15
+
16
+ def ar_charts_dashboard_line_chart(id:, title:, values:, text: nil, footer: nil)
17
+ {
18
+ id: id.to_s,
19
+ chartType: :line,
20
+ title: title,
21
+ text: text,
22
+ footer: footer,
23
+ chartValues: values
24
+ }.compact
25
+ end
26
+
27
+ def ar_charts_dashboard_bar_chart(id:, title:, values:)
28
+ {
29
+ id: id.to_s,
30
+ chartType: :bar,
31
+ title: title,
32
+ chartValues: values
33
+ }.compact
34
+ end
35
+
36
+ def ar_charts_dashboard_bar_pie(id:, title:, values:, light_colors: nil, dark_colors: nil)
37
+ {
38
+ id: id.to_s,
39
+ chartType: :pie,
40
+ title: title,
41
+ chartValues: values,
42
+ chartColors: light_colors,
43
+ chartColorsDark: dark_colors
44
+ }.compact
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -4,9 +4,16 @@ module AppRail
4
4
  module Steps
5
5
  module Core
6
6
  module List
7
- def ar_core_list_item(text:, id: self.id, detail_text: nil, sf_symbol_name: nil, material_icon_name: nil, preview_url: nil)
8
- { id: id, text: text, detailText: detail_text, sfSymbolName: sf_symbol_name,
9
- materialIconName: material_icon_name, imageURL: preview_url }.compact
7
+ def ar_core_list_item(text:, id: self.id, detail_text: nil, section_name: nil, sf_symbol_name: nil, material_icon_name: nil, preview_url: nil)
8
+ {
9
+ id: id,
10
+ text: text,
11
+ detailText: detail_text,
12
+ sectionName: section_name,
13
+ sfSymbolName: sf_symbol_name,
14
+ materialIconName: material_icon_name,
15
+ imageURL: preview_url
16
+ }.compact
10
17
  end
11
18
 
12
19
  def ar_core_list_search_suggestion(text:, section_name:, id: self.id, sf_symbol_name: nil)
@@ -6,6 +6,7 @@ require_relative "core_forms/form"
6
6
  require_relative "maps/map"
7
7
  require_relative "styled_content/grid"
8
8
  require_relative "styled_content/stack"
9
+ require_relative "charts/dashboard"
9
10
 
10
11
  module AppRail
11
12
  module Steps
@@ -16,6 +17,7 @@ module AppRail
16
17
  include Steps::Maps::Map
17
18
  include Steps::StyledContent::Grid
18
19
  include Steps::StyledContent::Stack
20
+ include Steps::Charts::Dashboard
19
21
 
20
22
  BUTTON_STYLES = %i[primary outline danger textOnly].freeze
21
23
  ON_SUCCESS_OPTIONS = %i[none reload backward forward].freeze
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Steps
5
- VERSION = "0.2.5"
5
+ VERSION = "0.2.8"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_rail-steps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-04-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -27,6 +27,7 @@ files:
27
27
  - Rakefile
28
28
  - app_rail-steps.gemspec
29
29
  - lib/app_rail/steps.rb
30
+ - lib/app_rail/steps/charts/dashboard.rb
30
31
  - lib/app_rail/steps/core/list.rb
31
32
  - lib/app_rail/steps/core/stack.rb
32
33
  - lib/app_rail/steps/core_forms/form.rb