@crystaldesign/diva-archive 25.7.0-beta.24 → 25.7.0-beta.25

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/build/esm/index.js +19 -3
  2. package/package.json +3 -3
@@ -429,7 +429,8 @@ function openPlannerAction(openComponent, updateBreadcrumbs) {
429
429
  component: {
430
430
  type: 'DIVA_WEBPLANNER',
431
431
  parameters: {
432
- divaNr: item.DivaNrVersion
432
+ divaNr: item.DivaNrVersion,
433
+ assignNewDivaNr: item.OrderStatus === 'SEND' ? 'true' : 'false'
433
434
  }
434
435
  }
435
436
  }]
@@ -437,7 +438,8 @@ function openPlannerAction(openComponent, updateBreadcrumbs) {
437
438
  openComponent({
438
439
  type: 'DIVA_WEBPLANNER',
439
440
  parameters: {
440
- divaNr: item.DivaNrVersion
441
+ divaNr: item.DivaNrVersion,
442
+ assignNewDivaNr: item.OrderStatus === 'SEND' ? 'true' : 'false'
441
443
  }
442
444
  });
443
445
  if (DivaUtils.bridge) {
@@ -1215,7 +1217,7 @@ function SubRow$1 (_ref) {
1215
1217
  })), {}, {
1216
1218
  className: cell.column.fixed ? 'fixed' : '',
1217
1219
  children: cell.render('Cell', {
1218
- value: cell.column.id != 'DivaNr' ? x[cell.column.id.replaceAll(/\[/g, '.').replaceAll(/\]/g, '')] : undefined,
1220
+ value: getCellValue(cell, x),
1219
1221
  row: _objectSpread(_objectSpread({}, row), {}, {
1220
1222
  original: x,
1221
1223
  canExpand: false
@@ -1228,6 +1230,20 @@ function SubRow$1 (_ref) {
1228
1230
  })
1229
1231
  });
1230
1232
  }
1233
+ function getCellValue(cell, x) {
1234
+ if (cell.column.valueMapping) {
1235
+ return getCellDisplayValue(x, cell.column);
1236
+ }
1237
+ return cell.column.id !== 'DivaNr' ? x[cell.column.id.replaceAll(/\[/g, '.').replaceAll(/\]/g, '')] : undefined;
1238
+ }
1239
+ function getCellDisplayValue(origData, column) {
1240
+ var valueMapping = column.valueMapping;
1241
+ var value = origData[column.id.replaceAll(/\[/g, '.').replaceAll(/\]/g, '')];
1242
+ var mapping = valueMapping.find(function (m) {
1243
+ return m.origValue === value;
1244
+ });
1245
+ return mapping ? mapping.displayValue : value;
1246
+ }
1231
1247
 
1232
1248
  function SubRow (_ref) {
1233
1249
  var row = _ref.row,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-archive",
3
- "version": "25.7.0-beta.24",
3
+ "version": "25.7.0-beta.25",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^6.5.0",
@@ -15,10 +15,10 @@
15
15
  "react-dom": "^18.3.1"
16
16
  },
17
17
  "dependencies": {
18
- "@crystaldesign/grid": "25.7.0-beta.24",
18
+ "@crystaldesign/grid": "25.7.0-beta.25",
19
19
  "flat": "^5.0.2"
20
20
  },
21
21
  "module": "build/esm/index.js",
22
22
  "types": "./build/types/archive/src/index.d.ts",
23
- "gitHead": "447b759fcf0927ffc86bd3c3b32afb327707a8a8"
23
+ "gitHead": "b07acc7d1fe8647bb06e54effe10421e2de2b3c5"
24
24
  }