pcm-shared-components 2.1.401 → 2.1.403
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.
|
@@ -213,11 +213,20 @@ export const AnimalVehicleDetailsEditor = props => {
|
|
|
213
213
|
//
|
|
214
214
|
// Re-runs whenever the wrapped set itself changes (not just when `fieldConfig` changes), because
|
|
215
215
|
// promoting one field to full width re-pairs its neighbors, which can occasionally make a
|
|
216
|
-
// DIFFERENT field's label newly wrap
|
|
217
|
-
//
|
|
218
|
-
//
|
|
216
|
+
// DIFFERENT field's label newly wrap at its new column width.
|
|
217
|
+
//
|
|
218
|
+
// Promotions must be a ONE-WAY RATCHET (seed from `prev`, only ever add) rather than recomputed
|
|
219
|
+
// from scratch each pass. A field promoted to full width almost always stops wrapping there --
|
|
220
|
+
// it just got 2x the space -- so measuring fresh every time would immediately demote it again,
|
|
221
|
+
// which shrinks it back to half width, which makes it wrap again, which re-promotes it... an
|
|
222
|
+
// infinite loop that used to hang the whole editor (every field whose label happened to wrap at
|
|
223
|
+
// half width but fit at full width triggered this on mount). Only dropping keys that are no
|
|
224
|
+
// longer in `fieldConfig` at all keeps a stale promotion from leaking across an entirely
|
|
225
|
+
// different field set. The state setter still bails out (no re-render) the moment a pass finds
|
|
226
|
+
// no change, so this converges in at most `fieldConfig.length` passes.
|
|
219
227
|
useLayoutEffect(() => {
|
|
220
|
-
const
|
|
228
|
+
const liveKeys = new Set(fieldConfig.map(f => f.key));
|
|
229
|
+
const nextWrapped = new Set([...wrappedKeys].filter(k => liveKeys.has(k)));
|
|
221
230
|
labelRefs.current.forEach((el, fieldKey) => {
|
|
222
231
|
if (!el) return;
|
|
223
232
|
const lineHeight = parseFloat(getComputedStyle(el).lineHeight) || 0;
|
|
@@ -1474,7 +1474,8 @@
|
|
|
1474
1474
|
"zoom_in": "Zoom in",
|
|
1475
1475
|
"zoom_out": "Zoom out",
|
|
1476
1476
|
"hourly": "Hourly",
|
|
1477
|
-
"minute": "Minute"
|
|
1477
|
+
"minute": "Minute",
|
|
1478
|
+
"plus_count_more": "+{{count}} more"
|
|
1478
1479
|
},
|
|
1479
1480
|
"connectivity": {
|
|
1480
1481
|
"offline-action-blocked": "You're offline. This action needs an internet connection and isn't available right now. It will work again once you're back online.",
|
|
@@ -1474,7 +1474,8 @@
|
|
|
1474
1474
|
"zoom_in": "Acercar",
|
|
1475
1475
|
"zoom_out": "Alejar",
|
|
1476
1476
|
"hourly": "Por hora",
|
|
1477
|
-
"minute": "Minuto"
|
|
1477
|
+
"minute": "Minuto",
|
|
1478
|
+
"plus_count_more": "+{{count}} más"
|
|
1478
1479
|
},
|
|
1479
1480
|
"connectivity": {
|
|
1480
1481
|
"offline-action-blocked": "Está sin conexión. Esta acción necesita una conexión a Internet y no está disponible en este momento. Volverá a funcionar cuando vuelva a estar en línea.",
|
|
@@ -1474,7 +1474,8 @@
|
|
|
1474
1474
|
"zoom_in": "Zoomer",
|
|
1475
1475
|
"zoom_out": "Dézoomer",
|
|
1476
1476
|
"hourly": "Horaire",
|
|
1477
|
-
"minute": "Minute"
|
|
1477
|
+
"minute": "Minute",
|
|
1478
|
+
"plus_count_more": "+{{count}} de plus"
|
|
1478
1479
|
},
|
|
1479
1480
|
"connectivity": {
|
|
1480
1481
|
"offline-action-blocked": "Vous êtes hors ligne. Cette action nécessite une connexion Internet et n'est pas disponible pour le moment. Elle fonctionnera de nouveau dès que vous serez de retour en ligne.",
|