meta_workflows 0.9.25 → 0.9.26
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: fd258997686745d11bbd71e0e28f56ac2a886920fab2b3e2bd2cb6f51bb81707
|
4
|
+
data.tar.gz: 35ba8f541f70f44f393acdb38b3befd358a49a0075e9b693bf4817683d4857bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b5c3e6290d74842f123d72600ea5b92826086b29085dcc568009d442aca91e1e580883a8cab87fc3c9b4a33757d830944373173fc8da866b69ec82cb0616e80
|
7
|
+
data.tar.gz: 28e92c1cc8c907aedd41325b04093b5188800ca55b9198a6c38beb294f081f268a7aed50830662815787dca7ff096b5891fe34168c5a160aebd1b0a5de124fb7
|
@@ -1,12 +1,25 @@
|
|
1
1
|
import { Controller } from '@hotwired/stimulus';
|
2
2
|
|
3
3
|
export default class extends Controller {
|
4
|
-
static targets = ['form', 'submitButton', 'checkbox'];
|
4
|
+
static targets = ['form', 'submitButton', 'checkbox', 'slider'];
|
5
5
|
|
6
6
|
connect() {
|
7
7
|
this.submitted = false;
|
8
8
|
}
|
9
9
|
|
10
|
+
sliderTargetConnected(slider) {
|
11
|
+
this.updateSliderAria(slider);
|
12
|
+
}
|
13
|
+
|
14
|
+
updateSliderAria(slider) {
|
15
|
+
slider.setAttribute('aria-valuenow', slider.value);
|
16
|
+
slider.setAttribute('aria-valuetext', slider.value);
|
17
|
+
}
|
18
|
+
|
19
|
+
handleSliderChange(event) {
|
20
|
+
this.updateSliderAria(event.target);
|
21
|
+
}
|
22
|
+
|
10
23
|
checkboxTargetConnected() {
|
11
24
|
this.updateSubmitButtonState();
|
12
25
|
}
|
@@ -18,8 +18,9 @@
|
|
18
18
|
step="<%= options['increment'] %>"
|
19
19
|
value="<%= options['min']['value'] %>"
|
20
20
|
class="structured-slider-input"
|
21
|
-
data-
|
22
|
-
|
21
|
+
data-meta-workflows--structured-form-submit-target="slider"
|
22
|
+
data-action="change->meta-workflows--structured-form-submit#handleSubmit input->meta-workflows--structured-form-submit#handleSliderChange"
|
23
|
+
aria-describedby="structured-slider-help"
|
23
24
|
aria-valuemin="<%= options['min']['value'] %>"
|
24
25
|
aria-valuemax="<%= options['max']['value'] %>"
|
25
26
|
aria-valuenow="<%= options['min']['value'] %>"
|
@@ -28,33 +29,6 @@
|
|
28
29
|
>
|
29
30
|
</div>
|
30
31
|
|
31
|
-
<div class="structured-slider-value">
|
32
|
-
<span class="structured-slider-current-value"
|
33
|
-
id="structured-slider-value-display"
|
34
|
-
data-range-display="<%= options['min']['value'] %>"
|
35
|
-
aria-live="polite">
|
36
|
-
<%= options['min']['value'] %>
|
37
|
-
</span>
|
38
|
-
</div>
|
39
32
|
<div id="structured-slider-help" class="sr-only">Use arrow keys to adjust the value</div>
|
40
33
|
</div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<script>
|
44
|
-
// Update the displayed value when slider changes
|
45
|
-
document.addEventListener('DOMContentLoaded', function() {
|
46
|
-
const slider = document.getElementById('range_value');
|
47
|
-
const valueDisplay = document.querySelector('.structured-slider-current-value');
|
48
|
-
|
49
|
-
if (slider && valueDisplay) {
|
50
|
-
slider.addEventListener('input', function() {
|
51
|
-
valueDisplay.textContent = this.value;
|
52
|
-
valueDisplay.setAttribute('data-range-display', this.value);
|
53
|
-
|
54
|
-
// Update ARIA attributes for accessibility
|
55
|
-
slider.setAttribute('aria-valuenow', this.value);
|
56
|
-
slider.setAttribute('aria-valuetext', this.value);
|
57
|
-
});
|
58
|
-
}
|
59
|
-
});
|
60
|
-
</script>
|
34
|
+
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module MetaWorkflows
|
4
4
|
MAJOR = 0
|
5
5
|
MINOR = 9
|
6
|
-
PATCH =
|
6
|
+
PATCH = 26 # this is automatically incremented by the build process
|
7
7
|
|
8
8
|
VERSION = "#{MetaWorkflows::MAJOR}.#{MetaWorkflows::MINOR}.#{MetaWorkflows::PATCH}".freeze
|
9
9
|
end
|