@crystaldesign/diva-backoffice 24.13.0-beta.3 → 24.13.0-beta.5

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.
@@ -7809,6 +7809,25 @@ function loadConfiguration(t, root, config, lang) {
7809
7809
  hidden: function hidden(data) {
7810
7810
  return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
7811
7811
  }
7812
+ }, {
7813
+ name: ['settings', 'automaticVersioning'],
7814
+ label: t('backoffice.form.organizationdetails.items.automaticversioning'),
7815
+ permission: 'backoffice_admin_organizations',
7816
+ hidden: function hidden(data) {
7817
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'ASSOCIATION';
7818
+ },
7819
+ type: 'radio',
7820
+ optionType: 'button',
7821
+ options: [{
7822
+ label: t('backoffice.form.organizationdetails.items.na'),
7823
+ value: undefined
7824
+ }, {
7825
+ label: t('backoffice.form.organizationdetails.items.ja'),
7826
+ value: true
7827
+ }, {
7828
+ label: t('backoffice.form.organizationdetails.items.nein'),
7829
+ value: false
7830
+ }]
7812
7831
  }, {
7813
7832
  name: ['api2Location', 'vk'],
7814
7833
  label: t('backoffice.form.organizationdetails.items.api2Location.vk'),
@@ -23431,38 +23450,6 @@ function StringCell (_ref) {
23431
23450
  var form = useContext(EditableContext);
23432
23451
  var _useTranslation = useTranslation(),
23433
23452
  t = _useTranslation.t;
23434
- var _useState3 = useState(undefined),
23435
- _useState4 = _slicedToArray(_useState3, 2),
23436
- color = _useState4[0],
23437
- setColor = _useState4[1];
23438
- useEffect(function () {
23439
- if (column.color && record) {
23440
- var returnValue = '';
23441
- var _iterator = _createForOfIteratorHelper$7(column.color),
23442
- _step;
23443
- try {
23444
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
23445
- var col = _step.value;
23446
- for (var idx = 0; idx < col.onValues.length; idx++) {
23447
- var _col$fields, _col$operations, _col$onValues, _JSON$stringify;
23448
- var field = (_col$fields = col.fields) === null || _col$fields === void 0 ? void 0 : _col$fields[idx];
23449
- var operation = (_col$operations = col.operations) === null || _col$operations === void 0 ? void 0 : _col$operations[0];
23450
- var onValue = (_col$onValues = col.onValues) === null || _col$onValues === void 0 ? void 0 : _col$onValues[idx];
23451
- if (!field && operation === 'eq' && onValue === children[1]) {
23452
- returnValue = col.color;
23453
- } else if (field && operation === 'ct' && (_JSON$stringify = JSON.stringify(record[field])) !== null && _JSON$stringify !== void 0 && _JSON$stringify.includes(onValue)) {
23454
- returnValue = col.color;
23455
- }
23456
- }
23457
- }
23458
- } catch (err) {
23459
- _iterator.e(err);
23460
- } finally {
23461
- _iterator.f();
23462
- }
23463
- setColor(returnValue);
23464
- }
23465
- }, []);
23466
23453
  useEffect(function () {
23467
23454
  if (editing) {
23468
23455
  inputRef.current.focus();
@@ -23542,7 +23529,7 @@ function StringCell (_ref) {
23542
23529
  whiteSpace: 'nowrap',
23543
23530
  overflow: 'hidden',
23544
23531
  textOverflow: 'ellipsis',
23545
- color: color == '' ? undefined : color,
23532
+ color: getColor(column, record, children[1]),
23546
23533
  width: column.width,
23547
23534
  paddingRight: 12
23548
23535
  },
@@ -23551,6 +23538,33 @@ function StringCell (_ref) {
23551
23538
  });
23552
23539
  }
23553
23540
  }
23541
+ function getColor(column, record, value) {
23542
+ if (column.color && record) {
23543
+ var _iterator = _createForOfIteratorHelper$7(column.color),
23544
+ _step;
23545
+ try {
23546
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
23547
+ var col = _step.value;
23548
+ for (var idx = 0; idx < col.onValues.length; idx++) {
23549
+ var _col$fields, _col$operations, _col$onValues, _JSON$stringify;
23550
+ var field = (_col$fields = col.fields) === null || _col$fields === void 0 ? void 0 : _col$fields[idx];
23551
+ var operation = (_col$operations = col.operations) === null || _col$operations === void 0 ? void 0 : _col$operations[0];
23552
+ var onValue = (_col$onValues = col.onValues) === null || _col$onValues === void 0 ? void 0 : _col$onValues[idx];
23553
+ if (!field && operation === 'eq' && onValue === value) {
23554
+ return col.color;
23555
+ } else if (field && operation === 'ct' && (_JSON$stringify = JSON.stringify(record[field])) !== null && _JSON$stringify !== void 0 && _JSON$stringify.includes(onValue)) {
23556
+ return col.color;
23557
+ }
23558
+ }
23559
+ }
23560
+ } catch (err) {
23561
+ _iterator.e(err);
23562
+ } finally {
23563
+ _iterator.f();
23564
+ }
23565
+ }
23566
+ return undefined;
23567
+ }
23554
23568
 
23555
23569
  function TextCell (_ref) {
23556
23570
  var children = _ref.children,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/StringCell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAmB,MAAM,IAAI,CAAC;AAGzD,MAAM,CAAC,OAAO,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,kBAAkB,qBAoHzF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/StringCell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAmB,MAAM,IAAI,CAAC;AAGzD,MAAM,CAAC,OAAO,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,kBAAkB,qBAgGzF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "24.13.0-beta.3",
3
+ "version": "24.13.0-beta.5",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^6.5.0",
@@ -15,13 +15,13 @@
15
15
  "dependencies": {
16
16
  "@ant-design/icons": "5.4.0",
17
17
  "@babel/runtime": "7.24.7",
18
- "@crystaldesign/content-box": "24.13.0-beta.3",
19
- "@crystaldesign/content-item": "24.13.0-beta.3",
20
- "@crystaldesign/diva-core": "24.13.0-beta.3",
21
- "@crystaldesign/diva-utils": "24.13.0-beta.3",
22
- "@crystaldesign/media-upload": "24.13.0-beta.3",
23
- "@crystaldesign/rtf-editor": "24.13.0-beta.3",
24
- "@crystaldesign/spreadsheet": "24.13.0-beta.3",
18
+ "@crystaldesign/content-box": "24.13.0-beta.5",
19
+ "@crystaldesign/content-item": "24.13.0-beta.5",
20
+ "@crystaldesign/diva-core": "24.13.0-beta.5",
21
+ "@crystaldesign/diva-utils": "24.13.0-beta.5",
22
+ "@crystaldesign/media-upload": "24.13.0-beta.5",
23
+ "@crystaldesign/rtf-editor": "24.13.0-beta.5",
24
+ "@crystaldesign/spreadsheet": "24.13.0-beta.5",
25
25
  "@google/model-viewer": "3.5.0",
26
26
  "ag-charts-community": "^10.1.0",
27
27
  "ag-charts-react": "^10.1.0",
@@ -51,5 +51,5 @@
51
51
  },
52
52
  "module": "build/esm/index.js",
53
53
  "types": "./build/types/backoffice/src/index.d.ts",
54
- "gitHead": "5aa6bcf4c4ac623e20187050af1f9f8b6e9b2ff9"
54
+ "gitHead": "b42ea6977e0a674e5defe00aaf003146545fcad1"
55
55
  }