plutonium 0.15.21 → 0.15.23
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 +23 -0
- data/app/assets/plutonium.js.map +3 -3
- data/app/assets/plutonium.min.js +5 -5
- data/app/assets/plutonium.min.js.map +4 -4
- data/lib/plutonium/ui/display/base.rb +2 -2
- data/lib/plutonium/ui/display/component/{association.rb → association_field.rb} +1 -1
- data/lib/plutonium/ui/display/component/{markdown.rb → markdown_field.rb} +11 -1
- data/lib/plutonium/ui/form/base.rb +5 -1
- data/lib/plutonium/ui/form/components/{easymde.rb → easymde_input.rb} +12 -2
- data/lib/plutonium/ui/form/components/flatpickr_input.rb +18 -0
- data/lib/plutonium/ui/form/options/inferred_types.rb +4 -0
- data/lib/plutonium/ui/form/theme.rb +6 -1
- data/lib/plutonium/ui/layout/base.rb +11 -0
- data/lib/plutonium/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/src/js/controllers/flatpickr_controller.js +28 -0
- data/src/js/controllers/register_controllers.js +2 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 722d928b97ef24e2b2a16735aed55dd662bf83036e276d2dcb5c08ed63547424
|
4
|
+
data.tar.gz: 8cc8fcbe505bff108217638dbdcc37b01ac2b106a8d515011b404dce4949ce71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de664691f31e58c49fecd8a4e4b046f70deee78fe1d5f971fb1f1dfb4298517937561c2d29809dea84d181cbc2486ad07bd9114caa1755e49e66029ec33e30de
|
7
|
+
data.tar.gz: 6872283b4f1ff8533f800db588e6260ab08d89fd7b7eec95a5484c3294026ff989160b532b3e264dc691efe3a8b6314602b988a2d1c6400c5ce7143c30f79028
|
data/app/assets/plutonium.js
CHANGED
@@ -7458,6 +7458,28 @@
|
|
7458
7458
|
}
|
7459
7459
|
};
|
7460
7460
|
|
7461
|
+
// src/js/controllers/flatpickr_controller.js
|
7462
|
+
var flatpickr_controller_default = class extends Controller {
|
7463
|
+
connect() {
|
7464
|
+
console.log(`flatpickr connected: ${this.element}`);
|
7465
|
+
self.picker = new flatpickr(this.element, this.#buildOptions());
|
7466
|
+
}
|
7467
|
+
disconnect() {
|
7468
|
+
self.picker.destroy();
|
7469
|
+
self.picker = null;
|
7470
|
+
}
|
7471
|
+
#buildOptions() {
|
7472
|
+
let options = { altInput: true };
|
7473
|
+
if (this.element.attributes.type.value == "datetime-local") {
|
7474
|
+
options.enableTime = true;
|
7475
|
+
} else if (this.element.attributes.type.value == "time") {
|
7476
|
+
options.enableTime = true;
|
7477
|
+
options.noCalendar = true;
|
7478
|
+
}
|
7479
|
+
return options;
|
7480
|
+
}
|
7481
|
+
};
|
7482
|
+
|
7461
7483
|
// src/js/controllers/register_controllers.js
|
7462
7484
|
function register_controllers_default(application2) {
|
7463
7485
|
application2.register("resource-layout", resource_layout_controller_default);
|
@@ -7484,6 +7506,7 @@
|
|
7484
7506
|
application2.register("color-mode", color_mode_controller_default);
|
7485
7507
|
application2.register("easymde", easymde_controller_default);
|
7486
7508
|
application2.register("slim-select", slim_select_controller_default);
|
7509
|
+
application2.register("flatpickr", flatpickr_controller_default);
|
7487
7510
|
}
|
7488
7511
|
|
7489
7512
|
// node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js
|