meta_workflows 0.9.33 → 0.9.35
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 +4 -4
- data/app/assets/javascripts/meta_workflows/controllers/lexi_form_submit_controller.js +2 -2
- data/app/assets/javascripts/meta_workflows/controllers/tray_controller.js +74 -29
- data/app/assets/stylesheets/meta_workflows/application.css +1 -1
- data/lib/meta_workflows/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fc32552e17235232a36f30cb278b377560b1062503c1bc97aa3fd1c1176565d
|
4
|
+
data.tar.gz: 35ccadac9b9b89610f8955b54ae7d0221706848c0927cfcb467f2aba3229cfb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6df6283dcc5b758912dd82225db2a1d22dbcc8933301112396d6deaa1199bafc9bcaa48c17b8c91f647b1b3e705c6f6b75ca75e4462600068845c85f9c738447
|
7
|
+
data.tar.gz: 6b763b871857e8f0411e917e9a20075398d6a014fdb0e903ba0409c9f389a94ac84990533e2598d6f76d6eb557e1f9374fec32ad4a4a25d3e55043263d8a9773
|
@@ -23,8 +23,8 @@ export default class extends Controller {
|
|
23
23
|
return;
|
24
24
|
}
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
const hasStructuredSelections = this.structuredInputTargets.length > 0 &&
|
27
|
+
this.structuredInputTargets.some(input =>
|
28
28
|
input.checked || (input.type === 'range' && input.value !== input.min)
|
29
29
|
);
|
30
30
|
|
@@ -19,22 +19,24 @@ function chevronDirection(tray, expanded) {
|
|
19
19
|
}
|
20
20
|
|
21
21
|
export default class extends Controller {
|
22
|
-
static
|
23
|
-
static targets = ["content", "chevron"]
|
22
|
+
static targets = ["content", "chevron", "gammaTray", "betaTray", "deltaTray"]
|
24
23
|
|
25
24
|
connect() {
|
25
|
+
const trayName = this.getTrayName();
|
26
|
+
|
26
27
|
// Load state from cookies
|
27
|
-
const savedState = getCookie(`tray_${
|
28
|
+
const savedState = getCookie(`tray_${trayName}`);
|
28
29
|
if (savedState === "collapsed") {
|
29
30
|
this.expanded = false;
|
30
31
|
} else {
|
31
32
|
this.expanded = true;
|
32
33
|
}
|
33
34
|
this.updateTray();
|
35
|
+
|
34
36
|
// Set chevron direction from cookie if present
|
35
37
|
const chevron = this.hasChevronTarget ? this.chevronTarget : null;
|
36
38
|
if (chevron) {
|
37
|
-
const chevronCookie = getCookie(`chevron_${
|
39
|
+
const chevronCookie = getCookie(`chevron_${trayName}`);
|
38
40
|
if (chevronCookie) {
|
39
41
|
chevron.classList.remove("fa-chevron-left", "fa-chevron-right", "fa-chevron-up", "fa-chevron-down");
|
40
42
|
chevron.classList.add(chevronCookie);
|
@@ -42,65 +44,108 @@ export default class extends Controller {
|
|
42
44
|
}
|
43
45
|
}
|
44
46
|
|
45
|
-
toggle() {
|
47
|
+
toggle(trayType = null) {
|
48
|
+
if (!trayType) {
|
49
|
+
trayType = this.getTrayName();
|
50
|
+
}
|
51
|
+
|
52
|
+
const trayTargetName = `${trayType}TrayTarget`;
|
53
|
+
const hasTrayTarget = `has${trayType.charAt(0).toUpperCase() + trayType.slice(1)}TrayTarget`;
|
54
|
+
|
55
|
+
if (!this[hasTrayTarget]) {
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
|
46
59
|
this.expanded = !this.expanded;
|
47
|
-
|
48
|
-
setCookie(`tray_${
|
49
|
-
|
50
|
-
|
51
|
-
|
60
|
+
|
61
|
+
setCookie(`tray_${trayType}`, this.expanded ? "expanded" : "collapsed");
|
62
|
+
setCookie(`chevron_${trayType}`, chevronDirection(trayType, this.expanded));
|
63
|
+
|
64
|
+
const updateMethod = `update${trayType.charAt(0).toUpperCase() + trayType.slice(1)}Tray`;
|
65
|
+
this[updateMethod](this.hasChevronTarget, this[trayTargetName]);
|
66
|
+
}
|
67
|
+
|
68
|
+
toggleGamma() {
|
69
|
+
this.toggle("gamma");
|
70
|
+
}
|
71
|
+
|
72
|
+
toggleBeta() {
|
73
|
+
this.toggle("beta");
|
74
|
+
}
|
75
|
+
|
76
|
+
toggleDelta() {
|
77
|
+
this.toggle("delta");
|
78
|
+
}
|
79
|
+
|
80
|
+
getTrayName() {
|
81
|
+
if (this.hasGammaTrayTarget) return "gamma";
|
82
|
+
if (this.hasBetaTrayTarget) return "beta";
|
83
|
+
if (this.hasDeltaTrayTarget) return "delta";
|
84
|
+
return "unknown";
|
85
|
+
}
|
86
|
+
|
87
|
+
getCurrentTrayElement() {
|
88
|
+
if (this.hasGammaTrayTarget) return this.gammaTrayTarget;
|
89
|
+
if (this.hasBetaTrayTarget) return this.betaTrayTarget;
|
90
|
+
if (this.hasDeltaTrayTarget) return this.deltaTrayTarget;
|
91
|
+
return this.element;
|
52
92
|
}
|
53
93
|
|
54
94
|
updateTray() {
|
95
|
+
const trayName = this.getTrayName();
|
55
96
|
const hasChevron = this.hasChevronTarget;
|
97
|
+
const trayElement = this.getCurrentTrayElement();
|
56
98
|
|
57
|
-
switch (
|
99
|
+
switch (trayName) {
|
58
100
|
case "delta":
|
59
|
-
this.updateDeltaTray(hasChevron);
|
101
|
+
this.updateDeltaTray(hasChevron, trayElement);
|
60
102
|
break;
|
61
103
|
case "beta":
|
62
|
-
this.updateBetaTray(hasChevron);
|
104
|
+
this.updateBetaTray(hasChevron, trayElement);
|
63
105
|
break;
|
64
106
|
case "gamma":
|
65
|
-
this.updateGammaTray(hasChevron);
|
107
|
+
this.updateGammaTray(hasChevron, trayElement);
|
66
108
|
break;
|
67
109
|
}
|
68
110
|
}
|
69
111
|
|
70
|
-
updateDeltaTray(hasChevron) {
|
112
|
+
updateDeltaTray(hasChevron, trayElement) {
|
71
113
|
if (this.expanded) {
|
72
|
-
|
73
|
-
|
114
|
+
trayElement.classList.remove("collapsed");
|
115
|
+
trayElement.classList.add("h-[200px]");
|
74
116
|
this.updateChevronClasses(hasChevron, "fa-chevron-up", "fa-chevron-down");
|
75
117
|
} else {
|
76
|
-
|
77
|
-
|
118
|
+
trayElement.classList.remove("h-[200px]");
|
119
|
+
trayElement.classList.add("collapsed");
|
78
120
|
this.updateChevronClasses(hasChevron, "fa-chevron-down", "fa-chevron-up");
|
79
121
|
}
|
80
122
|
}
|
81
123
|
|
82
|
-
updateBetaTray(hasChevron) {
|
124
|
+
updateBetaTray(hasChevron, trayElement) {
|
83
125
|
// Beta: open=left, collapsed=right
|
84
126
|
if (this.expanded) {
|
85
|
-
|
86
|
-
|
127
|
+
trayElement.classList.remove("collapsed");
|
128
|
+
trayElement.classList.add("w-[300px]");
|
87
129
|
this.updateChevronClasses(hasChevron, "fa-chevron-right", "fa-chevron-left");
|
88
130
|
} else {
|
89
|
-
|
90
|
-
|
131
|
+
trayElement.classList.remove("w-[300px]");
|
132
|
+
trayElement.classList.add("collapsed");
|
91
133
|
this.updateChevronClasses(hasChevron, "fa-chevron-left", "fa-chevron-right");
|
92
134
|
}
|
93
135
|
}
|
94
136
|
|
95
|
-
updateGammaTray(hasChevron) {
|
137
|
+
updateGammaTray(hasChevron, trayElement) {
|
138
|
+
console.log(`Updating gamma tray - expanded: ${this.expanded}`);
|
96
139
|
// Gamma: open=right, collapsed=left
|
97
140
|
if (this.expanded) {
|
98
|
-
|
99
|
-
|
141
|
+
console.log('Expanding gamma tray');
|
142
|
+
trayElement.classList.remove("collapsed");
|
143
|
+
trayElement.classList.add("w-[300px]");
|
100
144
|
this.updateChevronClasses(hasChevron, "fa-chevron-left", "fa-chevron-right");
|
101
145
|
} else {
|
102
|
-
|
103
|
-
|
146
|
+
console.log('Collapsing gamma tray');
|
147
|
+
trayElement.classList.remove("w-[300px]");
|
148
|
+
trayElement.classList.add("collapsed");
|
104
149
|
this.updateChevronClasses(hasChevron, "fa-chevron-right", "fa-chevron-left");
|
105
150
|
}
|
106
151
|
}
|
@@ -653,7 +653,7 @@
|
|
653
653
|
|
654
654
|
/* Hide standard collapse button when Lexi tray is collapsed */
|
655
655
|
.gamma-tray.lexi-tray.collapsed
|
656
|
-
> button[data-action='click->tray#
|
656
|
+
> button[data-action='click->tray#toggleGamma']:not(.lexi-floating-avatar) {
|
657
657
|
display: none;
|
658
658
|
}
|
659
659
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module MetaWorkflows
|
4
4
|
MAJOR = 0
|
5
5
|
MINOR = 9
|
6
|
-
PATCH =
|
6
|
+
PATCH = 35 # this is automatically incremented by the build process
|
7
7
|
|
8
8
|
VERSION = "#{MetaWorkflows::MAJOR}.#{MetaWorkflows::MINOR}.#{MetaWorkflows::PATCH}".freeze
|
9
9
|
end
|