arengibook 2.0.28-table → 2.0.29-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.
Files changed (2) hide show
  1. package/dist/index.js +148 -63
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49005,6 +49005,7 @@ var SelfEditableCell = function SelfEditableCell(_ref10) {
49005
49005
  }
49006
49006
  switch (col.type) {
49007
49007
  case 'select':
49008
+ case 'lienFormulaire':
49008
49009
  return /*#__PURE__*/React__default.createElement("div", {
49009
49010
  ref: containerRef
49010
49011
  }, /*#__PURE__*/React__default.createElement(Dropdown, _extends$J({}, DropdownPresets.Base, {
@@ -49013,6 +49014,7 @@ var SelfEditableCell = function SelfEditableCell(_ref10) {
49013
49014
  onChange: function onChange(e) {
49014
49015
  return commit(e.value);
49015
49016
  },
49017
+ withColor: true,
49016
49018
  autoFocus: true
49017
49019
  })));
49018
49020
  case 'selectMultiple':
@@ -49297,7 +49299,7 @@ var Table$1 = function Table(_ref12) {
49297
49299
  columnFilter = _ref12$columnFilter === void 0 ? true : _ref12$columnFilter,
49298
49300
  onChange = _ref12.onChange,
49299
49301
  onCellChange = _ref12.onCellChange,
49300
- carto = _ref12.carto;
49302
+ tableId = _ref12.tableId;
49301
49303
  var _useState29 = useState(true),
49302
49304
  _useState30 = _slicedToArray$d(_useState29, 2),
49303
49305
  locked = _useState30[0],
@@ -49353,17 +49355,17 @@ var Table$1 = function Table(_ref12) {
49353
49355
  });
49354
49356
  }, [data, onChange, onCellChange, columns, effectiveEditable]);
49355
49357
  var STORAGE_KEY = useMemo(function () {
49356
- return carto ? "Table:visibleColumns:".concat(carto) : "Table:visibleColumns";
49357
- }, [carto]);
49358
+ return tableId ? "Table:visibleColumns:".concat(tableId) : "Table:visibleColumns";
49359
+ }, [tableId]);
49358
49360
  var DT_STATE_KEY = useMemo(function () {
49359
- return carto ? "dt-state:".concat(carto) : 'dt-state';
49360
- }, [carto]);
49361
+ return tableId ? "dt-state:".concat(tableId) : 'dt-state';
49362
+ }, [tableId]);
49361
49363
  var clearDTColumnWidths = useCallback(function () {
49362
49364
  try {
49363
- var state = JSON.parse(sessionStorage.getItem(DT_STATE_KEY) || '{}');
49365
+ var state = JSON.parse(localStorage.getItem(DT_STATE_KEY) || '{}');
49364
49366
  delete state.columnWidths;
49365
49367
  delete state.tableWidth;
49366
- sessionStorage.setItem(DT_STATE_KEY, JSON.stringify(state));
49368
+ localStorage.setItem(DT_STATE_KEY, JSON.stringify(state));
49367
49369
  } catch (_) {}
49368
49370
  // Remove the <style> tag PrimeReact injected with !important widths
49369
49371
  document.querySelectorAll('style').forEach(function (s) {
@@ -49403,8 +49405,8 @@ var Table$1 = function Table(_ref12) {
49403
49405
  };
49404
49406
  }, [fullscreen]);
49405
49407
  var FILTER_KEY = useMemo(function () {
49406
- return carto ? "Table:filterVisible:".concat(carto) : 'Table:filterVisible';
49407
- }, [carto]);
49408
+ return tableId ? "Table:filterVisible:".concat(tableId) : 'Table:filterVisible';
49409
+ }, [tableId]);
49408
49410
  var _useState45 = useState(function () {
49409
49411
  try {
49410
49412
  var _JSON$parse;
@@ -49438,11 +49440,11 @@ var Table$1 = function Table(_ref12) {
49438
49440
  };
49439
49441
  }, [settingsOpen]);
49440
49442
  var ROW_HEIGHTS_KEY = useMemo(function () {
49441
- return carto ? "Table:rowHeights:".concat(carto) : 'Table:rowHeights';
49442
- }, [carto]);
49443
+ return tableId ? "Table:rowHeights:".concat(tableId) : 'Table:rowHeights';
49444
+ }, [tableId]);
49443
49445
  var ROW_PRESET_KEY = useMemo(function () {
49444
- return carto ? "Table:rowPreset:".concat(carto) : 'Table:rowPreset';
49445
- }, [carto]);
49446
+ return tableId ? "Table:rowPreset:".concat(tableId) : 'Table:rowPreset';
49447
+ }, [tableId]);
49446
49448
  var ROW_PRESETS = {
49447
49449
  small: 110,
49448
49450
  medium: 160,
@@ -49679,6 +49681,48 @@ var Table$1 = function Table(_ref12) {
49679
49681
  }, opt.label);
49680
49682
  };
49681
49683
  }, []);
49684
+ var lienFormulaireTemplate = useCallback(function (col) {
49685
+ return function (rowData) {
49686
+ var _col$options3, _ref14, _opt$label, _ref15, _col$href2;
49687
+ var val = rowData[col.field];
49688
+ var opt = (_col$options3 = col.options) === null || _col$options3 === void 0 ? void 0 : _col$options3.find(function (o) {
49689
+ return o.value === val;
49690
+ });
49691
+ var label = (_ref14 = (_opt$label = opt === null || opt === void 0 ? void 0 : opt.label) !== null && _opt$label !== void 0 ? _opt$label : val) !== null && _ref14 !== void 0 ? _ref14 : '';
49692
+ var href = typeof col.href === 'function' ? col.href(rowData) : (_ref15 = (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : opt === null || opt === void 0 ? void 0 : opt.href) !== null && _ref15 !== void 0 ? _ref15 : null;
49693
+ if (!label) return '';
49694
+ return /*#__PURE__*/React__default.createElement("div", {
49695
+ style: {
49696
+ display: 'flex',
49697
+ alignItems: 'center',
49698
+ gap: '6px'
49699
+ }
49700
+ }, /*#__PURE__*/React__default.createElement("span", {
49701
+ style: opt !== null && opt !== void 0 && opt.color ? {
49702
+ color: opt.color,
49703
+ fontWeight: 500
49704
+ } : undefined
49705
+ }, label), href && /*#__PURE__*/React__default.createElement("a", {
49706
+ href: href,
49707
+ target: "_blank",
49708
+ rel: "noopener noreferrer",
49709
+ onClick: function onClick(e) {
49710
+ return e.stopPropagation();
49711
+ },
49712
+ title: "Ouvrir la fiche",
49713
+ style: {
49714
+ display: 'flex',
49715
+ color: 'inherit',
49716
+ opacity: 0.6
49717
+ }
49718
+ }, /*#__PURE__*/React__default.createElement("i", {
49719
+ className: "pi pi-external-link",
49720
+ style: {
49721
+ fontSize: '0.8em'
49722
+ }
49723
+ })));
49724
+ };
49725
+ }, []);
49682
49726
  var textTemplate = useCallback(function (col) {
49683
49727
  return function (rowData) {
49684
49728
  var _rowData$col$field4;
@@ -49694,11 +49738,11 @@ var Table$1 = function Table(_ref12) {
49694
49738
  };
49695
49739
  var colorTextTemplate = useCallback(function (col) {
49696
49740
  return function (rowData) {
49697
- var _rowData$col$hrefFiel, _col$href2;
49741
+ var _rowData$col$hrefFiel, _col$href3;
49698
49742
  var text = rowData[col.field];
49699
49743
  if (!text) return '';
49700
49744
  var color = normalizeColor(rowData[col.field + 'Color']) || normalizeColor(col.defaultColor) || null;
49701
- var href = col.hrefField ? (_rowData$col$hrefFiel = rowData[col.hrefField]) !== null && _rowData$col$hrefFiel !== void 0 ? _rowData$col$hrefFiel : '#' : (_col$href2 = col.href) !== null && _col$href2 !== void 0 ? _col$href2 : null;
49745
+ var href = col.hrefField ? (_rowData$col$hrefFiel = rowData[col.hrefField]) !== null && _rowData$col$hrefFiel !== void 0 ? _rowData$col$hrefFiel : '#' : (_col$href3 = col.href) !== null && _col$href3 !== void 0 ? _col$href3 : null;
49702
49746
  var inner = color ? /*#__PURE__*/React__default.createElement("span", {
49703
49747
  className: "tab_label",
49704
49748
  style: {
@@ -49717,11 +49761,11 @@ var Table$1 = function Table(_ref12) {
49717
49761
  }, []);
49718
49762
  var pictoTemplate = useCallback(function (col) {
49719
49763
  return function (rowData) {
49720
- var _rowData$col$hrefFiel2, _col$href3;
49764
+ var _rowData$col$hrefFiel2, _col$href4;
49721
49765
  var text = rowData[col.field];
49722
49766
  var picto = rowData[col.field + 'Picto'];
49723
49767
  var icon = rowData[col.field + 'Icon'];
49724
- var href = col.hrefField ? (_rowData$col$hrefFiel2 = rowData[col.hrefField]) !== null && _rowData$col$hrefFiel2 !== void 0 ? _rowData$col$hrefFiel2 : '#' : (_col$href3 = col.href) !== null && _col$href3 !== void 0 ? _col$href3 : null;
49768
+ var href = col.hrefField ? (_rowData$col$hrefFiel2 = rowData[col.hrefField]) !== null && _rowData$col$hrefFiel2 !== void 0 ? _rowData$col$hrefFiel2 : '#' : (_col$href4 = col.href) !== null && _col$href4 !== void 0 ? _col$href4 : null;
49725
49769
  var inner;
49726
49770
  if (icon) {
49727
49771
  inner = /*#__PURE__*/React__default.createElement("span", {
@@ -49825,8 +49869,23 @@ var Table$1 = function Table(_ref12) {
49825
49869
  if (val === null || val === undefined || val === '') return '';
49826
49870
  var num = parseFloat(val);
49827
49871
  if (isNaN(num)) return val;
49828
- var bounded = col.min != null && num < col.min ? col.min : col.max != null && num > col.max ? col.max : num;
49829
- return bounded.toLocaleString('fr-FR');
49872
+ var outOfRange = col.min != null && num < col.min || col.max != null && num > col.max;
49873
+ var message = col.min != null && num < col.min ? "Min : ".concat(col.min) : col.max != null && num > col.max ? "Max : ".concat(col.max) : null;
49874
+ if (outOfRange) return /*#__PURE__*/React__default.createElement("span", {
49875
+ style: {
49876
+ color: '#e53935',
49877
+ display: 'inline-flex',
49878
+ alignItems: 'center',
49879
+ gap: '4px'
49880
+ },
49881
+ title: message
49882
+ }, num.toLocaleString('fr-FR'), /*#__PURE__*/React__default.createElement("span", {
49883
+ style: {
49884
+ fontSize: '0.75em',
49885
+ fontWeight: 600
49886
+ }
49887
+ }, message));
49888
+ return num.toLocaleString('fr-FR');
49830
49889
  };
49831
49890
  }, []);
49832
49891
  var indexTemplate = useCallback(function (col) {
@@ -49875,10 +49934,10 @@ var Table$1 = function Table(_ref12) {
49875
49934
  }, [columns]);
49876
49935
  var progressTemplate = useCallback(function (col) {
49877
49936
  return function (rowData) {
49878
- var _rowData$col$field7, _rowData$col$hrefFiel3, _col$href4;
49937
+ var _rowData$col$field7, _rowData$col$hrefFiel3, _col$href5;
49879
49938
  var pct = Math.min(100, Math.max(0, parseFloat((_rowData$col$field7 = rowData[col.field]) !== null && _rowData$col$field7 !== void 0 ? _rowData$col$field7 : 0)));
49880
49939
  var rounded = Math.max(10, Math.round(pct / 10) * 10);
49881
- var href = col.hrefField ? (_rowData$col$hrefFiel3 = rowData[col.hrefField]) !== null && _rowData$col$hrefFiel3 !== void 0 ? _rowData$col$hrefFiel3 : '#' : (_col$href4 = col.href) !== null && _col$href4 !== void 0 ? _col$href4 : null;
49940
+ var href = col.hrefField ? (_rowData$col$hrefFiel3 = rowData[col.hrefField]) !== null && _rowData$col$hrefFiel3 !== void 0 ? _rowData$col$hrefFiel3 : '#' : (_col$href5 = col.href) !== null && _col$href5 !== void 0 ? _col$href5 : null;
49882
49941
  var label = /*#__PURE__*/React__default.createElement("span", null, Math.round(pct), "%");
49883
49942
  return /*#__PURE__*/React__default.createElement("div", {
49884
49943
  style: {
@@ -49971,8 +50030,8 @@ var Table$1 = function Table(_ref12) {
49971
50030
  return /*#__PURE__*/React__default.createElement("div", {
49972
50031
  className: "RiskClusters-table"
49973
50032
  }, vals.map(function (v) {
49974
- var _col$options3, _normalizeColor;
49975
- var opt = (_col$options3 = col.options) === null || _col$options3 === void 0 ? void 0 : _col$options3.find(function (o) {
50033
+ var _col$options4, _normalizeColor;
50034
+ var opt = (_col$options4 = col.options) === null || _col$options4 === void 0 ? void 0 : _col$options4.find(function (o) {
49976
50035
  return o.value === v;
49977
50036
  });
49978
50037
  if (!opt) return null;
@@ -49997,8 +50056,8 @@ var Table$1 = function Table(_ref12) {
49997
50056
  gap: '0.25rem'
49998
50057
  }
49999
50058
  }, vals.map(function (v) {
50000
- var _col$options4;
50001
- var opt = (_col$options4 = col.options) === null || _col$options4 === void 0 ? void 0 : _col$options4.find(function (o) {
50059
+ var _col$options5;
50060
+ var opt = (_col$options5 = col.options) === null || _col$options5 === void 0 ? void 0 : _col$options5.find(function (o) {
50002
50061
  return o.value === v;
50003
50062
  });
50004
50063
  if (!opt) return null;
@@ -50076,13 +50135,9 @@ var Table$1 = function Table(_ref12) {
50076
50135
  return /*#__PURE__*/React__default.createElement(InputText, {
50077
50136
  type: "number",
50078
50137
  value: (_options$value4 = options.value) !== null && _options$value4 !== void 0 ? _options$value4 : '',
50079
- min: col.min,
50080
- max: col.max,
50081
50138
  step: col.step,
50082
50139
  onChange: function onChange(e) {
50083
50140
  var v = e.target.value === '' ? '' : parseFloat(e.target.value);
50084
- if (col.min != null && v !== '' && v < col.min) v = col.min;
50085
- if (col.max != null && v !== '' && v > col.max) v = col.max;
50086
50141
  options.editorCallback(v);
50087
50142
  },
50088
50143
  autoFocus: true
@@ -50141,16 +50196,16 @@ var Table$1 = function Table(_ref12) {
50141
50196
  if ((col === null || col === void 0 ? void 0 : col.type) === 'treeSelect' || (col === null || col === void 0 ? void 0 : col.type) === 'devise') return;
50142
50197
  var enrichedRow = newRowData;
50143
50198
  if (col !== null && col !== void 0 && col.updates) {
50144
- var _col$options5;
50145
- var option = (_col$options5 = col.options) === null || _col$options5 === void 0 ? void 0 : _col$options5.find(function (opt) {
50199
+ var _col$options6;
50200
+ var option = (_col$options6 = col.options) === null || _col$options6 === void 0 ? void 0 : _col$options6.find(function (opt) {
50146
50201
  return opt.value === newRowData[field];
50147
50202
  });
50148
50203
  if (option) {
50149
50204
  var extra = {};
50150
- Object.entries(col.updates).forEach(function (_ref14) {
50151
- var _ref15 = _slicedToArray$d(_ref14, 2),
50152
- targetField = _ref15[0],
50153
- optionProp = _ref15[1];
50205
+ Object.entries(col.updates).forEach(function (_ref16) {
50206
+ var _ref17 = _slicedToArray$d(_ref16, 2),
50207
+ targetField = _ref17[0],
50208
+ optionProp = _ref17[1];
50154
50209
  if (option[optionProp] !== undefined) extra[targetField] = option[optionProp];
50155
50210
  });
50156
50211
  enrichedRow = _objectSpread2(_objectSpread2({}, newRowData), extra);
@@ -50220,6 +50275,9 @@ var Table$1 = function Table(_ref12) {
50220
50275
  case 'select':
50221
50276
  displayFn = selectTemplate(col);
50222
50277
  break;
50278
+ case 'lienFormulaire':
50279
+ displayFn = lienFormulaireTemplate(col);
50280
+ break;
50223
50281
  case 'selectMultiple':
50224
50282
  displayFn = selectMultipleTemplate(col);
50225
50283
  break;
@@ -50270,15 +50328,15 @@ var Table$1 = function Table(_ref12) {
50270
50328
  var _onCellChangeRef$curr2;
50271
50329
  var enrichedFields = _defineProperty$g({}, col.field, v);
50272
50330
  if (col.updates) {
50273
- var _col$options6;
50274
- var option = (_col$options6 = col.options) === null || _col$options6 === void 0 ? void 0 : _col$options6.find(function (opt) {
50331
+ var _col$options7;
50332
+ var option = (_col$options7 = col.options) === null || _col$options7 === void 0 ? void 0 : _col$options7.find(function (opt) {
50275
50333
  return opt.value === v;
50276
50334
  });
50277
50335
  if (option) {
50278
- Object.entries(col.updates).forEach(function (_ref16) {
50279
- var _ref17 = _slicedToArray$d(_ref16, 2),
50280
- tf = _ref17[0],
50281
- op = _ref17[1];
50336
+ Object.entries(col.updates).forEach(function (_ref18) {
50337
+ var _ref19 = _slicedToArray$d(_ref18, 2),
50338
+ tf = _ref19[0],
50339
+ op = _ref19[1];
50282
50340
  if (option[op] !== undefined) enrichedFields[tf] = option[op];
50283
50341
  });
50284
50342
  }
@@ -50304,7 +50362,7 @@ var Table$1 = function Table(_ref12) {
50304
50362
  };
50305
50363
  }
50306
50364
  return displayFn;
50307
- }, [rowEdit, lockable, effectiveEditable, editingRows, updateRow, onChange, onCellChangeRef, linkTemplate, dateTemplate, selectTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate, numericTemplate, badgesTemplate, calculTemplate, documentTemplate, deviseTemplate, treeSelectTemplate, htmlTemplate, journalTemplate]);
50365
+ }, [rowEdit, lockable, effectiveEditable, editingRows, updateRow, onChange, onCellChangeRef, linkTemplate, dateTemplate, selectTemplate, lienFormulaireTemplate, selectMultipleTemplate, colorTextTemplate, pictoTemplate, textTemplate, numericTemplate, badgesTemplate, calculTemplate, documentTemplate, deviseTemplate, treeSelectTemplate, htmlTemplate, journalTemplate]);
50308
50366
  var getSortField = useCallback(function (col) {
50309
50367
  return col.field;
50310
50368
  }, []);
@@ -50312,7 +50370,7 @@ var Table$1 = function Table(_ref12) {
50312
50370
  useLayoutEffect(function () {
50313
50371
  if (autoWidthsWritten.current) return;
50314
50372
  try {
50315
- var state = JSON.parse(sessionStorage.getItem(DT_STATE_KEY) || '{}');
50373
+ var state = JSON.parse(localStorage.getItem(DT_STATE_KEY) || '{}');
50316
50374
  if (state.columnWidths) return; // user already has saved widths
50317
50375
  } catch (_unused5) {
50318
50376
  return;
@@ -50331,9 +50389,9 @@ var Table$1 = function Table(_ref12) {
50331
50389
  });
50332
50390
  document.body.removeChild(span);
50333
50391
  try {
50334
- var _state = JSON.parse(sessionStorage.getItem(DT_STATE_KEY) || '{}');
50392
+ var _state = JSON.parse(localStorage.getItem(DT_STATE_KEY) || '{}');
50335
50393
  _state.columnWidths = widths.join(',');
50336
- sessionStorage.setItem(DT_STATE_KEY, JSON.stringify(_state));
50394
+ localStorage.setItem(DT_STATE_KEY, JSON.stringify(_state));
50337
50395
  } catch (_unused6) {
50338
50396
  return;
50339
50397
  }
@@ -50484,10 +50542,10 @@ var Table$1 = function Table(_ref12) {
50484
50542
  setRowPreset(null);
50485
50543
  setSettingsOpen(false);
50486
50544
  }
50487
- }].map(function (_ref18) {
50488
- var icon = _ref18.icon,
50489
- label = _ref18.label,
50490
- action = _ref18.action;
50545
+ }].map(function (_ref20) {
50546
+ var icon = _ref20.icon,
50547
+ label = _ref20.label,
50548
+ action = _ref20.action;
50491
50549
  return /*#__PURE__*/React__default.createElement("button", {
50492
50550
  key: label,
50493
50551
  type: "button",
@@ -50545,9 +50603,9 @@ var Table$1 = function Table(_ref12) {
50545
50603
  }, {
50546
50604
  key: 'large',
50547
50605
  label: 'Grande'
50548
- }].map(function (_ref19) {
50549
- var key = _ref19.key,
50550
- label = _ref19.label;
50606
+ }].map(function (_ref21) {
50607
+ var key = _ref21.key,
50608
+ label = _ref21.label;
50551
50609
  return /*#__PURE__*/React__default.createElement("button", {
50552
50610
  key: key,
50553
50611
  type: "button",
@@ -50681,6 +50739,7 @@ var Table$1 = function Table(_ref12) {
50681
50739
  removableSort: true,
50682
50740
  reorderableColumns: true,
50683
50741
  stateKey: DT_STATE_KEY,
50742
+ stateStorage: "local",
50684
50743
  scrollable: true,
50685
50744
  scrollHeight: fullscreen ? 'flex' : '70vh',
50686
50745
  pt: {
@@ -50719,11 +50778,11 @@ var Table$1 = function Table(_ref12) {
50719
50778
  key: "__row_actions__",
50720
50779
  header: "",
50721
50780
  body: function body(rowData) {
50722
- var _ref20, _linkCol$href;
50781
+ var _ref22, _linkCol$href;
50723
50782
  var linkCol = columns.find(function (c) {
50724
50783
  return c.type === 'titleLink' || c.type === 'link';
50725
50784
  });
50726
- var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref20 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref20 !== void 0 ? _ref20 : null : null;
50785
+ var linkHref = linkCol ? typeof linkCol.href === 'function' ? linkCol.href(rowData) : (_ref22 = (_linkCol$href = linkCol.href) !== null && _linkCol$href !== void 0 ? _linkCol$href : rowData[linkCol.field + 'Url']) !== null && _ref22 !== void 0 ? _ref22 : null : null;
50727
50786
  return /*#__PURE__*/React__default.createElement(RowActionsCell, {
50728
50787
  actions: rowData[actionsCol.actionsField] || [],
50729
50788
  rowData: rowData,
@@ -50755,7 +50814,7 @@ var Table$1 = function Table(_ref12) {
50755
50814
  }
50756
50815
  });
50757
50816
  }(), visibleColumns.map(function (col, index) {
50758
- var _col$field, _col$options7, _col$minWidth;
50817
+ var _col$field, _col$options8, _col$minWidth;
50759
50818
  return /*#__PURE__*/React__default.createElement(Column, {
50760
50819
  key: (_col$field = col.field) !== null && _col$field !== void 0 ? _col$field : index,
50761
50820
  sortable: true,
@@ -50764,7 +50823,7 @@ var Table$1 = function Table(_ref12) {
50764
50823
  header: col.header,
50765
50824
  filter: filterVisible,
50766
50825
  filterField: col.field,
50767
- filterElement: (col.type === 'select' || col.type === 'label' || col.type === 'selectMultiple') && (_col$options7 = col.options) !== null && _col$options7 !== void 0 && _col$options7.length ? function (opts) {
50826
+ filterElement: (col.type === 'select' || col.type === 'label' || col.type === 'selectMultiple') && (_col$options8 = col.options) !== null && _col$options8 !== void 0 && _col$options8.length ? function (opts) {
50768
50827
  return selectFilterElement(opts, col);
50769
50828
  } : textFilterElement,
50770
50829
  showFilterMenu: false,
@@ -50876,6 +50935,19 @@ var competencesOptions = [{
50876
50935
  label: 'Design',
50877
50936
  color: '#FF61F6'
50878
50937
  }];
50938
+ var ficheOptions = [{
50939
+ value: 1,
50940
+ label: 'Déclaration Cyber #001 — Accès non autorisé',
50941
+ href: '/evenement/1'
50942
+ }, {
50943
+ value: 2,
50944
+ label: 'Déclaration RH #002 — Conflit salarial',
50945
+ href: '/evenement/2'
50946
+ }, {
50947
+ value: 3,
50948
+ label: 'Déclaration Fraude #003 — Faux virement',
50949
+ href: '/evenement/3'
50950
+ }];
50879
50951
  var dataTyped = [{
50880
50952
  id: 1,
50881
50953
  nom: 'Alice Martin',
@@ -50901,7 +50973,8 @@ var dataTyped = [{
50901
50973
  })
50902
50974
  },
50903
50975
  service: 'tech-dev',
50904
- owners: ['Marie Dupont', 'Jean Martin']
50976
+ owners: ['Marie Dupont', 'Jean Martin'],
50977
+ ficheRef: 1
50905
50978
  }, {
50906
50979
  id: 2,
50907
50980
  nom: 'Bob Dupont',
@@ -50931,7 +51004,8 @@ var dataTyped = [{
50931
51004
  })
50932
51005
  },
50933
51006
  service: 'metier-compta',
50934
- owners: ['Sophie Bernard', 'Paul Leroy', 'Claire Moreau', 'Lucas Petit']
51007
+ owners: ['Sophie Bernard', 'Paul Leroy', 'Claire Moreau', 'Lucas Petit'],
51008
+ ficheRef: 2
50935
51009
  }, {
50936
51010
  id: 3,
50937
51011
  nom: 'Clara Leroy',
@@ -50953,7 +51027,8 @@ var dataTyped = [{
50953
51027
  })
50954
51028
  },
50955
51029
  service: 'support',
50956
- owners: ['Alice Rousseau']
51030
+ owners: ['Alice Rousseau'],
51031
+ ficheRef: 3
50957
51032
  }, {
50958
51033
  id: 4,
50959
51034
  nom: 'David Bernard',
@@ -50970,7 +51045,8 @@ var dataTyped = [{
50970
51045
  fichiers: [],
50971
51046
  montant: null,
50972
51047
  service: 'tech-infra',
50973
- owners: []
51048
+ owners: [],
51049
+ ficheRef: null
50974
51050
  }, {
50975
51051
  id: 5,
50976
51052
  nom: 'Emma Petit',
@@ -50996,7 +51072,8 @@ var dataTyped = [{
50996
51072
  })
50997
51073
  },
50998
51074
  service: null,
50999
- owners: ['Marc Girard', 'Isabelle Noir', 'Thomas Klein', 'Nadia Sow', 'Romain Vénel']
51075
+ owners: ['Marc Girard', 'Isabelle Noir', 'Thomas Klein', 'Nadia Sow', 'Romain Vénel'],
51076
+ ficheRef: 1
51000
51077
  }, {
51001
51078
  id: 6,
51002
51079
  nom: 'François Morel',
@@ -51018,7 +51095,8 @@ var dataTyped = [{
51018
51095
  })
51019
51096
  },
51020
51097
  service: 'metier-rh',
51021
- owners: ['Pierre Simon', 'Lucie Blanc']
51098
+ owners: ['Pierre Simon', 'Lucie Blanc'],
51099
+ ficheRef: 2
51022
51100
  }, {
51023
51101
  id: 7,
51024
51102
  nom: 'Grace Rousseau',
@@ -51052,7 +51130,8 @@ var dataTyped = [{
51052
51130
  })
51053
51131
  },
51054
51132
  service: 'tech-secu',
51055
- owners: ['Camille Durand', 'Alexis Foret', 'Yasmine Aït']
51133
+ owners: ['Camille Durand', 'Alexis Foret', 'Yasmine Aït'],
51134
+ ficheRef: 3
51056
51135
  }];
51057
51136
  var columnsTyped = [{
51058
51137
  field: 'nom',
@@ -51123,6 +51202,12 @@ var columnsTyped = [{
51123
51202
  field: 'owners',
51124
51203
  header: 'Responsables',
51125
51204
  type: 'badges'
51205
+ }, {
51206
+ field: 'ficheRef',
51207
+ header: 'Fiche liée',
51208
+ type: 'lienFormulaire',
51209
+ editable: true,
51210
+ options: ficheOptions
51126
51211
  }];
51127
51212
  var TablePresets = {
51128
51213
  Base: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.0.28-table",
4
+ "version": "2.0.29-table",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {