app_rail-steps 0.2.12 → 0.2.15

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: 6e97c2e972f41b9e52f0812d393307769cf307d1acd5bf2e45e3a1ce3e96a598
4
- data.tar.gz: 72ae962e677f2b2e9d744df841fed365aa2f5da3ae16baca1c5f6ec8c1d82a3d
3
+ metadata.gz: 2bfdcaeced0729482cc0d480a64bf28d469610ec4e33d923067e87f8558273b3
4
+ data.tar.gz: 749057b936b9064b26f16110ba656cc0ee05353a265526ace79791ddd71ddd90
5
5
  SHA512:
6
- metadata.gz: a68e6fc37e83ae4737fd149b666ca196d85a15858b5070ae439367b162245ed144fd8339183d881570f3c811b4824e2280e1b74bf17bbd4594777a75d7f89526
7
- data.tar.gz: f49f6fb1f1497141cd46efb981dd1a330d6211e3aeb1237508c1e35407a535c720c26c723c186ef0906bcd1785a49745dcdc7c273a7ed569df0104e7eaa1d50f
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.12)
4
+ app_rail-steps (0.2.15)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AppRail
4
+ module Steps
5
+ module BackgroundLocation
6
+ module Region
7
+ def ar_background_location_region(id:, latitude:, longitude:, radius: 100, event: :entryAndExit)
8
+ {
9
+ id: id.to_s,
10
+ latitude: latitude,
11
+ longitude: longitude,
12
+ radius: radius,
13
+ event: event
14
+ }
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -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,9 +5,9 @@ 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"
10
+ require_relative "background_location/region"
11
11
 
12
12
  module AppRail
13
13
  module Steps
@@ -17,9 +17,9 @@ module AppRail
17
17
  include Steps::CoreForms::Form
18
18
  include Steps::CoreForms::Question
19
19
  include Steps::Maps::Map
20
- include Steps::StyledContent::Grid
21
- include Steps::StyledContent::Stack
20
+ include Steps::Grid::Grid
22
21
  include Steps::Charts::Dashboard
22
+ include Steps::BackgroundLocation::Region
23
23
 
24
24
  def camelcase_converter(string, first_letter: :upper)
25
25
  string = string.split("_").map(&:capitalize).join
@@ -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.12"
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.12
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-23 00:00:00.000000000 Z
11
+ date: 2022-08-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -27,15 +27,15 @@ files:
27
27
  - Rakefile
28
28
  - app_rail-steps.gemspec
29
29
  - lib/app_rail/steps.rb
30
+ - lib/app_rail/steps/background_location/region.rb
30
31
  - lib/app_rail/steps/charts/dashboard.rb
31
32
  - lib/app_rail/steps/core/list.rb
32
33
  - lib/app_rail/steps/core/stack.rb
33
34
  - lib/app_rail/steps/core_forms/form.rb
34
35
  - lib/app_rail/steps/core_forms/question.rb
35
36
  - lib/app_rail/steps/displayable.rb
37
+ - lib/app_rail/steps/grid/grid.rb
36
38
  - lib/app_rail/steps/maps/map.rb
37
- - lib/app_rail/steps/styled_content/grid.rb
38
- - lib/app_rail/steps/styled_content/stack.rb
39
39
  - lib/app_rail/steps/version.rb
40
40
  homepage: https://github.com/FutureWorkshops/app_rail-steps
41
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