app_rail-steps 0.2.16 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/app_rail/steps/core/stack.rb +10 -2
- data/lib/app_rail/steps/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73b5a80452096f2cd1b120557e985c6a164b6da06d3424e05c6c608a3e28536c
|
4
|
+
data.tar.gz: 4bbebd9fe3a3b4c1d31323b54f419fa2713f0de7b3b334497c7cb280250a861b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f8abdd77ed00ad00fa4c38698b7ff7b54aec99a707b7d141ef0717fe9818d3c95e3d5a7a70f6dabf2d263211942117fdfd9f7f76f595176ec66dd9c611615bc
|
7
|
+
data.tar.gz: 2218b1c391cca6bad40d08d3a03bfb6156ef13755a236ccebc043fd7ee9a67e3b7fb9ade70fcb41fb159ff2b4e260dd20fee96f7da0a2cde9ce339a1032e0603
|
data/Gemfile.lock
CHANGED
@@ -6,12 +6,16 @@ module AppRail
|
|
6
6
|
module Stack
|
7
7
|
CONTENT_MODE_OPTIONS = %i[scale_aspect_fill scale_aspect_fit].freeze
|
8
8
|
IMAGE_STYLE_OPTIONS = %i[full_width profile].freeze
|
9
|
+
TEXT_STYLE_OPTIONS = %i[left large_center].freeze
|
9
10
|
BUTTON_STYLES = %i[primary outline danger].freeze
|
10
11
|
ON_SUCCESS_OPTIONS = %i[none reload backward forward].freeze
|
11
12
|
|
12
|
-
def ar_core_stack_text(text:, label: nil, sf_symbol_name: nil, material_icon_name: nil)
|
13
|
+
def ar_core_stack_text(text:, text_style: :left, label: nil, sf_symbol_name: nil, material_icon_name: nil)
|
14
|
+
validate_text_style!(text_style)
|
15
|
+
|
13
16
|
{
|
14
17
|
type: :text,
|
18
|
+
textStyle: camelcase_converter(text_style.to_s, first_letter: :lower),
|
15
19
|
label: label,
|
16
20
|
text: text.to_s,
|
17
21
|
sfSymbolName: sf_symbol_name,
|
@@ -58,7 +62,7 @@ module AppRail
|
|
58
62
|
materialIconName: material_icon_name }.compact
|
59
63
|
end
|
60
64
|
|
61
|
-
def ar_core_stack_delete_button(url:, label: "Delete", method: :delete, style: :danger, on_success: :backward, confirm_title: "Delete
|
65
|
+
def ar_core_stack_delete_button(url:, label: "Delete", method: :delete, style: :danger, on_success: :backward, confirm_title: "Delete", confirm_text: "Are you sure?", sf_symbol_name: :trash, material_icon_name: :delete)
|
62
66
|
ar_core_stack_validate_on_success!(on_success)
|
63
67
|
ar_core_stack_validate_button_style!(style)
|
64
68
|
|
@@ -122,6 +126,10 @@ module AppRail
|
|
122
126
|
raise "Unknown image_style" unless IMAGE_STYLE_OPTIONS.include?(image_style)
|
123
127
|
end
|
124
128
|
|
129
|
+
def validate_text_style!(text_style)
|
130
|
+
raise "Unknown text_style" unless TEXT_STYLE_OPTIONS.include?(text_style)
|
131
|
+
end
|
132
|
+
|
125
133
|
def ar_core_stack_validate_on_success!(on_success)
|
126
134
|
raise "Unknown on_success action" unless ON_SUCCESS_OPTIONS.include?(on_success)
|
127
135
|
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.
|
4
|
+
version: 0.2.17
|
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-
|
11
|
+
date: 2022-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|