rails_modal_manager 1.0.11 → 1.0.12

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: d269701f2b02e0fdfff0588481955d72e01a4bf9482ee6490fa4cfafa16d8485
4
- data.tar.gz: 24b240b6fe17cd7a3b10aa645b345fb53627c4549dc6f2fdd5123004fad48ef0
3
+ metadata.gz: e3731afb3a3d006cd6256e0e19780bb24e433153ca2f459807137ef52e0cfaf7
4
+ data.tar.gz: 6acd94d81d76b5490185a8675b8ddacd3a2759fe5f039f765ed23e31f17d4020
5
5
  SHA512:
6
- metadata.gz: 02c3088c03fe707a6bf7281d0c9e2efc659a0e0f3ca6cc72740908b0530d6198686b74b6004fc4dff47f9aba20b81a967b675b12a6c676f37d08d164ed51916b
7
- data.tar.gz: aad4172168208e0c032782497b73b549e90bd352dcd3558c1ca8a0a33f55ad5dae0204b75b4edf3fb18c007ffe72c2caf93c73af6c33960327c8056c645af30a
6
+ metadata.gz: e81f5871bc33494bd283ac5adb41ca84571bfb9e3f9a23597e8a1b37ab1dfd62cd4033958030d2aaca80becc305593a68a0762d92d3d88c394d3ae80b693e22d
7
+ data.tar.gz: d87f1982e1dd5cb3df4c50f3ceea6a9fe1605ea789711528a89e942de5533d25fbdb8673d55a2d4b2e06ebc3305d9aeed27f58307c285887135f20bb873dd1ea
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Rails 애플리케이션을 위한 고급 모달 매니저입니다.
4
4
  `@reshacs/react-modal-manager`에서 포팅되었습니다.
5
5
 
6
- **Version:** 1.0.11
6
+ **Version:** 1.0.12
7
7
 
8
8
  ---
9
9
 
@@ -789,6 +789,10 @@ MIT License
789
789
 
790
790
  ## 변경 이력
791
791
 
792
+ ### v1.0.12
793
+
794
+ - **최소화된 모달 자동 복원**: `openModal()` 호출 시 해당 모달이 이미 열려있고 최소화된 상태라면 자동으로 복원되도록 개선
795
+
792
796
  ### v1.0.11
793
797
 
794
798
  - **사이드바-서브메뉴 AJAX 연동 개선**: 사이드바 메뉴 전환 시 활성화된 서브메뉴의 콘텐츠가 자동으로 로드되도록 개선
@@ -80,14 +80,24 @@ export function initGlobalClickHandler() {
80
80
 
81
81
  /**
82
82
  * Open a modal by ID
83
+ * If the modal is already open but minimized, it will be restored instead
83
84
  * @param {string} modalId - The modal's ID
84
85
  */
85
86
  export function openModal(modalId) {
86
87
  const modalElement = document.getElementById(modalId)
87
- if (modalElement) {
88
- modalElement.setAttribute('data-rmm-modal-open-value', 'true')
89
- modalElement.dispatchEvent(new CustomEvent('rmm:open'))
88
+ if (!modalElement) return
89
+
90
+ // Check if the modal is already open and minimized
91
+ const config = modalStore.getModalConfig(modalId)
92
+ if (config && config.isMinimized) {
93
+ // Restore the minimized modal
94
+ modalStore.restoreModalGroup(modalId)
95
+ return
90
96
  }
97
+
98
+ // Open the modal normally
99
+ modalElement.setAttribute('data-rmm-modal-open-value', 'true')
100
+ modalElement.dispatchEvent(new CustomEvent('rmm:open'))
91
101
  }
92
102
 
93
103
  /**
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsModalManager
4
- VERSION = "1.0.11"
4
+ VERSION = "1.0.12"
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.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - reshacs