arengibook 2.0.29-table → 2.1.0-table
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 +303 -222
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44743,7 +44743,7 @@ if (typeof window !== 'undefined') {
|
|
|
44743
44743
|
window.ArengibookToastPresets = ToastPresets;
|
|
44744
44744
|
}
|
|
44745
44745
|
|
|
44746
|
-
var css_248z$1 = ".arengi-table td {\n overflow: hidden;\n text-align: center !important;\n}\n\n.cell-text {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column {\n z-index: 1;\n background-color: var(--surface-0, #ffffff);\n background: linear-gradient(45deg, #ebebeb, #ebebeb) !important;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column {\n background-color: var(--surface-b, #f8f9fa);\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column.row-actions-cell,\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column.row-actions-cell {\n background: #ffffff !important;\n box-shadow: none !important;\n border-right: none !important;\n padding: 0 !important;\n}\n\n.p-datatable .p-datatable-thead > tr > th.row-actions-cell {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n}\n\n.arengi-table .p-cell-editing input,\n.arengi-table .p-cell-editing .p-inputtext,\n.arengi-table .p-cell-editing .p-dropdown,\n.arengi-table .p-cell-editing .p-multiselect,\n.arengi-table .p-cell-editing .p-calendar {\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n\n.cell-devise {\n display: flex;\n flex-direction: column;\n gap: 0.1rem;\n font-size: 0.875rem;\n}\n.cell-devise--editable {\n cursor: pointer;\n}\n.cell-devise--empty {\n display: block;\n width: 100%;\n height: 1.5rem;\n cursor: pointer;\n}\n.cell-devise .span-sub {\n font-size: 0.75rem;\n color: #71717a;\n}\n\n.devise-editor {\n display: flex;\n flex-direction: column;\n gap: 0.4rem;\n padding: 0.25rem 0;\n}\n.devise-editor-fields {\n display: flex;\n flex-direction: column;\n gap: 0.4rem;\n width: 100%;\n position: relative;\n}\n.devise-editor-fields .p-dropdown-panel {\n position: absolute;\n z-index: 1000;\n top: 100%;\n left: 0;\n width: 100%;\n}\n.devise-editor-save {\n align-self: flex-end;\n}\n\n.arengi-table .p-cell-editing .devise-editor-fields input,\n.arengi-table .p-cell-editing .devise-editor-fields .p-inputtext,\n.arengi-table .p-cell-editing .devise-editor-fields .p-dropdown {\n width: 100%;\n min-width: 0;\n}\n\n.doc-cell-empty {\n color: #aaa;\n font-size: 0.85rem;\n}\n\n.doc-cell {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n min-width: 0;\n overflow: hidden;\n}\n.doc-cell-summary {\n display: flex;\n align-items: center;\n gap: 0.35rem;\n font-size: 0.875rem;\n min-width: 0;\n}\n.doc-cell-summary .pi-paperclip {\n color: #71717a;\n font-size: 0.8rem;\n flex-shrink: 0;\n}\n.doc-cell-summary span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n}\n.doc-cell-list {\n display: flex;\n flex-direction: column;\n gap: 0.15rem;\n padding-left: 1.1rem;\n font-size: 0.8rem;\n}\n.doc-cell-list div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.doc-cell-list a {\n color: #3b82f6;\n text-decoration: none;\n}\n.doc-cell-list a:hover {\n text-decoration: underline;\n}\n\n.doc-editor {\n display: flex;\n flex-direction: column;\n gap: 0.4rem;\n padding: 0.25rem 0;\n}\n.doc-editor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.8rem;\n}\n.doc-editor-table td {\n padding: 0.2rem 0.35rem;\n vertical-align: middle;\n}\n.doc-editor-table td a {\n color: #3b82f6;\n text-decoration: none;\n word-break: break-all;\n}\n.doc-editor-table td a:hover {\n text-decoration: underline;\n}\n.doc-editor-table td:last-child {\n width: 2rem;\n text-align: center;\n}\n.doc-editor-add {\n display: inline-flex;\n align-items: center;\n gap: 0.3rem;\n cursor: pointer;\n align-self: center;\n}\n\n.arengi-table .arengi-table-grey-title-box {\n overflow: hidden;\n min-width: 0;\n}\n\n.arengi-table .arengi-table-grey-title:hover .table-item-title,\n.arengi-table .arengi-table-grey-title .table-item-title:hover {\n text-decoration: none !important;\n}\n\n.arengi-table .table-item-title {\n display: block !important;\n min-width: 0 !important;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.p-datatable .p-column-header-content {\n justify-content: center;\n}\n\n.tab_label {\n display: inline-block;\n padding:
|
|
44746
|
+
var css_248z$1 = ".p-paginator {\n font-size: 14px;\n}\n.p-paginator .p-paginator-first,\n.p-paginator .p-paginator-prev,\n.p-paginator .p-paginator-next,\n.p-paginator .p-paginator-last,\n.p-paginator .p-paginator-pages .p-paginator-page,\n.p-paginator .p-paginator-current,\n.p-paginator .p-dropdown .p-dropdown-label,\n.p-paginator .p-dropdown-item,\n.p-paginator .p-paginator-page-input .p-inputtext {\n font-size: 14px;\n}\n\ntable.arengi-table thead {\n border: 1px solid #d5d2d2;\n}\ntable.arengi-table thead th {\n position: sticky;\n top: 0;\n z-index: 800;\n background-color: #fff;\n border-bottom: 1px solid lightgrey;\n font-size: 14px;\n}\ntable.arengi-table thead th:hover {\n background-color: #d6d6d6;\n}\ntable.arengi-table tbody tr {\n background-color: transparent;\n}\ntable.arengi-table tbody tr:hover {\n background-color: rgba(255, 255, 255, 0.5803921569);\n}\n\n.arengi-table td {\n overflow: hidden;\n text-align: center !important;\n}\n\n.cell-text {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column {\n z-index: 1;\n background-color: var(--surface-0, #ffffff);\n background: linear-gradient(45deg, #ebebeb, #ebebeb) !important;\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column {\n background-color: var(--surface-b, #f8f9fa);\n}\n\n.p-datatable-scrollable .p-datatable-tbody > tr > td.p-frozen-column.row-actions-cell,\n.p-datatable-scrollable .p-datatable-tbody > tr.p-row-odd > td.p-frozen-column.row-actions-cell {\n background: #ffffff !important;\n box-shadow: none !important;\n border-right: none !important;\n padding: 0 !important;\n}\n\n.p-datatable .p-datatable-thead > tr > th.row-actions-cell {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n}\n\n.arengi-table .p-cell-editing input,\n.arengi-table .p-cell-editing .p-inputtext,\n.arengi-table .p-cell-editing .p-dropdown,\n.arengi-table .p-cell-editing .p-multiselect,\n.arengi-table .p-cell-editing .p-calendar {\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n\n.cell-devise {\n display: flex;\n flex-direction: column;\n gap: 0.1rem;\n font-size: 0.875rem;\n}\n.cell-devise--editable {\n cursor: pointer;\n}\n.cell-devise--empty {\n display: block;\n width: 100%;\n height: 1.5rem;\n cursor: pointer;\n}\n.cell-devise .span-sub {\n font-size: 0.75rem;\n color: #71717a;\n}\n\n.devise-editor {\n display: flex;\n flex-direction: column;\n gap: 0.4rem;\n padding: 0.25rem 0;\n}\n.devise-editor-fields {\n display: flex;\n flex-direction: column;\n gap: 0.4rem;\n width: 100%;\n position: relative;\n}\n.devise-editor-fields .p-dropdown-panel {\n position: absolute;\n z-index: 1000;\n top: 100%;\n left: 0;\n width: 100%;\n}\n.devise-editor-save {\n align-self: flex-end;\n}\n\n.arengi-table .p-cell-editing .devise-editor-fields input,\n.arengi-table .p-cell-editing .devise-editor-fields .p-inputtext,\n.arengi-table .p-cell-editing .devise-editor-fields .p-dropdown {\n width: 100%;\n min-width: 0;\n}\n\n.doc-cell-empty {\n color: #aaa;\n font-size: 0.85rem;\n}\n\n.doc-cell {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n min-width: 0;\n overflow: hidden;\n}\n.doc-cell-summary {\n display: flex;\n align-items: center;\n gap: 0.35rem;\n font-size: 0.875rem;\n min-width: 0;\n}\n.doc-cell-summary .pi-paperclip {\n color: #71717a;\n font-size: 0.8rem;\n flex-shrink: 0;\n}\n.doc-cell-summary span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n}\n.doc-cell-list {\n display: flex;\n flex-direction: column;\n gap: 0.15rem;\n padding-left: 1.1rem;\n font-size: 0.8rem;\n}\n.doc-cell-list div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.doc-cell-list a {\n color: #3b82f6;\n text-decoration: none;\n}\n.doc-cell-list a:hover {\n text-decoration: underline;\n}\n\n.doc-editor {\n display: flex;\n flex-direction: column;\n gap: 0.4rem;\n padding: 0.25rem 0;\n}\n.doc-editor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.8rem;\n}\n.doc-editor-table td {\n padding: 0.2rem 0.35rem;\n vertical-align: middle;\n}\n.doc-editor-table td a {\n color: #3b82f6;\n text-decoration: none;\n word-break: break-all;\n}\n.doc-editor-table td a:hover {\n text-decoration: underline;\n}\n.doc-editor-table td:last-child {\n width: 2rem;\n text-align: center;\n}\n.doc-editor-add {\n display: inline-flex;\n align-items: center;\n gap: 0.3rem;\n cursor: pointer;\n align-self: center;\n}\n\n.arengi-table .arengi-table-grey-title-box {\n overflow: hidden;\n min-width: 0;\n}\n\n.arengi-table .arengi-table-grey-title:hover .table-item-title,\n.arengi-table .arengi-table-grey-title .table-item-title:hover {\n text-decoration: none !important;\n}\n\n.arengi-table .table-item-title {\n display: block !important;\n min-width: 0 !important;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.p-datatable .p-column-header-content {\n justify-content: center;\n}\n\n.tab_label {\n display: inline-block;\n padding: 5px 10px;\n font-size: 14px;\n font-weight: 600;\n line-height: 1;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n border-radius: 5px;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n height: initial;\n}\n\n.badge {\n padding: 8px 12px;\n border-radius: 5px;\n height: auto;\n margin: 2px;\n font-weight: 400;\n box-shadow: 2px 4px 5px grey;\n white-space: inherit;\n min-width: 90px;\n}\n.badge:not(.badge-small) {\n width: 100%;\n}\n\ntable.arengi-table td.arengi-table-grey-title:not(.normal) {\n background: linear-gradient(45deg, rgba(55, 55, 55, 0.7882352941), rgba(115, 115, 115, 0.7882352941));\n color: white;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal) a {\n opacity: 1;\n min-width: 150px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n text-transform: uppercase;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal) a:hover {\n color: #dedede;\n text-decoration: underline;\n}\ntable.arengi-table td.arengi-table-grey-title:not(.normal):hover {\n background-color: #646464;\n transition-duration: 0.1s;\n}\n\n.RiskNumber-table {\n max-width: 50px;\n}\n.RiskNumber-table div {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.RiskNumber-table div span {\n width: 30px;\n height: 30px;\n min-width: 30px;\n min-height: 30px;\n max-width: 30px;\n max-height: 30px;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.RiskLabel-table .etiquetteMatrix-risque {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n width: fit-content;\n max-width: 190px;\n display: flex;\n justify-content: flex-start;\n border-radius: 3px;\n background-color: #fff;\n color: black;\n margin: 5px;\n padding: 0;\n border: 0 solid transparent;\n}\n.RiskLabel-table .etiquetteMatrix-risque .matrix-RisqueLabelColor {\n min-width: 20px;\n max-width: 20px;\n margin-right: 5px;\n border-right: 1px solid rgba(0, 0, 0, 0.3607843137);\n border-radius: 3px 0 0 3px;\n}\n.RiskLabel-table .etiquetteMatrix-risque .matrix-RisqueLabel {\n font-size: 13px;\n font-weight: 300;\n padding: 3px 10px 3px 5px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.RiskOwner-table .risk_owner {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: max-content;\n}\n.RiskOwner-table .risk_owner a {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n padding: 5px 10px;\n border-radius: 5px;\n background-color: white;\n opacity: 1;\n margin: 2px;\n position: relative;\n}\n.RiskOwner-table .risk_owner a:hover {\n z-index: 9999;\n}\n\n.limite_txt_table {\n min-height: 50px;\n max-height: 90px;\n min-width: 250px;\n}\n.limite_txt_table p {\n line-height: 1.3;\n font-size: 14px;\n}\n\n.action-picto .picto {\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4705882353);\n padding: 5px 10px;\n border-radius: 5px;\n margin: 5px;\n}";
|
|
44747
44747
|
styleInject(css_248z$1);
|
|
44748
44748
|
|
|
44749
44749
|
function _extends$3() {
|
|
@@ -48324,25 +48324,73 @@ function textColorForBg(hex) {
|
|
|
48324
48324
|
var b = parseInt(hex.substring(4, 6), 16);
|
|
48325
48325
|
return (r + g + b) / 3 < 128 ? 'white' : 'black';
|
|
48326
48326
|
}
|
|
48327
|
-
var
|
|
48328
|
-
var
|
|
48329
|
-
|
|
48330
|
-
|
|
48331
|
-
var _useState = useState(false),
|
|
48327
|
+
var HoverTooltip = function HoverTooltip(_ref) {
|
|
48328
|
+
var lines = _ref.lines,
|
|
48329
|
+
children = _ref.children;
|
|
48330
|
+
var _useState = useState(null),
|
|
48332
48331
|
_useState2 = _slicedToArray$d(_useState, 2),
|
|
48333
|
-
|
|
48334
|
-
|
|
48332
|
+
pos = _useState2[0],
|
|
48333
|
+
setPos = _useState2[1];
|
|
48334
|
+
var hide = function hide() {
|
|
48335
|
+
return setPos(null);
|
|
48336
|
+
};
|
|
48337
|
+
var show = function show(e) {
|
|
48338
|
+
return setPos({
|
|
48339
|
+
x: e.clientX + 12,
|
|
48340
|
+
y: e.clientY + 12
|
|
48341
|
+
});
|
|
48342
|
+
};
|
|
48343
|
+
var move = function move(e) {
|
|
48344
|
+
return setPos({
|
|
48345
|
+
x: e.clientX + 12,
|
|
48346
|
+
y: e.clientY + 12
|
|
48347
|
+
});
|
|
48348
|
+
};
|
|
48349
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
48350
|
+
onMouseEnter: show,
|
|
48351
|
+
onMouseMove: move,
|
|
48352
|
+
onMouseLeave: hide,
|
|
48353
|
+
style: {
|
|
48354
|
+
cursor: 'pointer'
|
|
48355
|
+
}
|
|
48356
|
+
}, children), pos && /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", {
|
|
48357
|
+
style: {
|
|
48358
|
+
position: 'fixed',
|
|
48359
|
+
left: pos.x,
|
|
48360
|
+
top: pos.y,
|
|
48361
|
+
zIndex: 9999,
|
|
48362
|
+
background: '#1e1e2e',
|
|
48363
|
+
color: '#f4f4f5',
|
|
48364
|
+
borderRadius: '6px',
|
|
48365
|
+
padding: '6px 10px',
|
|
48366
|
+
fontSize: '12px',
|
|
48367
|
+
lineHeight: '1.6',
|
|
48368
|
+
maxWidth: '260px',
|
|
48369
|
+
boxShadow: '0 4px 14px rgba(0,0,0,0.25)',
|
|
48370
|
+
pointerEvents: 'none',
|
|
48371
|
+
whiteSpace: 'pre-wrap'
|
|
48372
|
+
}
|
|
48373
|
+
}, lines.join('\n')), document.body));
|
|
48374
|
+
};
|
|
48375
|
+
var RowActionsCell = function RowActionsCell(_ref2) {
|
|
48376
|
+
var actions = _ref2.actions,
|
|
48377
|
+
rowData = _ref2.rowData,
|
|
48378
|
+
href = _ref2.href;
|
|
48335
48379
|
var _useState3 = useState(false),
|
|
48336
48380
|
_useState4 = _slicedToArray$d(_useState3, 2),
|
|
48337
|
-
|
|
48338
|
-
|
|
48339
|
-
var _useState5 = useState(
|
|
48381
|
+
open = _useState4[0],
|
|
48382
|
+
setOpen = _useState4[1];
|
|
48383
|
+
var _useState5 = useState(false),
|
|
48384
|
+
_useState6 = _slicedToArray$d(_useState5, 2),
|
|
48385
|
+
hovered = _useState6[0],
|
|
48386
|
+
setHovered = _useState6[1];
|
|
48387
|
+
var _useState7 = useState({
|
|
48340
48388
|
top: 0,
|
|
48341
48389
|
left: 0
|
|
48342
48390
|
}),
|
|
48343
|
-
|
|
48344
|
-
dropPos =
|
|
48345
|
-
setDropPos =
|
|
48391
|
+
_useState8 = _slicedToArray$d(_useState7, 2),
|
|
48392
|
+
dropPos = _useState8[0],
|
|
48393
|
+
setDropPos = _useState8[1];
|
|
48346
48394
|
var triggerRef = useRef(null);
|
|
48347
48395
|
var hideTimerRef = useRef(null);
|
|
48348
48396
|
var showMenu = function showMenu() {
|
|
@@ -48432,10 +48480,10 @@ var RowActionsCell = function RowActionsCell(_ref) {
|
|
|
48432
48480
|
extraAttrs.href = actionHref;
|
|
48433
48481
|
}
|
|
48434
48482
|
if (action.data) {
|
|
48435
|
-
Object.entries(action.data).forEach(function (
|
|
48436
|
-
var
|
|
48437
|
-
k =
|
|
48438
|
-
v =
|
|
48483
|
+
Object.entries(action.data).forEach(function (_ref3) {
|
|
48484
|
+
var _ref4 = _slicedToArray$d(_ref3, 2),
|
|
48485
|
+
k = _ref4[0],
|
|
48486
|
+
v = _ref4[1];
|
|
48439
48487
|
extraAttrs[k] = v;
|
|
48440
48488
|
});
|
|
48441
48489
|
}
|
|
@@ -48515,44 +48563,44 @@ var RowActionsCell = function RowActionsCell(_ref) {
|
|
|
48515
48563
|
}
|
|
48516
48564
|
}, "settings")), dropdown);
|
|
48517
48565
|
};
|
|
48518
|
-
var DeviseBodyCell = function DeviseBodyCell(
|
|
48566
|
+
var DeviseBodyCell = function DeviseBodyCell(_ref5) {
|
|
48519
48567
|
var _col$devises, _col$decimal, _cellDevise$code;
|
|
48520
|
-
var rowData =
|
|
48521
|
-
col =
|
|
48522
|
-
editable =
|
|
48523
|
-
|
|
48524
|
-
isRowEditing =
|
|
48525
|
-
onSave =
|
|
48526
|
-
var
|
|
48527
|
-
|
|
48528
|
-
editing =
|
|
48529
|
-
setEditing =
|
|
48568
|
+
var rowData = _ref5.rowData,
|
|
48569
|
+
col = _ref5.col,
|
|
48570
|
+
editable = _ref5.editable,
|
|
48571
|
+
_ref5$isRowEditing = _ref5.isRowEditing,
|
|
48572
|
+
isRowEditing = _ref5$isRowEditing === void 0 ? false : _ref5$isRowEditing,
|
|
48573
|
+
onSave = _ref5.onSave;
|
|
48574
|
+
var _useState9 = useState(false),
|
|
48575
|
+
_useState0 = _slicedToArray$d(_useState9, 2),
|
|
48576
|
+
editing = _useState0[0],
|
|
48577
|
+
setEditing = _useState0[1];
|
|
48530
48578
|
var containerRef = useRef(null);
|
|
48531
48579
|
var devises = (_col$devises = col.devises) !== null && _col$devises !== void 0 ? _col$devises : col.currency ? [col.currency] : [];
|
|
48532
48580
|
|
|
48533
48581
|
// Local display state — initialized from rowData, updated immediately on save
|
|
48534
|
-
var
|
|
48535
|
-
_useState0 = _slicedToArray$d(_useState9, 2),
|
|
48536
|
-
displayCell = _useState0[0],
|
|
48537
|
-
setDisplayCell = _useState0[1];
|
|
48538
|
-
var _useState1 = useState(''),
|
|
48582
|
+
var _useState1 = useState(rowData[col.field]),
|
|
48539
48583
|
_useState10 = _slicedToArray$d(_useState1, 2),
|
|
48540
|
-
|
|
48541
|
-
|
|
48542
|
-
var _useState11 = useState(
|
|
48584
|
+
displayCell = _useState10[0],
|
|
48585
|
+
setDisplayCell = _useState10[1];
|
|
48586
|
+
var _useState11 = useState(''),
|
|
48543
48587
|
_useState12 = _slicedToArray$d(_useState11, 2),
|
|
48544
|
-
|
|
48545
|
-
|
|
48588
|
+
amount = _useState12[0],
|
|
48589
|
+
setAmount = _useState12[1];
|
|
48590
|
+
var _useState13 = useState(null),
|
|
48591
|
+
_useState14 = _slicedToArray$d(_useState13, 2),
|
|
48592
|
+
devise = _useState14[0],
|
|
48593
|
+
setDevise = _useState14[1];
|
|
48546
48594
|
var deviseRef = useRef(null);
|
|
48547
48595
|
var updateDevise = function updateDevise(val) {
|
|
48548
48596
|
deviseRef.current = val;
|
|
48549
48597
|
setDevise(val);
|
|
48550
48598
|
};
|
|
48551
48599
|
var openEdit = function openEdit() {
|
|
48552
|
-
var _displayCell$value,
|
|
48600
|
+
var _displayCell$value, _ref6, _ref7, _displayCell$devise;
|
|
48553
48601
|
if (!editable) return;
|
|
48554
48602
|
setAmount((_displayCell$value = displayCell === null || displayCell === void 0 ? void 0 : displayCell.value) !== null && _displayCell$value !== void 0 ? _displayCell$value : '');
|
|
48555
|
-
var initialDevise = (
|
|
48603
|
+
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;
|
|
48556
48604
|
deviseRef.current = initialDevise;
|
|
48557
48605
|
setDevise(initialDevise);
|
|
48558
48606
|
setEditing(true);
|
|
@@ -48561,9 +48609,9 @@ var DeviseBodyCell = function DeviseBodyCell(_ref4) {
|
|
|
48561
48609
|
// Sync avec le mode row edit : auto-ouvrir / fermer
|
|
48562
48610
|
useEffect(function () {
|
|
48563
48611
|
if (isRowEditing && !editing) {
|
|
48564
|
-
var _displayCell$value2,
|
|
48612
|
+
var _displayCell$value2, _ref8, _ref9, _displayCell$devise2;
|
|
48565
48613
|
setAmount((_displayCell$value2 = displayCell === null || displayCell === void 0 ? void 0 : displayCell.value) !== null && _displayCell$value2 !== void 0 ? _displayCell$value2 : '');
|
|
48566
|
-
var initialDevise = (
|
|
48614
|
+
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;
|
|
48567
48615
|
deviseRef.current = initialDevise;
|
|
48568
48616
|
setDevise(initialDevise);
|
|
48569
48617
|
setEditing(true);
|
|
@@ -48661,17 +48709,17 @@ var DeviseBodyCell = function DeviseBodyCell(_ref4) {
|
|
|
48661
48709
|
className: "span-sub"
|
|
48662
48710
|
}, "".concat(numberWithSpaces(value), " ").concat(cellDevise.code)));
|
|
48663
48711
|
};
|
|
48664
|
-
var TreeSelectBodyCell = function TreeSelectBodyCell(
|
|
48665
|
-
var rowData =
|
|
48666
|
-
col =
|
|
48667
|
-
editable =
|
|
48668
|
-
|
|
48669
|
-
isRowEditing =
|
|
48670
|
-
onSave =
|
|
48671
|
-
var
|
|
48672
|
-
|
|
48673
|
-
editing =
|
|
48674
|
-
setEditing =
|
|
48712
|
+
var TreeSelectBodyCell = function TreeSelectBodyCell(_ref0) {
|
|
48713
|
+
var rowData = _ref0.rowData,
|
|
48714
|
+
col = _ref0.col,
|
|
48715
|
+
editable = _ref0.editable,
|
|
48716
|
+
_ref0$isRowEditing = _ref0.isRowEditing,
|
|
48717
|
+
isRowEditing = _ref0$isRowEditing === void 0 ? false : _ref0$isRowEditing,
|
|
48718
|
+
onSave = _ref0.onSave;
|
|
48719
|
+
var _useState15 = useState(false),
|
|
48720
|
+
_useState16 = _slicedToArray$d(_useState15, 2),
|
|
48721
|
+
editing = _useState16[0],
|
|
48722
|
+
setEditing = _useState16[1];
|
|
48675
48723
|
var containerRef = useRef(null);
|
|
48676
48724
|
var mappedOptions = useMemo(function () {
|
|
48677
48725
|
var _col$keyField, _col$labelField;
|
|
@@ -48679,15 +48727,15 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref9) {
|
|
|
48679
48727
|
}, [col.options, col.keyField, col.labelField]);
|
|
48680
48728
|
|
|
48681
48729
|
// savedValue : valeur confirmée, utilisée pour l'affichage
|
|
48682
|
-
var
|
|
48683
|
-
_useState16 = _slicedToArray$d(_useState15, 2),
|
|
48684
|
-
savedValue = _useState16[0],
|
|
48685
|
-
setSavedValue = _useState16[1];
|
|
48686
|
-
// editValue : valeur courante dans l'éditeur, peut être transitoire
|
|
48687
|
-
var _useState17 = useState(null),
|
|
48730
|
+
var _useState17 = useState(rowData[col.field]),
|
|
48688
48731
|
_useState18 = _slicedToArray$d(_useState17, 2),
|
|
48689
|
-
|
|
48690
|
-
|
|
48732
|
+
savedValue = _useState18[0],
|
|
48733
|
+
setSavedValue = _useState18[1];
|
|
48734
|
+
// editValue : valeur courante dans l'éditeur, peut être transitoire
|
|
48735
|
+
var _useState19 = useState(null),
|
|
48736
|
+
_useState20 = _slicedToArray$d(_useState19, 2),
|
|
48737
|
+
editValue = _useState20[0],
|
|
48738
|
+
setEditValue = _useState20[1];
|
|
48691
48739
|
var openEdit = function openEdit() {
|
|
48692
48740
|
if (!editable) return;
|
|
48693
48741
|
setEditValue(savedValue);
|
|
@@ -48772,20 +48820,20 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref9) {
|
|
|
48772
48820
|
}, label);
|
|
48773
48821
|
}));
|
|
48774
48822
|
};
|
|
48775
|
-
var DocumentEditorCell = function DocumentEditorCell(
|
|
48823
|
+
var DocumentEditorCell = function DocumentEditorCell(_ref1) {
|
|
48776
48824
|
var _options$value;
|
|
48777
|
-
var options =
|
|
48778
|
-
col =
|
|
48779
|
-
onFilePickerOpen =
|
|
48780
|
-
onFilePickerClose =
|
|
48781
|
-
var
|
|
48782
|
-
|
|
48783
|
-
uploading =
|
|
48784
|
-
setUploading =
|
|
48825
|
+
var options = _ref1.options,
|
|
48826
|
+
col = _ref1.col,
|
|
48827
|
+
onFilePickerOpen = _ref1.onFilePickerOpen,
|
|
48828
|
+
onFilePickerClose = _ref1.onFilePickerClose;
|
|
48829
|
+
var _useState21 = useState(false),
|
|
48830
|
+
_useState22 = _slicedToArray$d(_useState21, 2),
|
|
48831
|
+
uploading = _useState22[0],
|
|
48832
|
+
setUploading = _useState22[1];
|
|
48785
48833
|
var fileInputRef = useRef(null);
|
|
48786
48834
|
var docs = (_options$value = options.value) !== null && _options$value !== void 0 ? _options$value : [];
|
|
48787
48835
|
var handleFileChange = /*#__PURE__*/function () {
|
|
48788
|
-
var
|
|
48836
|
+
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e) {
|
|
48789
48837
|
var file, formData, res, data, _t, _t2;
|
|
48790
48838
|
return _regenerator().w(function (_context) {
|
|
48791
48839
|
while (1) switch (_context.n) {
|
|
@@ -48840,7 +48888,7 @@ var DocumentEditorCell = function DocumentEditorCell(_ref0) {
|
|
|
48840
48888
|
}, _callee, null, [[2,, 7, 8]]);
|
|
48841
48889
|
}));
|
|
48842
48890
|
return function handleFileChange(_x) {
|
|
48843
|
-
return
|
|
48891
|
+
return _ref10.apply(this, arguments);
|
|
48844
48892
|
};
|
|
48845
48893
|
}();
|
|
48846
48894
|
var handlePickerClick = function handlePickerClick() {
|
|
@@ -48923,22 +48971,22 @@ var DocumentEditorCell = function DocumentEditorCell(_ref0) {
|
|
|
48923
48971
|
onChange: handleFileChange
|
|
48924
48972
|
}));
|
|
48925
48973
|
};
|
|
48926
|
-
var SelfEditableCell = function SelfEditableCell(
|
|
48974
|
+
var SelfEditableCell = function SelfEditableCell(_ref11) {
|
|
48927
48975
|
var _col$header;
|
|
48928
|
-
var rowData =
|
|
48929
|
-
col =
|
|
48930
|
-
editable =
|
|
48931
|
-
isRowEditing =
|
|
48932
|
-
onSave =
|
|
48933
|
-
renderDisplay =
|
|
48934
|
-
var
|
|
48935
|
-
_useState22 = _slicedToArray$d(_useState21, 2),
|
|
48936
|
-
editing = _useState22[0],
|
|
48937
|
-
setEditing = _useState22[1];
|
|
48938
|
-
var _useState23 = useState(rowData[col.field]),
|
|
48976
|
+
var rowData = _ref11.rowData,
|
|
48977
|
+
col = _ref11.col,
|
|
48978
|
+
editable = _ref11.editable,
|
|
48979
|
+
isRowEditing = _ref11.isRowEditing,
|
|
48980
|
+
onSave = _ref11.onSave,
|
|
48981
|
+
renderDisplay = _ref11.renderDisplay;
|
|
48982
|
+
var _useState23 = useState(false),
|
|
48939
48983
|
_useState24 = _slicedToArray$d(_useState23, 2),
|
|
48940
|
-
|
|
48941
|
-
|
|
48984
|
+
editing = _useState24[0],
|
|
48985
|
+
setEditing = _useState24[1];
|
|
48986
|
+
var _useState25 = useState(rowData[col.field]),
|
|
48987
|
+
_useState26 = _slicedToArray$d(_useState25, 2),
|
|
48988
|
+
localValue = _useState26[0],
|
|
48989
|
+
setLocalValue = _useState26[1];
|
|
48942
48990
|
var containerRef = useRef(null);
|
|
48943
48991
|
var localValueRef = useRef(localValue);
|
|
48944
48992
|
var committedRef = useRef(false);
|
|
@@ -49173,21 +49221,21 @@ var SelfEditableCell = function SelfEditableCell(_ref10) {
|
|
|
49173
49221
|
}));
|
|
49174
49222
|
}
|
|
49175
49223
|
};
|
|
49176
|
-
var DocumentBodyCell = function DocumentBodyCell(
|
|
49224
|
+
var DocumentBodyCell = function DocumentBodyCell(_ref12) {
|
|
49177
49225
|
var _rowData$col$field2;
|
|
49178
|
-
var rowData =
|
|
49179
|
-
col =
|
|
49180
|
-
editable =
|
|
49181
|
-
isRowEditing =
|
|
49182
|
-
onSave =
|
|
49183
|
-
var
|
|
49184
|
-
_useState26 = _slicedToArray$d(_useState25, 2),
|
|
49185
|
-
editing = _useState26[0],
|
|
49186
|
-
setEditing = _useState26[1];
|
|
49187
|
-
var _useState27 = useState((_rowData$col$field2 = rowData[col.field]) !== null && _rowData$col$field2 !== void 0 ? _rowData$col$field2 : []),
|
|
49226
|
+
var rowData = _ref12.rowData,
|
|
49227
|
+
col = _ref12.col,
|
|
49228
|
+
editable = _ref12.editable,
|
|
49229
|
+
isRowEditing = _ref12.isRowEditing,
|
|
49230
|
+
onSave = _ref12.onSave;
|
|
49231
|
+
var _useState27 = useState(false),
|
|
49188
49232
|
_useState28 = _slicedToArray$d(_useState27, 2),
|
|
49189
|
-
|
|
49190
|
-
|
|
49233
|
+
editing = _useState28[0],
|
|
49234
|
+
setEditing = _useState28[1];
|
|
49235
|
+
var _useState29 = useState((_rowData$col$field2 = rowData[col.field]) !== null && _rowData$col$field2 !== void 0 ? _rowData$col$field2 : []),
|
|
49236
|
+
_useState30 = _slicedToArray$d(_useState29, 2),
|
|
49237
|
+
docs = _useState30[0],
|
|
49238
|
+
setDocs = _useState30[1];
|
|
49191
49239
|
var containerRef = useRef(null);
|
|
49192
49240
|
var filePickerOpenRef = useRef(false);
|
|
49193
49241
|
useEffect(function () {
|
|
@@ -49272,43 +49320,46 @@ var DocumentBodyCell = function DocumentBodyCell(_ref11) {
|
|
|
49272
49320
|
}, doc.name));
|
|
49273
49321
|
})));
|
|
49274
49322
|
};
|
|
49275
|
-
var Table$1 = function Table(
|
|
49276
|
-
var
|
|
49277
|
-
value =
|
|
49278
|
-
|
|
49279
|
-
columns =
|
|
49280
|
-
|
|
49281
|
-
paginator =
|
|
49282
|
-
|
|
49283
|
-
rows =
|
|
49284
|
-
|
|
49285
|
-
loading =
|
|
49286
|
-
|
|
49287
|
-
stripedRows =
|
|
49288
|
-
|
|
49289
|
-
selectionMode =
|
|
49290
|
-
selection =
|
|
49291
|
-
onSelectionChange =
|
|
49292
|
-
|
|
49293
|
-
editable =
|
|
49294
|
-
|
|
49295
|
-
lockable =
|
|
49296
|
-
|
|
49297
|
-
rowEdit =
|
|
49298
|
-
|
|
49299
|
-
columnFilter =
|
|
49300
|
-
onChange =
|
|
49301
|
-
onCellChange =
|
|
49302
|
-
tableId =
|
|
49303
|
-
|
|
49304
|
-
|
|
49305
|
-
|
|
49306
|
-
|
|
49307
|
-
var effectiveEditable = lockable ? editable && !locked : editable;
|
|
49308
|
-
var _useState31 = useState(value),
|
|
49323
|
+
var Table$1 = function Table(_ref13) {
|
|
49324
|
+
var _ref13$value = _ref13.value,
|
|
49325
|
+
value = _ref13$value === void 0 ? [] : _ref13$value,
|
|
49326
|
+
_ref13$columns = _ref13.columns,
|
|
49327
|
+
columns = _ref13$columns === void 0 ? [] : _ref13$columns,
|
|
49328
|
+
_ref13$paginator = _ref13.paginator,
|
|
49329
|
+
paginator = _ref13$paginator === void 0 ? true : _ref13$paginator,
|
|
49330
|
+
_ref13$rows = _ref13.rows,
|
|
49331
|
+
rows = _ref13$rows === void 0 ? 25 : _ref13$rows,
|
|
49332
|
+
_ref13$loading = _ref13.loading,
|
|
49333
|
+
loading = _ref13$loading === void 0 ? false : _ref13$loading,
|
|
49334
|
+
_ref13$stripedRows = _ref13.stripedRows,
|
|
49335
|
+
stripedRows = _ref13$stripedRows === void 0 ? false : _ref13$stripedRows,
|
|
49336
|
+
_ref13$selectionMode = _ref13.selectionMode,
|
|
49337
|
+
selectionMode = _ref13$selectionMode === void 0 ? null : _ref13$selectionMode,
|
|
49338
|
+
selection = _ref13.selection,
|
|
49339
|
+
onSelectionChange = _ref13.onSelectionChange,
|
|
49340
|
+
_ref13$editable = _ref13.editable,
|
|
49341
|
+
editable = _ref13$editable === void 0 ? false : _ref13$editable,
|
|
49342
|
+
_ref13$lockable = _ref13.lockable,
|
|
49343
|
+
lockable = _ref13$lockable === void 0 ? false : _ref13$lockable,
|
|
49344
|
+
_ref13$rowEdit = _ref13.rowEdit,
|
|
49345
|
+
rowEdit = _ref13$rowEdit === void 0 ? false : _ref13$rowEdit,
|
|
49346
|
+
_ref13$columnFilter = _ref13.columnFilter,
|
|
49347
|
+
columnFilter = _ref13$columnFilter === void 0 ? true : _ref13$columnFilter,
|
|
49348
|
+
onChange = _ref13.onChange,
|
|
49349
|
+
onCellChange = _ref13.onCellChange,
|
|
49350
|
+
tableId = _ref13.tableId,
|
|
49351
|
+
onAdd = _ref13.onAdd,
|
|
49352
|
+
_ref13$addLabel = _ref13.addLabel,
|
|
49353
|
+
addLabel = _ref13$addLabel === void 0 ? 'Ajouter' : _ref13$addLabel;
|
|
49354
|
+
var _useState31 = useState(true),
|
|
49309
49355
|
_useState32 = _slicedToArray$d(_useState31, 2),
|
|
49310
|
-
|
|
49311
|
-
|
|
49356
|
+
locked = _useState32[0],
|
|
49357
|
+
setLocked = _useState32[1];
|
|
49358
|
+
var effectiveEditable = lockable ? editable && !locked : editable;
|
|
49359
|
+
var _useState33 = useState(value),
|
|
49360
|
+
_useState34 = _slicedToArray$d(_useState33, 2),
|
|
49361
|
+
data = _useState34[0],
|
|
49362
|
+
setData = _useState34[1];
|
|
49312
49363
|
var onCellChangeRef = useRef(onCellChange);
|
|
49313
49364
|
useEffect(function () {
|
|
49314
49365
|
onCellChangeRef.current = onCellChange;
|
|
@@ -49322,10 +49373,10 @@ var Table$1 = function Table(_ref12) {
|
|
|
49322
49373
|
return updated;
|
|
49323
49374
|
});
|
|
49324
49375
|
}, [onChange]);
|
|
49325
|
-
var
|
|
49326
|
-
|
|
49327
|
-
editingRows =
|
|
49328
|
-
setEditingRows =
|
|
49376
|
+
var _useState35 = useState({}),
|
|
49377
|
+
_useState36 = _slicedToArray$d(_useState35, 2),
|
|
49378
|
+
editingRows = _useState36[0],
|
|
49379
|
+
setEditingRows = _useState36[1];
|
|
49329
49380
|
var onRowEditChange = useCallback(function (e) {
|
|
49330
49381
|
setEditingRows(e.data);
|
|
49331
49382
|
}, []);
|
|
@@ -49374,26 +49425,26 @@ var Table$1 = function Table(_ref12) {
|
|
|
49374
49425
|
}
|
|
49375
49426
|
});
|
|
49376
49427
|
}, [DT_STATE_KEY]);
|
|
49377
|
-
var
|
|
49378
|
-
_useState36 = _slicedToArray$d(_useState35, 2),
|
|
49379
|
-
visibleColumns = _useState36[0],
|
|
49380
|
-
setVisibleColumns = _useState36[1];
|
|
49381
|
-
var _useState37 = useState(''),
|
|
49428
|
+
var _useState37 = useState(columns),
|
|
49382
49429
|
_useState38 = _slicedToArray$d(_useState37, 2),
|
|
49383
|
-
|
|
49384
|
-
|
|
49385
|
-
var _useState39 = useState(
|
|
49430
|
+
visibleColumns = _useState38[0],
|
|
49431
|
+
setVisibleColumns = _useState38[1];
|
|
49432
|
+
var _useState39 = useState(''),
|
|
49386
49433
|
_useState40 = _slicedToArray$d(_useState39, 2),
|
|
49387
|
-
|
|
49388
|
-
|
|
49389
|
-
var _useState41 = useState(
|
|
49434
|
+
globalFilter = _useState40[0],
|
|
49435
|
+
setGlobalFilter = _useState40[1];
|
|
49436
|
+
var _useState41 = useState(false),
|
|
49390
49437
|
_useState42 = _slicedToArray$d(_useState41, 2),
|
|
49391
|
-
|
|
49392
|
-
|
|
49393
|
-
var _useState43 = useState(
|
|
49438
|
+
settingsOpen = _useState42[0],
|
|
49439
|
+
setSettingsOpen = _useState42[1];
|
|
49440
|
+
var _useState43 = useState(0),
|
|
49394
49441
|
_useState44 = _slicedToArray$d(_useState43, 2),
|
|
49395
|
-
|
|
49396
|
-
|
|
49442
|
+
tableKey = _useState44[0],
|
|
49443
|
+
setTableKey = _useState44[1];
|
|
49444
|
+
var _useState45 = useState(false),
|
|
49445
|
+
_useState46 = _slicedToArray$d(_useState45, 2),
|
|
49446
|
+
fullscreen = _useState46[0],
|
|
49447
|
+
setFullscreen = _useState46[1];
|
|
49397
49448
|
useEffect(function () {
|
|
49398
49449
|
if (!fullscreen) return;
|
|
49399
49450
|
var onKeyDown = function onKeyDown(e) {
|
|
@@ -49407,7 +49458,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
49407
49458
|
var FILTER_KEY = useMemo(function () {
|
|
49408
49459
|
return tableId ? "Table:filterVisible:".concat(tableId) : 'Table:filterVisible';
|
|
49409
49460
|
}, [tableId]);
|
|
49410
|
-
var
|
|
49461
|
+
var _useState47 = useState(function () {
|
|
49411
49462
|
try {
|
|
49412
49463
|
var _JSON$parse;
|
|
49413
49464
|
return (_JSON$parse = JSON.parse(localStorage.getItem(FILTER_KEY))) !== null && _JSON$parse !== void 0 ? _JSON$parse : false;
|
|
@@ -49415,9 +49466,9 @@ var Table$1 = function Table(_ref12) {
|
|
|
49415
49466
|
return false;
|
|
49416
49467
|
}
|
|
49417
49468
|
}),
|
|
49418
|
-
|
|
49419
|
-
filterVisible =
|
|
49420
|
-
setFilterVisible =
|
|
49469
|
+
_useState48 = _slicedToArray$d(_useState47, 2),
|
|
49470
|
+
filterVisible = _useState48[0],
|
|
49471
|
+
setFilterVisible = _useState48[1];
|
|
49421
49472
|
var toggleFilter = function toggleFilter() {
|
|
49422
49473
|
setFilterVisible(function (v) {
|
|
49423
49474
|
var next = !v;
|
|
@@ -49458,13 +49509,13 @@ var Table$1 = function Table(_ref12) {
|
|
|
49458
49509
|
rowHeightsRef.current = {};
|
|
49459
49510
|
}
|
|
49460
49511
|
}
|
|
49461
|
-
var
|
|
49512
|
+
var _useState49 = useState(function () {
|
|
49462
49513
|
var saved = localStorage.getItem(ROW_PRESET_KEY);
|
|
49463
49514
|
return saved && ROW_PRESETS[saved] ? saved : null;
|
|
49464
49515
|
}),
|
|
49465
|
-
|
|
49466
|
-
rowPreset =
|
|
49467
|
-
setRowPreset =
|
|
49516
|
+
_useState50 = _slicedToArray$d(_useState49, 2),
|
|
49517
|
+
rowPreset = _useState50[0],
|
|
49518
|
+
setRowPreset = _useState50[1];
|
|
49468
49519
|
var tableWrapperRef = useRef(null);
|
|
49469
49520
|
useLayoutEffect(function () {
|
|
49470
49521
|
if (!tableWrapperRef.current) return;
|
|
@@ -49537,10 +49588,10 @@ var Table$1 = function Table(_ref12) {
|
|
|
49537
49588
|
});
|
|
49538
49589
|
return f;
|
|
49539
49590
|
}, [columns]);
|
|
49540
|
-
var
|
|
49541
|
-
|
|
49542
|
-
filters =
|
|
49543
|
-
setFilters =
|
|
49591
|
+
var _useState51 = useState(initialFilters),
|
|
49592
|
+
_useState52 = _slicedToArray$d(_useState51, 2),
|
|
49593
|
+
filters = _useState52[0],
|
|
49594
|
+
setFilters = _useState52[1];
|
|
49544
49595
|
useEffect(function () {
|
|
49545
49596
|
setFilters(initialFilters);
|
|
49546
49597
|
}, [initialFilters, columnFilter]);
|
|
@@ -49607,7 +49658,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
49607
49658
|
|
|
49608
49659
|
var linkTemplate = useCallback(function (col) {
|
|
49609
49660
|
return function (rowData) {
|
|
49610
|
-
var
|
|
49661
|
+
var _ref14, _col$href;
|
|
49611
49662
|
var label = rowData[col.field];
|
|
49612
49663
|
if (col.type === 'titleLink') {
|
|
49613
49664
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -49621,7 +49672,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
49621
49672
|
className: "table-item-title cell-text"
|
|
49622
49673
|
}, label));
|
|
49623
49674
|
}
|
|
49624
|
-
var href = typeof col.href === 'function' ? col.href(rowData) : (
|
|
49675
|
+
var href = typeof col.href === 'function' ? col.href(rowData) : (_ref14 = (_col$href = col.href) !== null && _col$href !== void 0 ? _col$href : rowData[col.field + 'Url']) !== null && _ref14 !== void 0 ? _ref14 : '#';
|
|
49625
49676
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
49626
49677
|
className: "arengi-table-grey-title-box",
|
|
49627
49678
|
style: {
|
|
@@ -49683,13 +49734,13 @@ var Table$1 = function Table(_ref12) {
|
|
|
49683
49734
|
}, []);
|
|
49684
49735
|
var lienFormulaireTemplate = useCallback(function (col) {
|
|
49685
49736
|
return function (rowData) {
|
|
49686
|
-
var _col$options3,
|
|
49737
|
+
var _col$options3, _ref15, _opt$label, _ref16, _col$href2;
|
|
49687
49738
|
var val = rowData[col.field];
|
|
49688
49739
|
var opt = (_col$options3 = col.options) === null || _col$options3 === void 0 ? void 0 : _col$options3.find(function (o) {
|
|
49689
49740
|
return o.value === val;
|
|
49690
49741
|
});
|
|
49691
|
-
var label = (
|
|
49692
|
-
var href = typeof col.href === 'function' ? col.href(rowData) : (
|
|
49742
|
+
var label = (_ref15 = (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : val) !== null && _ref15 !== void 0 ? _ref15 : '';
|
|
49743
|
+
var href = typeof col.href === 'function' ? col.href(rowData) : (_ref16 = (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : opt === null || opt === void 0 ? void 0 : opt.href) !== null && _ref16 !== void 0 ? _ref16 : null;
|
|
49693
49744
|
if (!label) return '';
|
|
49694
49745
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
49695
49746
|
style: {
|
|
@@ -50026,18 +50077,35 @@ var Table$1 = function Table(_ref12) {
|
|
|
50026
50077
|
return function (rowData) {
|
|
50027
50078
|
var vals = rowData[col.field];
|
|
50028
50079
|
if (!(vals !== null && vals !== void 0 && vals.length)) return '';
|
|
50080
|
+
var opts = vals.map(function (v) {
|
|
50081
|
+
var _col$options4;
|
|
50082
|
+
return (_col$options4 = col.options) === null || _col$options4 === void 0 ? void 0 : _col$options4.find(function (o) {
|
|
50083
|
+
return o.value === v;
|
|
50084
|
+
});
|
|
50085
|
+
}).filter(Boolean);
|
|
50086
|
+
var tooltipLines = opts.map(function (o) {
|
|
50087
|
+
return o.label;
|
|
50088
|
+
});
|
|
50089
|
+
if (opts.length > 4) {
|
|
50090
|
+
return /*#__PURE__*/React__default.createElement(HoverTooltip, {
|
|
50091
|
+
lines: tooltipLines
|
|
50092
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
50093
|
+
style: {
|
|
50094
|
+
color: '#3f3f46',
|
|
50095
|
+
fontSize: '12.25px'
|
|
50096
|
+
}
|
|
50097
|
+
}, opts.length, " ", col.header));
|
|
50098
|
+
}
|
|
50029
50099
|
if (col.clusterDisplay) {
|
|
50030
|
-
return /*#__PURE__*/React__default.createElement(
|
|
50100
|
+
return /*#__PURE__*/React__default.createElement(HoverTooltip, {
|
|
50101
|
+
lines: tooltipLines
|
|
50102
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
50031
50103
|
className: "RiskClusters-table"
|
|
50032
|
-
},
|
|
50033
|
-
var
|
|
50034
|
-
var opt = (_col$options4 = col.options) === null || _col$options4 === void 0 ? void 0 : _col$options4.find(function (o) {
|
|
50035
|
-
return o.value === v;
|
|
50036
|
-
});
|
|
50037
|
-
if (!opt) return null;
|
|
50104
|
+
}, opts.map(function (opt) {
|
|
50105
|
+
var _normalizeColor;
|
|
50038
50106
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
50039
50107
|
className: "RiskClusters",
|
|
50040
|
-
key:
|
|
50108
|
+
key: opt.value
|
|
50041
50109
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
50042
50110
|
className: "material-icons",
|
|
50043
50111
|
style: {
|
|
@@ -50047,32 +50115,29 @@ var Table$1 = function Table(_ref12) {
|
|
|
50047
50115
|
}, "bubble_chart"), /*#__PURE__*/React__default.createElement("span", {
|
|
50048
50116
|
className: "square"
|
|
50049
50117
|
}, opt.label));
|
|
50050
|
-
}));
|
|
50118
|
+
})));
|
|
50051
50119
|
}
|
|
50052
|
-
return /*#__PURE__*/React__default.createElement(
|
|
50120
|
+
return /*#__PURE__*/React__default.createElement(HoverTooltip, {
|
|
50121
|
+
lines: tooltipLines
|
|
50122
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
50053
50123
|
style: {
|
|
50054
50124
|
display: 'flex',
|
|
50055
50125
|
flexDirection: 'column',
|
|
50056
50126
|
gap: '0.25rem'
|
|
50057
50127
|
}
|
|
50058
|
-
},
|
|
50059
|
-
var _col$options5;
|
|
50060
|
-
var opt = (_col$options5 = col.options) === null || _col$options5 === void 0 ? void 0 : _col$options5.find(function (o) {
|
|
50061
|
-
return o.value === v;
|
|
50062
|
-
});
|
|
50063
|
-
if (!opt) return null;
|
|
50128
|
+
}, opts.map(function (opt) {
|
|
50064
50129
|
if (!normalizeColor(opt.color)) return /*#__PURE__*/React__default.createElement("span", {
|
|
50065
|
-
key:
|
|
50130
|
+
key: opt.value
|
|
50066
50131
|
}, opt.label);
|
|
50067
50132
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
50068
|
-
key:
|
|
50133
|
+
key: opt.value,
|
|
50069
50134
|
className: "tab_label",
|
|
50070
50135
|
style: {
|
|
50071
50136
|
backgroundColor: normalizeColor(opt.color),
|
|
50072
50137
|
color: textColorForBg(normalizeColor(opt.color))
|
|
50073
50138
|
}
|
|
50074
50139
|
}, opt.label);
|
|
50075
|
-
}));
|
|
50140
|
+
})));
|
|
50076
50141
|
};
|
|
50077
50142
|
}, []);
|
|
50078
50143
|
|
|
@@ -50196,16 +50261,16 @@ var Table$1 = function Table(_ref12) {
|
|
|
50196
50261
|
if ((col === null || col === void 0 ? void 0 : col.type) === 'treeSelect' || (col === null || col === void 0 ? void 0 : col.type) === 'devise') return;
|
|
50197
50262
|
var enrichedRow = newRowData;
|
|
50198
50263
|
if (col !== null && col !== void 0 && col.updates) {
|
|
50199
|
-
var _col$
|
|
50200
|
-
var option = (_col$
|
|
50264
|
+
var _col$options5;
|
|
50265
|
+
var option = (_col$options5 = col.options) === null || _col$options5 === void 0 ? void 0 : _col$options5.find(function (opt) {
|
|
50201
50266
|
return opt.value === newRowData[field];
|
|
50202
50267
|
});
|
|
50203
50268
|
if (option) {
|
|
50204
50269
|
var extra = {};
|
|
50205
|
-
Object.entries(col.updates).forEach(function (
|
|
50206
|
-
var
|
|
50207
|
-
targetField =
|
|
50208
|
-
optionProp =
|
|
50270
|
+
Object.entries(col.updates).forEach(function (_ref17) {
|
|
50271
|
+
var _ref18 = _slicedToArray$d(_ref17, 2),
|
|
50272
|
+
targetField = _ref18[0],
|
|
50273
|
+
optionProp = _ref18[1];
|
|
50209
50274
|
if (option[optionProp] !== undefined) extra[targetField] = option[optionProp];
|
|
50210
50275
|
});
|
|
50211
50276
|
enrichedRow = _objectSpread2(_objectSpread2({}, newRowData), extra);
|
|
@@ -50328,15 +50393,15 @@ var Table$1 = function Table(_ref12) {
|
|
|
50328
50393
|
var _onCellChangeRef$curr2;
|
|
50329
50394
|
var enrichedFields = _defineProperty$g({}, col.field, v);
|
|
50330
50395
|
if (col.updates) {
|
|
50331
|
-
var _col$
|
|
50332
|
-
var option = (_col$
|
|
50396
|
+
var _col$options6;
|
|
50397
|
+
var option = (_col$options6 = col.options) === null || _col$options6 === void 0 ? void 0 : _col$options6.find(function (opt) {
|
|
50333
50398
|
return opt.value === v;
|
|
50334
50399
|
});
|
|
50335
50400
|
if (option) {
|
|
50336
|
-
Object.entries(col.updates).forEach(function (
|
|
50337
|
-
var
|
|
50338
|
-
tf =
|
|
50339
|
-
op =
|
|
50401
|
+
Object.entries(col.updates).forEach(function (_ref19) {
|
|
50402
|
+
var _ref20 = _slicedToArray$d(_ref19, 2),
|
|
50403
|
+
tf = _ref20[0],
|
|
50404
|
+
op = _ref20[1];
|
|
50340
50405
|
if (option[op] !== undefined) enrichedFields[tf] = option[op];
|
|
50341
50406
|
});
|
|
50342
50407
|
}
|
|
@@ -50421,7 +50486,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
50421
50486
|
className: "pi pi-search",
|
|
50422
50487
|
style: {
|
|
50423
50488
|
color: '#71717a',
|
|
50424
|
-
fontSize: '
|
|
50489
|
+
fontSize: '11.9px'
|
|
50425
50490
|
}
|
|
50426
50491
|
}), /*#__PURE__*/React__default.createElement(InputText, {
|
|
50427
50492
|
value: globalFilter,
|
|
@@ -50435,14 +50500,14 @@ var Table$1 = function Table(_ref12) {
|
|
|
50435
50500
|
outline: 'none',
|
|
50436
50501
|
boxShadow: 'none',
|
|
50437
50502
|
padding: 0,
|
|
50438
|
-
fontSize: '
|
|
50503
|
+
fontSize: '12.25px',
|
|
50439
50504
|
width: '200px'
|
|
50440
50505
|
}
|
|
50441
50506
|
}), globalFilter && /*#__PURE__*/React__default.createElement("i", {
|
|
50442
50507
|
className: "pi pi-times",
|
|
50443
50508
|
style: {
|
|
50444
50509
|
color: '#71717a',
|
|
50445
|
-
fontSize: '
|
|
50510
|
+
fontSize: '10.5px',
|
|
50446
50511
|
cursor: 'pointer'
|
|
50447
50512
|
},
|
|
50448
50513
|
onClick: function onClick() {
|
|
@@ -50542,10 +50607,10 @@ var Table$1 = function Table(_ref12) {
|
|
|
50542
50607
|
setRowPreset(null);
|
|
50543
50608
|
setSettingsOpen(false);
|
|
50544
50609
|
}
|
|
50545
|
-
}].map(function (
|
|
50546
|
-
var icon =
|
|
50547
|
-
label =
|
|
50548
|
-
action =
|
|
50610
|
+
}].map(function (_ref21) {
|
|
50611
|
+
var icon = _ref21.icon,
|
|
50612
|
+
label = _ref21.label,
|
|
50613
|
+
action = _ref21.action;
|
|
50549
50614
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
50550
50615
|
key: label,
|
|
50551
50616
|
type: "button",
|
|
@@ -50559,7 +50624,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
50559
50624
|
background: 'none',
|
|
50560
50625
|
border: 'none',
|
|
50561
50626
|
cursor: 'pointer',
|
|
50562
|
-
fontSize: '
|
|
50627
|
+
fontSize: '12.25px',
|
|
50563
50628
|
color: '#3f3f46',
|
|
50564
50629
|
textAlign: 'left'
|
|
50565
50630
|
},
|
|
@@ -50572,7 +50637,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
50572
50637
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
50573
50638
|
className: "material-icons",
|
|
50574
50639
|
style: {
|
|
50575
|
-
fontSize: '
|
|
50640
|
+
fontSize: '14px',
|
|
50576
50641
|
color: '#71717a',
|
|
50577
50642
|
lineHeight: 1
|
|
50578
50643
|
}
|
|
@@ -50585,7 +50650,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
50585
50650
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
50586
50651
|
style: {
|
|
50587
50652
|
padding: '0.4rem 1rem 0.5rem',
|
|
50588
|
-
fontSize: '
|
|
50653
|
+
fontSize: '10.5px',
|
|
50589
50654
|
color: '#71717a'
|
|
50590
50655
|
}
|
|
50591
50656
|
}, "Hauteur des lignes"), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -50603,9 +50668,9 @@ var Table$1 = function Table(_ref12) {
|
|
|
50603
50668
|
}, {
|
|
50604
50669
|
key: 'large',
|
|
50605
50670
|
label: 'Grande'
|
|
50606
|
-
}].map(function (
|
|
50607
|
-
var key =
|
|
50608
|
-
label =
|
|
50671
|
+
}].map(function (_ref22) {
|
|
50672
|
+
var key = _ref22.key,
|
|
50673
|
+
label = _ref22.label;
|
|
50609
50674
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
50610
50675
|
key: key,
|
|
50611
50676
|
type: "button",
|
|
@@ -50621,7 +50686,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
50621
50686
|
style: {
|
|
50622
50687
|
flex: 1,
|
|
50623
50688
|
padding: '0.35rem 0',
|
|
50624
|
-
fontSize: '
|
|
50689
|
+
fontSize: '11.2px',
|
|
50625
50690
|
border: "1px solid ".concat(rowPreset === key ? '#6366f1' : '#e4e4e7'),
|
|
50626
50691
|
borderRadius: '4px',
|
|
50627
50692
|
cursor: 'pointer',
|
|
@@ -50732,6 +50797,22 @@ var Table$1 = function Table(_ref12) {
|
|
|
50732
50797
|
editingRows: rowEdit ? editingRows : undefined,
|
|
50733
50798
|
onRowEditChange: rowEdit ? onRowEditChange : undefined,
|
|
50734
50799
|
onRowEditComplete: rowEdit ? onRowEditComplete : undefined,
|
|
50800
|
+
footer: onAdd ? /*#__PURE__*/React__default.createElement("div", {
|
|
50801
|
+
style: {
|
|
50802
|
+
display: 'flex',
|
|
50803
|
+
justifyContent: 'center',
|
|
50804
|
+
padding: '8px 0'
|
|
50805
|
+
}
|
|
50806
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
50807
|
+
className: "btn btn-add",
|
|
50808
|
+
onClick: onAdd,
|
|
50809
|
+
style: {
|
|
50810
|
+
border: '2px solid #1E976A',
|
|
50811
|
+
color: '#1E976A',
|
|
50812
|
+
padding: '5px 12px',
|
|
50813
|
+
cursor: 'pointer'
|
|
50814
|
+
}
|
|
50815
|
+
}, addLabel)) : null,
|
|
50735
50816
|
dataKey: "id",
|
|
50736
50817
|
tableClassName: 'arengi-table',
|
|
50737
50818
|
resizableColumns: true,
|
|
@@ -50778,11 +50859,11 @@ var Table$1 = function Table(_ref12) {
|
|
|
50778
50859
|
key: "__row_actions__",
|
|
50779
50860
|
header: "",
|
|
50780
50861
|
body: function body(rowData) {
|
|
50781
|
-
var
|
|
50862
|
+
var _ref23, _linkCol$href;
|
|
50782
50863
|
var linkCol = columns.find(function (c) {
|
|
50783
50864
|
return c.type === 'titleLink' || c.type === 'link';
|
|
50784
50865
|
});
|
|
50785
|
-
var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (
|
|
50866
|
+
var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref23 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref23 !== void 0 ? _ref23 : null : null;
|
|
50786
50867
|
return /*#__PURE__*/React__default.createElement(RowActionsCell, {
|
|
50787
50868
|
actions: rowData[actionsCol.actionsField] || [],
|
|
50788
50869
|
rowData: rowData,
|
|
@@ -50814,7 +50895,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
50814
50895
|
}
|
|
50815
50896
|
});
|
|
50816
50897
|
}(), visibleColumns.map(function (col, index) {
|
|
50817
|
-
var _col$field, _col$
|
|
50898
|
+
var _col$field, _col$options7, _col$minWidth;
|
|
50818
50899
|
return /*#__PURE__*/React__default.createElement(Column, {
|
|
50819
50900
|
key: (_col$field = col.field) !== null && _col$field !== void 0 ? _col$field : index,
|
|
50820
50901
|
sortable: true,
|
|
@@ -50823,7 +50904,7 @@ var Table$1 = function Table(_ref12) {
|
|
|
50823
50904
|
header: col.header,
|
|
50824
50905
|
filter: filterVisible,
|
|
50825
50906
|
filterField: col.field,
|
|
50826
|
-
filterElement: (col.type === 'select' || col.type === 'label' || col.type === 'selectMultiple') && (_col$
|
|
50907
|
+
filterElement: (col.type === 'select' || col.type === 'label' || col.type === 'selectMultiple') && (_col$options7 = col.options) !== null && _col$options7 !== void 0 && _col$options7.length ? function (opts) {
|
|
50827
50908
|
return selectFilterElement(opts, col);
|
|
50828
50909
|
} : textFilterElement,
|
|
50829
50910
|
showFilterMenu: false,
|