applin-rails 0.2.0 → 0.4.0

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: 1f4baaac83d2c5def4823290b5ef402575bb7eb1ee52bc80bb7c8f1ffaea4b4e
4
- data.tar.gz: 16620a1a0ace304554362ac721b083c1487eab83cb6bde26b7ff68b382804376
3
+ metadata.gz: f11a102a56166f3f421fb2c6d0786d5a90da55daa6c615485ae06acecf02b2ed
4
+ data.tar.gz: c1298b70fae23013717056445f5a101c159ab649b994118badf08c473d993e66
5
5
  SHA512:
6
- metadata.gz: 741179d035939f3936c966302d2902c54d402afd09664daad8c2de9298bb875c7d20bb2d3d455766c4e75480f5a4d432b7f9df117a1c7f038f2468f8bed30284
7
- data.tar.gz: f9c61d68b0e09010f4c82ae6100bc321f8cac684c695b56c460c08444b13b1e3ac976c86d050b35191e4d90bd2d5589c0f3552e4103862ad62f236452e402039
6
+ metadata.gz: 2baf2bc186d74f6da057c733f5bede7eeaf04ea1132961bdf3e6a199892a643a265b72b9415ae0b744af4a53cd8c2eed032f9ae6439e6796303c474ddd11c0d2
7
+ data.tar.gz: 6b664c8f4d86b48a5c5cee0b57aac4803e8451d4fc55a3b53cfb44890c0930d62f94e5f655de589877c9d76a9b4a3c292f6a3ef960657f382dedf5344d7e8057
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Applin
4
4
  module Rails
5
- VERSION = "0.2.0"
5
+ VERSION = "0.4.0"
6
6
  end
7
7
  end
data/lib/applin/rails.rb CHANGED
@@ -59,6 +59,7 @@ module Applin
59
59
  { typ: :empty }
60
60
  end
61
61
 
62
+ # The client replaces `${INTERACTIVE_ERROR_DETAILS}` with the text of the last error.
62
63
  def error_text(text)
63
64
  { typ: :error_text, text: text }
64
65
  end
@@ -89,25 +90,6 @@ module Applin
89
90
  { typ: :last_error_text }
90
91
  end
91
92
 
92
- def modal_button(text:, actions:, is_cancel: nil, is_default: nil, is_destructive: nil)
93
- {
94
- typ: :modal_button,
95
- is_cancel: is_cancel,
96
- is_default: is_default,
97
- is_destructive: is_destructive,
98
- text: text,
99
- actions: actions,
100
- }.reject { |_k, v| v.nil? }
101
- end
102
-
103
- def ok_modal_button(is_default: true)
104
- modal_button(text: "OK", is_default: is_default, actions: [pop])
105
- end
106
-
107
- def cancel_modal_button(is_default: false)
108
- modal_button(text: "Cancel", is_default: is_default, actions: [pop])
109
- end
110
-
111
93
  def nav_button(text:, actions:, badge_text: nil, photo_url: nil, sub_text: nil)
112
94
  {
113
95
  typ: :nav_button,
@@ -153,33 +135,12 @@ module Applin
153
135
  }.reject { |_k, v| v.nil? }
154
136
  end
155
137
 
156
- def alert_modal(title:, modal_buttons:, stream: nil, poll_seconds: nil, text: nil)
157
- {
158
- typ: :alert_modal,
159
- stream: stream,
160
- poll_seconds: poll_seconds,
161
- text: text,
162
- title: title,
163
- widgets: modal_buttons
164
- }.reject { |_k, v| v.nil? }
165
- end
166
-
167
- def drawer_modal(title:, modal_buttons:, stream: nil, poll_seconds: nil, text: nil)
168
- {
169
- typ: :drawer_modal,
170
- stream: stream,
171
- poll_seconds: poll_seconds,
172
- text: text,
173
- title: title,
174
- widgets: modal_buttons
175
- }.reject { |_k, v| v.nil? }
176
- end
177
-
178
- def nav_page(title:, start: nil, end_: nil, stream: nil, poll_seconds: nil, &widget_block)
138
+ def nav_page(title:, start: nil, end_: nil, ephemeral: nil, stream: nil, poll_seconds: nil, &widget_block)
179
139
  {
180
140
  typ: :nav_page,
181
141
  start: start,
182
142
  end: end_,
143
+ ephemeral: ephemeral,
183
144
  title: title,
184
145
  stream: stream,
185
146
  poll_seconds: poll_seconds,
@@ -187,10 +148,11 @@ module Applin
187
148
  }.reject { |_k, v| v.nil? }
188
149
  end
189
150
 
190
- def plain_page(title: nil, stream: nil, poll_seconds: nil, &widget_block)
151
+ def plain_page(title: nil, ephemeral: nil, stream: nil, poll_seconds: nil, &widget_block)
191
152
  {
192
153
  typ: :plain_page,
193
154
  title: title,
155
+ ephemeral: ephemeral,
194
156
  stream: stream,
195
157
  poll_seconds: poll_seconds,
196
158
  widget: widget_block.yield
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applin-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Leonhard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-04 00:00:00.000000000 Z
11
+ date: 2023-09-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create mobile apps using only backend code. Applin™ is a Server-Driven
14
14
  UI (SDUI) system.