plutonium 0.26.1 → 0.26.3

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.
@@ -2,3 +2,4 @@
2
2
  @import "easymde.css";
3
3
  @import "slim_select.css";
4
4
  @import "intl_tel_input.css";
5
+ @import "flatpickr.css";
@@ -10,6 +10,7 @@ import DomElement from "../support/dom_element"
10
10
  export default class extends Controller {
11
11
  static values = {
12
12
  identifier: String,
13
+ endpoint: String,
13
14
 
14
15
  maxFileSize: { type: Number, default: null },
15
16
  minFileSize: { type: Number, default: null },
@@ -75,7 +76,7 @@ export default class extends Controller {
75
76
  #configureUploader() {
76
77
  this.uppy
77
78
  .use(XHRUpload, {
78
- endpoint: '/upload', // path to the upload endpoint
79
+ endpoint: this.endpointValue, // path to the upload endpoint
79
80
  })
80
81
  }
81
82
 
@@ -1,35 +1,46 @@
1
- import { Controller } from "@hotwired/stimulus"
1
+ import { Controller } from "@hotwired/stimulus";
2
2
 
3
3
  // Connects to data-controller="flatpickr"
4
4
  export default class extends Controller {
5
5
  connect() {
6
- this.picker = new flatpickr(this.element, this.#buildOptions())
7
- this.element.setAttribute("data-action", "turbo:morph-element->flatpickr#reconnect")
6
+ this.modal = document.querySelector("[data-controller=remote-modal]");
7
+
8
+ this.picker = new flatpickr(this.element, this.#buildOptions());
9
+
10
+ this.element.setAttribute(
11
+ "data-action",
12
+ "turbo:morph-element->flatpickr#reconnect"
13
+ );
8
14
  }
9
15
 
10
16
  disconnect() {
11
17
  if (this.picker) {
12
- this.picker.destroy()
13
- this.picker = null
18
+ this.picker.destroy();
19
+ this.picker = null;
14
20
  }
15
21
  }
16
22
 
17
23
  reconnect() {
18
- this.disconnect()
19
- this.connect()
24
+ this.disconnect();
25
+ this.connect();
20
26
  }
21
27
 
22
28
  #buildOptions() {
23
- let options = { altInput: true }
29
+ let options = { altInput: true };
30
+
24
31
  if (this.element.attributes.type.value == "datetime-local") {
25
- options.enableTime = true
26
- }
27
- else if (this.element.attributes.type.value == "time") {
28
- options.enableTime = true
29
- options.noCalendar = true
32
+ options.enableTime = true;
33
+ } else if (this.element.attributes.type.value == "time") {
34
+ options.enableTime = true;
35
+ options.noCalendar = true;
30
36
  // options.time_24hr = true
31
37
  // options.altFormat = "H:i"
32
38
  }
33
- return options
39
+
40
+ if (this.modal) {
41
+ options.appendTo = this.modal;
42
+ }
43
+
44
+ return options;
34
45
  }
35
46
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.1
4
+ version: 0.26.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-10 00:00:00.000000000 Z
11
+ date: 2025-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -650,6 +650,7 @@ files:
650
650
  - lib/generators/pu/res/conn/templates/app/policies/resource_policy.rb.tt
651
651
  - lib/generators/pu/res/conn/templates/app/presenters/resource_presenter.rb.tt
652
652
  - lib/generators/pu/res/conn/templates/app/query_objects/resource_query_object.rb.tt
653
+ - lib/generators/pu/res/entity/entity_generator.rb
653
654
  - lib/generators/pu/res/model/USAGE
654
655
  - lib/generators/pu/res/model/model_generator.rb
655
656
  - lib/generators/pu/res/model/templates/create_table_migration.rb.tt
@@ -667,6 +668,7 @@ files:
667
668
  - lib/generators/pu/rodauth/concerns/account_selector.rb
668
669
  - lib/generators/pu/rodauth/concerns/configuration.rb
669
670
  - lib/generators/pu/rodauth/concerns/feature_selector.rb
671
+ - lib/generators/pu/rodauth/customer_generator.rb
670
672
  - lib/generators/pu/rodauth/install_generator.rb
671
673
  - lib/generators/pu/rodauth/migration/active_record/account_expiration.erb
672
674
  - lib/generators/pu/rodauth/migration/active_record/active_sessions.erb
@@ -852,6 +854,7 @@ files:
852
854
  - lib/plutonium/ui/form/theme.rb
853
855
  - lib/plutonium/ui/frame_navigator_panel.rb
854
856
  - lib/plutonium/ui/layout/base.rb
857
+ - lib/plutonium/ui/layout/basic_layout.rb
855
858
  - lib/plutonium/ui/layout/header.rb
856
859
  - lib/plutonium/ui/layout/resource_layout.rb
857
860
  - lib/plutonium/ui/layout/rodauth_layout.rb
@@ -897,6 +900,7 @@ files:
897
900
  - src/.npmignore
898
901
  - src/css/core.css
899
902
  - src/css/easymde.css
903
+ - src/css/flatpickr.css
900
904
  - src/css/intl_tel_input.css
901
905
  - src/css/plutonium.css
902
906
  - src/css/plutonium.entry.css