plutonium 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/plutonium.js +43 -9
- data/app/assets/plutonium.js.map +3 -3
- data/app/assets/plutonium.min.js +14 -14
- data/app/assets/plutonium.min.js.map +4 -4
- data/lib/plutonium/ui/display/theme.rb +1 -0
- data/lib/plutonium/ui/form/base.rb +6 -1
- data/lib/plutonium/ui/form/components/intl_tel_input.rb +24 -0
- data/lib/plutonium/ui/form/theme.rb +6 -1
- data/lib/plutonium/ui/layout/base.rb +11 -0
- data/lib/plutonium/ui/table/display_theme.rb +1 -0
- data/lib/plutonium/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/src/js/controllers/easymde_controller.js +3 -3
- data/src/js/controllers/flatpickr_controller.js +3 -3
- data/src/js/controllers/intl_tel_input_controller.js +39 -0
- data/src/js/controllers/register_controllers.js +2 -0
- data/src/js/controllers/slim_select_controller.js +3 -3
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14c0f06955545c1b44046d000e45aec692df006c326d3909748f30a47cda5338
|
4
|
+
data.tar.gz: 0bce1c61fa4971cac25cca32928361251f2556166a43d095e1a34546f680b111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76ff8a75beba53ada1fc40516dc953533669c4cb6b48b0a3d6f9670c9a1908ac1c95e44fd4e66ef1d9616fc7a5b336178d9a2c587b087ecc6473f732dc483035
|
7
|
+
data.tar.gz: 7b56bff142f00d821f635ea40a3809f1cb943b072524048b82904a63a60c109371bc45f7f4ec9858d8df3f724876102cf5894ecfc9abc6aecee58533b54c1096
|
data/app/assets/plutonium.js
CHANGED
@@ -10657,12 +10657,12 @@ ${text2}</tr>
|
|
10657
10657
|
var easymde_controller_default = class extends Controller {
|
10658
10658
|
connect() {
|
10659
10659
|
console.log(`easymde connected: ${this.element}`);
|
10660
|
-
|
10660
|
+
this.easyMDE = new EasyMDE(this.#buildOptions());
|
10661
10661
|
this.element.setAttribute("data-action", "turbo:morph-element->easymde#reconnect");
|
10662
10662
|
}
|
10663
10663
|
disconnect() {
|
10664
|
-
|
10665
|
-
|
10664
|
+
this.easyMDE.toTextArea();
|
10665
|
+
this.easyMDE = null;
|
10666
10666
|
}
|
10667
10667
|
reconnect() {
|
10668
10668
|
this.disconnect();
|
@@ -10698,14 +10698,14 @@ ${text2}</tr>
|
|
10698
10698
|
var slim_select_controller_default = class extends Controller {
|
10699
10699
|
connect() {
|
10700
10700
|
console.log(`slim-select connected: ${this.element}`);
|
10701
|
-
|
10701
|
+
this.slimSelect = new SlimSelect({
|
10702
10702
|
select: this.element
|
10703
10703
|
});
|
10704
10704
|
this.element.setAttribute("data-action", "turbo:morph-element->slim-select#reconnect");
|
10705
10705
|
}
|
10706
10706
|
disconnect() {
|
10707
|
-
|
10708
|
-
|
10707
|
+
this.slimSelect.destroy();
|
10708
|
+
this.slimSelect = null;
|
10709
10709
|
}
|
10710
10710
|
reconnect() {
|
10711
10711
|
this.disconnect();
|
@@ -10717,12 +10717,12 @@ ${text2}</tr>
|
|
10717
10717
|
var flatpickr_controller_default = class extends Controller {
|
10718
10718
|
connect() {
|
10719
10719
|
console.log(`flatpickr connected: ${this.element}`);
|
10720
|
-
|
10720
|
+
this.picker = new flatpickr(this.element, this.#buildOptions());
|
10721
10721
|
this.element.setAttribute("data-action", "turbo:morph-element->flatpickr#reconnect");
|
10722
10722
|
}
|
10723
10723
|
disconnect() {
|
10724
|
-
|
10725
|
-
|
10724
|
+
this.picker.destroy();
|
10725
|
+
this.picker = null;
|
10726
10726
|
}
|
10727
10727
|
reconnect() {
|
10728
10728
|
this.disconnect();
|
@@ -10740,6 +10740,39 @@ ${text2}</tr>
|
|
10740
10740
|
}
|
10741
10741
|
};
|
10742
10742
|
|
10743
|
+
// src/js/controllers/intl_tel_input_controller.js
|
10744
|
+
var intl_tel_input_controller_default = class extends Controller {
|
10745
|
+
static targets = ["input"];
|
10746
|
+
connect() {
|
10747
|
+
console.log(`intl-tel-input connected: ${this.element}`);
|
10748
|
+
}
|
10749
|
+
disconnect() {
|
10750
|
+
this.inputTargetDisconnected();
|
10751
|
+
}
|
10752
|
+
inputTargetConnected() {
|
10753
|
+
if (!this.hasInputTarget)
|
10754
|
+
return;
|
10755
|
+
this.iti = window.intlTelInput(this.inputTarget, this.#buildOptions());
|
10756
|
+
this.inputTarget.setAttribute("data-action", "turbo:morph-element->intl-tel-input#reconnect");
|
10757
|
+
}
|
10758
|
+
inputTargetDisconnected() {
|
10759
|
+
if (this.iti)
|
10760
|
+
this.iti.destroy();
|
10761
|
+
this.iti = null;
|
10762
|
+
}
|
10763
|
+
reconnect() {
|
10764
|
+
this.inputTargetDisconnected();
|
10765
|
+
this.inputTargetConnected();
|
10766
|
+
}
|
10767
|
+
#buildOptions() {
|
10768
|
+
return {
|
10769
|
+
strictMode: true,
|
10770
|
+
hiddenInput: () => ({ phone: this.inputTarget.attributes.name.value }),
|
10771
|
+
loadUtilsOnInit: "https://cdn.jsdelivr.net/npm/intl-tel-input@24.8.1/build/js/utils.js"
|
10772
|
+
};
|
10773
|
+
}
|
10774
|
+
};
|
10775
|
+
|
10743
10776
|
// src/js/controllers/register_controllers.js
|
10744
10777
|
function register_controllers_default(application2) {
|
10745
10778
|
application2.register("resource-layout", resource_layout_controller_default);
|
@@ -10767,6 +10800,7 @@ ${text2}</tr>
|
|
10767
10800
|
application2.register("easymde", easymde_controller_default);
|
10768
10801
|
application2.register("slim-select", slim_select_controller_default);
|
10769
10802
|
application2.register("flatpickr", flatpickr_controller_default);
|
10803
|
+
application2.register("intl-tel-input", intl_tel_input_controller_default);
|
10770
10804
|
}
|
10771
10805
|
|
10772
10806
|
// node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js
|