app_rail-steps 0.2.7 → 0.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2d5bad1ddf33cb2a28dd8fb15796f908b637f596e65ba339990abd6e023a37d
4
- data.tar.gz: 1d8608a1a47a3dfae2ab1f2adb641fe91a1958adf1482097daa6519fd093f050
3
+ metadata.gz: d5fba719c7fcaba7cf8b1e18177ce7ec359927de8827208939589d6c6edfb79b
4
+ data.tar.gz: 4031c6d33e27f2644364dd8f89fdd4f1c396ad0e607afeaf9417bfa863a7f772
5
5
  SHA512:
6
- metadata.gz: 8a5bc64794f64cbce9f8804d184562f8f05fccd54e68b4091521ca43955fb294c4fbb7f36e38ee47e92834df7ce204edfec01cd5aa3ab1c7ad1ca124450ba603
7
- data.tar.gz: 4b5f215882c55f047d3fc6053846e70ab8414b86061a51e66afcbaf83015e72cb3680e8ec1a75d0e4b958e9a5f036f45ff50a6d29d642dafd8ee55e0dd58460d
6
+ metadata.gz: 52574338b664bbd3e95607227fb0f3d215685debb49822f688bdd8e5cfef68ba3334b7d43093f554511467c935480d3b0aca6fd8aafaa547e7d8f43447d190e8
7
+ data.tar.gz: 9ff0bd79331d79e5863d57b5729652f06e66b3ba45a3925c3905a99cb722221b25c6af8aac1afec2a9f094f7e9c6c040d177cdce9a61bee0216e104eade0a80b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-steps (0.2.7)
4
+ app_rail-steps (0.2.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,8 +6,8 @@ module AppRail
6
6
  module Dashboard
7
7
  def ar_charts_dashboard_statistic(id:, title:, text:)
8
8
  {
9
- id: id,
10
- chartType: :none,
9
+ id: id.to_s,
10
+ chartType: :statistic,
11
11
  title: title,
12
12
  text: text
13
13
  }.compact
@@ -15,7 +15,7 @@ module AppRail
15
15
 
16
16
  def ar_charts_dashboard_line_chart(id:, title:, values:, text: nil, footer: nil)
17
17
  {
18
- id: id,
18
+ id: id.to_s,
19
19
  chartType: :line,
20
20
  title: title,
21
21
  text: text,
@@ -26,7 +26,7 @@ module AppRail
26
26
 
27
27
  def ar_charts_dashboard_bar_chart(id:, title:, values:)
28
28
  {
29
- id: id,
29
+ id: id.to_s,
30
30
  chartType: :bar,
31
31
  title: title,
32
32
  chartValues: values
@@ -35,7 +35,7 @@ module AppRail
35
35
 
36
36
  def ar_charts_dashboard_bar_pie(id:, title:, values:, light_colors: nil, dark_colors: nil)
37
37
  {
38
- id: id,
38
+ id: id.to_s,
39
39
  chartType: :pie,
40
40
  title: title,
41
41
  chartValues: values,
@@ -5,16 +5,29 @@ module AppRail
5
5
  module Core
6
6
  module Stack
7
7
  CONTENT_MODE_OPTIONS = %i[scale_aspect_fill scale_aspect_fit].freeze
8
-
9
- def ar_core_stack_text(text:, label: nil)
10
- { type: :text, label: label, text: text.to_s }.compact
8
+ IMAGE_STYLE_OPTIONS = %i[full_width profile].freeze
9
+
10
+ def ar_core_stack_text(text:, label: nil, sf_symbol_name: nil, material_icon_name: nil)
11
+ {
12
+ type: :text,
13
+ label: label,
14
+ text: text.to_s,
15
+ sfSymbolName: sf_symbol_name,
16
+ materialIconName: material_icon_name
17
+ }.compact
11
18
  end
12
19
 
13
- def ar_core_stack_image(preview_url:, attachment_url:, content_mode: :scale_aspect_fill)
20
+ def ar_core_stack_image(preview_url:, attachment_url: preview_url, image_style: :full_width, content_mode: :scale_aspect_fill)
14
21
  validate_content_mode!(content_mode)
15
-
16
- { type: :image, contentMode: camelcase_converter(content_mode.to_s, first_letter: :lower),
17
- previewURL: preview_url, url: attachment_url }
22
+ validate_image_style!(image_style)
23
+
24
+ {
25
+ type: :image,
26
+ contentMode: camelcase_converter(content_mode.to_s, first_letter: :lower),
27
+ previewURL: preview_url,
28
+ url: attachment_url,
29
+ imageStyle: camelcase_converter(image_style.to_s, first_letter: :lower)
30
+ }
18
31
  end
19
32
 
20
33
  def ar_core_stack_unsplash_image(image_url)
@@ -22,8 +35,7 @@ module AppRail
22
35
  unsplash_id = image_url.split("/").last
23
36
  image_url = "https://source.unsplash.com/#{unsplash_id}/800x600"
24
37
  end
25
-
26
- { type: :image, previewURL: image_url, url: image_url }.compact
38
+ ar_core_stack_image(preview_url: image_url, attachment_url: image_url)
27
39
  end
28
40
 
29
41
  def ar_core_stack_video(preview_url:, attachment_url:)
@@ -84,8 +96,12 @@ module AppRail
84
96
 
85
97
  private
86
98
 
87
- def validate_content_mode!(on_success)
88
- raise "Unknown content_mode" unless CONTENT_MODE_OPTIONS.include?(on_success)
99
+ def validate_content_mode!(content_mode)
100
+ raise "Unknown content_mode" unless CONTENT_MODE_OPTIONS.include?(content_mode)
101
+ end
102
+
103
+ def validate_image_style!(image_style)
104
+ raise "Unknown image_style" unless IMAGE_STYLE_OPTIONS.include?(image_style)
89
105
  end
90
106
  end
91
107
  end
@@ -4,6 +4,10 @@ module AppRail
4
4
  module Steps
5
5
  module CoreForms
6
6
  module Form
7
+ #
8
+ # MBS - Note - ID on forms should be the value on the customOutput in the app.json for this field
9
+ #
10
+
7
11
  def ar_core_forms_form_section(label:, id:)
8
12
  raise "Missing label" if label.nil?
9
13
  raise "Missing id" if id.nil?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Steps
5
- VERSION = "0.2.7"
5
+ VERSION = "0.2.10"
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.7
4
+ version: 0.2.10
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-22 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: