applin-rails 0.1.0 → 0.3.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: 71496dc04565f772229aed6620f06fc3811dde1c27e79cbbaf633ab29ae0b68e
4
- data.tar.gz: 2ad83dab974f051d2a9f4e2786c2443a16440a3bb755925acb7bdb15a6dd8608
3
+ metadata.gz: e64c63b6f647ff2e598f682a66638b81e123f642c64f4f5cec4cf89f445c6470
4
+ data.tar.gz: 5c69c16af63397070fae5f84afb1070a0de060c7e476773c968008ac12f4f2e3
5
5
  SHA512:
6
- metadata.gz: ac763ea0188317507869791364a8fe36db1afe2608fc0518b51f308443e711f58cdc3e28d5965109dee438a83d69dace4cb0a331f639becf6b08c47689079dea
7
- data.tar.gz: 502953b3f347a3b5f31d2085c321ecfddfb0263ec7bbe8f279f70448b6095e250189790b164b59635d7a7c488c574f3e90295a424acbb0e42095aea53ef31477
6
+ metadata.gz: 6fdc1d5adc9dd1880c7f88250212957ee1b5cf11ff24f6b8fb4148bb96acc680eb2b7ceabab395aa59a464ec4c422d09ff48f33e656ae3b05bcb403f53677811
7
+ data.tar.gz: 1b79b5bf3c291997f0aebca32753907ffe4871a569a9f1f8baadc048550d70ac5069256f75500652d182445a327c86b40aea7d9172f317df01f168b512f1da5c
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Applin
4
4
  module Rails
5
- VERSION = "0.1.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
data/lib/applin/rails.rb CHANGED
@@ -12,6 +12,9 @@ end
12
12
 
13
13
  module Applin
14
14
  module Rails
15
+ ALIGN_CENTER = "center"
16
+ ALIGN_END = "end"
17
+ ALIGN_START = "start"
15
18
  ALLOW_ALL = "all"
16
19
  ALLOW_ASCII = "ascii"
17
20
  ALLOW_EMAIL = "email"
@@ -37,18 +40,19 @@ module Applin
37
40
  { typ: :button, text: text, actions: actions }
38
41
  end
39
42
 
40
- def checkbox(text:, var_name:, actions: nil, initial_bool: nil)
43
+ def checkbox(text:, var_name:, actions: nil, initial_bool: nil, rpc: nil)
41
44
  {
42
45
  typ: :checkbox,
43
46
  actions: actions,
44
47
  initial_bool: initial_bool,
48
+ rpc: rpc,
45
49
  text: text,
46
50
  var_name: var_name,
47
51
  }.reject { |_k, v| v.nil? }
48
52
  end
49
53
 
50
- def column(widgets:, alignment: nil, spacing: nil)
51
- { typ: :column, alignment: alignment, spacing: spacing, widgets: widgets }.reject { |_k, v| v.nil? }
54
+ def column(widgets:, align: nil, spacing: nil)
55
+ { typ: :column, align: align, spacing: spacing, widgets: widgets }.reject { |_k, v| v.nil? }
52
56
  end
53
57
 
54
58
  def empty
@@ -63,8 +67,8 @@ module Applin
63
67
  { typ: :form, widgets: widgets }
64
68
  end
65
69
 
66
- def form_button(text:, actions:, alignment: nil)
67
- { typ: :form_button, alignment: alignment, text: text, actions: actions }.reject { |_k, v| v.nil? }
70
+ def form_button(text:, actions:, align: nil)
71
+ { typ: :form_button, align: align, text: text, actions: actions }.reject { |_k, v| v.nil? }
68
72
  end
69
73
 
70
74
  def form_section(widgets:, title: nil)
@@ -85,17 +89,6 @@ module Applin
85
89
  { typ: :last_error_text }
86
90
  end
87
91
 
88
- def modal_button(text:, actions:, is_cancel: nil, is_default: nil, is_destructive: nil)
89
- {
90
- typ: :modal_button,
91
- is_cancel: is_cancel,
92
- is_default: is_default,
93
- is_destructive: is_destructive,
94
- text: text,
95
- actions: actions,
96
- }.reject { |_k, v| v.nil? }
97
- end
98
-
99
92
  def nav_button(text:, actions:, badge_text: nil, photo_url: nil, sub_text: nil)
100
93
  {
101
94
  typ: :nav_button,
@@ -141,31 +134,9 @@ module Applin
141
134
  }.reject { |_k, v| v.nil? }
142
135
  end
143
136
 
144
- def alert_modal(title:, modal_buttons:, stream: nil, poll_seconds: nil, text: nil)
145
- {
146
- typ: :alert_modal,
147
- stream: stream,
148
- poll_seconds: poll_seconds,
149
- text: text,
150
- title: title,
151
- modal_buttons: modal_buttons
152
- }.reject { |_k, v| v.nil? }
153
- end
154
-
155
- def drawer_modal(title:, modal_buttons:, stream: nil, poll_seconds: nil, text: nil)
156
- {
157
- typ: :drawer_modal,
158
- stream: stream,
159
- poll_seconds: poll_seconds,
160
- text: text,
161
- title: title,
162
- modal_buttons: modal_buttons
163
- }.reject { |_k, v| v.nil? }
164
- end
165
-
166
137
  def nav_page(title:, start: nil, end_: nil, stream: nil, poll_seconds: nil, &widget_block)
167
138
  {
168
- typ: :plain_page,
139
+ typ: :nav_page,
169
140
  start: start,
170
141
  end: end_,
171
142
  title: title,
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.1.0
4
+ version: 0.3.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-01 00:00:00.000000000 Z
11
+ date: 2023-09-10 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.