cilog-lib 1.13.13 → 1.13.14

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.
@@ -1482,7 +1482,7 @@ class CilogGridComponent {
1482
1482
  if (params.data.readonly || params.data[params.colDef.field].readonly) {
1483
1483
  return false;
1484
1484
  }
1485
- let typeSaisie = params.data.typeSaisie != null ? params.data.typeSaisie : col.type;
1485
+ let typeSaisie = this.getTypeCellule(params.data, col);
1486
1486
  switch (typeSaisie) {
1487
1487
  case ColType.Button:
1488
1488
  case ColType.File:
@@ -1515,7 +1515,7 @@ class CilogGridComponent {
1515
1515
  cellEditorSelector: (params) => {
1516
1516
  if (!params.data)
1517
1517
  return undefined;
1518
- let typeSaisie = params.data.typeSaisie != null ? params.data.typeSaisie : col.type;
1518
+ let typeSaisie = this.getTypeCellule(params.data, col);
1519
1519
  switch (typeSaisie) {
1520
1520
  case ColType.Horaire:
1521
1521
  return { component: TimeMaskEditorComponent };
@@ -1539,7 +1539,7 @@ class CilogGridComponent {
1539
1539
  params.data[params.colDef.field].value = null;
1540
1540
  return true;
1541
1541
  }
1542
- let typeSaisie = params.data.typeSaisie != null ? params.data.typeSaisie : col.type;
1542
+ let typeSaisie = this.getTypeCellule(params.data, col);
1543
1543
  switch (typeSaisie) {
1544
1544
  case ColType.Horaire:
1545
1545
  const regexHeure = /^(([01]\d|2[0-3]):([0-5]\d)|24:00)$/;
@@ -1574,7 +1574,7 @@ class CilogGridComponent {
1574
1574
  return params.data[params.colDef.field].value;
1575
1575
  },
1576
1576
  valueFormatter: (params) => {
1577
- let typeSaisie = params.data.typeSaisie != null ? params.data.typeSaisie : col.type;
1577
+ let typeSaisie = this.getTypeCellule(params.data, col);
1578
1578
  switch (typeSaisie) {
1579
1579
  case ColType.Number:
1580
1580
  const rawValue = params.data[params.colDef.field]?.value;
@@ -1673,6 +1673,15 @@ class CilogGridComponent {
1673
1673
  }
1674
1674
  return cols;
1675
1675
  }, ...(ngDevMode ? [{ debugName: "colDefs" }] : /* istanbul ignore next */ []));
1676
+ getTypeCellule(row, col) {
1677
+ if (row[col.id].typeSaisie != null) {
1678
+ return row[col.id].typeSaisie;
1679
+ }
1680
+ if (row.typeSaisie != null) {
1681
+ return row.typeSaisie;
1682
+ }
1683
+ return col.type;
1684
+ }
1676
1685
  getRowId = (params) => {
1677
1686
  if (params.data && params.data.id != null) {
1678
1687
  return params.data.id.toString();