mobile_workflow 0.6.24 → 0.6.25

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: f9775519f09048d28dd30bf4f4483a469eed3660cea3860d8a24e67de1408799
4
- data.tar.gz: 1d1a5f7c56a128b056e5d7cdb97b0e01c90525b0bb0aeffea409ffa4aecca9c1
3
+ metadata.gz: ae1bb0c8755ec5197bac8c0455063c23d4f1429578ffb8b9a1fed3bf1b1d0f83
4
+ data.tar.gz: d5e0767d6979e9676b8e10ce40d6f037440ff1dd5ebfd0f98fcff558882429e9
5
5
  SHA512:
6
- metadata.gz: c4209f4dd3e731a189da554458c36f06af935e51f5b2b2b52621e9123f4825d14b35c39b42f7a989aa051557db06f3a7edbce2ed43f905397b3bf4254fca30d8
7
- data.tar.gz: c1781869445e2ba3ffb97824a071ad95a0735c9d778062df73e9d063c39f5590cf0a128a60e43fd5fe737bf322efa691e368316c304582f35d7901fd663cdb7b
6
+ metadata.gz: bdf6e9f867aa690d1cf53cf11f8cb54f27ab5eb9ec91fb67f295274314fcd927d7f83576fb2f1c83412dd3df961339560c63e13fbb5edb938df69ca64cf717de
7
+ data.tar.gz: 63b73b9a20107a054950894ebf116d7e0aaed4c042cd9af34e54238a906e9d2e41803c010b62bfe497036d8ed96eb8993450beb8f88c617b415ef7ab2f8b8c07
@@ -45,41 +45,41 @@ module MobileWorkflow
45
45
  {type: :video, previewURL: preview_url(attachment, options: preview_options), url: attachment_url(attachment)}
46
46
  end
47
47
 
48
- def mw_display_button(label:, style: :primary, on_success: :forward)
48
+ def mw_display_button(label:, style: :primary, on_success: :forward, sf_symbol_name: nil, material_icon_name: nil)
49
49
  validate_on_success!(on_success)
50
50
  validate_button_style!(style)
51
51
 
52
- {type: :button, label: label, style: style, onSuccess: on_success}.compact
52
+ {type: :button, label: label, style: style, onSuccess: on_success, sfSymbolName: sf_symbol_name, materialIconName: material_icon_name}.compact
53
53
  end
54
54
 
55
55
  def mw_display_delete_button(url:, label: "Delete", method: :delete, style: :danger, on_success: :backward)
56
56
  validate_on_success!(on_success)
57
57
  validate_button_style!(style)
58
58
 
59
- {type: :button, label: label, url: url, method: method, style: style, onSuccess: on_success}.compact
59
+ {type: :button, label: label, url: url, method: method, style: style, onSuccess: on_success, sfSymbolName: 'trash', materialIconName: 'delete'}.compact
60
60
  end
61
61
 
62
- def mw_display_url_button(label:, url:, method: :put, style: :primary, confirm_title: nil, confirm_text: nil, on_success: :reload)
62
+ def mw_display_url_button(label:, url:, method: :put, style: :primary, confirm_title: nil, confirm_text: nil, on_success: :reload, sf_symbol_name: nil, material_icon_name: nil)
63
63
  validate_on_success!(on_success)
64
64
  validate_button_style!(style)
65
65
 
66
- {type: :button, label: label, url: url, method: method, style: style, confirmTitle: confirm_title, confirmText: confirm_text, onSuccess: on_success}.compact
66
+ {type: :button, label: label, url: url, method: method, style: style, confirmTitle: confirm_title, confirmText: confirm_text, onSuccess: on_success, sfSymbolName: sf_symbol_name, materialIconName: material_icon_name}.compact
67
67
  end
68
68
  alias_method :mw_display_button_for_url, :mw_display_url_button
69
69
 
70
- def mw_display_system_url_button(label:, apple_system_url: nil, android_deep_link: nil, style: :primary)
70
+ def mw_display_system_url_button(label:, apple_system_url: nil, android_deep_link: nil, style: :primary, sf_symbol_name: nil, material_icon_name: nil)
71
71
  validate_button_style!(style)
72
72
  raise 'Invalid android_deep_link' unless android_deep_link.start_with?('http')
73
73
 
74
- {type: :button, label: label, appleSystemURL: apple_system_url, androidDeepLink: android_deep_link, style: style}.compact
74
+ {type: :button, label: label, appleSystemURL: apple_system_url, androidDeepLink: android_deep_link, style: style, sfSymbolName: sf_symbol_name, materialIconName: material_icon_name}.compact
75
75
  end
76
76
  alias_method :mw_display_button_for_system_url, :mw_display_system_url_button
77
77
 
78
- def mw_display_modal_workflow_button(label:, modal_workflow_name:, style: :primary, on_success: :none)
78
+ def mw_display_modal_workflow_button(label:, modal_workflow_name:, style: :primary, on_success: :none, sf_symbol_name: nil, material_icon_name: nil)
79
79
  validate_on_success!(on_success)
80
80
  validate_button_style!(style)
81
81
 
82
- {type: :button, label: label, modalWorkflow: modal_workflow_name, style: style, onSuccess: on_success}.compact
82
+ {type: :button, label: label, modalWorkflow: modal_workflow_name, style: style, onSuccess: on_success, sfSymbolName: sf_symbol_name, materialIconName: material_icon_name}.compact
83
83
  end
84
84
  alias_method :mw_display_button_for_modal_workflow, :mw_display_modal_workflow_button
85
85
 
@@ -106,7 +106,7 @@ module MobileWorkflow
106
106
  { id: id, text: text, type: :smallSection }
107
107
  end
108
108
 
109
- def mw_grid_item(id:, text:, image_attachment: nil)
109
+ def mw_grid_item(id: self.id, text:, image_attachment: nil)
110
110
  raise 'Missing id' if id.nil?
111
111
  raise 'Missing text' if text.nil?
112
112
 
@@ -1,5 +1,5 @@
1
1
  module MobileWorkflow
2
- VERSION = '0.6.24'
2
+ VERSION = '0.6.25'
3
3
  RUBY_VERSION = '2.7.2'
4
4
  RAILS_VERSION = '6.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobile_workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.24
4
+ version: 0.6.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-04 00:00:00.000000000 Z
11
+ date: 2021-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails