arengibook 3.4.3-main → 3.4.5-main

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.
Files changed (2) hide show
  1. package/dist/index.js +502 -100
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ var MESSAGES = {
36
36
  'arengibook.table.settings.sortAsc': 'Trier par ordre croissant',
37
37
  'arengibook.table.settings.sortDesc': 'Trier par ordre décroissant',
38
38
  'arengibook.table.settings.sortNone': 'Retirer le tri',
39
+ 'arengibook.table.settings.sortReapply': 'Réappliquer le tri',
39
40
  'arengibook.table.settings.fitColumn': 'Ajuster à la largeur du contenu',
40
41
  'arengibook.table.settings.hideColumn': 'Masquer cette colonne',
41
42
  'arengibook.table.settings.colVisible': 'Afficher',
@@ -119,6 +120,7 @@ var MESSAGES = {
119
120
  'arengibook.table.settings.sortAsc': 'Sort ascending',
120
121
  'arengibook.table.settings.sortDesc': 'Sort descending',
121
122
  'arengibook.table.settings.sortNone': 'Remove sorting',
123
+ 'arengibook.table.settings.sortReapply': 'Reapply sorting',
122
124
  'arengibook.table.settings.fitColumn': 'Fit to content width',
123
125
  'arengibook.table.settings.hideColumn': 'Hide this column',
124
126
  'arengibook.table.settings.colVisible': 'Show',
@@ -202,6 +204,7 @@ var MESSAGES = {
202
204
  'arengibook.table.settings.sortAsc': 'Ordenar de forma ascendente',
203
205
  'arengibook.table.settings.sortDesc': 'Ordenar de forma descendente',
204
206
  'arengibook.table.settings.sortNone': 'Quitar la ordenación',
207
+ 'arengibook.table.settings.sortReapply': 'Volver a aplicar la ordenación',
205
208
  'arengibook.table.settings.fitColumn': 'Ajustar al ancho del contenido',
206
209
  'arengibook.table.settings.hideColumn': 'Ocultar esta columna',
207
210
  'arengibook.table.settings.colVisible': 'Mostrar',
@@ -285,6 +288,7 @@ var MESSAGES = {
285
288
  'arengibook.table.settings.sortAsc': 'Aufsteigend sortieren',
286
289
  'arengibook.table.settings.sortDesc': 'Absteigend sortieren',
287
290
  'arengibook.table.settings.sortNone': 'Sortierung entfernen',
291
+ 'arengibook.table.settings.sortReapply': 'Sortierung erneut anwenden',
288
292
  'arengibook.table.settings.fitColumn': 'An Inhaltsbreite anpassen',
289
293
  'arengibook.table.settings.hideColumn': 'Diese Spalte ausblenden',
290
294
  'arengibook.table.settings.colVisible': 'Anzeigen',
@@ -47836,7 +47840,7 @@ var Toast$1 = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (in
47836
47840
  }));
47837
47841
  Toast$1.displayName = 'Toast';
47838
47842
 
47839
- var css_248z$4 = "@keyframes fadeIn {\n from {\n opacity: 0;\n transform: scale(0.85);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes toastSlideIn {\n from {\n opacity: 0;\n transform: translateX(40px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes toastIconPop {\n 0% {\n transform: scale(0);\n opacity: 0;\n }\n 60% {\n transform: scale(1.2);\n opacity: 1;\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes toastTextSlide {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.p-toast.p-toast-top-right,\n.p-toast.p-toast-top-left,\n.p-toast.p-toast-top-center {\n top: 58px !important;\n}\n\n.p-toast.p-toast-top-right,\n.p-toast.p-toast-bottom-right {\n right: 0 !important;\n}\n\n.p-toast.p-toast-top-left,\n.p-toast.p-toast-bottom-left {\n left: 0 !important;\n}\n\n.p-toast .p-toast-message {\n margin-bottom: 8px;\n}\n\n.p-toast-message {\n font-family: \"Roboto\", sans-serif;\n position: relative;\n height: auto;\n border: none;\n border-radius: 4px;\n background: #151f26 !important;\n color: #eef4f6;\n overflow: hidden;\n isolation: isolate;\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38), 0 0 22px -12px var(--toast-accent), inset 0 1px 0 rgba(255, 255, 255, 0.06);\n animation: toastSlideIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;\n transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n.p-toast-message::before {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: -1;\n border-radius: inherit;\n pointer-events: none;\n background: radial-gradient(126px 46px at 20px 50%, color-mix(in srgb, var(--toast-accent) 9%, transparent), transparent 72%);\n}\n.p-toast-message::after {\n content: \"\";\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 2px;\n z-index: 1;\n pointer-events: none;\n transform-origin: left center;\n background: var(--toast-accent);\n box-shadow: 0 0 5px var(--toast-accent);\n animation: toastTimerBar var(--toast-life, 3s) linear forwards;\n transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n.p-toast-message:hover:not(.toast--no-hover-pause) {\n background: color-mix(in srgb, var(--toast-accent) 15%, #151f26) !important;\n box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42), 0 0 28px -8px var(--toast-accent), inset 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n.p-toast-message:hover:not(.toast--no-hover-pause)::after {\n animation-play-state: paused;\n box-shadow: 0 0 9px var(--toast-accent);\n}\n\n.p-toast.p-toast-top-right .p-toast-message,\n.p-toast.p-toast-bottom-right .p-toast-message {\n border-radius: 4px 0 0 4px;\n}\n\n.p-toast.p-toast-top-left .p-toast-message,\n.p-toast.p-toast-bottom-left .p-toast-message {\n border-radius: 0 4px 4px 0;\n}\n\n.p-toast.p-toast-top-right .p-toast-message,\n.p-toast.p-toast-bottom-right .p-toast-message {\n margin-left: auto;\n margin-right: 0;\n}\n\n.p-toast.p-toast-top-left .p-toast-message,\n.p-toast.p-toast-bottom-left .p-toast-message {\n margin-right: auto;\n margin-left: 0;\n}\n\n@keyframes toastTimerBar {\n from {\n transform: scaleX(1);\n }\n to {\n transform: scaleX(0);\n }\n}\n.p-toast-message.toast-timer-restart::after {\n animation: none;\n animation: toastTimerBar var(--toast-life, 3s) linear forwards;\n}\n\n.p-toast-message.toast-type--processing::after {\n animation: none;\n opacity: 0;\n}\n\n@keyframes toastSlideIn {\n from {\n opacity: 0;\n transform: translateX(14px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n.p-toast-message {\n display: grid;\n grid-template-rows: 1fr;\n}\n\n.p-toast-message > * {\n min-height: 0;\n}\n\n.p-toast .p-toast-message.p-toast-message-exit-active {\n grid-template-rows: 0fr;\n margin-bottom: 0 !important;\n opacity: 0;\n transform: translateX(16px);\n animation: none !important;\n transition: opacity 0.16s ease-out, transform 0.2s ease-out, grid-template-rows 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, margin-bottom 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;\n}\n\n@keyframes toastTextSlide {\n from {\n opacity: 0;\n transform: translateX(-5px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n@keyframes toastIconPop {\n from {\n opacity: 0;\n transform: scale(0.7);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n.p-toast-message-success {\n --toast-accent: #4ec33d;\n}\n\n.p-toast-message-error {\n --toast-accent: #ff6b5e;\n}\n\n.p-toast-message-warn {\n --toast-accent: #f5b447;\n}\n\n.p-toast-message-info {\n --toast-accent: #56b6e4;\n}\n\n.p-toast-message.toast-type--warning {\n --toast-accent: #f5b447;\n}\n\n.p-toast-message.toast-type--processing {\n --toast-accent: #b8b5ff;\n}\n\n.p-toast-message-error {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 30px -8px var(--toast-accent), inset 0 1px 0 rgba(255, 255, 255, 0.09);\n}\n.p-toast-message-error::before {\n background: radial-gradient(126px 46px at 20px 50%, color-mix(in srgb, var(--toast-accent) 17%, transparent), transparent 72%);\n}\n\n.p-toast-message.toast-type--processing .toast-icon-wrapper {\n animation: toastIconPop 0.34s cubic-bezier(0.4, 0, 0.2, 1) 0.12s both, toastBreathe 2.8s ease-in-out 0.6s infinite;\n}\n.p-toast-message.toast-type--processing .toast-icon-wrapper i {\n animation: toastSlowSpin 2.6s linear infinite;\n}\n\n@keyframes toastSlowSpin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes toastBreathe {\n 0%, 100% {\n filter: drop-shadow(0 0 3px var(--toast-accent));\n }\n 50% {\n filter: drop-shadow(0 0 7px var(--toast-accent));\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .p-toast-message,\n .p-toast-message.toast-type--processing .toast-icon-wrapper,\n .p-toast-message.toast-type--processing .toast-icon-wrapper i {\n animation: none !important;\n }\n .p-toast-message::after {\n animation: none;\n transform: scaleX(0.5);\n }\n}\n.p-toast-message-content {\n position: relative;\n z-index: 1;\n padding: 7px 10px;\n border-radius: inherit;\n background: transparent;\n}\n\n.toast-root {\n display: flex;\n align-items: flex-start;\n width: 100%;\n gap: 9px;\n}\n\n.toast-left {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.toast-left .p-toast-icon-close {\n order: 3;\n}\n\n.toast-icon-wrapper {\n position: relative;\n width: 16px;\n height: 16px;\n min-width: 16px;\n min-height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border-radius: 0;\n overflow: visible;\n animation: toastIconPop 0.34s cubic-bezier(0.4, 0, 0.2, 1) 0.12s both;\n filter: drop-shadow(0 0 4px var(--toast-accent));\n}\n.toast-icon-wrapper i {\n color: var(--toast-accent);\n font-size: 16px;\n line-height: 1;\n z-index: 1;\n}\n\n.toast-body {\n flex: 1;\n min-width: 0;\n line-height: 1.4;\n font-size: 12.5px;\n color: #eef4f6;\n animation: toastTextSlide 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0.16s both;\n}\n\n.toast-body > *:first-child {\n padding-right: 26px;\n}\n\n.p-toast-message:has(.toast-actions-top) .toast-body > *:first-child {\n padding-right: 48px;\n}\n\n.toast-title {\n font-weight: 600;\n font-size: 12.5px;\n line-height: 1.4;\n color: #eef4f6;\n margin-bottom: 0;\n}\n\n.toast-title + .toast-message {\n margin-top: 2px;\n font-size: 11.5px;\n line-height: 1.45;\n color: #a4b7bf;\n}\n\n.toast-message {\n padding-right: 0;\n font-size: 12.5px;\n color: #eef4f6;\n}\n\n.toast-toggle-btn, .p-toast-message .p-toast-icon-close {\n width: 18px;\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 4px;\n background-color: rgba(255, 255, 255, 0.09);\n color: #a4b7bf;\n cursor: pointer;\n transition: color 180ms cubic-bezier(0.4, 0, 0.2, 1), background-color 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-toggle-btn:hover, .p-toast-message .p-toast-icon-close:hover, .toast-toggle-btn:focus-visible, .p-toast-message .p-toast-icon-close:focus-visible {\n color: #eef4f6;\n background-color: rgba(255, 255, 255, 0.2);\n}\n.toast-toggle-btn:focus-visible, .p-toast-message .p-toast-icon-close:focus-visible {\n outline: 1px solid var(--toast-accent);\n outline-offset: 1px;\n}\n\n.p-toast-message .p-toast-icon-close {\n position: absolute;\n top: 7px;\n right: 8px;\n z-index: 2;\n}\n.p-toast-message .p-toast-icon-close svg, .p-toast-message .p-toast-icon-close .p-icon {\n width: 11px;\n height: 11px;\n}\n\n.toast-actions-top {\n position: absolute;\n top: 7px;\n right: 30px;\n display: flex;\n align-items: center;\n z-index: 2;\n}\n\n.toast-toggle-icon {\n width: 10px;\n height: 10px;\n min-width: 10px;\n min-height: 10px;\n transform: rotate(45deg);\n}\n\n.p-toast-message .maximize-button-container {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n\n.p-toast-message.toast_s--compact {\n width: fit-content;\n min-width: 0;\n max-width: 400px;\n margin-left: auto;\n}\n.p-toast-message.toast_s--compact .p-toast-message-content {\n display: flex;\n align-items: center;\n padding: 7px 10px;\n gap: 9px;\n}\n.p-toast-message.toast_s--compact .toast-actions-top {\n position: static;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.p-toast-message.toast_s--compact .p-toast-icon-close {\n position: static;\n flex-shrink: 0;\n}\n.p-toast-message.toast_s--compact .toast-body {\n padding-right: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.p-toast-message.toast_s--large {\n width: auto;\n min-width: auto;\n}\n.p-toast-message.toast_s--large .p-toast-message-content {\n padding: 11px 13px 12px 10px;\n}\n.p-toast-message.toast_s--large .toast-root {\n align-items: flex-start;\n}\n.p-toast-message.toast_s--large .toast-icon-wrapper {\n margin-top: 1px;\n}\n\n.toast-percentage {\n margin-top: 9px;\n width: 100%;\n}\n\n.toast-percentage-label {\n font-size: 11px;\n color: #7d919b;\n margin-bottom: 4px;\n text-align: right;\n width: 100%;\n}\n\n.toast-percentage-bar {\n height: 3px;\n background-color: rgba(255, 255, 255, 0.12);\n border-radius: 999px;\n overflow: hidden;\n width: 100%;\n}\n\n.toast-percentage-bar-fill {\n height: 100%;\n background-color: var(--toast-accent);\n box-shadow: 0 0 6px var(--toast-accent);\n border-radius: 999px;\n transition: width 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.toast-link {\n margin-top: 8px;\n}\n\n.toast-link a {\n font-size: 11.5px;\n font-weight: 500;\n color: var(--toast-accent);\n text-decoration: none;\n border-bottom: 1px solid currentColor;\n padding-bottom: 1px;\n transition: opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-link a:hover {\n opacity: 0.75;\n}\n\n.toast-links {\n margin-top: 8px;\n padding-left: 14px;\n}\n\n.toast-links li {\n margin-bottom: 4px;\n}\n\n.toast-links a {\n font-size: 11.5px;\n color: var(--toast-accent);\n text-decoration: none;\n border-bottom: 1px solid currentColor;\n transition: opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-links a:hover {\n opacity: 0.75;\n}\n\n.toast-attached-files {\n margin-top: 9px;\n}\n\n.toast-attached-files-title {\n font-size: 10.5px;\n font-weight: 600;\n letter-spacing: 0.04em;\n color: #7d919b;\n margin-bottom: 4px;\n}\n\n.toast-attached-files-list {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.toast-attached-files-list li {\n margin-bottom: 4px;\n}\n\n.toast-attached-files-list a {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11.5px;\n color: #a4b7bf;\n text-decoration: none;\n border-bottom: 1px solid transparent;\n transition: color 180ms cubic-bezier(0.4, 0, 0.2, 1), border-color 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-attached-files-list a .pi-paperclip {\n font-size: 11px;\n color: #7d919b;\n flex-shrink: 0;\n}\n.toast-attached-files-list a:hover {\n color: #eef4f6;\n border-bottom-color: currentColor;\n}";
47843
+ var css_248z$4 = "@keyframes fadeIn {\n from {\n opacity: 0;\n transform: scale(0.85);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes toastSlideIn {\n from {\n opacity: 0;\n transform: translateX(40px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes toastIconPop {\n 0% {\n transform: scale(0);\n opacity: 0;\n }\n 60% {\n transform: scale(1.2);\n opacity: 1;\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes toastTextSlide {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.p-toast.p-toast-top-right,\n.p-toast.p-toast-top-left,\n.p-toast.p-toast-top-center {\n top: 58px !important;\n}\n\n.p-toast.p-toast-top-right,\n.p-toast.p-toast-bottom-right {\n right: 0 !important;\n}\n\n.p-toast.p-toast-top-left,\n.p-toast.p-toast-bottom-left {\n left: 0 !important;\n}\n\n.p-toast .p-toast-message {\n margin-bottom: 8px;\n}\n\n.p-toast-message {\n font-family: \"Roboto\", sans-serif;\n position: relative;\n height: auto;\n border: none;\n border-radius: 4px;\n background: #151f26 !important;\n color: #eef4f6;\n overflow: hidden;\n isolation: isolate;\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38), 0 0 22px -12px var(--toast-accent), inset 0 1px 0 rgba(255, 255, 255, 0.06);\n animation: toastSlideIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;\n transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n.p-toast-message::before {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: -1;\n border-radius: inherit;\n pointer-events: none;\n background: radial-gradient(126px 46px at 20px 50%, color-mix(in srgb, var(--toast-accent) 9%, transparent), transparent 72%);\n}\n.p-toast-message::after {\n content: \"\";\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 2px;\n z-index: 1;\n pointer-events: none;\n transform-origin: left center;\n background: var(--toast-accent);\n box-shadow: 0 0 5px var(--toast-accent);\n animation: toastTimerBar var(--toast-life, 3s) linear forwards;\n transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n.p-toast-message:hover:not(.toast--no-hover-pause) {\n background: color-mix(in srgb, var(--toast-accent) 15%, #151f26) !important;\n box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42), 0 0 28px -8px var(--toast-accent), inset 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n.p-toast-message:hover:not(.toast--no-hover-pause)::after {\n animation-play-state: paused;\n box-shadow: 0 0 9px var(--toast-accent);\n}\n\n.p-toast.p-toast-top-right .p-toast-message,\n.p-toast.p-toast-bottom-right .p-toast-message {\n border-radius: 4px 0 0 4px;\n}\n\n.p-toast.p-toast-top-left .p-toast-message,\n.p-toast.p-toast-bottom-left .p-toast-message {\n border-radius: 0 4px 4px 0;\n}\n\n.p-toast.p-toast-top-right .p-toast-message,\n.p-toast.p-toast-bottom-right .p-toast-message {\n margin-left: auto;\n margin-right: 0;\n}\n\n.p-toast.p-toast-top-left .p-toast-message,\n.p-toast.p-toast-bottom-left .p-toast-message {\n margin-right: auto;\n margin-left: 0;\n}\n\n@keyframes toastTimerBar {\n from {\n transform: scaleX(1);\n }\n to {\n transform: scaleX(0);\n }\n}\n.p-toast-message.toast-timer-restart::after {\n animation: none;\n animation: toastTimerBar var(--toast-life, 3s) linear forwards;\n}\n\n.p-toast-message.toast-type--processing::after {\n animation: none;\n opacity: 0;\n}\n\n@property --toast-accent {\n syntax: \"<color>\";\n inherits: true;\n initial-value: #56b6e4;\n}\n.p-toast .p-toast-message.toast--suivi {\n transition: --toast-accent 0.45s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.toast-suivi {\n display: contents;\n}\n\n.p-toast-message.toast--sticky::after {\n animation: none;\n opacity: 0;\n}\n\n@keyframes toastSlideIn {\n from {\n opacity: 0;\n transform: translateX(14px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n.p-toast-message {\n display: grid;\n grid-template-rows: 1fr;\n}\n\n.p-toast-message > * {\n min-height: 0;\n}\n\n.p-toast .p-toast-message.p-toast-message-exit-active {\n grid-template-rows: 0fr;\n margin-bottom: 0 !important;\n opacity: 0;\n transform: translateX(16px);\n animation: none !important;\n transition: opacity 0.16s ease-out, transform 0.2s ease-out, grid-template-rows 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, margin-bottom 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;\n}\n\n@keyframes toastTextSlide {\n from {\n opacity: 0;\n transform: translateX(-5px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n@keyframes toastIconPop {\n from {\n opacity: 0;\n transform: scale(0.7);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n.p-toast-message-success {\n --toast-accent: #4ec33d;\n}\n\n.p-toast-message-error {\n --toast-accent: #ff6b5e;\n}\n\n.p-toast-message-warn {\n --toast-accent: #f5b447;\n}\n\n.p-toast-message-info {\n --toast-accent: #56b6e4;\n}\n\n.p-toast-message.toast-type--warning {\n --toast-accent: #f5b447;\n}\n\n.p-toast-message.toast-type--processing {\n --toast-accent: #b8b5ff;\n}\n\n.p-toast-message-error {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 30px -8px var(--toast-accent), inset 0 1px 0 rgba(255, 255, 255, 0.09);\n}\n.p-toast-message-error::before {\n background: radial-gradient(126px 46px at 20px 50%, color-mix(in srgb, var(--toast-accent) 17%, transparent), transparent 72%);\n}\n\n.p-toast-message.toast-type--processing .toast-icon-wrapper {\n animation: toastIconPop 0.34s cubic-bezier(0.4, 0, 0.2, 1) 0.12s both, toastBreathe 2.8s ease-in-out 0.6s infinite;\n}\n.p-toast-message.toast-type--processing .toast-icon-wrapper i {\n animation: toastSlowSpin 2.6s linear infinite;\n}\n\n@keyframes toastSlowSpin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes toastBreathe {\n 0%, 100% {\n filter: drop-shadow(0 0 3px var(--toast-accent));\n }\n 50% {\n filter: drop-shadow(0 0 7px var(--toast-accent));\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .p-toast-message,\n .p-toast-message.toast-type--processing .toast-icon-wrapper,\n .p-toast-message.toast-type--processing .toast-icon-wrapper i {\n animation: none !important;\n }\n .p-toast-message::after {\n animation: none;\n transform: scaleX(0.5);\n }\n}\n.p-toast-message-content {\n position: relative;\n z-index: 1;\n padding: 7px 10px;\n border-radius: inherit;\n background: transparent;\n}\n\n.toast-root {\n display: flex;\n align-items: flex-start;\n width: 100%;\n gap: 9px;\n}\n\n.toast-left {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.toast-left .p-toast-icon-close {\n order: 3;\n}\n\n.toast-icon-wrapper {\n position: relative;\n width: 16px;\n height: 16px;\n min-width: 16px;\n min-height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border-radius: 0;\n overflow: visible;\n animation: toastIconPop 0.34s cubic-bezier(0.4, 0, 0.2, 1) 0.12s both;\n filter: drop-shadow(0 0 4px var(--toast-accent));\n}\n.toast-icon-wrapper i {\n color: var(--toast-accent);\n font-size: 16px;\n line-height: 1;\n z-index: 1;\n}\n\n.toast-body {\n flex: 1;\n min-width: 0;\n line-height: 1.4;\n font-size: 12.5px;\n color: #eef4f6;\n animation: toastTextSlide 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0.16s both;\n}\n\n.toast-body > *:first-child {\n padding-right: 26px;\n}\n\n.p-toast-message:has(.toast-actions-top) .toast-body > *:first-child {\n padding-right: 48px;\n}\n\n.toast-title {\n font-weight: 600;\n font-size: 12.5px;\n line-height: 1.4;\n color: #eef4f6;\n margin-bottom: 0;\n}\n\n.toast-title + .toast-message {\n margin-top: 2px;\n font-size: 11.5px;\n line-height: 1.45;\n color: #a4b7bf;\n}\n\n.toast-message {\n padding-right: 0;\n font-size: 12.5px;\n color: #eef4f6;\n}\n\n.toast-toggle-btn, .p-toast-message .p-toast-icon-close {\n width: 18px;\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 4px;\n background-color: rgba(255, 255, 255, 0.09);\n color: #a4b7bf;\n cursor: pointer;\n transition: color 180ms cubic-bezier(0.4, 0, 0.2, 1), background-color 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-toggle-btn:hover, .p-toast-message .p-toast-icon-close:hover, .toast-toggle-btn:focus-visible, .p-toast-message .p-toast-icon-close:focus-visible {\n color: #eef4f6;\n background-color: rgba(255, 255, 255, 0.2);\n}\n.toast-toggle-btn:focus-visible, .p-toast-message .p-toast-icon-close:focus-visible {\n outline: 1px solid var(--toast-accent);\n outline-offset: 1px;\n}\n\n.p-toast-message .p-toast-icon-close {\n position: absolute;\n top: 7px;\n right: 8px;\n z-index: 2;\n}\n.p-toast-message .p-toast-icon-close svg, .p-toast-message .p-toast-icon-close .p-icon {\n width: 11px;\n height: 11px;\n}\n\n.toast-actions-top {\n position: absolute;\n top: 7px;\n right: 30px;\n display: flex;\n align-items: center;\n z-index: 2;\n}\n\n.toast-toggle-icon {\n width: 10px;\n height: 10px;\n min-width: 10px;\n min-height: 10px;\n transform: rotate(45deg);\n}\n\n.p-toast-message .maximize-button-container {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n\n.p-toast-message.toast_s--compact {\n width: fit-content;\n min-width: 0;\n max-width: 400px;\n margin-left: auto;\n}\n.p-toast-message.toast_s--compact .p-toast-message-content {\n display: flex;\n align-items: center;\n padding: 7px 10px;\n gap: 9px;\n}\n.p-toast-message.toast_s--compact .toast-actions-top {\n position: static;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.p-toast-message.toast_s--compact .p-toast-icon-close {\n position: static;\n flex-shrink: 0;\n}\n.p-toast-message.toast_s--compact .toast-body {\n padding-right: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.p-toast-message.toast_s--large {\n width: auto;\n min-width: auto;\n}\n.p-toast-message.toast_s--large .p-toast-message-content {\n padding: 11px 13px 12px 10px;\n}\n.p-toast-message.toast_s--large .toast-root {\n align-items: flex-start;\n}\n.p-toast-message.toast_s--large .toast-icon-wrapper {\n margin-top: 1px;\n}\n\n.toast-percentage {\n margin-top: 9px;\n width: 100%;\n}\n\n.toast-percentage-label {\n font-size: 11px;\n color: #7d919b;\n margin-bottom: 4px;\n text-align: right;\n width: 100%;\n}\n\n.toast-percentage-bar {\n height: 3px;\n background-color: rgba(255, 255, 255, 0.12);\n border-radius: 999px;\n overflow: hidden;\n width: 100%;\n}\n\n.toast-percentage-bar-fill {\n height: 100%;\n background-color: var(--toast-accent);\n box-shadow: 0 0 6px var(--toast-accent);\n border-radius: 999px;\n transition: width 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.toast-link {\n margin-top: 8px;\n}\n\n.toast-link a {\n font-size: 11.5px;\n font-weight: 500;\n color: var(--toast-accent);\n text-decoration: none;\n border-bottom: 1px solid currentColor;\n padding-bottom: 1px;\n transition: opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-link a:hover {\n opacity: 0.75;\n}\n\n.toast-links {\n margin-top: 8px;\n padding-left: 14px;\n}\n\n.toast-links li {\n margin-bottom: 4px;\n}\n\n.toast-links a {\n font-size: 11.5px;\n color: var(--toast-accent);\n text-decoration: none;\n border-bottom: 1px solid currentColor;\n transition: opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-links a:hover {\n opacity: 0.75;\n}\n\n.toast-attached-files {\n margin-top: 9px;\n}\n\n.toast-attached-files-title {\n font-size: 10.5px;\n font-weight: 600;\n letter-spacing: 0.04em;\n color: #7d919b;\n margin-bottom: 4px;\n}\n\n.toast-attached-files-list {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.toast-attached-files-list li {\n margin-bottom: 4px;\n}\n\n.toast-attached-files-list a {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11.5px;\n color: #a4b7bf;\n text-decoration: none;\n border-bottom: 1px solid transparent;\n transition: color 180ms cubic-bezier(0.4, 0, 0.2, 1), border-color 180ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.toast-attached-files-list a .pi-paperclip {\n font-size: 11px;\n color: #7d919b;\n flex-shrink: 0;\n}\n.toast-attached-files-list a:hover {\n color: #eef4f6;\n border-bottom-color: currentColor;\n}";
47840
47844
  styleInject(css_248z$4);
47841
47845
 
47842
47846
  var ToastPresets = {
@@ -48341,6 +48345,211 @@ var Toast = function Toast(_ref4) {
48341
48345
  // Singleton pour l'empilement des toasts
48342
48346
  var toastRef = null;
48343
48347
  var container = null;
48348
+
48349
+ // ────────────────────────────────────────────────────────
48350
+ // Toasts suivis (option `id`) : UNE carte qui évolue.
48351
+ //
48352
+ // Ex. suivi d'une tâche : en attente → en cours → terminée. Plutôt que
48353
+ // retirer la carte et en afficher une nouvelle (sortie + entrée, qui se
48354
+ // chevauchent sur une tâche rapide), on garde la carte PrimeReact et on
48355
+ // fait évoluer son contenu : l'accent glisse vers la nouvelle couleur
48356
+ // (`@property --toast-accent`, toast.scss), le pictogramme et le texte
48357
+ // rejouent leur entrée. Chaque étape reste lisible au moins
48358
+ // DUREE_MIN_ETAPE ; les étapes arrivées entre-temps sont sautées, seule
48359
+ // la plus récente s'affiche.
48360
+ //
48361
+ // Le décompte est géré ici et non par PrimeReact : son `life` est armé une
48362
+ // fois pour toutes au montage, or une étape collante (« en cours ») peut
48363
+ // devenir une étape qui expire (« terminée »), et inversement.
48364
+ // ────────────────────────────────────────────────────────
48365
+ var DUREE_MIN_ETAPE = 700;
48366
+
48367
+ // id → { props, abonnes, message, afficheA, prochain, minuteurEtape, fin, el }
48368
+ var toastsSuivis = new Map();
48369
+ var severityDe = function severityDe(type) {
48370
+ return type === 'processing' ? 'info' : type;
48371
+ };
48372
+ var CLASSES_TYPE = /^(toast-type--.+|p-toast-message-(info|success|error|warn|warning|processing|settingError))$/;
48373
+ var appliquerApparence = function appliquerApparence(el, props) {
48374
+ _toConsumableArray$8(el.classList).filter(function (c) {
48375
+ return CLASSES_TYPE.test(c);
48376
+ }).forEach(function (c) {
48377
+ return el.classList.remove(c);
48378
+ });
48379
+ el.classList.add("toast-type--".concat(props.type), "p-toast-message-".concat(severityDe(props.type)));
48380
+ el.classList.toggle('toast--sticky', !props.duration || Boolean(props.sticky));
48381
+ el.classList.toggle(NO_HOVER_PAUSE_CLASS, hoverPauseClass(props) !== '');
48382
+ };
48383
+ var arreterFin = function arreterFin(suivi) {
48384
+ if (suivi.fin) clearTimeout(suivi.fin.minuteur);
48385
+ suivi.fin = null;
48386
+ };
48387
+ var oublierSuivi = function oublierSuivi(id, suivi) {
48388
+ arreterFin(suivi);
48389
+ clearTimeout(suivi.minuteurEtape);
48390
+ if (toastsSuivis.get(id) === suivi) toastsSuivis["delete"](id);
48391
+ };
48392
+ var retirerSuivi = function retirerSuivi(id, suivi) {
48393
+ var _toastRef;
48394
+ oublierSuivi(id, suivi);
48395
+ if (suivi.message) (_toastRef = toastRef) === null || _toastRef === void 0 || _toastRef.remove(suivi.message);
48396
+ };
48397
+
48398
+ // Décompte de l'étape affichée (rien pour une étape collante), et filet de temps relancé
48399
+ var armerFin = function armerFin(id, suivi) {
48400
+ arreterFin(suivi);
48401
+ var _suivi$props = suivi.props,
48402
+ duration = _suivi$props.duration,
48403
+ sticky = _suivi$props.sticky;
48404
+ if (!duration || sticky) return;
48405
+ suivi.fin = {
48406
+ reste: duration,
48407
+ debut: Date.now(),
48408
+ minuteur: setTimeout(function () {
48409
+ return retirerSuivi(id, suivi);
48410
+ }, duration)
48411
+ };
48412
+ var el = suivi.el;
48413
+ if (el) {
48414
+ el.style.setProperty('--toast-life', duration + 'ms');
48415
+ el.classList.remove('toast-timer-restart');
48416
+ void el.offsetHeight;
48417
+ el.classList.add('toast-timer-restart');
48418
+ }
48419
+ };
48420
+
48421
+ // Pause au survol, comme PrimeReact le fait pour les toasts ordinaires (le filet s'arrête en CSS)
48422
+ var brancherPauseSurvol = function brancherPauseSurvol(id, suivi, el) {
48423
+ el.addEventListener('mouseenter', function () {
48424
+ if (!suivi.fin || el.classList.contains(NO_HOVER_PAUSE_CLASS)) return;
48425
+ clearTimeout(suivi.fin.minuteur);
48426
+ suivi.fin.reste -= Date.now() - suivi.fin.debut;
48427
+ });
48428
+ el.addEventListener('mouseleave', function () {
48429
+ if (!suivi.fin || el.classList.contains(NO_HOVER_PAUSE_CLASS)) return;
48430
+ suivi.fin.debut = Date.now();
48431
+ suivi.fin.minuteur = setTimeout(function () {
48432
+ return retirerSuivi(id, suivi);
48433
+ }, Math.max(0, suivi.fin.reste));
48434
+ });
48435
+ };
48436
+ var ToastSuiviContent = function ToastSuiviContent(_ref5) {
48437
+ var id = _ref5.id,
48438
+ suivi = _ref5.suivi;
48439
+ var _useState = useState({
48440
+ props: suivi.props,
48441
+ version: 0
48442
+ }),
48443
+ _useState2 = _slicedToArray$b(_useState, 2),
48444
+ etat = _useState2[0],
48445
+ setEtat = _useState2[1];
48446
+ var ref = useRef(null);
48447
+ useEffect(function () {
48448
+ var abonne = function abonne(props) {
48449
+ return setEtat(function (e) {
48450
+ return {
48451
+ props: props,
48452
+ version: e.version + 1
48453
+ };
48454
+ });
48455
+ };
48456
+ suivi.abonnes.add(abonne);
48457
+ return function () {
48458
+ return suivi.abonnes["delete"](abonne);
48459
+ };
48460
+ }, [suivi]);
48461
+ useLayoutEffect(function () {
48462
+ var _ref$current;
48463
+ var el = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.closest('.p-toast-message');
48464
+ if (!el) return;
48465
+ if (suivi.el !== el) {
48466
+ suivi.el = el;
48467
+ brancherPauseSurvol(id, suivi, el);
48468
+ }
48469
+ appliquerApparence(el, etat.props);
48470
+ armerFin(id, suivi);
48471
+ }, [etat]);
48472
+ var props = etat.props;
48473
+ // `key` : à chaque étape le contenu est remonté, pictogramme et texte rejouent leur entrée
48474
+ return /*#__PURE__*/React__default.createElement("div", {
48475
+ ref: ref,
48476
+ className: "toast-suivi"
48477
+ }, /*#__PURE__*/React__default.createElement(ToastContent, {
48478
+ key: etat.version,
48479
+ type: props.type,
48480
+ icon: props.icon,
48481
+ enableHtmlContent: props.enableHtmlContent,
48482
+ title: props.title,
48483
+ message: props.message,
48484
+ closeOnLinkClick: props.closeOnLinkClick,
48485
+ size: props.size,
48486
+ sizeModulable: false,
48487
+ isExpanded: props.size === 'L',
48488
+ link: props.link,
48489
+ links: props.links,
48490
+ attachedFiles: props.attachedFiles,
48491
+ enablePercentage: props.enablePercentage,
48492
+ percentage: props.percentage
48493
+ }));
48494
+ };
48495
+ var afficherSuivi = function afficherSuivi(id, props) {
48496
+ var existant = toastsSuivis.get(id);
48497
+ if (existant) {
48498
+ // Mise à jour en place, pas avant que l'étape affichée ait été lisible
48499
+ existant.prochain = props;
48500
+ if (existant.minuteurEtape) return;
48501
+ var attente = existant.afficheA ? Math.max(0, existant.afficheA + DUREE_MIN_ETAPE - Date.now()) : DUREE_MIN_ETAPE;
48502
+ existant.minuteurEtape = setTimeout(function () {
48503
+ existant.minuteurEtape = null;
48504
+ if (toastsSuivis.get(id) !== existant) return;
48505
+ existant.props = existant.prochain;
48506
+ existant.prochain = null;
48507
+ existant.afficheA = Date.now();
48508
+ existant.abonnes.forEach(function (abonne) {
48509
+ return abonne(existant.props);
48510
+ });
48511
+ }, attente);
48512
+ return;
48513
+ }
48514
+ var suivi = {
48515
+ props: props,
48516
+ abonnes: new Set(),
48517
+ message: null,
48518
+ afficheA: null,
48519
+ prochain: null,
48520
+ minuteurEtape: null,
48521
+ fin: null,
48522
+ el: null
48523
+ };
48524
+ toastsSuivis.set(id, suivi);
48525
+ setTimeout(function () {
48526
+ var _toastRef2;
48527
+ if (toastsSuivis.get(id) !== suivi) return;
48528
+ var sizeClass = props.size === "S" ? "toast_s--compact" : "";
48529
+ suivi.message = {
48530
+ severity: severityDe(props.type),
48531
+ // Jamais d'expiration côté PrimeReact : voir armerFin
48532
+ sticky: true,
48533
+ className: "".concat(sizeClass, " toast--suivi toast-type--").concat(props.type).concat(hoverPauseClass(props)),
48534
+ closable: props.closable,
48535
+ content: function content() {
48536
+ return /*#__PURE__*/React__default.createElement(ToastSuiviContent, {
48537
+ id: id,
48538
+ suivi: suivi
48539
+ });
48540
+ }
48541
+ };
48542
+ suivi.afficheA = Date.now();
48543
+ (_toastRef2 = toastRef) === null || _toastRef2 === void 0 || _toastRef2.show(suivi.message);
48544
+ }, 0);
48545
+ };
48546
+
48547
+ // Toast fermé (croix, durée écoulée, clic sur un lien) : son id redevient libre
48548
+ var oublierMessage = function oublierMessage(message) {
48549
+ toastsSuivis.forEach(function (suivi, id) {
48550
+ if (suivi.message === message) oublierSuivi(id, suivi);
48551
+ });
48552
+ };
48344
48553
  var ToastContainer = function ToastContainer() {
48345
48554
  var ref = useRef(null);
48346
48555
  useEffect(function () {
@@ -48350,54 +48559,93 @@ var ToastContainer = function ToastContainer() {
48350
48559
  ref: ref,
48351
48560
  position: DEFAULTS.position,
48352
48561
  onMouseEnter: preventHoverPause,
48353
- onMouseLeave: preventHoverPause
48562
+ onMouseLeave: preventHoverPause,
48563
+ onRemove: oublierMessage
48354
48564
  });
48355
48565
  };
48566
+
48567
+ /**
48568
+ * Retire le toast affiché sous cet `id` (voir l'option `id` de showToast).
48569
+ * Sans effet si aucun toast ne porte cet id.
48570
+ */
48571
+ var removeToast = function removeToast(id) {
48572
+ var suivi = toastsSuivis.get(id);
48573
+ if (suivi) retirerSuivi(id, suivi);
48574
+ };
48575
+
48576
+ /**
48577
+ * Affiche un toast empilé sous les précédents.
48578
+ * `id` (optionnel) : un toast portant déjà cet id n'est pas doublé, il évolue en place vers le
48579
+ * nouveau contenu (ex. suivi d'une tâche : en attente → en cours → terminée). Voir removeToast(id).
48580
+ * Un toast suivi ne propose pas le bouton de taille (`sizeModulable`).
48581
+ */
48356
48582
  var showToast = function showToast() {
48357
- var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
48358
- _ref5$type = _ref5.type,
48359
- type = _ref5$type === void 0 ? DEFAULTS.type : _ref5$type,
48360
- _ref5$duration = _ref5.duration,
48361
- duration = _ref5$duration === void 0 ? DEFAULTS.duration : _ref5$duration,
48362
- _ref5$closable = _ref5.closable,
48363
- closable = _ref5$closable === void 0 ? DEFAULTS.closable : _ref5$closable,
48364
- sticky = _ref5.sticky,
48365
- title = _ref5.title,
48366
- message = _ref5.message,
48367
- closeOnLinkClick = _ref5.closeOnLinkClick,
48368
- icon = _ref5.icon,
48369
- _ref5$enableHtmlConte = _ref5.enableHtmlContent,
48370
- enableHtmlContent = _ref5$enableHtmlConte === void 0 ? false : _ref5$enableHtmlConte,
48371
- size = _ref5.size,
48372
- _ref5$sizeModulable = _ref5.sizeModulable,
48373
- sizeModulable = _ref5$sizeModulable === void 0 ? false : _ref5$sizeModulable,
48374
- link = _ref5.link,
48375
- links = _ref5.links,
48376
- attachedFiles = _ref5.attachedFiles,
48377
- _ref5$enablePercentag = _ref5.enablePercentage,
48378
- enablePercentage = _ref5$enablePercentag === void 0 ? false : _ref5$enablePercentag,
48379
- _ref5$percentage = _ref5.percentage,
48380
- percentage = _ref5$percentage === void 0 ? 0 : _ref5$percentage,
48381
- pauseOnHover = _ref5.pauseOnHover;
48583
+ var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
48584
+ id = _ref6.id,
48585
+ _ref6$type = _ref6.type,
48586
+ type = _ref6$type === void 0 ? DEFAULTS.type : _ref6$type,
48587
+ _ref6$duration = _ref6.duration,
48588
+ duration = _ref6$duration === void 0 ? DEFAULTS.duration : _ref6$duration,
48589
+ _ref6$closable = _ref6.closable,
48590
+ closable = _ref6$closable === void 0 ? DEFAULTS.closable : _ref6$closable,
48591
+ sticky = _ref6.sticky,
48592
+ title = _ref6.title,
48593
+ message = _ref6.message,
48594
+ closeOnLinkClick = _ref6.closeOnLinkClick,
48595
+ icon = _ref6.icon,
48596
+ _ref6$enableHtmlConte = _ref6.enableHtmlContent,
48597
+ enableHtmlContent = _ref6$enableHtmlConte === void 0 ? false : _ref6$enableHtmlConte,
48598
+ size = _ref6.size,
48599
+ _ref6$sizeModulable = _ref6.sizeModulable,
48600
+ sizeModulable = _ref6$sizeModulable === void 0 ? false : _ref6$sizeModulable,
48601
+ link = _ref6.link,
48602
+ links = _ref6.links,
48603
+ attachedFiles = _ref6.attachedFiles,
48604
+ _ref6$enablePercentag = _ref6.enablePercentage,
48605
+ enablePercentage = _ref6$enablePercentag === void 0 ? false : _ref6$enablePercentag,
48606
+ _ref6$percentage = _ref6.percentage,
48607
+ percentage = _ref6$percentage === void 0 ? 0 : _ref6$percentage,
48608
+ pauseOnHover = _ref6.pauseOnHover;
48382
48609
  if (!container) {
48383
48610
  container = document.createElement('div');
48384
48611
  document.body.appendChild(container);
48385
48612
  ReactDOM.render(/*#__PURE__*/React__default.createElement(ToastContainer, null), container);
48386
48613
  }
48614
+ if (id !== undefined && id !== null) {
48615
+ afficherSuivi(id, {
48616
+ type: type,
48617
+ duration: duration,
48618
+ closable: closable,
48619
+ sticky: sticky,
48620
+ title: title,
48621
+ message: message,
48622
+ closeOnLinkClick: closeOnLinkClick,
48623
+ icon: icon,
48624
+ enableHtmlContent: enableHtmlContent,
48625
+ size: size,
48626
+ link: link,
48627
+ links: links,
48628
+ attachedFiles: attachedFiles,
48629
+ enablePercentage: enablePercentage,
48630
+ percentage: percentage,
48631
+ pauseOnHover: pauseOnHover
48632
+ });
48633
+ return;
48634
+ }
48387
48635
 
48388
48636
  // État local de taille pour ce toast
48389
48637
  var currentSize = size;
48390
48638
  var _showWithSize = function showWithSize(sz) {
48391
- var _toastRef2;
48639
+ var _toastRef4;
48392
48640
  var sizeClass = sz === "S" ? "toast_s--compact" : sizeModulable && sz === "L" ? "toast_s--large" : "";
48393
48641
  var expanded = sz === "L";
48394
48642
  var handleToggleSize = function handleToggleSize() {
48395
- var _toastRef;
48396
- (_toastRef = toastRef) === null || _toastRef === void 0 || _toastRef.clear();
48643
+ var _toastRef3;
48644
+ (_toastRef3 = toastRef) === null || _toastRef3 === void 0 || _toastRef3.clear();
48397
48645
  currentSize = currentSize === "S" ? "L" : "S";
48398
48646
  _showWithSize(currentSize);
48399
48647
  };
48400
- (_toastRef2 = toastRef) === null || _toastRef2 === void 0 || _toastRef2.show({
48648
+ (_toastRef4 = toastRef) === null || _toastRef4 === void 0 || _toastRef4.show({
48401
48649
  severity: type === 'processing' ? 'info' : type,
48402
48650
  life: duration,
48403
48651
  sticky: sticky,
@@ -48448,6 +48696,7 @@ var showToast = function showToast() {
48448
48696
  };
48449
48697
  if (typeof window !== 'undefined') {
48450
48698
  window.showArengibookToast = showToast;
48699
+ window.removeArengibookToast = removeToast;
48451
48700
  window.ArengibookToastPresets = ToastPresets;
48452
48701
  }
48453
48702
 
@@ -59461,8 +59710,9 @@ var Table$1 = function Table(_ref18) {
59461
59710
  onAdd === null || onAdd === void 0 || onAdd(newRow, updated);
59462
59711
  // L'utilisateur doit voir immédiatement la ligne insérée : saut sur la page qui
59463
59712
  // la contient (pagination client) puis scroll du viewport au point d'insertion.
59464
- // NB : avec un tri actif, la position affichée peut différer de la position dans
59465
- // le tableau de données ; une pagination lazy/serveur demanderait une autre approche.
59713
+ // Avec un tri actif, la ligne reste aussi en tête/en fin à l'affichage : l'ordre
59714
+ // trié est figé et les lignes nouvelles s'y ajoutent du même côté (`trierFige`).
59715
+ // Une pagination lazy/serveur demanderait une autre approche.
59466
59716
  if (paginator) {
59467
59717
  var index = addRowPosition === 'start' ? 0 : updated.length - 1;
59468
59718
  setFirst(Math.floor(index / pageRows) * pageRows);
@@ -60422,6 +60672,118 @@ var Table$1 = function Table(_ref18) {
60422
60672
  globalFilter: globalFilter
60423
60673
  }, overrides));
60424
60674
  }, [lazy, first, pageRows, lazySort, filters, globalFilter]);
60675
+
60676
+ // ── Tri FIGE, a la maniere d'Excel (RNGBK-156) ──────────────────────────────
60677
+ // Un tri classe les lignes UNE fois, au moment ou il est applique. Ensuite,
60678
+ // l'ordre ne bouge plus : une ligne ajoutee reste la ou elle est apparue (en
60679
+ // bas, ou en haut avec `addRowPosition="start"`), une ligne modifiee garde sa
60680
+ // place. Sans ca, PrimeReact retriait a chaque rendu et la ligne en cours de
60681
+ // saisie filait a sa place alphabetique — l'utilisateur la perdait de vue,
60682
+ // parfois sur une autre page.
60683
+ //
60684
+ // `ordreTriRef` retient le rang de chaque ligne (par id) pour le tri courant.
60685
+ // Il est remis a nul a chaque tri demande (`appliquerTri`, « Réappliquer le
60686
+ // tri ») et recalcule au rendu suivant. Le tri reste affiche comme actif.
60687
+ var ordreTriRef = useRef(null); // { field, order, rangs: Map<id, rang> }
60688
+ var _useState95 = useState(0),
60689
+ _useState96 = _slicedToArray$b(_useState95, 2),
60690
+ setTriVersion = _useState96[1];
60691
+
60692
+ // Le tri tel que PrimeReact le fait par defaut (meme comparateur, vides en bas).
60693
+ var trierFrais = function trierFrais(rows, field, order) {
60694
+ var comparateur = ObjectUtils.localeComparator(PrimeReact$2.locale);
60695
+ var valeurs = new Map(rows.map(function (r) {
60696
+ return [r, ObjectUtils.resolveFieldData(r, field)];
60697
+ }));
60698
+ return _toConsumableArray$8(rows).sort(function (a, b) {
60699
+ return ObjectUtils.sort(valeurs.get(a), valeurs.get(b), order, comparateur, PrimeReact$2.nullSortOrder);
60700
+ });
60701
+ };
60702
+
60703
+ // `sortFunction` de toutes les colonnes triables : PrimeReact l'appelle a chaque
60704
+ // rendu, a la place de son propre tri.
60705
+ var trierFige = function trierFige(_ref33) {
60706
+ var rows = _ref33.data,
60707
+ field = _ref33.field,
60708
+ order = _ref33.order;
60709
+ var fige = ordreTriRef.current;
60710
+ // L'ordre fige ne vaut que pour CE tri, et que s'il connait encore au moins
60711
+ // une ligne : si l'application a remplace tout le jeu de donnees, on retrie.
60712
+ var valide = fige && fige.field === field && fige.order === order && rows.some(function (r) {
60713
+ return fige.rangs.has(r.id);
60714
+ });
60715
+ if (!valide) {
60716
+ var triees = trierFrais(rows, field, order);
60717
+ ordreTriRef.current = {
60718
+ field: field,
60719
+ order: order,
60720
+ rangs: new Map(triees.map(function (r, i) {
60721
+ return [r.id, i];
60722
+ }))
60723
+ };
60724
+ return triees;
60725
+ }
60726
+ var connues = rows.filter(function (r) {
60727
+ return fige.rangs.has(r.id);
60728
+ }).sort(function (a, b) {
60729
+ return fige.rangs.get(a.id) - fige.rangs.get(b.id);
60730
+ });
60731
+ var nouvelles = rows.filter(function (r) {
60732
+ return !fige.rangs.has(r.id);
60733
+ });
60734
+ return addRowPosition === 'start' ? [].concat(_toConsumableArray$8(nouvelles), _toConsumableArray$8(connues)) : [].concat(_toConsumableArray$8(connues), _toConsumableArray$8(nouvelles));
60735
+ };
60736
+
60737
+ // L'ordre affiche n'est-il plus celui qu'un tri frais donnerait ? (ligne ajoutee
60738
+ // ou modifiee depuis). Sert a proposer « Réappliquer le tri » dans le menu.
60739
+ var triPerime = function triPerime() {
60740
+ if (lazy || !activeSort || !ordreTriRef.current) return false;
60741
+ var field = activeSort.field,
60742
+ order = activeSort.order;
60743
+ var affiche = trierFige({
60744
+ data: displayData,
60745
+ field: field,
60746
+ order: order
60747
+ });
60748
+ var frais = trierFrais(displayData, field, order);
60749
+ return affiche.some(function (r, i) {
60750
+ return r !== frais[i];
60751
+ });
60752
+ };
60753
+
60754
+ // Applique un tri — ou le retire avec `field` nul. Le tri est CONTROLE dans les
60755
+ // deux modes : le clic d'en-tete (via `onSort`) et le menu de colonne passent
60756
+ // tous deux ici. En non-lazy, c'etait le seul moyen de retirer un tri croissant
60757
+ // en une action (RNGBK-155) : PrimeReact n'expose aucune methode pour effacer
60758
+ // un tri simple, son cycle `removableSort` impose croissant → decroissant → aucun.
60759
+ // PrimeReact trie toujours les donnees lui-meme hors lazy (il lit alors
60760
+ // `sortField`/`sortOrder` dans les props).
60761
+ var appliquerTri = function appliquerTri(field, order) {
60762
+ var sortField = field || null;
60763
+ var sortOrder = sortField ? order : null;
60764
+ // Tout tri demande — meme identique au courant — repart d'un ordre frais.
60765
+ ordreTriRef.current = null;
60766
+ setTriVersion(function (v) {
60767
+ return v + 1;
60768
+ });
60769
+ if (lazy) {
60770
+ setLazySort({
60771
+ sortField: sortField,
60772
+ sortOrder: sortOrder
60773
+ });
60774
+ setFirst(0);
60775
+ fireLazy({
60776
+ first: 0,
60777
+ sortField: sortField,
60778
+ sortOrder: sortOrder
60779
+ });
60780
+ } else {
60781
+ setActiveSort(sortField ? {
60782
+ field: sortField,
60783
+ order: sortOrder
60784
+ } : null);
60785
+ }
60786
+ };
60425
60787
  // Chargement initial : seulement si l'app n'a pas fourni la première page.
60426
60788
  useEffect(function () {
60427
60789
  if (lazy && (!value || value.length === 0)) fireLazy({
@@ -60549,10 +60911,10 @@ var Table$1 = function Table(_ref18) {
60549
60911
  locale: lang,
60550
60912
  placeholder: translate('arengibook.table.filter.dateRange', labels),
60551
60913
  onChange: function onChange(e) {
60552
- var _ref33 = Array.isArray(e.value) ? e.value : [],
60553
- _ref34 = _slicedToArray$b(_ref33, 2),
60554
- f = _ref34[0],
60555
- t = _ref34[1];
60914
+ var _ref34 = Array.isArray(e.value) ? e.value : [],
60915
+ _ref35 = _slicedToArray$b(_ref34, 2),
60916
+ f = _ref35[0],
60917
+ t = _ref35[1];
60556
60918
  // En vue mois/année, le calendrier rend le 1er du mois/de l'année choisi :
60557
60919
  // la borne de fin est portée au DERNIER jour, sinon « mars → mai »
60558
60920
  // exclurait le 15 mai.
@@ -60754,10 +61116,10 @@ var Table$1 = function Table(_ref18) {
60754
61116
 
60755
61117
  var linkTemplate = useCallback(function (col) {
60756
61118
  return function (rowData) {
60757
- var _ref36, _col$href2;
61119
+ var _ref37, _col$href2;
60758
61120
  var label = rowData[col.field];
60759
61121
  if (col.type === 'titleLink') {
60760
- var _ref35, _col$href;
61122
+ var _ref36, _col$href;
60761
61123
  // ─────────────────────────────────────────────────────────────────
60762
61124
  // Le titre est un LIEN quand une cible existe.
60763
61125
  //
@@ -60769,7 +61131,7 @@ var Table$1 = function Table(_ref18) {
60769
61131
  // Sans cible, on garde un <span> : un titre en couleur de lien qui ne
60770
61132
  // mene nulle part est un mensonge.
60771
61133
  // ─────────────────────────────────────────────────────────────────
60772
- var cible = typeof col.href === 'function' ? col.href(rowData) : (_ref35 = (_col$href = col.href) !== null && _col$href !== void 0 ? _col$href : rowData[col.field + 'Url']) !== null && _ref35 !== void 0 ? _ref35 : null;
61134
+ var cible = typeof col.href === 'function' ? col.href(rowData) : (_ref36 = (_col$href = col.href) !== null && _col$href !== void 0 ? _col$href : rowData[col.field + 'Url']) !== null && _ref36 !== void 0 ? _ref36 : null;
60773
61135
  return /*#__PURE__*/React__default.createElement("div", {
60774
61136
  className: "ab-titre-box",
60775
61137
  style: {
@@ -60784,7 +61146,7 @@ var Table$1 = function Table(_ref18) {
60784
61146
  className: "table-item-title cell-text"
60785
61147
  }, label));
60786
61148
  }
60787
- var href = typeof col.href === 'function' ? col.href(rowData) : (_ref36 = (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : rowData[col.field + 'Url']) !== null && _ref36 !== void 0 ? _ref36 : '#';
61149
+ var href = typeof col.href === 'function' ? col.href(rowData) : (_ref37 = (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : rowData[col.field + 'Url']) !== null && _ref37 !== void 0 ? _ref37 : '#';
60788
61150
  return /*#__PURE__*/React__default.createElement("div", {
60789
61151
  className: "ab-titre-box",
60790
61152
  style: {
@@ -60876,13 +61238,13 @@ var Table$1 = function Table(_ref18) {
60876
61238
  }, []);
60877
61239
  var lienFormulaireTemplate = useCallback(function (col) {
60878
61240
  return function (rowData) {
60879
- var _col$options5, _ref37, _opt$label, _ref38, _col$href3;
61241
+ var _col$options5, _ref38, _opt$label, _ref39, _col$href3;
60880
61242
  var val = rowData[col.field];
60881
61243
  var opt = (_col$options5 = col.options) === null || _col$options5 === void 0 ? void 0 : _col$options5.find(function (o) {
60882
61244
  return o.value === val;
60883
61245
  });
60884
- var label = (_ref37 = (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : val) !== null && _ref37 !== void 0 ? _ref37 : '';
60885
- var href = typeof col.href === 'function' ? col.href(rowData) : (_ref38 = (_col$href3 = col.href) !== null && _col$href3 !== void 0 ? _col$href3 : opt === null || opt === void 0 ? void 0 : opt.href) !== null && _ref38 !== void 0 ? _ref38 : null;
61246
+ var label = (_ref38 = (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : val) !== null && _ref38 !== void 0 ? _ref38 : '';
61247
+ var href = typeof col.href === 'function' ? col.href(rowData) : (_ref39 = (_col$href3 = col.href) !== null && _col$href3 !== void 0 ? _col$href3 : opt === null || opt === void 0 ? void 0 : opt.href) !== null && _ref39 !== void 0 ? _ref39 : null;
60886
61248
  if (!label) return '';
60887
61249
  return /*#__PURE__*/React__default.createElement("div", {
60888
61250
  style: {
@@ -61432,10 +61794,10 @@ var Table$1 = function Table(_ref18) {
61432
61794
  });
61433
61795
  if (option) {
61434
61796
  var extra = {};
61435
- Object.entries(col.updates).forEach(function (_ref39) {
61436
- var _ref40 = _slicedToArray$b(_ref39, 2),
61437
- targetField = _ref40[0],
61438
- optionProp = _ref40[1];
61797
+ Object.entries(col.updates).forEach(function (_ref40) {
61798
+ var _ref41 = _slicedToArray$b(_ref40, 2),
61799
+ targetField = _ref41[0],
61800
+ optionProp = _ref41[1];
61439
61801
  if (option[optionProp] !== undefined) extra[targetField] = option[optionProp];
61440
61802
  });
61441
61803
  enrichedRow = _objectSpread2(_objectSpread2({}, newRowData), extra);
@@ -61595,10 +61957,10 @@ var Table$1 = function Table(_ref18) {
61595
61957
  return opt.value === v;
61596
61958
  });
61597
61959
  if (option) {
61598
- Object.entries(col.updates).forEach(function (_ref41) {
61599
- var _ref42 = _slicedToArray$b(_ref41, 2),
61600
- tf = _ref42[0],
61601
- op = _ref42[1];
61960
+ Object.entries(col.updates).forEach(function (_ref42) {
61961
+ var _ref43 = _slicedToArray$b(_ref42, 2),
61962
+ tf = _ref43[0],
61963
+ op = _ref43[1];
61602
61964
  if (option[op] !== undefined) enrichedFields[tf] = option[op];
61603
61965
  });
61604
61966
  }
@@ -62104,14 +62466,14 @@ var Table$1 = function Table(_ref18) {
62104
62466
  className: "ab-menu__filet"
62105
62467
  })), actionsSecondaires.length > 0 && /*#__PURE__*/React__default.createElement("div", {
62106
62468
  className: "ab-menu__titre"
62107
- }, translate('arengibook.table.selection.onTable', labels)), actionsSecondaires.map(function (_ref43) {
62108
- var key = _ref43.key,
62109
- icon = _ref43.icon,
62110
- label = _ref43.label,
62111
- title = _ref43.title,
62112
- disabled = _ref43.disabled,
62113
- danger = _ref43.danger,
62114
- action = _ref43.action;
62469
+ }, translate('arengibook.table.selection.onTable', labels)), actionsSecondaires.map(function (_ref44) {
62470
+ var key = _ref44.key,
62471
+ icon = _ref44.icon,
62472
+ label = _ref44.label,
62473
+ title = _ref44.title,
62474
+ disabled = _ref44.disabled,
62475
+ danger = _ref44.danger,
62476
+ action = _ref44.action;
62115
62477
  return /*#__PURE__*/React__default.createElement("button", {
62116
62478
  key: key,
62117
62479
  type: "button",
@@ -62279,9 +62641,9 @@ var Table$1 = function Table(_ref18) {
62279
62641
  }, {
62280
62642
  key: 'fit',
62281
62643
  label: translate('arengibook.table.settings.rowHeightFit', labels)
62282
- }].map(function (_ref44) {
62283
- var key = _ref44.key,
62284
- label = _ref44.label;
62644
+ }].map(function (_ref45) {
62645
+ var key = _ref45.key,
62646
+ label = _ref45.label;
62285
62647
  return /*#__PURE__*/React__default.createElement("button", {
62286
62648
  key: key,
62287
62649
  type: "button",
@@ -62320,9 +62682,9 @@ var Table$1 = function Table(_ref18) {
62320
62682
  }, {
62321
62683
  key: 'fit',
62322
62684
  label: translate('arengibook.table.settings.rowHeightFit', labels)
62323
- }].map(function (_ref45) {
62324
- var key = _ref45.key,
62325
- label = _ref45.label;
62685
+ }].map(function (_ref46) {
62686
+ var key = _ref46.key,
62687
+ label = _ref46.label;
62326
62688
  return /*#__PURE__*/React__default.createElement("button", {
62327
62689
  key: key,
62328
62690
  type: "button",
@@ -62353,9 +62715,9 @@ var Table$1 = function Table(_ref18) {
62353
62715
  }, {
62354
62716
  key: 'center',
62355
62717
  label: translate('arengibook.table.settings.alignCenter', labels)
62356
- }].map(function (_ref46) {
62357
- var key = _ref46.key,
62358
- label = _ref46.label;
62718
+ }].map(function (_ref47) {
62719
+ var key = _ref47.key,
62720
+ label = _ref47.label;
62359
62721
  return /*#__PURE__*/React__default.createElement("button", {
62360
62722
  key: key,
62361
62723
  type: "button",
@@ -62468,20 +62830,11 @@ var Table$1 = function Table(_ref18) {
62468
62830
  },
62469
62831
  lazy: lazy,
62470
62832
  totalRecords: lazy ? totalRecords : undefined,
62471
- sortField: lazy ? lazySort.sortField : undefined,
62472
- sortOrder: lazy ? lazySort.sortOrder : undefined,
62473
- onSort: lazy ? function (e) {
62474
- setLazySort({
62475
- sortField: e.sortField,
62476
- sortOrder: e.sortOrder
62477
- });
62478
- setFirst(0);
62479
- fireLazy({
62480
- first: 0,
62481
- sortField: e.sortField,
62482
- sortOrder: e.sortOrder
62483
- });
62484
- } : undefined,
62833
+ sortField: lazy ? lazySort.sortField : activeSort ? activeSort.field : undefined,
62834
+ sortOrder: lazy ? lazySort.sortOrder : activeSort ? activeSort.order : undefined,
62835
+ onSort: function onSort(e) {
62836
+ return appliquerTri(e.sortField, e.sortOrder);
62837
+ },
62485
62838
  loading: loading,
62486
62839
  emptyMessage: translate('arengibook.table.empty', labels),
62487
62840
  stripedRows: stripedRows,
@@ -62539,10 +62892,10 @@ var Table$1 = function Table(_ref18) {
62539
62892
  stateKey: DT_STATE_KEY,
62540
62893
  stateStorage: "custom",
62541
62894
  customSaveState: function customSaveState(state) {
62542
- // Capture du tri actif (pour griser « Réordonner » — cf. onReorderClick).
62543
- // customSaveState est appelé par PrimeReact à chaque changement d'état
62544
- // (dont le tri) : on y lit sortField sans contrôler le tri (ajouter onSort
62545
- // basculerait le tri en mode contrôlé et casserait le tri interne).
62895
+ // Recopie du tri actif (le tri est contrôlé, cf. `appliquerTri`) :
62896
+ // en lazy, `activeSort` n'est alimenté que par ici — il sert à
62897
+ // griser « Réordonner » et au menu de colonne. En non-lazy, c'est
62898
+ // déjà la valeur courante : `same` évite un rendu inutile.
62546
62899
  {
62547
62900
  var nextSort = state.sortField ? {
62548
62901
  field: state.sortField,
@@ -62873,7 +63226,7 @@ var Table$1 = function Table(_ref18) {
62873
63226
  columnKey: "__row_actions__",
62874
63227
  header: inline ? actionsCol.actionsHeader || '' : '',
62875
63228
  body: function body(rowData) {
62876
- var _ref47, _linkCol$href;
63229
+ var _ref48, _linkCol$href;
62877
63230
  var rowActions = rowData[actionsCol.actionsField] || [];
62878
63231
  if (inline) {
62879
63232
  return /*#__PURE__*/React__default.createElement(RowActionsInlineCell, {
@@ -62887,7 +63240,7 @@ var Table$1 = function Table(_ref18) {
62887
63240
  var linkCol = columns.find(function (c) {
62888
63241
  return c.type === 'titleLink' || c.type === 'link';
62889
63242
  });
62890
- var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref47 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref47 !== void 0 ? _ref47 : null : null;
63243
+ var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref48 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref48 !== void 0 ? _ref48 : null : null;
62891
63244
  return /*#__PURE__*/React__default.createElement(RowActionsCell, {
62892
63245
  actions: rowActions,
62893
63246
  rowData: rowData,
@@ -62949,6 +63302,7 @@ var Table$1 = function Table(_ref18) {
62949
63302
  frozen: colonnesGelees.has(col.field),
62950
63303
  alignFrozen: "left",
62951
63304
  sortable: col.sortable !== false,
63305
+ sortFunction: trierFige,
62952
63306
  field: col.field,
62953
63307
  sortField: getSortField(col)
62954
63308
  // ─────────────────────────────────────────────────────
@@ -63168,25 +63522,42 @@ var Table$1 = function Table(_ref18) {
63168
63522
  }, /*#__PURE__*/React__default.createElement("div", {
63169
63523
  className: "ab-menu"
63170
63524
  }, function () {
63171
- var triCourant = activeSort && activeSort.field === menuColonne.field ? activeSort.order : 0;
63172
- var libelle = triCourant === 1 ? translate('arengibook.table.settings.sortDesc', labels) : triCourant === -1 ? translate('arengibook.table.settings.sortNone', labels) : translate('arengibook.table.settings.sortAsc', labels);
63173
- var icone = triCourant === 1 ? 'arrow_downward' : triCourant === -1 ? 'sort' : 'arrow_upward';
63174
- return /*#__PURE__*/React__default.createElement("button", {
63525
+ var field = menuColonne.field;
63526
+ var triCourant = activeSort && activeSort.field === field ? activeSort.order : 0;
63527
+ var versDesc = triCourant === 1;
63528
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("button", {
63175
63529
  type: "button",
63176
63530
  className: "ab-menu__item".concat(triCourant !== 0 ? ' is-actif' : ''),
63177
63531
  onClick: function onClick() {
63178
- var _thDeLaColonne;
63179
63532
  // Le menu RESTE ouvert : on enchaine souvent
63180
63533
  // deux actions sur la meme colonne, et le
63181
63534
  // libelle du tri se met a jour sur place —
63182
63535
  // « croissant » devient « decroissant ».
63183
- (_thDeLaColonne = thDeLaColonne(menuColonne.field)) === null || _thDeLaColonne === void 0 || (_thDeLaColonne = _thDeLaColonne.querySelector('[data-pc-section="sort"]')) === null || _thDeLaColonne === void 0 || _thDeLaColonne.dispatchEvent(new MouseEvent('click', {
63184
- bubbles: true
63185
- }));
63536
+ appliquerTri(field, versDesc ? -1 : 1);
63186
63537
  }
63187
63538
  }, /*#__PURE__*/React__default.createElement("span", {
63188
63539
  className: "material-icons"
63189
- }, icone), libelle);
63540
+ }, versDesc ? 'arrow_downward' : 'arrow_upward'), versDesc ? translate('arengibook.table.settings.sortDesc', labels) : translate('arengibook.table.settings.sortAsc', labels)), triCourant !== 0 && triPerime() && /*#__PURE__*/React__default.createElement("button", {
63541
+ type: "button",
63542
+ className: "ab-menu__item",
63543
+ onClick: function onClick() {
63544
+ appliquerTri(field, triCourant);
63545
+ setMenuColonne(null);
63546
+ }
63547
+ }, /*#__PURE__*/React__default.createElement("span", {
63548
+ className: "material-icons"
63549
+ }, "refresh"), translate('arengibook.table.settings.sortReapply', labels)), triCourant !== 0 && /*#__PURE__*/React__default.createElement("button", {
63550
+ type: "button",
63551
+ className: "ab-menu__item",
63552
+ onClick: function onClick() {
63553
+ // Ici le menu se FERME : retirer le tri
63554
+ // clot l'intention sur cette colonne.
63555
+ appliquerTri(null);
63556
+ setMenuColonne(null);
63557
+ }
63558
+ }, /*#__PURE__*/React__default.createElement("span", {
63559
+ className: "material-icons"
63560
+ }, "sort"), translate('arengibook.table.settings.sortNone', labels)));
63190
63561
  }(), /*#__PURE__*/React__default.createElement("div", {
63191
63562
  className: "ab-menu__filet"
63192
63563
  }), freezableColumns && /*#__PURE__*/React__default.createElement("button", {
@@ -67040,6 +67411,19 @@ var getCaretRangeAtVisualEnd = function getCaretRangeAtVisualEnd(tagify) {
67040
67411
  range.collapse(true);
67041
67412
  return range;
67042
67413
  };
67414
+
67415
+ // Point d'insertion d'une référence ou d'un opérateur : là où l'utilisateur a laissé
67416
+ // son curseur dans le champ (RNGBK-158), sinon la fin. `caretRef` retient la dernière
67417
+ // sélection faite DANS le champ : cliquer sur « + » ou dans le menu la déplace hors du
67418
+ // champ, d'où la mémorisation. Une sélection non vide (ex. le « a » de max(a, b)) est
67419
+ // remplacée — Tagify vide la plage avant d'insérer.
67420
+ var getInsertionRange = function getInsertionRange(tagify, saved) {
67421
+ var input = tagify.DOM.input;
67422
+ if (saved && input.contains(saved.startContainer) && input.contains(saved.endContainer)) {
67423
+ return saved.cloneRange();
67424
+ }
67425
+ return getCaretRangeAtVisualEnd(tagify);
67426
+ };
67043
67427
  var expressionToTagifyMix = function expressionToTagifyMix(expr, whitelist) {
67044
67428
  expr = expr || '';
67045
67429
  expr = expr.replace(/field\(\s*(\d+)\s*\)/g, function (m, id) {
@@ -67098,6 +67482,7 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
67098
67482
  var menuRef = useRef(null);
67099
67483
  var onChangeRef = useRef(onChange);
67100
67484
  onChangeRef.current = onChange;
67485
+ var caretRef = useRef(null); // dernière sélection faite dans le champ (cf. getInsertionRange)
67101
67486
  var _useState = useState(null),
67102
67487
  _useState2 = _slicedToArray$b(_useState, 2),
67103
67488
  popover = _useState2[0],
@@ -67263,7 +67648,24 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
67263
67648
  console.error('[ExpressionEditor] échec d\'initialisation Tagify :', err);
67264
67649
  setInitError(err && err.message ? err.message : String(err));
67265
67650
  }
67651
+
67652
+ // Mémorise le curseur tant qu'il est dans le champ ; une sélection ailleurs
67653
+ // (bouton « + », menu, reste de la page) ne l'efface pas.
67654
+ var memoriserCurseur = function memoriserCurseur() {
67655
+ var sel = window.getSelection();
67656
+ var input = tagify && tagify.DOM && tagify.DOM.input;
67657
+ if (!input || !sel || !sel.rangeCount) {
67658
+ return;
67659
+ }
67660
+ var range = sel.getRangeAt(0);
67661
+ if (input.contains(range.startContainer) && input.contains(range.endContainer)) {
67662
+ caretRef.current = range.cloneRange();
67663
+ }
67664
+ };
67665
+ document.addEventListener('selectionchange', memoriserCurseur);
67266
67666
  return function () {
67667
+ document.removeEventListener('selectionchange', memoriserCurseur);
67668
+ caretRef.current = null;
67267
67669
  if (operatorTagObserver) {
67268
67670
  operatorTagObserver.disconnect();
67269
67671
  }
@@ -67292,7 +67694,7 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
67292
67694
  return;
67293
67695
  }
67294
67696
  tagify.state.tag = null;
67295
- var range = getCaretRangeAtVisualEnd(tagify);
67697
+ var range = getInsertionRange(tagify, caretRef.current);
67296
67698
  tagify.state.selection = {
67297
67699
  anchorOffset: range.startOffset,
67298
67700
  anchorNode: range.startContainer,
@@ -67309,7 +67711,7 @@ var ExpressionEditor = function ExpressionEditor(_ref) {
67309
67711
  return;
67310
67712
  }
67311
67713
  tagify.state.tag = null;
67312
- var range = getCaretRangeAtVisualEnd(tagify);
67714
+ var range = getInsertionRange(tagify, caretRef.current);
67313
67715
  tagify.state.selection = {
67314
67716
  anchorOffset: range.startOffset,
67315
67717
  anchorNode: range.startContainer,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "3.4.3-main",
4
+ "version": "3.4.5-main",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {