mobile_workflow 0.8.9 → 0.9.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 948c45e0602fe9441f2cd0c79e4b4141c9ed357b9489ca7f3f1af599ea370c66
|
4
|
+
data.tar.gz: c84792530d7b0c02a05cc6e6d253e1464e7edea71b4f00e66d290d3a45221ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ffd490ac6e267a073cf45c54eeb9226dbf9b2ddc0402a00c923f6e25b38cfdd8345805ed429a8aa1e5c09ee7c368869146387e45c7f3da336931d6f38db06ed
|
7
|
+
data.tar.gz: 58fafb2c69f7562fe3ea2d09226e6459b0eaac2d3056a8f0590aa69b29a7078c22b6287266b283869b00adebbec790149d62f681a9ed64e26553ca0adbd53132
|
@@ -1,70 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
|
1
4
|
module MobileWorkflow
|
2
5
|
module Displayable
|
3
6
|
module Steps
|
4
7
|
module Form
|
5
|
-
def mw_form_section(label:,
|
8
|
+
def mw_form_section(label:, id:)
|
6
9
|
raise 'Missing label' if label.nil?
|
7
|
-
raise 'Missing
|
8
|
-
|
9
|
-
{ item_type: :section,
|
10
|
+
raise 'Missing id' if id.nil?
|
11
|
+
|
12
|
+
{ item_type: :section, id: id, label: label }
|
10
13
|
end
|
11
|
-
|
12
|
-
def mw_form_multiple_selection(label:,
|
14
|
+
|
15
|
+
def mw_form_multiple_selection(label:, multiple_selection_options:, id:, selection_type: :single, optional: false, show_other_option: false)
|
13
16
|
raise 'Missing label' if label.nil?
|
14
|
-
raise 'Missing
|
17
|
+
raise 'Missing id' if id.nil?
|
15
18
|
raise 'Missing multiple selection options' if multiple_selection_options.nil?
|
16
|
-
|
17
|
-
{ item_type: :multiple_selection,
|
19
|
+
|
20
|
+
{ item_type: :multiple_selection, id: id, label: label,
|
21
|
+
multiple_selection_options: multiple_selection_options, selection_type: selection_type, optional: optional, show_other_option: show_other_option }
|
18
22
|
end
|
19
|
-
|
23
|
+
|
20
24
|
def mw_form_multiple_selection_options(text:, hint: nil, is_pre_selected: false)
|
21
25
|
raise 'Missing text' if text.nil?
|
22
|
-
|
26
|
+
|
23
27
|
{ text: text, hint: hint, isPreSelected: is_pre_selected }
|
24
28
|
end
|
25
|
-
|
26
|
-
def mw_form_number(label:,
|
29
|
+
|
30
|
+
def mw_form_number(label:, id:, placeholder: nil, optional: false, symbol_position: :leading, default_text_answer: nil, hint: nil)
|
27
31
|
raise 'Missing label' if label.nil?
|
28
|
-
raise 'Missing
|
29
|
-
|
30
|
-
{ item_type: :number, number_type: :number,
|
32
|
+
raise 'Missing id' if id.nil?
|
33
|
+
|
34
|
+
{ item_type: :number, number_type: :number, id: id, label: label,
|
35
|
+
placeholder: placeholder, optional: optional, symbol_position: symbol_position, default_text_answer: default_text_answer, hint: hint }
|
31
36
|
end
|
32
|
-
|
33
|
-
def mw_form_text(label:,
|
37
|
+
|
38
|
+
def mw_form_text(label:, id:, placeholder: nil, optional: false, multiline: false, default_text_answer: nil)
|
34
39
|
raise 'Missing label' if label.nil?
|
35
|
-
raise 'Missing
|
36
|
-
|
37
|
-
{ item_type: :text,
|
40
|
+
raise 'Missing id' if id.nil?
|
41
|
+
|
42
|
+
{ item_type: :text, id: id, label: label, placeholder: placeholder,
|
43
|
+
optional: optional, multiline: multiline, default_text_answer: default_text_answer }
|
38
44
|
end
|
39
|
-
|
40
|
-
def mw_form_date(label:,
|
45
|
+
|
46
|
+
def mw_form_date(label:, id:, optional: false, default_text_answer: nil)
|
41
47
|
raise 'Missing label' if label.nil?
|
42
|
-
raise 'Missing
|
43
|
-
|
44
|
-
{ item_type: :date, date_type: :calendar,
|
48
|
+
raise 'Missing id' if id.nil?
|
49
|
+
|
50
|
+
{ item_type: :date, date_type: :calendar, id: id, label: label, optional: optional,
|
51
|
+
default_text_answer: default_text_answer }
|
45
52
|
end
|
46
|
-
|
47
|
-
def mw_form_time(label:,
|
53
|
+
|
54
|
+
def mw_form_time(label:, id:, optional: false, default_text_answer: nil)
|
48
55
|
raise 'Missing label' if label.nil?
|
49
|
-
raise 'Missing
|
50
|
-
|
51
|
-
{ item_type: :time,
|
56
|
+
raise 'Missing id' if id.nil?
|
57
|
+
|
58
|
+
{ item_type: :time, id: id, label: label, optional: optional,
|
59
|
+
default_text_answer: default_text_answer }
|
52
60
|
end
|
53
|
-
|
54
|
-
def mw_form_email(label:,
|
61
|
+
|
62
|
+
def mw_form_email(label:, id:, placeholder: nil, optional: false, default_text_answer: nil)
|
55
63
|
raise 'Missing label' if label.nil?
|
56
|
-
raise 'Missing
|
57
|
-
|
58
|
-
{ item_type: :email,
|
64
|
+
raise 'Missing id' if id.nil?
|
65
|
+
|
66
|
+
{ item_type: :email, id: id, label: label, placeholder: placeholder,
|
67
|
+
optional: optional, default_text_answer: default_text_answer }
|
59
68
|
end
|
60
|
-
|
61
|
-
def mw_form_password(label:,
|
69
|
+
|
70
|
+
def mw_form_password(label:, id:, placeholder: nil, optional: false, default_text_answer: nil, hint: nil)
|
62
71
|
raise 'Missing label' if label.nil?
|
63
|
-
raise 'Missing
|
64
|
-
|
65
|
-
{ item_type: :secure,
|
72
|
+
raise 'Missing id' if id.nil?
|
73
|
+
|
74
|
+
{ item_type: :secure, id: id, label: label, placeholder: placeholder,
|
75
|
+
optional: optional, default_text_answer: default_text_answer, hint: hint }
|
66
76
|
end
|
67
77
|
end
|
68
78
|
end
|
69
79
|
end
|
70
|
-
end
|
80
|
+
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.
|
4
|
+
version: 0.9.0
|
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: 2022-
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|