rails_modal_manager 1.0.1 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d091f44c86c1fb888b36180d99b9ff449b5b2b10c4770975d31fb08341248165
4
- data.tar.gz: 6f714c3b8a595c834df9e86636558e9cece244bb6be9ae919364fd01a54f0f75
3
+ metadata.gz: 131bae5631f7154fb171bbb06487f4a221a433f87cee8e5a190fc85bdc0133f3
4
+ data.tar.gz: f02669306e1b572aa6b3e017f4e946ebcf1d750dc655a40183270b56bdf2ee77
5
5
  SHA512:
6
- metadata.gz: fbb877227e4f5c621f066b563d13884423bfab4603dc00644b9e0a7ed8d221774a32f8f0bd3cae89c65ad2a72c885cb8c9f75150ba77fe7c97227e0533cb72b8
7
- data.tar.gz: 357809847c51e431a1af76cd7cf0028738af53e5006df9222d4bf532cb47cb7789098c39ce17b697eaf84d702a6cbfb44ebb614036846edd3a351cdf98ec5a67
6
+ metadata.gz: dae81bc1a99127097436b4af78931f35644ad046dba68521ba6f057a877fa5e117a8d0e2793c65f04a364e664e04b5927b878fe6fe02792880e559d650f0cc7b
7
+ data.tar.gz: 80a7d578b8132988c990a70d9492a541ff5fe8c37d02f7af2616731c82eb080276d3df9d726c507cb09ae2bead8c2a70864639ab54ce604c2c7b4a3da06d5813
@@ -35,10 +35,10 @@ module RailsModalManager
35
35
  # <% end %>
36
36
  #
37
37
  def rmm_modal(modal_id, options = {}, &block)
38
+ content = block_given? ? capture(&block) : nil
38
39
  render(
39
40
  partial: "rails_modal_manager/modal",
40
- locals: options.merge(modal_id: modal_id),
41
- &block
41
+ locals: options.merge(modal_id: modal_id, block_content: content)
42
42
  )
43
43
  end
44
44
 
@@ -26,7 +26,7 @@ function generateUUID() {
26
26
  * mobile: Whether to work on mobile, pc: Whether to work on PC
27
27
  */
28
28
  const defaultOptions = {
29
- sidebar: { mobile: true, pc: false },
29
+ sidebar: { mobile: true, pc: true },
30
30
  modal: { mobile: true, pc: true },
31
31
  layer: { mobile: true, pc: true },
32
32
  };
@@ -3,12 +3,12 @@
3
3
  * Full-featured modal manager for Rails applications
4
4
  * Ported from @reshacs/react-modal-manager
5
5
  *
6
- * @version 1.0.1
6
+ * @version 1.0.3
7
7
  * @author reshacs
8
8
  * @license MIT
9
9
  */
10
10
 
11
- export const VERSION = "1.0.1"
11
+ export const VERSION = "1.0.3"
12
12
 
13
13
  // Import core modules for internal use
14
14
  import modalStore, { MODAL_CONSTANTS, SIZE_CONFIG, POSITION_CONFIG, CASCADE_OFFSET, modalSizeStorage, modalUtils } from "rails_modal_manager/modal_store"
@@ -170,7 +170,7 @@
170
170
  <% end %>
171
171
 
172
172
  <div class="rmm-content" data-rmm-modal-target="content">
173
- <%= yield if block_given? %>
173
+ <%= block_content if defined?(block_content) && block_content %>
174
174
  </div>
175
175
  </div>
176
176
  </div>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsModalManager
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_modal_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - reshacs