ultimate_turbo_modal 1.2.0 → 1.2.1
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -11
- data/lib/phlex/deferred_render_with_main_content.rb +8 -0
- data/lib/ultimate_turbo_modal/base.rb +1 -0
- data/lib/ultimate_turbo_modal/version.rb +1 -1
- data/lib/ultimate_turbo_modal.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59ea5183cc13d4e04e3a9a63fad2f4c56d4656393b50af6888ffcc452ca47ee4
|
4
|
+
data.tar.gz: d36e383ba4dfd1affd9ebea7ed3c550773273ccf80b0cdcf9464cd892b083390
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0031bd558642b4f32643ce8a987e8dfa65cf9e2990590e21fd23926417f532619ac9498b69f86a98d10c7e5be04228015f216e0d222b15216b0afb91677beef2
|
7
|
+
data.tar.gz: 40b4e14d106a398016d88daa5dcfa0f77bc5432ba302d148f30597060a1f2b7559c8e3873866ebe4afbaba6f831b42c4182c19479bf222ba552fc2a3f4e357de
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -75,14 +75,14 @@ end
|
|
75
75
|
|
76
76
|
5. Register the Stimulus controller in `app/javascript/controllers/index.js` adding the following lines at the end.
|
77
77
|
|
78
|
-
```
|
78
|
+
```javascript
|
79
79
|
import setupUltimateTurboModal from "ultimate_turbo_modal";
|
80
80
|
setupUltimateTurboModal(application);
|
81
81
|
```
|
82
82
|
|
83
83
|
6. If using the Tailwind flavor, add the following to `tailwind.config.js`:
|
84
84
|
|
85
|
-
```
|
85
|
+
```javascript
|
86
86
|
// For npm/yarn
|
87
87
|
const { getUltimateTurboModalPath } = require('ultimate_turbo_modal/gemPath');
|
88
88
|
|
@@ -97,16 +97,17 @@ const { getUltimateTurboModalPath } = require('ultimate_turbo_modal/gemPath');
|
|
97
97
|
|
98
98
|
and then in the `content` section, add `getUltimateTurboModalPath()` as follow:
|
99
99
|
|
100
|
-
```
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
100
|
+
```javascript
|
101
|
+
content: [
|
102
|
+
'./public/*.html',
|
103
|
+
'./app/helpers/**/*.rb',
|
104
|
+
'./app/javascript/**/*.js',
|
105
|
+
'./app/views/**/*.{erb,haml,html,slim,rb}',
|
106
|
+
getUltimateTurboModalPath()
|
107
|
+
]
|
107
108
|
```
|
108
109
|
|
109
|
-
|
110
|
+
1. Optionally (but recommended), configure UTMR to use Idiomorph. See below for details.
|
110
111
|
|
111
112
|
|
112
113
|
|
@@ -202,7 +203,7 @@ In the meantime, add `<script src="https://unpkg.com/idiomorph"></script>` to yo
|
|
202
203
|
|
203
204
|
And the following code to `application.js`:
|
204
205
|
|
205
|
-
```
|
206
|
+
```javascript
|
206
207
|
addEventListener("turbo:before-frame-render", (event) => {
|
207
208
|
event.detail.render = (currentElement, newElement) => {
|
208
209
|
Idiomorph.morph(currentElement, newElement, {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
class UltimateTurboModal::Base < Phlex::HTML
|
2
|
+
prepend Phlex::DeferredRenderWithMainContent
|
2
3
|
# @param padding [Boolean] Whether to add padding around the modal content
|
3
4
|
# @param close_button [Boolean] Whether to show a close button.
|
4
5
|
# @param advance [Boolean] Whether to update the browser history when opening and closing the modal
|
data/lib/ultimate_turbo_modal.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultimate_turbo_modal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Mercier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex-rails
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- LICENSE.txt
|
91
91
|
- README.md
|
92
92
|
- Rakefile
|
93
|
+
- lib/phlex/deferred_render_with_main_content.rb
|
93
94
|
- lib/ultimate_turbo_modal.rb
|
94
95
|
- lib/ultimate_turbo_modal/base.rb
|
95
96
|
- lib/ultimate_turbo_modal/configuration.rb
|