rails_modal_manager 1.0.17 → 1.0.18
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d7ccea49e3ab84c69571964c148bfbc1fd0cd637abad0f5f7ebafba0e5315b2
|
|
4
|
+
data.tar.gz: d03dfa790ccc4fecec52d541b028688847d5e654b8e7d15aff6815327ebf5db9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcff3de6aa8b23d4f752d37c6039e230bdda9a8b153eaf3aa71caedf9cd79c43355a42251296e8486512cbd5d24c09459badcb230192af5f984ee6861c9d52ec
|
|
7
|
+
data.tar.gz: 1088006295ee8976b5a80f6105dd950ad4d3efca89a126e3ffb25a0a193216d21fd75f00c6a5e502f9b0c91bf0a285ab8b5c752e69f4ddc33d851b79f9cfd11a
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Rails 애플리케이션을 위한 고급 모달 매니저입니다.
|
|
4
4
|
`@reshacs/react-modal-manager`에서 포팅되었습니다.
|
|
5
5
|
|
|
6
|
-
**Version:** 1.0.
|
|
6
|
+
**Version:** 1.0.18
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -789,6 +789,12 @@ MIT License
|
|
|
789
789
|
|
|
790
790
|
## 변경 이력
|
|
791
791
|
|
|
792
|
+
### v1.0.18
|
|
793
|
+
|
|
794
|
+
- **모달 리셋 시 콘텐츠 동기화**: `resetToFirst()` 호출 시 `itemSelect` 이벤트 발생하도록 개선
|
|
795
|
+
- 사이드바/서브메뉴 리셋 시 커스텀 컨트롤러에 알림 전달
|
|
796
|
+
- 이벤트 detail에 `source: 'reset'` 플래그 추가로 일반 선택과 리셋 구분 가능
|
|
797
|
+
|
|
792
798
|
### v1.0.17
|
|
793
799
|
|
|
794
800
|
- **모바일 최대화 모달 사이드바 개선**: 최대화된 모달에서 사이드바가 접혔을 때 아이콘만 표시 (데스크톱과 동일한 UX)
|
|
@@ -228,7 +228,41 @@ export default class extends Controller {
|
|
|
228
228
|
// Switch content panel
|
|
229
229
|
this.switchPanel(firstItem)
|
|
230
230
|
|
|
231
|
-
// Switch submenu group
|
|
232
|
-
this.
|
|
231
|
+
// Switch submenu group (without triggering forceReloadActive)
|
|
232
|
+
this.switchSubmenuGroupForReset(firstItem)
|
|
233
|
+
|
|
234
|
+
// Dispatch itemSelect event so custom controllers can react
|
|
235
|
+
this.dispatch('itemSelect', {
|
|
236
|
+
detail: {
|
|
237
|
+
modalId: this.modalIdValue,
|
|
238
|
+
itemId: firstItem.dataset.itemId,
|
|
239
|
+
itemLabel: firstItem.dataset.itemLabel,
|
|
240
|
+
hasSubmenu: !!firstItem.dataset.submenuId,
|
|
241
|
+
source: 'reset'
|
|
242
|
+
}
|
|
243
|
+
})
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Switch submenu group for reset (without triggering content reload)
|
|
248
|
+
* This version doesn't call forceReloadActive to avoid duplicate loads
|
|
249
|
+
*/
|
|
250
|
+
switchSubmenuGroupForReset(item) {
|
|
251
|
+
const submenuId = item.dataset.submenuId
|
|
252
|
+
const modal = this.element.closest('.rmm-modal')
|
|
253
|
+
if (!modal) return
|
|
254
|
+
|
|
255
|
+
// Hide all submenu groups
|
|
256
|
+
modal.querySelectorAll('.rmm-submenu-group').forEach(group => {
|
|
257
|
+
group.classList.remove('rmm-submenu-group-active')
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
// Show target submenu group (if exists)
|
|
261
|
+
if (submenuId) {
|
|
262
|
+
const targetSubmenu = modal.querySelector(`#${submenuId}`)
|
|
263
|
+
if (targetSubmenu) {
|
|
264
|
+
targetSubmenu.classList.add('rmm-submenu-group-active')
|
|
265
|
+
}
|
|
266
|
+
}
|
|
233
267
|
}
|
|
234
268
|
}
|
|
@@ -246,14 +246,25 @@ export default class extends Controller {
|
|
|
246
246
|
firstItem.classList.add('rmm-active')
|
|
247
247
|
this.currentItemId = firstItem.dataset.itemId
|
|
248
248
|
|
|
249
|
-
// Switch panel
|
|
250
|
-
if (this.loadModeValue
|
|
251
|
-
this.loadAjaxContent(firstItem)
|
|
252
|
-
} else {
|
|
249
|
+
// Switch panel (for preload mode)
|
|
250
|
+
if (this.loadModeValue !== 'ajax') {
|
|
253
251
|
this.switchPanel(firstItem)
|
|
254
252
|
}
|
|
255
253
|
|
|
256
254
|
// Clear AJAX cache
|
|
257
255
|
this.ajaxCache.clear()
|
|
256
|
+
|
|
257
|
+
// Dispatch itemSelect event so custom controllers can react
|
|
258
|
+
// Note: AJAX content loading should be handled by the custom controller
|
|
259
|
+
// listening to this event, not here (to avoid duplicate loads)
|
|
260
|
+
this.dispatch('itemSelect', {
|
|
261
|
+
detail: {
|
|
262
|
+
modalId: this.modalIdValue,
|
|
263
|
+
itemId: firstItem.dataset.itemId,
|
|
264
|
+
itemLabel: firstItem.dataset.itemLabel,
|
|
265
|
+
loadMode: this.loadModeValue,
|
|
266
|
+
source: 'reset'
|
|
267
|
+
}
|
|
268
|
+
})
|
|
258
269
|
}
|
|
259
270
|
}
|