easy_flow 0.28.0 → 0.29.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: 6c3f5410fc5f056129c38c8538226461dd426e932bf267d6116bc6c07ad872d1
4
- data.tar.gz: 19221f96eb57398266925771014571f69aeb155bbfab9a3bb55b45dc2401175c
3
+ metadata.gz: 4d11aace68065c41e6dd5d4d50767cdc6d5e224e15322c89d9959833139899fd
4
+ data.tar.gz: 8cf1a63a9a663af9dbb957c282aeaefdf07d7f134da77d438ba778098393a9db
5
5
  SHA512:
6
- metadata.gz: 9786ee8c6b473f189f062870851305bc16ec2031586ea6eb4833cc792558a0efd3b5aa88e4da23ba913fba30e73dfa7c84e3d25ce6132ead745712e9c1cc1c46
7
- data.tar.gz: 89d01cd446c018ae52a86932c8235c77f49ca92de1e65aef00570b9b81511e604a7bcb569df50ce618976a66fcb2a624e3209ac397e17e8920980de00be118f2
6
+ metadata.gz: 430fe7a11551604b377887c4a9d1727c7d387507ab029645f30e8224ded37d51dfc063491fd2e0d8a9ad0e5f74021626f992806b118e8b64f6910f2c09cac405
7
+ data.tar.gz: 8d9d009b14007b81ae2515f967f3ec451d9d4a6bd7894015c3b1d4f145d351d67e15abb5c4ea20404b9129944e90cc64bc99d2475e7f09f1f13a2ae507634dbd
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="space-y-3">
5
5
  <% step.choices.each do |choice| %>
6
- <%= ui_radio_card(name: "answers[#{step.id}]", value: choice.value, label: choice.label.presence || choice.value, hint: choice.hint, info: choice.info) %>
6
+ <%= ui_radio_card(name: "answers[#{step.id}]", value: choice.value, label: choice.label.presence || choice.value, hint: choice.hint, info: choice.info, checked: choice.value == local_assigns[:chosen]) %>
7
7
  <% end %>
8
8
  </div>
9
9
  </fieldset>
@@ -4,7 +4,7 @@
4
4
  <%= hidden_field_tag "answers[#{step.id}][]", "", id: nil %>
5
5
  <div class="space-y-3">
6
6
  <% step.choices.each do |choice| %>
7
- <%= ui_checkbox_row(name: "answers[#{step.id}][]", value: choice.value, label: choice.label.presence || choice.value, info: choice.info) %>
7
+ <%= ui_checkbox_row(name: "answers[#{step.id}][]", value: choice.value, label: choice.label.presence || choice.value, info: choice.info, checked: Array(local_assigns[:chosen]).include?(choice.value)) %>
8
8
  <% end %>
9
9
  </div>
10
10
  </fieldset>
@@ -1,4 +1,4 @@
1
1
  <label class="block">
2
2
  <span class="ks-section-title mb-5 block text-xl font-semibold leading-snug"><%= step.text %></span>
3
- <%= ui_input(name: "answers[#{step.id}]") %>
3
+ <%= ui_input(name: "answers[#{step.id}]", value: local_assigns[:chosen]) %>
4
4
  </label>
@@ -1,3 +1,3 @@
1
1
  module EasyFlow
2
- VERSION = "0.28.0"
2
+ VERSION = "0.29.0"
3
3
  end
@@ -49,7 +49,7 @@ easy_flow declares no commands of its own for this local. Its surface is split b
49
49
  - **Canvas** — the admin screen where steps are added, configured, moved, removed and connected, with undo and redo. Publishing happens there.
50
50
  - **Preview** — an admin walking the current flow without starting a stored run.
51
51
  - **Step type** — what a kind of step is: its display name, its settings (the fields an admin fills in), its outputs (the values it records), and whether it waits for the visitor, acts on its own, or waits for something outside the flow. A step that acts on its own may record a value worked out from the answers so far, pick which connection to follow, or both.
52
- - **Display** — what a step type hands the visitor's page to draw a step, such as its question text and its answers. A step type may build its display from the step alone, or from the step and the visitor's stored run, so the same step can show something different to each visitor. There is no stored run in an admin's preview or in a flow that carries its answers in the page, and the display is then built without one.
52
+ - **Display** — what a step type hands the visitor's page to draw a step, such as its question text and its answers. A step type may build its display from the step alone, or from the step and the visitor's stored run, so the same step can show something different to each visitor. There is no stored run in an admin's preview or in a flow that carries its answers in the page, and the display is then built without one. A host can draw a single-choice, multiple-select or fill-in-the-blank step with an answer already chosen by passing it as `chosen`, and the step is drawn blank when none is passed.
53
53
  - **Answer check** — a rule a step type may carry that looks at a visitor's answer and, when the answer is not acceptable, returns the message the visitor sees. A step type with no such rule accepts every answer.
54
54
  - **Setting** — one field an admin fills in when configuring a step on the canvas. It is text, a whole number, a decimal, a yes or no, a pick from a list, several picks from a list, an earlier step, an earlier step's output, another flow of the same host, or a list of entries that each hold their own fields. A setting can be required, limited to a number of picks, or checked by a rule the step type supplies.
55
55
  - **Options** — the values a pick-from-a-list setting offers. They are either a fixed list written into the step type, or a lookup the app provides that is read each time the canvas or a save asks for them, so they can come from the app's own data. A saved value that is not among the options is refused.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider