arengibook 3.2.0-main → 3.2.1-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 +245 -146
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -55086,10 +55086,79 @@ var HoverTooltip = function HoverTooltip(_ref) {
55086
55086
  }
55087
55087
  }, lines.join('\n')), document.body));
55088
55088
  };
55089
- var RowActionsCell = function RowActionsCell(_ref2) {
55089
+
55090
+ /**
55091
+ * Rendu INLINE des actions de ligne (R57-56) : les actions côte à côte en petits boutons
55092
+ * icône, libellé complet en tooltip natif (`title`). Alternative au menu ⚙ au survol
55093
+ * (RowActionsCell) — activée par `actionsDisplay: 'inline'` sur la colonne porteuse.
55094
+ * Chaque action : `{ key, icon, label, danger? }`. Le clic remonte via `onAction(rowData,
55095
+ * key)` (= la prop `onButtonClick` du Table, même contrat que les colonnes `type: button`),
55096
+ * ou `action.onClick(rowData)` si fourni.
55097
+ */
55098
+ var RowActionsInlineCell = function RowActionsInlineCell(_ref2) {
55090
55099
  var actions = _ref2.actions,
55091
55100
  rowData = _ref2.rowData,
55092
- href = _ref2.href;
55101
+ onAction = _ref2.onAction;
55102
+ return (
55103
+ /*#__PURE__*/
55104
+ // width 100% : la cellule .row-actions-cell est en padding 0 → sans elle le flex
55105
+ // s'ajuste au contenu et les boutons se collent à gauche au lieu de se centrer.
55106
+ React__default.createElement("div", {
55107
+ style: {
55108
+ display: 'flex',
55109
+ alignItems: 'center',
55110
+ justifyContent: 'center',
55111
+ gap: '6px',
55112
+ width: '100%',
55113
+ padding: '0 6px',
55114
+ boxSizing: 'border-box'
55115
+ }
55116
+ }, actions.map(function (action, i) {
55117
+ return /*#__PURE__*/React__default.createElement("button", {
55118
+ key: i,
55119
+ type: "button",
55120
+ title: action.label || '',
55121
+ className: action["class"],
55122
+ style: {
55123
+ display: 'inline-flex',
55124
+ alignItems: 'center',
55125
+ justifyContent: 'center',
55126
+ width: '26px',
55127
+ height: '26px',
55128
+ padding: 0,
55129
+ borderRadius: '6px',
55130
+ cursor: 'pointer',
55131
+ background: '#fff',
55132
+ border: "1px solid ".concat(action.danger ? '#f3c1c1' : '#dbe3e8'),
55133
+ color: action.danger ? '#c92424' : '#136b89',
55134
+ transition: 'all 0.15s'
55135
+ },
55136
+ onMouseEnter: function onMouseEnter(e) {
55137
+ e.currentTarget.style.background = action.danger ? '#fdf0f0' : '#eef6f9';
55138
+ e.currentTarget.style.borderColor = action.danger ? '#c92424' : '#136b89';
55139
+ },
55140
+ onMouseLeave: function onMouseLeave(e) {
55141
+ e.currentTarget.style.background = '#fff';
55142
+ e.currentTarget.style.borderColor = action.danger ? '#f3c1c1' : '#dbe3e8';
55143
+ },
55144
+ onClick: function onClick(e) {
55145
+ e.stopPropagation();
55146
+ if (typeof action.onClick === 'function') action.onClick(rowData);else if (action.key && onAction) onAction(rowData, action.key);
55147
+ }
55148
+ }, /*#__PURE__*/React__default.createElement("span", {
55149
+ className: "material-icons",
55150
+ style: {
55151
+ fontSize: '16px',
55152
+ lineHeight: 1
55153
+ }
55154
+ }, action.icon));
55155
+ }))
55156
+ );
55157
+ };
55158
+ var RowActionsCell = function RowActionsCell(_ref3) {
55159
+ var actions = _ref3.actions,
55160
+ rowData = _ref3.rowData,
55161
+ href = _ref3.href;
55093
55162
  var _useState3 = useState(false),
55094
55163
  _useState4 = _slicedToArray$b(_useState3, 2),
55095
55164
  open = _useState4[0],
@@ -55240,10 +55309,10 @@ var RowActionsCell = function RowActionsCell(_ref2) {
55240
55309
  } else {
55241
55310
  extraAttrs.href = actionHref;
55242
55311
  }
55243
- if (action.data) Object.entries(action.data).forEach(function (_ref3) {
55244
- var _ref4 = _slicedToArray$b(_ref3, 2),
55245
- k = _ref4[0],
55246
- v = _ref4[1];
55312
+ if (action.data) Object.entries(action.data).forEach(function (_ref4) {
55313
+ var _ref5 = _slicedToArray$b(_ref4, 2),
55314
+ k = _ref5[0],
55315
+ v = _ref5[1];
55247
55316
  extraAttrs[k] = v;
55248
55317
  });
55249
55318
  return /*#__PURE__*/React__default.createElement("a", _extends$G({
@@ -55298,14 +55367,14 @@ var RowActionsCell = function RowActionsCell(_ref2) {
55298
55367
  }
55299
55368
  }, "settings")), dropdown);
55300
55369
  };
55301
- var DeviseBodyCell = function DeviseBodyCell(_ref5) {
55370
+ var DeviseBodyCell = function DeviseBodyCell(_ref6) {
55302
55371
  var _col$devises, _col$decimal, _cellDevise$code;
55303
- var rowData = _ref5.rowData,
55304
- col = _ref5.col,
55305
- editable = _ref5.editable,
55306
- _ref5$isRowEditing = _ref5.isRowEditing,
55307
- isRowEditing = _ref5$isRowEditing === void 0 ? false : _ref5$isRowEditing,
55308
- onSave = _ref5.onSave;
55372
+ var rowData = _ref6.rowData,
55373
+ col = _ref6.col,
55374
+ editable = _ref6.editable,
55375
+ _ref6$isRowEditing = _ref6.isRowEditing,
55376
+ isRowEditing = _ref6$isRowEditing === void 0 ? false : _ref6$isRowEditing,
55377
+ onSave = _ref6.onSave;
55309
55378
  var _useState9 = useState(false),
55310
55379
  _useState0 = _slicedToArray$b(_useState9, 2),
55311
55380
  editing = _useState0[0],
@@ -55332,10 +55401,10 @@ var DeviseBodyCell = function DeviseBodyCell(_ref5) {
55332
55401
  setDevise(val);
55333
55402
  };
55334
55403
  var openEdit = function openEdit() {
55335
- var _displayCell$value, _ref6, _ref7, _displayCell$devise;
55404
+ var _displayCell$value, _ref7, _ref8, _displayCell$devise;
55336
55405
  if (!editable) return;
55337
55406
  setAmount((_displayCell$value = displayCell === null || displayCell === void 0 ? void 0 : displayCell.value) !== null && _displayCell$value !== void 0 ? _displayCell$value : '');
55338
- var initialDevise = (_ref6 = (_ref7 = (_displayCell$devise = displayCell === null || displayCell === void 0 ? void 0 : displayCell.devise) !== null && _displayCell$devise !== void 0 ? _displayCell$devise : col.currency) !== null && _ref7 !== void 0 ? _ref7 : devises[0]) !== null && _ref6 !== void 0 ? _ref6 : null;
55407
+ var initialDevise = (_ref7 = (_ref8 = (_displayCell$devise = displayCell === null || displayCell === void 0 ? void 0 : displayCell.devise) !== null && _displayCell$devise !== void 0 ? _displayCell$devise : col.currency) !== null && _ref8 !== void 0 ? _ref8 : devises[0]) !== null && _ref7 !== void 0 ? _ref7 : null;
55339
55408
  deviseRef.current = initialDevise;
55340
55409
  setDevise(initialDevise);
55341
55410
  setEditing(true);
@@ -55344,9 +55413,9 @@ var DeviseBodyCell = function DeviseBodyCell(_ref5) {
55344
55413
  // Sync avec le mode row edit : auto-ouvrir / fermer
55345
55414
  useEffect(function () {
55346
55415
  if (isRowEditing && !editing) {
55347
- var _displayCell$value2, _ref8, _ref9, _displayCell$devise2;
55416
+ var _displayCell$value2, _ref9, _ref0, _displayCell$devise2;
55348
55417
  setAmount((_displayCell$value2 = displayCell === null || displayCell === void 0 ? void 0 : displayCell.value) !== null && _displayCell$value2 !== void 0 ? _displayCell$value2 : '');
55349
- var initialDevise = (_ref8 = (_ref9 = (_displayCell$devise2 = displayCell === null || displayCell === void 0 ? void 0 : displayCell.devise) !== null && _displayCell$devise2 !== void 0 ? _displayCell$devise2 : col.currency) !== null && _ref9 !== void 0 ? _ref9 : devises[0]) !== null && _ref8 !== void 0 ? _ref8 : null;
55418
+ var initialDevise = (_ref9 = (_ref0 = (_displayCell$devise2 = displayCell === null || displayCell === void 0 ? void 0 : displayCell.devise) !== null && _displayCell$devise2 !== void 0 ? _displayCell$devise2 : col.currency) !== null && _ref0 !== void 0 ? _ref0 : devises[0]) !== null && _ref9 !== void 0 ? _ref9 : null;
55350
55419
  deviseRef.current = initialDevise;
55351
55420
  setDevise(initialDevise);
55352
55421
  setEditing(true);
@@ -55444,13 +55513,13 @@ var DeviseBodyCell = function DeviseBodyCell(_ref5) {
55444
55513
  className: "span-sub"
55445
55514
  }, "".concat(numberWithSpaces(value), " ").concat(cellDevise.code)));
55446
55515
  };
55447
- var TreeSelectBodyCell = function TreeSelectBodyCell(_ref0) {
55448
- var rowData = _ref0.rowData,
55449
- col = _ref0.col,
55450
- editable = _ref0.editable,
55451
- _ref0$isRowEditing = _ref0.isRowEditing,
55452
- isRowEditing = _ref0$isRowEditing === void 0 ? false : _ref0$isRowEditing,
55453
- onSave = _ref0.onSave;
55516
+ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref1) {
55517
+ var rowData = _ref1.rowData,
55518
+ col = _ref1.col,
55519
+ editable = _ref1.editable,
55520
+ _ref1$isRowEditing = _ref1.isRowEditing,
55521
+ isRowEditing = _ref1$isRowEditing === void 0 ? false : _ref1$isRowEditing,
55522
+ onSave = _ref1.onSave;
55454
55523
  var _useState15 = useState(false),
55455
55524
  _useState16 = _slicedToArray$b(_useState15, 2),
55456
55525
  editing = _useState16[0],
@@ -55567,12 +55636,12 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref0) {
55567
55636
  }, node.label);
55568
55637
  }));
55569
55638
  };
55570
- var DocumentEditorCell = function DocumentEditorCell(_ref1) {
55639
+ var DocumentEditorCell = function DocumentEditorCell(_ref10) {
55571
55640
  var _options$value;
55572
- var options = _ref1.options,
55573
- col = _ref1.col,
55574
- onFilePickerOpen = _ref1.onFilePickerOpen,
55575
- onFilePickerClose = _ref1.onFilePickerClose;
55641
+ var options = _ref10.options,
55642
+ col = _ref10.col,
55643
+ onFilePickerOpen = _ref10.onFilePickerOpen,
55644
+ onFilePickerClose = _ref10.onFilePickerClose;
55576
55645
  var _useState21 = useState(false),
55577
55646
  _useState22 = _slicedToArray$b(_useState21, 2),
55578
55647
  uploading = _useState22[0],
@@ -55580,7 +55649,7 @@ var DocumentEditorCell = function DocumentEditorCell(_ref1) {
55580
55649
  var fileInputRef = useRef(null);
55581
55650
  var docs = (_options$value = options.value) !== null && _options$value !== void 0 ? _options$value : [];
55582
55651
  var handleFileChange = /*#__PURE__*/function () {
55583
- var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e) {
55652
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e) {
55584
55653
  var file, formData, res, data, _t, _t2;
55585
55654
  return _regenerator().w(function (_context) {
55586
55655
  while (1) switch (_context.n) {
@@ -55635,7 +55704,7 @@ var DocumentEditorCell = function DocumentEditorCell(_ref1) {
55635
55704
  }, _callee, null, [[2,, 7, 8]]);
55636
55705
  }));
55637
55706
  return function handleFileChange(_x) {
55638
- return _ref10.apply(this, arguments);
55707
+ return _ref11.apply(this, arguments);
55639
55708
  };
55640
55709
  }();
55641
55710
  var handlePickerClick = function handlePickerClick() {
@@ -55718,17 +55787,17 @@ var DocumentEditorCell = function DocumentEditorCell(_ref1) {
55718
55787
  onChange: handleFileChange
55719
55788
  }));
55720
55789
  };
55721
- var SelfEditableCell = function SelfEditableCell(_ref11) {
55790
+ var SelfEditableCell = function SelfEditableCell(_ref12) {
55722
55791
  var _col$header;
55723
- var rowData = _ref11.rowData,
55724
- col = _ref11.col,
55725
- editable = _ref11.editable,
55726
- isRowEditing = _ref11.isRowEditing,
55727
- onSave = _ref11.onSave,
55728
- renderDisplay = _ref11.renderDisplay,
55729
- onCreateTag = _ref11.onCreateTag,
55730
- onTagCreated = _ref11.onTagCreated,
55731
- labels = _ref11.labels;
55792
+ var rowData = _ref12.rowData,
55793
+ col = _ref12.col,
55794
+ editable = _ref12.editable,
55795
+ isRowEditing = _ref12.isRowEditing,
55796
+ onSave = _ref12.onSave,
55797
+ renderDisplay = _ref12.renderDisplay,
55798
+ onCreateTag = _ref12.onCreateTag,
55799
+ onTagCreated = _ref12.onTagCreated,
55800
+ labels = _ref12.labels;
55732
55801
  var _useState23 = useState(false),
55733
55802
  _useState24 = _slicedToArray$b(_useState23, 2),
55734
55803
  editing = _useState24[0],
@@ -56069,13 +56138,13 @@ var SelfEditableCell = function SelfEditableCell(_ref11) {
56069
56138
  }));
56070
56139
  }
