avo 1.22.1.pre.1 → 1.22.1.pre.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -4
- data/app/assets/builds/avo.js +21 -16
- data/app/assets/builds/avo.js.map +2 -2
- data/app/components/avo/fields/belongs_to_field/autocomplete_component.rb +19 -19
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +10 -9
- data/app/components/avo/fields/select_field/edit_component.html.erb +3 -3
- data/app/controllers/avo/base_controller.rb +1 -0
- data/app/controllers/avo/relations_controller.rb +1 -4
- data/app/javascript/avo.js +1 -0
- data/app/javascript/js/controllers/fields/belongs_to_field_controller.js +20 -22
- data/app/views/avo/partials/_turbo_frame_wrap.html.erb +1 -1
- data/app/views/avo/relations/new.html.erb +1 -1
- data/db/factories.rb +3 -3
- data/lib/avo/fields/base_field.rb +7 -4
- data/lib/avo/fields/belongs_to_field.rb +92 -11
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.js +21 -16
- data/public/avo-assets/avo.js.map +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f3877093b6d069865155c2f545765fbf70abec721d0795e87894979c80c29a6
|
4
|
+
data.tar.gz: c7df311af825024a23ee29dadf8e2ee427a7e6ba162ef3e7d29d419164afcc23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94fab6c8ddef7e55d5c2f659c3ffecec573839a25d4171c389355b677b92ff922ad1ffe5d5bd2c907bcabddaaa5b1696572f315588cebc28702a94d844dd959d
|
7
|
+
data.tar.gz: d813448938980e0f16f62dc5bf9688da849849b8f2e3b141b9fcb27dc098bf0128fabffb8d35faca9b01f6831aca92d0d585e6a69c639d09299f991907ac757d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
avo (1.22.1.pre.
|
4
|
+
avo (1.22.1.pre.2)
|
5
5
|
active_link_to
|
6
6
|
addressable
|
7
7
|
breadcrumbs_on_rails
|
@@ -215,7 +215,7 @@ GEM
|
|
215
215
|
mime-types-data (3.2022.0105)
|
216
216
|
mini_magick (4.11.0)
|
217
217
|
mini_mime (1.1.2)
|
218
|
-
mini_portile2 (2.
|
218
|
+
mini_portile2 (2.8.0)
|
219
219
|
minitest (5.15.0)
|
220
220
|
msgpack (1.4.4)
|
221
221
|
multi_xml (0.6.0)
|
@@ -227,8 +227,10 @@ GEM
|
|
227
227
|
net-protocol
|
228
228
|
timeout
|
229
229
|
nio4r (2.5.8)
|
230
|
-
nokogiri (1.13.
|
231
|
-
mini_portile2 (~> 2.
|
230
|
+
nokogiri (1.13.3)
|
231
|
+
mini_portile2 (~> 2.8.0)
|
232
|
+
racc (~> 1.4)
|
233
|
+
nokogiri (1.13.3-x86_64-linux)
|
232
234
|
racc (~> 1.4)
|
233
235
|
orm_adapter (0.5.0)
|
234
236
|
pagy (5.10.1)
|
data/app/assets/builds/avo.js
CHANGED
@@ -81101,22 +81101,18 @@
|
|
81101
81101
|
const { type } = target.dataset;
|
81102
81102
|
if (this.isSearchable) {
|
81103
81103
|
const textInput = target.querySelector('input[type="text"]');
|
81104
|
-
if (textInput)
|
81105
|
-
|
81106
|
-
}
|
81104
|
+
if (textInput)
|
81105
|
+
this.nameToValidName(textInput);
|
81107
81106
|
const hiddenInput = target.querySelector('input[type="hidden"]');
|
81108
|
-
if (hiddenInput)
|
81109
|
-
|
81110
|
-
}
|
81107
|
+
if (hiddenInput)
|
81108
|
+
this.nameToValidName(hiddenInput);
|
81111
81109
|
} else {
|
81112
81110
|
const select = target.querySelector("select");
|
81113
|
-
if (select)
|
81114
|
-
|
81115
|
-
}
|
81111
|
+
if (select)
|
81112
|
+
this.nameToValidName(select);
|
81116
81113
|
const hiddenInput = target.querySelector('input[type="hidden"]');
|
81117
|
-
if (hiddenInput)
|
81118
|
-
|
81119
|
-
}
|
81114
|
+
if (hiddenInput)
|
81115
|
+
this.nameToValidName(hiddenInput);
|
81120
81116
|
if (this.selectedType !== type) {
|
81121
81117
|
select.selectedIndex = 0;
|
81122
81118
|
}
|
@@ -81134,13 +81130,15 @@
|
|
81134
81130
|
if (this.isSearchable) {
|
81135
81131
|
const textInput = target.querySelector('input[type="text"]');
|
81136
81132
|
const hiddenInput = target.querySelector('input[type="hidden"]');
|
81137
|
-
|
81138
|
-
|
81133
|
+
this.validNameToName(textInput);
|
81134
|
+
this.validNameToName(hiddenInput);
|
81139
81135
|
} else {
|
81140
81136
|
const select = target.querySelector("select");
|
81141
81137
|
const hiddenInput = target.querySelector('input[type="hidden"]');
|
81142
|
-
|
81143
|
-
|
81138
|
+
this.validNameToName(select);
|
81139
|
+
if (hiddenInput) {
|
81140
|
+
this.validNameToName(hiddenInput);
|
81141
|
+
}
|
81144
81142
|
}
|
81145
81143
|
}
|
81146
81144
|
invalidateTarget(target) {
|
@@ -81158,6 +81156,12 @@
|
|
81158
81156
|
}
|
81159
81157
|
}
|
81160
81158
|
}
|
81159
|
+
validNameToName(target) {
|
81160
|
+
target.setAttribute("name", target.getAttribute("valid-name"));
|
81161
|
+
}
|
81162
|
+
nameToValidName(target) {
|
81163
|
+
target.setAttribute("valid-name", target.getAttribute("name"));
|
81164
|
+
}
|
81161
81165
|
};
|
81162
81166
|
__publicField(belongs_to_field_controller_default, "targets", ["select", "type", "loadAssociationLink"]);
|
81163
81167
|
|
@@ -87796,6 +87800,7 @@
|
|
87796
87800
|
});
|
87797
87801
|
document.addEventListener("turbo:visit", () => document.body.classList.add("turbo-loading"));
|
87798
87802
|
document.addEventListener("turbo:submit-start", () => document.body.classList.add("turbo-loading"));
|
87803
|
+
document.addEventListener("turbo:submit-end", () => document.body.classList.remove("turbo-loading"));
|
87799
87804
|
document.addEventListener("turbo:before-cache", () => {
|
87800
87805
|
document.querySelectorAll("[data-turbo-remove-before-cache]").forEach((element) => element.remove());
|
87801
87806
|
});
|