app_rail-steps 0.2.14 → 0.2.15

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: 9d445a5e54dee368af8a3e60529e8fbdfb596570e3fa2f22105f49d4904f2e0d
4
- data.tar.gz: 2aa02c02a2c8ad24a8341b837ec651c9c94d7249167b18d3cbf5a9b3990c718b
3
+ metadata.gz: 2bfdcaeced0729482cc0d480a64bf28d469610ec4e33d923067e87f8558273b3
4
+ data.tar.gz: 749057b936b9064b26f16110ba656cc0ee05353a265526ace79791ddd71ddd90
5
5
  SHA512:
6
- metadata.gz: 10b575a5c9bb3a0bb688593ebfe25188d32922f8ead46801360ac106df1c39a60bb479a1fa8bcb162299b40839f619e9b1c1f39f0897c9899a791f9bd638d51c
7
- data.tar.gz: 3c54c9bd30824d31d81b8471316cadfcc67135b6f575414644f02bdfa88bf297e13843b13e626b964d7f19faf237fc4b74d90d0df8cc9300d2628620f564ee21
6
+ metadata.gz: c744c7a662b40cd6e7d6bc357b0d911f2c6cd5e964619f08ae1d49920e146fd26188be6d5f35de91a5689a7152e459fb7d098ab20b22f1862f3d266d32de3636
7
+ data.tar.gz: 48ead9c5b33ab0f164e44935a76a9e5f5ce74869b05ca5a6ef37990f8f44eef0642497f62bd47c304cb4d8f8f0c8ca9decf1d8adcec56b89a41e8925024a9de4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-steps (0.2.14)
4
+ app_rail-steps (0.2.15)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -19,15 +19,21 @@ module AppRail
19
19
  }.compact
20
20
  end
21
21
 
22
- def ar_core_stack_image(preview_url:, attachment_url: preview_url, image_style: :full_width, content_mode: :scale_aspect_fill)
22
+ def ar_core_stack_image(
23
+ image_url:,
24
+ full_screen_image_url: nil,
25
+ image_style: :full_width,
26
+ content_mode: :scale_aspect_fill
27
+ )
23
28
  validate_content_mode!(content_mode)
24
29
  validate_image_style!(image_style)
25
30
 
26
31
  {
27
32
  type: :image,
28
33
  contentMode: camelcase_converter(content_mode.to_s, first_letter: :lower),
29
- previewURL: preview_url,
30
- url: attachment_url,
34
+ previewURL: image_url,
35
+ fullScreenImageURL: full_screen_image_url,
36
+ fullScreenImageOnTap: !full_screen_image_url.nil?,
31
37
  imageStyle: camelcase_converter(image_style.to_s, first_letter: :lower)
32
38
  }
33
39
  end
@@ -37,7 +43,7 @@ module AppRail
37
43
  unsplash_id = image_url.split("/").last
38
44
  image_url = "https://source.unsplash.com/#{unsplash_id}/800x600"
39
45
  end
40
- ar_core_stack_image(preview_url: image_url, attachment_url: image_url)
46
+ ar_core_stack_image(image_url: image_url, full_screen_image_url: image_url)
41
47
  end
42
48
 
43
49
  def ar_core_stack_video(preview_url:, attachment_url:)
@@ -5,8 +5,7 @@ require_relative "core/stack"
5
5
  require_relative "core_forms/form"
6
6
  require_relative "core_forms/question"
7
7
  require_relative "maps/map"
8
- require_relative "styled_content/grid"
9
- require_relative "styled_content/stack"
8
+ require_relative "grid/grid"
10
9
  require_relative "charts/dashboard"
11
10
  require_relative "background_location/region"
12
11
 
@@ -18,8 +17,7 @@ module AppRail
18
17
  include Steps::CoreForms::Form
19
18
  include Steps::CoreForms::Question
20
19
  include Steps::Maps::Map
21
- include Steps::StyledContent::Grid
22
- include Steps::StyledContent::Stack
20
+ include Steps::Grid::Grid
23
21
  include Steps::Charts::Dashboard
24
22
  include Steps::BackgroundLocation::Region
25
23
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module AppRail
4
4
  module Steps
5
- module StyledContent
5
+ module Grid
6
6
  module Grid
7
7
  def ar_styled_content_grid_large_section(id:, text:)
8
8
  raise "Missing id" if id.nil?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Steps
5
- VERSION = "0.2.14"
5
+ VERSION = "0.2.15"
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.14
4
+ version: 0.2.15
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-06-25 00:00:00.000000000 Z
11
+ date: 2022-08-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -34,9 +34,8 @@ files:
34
34
  - lib/app_rail/steps/core_forms/form.rb
35
35
  - lib/app_rail/steps/core_forms/question.rb
36
36
  - lib/app_rail/steps/displayable.rb
37
+ - lib/app_rail/steps/grid/grid.rb
37
38
  - lib/app_rail/steps/maps/map.rb
38
- - lib/app_rail/steps/styled_content/grid.rb
39
- - lib/app_rail/steps/styled_content/stack.rb
40
39
  - lib/app_rail/steps/version.rb
41
40
  homepage: https://github.com/FutureWorkshops/app_rail-steps
42
41
  licenses:
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module AppRail
4
- module Steps
5
- module StyledContent
6
- module Stack
7
- BUTTON_STYLES = %i[primary outline danger textOnly].freeze
8
- ON_SUCCESS_OPTIONS = %i[none reload backward forward].freeze
9
-
10
- def ar_styled_content_stack_title(title:)
11
- raise "Missing title" if title.nil?
12
-
13
- { id: id, title: title, type: :title }
14
- end
15
-
16
- def ar_styled_content_stack_text(text:)
17
- raise "Missing text" if text.nil?
18
-
19
- { text: text, type: :text }
20
- end
21
-
22
- def ar_styled_content_stack_list_item(text:, detail_text: nil, preview_url: nil)
23
- raise "Missing text" if text.nil?
24
-
25
- { text: text, detailText: detail_text, type: :listItem, imageURL: preview_url }.compact
26
- end
27
-
28
- # Remove `modal_workflow_name` argument once V1 is no longer being used
29
- 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)
30
- raise "Missing label" if label.nil?
31
-
32
- ar_styled_content_stack_validate_on_success!(on_success)
33
- ar_styled_content_stack_validate_button_style!(style)
34
-
35
- { type: :button, label: label, url: url, method: method, onSuccess: on_success, style: style,
36
- 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
37
- end
38
-
39
- private
40
-
41
- def ar_styled_content_stack_validate_on_success!(on_success)
42
- raise "Unknown on_success action" unless ON_SUCCESS_OPTIONS.include?(on_success)
43
- end
44
-
45
- def ar_styled_content_stack_validate_button_style!(style)
46
- raise "Unknown style" unless BUTTON_STYLES.include?(style)
47
- end
48
- end
49
- end
50
- end
51
- end