@crystaldesign/diva-backoffice 26.10.0-beta.35 → 26.10.0-beta.36

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.
@@ -36313,7 +36313,7 @@ function useModule$1 (currentModules) {
36313
36313
  children: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingCatalogs')
36314
36314
  }),
36315
36315
  title: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingCatalogs')
36316
- }, {
36316
+ }]), [{
36317
36317
  key: 'series',
36318
36318
  style: {
36319
36319
  margin: 0
@@ -36324,7 +36324,7 @@ function useModule$1 (currentModules) {
36324
36324
  children: t('backoffice.menu.items.label.IDMEnricherEditorTableEnrichmentSeries')
36325
36325
  }),
36326
36326
  title: t('backoffice.menu.items.label.IDMEnricherEditorTableEnrichmentSeries')
36327
- }]), [{
36327
+ }, {
36328
36328
  key: 'features',
36329
36329
  style: {
36330
36330
  margin: 0
@@ -38895,6 +38895,18 @@ function PropertyObjectExpandedEditor(_ref) {
38895
38895
 
38896
38896
  function ownKeys$_(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
38897
38897
  function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$_(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$_(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
38898
+ var collapseSecondaryLanguages = function collapseSecondaryLanguages(columnConfig) {
38899
+ if (!('children' in columnConfig)) {
38900
+ return columnConfig;
38901
+ }
38902
+ return _objectSpread$_(_objectSpread$_({}, columnConfig), {}, {
38903
+ children: columnConfig.children.map(function (child, index) {
38904
+ return index === 0 ? child : _objectSpread$_(_objectSpread$_({}, child), {}, {
38905
+ columnGroupShow: 'open'
38906
+ });
38907
+ })
38908
+ });
38909
+ };
38898
38910
  var EnrichmentDetailInfo = function EnrichmentDetailInfo() {
38899
38911
  return /*#__PURE__*/jsx(EnrichmentTable, {
38900
38912
  type: "detailInfos",
@@ -38958,6 +38970,16 @@ var EnrichmentTable = observer(function (_ref) {
38958
38970
  var baseConfiguration = useMemo(function () {
38959
38971
  return getConfig((selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds) || ['DE'], t);
38960
38972
  }, [selectedPackage, i18n.language]);
38973
+
38974
+ // German leads because it is the only language of a text property that stays visible while its column group is collapsed
38975
+ var propertyLanguages = useMemo(function () {
38976
+ var _selectedPackage$isoL;
38977
+ var languages = selectedPackage !== null && selectedPackage !== void 0 && (_selectedPackage$isoL = selectedPackage.isoLanguageIds) !== null && _selectedPackage$isoL !== void 0 && _selectedPackage$isoL.length ? selectedPackage.isoLanguageIds : ['DE'];
38978
+ var leading = languages.includes('DE') ? 'DE' : languages[0];
38979
+ return [leading].concat(_toConsumableArray(languages.filter(function (language) {
38980
+ return language !== leading;
38981
+ })));
38982
+ }, [selectedPackage]);
38961
38983
  var _useState = useState([]),
38962
38984
  _useState2 = _slicedToArray(_useState, 2),
38963
38985
  shownProps = _useState2[0],
@@ -39189,6 +39211,7 @@ var EnrichmentTable = observer(function (_ref) {
39189
39211
  var lang = i18n.language.toUpperCase();
39190
39212
  var propType = (_propertyMeta$key = propertyMeta[key]) === null || _propertyMeta$key === void 0 ? void 0 : _propertyMeta$key.type;
39191
39213
  var description = (_propertyMeta$key2 = propertyMeta[key]) === null || _propertyMeta$key2 === void 0 ? void 0 : _propertyMeta$key2.description;
39214
+ var codexKey = (_propertyMeta$key3 = propertyMeta[key]) === null || _propertyMeta$key3 === void 0 ? void 0 : _propertyMeta$key3.codexKey;
39192
39215
  var headerLabel = description ? "".concat(description, " (").concat(key, ")") : key;
39193
39216
  var columnConfig = propType === 'boolean' ? {
39194
39217
  headerName: headerLabel,
@@ -39219,45 +39242,50 @@ var EnrichmentTable = observer(function (_ref) {
39219
39242
  expandedEditorProps: {}
39220
39243
  },
39221
39244
  additionalFields: ['origProp.' + key + '.' + lang, 'prop.' + key + '.' + lang]
39222
- } : createTranslatedColumnConfig('translatedProp.' + key, headerLabel, [lang], false, 'withPlaceholder', {
39245
+ } : collapseSecondaryLanguages(createTranslatedColumnConfig('translatedProp.' + key, headerLabel, propertyLanguages, false, 'withPlaceholder', {
39223
39246
  placeHolderField: 'origProp.' + key,
39224
39247
  combinedField: 'prop.' + key
39225
- }, ['origProp.' + key, 'prop.' + key], !viewOnly);
39226
- return _objectSpread$_(_objectSpread$_({}, columnConfig), {}, {
39227
- headerComponentParams: {
39228
- additionalElement: /*#__PURE__*/jsxs(Space$1, {
39229
- children: [((_propertyMeta$key3 = propertyMeta[key]) === null || _propertyMeta$key3 === void 0 ? void 0 : _propertyMeta$key3.codexKey) && /*#__PURE__*/jsx(InformationButton, {
39230
- codex: propertyMeta[key].codexKey
39231
- }), !viewOnly && /*#__PURE__*/jsx(Popconfirm$1, {
39232
- rootClassName: "ag-custom-component-popup",
39233
- title: t('backoffice.idmEnricher.enrichment.label.removePropertyConfirmTitle', {
39234
- defaultValue: 'Remove property?'
39235
- }),
39236
- description: t('backoffice.idmEnricher.enrichment.label.removePropertyConfirmDescription', {
39237
- defaultValue: 'This deletes the value for every entity in this table, not just this column.'
39238
- }),
39239
- onConfirm: function onConfirm(e) {
39240
- e === null || e === void 0 || e.stopPropagation();
39241
- removeProperty(key);
39242
- },
39243
- onCancel: function onCancel(e) {
39244
- return e === null || e === void 0 ? void 0 : e.stopPropagation();
39245
- },
39246
- okText: t('backoffice.common.button.delete', {
39247
- defaultValue: 'Delete'
39248
- }),
39249
- cancelText: t('backoffice.common.button.cancel'),
39250
- children: /*#__PURE__*/jsx(Button$1, {
39251
- icon: /*#__PURE__*/jsx(DeleteOutlined$1, {}),
39252
- type: "text",
39253
- size: "small",
39254
- onClick: function onClick(e) {
39255
- e.stopPropagation();
39256
- }
39257
- })
39258
- })]
39259
- })
39260
- }
39248
+ }, ['origProp.' + key, 'prop.' + key], !viewOnly));
39249
+ var headerParams = {
39250
+ additionalElement: /*#__PURE__*/jsxs(Space$1, {
39251
+ children: [codexKey && /*#__PURE__*/jsx(InformationButton, {
39252
+ codex: codexKey
39253
+ }), !viewOnly && /*#__PURE__*/jsx(Popconfirm$1, {
39254
+ rootClassName: "ag-custom-component-popup",
39255
+ title: t('backoffice.idmEnricher.enrichment.label.removePropertyConfirmTitle', {
39256
+ defaultValue: 'Remove property?'
39257
+ }),
39258
+ description: t('backoffice.idmEnricher.enrichment.label.removePropertyConfirmDescription', {
39259
+ defaultValue: 'This deletes the value for every entity in this table, not just this column.'
39260
+ }),
39261
+ onConfirm: function onConfirm(e) {
39262
+ e === null || e === void 0 || e.stopPropagation();
39263
+ removeProperty(key);
39264
+ },
39265
+ onCancel: function onCancel(e) {
39266
+ return e === null || e === void 0 ? void 0 : e.stopPropagation();
39267
+ },
39268
+ okText: t('backoffice.common.button.delete', {
39269
+ defaultValue: 'Delete'
39270
+ }),
39271
+ cancelText: t('backoffice.common.button.cancel'),
39272
+ children: /*#__PURE__*/jsx(Button$1, {
39273
+ icon: /*#__PURE__*/jsx(DeleteOutlined$1, {}),
39274
+ type: "text",
39275
+ size: "small",
39276
+ onClick: function onClick(e) {
39277
+ e.stopPropagation();
39278
+ }
39279
+ })
39280
+ })]
39281
+ })
39282
+ };
39283
+
39284
+ // a text property with more than one language is a column group, whose buttons belong on the group header
39285
+ return 'children' in columnConfig ? _objectSpread$_(_objectSpread$_({}, columnConfig), {}, {
39286
+ headerGroupComponentParams: headerParams
39287
+ }) : _objectSpread$_(_objectSpread$_({}, columnConfig), {}, {
39288
+ headerComponentParams: headerParams
39261
39289
  });
39262
39290
  })), _toConsumableArray(viewOnly ? [] : [{
39263
39291
  headerName: 'backoffice.idmEnricher.enrichment.label.addProperty',
@@ -39306,7 +39334,7 @@ var EnrichmentTable = observer(function (_ref) {
39306
39334
  cellDataType: 'objectId'
39307
39335
  }])
39308
39336
  };
39309
- }, [apiInterface, baseConfiguration.colDef, viewOnly, type, shownProps, propertyMeta, addProperty, removeProperty, apiConfig.enricherService, i18n.language]);
39337
+ }, [apiInterface, baseConfiguration.colDef, viewOnly, type, shownProps, propertyMeta, propertyLanguages, addProperty, removeProperty, apiConfig.enricherService, i18n.language]);
39310
39338
  return /*#__PURE__*/jsxs(Fragment, {
39311
39339
  children: [/*#__PURE__*/jsx(Descriptions$1, {
39312
39340
  title: /*#__PURE__*/jsxs("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMEnricherEditor/hooks/useModule.tsx"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;;;;;;;;;;;;;EAyLhD"}
1
+ {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMEnricherEditor/hooks/useModule.tsx"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;;;;;;;;;;;;;EAuLhD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TableEnrichment/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AA+BjF,QAAA,MAAM,oBAAoB,yBAEzB,CAAC;AACF,QAAA,MAAM,iBAAiB,yBAEtB,CAAC;AAEF,QAAA,MAAM,cAAc,yBAEnB,CAAC;AAEF,QAAA,MAAM,gBAAgB,yBAErB,CAAC;AAEF,QAAA,MAAM,eAAe,yBAEpB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TableEnrichment/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAwDjF,QAAA,MAAM,oBAAoB,yBAEzB,CAAC;AACF,QAAA,MAAM,iBAAiB,yBAEtB,CAAC;AAEF,QAAA,MAAM,cAAc,yBAEnB,CAAC;AAEF,QAAA,MAAM,gBAAgB,yBAErB,CAAC;AAEF,QAAA,MAAM,eAAe,yBAEpB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "26.10.0-beta.35",
3
+ "version": "26.10.0-beta.36",
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": "6.1.0",
17
17
  "@babel/runtime": "7.24.7",
18
- "@crystaldesign/content-box": "26.10.0-beta.35",
19
- "@crystaldesign/content-item": "26.10.0-beta.35",
20
- "@crystaldesign/diva-core": "26.10.0-beta.35",
21
- "@crystaldesign/diva-utils": "26.10.0-beta.35",
22
- "@crystaldesign/media-upload": "26.10.0-beta.35",
23
- "@crystaldesign/rtf-editor": "26.10.0-beta.35",
24
- "@crystaldesign/spreadsheet": "26.10.0-beta.35",
18
+ "@crystaldesign/content-box": "26.10.0-beta.36",
19
+ "@crystaldesign/content-item": "26.10.0-beta.36",
20
+ "@crystaldesign/diva-core": "26.10.0-beta.36",
21
+ "@crystaldesign/diva-utils": "26.10.0-beta.36",
22
+ "@crystaldesign/media-upload": "26.10.0-beta.36",
23
+ "@crystaldesign/rtf-editor": "26.10.0-beta.36",
24
+ "@crystaldesign/spreadsheet": "26.10.0-beta.36",
25
25
  "@dnd-kit/core": "^6.1.0",
26
26
  "@dnd-kit/sortable": "^8.0.0",
27
27
  "@dnd-kit/utilities": "^3.2.2",
@@ -56,5 +56,5 @@
56
56
  },
57
57
  "module": "build/esm/index.js",
58
58
  "types": "./build/types/backoffice/src/index.d.ts",
59
- "gitHead": "f87ac8af2628fe4f8a1d219998001978e31afa4c"
59
+ "gitHead": "fd3c69a78e082391315ac8d05403f41139189f0f"
60
60
  }