app_rail-steps 0.2.4 → 0.2.5

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: 7eec3b376b102a4001550f293763e044c96cc0031cc42f5cefdbc960824be46a
4
- data.tar.gz: b1de751d8d17653b2c3d42d117325e8b3339b02374881c2dcd515eb7081a0dc6
3
+ metadata.gz: ca74f487f4684642560554261e441d4df0b2eed0ada21e69ed2ac9c71f739fc8
4
+ data.tar.gz: cd1aca03335d201619cf3fb4470ec3725d63dbdb626e0d48ede2658f4302bbe1
5
5
  SHA512:
6
- metadata.gz: dfbdce5969408464b564756c18c7f4603d9a23b926d884328f2184aa0e1ee7e4cbd4509121c35a34dd77eba1efce3a36d25dc2aadf9fd48238352d4956e9fe5e
7
- data.tar.gz: 8eef9412eec72784ea95026c94934f0744a70546e80662f6126c419817b17d09c7c8cbbbea66762a2e508729d093e92b032513998a25c07a5e90568ffc0f334d
6
+ metadata.gz: a7679afece3e67d9b261b928885644484fe4af7e66cc9d91c7d5761262f257414919c2d9a18c3284967d7a3e5881715ca15d8e8701ac7c644d650e844ce03155
7
+ data.tar.gz: b09961425c5d21e7c134368c745e0cee24eee31fcf6c35eb2d693481bee6585671465cb1b55f845ecdf00d9bd5750269ea2ff4b02b933e1f3703084218672b41
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-steps (0.2.4)
4
+ app_rail-steps (0.2.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -4,6 +4,8 @@ require_relative "core/list"
4
4
  require_relative "core/stack"
5
5
  require_relative "core_forms/form"
6
6
  require_relative "maps/map"
7
+ require_relative "styled_content/grid"
8
+ require_relative "styled_content/stack"
7
9
 
8
10
  module AppRail
9
11
  module Steps
@@ -12,6 +14,8 @@ module AppRail
12
14
  include Steps::Core::Stack
13
15
  include Steps::CoreForms::Form
14
16
  include Steps::Maps::Map
17
+ include Steps::StyledContent::Grid
18
+ include Steps::StyledContent::Stack
15
19
 
16
20
  BUTTON_STYLES = %i[primary outline danger textOnly].freeze
17
21
  ON_SUCCESS_OPTIONS = %i[none reload backward forward].freeze
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AppRail
4
+ module Steps
5
+ module StyledContent
6
+ module Grid
7
+ def ar_styled_content_grid_large_section(id:, text:)
8
+ raise "Missing id" if id.nil?
9
+ raise "Missing text" if text.nil?
10
+
11
+ { id: id, text: text, type: :largeSection }
12
+ end
13
+
14
+ def ar_styled_content_grid_small_section(id:, text:)
15
+ raise "Missing id" if id.nil?
16
+ raise "Missing text" if text.nil?
17
+
18
+ { id: id, text: text, type: :smallSection }
19
+ end
20
+
21
+ def ar_styled_content_grid_item(text:, id: self.id, detail_text: nil, preview_url: nil)
22
+ raise "Missing id" if id.nil?
23
+ raise "Missing text" if text.nil?
24
+
25
+ { id: id, text: text, type: :item, detailText: detail_text, imageURL: preview_url }.compact
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AppRail
4
+ module Steps
5
+ module StyledContent
6
+ module Stack
7
+ def ar_styled_content_stack_title(title:)
8
+ raise "Missing title" if title.nil?
9
+
10
+ { id: id, title: title, type: :title }
11
+ end
12
+
13
+ def ar_styled_content_stack_text(text:)
14
+ raise "Missing text" if text.nil?
15
+
16
+ { text: text, type: :text }
17
+ end
18
+
19
+ def ar_styled_content_stack_list_item(text:, detail_text: nil, preview_url: nil)
20
+ raise "Missing text" if text.nil?
21
+
22
+ { text: text, detailText: detail_text, type: :listItem, imageURL: preview_url }.compact
23
+ end
24
+
25
+ # Remove `modal_workflow_name` argument once V1 is no longer being used
26
+ def ar_styled_content_stack_button(label:, url: nil, method: :nil, on_success: :none, style: :primary, modal_workflow_name: nil, link_id: nil, link_url: nil, sf_symbol_name: nil, apple_system_url: nil, android_deep_link: nil, confirm_title: nil, confirm_text: nil, share_text: nil, share_image_url: nil)
27
+ raise "Missing label" if label.nil?
28
+
29
+ validate_on_success!(on_success)
30
+ validate_button_style!(style)
31
+
32
+ { type: :button, label: label, url: url, method: method, onSuccess: on_success, style: style,
33
+ modalWorkflow: modal_workflow_name, linkId: link_id, linkURL: link_url, sfSymbolName: sf_symbol_name, appleSystemURL: apple_system_url, androidDeepLink: android_deep_link, confirmTitle: confirm_title, confirmText: confirm_text, shareText: share_text, shareImageURL: share_image_url }.compact
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Steps
5
- VERSION = "0.2.4"
5
+ VERSION = "0.2.5"
6
6
  end
7
7
  end
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
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
@@ -32,6 +32,8 @@ files:
32
32
  - lib/app_rail/steps/core_forms/form.rb
33
33
  - lib/app_rail/steps/displayable.rb
34
34
  - lib/app_rail/steps/maps/map.rb
35
+ - lib/app_rail/steps/styled_content/grid.rb
36
+ - lib/app_rail/steps/styled_content/stack.rb
35
37
  - lib/app_rail/steps/version.rb
36
38
  homepage: https://github.com/FutureWorkshops/app_rail-steps
37
39
  licenses: