arengibook 3.0.1 → 3.1.0

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 +113 -192
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5881,10 +5881,7 @@ function _iterableToArrayLimit$a(r, l) {
5881
5881
  f = true,
5882
5882
  o = false;
5883
5883
  try {
5884
- if (i = (t = t.call(r)).next, 0 === l) {
5885
- if (Object(t) !== t) return;
5886
- f = !1;
5887
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
5884
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
5888
5885
  } catch (r) {
5889
5886
  o = true, n = r;
5890
5887
  } finally {
@@ -13410,20 +13407,9 @@ var css_248z$4 = "@charset \"UTF-8\";\n/* WRAPPER GLOBAL */\n.dp-month
13410
13407
  styleInject(css_248z$4);
13411
13408
 
13412
13409
  var _excluded$4 = ["value", "onChange", "placeholder", "dateFormat", "view", "invalid", "errorMessage", "disabled", "locale", "showTime", "showIcon", "icon", "iconBgButton", "iconPos", "name", "id", "fullWidth", "inputProps", "onBlur", "onSelect", "onClick"];
13413
-
13414
- // const normalizeDate = (v) => {
13415
- // if (!v) return null;
13416
- // return v instanceof Date ? v : new Date(v);
13417
- // };
13418
13410
  var normalizeDate = function normalizeDate(v) {
13419
13411
  if (!v) return null;
13420
- if (v instanceof Date) return v;
13421
- var _v$split$map = v.split('-').map(Number),
13422
- _v$split$map2 = _slicedToArray$a(_v$split$map, 3),
13423
- y = _v$split$map2[0],
13424
- m = _v$split$map2[1],
13425
- d = _v$split$map2[2];
13426
- return new Date(y, m - 1, d);
13412
+ return v instanceof Date ? v : new Date(v);
13427
13413
  };
13428
13414
  var CustomCalendar = /*#__PURE__*/forwardRef(function (props, ref) {
13429
13415
  return /*#__PURE__*/React__default.createElement(Calendar, _extends$G({}, props, {
@@ -43011,87 +42997,76 @@ var Toast$1 = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (in
43011
42997
  }));
43012
42998
  Toast$1.displayName = 'Toast';
43013
42999
 
43014
- var css_248z = ".p-toast-message {\n height:auto;\n}\n.p-toast-message.heightoastlarge {\n min-height:50px;\n}\n.p-toast-message.heightoastmedium {\n max-height:100px;\n overflow: hidden;\n}\n\n.p-toast-message.toast_s--compact {\n width: 116px;\n min-width: 56px;\n padding-right: 0;\n position: relative;\n}\n\n.p-toast-message.toast_s--compact .p-toast-message-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.5rem;\n}\n\n.p-toast-message.toast_s--compact .maximize-button {\n margin-right: 20px;\n}\n\n.p-toast-message.toast_s--compact .p-toast-icon-close {\n position: absolute;\n top: 4px;\n right: 4px;\n}\n\n\n.p-toast-message.toast_s--large {\n width: auto;\n min-width: auto;\n padding-right: inherit;\n}\n\n.p-toast-message.toast_s--large .p-toast-message-content {\n display: flex;\n align-items: center;\n padding: 1rem;\n gap: 0.75rem;\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--large .p-toast-icon-close {\n position: static;\n margin-left: 0.5rem;\n}\n\n/* Title */\n\n.toast-title {\n font-weight: 600;\n font-size: 0.95rem;\n line-height: 1.3;\n color: #111827; /* gris très foncé / quasi noir */\n margin-bottom: 0.25rem;\n}\n\n\n.toast-root {\n display: flex;\n align-items: flex-start;\n width: 100%;\n gap: 0.75rem;\n}\n.toast-left {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n flex-shrink: 0;\n}\n.toast-body {\n line-height: 1.4;\n}\n.toast-action-btn {\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n}\n.p-toast-message-content {\n position: relative;\n}\n.p-toast-icon-close {\n position: static;\n}\n.toast-left .p-toast-icon-close {\n order: 3;\n}\n/* Toast - Percentage */\n.toast-percentage {\n margin-top: 0.5rem;\n width: 100%;\n}\n\n.toast-percentage-label {\n font-size: 0.875rem;\n color: #6b7280;\n margin-bottom: 0.25rem;\n text-align: right;\n width: 100%;\n}\n\n.toast-percentage-bar {\n height: 6px;\n background-color: #e5e7eb;\n border-radius: 999px;\n overflow: hidden;\n width: 100%;\n}\n\n.toast-percentage-bar-fill {\n height: 100%;\n background-color: #3b82f6;\n transition: width 0.3s ease;\n}\n\n/* Link */\n\n.toast-link {\n margin-top: 0.5rem;\n}\n\n.toast-link a {\n font-size: 0.85rem;\n font-weight: 500;\n color: #2563eb;\n text-decoration: underline;\n}\n\n.toast-link a:hover {\n text-decoration: none;\n}\n\n/* Links */\n\n.toast-links {\n margin-top: 0.5rem;\n padding-left: 1rem;\n}\n\n.toast-links li {\n margin-bottom: 0.25rem;\n}\n\n.toast-links a {\n font-size: 0.85rem;\n color: #2563eb;\n text-decoration: underline;\n}\n\n.toast-links a:hover {\n text-decoration: none;\n}\n\n.toast-message {\n padding-right: 20px;\n}\n.p-toast-message {\n position: relative;\n}\n.p-toast-message .p-toast-icon-close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n}\n.p-toast-message .toast-action-btn {\n position: absolute;\n top: 0.5rem;\n right: 2.5rem;\n}\n\n/* AttachedFiles */\n\n.toast-attached-files {\n margin-top: 0.75rem;\n}\n\n.toast-attached-files-title {\n font-size: 0.75rem;\n font-weight: 600;\n color: #6b7280;\n margin-bottom: 0.25rem;\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: 0.25rem;\n}\n\n.toast-attached-files-list a {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n font-size: 0.85rem;\n color: #2563eb;\n text-decoration: underline;\n}\n\n.toast-attached-files-list a:hover {\n text-decoration: none;\n}\n\n";
43000
+ var css_248z = ".p-component {\n font-size: 17px;\n}\n\n.pi {\n font-size: 16px;\n}\n\n.toast-body {\n margin-left: 10px;\n overflow: hidden;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.p-toast-message {\n height:auto;\n}\n.p-toast-message.heightoastlarge {\n min-height:50px;\n}\n.p-toast-message.heightoastmedium {\n max-height:100px;\n overflow: hidden;\n}\n\n.p-toast-message.toast_s--compact {\n width: 116px;\n min-width: 56px;\n padding-right: 0;\n position: relative;\n}\n\n.p-toast-message.toast_s--compact .p-toast-message-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.5rem;\n}\n\n.p-toast-message.toast_s--compact .maximize-button {\n margin-right: 20px;\n}\n\n.p-toast-message.toast_s--compact .p-toast-icon-close {\n position: absolute;\n top: 4px;\n right: 4px;\n}\n\n\n.p-toast-message.toast_s--large {\n width: auto;\n min-width: auto;\n padding-right: inherit;\n}\n\n.p-toast-message.toast_s--large .p-toast-message-content {\n display: flex;\n align-items: center;\n padding: 1rem;\n gap: 0.75rem;\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--large .p-toast-icon-close {\n position: static;\n margin-left: 0.5rem;\n}\n\n/* Title */\n\n.toast-title {\n font-weight: 600;\n font-size: 18px;\n line-height: 1.3;\n color: #111827; /* gris très foncé / quasi noir */\n margin-bottom: 0.25rem;\n}\n\n\n.toast-root {\n display: flex;\n align-items: flex-start;\n width: 100%;\n gap: 0.75rem;\n}\n.toast-left {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n flex-shrink: 0;\n}\n.toast-body {\n line-height: 1.4;\n}\n.toast-action-btn {\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n}\n.p-toast-message-content {\n position: relative;\n}\n.p-toast-icon-close {\n position: static;\n}\n.toast-left .p-toast-icon-close {\n order: 3;\n}\n/* Toast - Percentage */\n.toast-percentage {\n margin-top: 0.5rem;\n width: 100%;\n}\n\n.toast-percentage-label {\n font-size: 0.875rem;\n color: #6b7280;\n margin-bottom: 0.25rem;\n text-align: right;\n width: 100%;\n}\n\n.toast-percentage-bar {\n height: 6px;\n background-color: #e5e7eb;\n border-radius: 999px;\n overflow: hidden;\n width: 100%;\n}\n\n.toast-percentage-bar-fill {\n height: 100%;\n background-color: #3b82f6;\n transition: width 0.3s ease;\n}\n\n/* Link */\n\n.toast-link {\n margin-top: 0.5rem;\n}\n\n.toast-link a {\n font-size: 0.85rem;\n font-weight: 500;\n color: #2563eb;\n text-decoration: underline;\n}\n\n.toast-link a:hover {\n text-decoration: none;\n}\n\n/* Links */\n\n.toast-links {\n margin-top: 0.5rem;\n padding-left: 1rem;\n}\n\n.toast-links li {\n margin-bottom: 0.25rem;\n}\n\n.toast-links a {\n font-size: 0.85rem;\n color: #2563eb;\n text-decoration: underline;\n}\n\n.toast-links a:hover {\n text-decoration: none;\n}\n\n.toast-message {\n padding-right: 20px;\n}\n.p-toast-message {\n position: relative;\n}\n.p-toast-message .p-toast-icon-close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n}\n.p-toast-message .toast-action-btn {\n position: absolute;\n top: 0.5rem;\n right: 2.5rem;\n}\n\n/* AttachedFiles */\n\n.toast-attached-files {\n margin-top: 0.75rem;\n}\n\n.toast-attached-files-title {\n font-size: 0.75rem;\n font-weight: 600;\n color: #6b7280;\n margin-bottom: 0.25rem;\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: 0.25rem;\n}\n\n.toast-attached-files-list a {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n font-size: 0.85rem;\n color: #2563eb;\n text-decoration: underline;\n}\n\n.toast-attached-files-list a:hover {\n text-decoration: none;\n}\n\n";
43015
43001
  styleInject(css_248z);
43016
43002
 
43017
- var Toast = function Toast(_ref) {
43018
- var icon = _ref.icon,
43019
- message = _ref.message,
43020
- _ref$type = _ref.type,
43021
- type = _ref$type === void 0 ? "info" : _ref$type,
43022
- _ref$size = _ref.size,
43023
- size = _ref$size === void 0 ? "M" : _ref$size,
43024
- _ref$closable = _ref.closable,
43025
- closable = _ref$closable === void 0 ? true : _ref$closable,
43026
- _ref$position = _ref.position,
43027
- position = _ref$position === void 0 ? "top-right" : _ref$position,
43028
- _ref$duration = _ref.duration,
43029
- duration = _ref$duration === void 0 ? 3000 : _ref$duration,
43030
- _ref$autoShow = _ref.autoShow,
43031
- autoShow = _ref$autoShow === void 0 ? true : _ref$autoShow,
43032
- _ref$reShowOnPropsCha = _ref.reShowOnPropsChange,
43033
- reShowOnPropsChange = _ref$reShowOnPropsCha === void 0 ? false : _ref$reShowOnPropsCha,
43034
- onSizeChange = _ref.onSizeChange,
43003
+ // Toast.jsx
43004
+ var ICONS = {
43005
+ success: "pi pi-check-circle",
43006
+ error: "pi pi-times-circle",
43007
+ settingError: "pi pi-cog pi-times-circle",
43008
+ warning: "pi pi-exclamation-triangle",
43009
+ processing: "pi pi-spinner pi-spin",
43010
+ info: "pi pi-info-circle"
43011
+ };
43012
+ var DEFAULTS = {
43013
+ type: 'info',
43014
+ closable: true,
43015
+ duration: 3000,
43016
+ position: 'top-right'
43017
+ };
43018
+ var ToastContent = function ToastContent(_ref) {
43019
+ var type = _ref.type,
43035
43020
  title = _ref.title,
43036
- sticky = _ref.sticky,
43037
- _ref$enablePercentage = _ref.enablePercentage,
43038
- enablePercentage = _ref$enablePercentage === void 0 ? false : _ref$enablePercentage,
43039
- percentage = _ref.percentage,
43040
- link = _ref.link,
43041
- links = _ref.links,
43042
- datetimecreation = _ref.datetimecreation,
43043
- sizeSModulable = _ref.sizeSModulable,
43044
- isExpanded = _ref.isExpanded,
43045
- attachedFiles = _ref.attachedFiles;
43021
+ message = _ref.message,
43022
+ closeOnLinkClick = _ref.closeOnLinkClick;
43023
+ var handleClick = closeOnLinkClick ? function (e) {
43024
+ if (e.target.tagName === 'A') {
43025
+ var _e$target$closest;
43026
+ (_e$target$closest = e.target.closest('.p-toast-message')) === null || _e$target$closest === void 0 || (_e$target$closest = _e$target$closest.querySelector('.p-toast-icon-close')) === null || _e$target$closest === void 0 || _e$target$closest.click();
43027
+ }
43028
+ } : undefined;
43029
+ return /*#__PURE__*/React__default.createElement("div", {
43030
+ className: "toast-root"
43031
+ }, /*#__PURE__*/React__default.createElement("div", {
43032
+ className: "toast-left"
43033
+ }, /*#__PURE__*/React__default.createElement("i", {
43034
+ className: ICONS[type] || ICONS.info,
43035
+ "aria-hidden": "true"
43036
+ })), /*#__PURE__*/React__default.createElement("div", {
43037
+ className: "toast-body"
43038
+ }, title && /*#__PURE__*/React__default.createElement("div", {
43039
+ className: "toast-title"
43040
+ }, title), /*#__PURE__*/React__default.createElement("div", {
43041
+ className: "toast-message"
43042
+ }, /*#__PURE__*/React__default.createElement("div", {
43043
+ className: "toast-html-content",
43044
+ dangerouslySetInnerHTML: {
43045
+ __html: message
43046
+ },
43047
+ onClick: handleClick
43048
+ }))));
43049
+ };
43050
+ var Toast = function Toast(_ref2) {
43051
+ var message = _ref2.message,
43052
+ _ref2$type = _ref2.type,
43053
+ type = _ref2$type === void 0 ? DEFAULTS.type : _ref2$type,
43054
+ _ref2$closable = _ref2.closable,
43055
+ closable = _ref2$closable === void 0 ? DEFAULTS.closable : _ref2$closable,
43056
+ _ref2$position = _ref2.position,
43057
+ position = _ref2$position === void 0 ? DEFAULTS.position : _ref2$position,
43058
+ _ref2$duration = _ref2.duration,
43059
+ duration = _ref2$duration === void 0 ? DEFAULTS.duration : _ref2$duration,
43060
+ _ref2$autoShow = _ref2.autoShow,
43061
+ autoShow = _ref2$autoShow === void 0 ? true : _ref2$autoShow,
43062
+ _ref2$reShowOnPropsCh = _ref2.reShowOnPropsChange,
43063
+ reShowOnPropsChange = _ref2$reShowOnPropsCh === void 0 ? false : _ref2$reShowOnPropsCh,
43064
+ title = _ref2.title,
43065
+ sticky = _ref2.sticky,
43066
+ _ref2$closeOnLinkClic = _ref2.closeOnLinkClick,
43067
+ closeOnLinkClick = _ref2$closeOnLinkClic === void 0 ? false : _ref2$closeOnLinkClic;
43046
43068
  var toastRef = useRef(null);
43047
43069
  var hasShownRef = useRef(false);
43048
- var progressBarRef = useRef(null);
43049
- var percentageTextRef = useRef(null);
43050
- var _useState = useState(percentage),
43051
- _useState2 = _slicedToArray$a(_useState, 2),
43052
- currentPercentage = _useState2[0],
43053
- setCurrentPercentage = _useState2[1];
43054
- var getIconByType = function getIconByType() {
43055
- switch (type) {
43056
- case "success":
43057
- return "pi pi-check-circle";
43058
- case "error":
43059
- return "pi pi-times-circle";
43060
- case "settingError":
43061
- return "pi pi-cog pi-times-circle";
43062
- case "warning":
43063
- return "pi pi-exclamation-triangle";
43064
- case "processing":
43065
- return "pi pi-spinner pi-spin";
43066
- case "info":
43067
- default:
43068
- return "pi pi-info-circle";
43069
- }
43070
- };
43071
- var handleToggleSize = function handleToggleSize() {
43072
- if (!onSizeChange) return;
43073
- if (size === "S") {
43074
- onSizeChange("L");
43075
- toastRef.current.clear();
43076
- } else if (size === "L") {
43077
- onSizeChange("S");
43078
- toastRef.current.clear();
43079
- }
43080
- };
43081
- var classNameSizeS = function classNameSizeS() {
43082
- switch (size) {
43083
- case 'S':
43084
- return "toast_s--compact";
43085
- case 'L':
43086
- if (sizeSModulable === true) {
43087
- return "toast_s--large";
43088
- } else {
43089
- return "";
43090
- }
43091
- default:
43092
- return '';
43093
- }
43094
- };
43095
43070
  useEffect(function () {
43096
43071
  if (!toastRef.current || !autoShow) return;
43097
43072
  if (hasShownRef.current && !reShowOnPropsChange) return;
@@ -43100,96 +43075,17 @@ var Toast = function Toast(_ref) {
43100
43075
  closable: closable,
43101
43076
  life: duration,
43102
43077
  sticky: sticky,
43103
- className: "".concat(classNameSizeS(), " ").concat(type === "processing" ? "toast--processing" : ""),
43104
- // toast--processing est le css à
43105
- // personnaliser pour obtenir le loader souhaité par Camille
43106
-
43107
43078
  content: function content() {
43108
- return /*#__PURE__*/React__default.createElement("div", {
43109
- className: "toast-root"
43110
- }, /*#__PURE__*/React__default.createElement("div", {
43111
- className: "toast-left"
43112
- }, /*#__PURE__*/React__default.createElement("i", {
43113
- className: icon !== null && icon !== void 0 ? icon : getIconByType(),
43114
- "aria-hidden": "true"
43115
- }), (size === "S" || size === "L" && sizeSModulable === true) && /*#__PURE__*/React__default.createElement("button", {
43116
- type: "button",
43117
- onClick: handleToggleSize,
43118
- "aria-label": isExpanded ? "Réduire" : "Agrandir",
43119
- className: "toast-action-btn"
43120
- }, /*#__PURE__*/React__default.createElement("i", {
43121
- className: isExpanded ? "pi pi-window-minimize" : "pi pi-window-maximize"
43122
- }))), size !== "S" && /*#__PURE__*/React__default.createElement("div", {
43123
- className: "toast-body"
43124
- }, title && (size === "M" || size === "L") && /*#__PURE__*/React__default.createElement("div", {
43125
- className: "toast-title"
43126
- }, title), /*#__PURE__*/React__default.createElement("div", {
43127
- className: "toast-message"
43128
- }, datetimecreation ? /*#__PURE__*/React__default.createElement("div", {
43129
- dangerouslySetInnerHTML: {
43130
- __html: message
43131
- }
43132
- }) : message), link && size === "L" && /*#__PURE__*/React__default.createElement("div", {
43133
- className: "toast-link"
43134
- }, /*#__PURE__*/React__default.createElement("a", {
43135
- href: link.url,
43136
- target: "_blank",
43137
- rel: "noopener noreferrer"
43138
- }, link.label)), Array.isArray(links) && links.length > 0 && size === "L" && /*#__PURE__*/React__default.createElement("ul", {
43139
- className: "toast-links"
43140
- }, links.map(function (link, index) {
43141
- return /*#__PURE__*/React__default.createElement("li", {
43142
- key: index
43143
- }, /*#__PURE__*/React__default.createElement("a", {
43144
- href: link.url,
43145
- target: "_blank",
43146
- rel: "noopener noreferrer"
43147
- }, link.label));
43148
- })), Array.isArray(attachedFiles) && attachedFiles.length > 0 && size === "L" && /*#__PURE__*/React__default.createElement("div", {
43149
- className: "toast-attached-files"
43150
- }, /*#__PURE__*/React__default.createElement("div", {
43151
- className: "toast-attached-files-title"
43152
- }, "Pi\xE8ces jointes"), /*#__PURE__*/React__default.createElement("ul", {
43153
- className: "toast-attached-files-list"
43154
- }, attachedFiles.map(function (file, index) {
43155
- return /*#__PURE__*/React__default.createElement("li", {
43156
- key: index
43157
- }, /*#__PURE__*/React__default.createElement("a", {
43158
- href: file.url,
43159
- target: "_blank",
43160
- rel: "noopener noreferrer"
43161
- }, /*#__PURE__*/React__default.createElement("i", {
43162
- className: "pi pi-paperclip",
43163
- "aria-hidden": "true"
43164
- }), /*#__PURE__*/React__default.createElement("span", null, file.name)));
43165
- }))), size === "L" && enablePercentage && /*#__PURE__*/React__default.createElement("div", {
43166
- className: "toast-percentage"
43167
- }, /*#__PURE__*/React__default.createElement("div", {
43168
- className: "toast-percentage-label"
43169
- }, /*#__PURE__*/React__default.createElement("span", {
43170
- ref: percentageTextRef
43171
- }, currentPercentage, "%")), /*#__PURE__*/React__default.createElement("div", {
43172
- className: "toast-percentage-bar"
43173
- }, /*#__PURE__*/React__default.createElement("div", {
43174
- ref: progressBarRef,
43175
- className: "toast-percentage-bar-fill",
43176
- style: {
43177
- width: "".concat(currentPercentage, "%")
43178
- }
43179
- })))));
43079
+ return /*#__PURE__*/React__default.createElement(ToastContent, {
43080
+ type: type,
43081
+ title: title,
43082
+ message: message,
43083
+ closeOnLinkClick: closeOnLinkClick
43084
+ });
43180
43085
  }
43181
43086
  });
43182
43087
  hasShownRef.current = true;
43183
- }, [icon, message, type, size, closable, duration, autoShow, reShowOnPropsChange, title, sticky, enablePercentage, link, datetimecreation, sizeSModulable, isExpanded]);
43184
- useEffect(function () {
43185
- setCurrentPercentage(percentage);
43186
- if (progressBarRef.current) {
43187
- progressBarRef.current.style.width = "".concat(percentage, "%");
43188
- }
43189
- if (percentageTextRef.current) {
43190
- percentageTextRef.current.textContent = "".concat(percentage, "%");
43191
- }
43192
- }, [percentage]);
43088
+ }, [message, type, closable, duration, autoShow, reShowOnPropsChange, title, sticky, closeOnLinkClick]);
43193
43089
  return /*#__PURE__*/React__default.createElement(Toast$1, {
43194
43090
  ref: toastRef,
43195
43091
  position: position
@@ -43206,28 +43102,41 @@ var ToastContainer = function ToastContainer() {
43206
43102
  }, []);
43207
43103
  return /*#__PURE__*/React__default.createElement(Toast$1, {
43208
43104
  ref: ref,
43209
- position: "top-right"
43105
+ position: DEFAULTS.position
43210
43106
  });
43211
43107
  };
43212
-
43213
- // Fonction globale simple
43214
- var showToast = function showToast(props) {
43108
+ var showToast = function showToast(_ref3) {
43109
+ var _ref3$type = _ref3.type,
43110
+ type = _ref3$type === void 0 ? DEFAULTS.type : _ref3$type,
43111
+ _ref3$duration = _ref3.duration,
43112
+ duration = _ref3$duration === void 0 ? DEFAULTS.duration : _ref3$duration,
43113
+ _ref3$closable = _ref3.closable,
43114
+ closable = _ref3$closable === void 0 ? DEFAULTS.closable : _ref3$closable,
43115
+ sticky = _ref3.sticky,
43116
+ title = _ref3.title,
43117
+ message = _ref3.message,
43118
+ closeOnLinkClick = _ref3.closeOnLinkClick;
43215
43119
  if (!container) {
43216
43120
  container = document.createElement('div');
43217
43121
  document.body.appendChild(container);
43218
43122
  ReactDOM.render(/*#__PURE__*/React__default.createElement(ToastContainer, null), container);
43219
43123
  }
43220
43124
  setTimeout(function () {
43221
- if (toastRef) {
43222
- toastRef.show({
43223
- severity: props.type || 'info',
43224
- summary: props.title || '',
43225
- detail: props.message,
43226
- life: props.duration || 3000,
43227
- sticky: props.sticky,
43228
- closable: props.closable !== false
43229
- });
43230
- }
43125
+ var _toastRef;
43126
+ (_toastRef = toastRef) === null || _toastRef === void 0 || _toastRef.show({
43127
+ severity: type,
43128
+ life: duration,
43129
+ sticky: sticky,
43130
+ closable: closable,
43131
+ content: function content() {
43132
+ return /*#__PURE__*/React__default.createElement(ToastContent, {
43133
+ type: type,
43134
+ title: title,
43135
+ message: message,
43136
+ closeOnLinkClick: closeOnLinkClick
43137
+ });
43138
+ }
43139
+ });
43231
43140
  }, 0);
43232
43141
  };
43233
43142
  if (typeof window !== 'undefined') {
@@ -43369,6 +43278,7 @@ var ToastPresets = {
43369
43278
  type: "processing",
43370
43279
  size: "L",
43371
43280
  title: "Tâche en cours",
43281
+ enableHtmlContent: true,
43372
43282
  datetimecreation: "12.01.2026 à 11h18",
43373
43283
  message: "Le programme a commencé le <strong>{{datetimecreation}}</strong>.\n\n" + "Vous serez averti par mail de la fin de son exécution.\n\n" + "Vous pouvez également suivre son exécution en cliquant sur ce lien.",
43374
43284
  closable: true,
@@ -43415,6 +43325,17 @@ var ToastPresets = {
43415
43325
  reShowOnPropsChange: true,
43416
43326
  sizeSModulable: true,
43417
43327
  enablePercentage: true
43328
+ },
43329
+ BackendHtmlContent: {
43330
+ type: "success",
43331
+ size: "L",
43332
+ title: "Résultat du traitement",
43333
+ enableHtmlContent: true,
43334
+ message: "\n <div style=\"display:flex; flex-direction:column; gap:0.75rem;\">\n <strong style=\"color:#16a34a;\">\n \u2714 Traitement termin\xE9 avec succ\xE8s\n </strong>\n\n <p>\n Le fichier a \xE9t\xE9 g\xE9n\xE9r\xE9 par le backend Symfony.\n </p>\n\n <a\n href=\"https://example.com/result\"\n target=\"_blank\"\n style=\"color:#2563eb; text-decoration:underline;\"\n >\n Voir le r\xE9sultat\n </a>\n\n <button\n style=\"\n margin-top:0.5rem;\n padding:0.4rem 0.75rem;\n background:#2563eb;\n color:white;\n border:none;\n border-radius:4px;\n cursor:pointer;\n \"\n onclick=\"alert('T\xE9l\xE9chargement d\xE9clench\xE9')\"\n >\n T\xE9l\xE9charger\n </button>\n </div>\n ",
43335
+ sticky: true,
43336
+ closable: true,
43337
+ autoShow: true,
43338
+ reShowOnPropsChange: true
43418
43339
  }
43419
43340
  };
43420
43341
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "3.0.01",
4
+ "version": "3.1.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {