app_rail-steps 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/app_rail/steps/charts/dashboard.rb +49 -0
- data/lib/app_rail/steps/displayable.rb +2 -0
- data/lib/app_rail/steps/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2d5bad1ddf33cb2a28dd8fb15796f908b637f596e65ba339990abd6e023a37d
|
4
|
+
data.tar.gz: 1d8608a1a47a3dfae2ab1f2adb641fe91a1958adf1482097daa6519fd093f050
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a5bc64794f64cbce9f8804d184562f8f05fccd54e68b4091521ca43955fb294c4fbb7f36e38ee47e92834df7ce204edfec01cd5aa3ab1c7ad1ca124450ba603
|
7
|
+
data.tar.gz: 4b5f215882c55f047d3fc6053846e70ab8414b86061a51e66afcbaf83015e72cb3680e8ec1a75d0e4b958e9a5f036f45ff50a6d29d642dafd8ee55e0dd58460d
|
data/Gemfile.lock
CHANGED
@@ -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,
|
10
|
+
chartType: :none,
|
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,
|
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,
|
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,
|
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
|
@@ -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
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_rail-steps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brooke-Smith
|
@@ -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
|