create-mercato-app 0.5.1-develop.2912.8d7b1fef24 → 0.5.1-develop.2924.d13908516e

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mercato-app",
3
- "version": "0.5.1-develop.2912.8d7b1fef24",
3
+ "version": "0.5.1-develop.2924.d13908516e",
4
4
  "type": "module",
5
5
  "description": "Create a new Open Mercato application",
6
6
  "main": "./dist/index.js",
@@ -57,9 +57,31 @@ export function DemoFeedbackWidget({ demoModeEnabled }: { demoModeEnabled: boole
57
57
 
58
58
  const inactivityTimer = useRef<ReturnType<typeof setTimeout> | null>(null)
59
59
  const autoShownRef = useRef(false)
60
+ const [otherModalOpen, setOtherModalOpen] = useState(false)
60
61
 
61
62
  useEffect(() => { setMounted(true) }, [])
62
63
 
64
+ // Track whether another Radix Dialog or native <dialog> modal is currently open.
65
+ // The floating button + auto-popup must defer while the user is mid-task in another modal —
66
+ // stacking the feedback dialog on top deactivates the underlying dialog (Radix DismissableLayer)
67
+ // and leaves it with pointer-events:none, which the user perceives as a frozen page.
68
+ useEffect(() => {
69
+ if (!mounted || open) {
70
+ setOtherModalOpen(false)
71
+ return
72
+ }
73
+ const check = () => {
74
+ if (typeof document === 'undefined') return false
75
+ if (document.querySelector('[data-dialog-content][data-state="open"]')) return true
76
+ if (document.querySelector('dialog[open]')) return true
77
+ return false
78
+ }
79
+ setOtherModalOpen(check())
80
+ const observer = new MutationObserver(() => setOtherModalOpen(check()))
81
+ observer.observe(document.body, { subtree: true, attributes: true, attributeFilter: ['data-state', 'open'], childList: true })
82
+ return () => observer.disconnect()
83
+ }, [mounted, open])
84
+
63
85
  // Caption rotation animation
64
86
  useEffect(() => {
65
87
  const interval = setInterval(() => {
@@ -74,14 +96,24 @@ export function DemoFeedbackWidget({ demoModeEnabled }: { demoModeEnabled: boole
74
96
  if (getCookie(SUPPRESS_COOKIE) === '1') return
75
97
  if (getCookie(SHOWN_TODAY_COOKIE) === todayKey()) return
76
98
 
99
+ function isAnotherModalOpen() {
100
+ if (typeof document === 'undefined') return false
101
+ if (document.querySelector('[data-dialog-content][data-state="open"]')) return true
102
+ if (document.querySelector('dialog[open]')) return true
103
+ return false
104
+ }
105
+
77
106
  function resetTimer() {
78
107
  if (inactivityTimer.current) clearTimeout(inactivityTimer.current)
79
108
  inactivityTimer.current = setTimeout(() => {
80
- if (!autoShownRef.current) {
81
- autoShownRef.current = true
82
- setCookie(SHOWN_TODAY_COOKIE, todayKey(), 1)
83
- setOpen(true)
109
+ if (autoShownRef.current) return
110
+ if (isAnotherModalOpen()) {
111
+ inactivityTimer.current = setTimeout(resetTimer, 5_000)
112
+ return
84
113
  }
114
+ autoShownRef.current = true
115
+ setCookie(SHOWN_TODAY_COOKIE, todayKey(), 1)
116
+ setOpen(true)
85
117
  }, 30_000)
86
118
  }
87
119
 
@@ -168,6 +200,7 @@ export function DemoFeedbackWidget({ demoModeEnabled }: { demoModeEnabled: boole
168
200
  }, [submitState, resetForm])
169
201
 
170
202
  if (!mounted) return null
203
+ if (otherModalOpen && !open) return null
171
204
 
172
205
  const caption = CAPTIONS[captionIndex]
173
206
  const currentCaption = t(caption.key, caption.fallback)
@@ -690,6 +690,7 @@
690
690
  "ui.columnChooser.ungrouped": "Other",
691
691
  "ui.contextHelp.hide": "Ausblenden",
692
692
  "ui.contextHelp.show": "Anzeigen",
693
+ "ui.crud.dragHandle.aria": "Zum Neuanordnen ziehen",
693
694
  "ui.dataLoader.loading": "Wird geladen...",
694
695
  "ui.dataTable.actionsColumn": "Aktionen",
695
696
  "ui.dataTable.bulkAction.error": "Bulk action failed.",
@@ -690,6 +690,7 @@
690
690
  "ui.columnChooser.ungrouped": "Other",
691
691
  "ui.contextHelp.hide": "Hide",
692
692
  "ui.contextHelp.show": "Show",
693
+ "ui.crud.dragHandle.aria": "Drag to reorder",
693
694
  "ui.dataLoader.loading": "Loading...",
694
695
  "ui.dataTable.actionsColumn": "Actions",
695
696
  "ui.dataTable.bulkAction.error": "Bulk action failed.",
@@ -690,6 +690,7 @@
690
690
  "ui.columnChooser.ungrouped": "Other",
691
691
  "ui.contextHelp.hide": "Ocultar",
692
692
  "ui.contextHelp.show": "Mostrar",
693
+ "ui.crud.dragHandle.aria": "Arrastra para reordenar",
693
694
  "ui.dataLoader.loading": "Cargando...",
694
695
  "ui.dataTable.actionsColumn": "Acciones",
695
696
  "ui.dataTable.bulkAction.error": "Bulk action failed.",
@@ -690,6 +690,7 @@
690
690
  "ui.columnChooser.ungrouped": "Other",
691
691
  "ui.contextHelp.hide": "Ukryj",
692
692
  "ui.contextHelp.show": "Pokaż",
693
+ "ui.crud.dragHandle.aria": "Przeciągnij, aby zmienić kolejność",
693
694
  "ui.dataLoader.loading": "Ładowanie...",
694
695
  "ui.dataTable.actionsColumn": "Akcje",
695
696
  "ui.dataTable.bulkAction.error": "Bulk action failed.",