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.
- package/dist/index.js +245 -146
- 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
|
-
|
|
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
|
-
|
|
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 (
|
|
55244
|
-
var
|
|
55245
|
-
k =
|
|
55246
|
-
v =
|
|
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(
|
|
55370
|
+
var DeviseBodyCell = function DeviseBodyCell(_ref6) {
|
|
55302
55371
|
var _col$devises, _col$decimal, _cellDevise$code;
|
|
55303
|
-
var rowData =
|
|
55304
|
-
col =
|
|
55305
|
-
editable =
|
|
55306
|
-
|
|
55307
|
-
isRowEditing =
|
|
55308
|
-
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,
|
|
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 = (
|
|
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,
|
|
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 = (
|
|
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(
|
|
55448
|
-
var rowData =
|
|
55449
|
-
col =
|
|
55450
|
-
editable =
|
|
55451
|
-
|
|
55452
|
-
isRowEditing =
|
|
55453
|
-
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(
|
|
55639
|
+
var DocumentEditorCell = function DocumentEditorCell(_ref10) {
|
|
55571
55640
|
var _options$value;
|
|
55572
|
-
var options =
|
|
55573
|
-
col =
|
|
55574
|
-
onFilePickerOpen =
|
|
55575
|
-
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
|
|
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
|
|
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(
|
|
55790
|
+
var SelfEditableCell = function SelfEditableCell(_ref12) {
|
|
55722
55791
|
var _col$header;
|
|
55723
|
-
var rowData =
|
|
55724
|
-
col =
|
|
55725
|
-
editable =
|
|
55726
|
-
isRowEditing =
|
|
55727
|
-
onSave =
|
|
55728
|
-
renderDisplay =
|
|
55729
|
-
onCreateTag =
|
|
55730
|
-
onTagCreated =
|
|
55731
|
-
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(
|
|
56141
|
+
var DocumentBodyCell = function DocumentBodyCell(_ref13) {
|
|
56073
56142
|
var _rowData$col$field2;
|
|
56074
|
-
var rowData =
|
|
56075
|
-
col =
|
|
56076
|
-
editable =
|
|
56077
|
-
isRowEditing =
|
|
56078
|
-
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(
|
|
56172
|
-
var
|
|
56173
|
-
value =
|
|
56174
|
-
|
|
56175
|
-
columns =
|
|
56176
|
-
|
|
56177
|
-
paginator =
|
|
56178
|
-
|
|
56179
|
-
rows =
|
|
56180
|
-
|
|
56181
|
-
loading =
|
|
56182
|
-
|
|
56183
|
-
stripedRows =
|
|
56184
|
-
|
|
56185
|
-
selectionMode =
|
|
56186
|
-
selection =
|
|
56187
|
-
onSelectionChange =
|
|
56188
|
-
|
|
56189
|
-
editable =
|
|
56190
|
-
|
|
56191
|
-
lockable =
|
|
56192
|
-
|
|
56193
|
-
rowEdit =
|
|
56194
|
-
|
|
56195
|
-
columnFilter =
|
|
56196
|
-
onChange =
|
|
56197
|
-
onCellChange =
|
|
56198
|
-
onLoad =
|
|
56199
|
-
tableId =
|
|
56200
|
-
onAdd =
|
|
56201
|
-
|
|
56202
|
-
showAdd =
|
|
56203
|
-
|
|
56204
|
-
addLabel =
|
|
56205
|
-
addTooltip =
|
|
56206
|
-
|
|
56207
|
-
addRowPosition =
|
|
56208
|
-
|
|
56209
|
-
defaultRowHeight =
|
|
56210
|
-
onReorderClick =
|
|
56211
|
-
labels =
|
|
56212
|
-
|
|
56213
|
-
lazy =
|
|
56214
|
-
totalRecords =
|
|
56215
|
-
onLazyLoad =
|
|
56216
|
-
|
|
56217
|
-
deletableRows =
|
|
56218
|
-
onDeleteRow =
|
|
56219
|
-
|
|
56220
|
-
confirmDelete =
|
|
56221
|
-
|
|
56222
|
-
editableRows =
|
|
56223
|
-
onEditRow =
|
|
56224
|
-
onCreateTag =
|
|
56225
|
-
|
|
56226
|
-
rowSelection =
|
|
56227
|
-
|
|
56228
|
-
selectionFilter =
|
|
56229
|
-
onButtonClick =
|
|
56230
|
-
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 (
|
|
56578
|
-
var
|
|
56579
|
-
c =
|
|
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 (
|
|
56878
|
-
var
|
|
56879
|
-
field =
|
|
56880
|
-
meta =
|
|
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
|
|
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) : (
|
|
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,
|
|
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 = (
|
|
57314
|
-
var href = typeof col.href === 'function' ? col.href(rowData) : (
|
|
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 (
|
|
57815
|
-
var
|
|
57816
|
-
targetField =
|
|
57817
|
-
optionProp =
|
|
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 (
|
|
57978
|
-
var
|
|
57979
|
-
tf =
|
|
57980
|
-
op =
|
|
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
|
-
|
|
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 (
|
|
58279
|
-
var icon =
|
|
58280
|
-
label =
|
|
58281
|
-
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 (
|
|
58347
|
-
var key =
|
|
58348
|
-
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
|
-
|
|
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
|
|
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) : (
|
|
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:
|
|
58952
|
+
actions: rowActions,
|
|
58854
58953
|
rowData: rowData,
|
|
58855
58954
|
href: linkHref
|
|
58856
58955
|
});
|
|
58857
58956
|
},
|
|
58858
58957
|
style: {
|
|
58859
|
-
width: "".concat(
|
|
58860
|
-
minWidth: "".concat(
|
|
58861
|
-
maxWidth: "".concat(
|
|
58958
|
+
width: "".concat(colWidth, "px"),
|
|
58959
|
+
minWidth: "".concat(colWidth, "px"),
|
|
58960
|
+
maxWidth: "".concat(colWidth, "px")
|
|
58862
58961
|
},
|
|
58863
58962
|
headerStyle: {
|
|
58864
|
-
width: "".concat(
|
|
58865
|
-
minWidth: "".concat(
|
|
58866
|
-
maxWidth: "".concat(
|
|
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",
|