56071
56140
  };
56072
- var DocumentBodyCell = function DocumentBodyCell(_ref12) {
56141
+ var DocumentBodyCell = function DocumentBodyCell(_ref13) {
56073
56142
  var _rowData$col$field2;
56074
- var rowData = _ref12.rowData,
56075
- col = _ref12.col,
56076
- editable = _ref12.editable,
56077
- isRowEditing = _ref12.isRowEditing,
56078
- onSave = _ref12.onSave;
56143
+ var rowData = _ref13.rowData,
56144
+ col = _ref13.col,
56145
+ editable = _ref13.editable,
56146
+ isRowEditing = _ref13.isRowEditing,
56147
+ onSave = _ref13.onSave;
56079
56148
  var _useState27 = useState(false),
56080
56149
  _useState28 = _slicedToArray$b(_useState27, 2),
56081
56150
  editing = _useState28[0],
@@ -56168,66 +56237,66 @@ var DocumentBodyCell = function DocumentBodyCell(_ref12) {
56168
56237
  }, doc.name));
56169
56238
  })));
56170
56239
  };
56171
- var Table$1 = function Table(_ref13) {
56172
- var _ref13$value = _ref13.value,
56173
- value = _ref13$value === void 0 ? [] : _ref13$value,
56174
- _ref13$columns = _ref13.columns,
56175
- columns = _ref13$columns === void 0 ? [] : _ref13$columns,
56176
- _ref13$paginator = _ref13.paginator,
56177
- paginator = _ref13$paginator === void 0 ? true : _ref13$paginator,
56178
- _ref13$rows = _ref13.rows,
56179
- rows = _ref13$rows === void 0 ? 25 : _ref13$rows,
56180
- _ref13$loading = _ref13.loading,
56181
- loading = _ref13$loading === void 0 ? false : _ref13$loading,
56182
- _ref13$stripedRows = _ref13.stripedRows,
56183
- stripedRows = _ref13$stripedRows === void 0 ? false : _ref13$stripedRows,
56184
- _ref13$selectionMode = _ref13.selectionMode,
56185
- selectionMode = _ref13$selectionMode === void 0 ? null : _ref13$selectionMode,
56186
- selection = _ref13.selection,
56187
- onSelectionChange = _ref13.onSelectionChange,
56188
- _ref13$editable = _ref13.editable,
56189
- editable = _ref13$editable === void 0 ? false : _ref13$editable,
56190
- _ref13$lockable = _ref13.lockable,
56191
- lockable = _ref13$lockable === void 0 ? false : _ref13$lockable,
56192
- _ref13$rowEdit = _ref13.rowEdit,
56193
- rowEdit = _ref13$rowEdit === void 0 ? false : _ref13$rowEdit,
56194
- _ref13$columnFilter = _ref13.columnFilter,
56195
- columnFilter = _ref13$columnFilter === void 0 ? true : _ref13$columnFilter,
56196
- onChange = _ref13.onChange,
56197
- onCellChange = _ref13.onCellChange,
56198
- onLoad = _ref13.onLoad,
56199
- tableId = _ref13.tableId,
56200
- onAdd = _ref13.onAdd,
56201
- _ref13$showAdd = _ref13.showAdd,
56202
- showAdd = _ref13$showAdd === void 0 ? true : _ref13$showAdd,
56203
- _ref13$addLabel = _ref13.addLabel,
56204
- addLabel = _ref13$addLabel === void 0 ? '+' : _ref13$addLabel,
56205
- addTooltip = _ref13.addTooltip,
56206
- _ref13$addRowPosition = _ref13.addRowPosition,
56207
- addRowPosition = _ref13$addRowPosition === void 0 ? 'end' : _ref13$addRowPosition,
56208
- _ref13$defaultRowHeig = _ref13.defaultRowHeight,
56209
- defaultRowHeight = _ref13$defaultRowHeig === void 0 ? 'small' : _ref13$defaultRowHeig,
56210
- onReorderClick = _ref13.onReorderClick,
56211
- labels = _ref13.labels,
56212
- _ref13$lazy = _ref13.lazy,
56213
- lazy = _ref13$lazy === void 0 ? false : _ref13$lazy,
56214
- totalRecords = _ref13.totalRecords,
56215
- onLazyLoad = _ref13.onLazyLoad,
56216
- _ref13$deletableRows = _ref13.deletableRows,
56217
- deletableRows = _ref13$deletableRows === void 0 ? false : _ref13$deletableRows,
56218
- onDeleteRow = _ref13.onDeleteRow,
56219
- _ref13$confirmDelete = _ref13.confirmDelete,
56220
- confirmDelete = _ref13$confirmDelete === void 0 ? true : _ref13$confirmDelete,
56221
- _ref13$editableRows = _ref13.editableRows,
56222
- editableRows = _ref13$editableRows === void 0 ? false : _ref13$editableRows,
56223
- onEditRow = _ref13.onEditRow,
56224
- onCreateTag = _ref13.onCreateTag,
56225
- _ref13$rowSelection = _ref13.rowSelection,
56226
- rowSelection = _ref13$rowSelection === void 0 ? false : _ref13$rowSelection,
56227
- _ref13$selectionFilte = _ref13.selectionFilter,
56228
- selectionFilter = _ref13$selectionFilte === void 0 ? false : _ref13$selectionFilte,
56229
- onButtonClick = _ref13.onButtonClick,
56230
- onCellClick = _ref13.onCellClick;
56240
+ var Table$1 = function Table(_ref14) {
56241
+ var _ref14$value = _ref14.value,
56242
+ value = _ref14$value === void 0 ? [] : _ref14$value,
56243
+ _ref14$columns = _ref14.columns,
56244
+ columns = _ref14$columns === void 0 ? [] : _ref14$columns,
56245
+ _ref14$paginator = _ref14.paginator,
56246
+ paginator = _ref14$paginator === void 0 ? true : _ref14$paginator,
56247
+ _ref14$rows = _ref14.rows,
56248
+ rows = _ref14$rows === void 0 ? 25 : _ref14$rows,
56249
+ _ref14$loading = _ref14.loading,
56250
+ loading = _ref14$loading === void 0 ? false : _ref14$loading,
56251
+ _ref14$stripedRows = _ref14.stripedRows,
56252
+ stripedRows = _ref14$stripedRows === void 0 ? false : _ref14$stripedRows,
56253
+ _ref14$selectionMode = _ref14.selectionMode,
56254
+ selectionMode = _ref14$selectionMode === void 0 ? null : _ref14$selectionMode,
56255
+ selection = _ref14.selection,
56256
+ onSelectionChange = _ref14.onSelectionChange,
56257
+ _ref14$editable = _ref14.editable,
56258
+ editable = _ref14$editable === void 0 ? false : _ref14$editable,
56259
+ _ref14$lockable = _ref14.lockable,
56260
+ lockable = _ref14$lockable === void 0 ? false : _ref14$lockable,
56261
+ _ref14$rowEdit = _ref14.rowEdit,
56262
+ rowEdit = _ref14$rowEdit === void 0 ? false : _ref14$rowEdit,
56263
+ _ref14$columnFilter = _ref14.columnFilter,
56264
+ columnFilter = _ref14$columnFilter === void 0 ? true : _ref14$columnFilter,
56265
+ onChange = _ref14.onChange,
56266
+ onCellChange = _ref14.onCellChange,
56267
+ onLoad = _ref14.onLoad,
56268
+ tableId = _ref14.tableId,
56269
+ onAdd = _ref14.onAdd,
56270
+ _ref14$showAdd = _ref14.showAdd,
56271
+ showAdd = _ref14$showAdd === void 0 ? true : _ref14$showAdd,
56272
+ _ref14$addLabel = _ref14.addLabel,
56273
+ addLabel = _ref14$addLabel === void 0 ? '+' : _ref14$addLabel,
56274
+ addTooltip = _ref14.addTooltip,
56275
+ _ref14$addRowPosition = _ref14.addRowPosition,
56276
+ addRowPosition = _ref14$addRowPosition === void 0 ? 'end' : _ref14$addRowPosition,
56277
+ _ref14$defaultRowHeig = _ref14.defaultRowHeight,
56278
+ defaultRowHeight = _ref14$defaultRowHeig === void 0 ? 'small' : _ref14$defaultRowHeig,
56279
+ onReorderClick = _ref14.onReorderClick,
56280
+ labels = _ref14.labels,
56281
+ _ref14$lazy = _ref14.lazy,
56282
+ lazy = _ref14$lazy === void 0 ? false : _ref14$lazy,
56283
+ totalRecords = _ref14.totalRecords,
56284
+ onLazyLoad = _ref14.onLazyLoad,
56285
+ _ref14$deletableRows = _ref14.deletableRows,
56286
+ deletableRows = _ref14$deletableRows === void 0 ? false : _ref14$deletableRows,
56287
+ onDeleteRow = _ref14.onDeleteRow,
56288
+ _ref14$confirmDelete = _ref14.confirmDelete,
56289
+ confirmDelete = _ref14$confirmDelete === void 0 ? true : _ref14$confirmDelete,
56290
+ _ref14$editableRows = _ref14.editableRows,
56291
+ editableRows = _ref14$editableRows === void 0 ? false : _ref14$editableRows,
56292
+ onEditRow = _ref14.onEditRow,
56293
+ onCreateTag = _ref14.onCreateTag,
56294
+ _ref14$rowSelection = _ref14.rowSelection,
56295
+ rowSelection = _ref14$rowSelection === void 0 ? false : _ref14$rowSelection,
56296
+ _ref14$selectionFilte = _ref14.selectionFilter,
56297
+ selectionFilter = _ref14$selectionFilte === void 0 ? false : _ref14$selectionFilte,
56298
+ onButtonClick = _ref14.onButtonClick,
56299
+ onCellClick = _ref14.onCellClick;
56231
56300
  var _useState31 = useState(true),
56232
56301
  _useState32 = _slicedToArray$b(_useState31, 2),
56233
56302
  locked = _useState32[0],
@@ -56574,9 +56643,9 @@ var Table$1 = function Table(_ref13) {
56574
56643
  return [c, lastKnownRank + 0.5, natIdx];
56575
56644
  }).sort(function (a, b) {
56576
56645
  return a[1] - b[1] || a[2] - b[2];
56577
- }).map(function (_ref14) {
56578
- var _ref15 = _slicedToArray$b(_ref14, 1),
56579
- c = _ref15[0];
56646
+ }).map(function (_ref15) {
56647
+ var _ref16 = _slicedToArray$b(_ref15, 1),
56648
+ c = _ref16[0];
56580
56649
  return c;
56581
56650
  });
56582
56651
  return [].concat(_toConsumableArray$8(pinned), _toConsumableArray$8(sortedRest));
@@ -56874,10 +56943,10 @@ var Table$1 = function Table(_ref13) {
56874
56943
  var persistFilters = useCallback(function (f) {
56875
56944
  try {
56876
56945
  var values = {};
56877
- Object.entries(f || {}).forEach(function (_ref16) {
56878
- var _ref17 = _slicedToArray$b(_ref16, 2),
56879
- field = _ref17[0],
56880
- meta = _ref17[1];
56946
+ Object.entries(f || {}).forEach(function (_ref17) {
56947
+ var _ref18 = _slicedToArray$b(_ref17, 2),
56948
+ field = _ref18[0],
56949
+ meta = _ref18[1];
56881
56950
  if (meta && meta.value != null && meta.value !== '') {
56882
56951
  // Filtre date : persiste en 'yyyy-MM-dd' local (JSON.stringify(Date) donnerait
56883
56952
  // un ISO horodaté UTC que parseDateAuto ne relit pas — et J±1 selon le fuseau).
@@ -57212,7 +57281,7 @@ var Table$1 = function Table(_ref13) {
57212
57281
 
57213
57282
  var linkTemplate = useCallback(function (col) {
57214
57283
  return function (rowData) {
57215
- var _ref18, _col$href;
57284
+ var _ref19, _col$href;
57216
57285
  var label = rowData[col.field];
57217
57286
  if (col.type === 'titleLink') {
57218
57287
  return /*#__PURE__*/React__default.createElement("div", {
@@ -57226,7 +57295,7 @@ var Table$1 = function Table(_ref13) {
57226
57295
  className: "table-item-title cell-text"
57227
57296
  }, label));
57228
57297
  }
57229
- var href = typeof col.href === 'function' ? col.href(rowData) : (_ref18 = (_col$href = col.href) !== null && _col$href !== void 0 ? _col$href : rowData[col.field + 'Url']) !== null && _ref18 !== void 0 ? _ref18 : '#';
57298
+ var href = typeof col.href === 'function' ? col.href(rowData) : (_ref19 = (_col$href = col.href) !== null && _col$href !== void 0 ? _col$href : rowData[col.field + 'Url']) !== null && _ref19 !== void 0 ? _ref19 : '#';
57230
57299
  return /*#__PURE__*/React__default.createElement("div", {
57231
57300
  className: "arengi-table-grey-title-box",
57232
57301
  style: {
@@ -57305,13 +57374,13 @@ var Table$1 = function Table(_ref13) {
57305
57374
  }, []);
57306
57375
  var lienFormulaireTemplate = useCallback(function (col) {
57307
57376
  return function (rowData) {
57308
- var _col$options5, _ref19, _opt$label, _ref20, _col$href2;
57377
+ var _col$options5, _ref20, _opt$label, _ref21, _col$href2;
57309
57378
  var val = rowData[col.field];
57310
57379
  var opt = (_col$options5 = col.options) === null || _col$options5 === void 0 ? void 0 : _col$options5.find(function (o) {
57311
57380
  return o.value === val;
57312
57381
  });
57313
- var label = (_ref19 = (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : val) !== null && _ref19 !== void 0 ? _ref19 : '';
57314
- var href = typeof col.href === 'function' ? col.href(rowData) : (_ref20 = (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : opt === null || opt === void 0 ? void 0 : opt.href) !== null && _ref20 !== void 0 ? _ref20 : null;
57382
+ var label = (_ref20 = (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : val) !== null && _ref20 !== void 0 ? _ref20 : '';
57383
+ var href = typeof col.href === 'function' ? col.href(rowData) : (_ref21 = (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : opt === null || opt === void 0 ? void 0 : opt.href) !== null && _ref21 !== void 0 ? _ref21 : null;
57315
57384
  if (!label) return '';
57316
57385
  return /*#__PURE__*/React__default.createElement("div", {
57317
57386
  style: {
@@ -57811,10 +57880,10 @@ var Table$1 = function Table(_ref13) {
57811
57880
  });
57812
57881
  if (option) {
57813
57882
  var extra = {};
57814
- Object.entries(col.updates).forEach(function (_ref21) {
57815
- var _ref22 = _slicedToArray$b(_ref21, 2),
57816
- targetField = _ref22[0],
57817
- optionProp = _ref22[1];
57883
+ Object.entries(col.updates).forEach(function (_ref22) {
57884
+ var _ref23 = _slicedToArray$b(_ref22, 2),
57885
+ targetField = _ref23[0],
57886
+ optionProp = _ref23[1];
57818
57887
  if (option[optionProp] !== undefined) extra[targetField] = option[optionProp];
57819
57888
  });
57820
57889
  enrichedRow = _objectSpread2(_objectSpread2({}, newRowData), extra);
@@ -57974,10 +58043,10 @@ var Table$1 = function Table(_ref13) {
57974
58043
  return opt.value === v;
57975
58044
  });
57976
58045
  if (option) {
57977
- Object.entries(col.updates).forEach(function (_ref23) {
57978
- var _ref24 = _slicedToArray$b(_ref23, 2),
57979
- tf = _ref24[0],
57980
- op = _ref24[1];
58046
+ Object.entries(col.updates).forEach(function (_ref24) {
58047
+ var _ref25 = _slicedToArray$b(_ref24, 2),
58048
+ tf = _ref25[0],
58049
+ op = _ref25[1];
57981
58050
  if (option[op] !== undefined) enrichedFields[tf] = option[op];
57982
58051
  });
57983
58052
  }
@@ -58061,7 +58130,14 @@ var Table$1 = function Table(_ref13) {
58061
58130
  var available = wrapperEl ? wrapperEl.clientWidth : 0;
58062
58131
  var lastField = (_visibleColumns = visibleColumns[visibleColumns.length - 1]) === null || _visibleColumns === void 0 ? void 0 : _visibleColumns.field;
58063
58132
  if (available && lastField) {
58064
- var sum = leadingColCount * ACTION_COLUMN_WIDTH + visibleColumns.reduce(function (a, c) {
58133
+ // La colonne d'actions INLINE (actionsDisplay: 'inline') est plus large que les
58134
+ // 34px standard des colonnes techniques : compter sa largeur réelle, sinon la
58135
+ // dernière colonne absorbe trop et crée un débordement horizontal.
58136
+ var inlineActionsCol = columns.find(function (c) {
58137
+ return c.actionsField && c.actionsDisplay === 'inline';
58138
+ });
58139
+ var inlineActionsExtra = inlineActionsCol ? (inlineActionsCol.actionsWidth || ACTION_COLUMN_WIDTH) - ACTION_COLUMN_WIDTH : 0;
58140
+ var sum = leadingColCount * ACTION_COLUMN_WIDTH + inlineActionsExtra + visibleColumns.reduce(function (a, c) {
58065
58141
  return a + (map[c.field] || 0);
58066
58142
  }, 0);
58067
58143
  if (sum < available) map[lastField] += available - sum;
@@ -58275,10 +58351,10 @@ var Table$1 = function Table(_ref13) {
58275
58351
  setRowPreset(defaultRowHeight === 'fit' || ROW_PRESETS[defaultRowHeight] ? defaultRowHeight : 'small');
58276
58352
  setSettingsOpen(false);
58277
58353
  }
58278
- }].map(function (_ref25) {
58279
- var icon = _ref25.icon,
58280
- label = _ref25.label,
58281
- action = _ref25.action;
58354
+ }].map(function (_ref26) {
58355
+ var icon = _ref26.icon,
58356
+ label = _ref26.label,
58357
+ action = _ref26.action;
58282
58358
  return /*#__PURE__*/React__default.createElement("button", {
58283
58359
  key: label,
58284
58360
  type: "button",
@@ -58343,9 +58419,9 @@ var Table$1 = function Table(_ref13) {
58343
58419
  }, {
58344
58420
  key: 'fit',
58345
58421
  label: translate('arengibook.table.settings.rowHeightFit', labels)
58346
- }].map(function (_ref26) {
58347
- var key = _ref26.key,
58348
- label = _ref26.label;
58422
+ }].map(function (_ref27) {
58423
+ var key = _ref27.key,
58424
+ label = _ref27.label;
58349
58425
  return /*#__PURE__*/React__default.createElement("button", {
58350
58426
  key: key,
58351
58427
  type: "button",
@@ -58612,7 +58688,14 @@ var Table$1 = function Table(_ref13) {
58612
58688
  // et le navigateur redistribue le surplus sur TOUTES les colonnes
58613
58689
  // (max-width ignoré) → les colonnes d'action 34px gonflent.
58614
58690
  var map = s.columnWidthsByField && _typeof$e(s.columnWidthsByField) === 'object' ? s.columnWidthsByField : {};
58615
- var widths = [].concat(_toConsumableArray$8(Array(leadingColCount).fill(ACTION_COLUMN_WIDTH)), _toConsumableArray$8(visibleColumns.map(function (c) {
58691
+ // La colonne d'actions (dernière des colonnes techniques) peut être plus
58692
+ // large que 34px en mode inline (actionsWidth) : refléter sa largeur
58693
+ // réelle, sinon la chaîne positionnelle l'écrase à 34px.
58694
+ var restoreActionsCol = columns.find(function (c) {
58695
+ return c.actionsField;
58696
+ });
58697
+ var actionsColWidth = restoreActionsCol && restoreActionsCol.actionsDisplay === 'inline' ? restoreActionsCol.actionsWidth || ACTION_COLUMN_WIDTH : ACTION_COLUMN_WIDTH;
58698
+ var widths = [].concat(_toConsumableArray$8(Array(leadingColCount - (restoreActionsCol ? 1 : 0)).fill(ACTION_COLUMN_WIDTH)), _toConsumableArray$8(restoreActionsCol ? [actionsColWidth] : []), _toConsumableArray$8(visibleColumns.map(function (c) {
58616
58699
  return Number.isFinite(map[c.field]) ? map[c.field] : Number.parseInt(c.minWidth, 10) || DEFAULT_COLUMN_WIDTH;
58617
58700
  })));
58618
58701
  restored.columnWidths = widths.join(',');
@@ -58839,31 +58922,47 @@ var Table$1 = function Table(_ref13) {
58839
58922
  return c.actionsField;
58840
58923
  });
58841
58924
  if (!actionsCol) return null;
58925
+ // Mode INLINE (R57-56) : actions visibles côte à côte + header affichable +
58926
+ // largeur configurable. Mode par défaut : menu ⚙ au survol. Dans les deux cas
58927
+ // la colonne satellite reste frozen à gauche, hors réordonnancement et hors
58928
+ // picker de colonnes (non masquable — les call-to-action ne se cachent pas).
58929
+ var inline = actionsCol.actionsDisplay === 'inline';
58930
+ var colWidth = inline ? actionsCol.actionsWidth || ACTION_COLUMN_WIDTH : ACTION_COLUMN_WIDTH;
58842
58931
  return /*#__PURE__*/React__default.createElement(Column, {
58843
58932
  key: "__row_actions__",
58844
58933
  columnKey: "__row_actions__",
58845
- header: "",
58934
+ header: inline ? actionsCol.actionsHeader || '' : '',
58846
58935
  body: function body(rowData) {
58847
- var _ref27, _linkCol$href;
58936
+ var _ref28, _linkCol$href;
58937
+ var rowActions = rowData[actionsCol.actionsField] || [];
58938
+ if (inline) {
58939
+ return /*#__PURE__*/React__default.createElement(RowActionsInlineCell, {
58940
+ actions: rowActions,
58941
+ rowData: rowData,
58942
+ onAction: function onAction(row, key) {
58943
+ return onButtonClickRef.current && onButtonClickRef.current(row, key);
58944
+ }
58945
+ });
58946
+ }
58848
58947
  var linkCol = columns.find(function (c) {
58849
58948
  return c.type === 'titleLink' || c.type === 'link';
58850
58949
  });
58851
- var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref27 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref27 !== void 0 ? _ref27 : null : null;
58950
+ var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref28 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref28 !== void 0 ? _ref28 : null : null;
58852
58951
  return /*#__PURE__*/React__default.createElement(RowActionsCell, {
58853
- actions: rowData[actionsCol.actionsField] || [],
58952
+ actions: rowActions,
58854
58953
  rowData: rowData,
58855
58954
  href: linkHref
58856
58955
  });
58857
58956
  },
58858
58957
  style: {
58859
- width: "".concat(ACTION_COLUMN_WIDTH, "px"),
58860
- minWidth: "".concat(ACTION_COLUMN_WIDTH, "px"),
58861
- maxWidth: "".concat(ACTION_COLUMN_WIDTH, "px")
58958
+ width: "".concat(colWidth, "px"),
58959
+ minWidth: "".concat(colWidth, "px"),
58960
+ maxWidth: "".concat(colWidth, "px")
58862
58961
  },
58863
58962
  headerStyle: {
58864
- width: "".concat(ACTION_COLUMN_WIDTH, "px"),
58865
- minWidth: "".concat(ACTION_COLUMN_WIDTH, "px"),
58866
- maxWidth: "".concat(ACTION_COLUMN_WIDTH, "px")
58963
+ width: "".concat(colWidth, "px"),
58964
+ minWidth: "".concat(colWidth, "px"),
58965
+ maxWidth: "".concat(colWidth, "px")
58867
58966
  },
58868
58967
  frozen: true,
58869
58968
  alignFrozen: "left",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "3.2.0-main",
4
+ "version": "3.2.1-main",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {