@crystaldesign/diva-backoffice 25.14.0-beta.2 → 25.14.0-beta.21

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 (42) hide show
  1. package/build/esm/index.js +686 -164
  2. package/build/types/backoffice/src/Configuration.d.ts +4 -2
  3. package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
  4. package/build/types/backoffice/src/layout/Content/index.d.ts.map +1 -1
  5. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts.map +1 -1
  6. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts +1 -0
  7. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts.map +1 -1
  8. package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
  9. package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts +3 -1
  10. package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts.map +1 -1
  11. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionCombinations/index.d.ts.map +1 -1
  12. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionGroupOptions.d.ts.map +1 -1
  13. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts.map +1 -1
  14. package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/CollectionMembers.d.ts.map +1 -1
  15. package/build/types/backoffice/src/ui/IDMEnricherEditor/hooks/useEnricherContext.d.ts.map +1 -1
  16. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
  17. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableProperties/index.d.ts.map +1 -1
  18. package/build/types/backoffice/src/ui/IDMEnricherEditor/types.d.ts +1 -0
  19. package/build/types/backoffice/src/ui/IDMEnricherEditor/types.d.ts.map +1 -1
  20. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts +5 -0
  21. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts.map +1 -0
  22. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts +9 -0
  23. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts.map +1 -0
  24. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts +5 -0
  25. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts.map +1 -0
  26. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts +5 -0
  27. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts.map +1 -0
  28. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts +6 -0
  29. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts.map +1 -0
  30. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts +5 -0
  31. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts.map +1 -0
  32. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts +9 -0
  33. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts.map +1 -0
  34. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts +5 -0
  35. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts.map +1 -0
  36. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts +5 -0
  37. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts.map +1 -0
  38. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts +6 -0
  39. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts.map +1 -0
  40. package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
  41. package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
  42. package/package.json +9 -9
@@ -3899,7 +3899,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
3899
3899
  rule: [{
3900
3900
  match: {
3901
3901
  sourceField: 'catalogItem',
3902
- value: undefined
3902
+ value: null
3903
3903
  }
3904
3904
  }],
3905
3905
  download: [{
@@ -9081,6 +9081,16 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9081
9081
  onSave: function onSave(data) {
9082
9082
  return data;
9083
9083
  }
9084
+ }, {
9085
+ name: ['settings', 'makeApiKey'],
9086
+ label: t('backoffice.form.organizationdetails.items.settings.makeApiKey'),
9087
+ permission: 'backoffice_admin_organizations',
9088
+ type: 'input'
9089
+ }, {
9090
+ name: ['settings', 'leadTableApiKey'],
9091
+ label: t('backoffice.form.organizationdetails.items.settings.leadTableApiKey'),
9092
+ permission: 'backoffice_admin_organizations',
9093
+ type: 'input'
9084
9094
  }, {
9085
9095
  type: 'subTitle',
9086
9096
  name: t('backoffice.form.organizationdetails.socialUrls'),
@@ -9215,14 +9225,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9215
9225
  label: t('backoffice.form.organizationdetails.items.settings.externalContactUrl'),
9216
9226
  tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
9217
9227
  type: 'input'
9218
- }, {
9219
- name: t('backoffice.subtitle.ai'),
9220
- type: 'subTitle',
9221
- orientation: 'left',
9222
- style: {
9223
- marginBottom: '40px'
9224
- },
9225
- permission: 'backoffice_admin_organizations'
9226
9228
  }, {
9227
9229
  name: ['settings', 'aiSettings', 'monthlyOrgRenderingLimit'],
9228
9230
  label: t('backoffice.form.organizationdetails.items.ai.monthlyOrgRenderingLimit'),
@@ -9230,7 +9232,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9230
9232
  permission: 'backoffice_admin_organizations',
9231
9233
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9232
9234
  hidden: function hidden(data) {
9233
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9235
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9234
9236
  },
9235
9237
  disabled: function disabled(data) {
9236
9238
  var _data$settings;
@@ -9296,7 +9298,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9296
9298
  permission: 'backoffice_admin_organizations',
9297
9299
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9298
9300
  hidden: function hidden(data) {
9299
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9301
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9300
9302
  },
9301
9303
  disabled: function disabled(data) {
9302
9304
  var _data$settings2;
@@ -9310,7 +9312,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9310
9312
  permission: 'backoffice_admin_organizations',
9311
9313
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9312
9314
  hidden: function hidden(data) {
9313
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9315
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9314
9316
  },
9315
9317
  disabled: function disabled(data) {
9316
9318
  var _data$settings3;
@@ -9324,7 +9326,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9324
9326
  permission: 'backoffice_admin_organizations',
9325
9327
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9326
9328
  hidden: function hidden(data) {
9327
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9329
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9328
9330
  },
9329
9331
  disabled: function disabled(data) {
9330
9332
  var _data$settings4;
@@ -9338,7 +9340,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9338
9340
  permission: 'backoffice_admin_organizations',
9339
9341
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9340
9342
  hidden: function hidden(data) {
9341
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9343
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9342
9344
  },
9343
9345
  disabled: function disabled(data) {
9344
9346
  var _data$settings5;
@@ -9352,7 +9354,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9352
9354
  permission: 'backoffice_admin_organizations',
9353
9355
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9354
9356
  hidden: function hidden(data) {
9355
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9357
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9356
9358
  },
9357
9359
  disabled: function disabled(data) {
9358
9360
  var _data$settings6;
@@ -9366,7 +9368,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9366
9368
  permission: 'backoffice_admin_organizations',
9367
9369
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9368
9370
  hidden: function hidden(data) {
9369
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9371
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9370
9372
  },
9371
9373
  helpText: 'anonymous enduser limit'
9372
9374
  }, {
@@ -9376,7 +9378,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9376
9378
  permission: 'backoffice_admin_organizations',
9377
9379
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9378
9380
  hidden: function hidden(data) {
9379
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9381
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9380
9382
  },
9381
9383
  helpText: 'logged in enduser limit'
9382
9384
  }, {
@@ -9386,7 +9388,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9386
9388
  permission: 'backoffice_admin_organizations',
9387
9389
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9388
9390
  hidden: function hidden(data) {
9389
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9391
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9390
9392
  }
9391
9393
  }, {
9392
9394
  name: ['settings', 'aiSettings', 'noLimit'],
@@ -9396,7 +9398,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9396
9398
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9397
9399
  defaultValue: false,
9398
9400
  hidden: function hidden(data) {
9399
- return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9401
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9400
9402
  }
9401
9403
  },
9402
9404
  // Theme Configuration
@@ -13414,6 +13416,14 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
13414
13416
  create: '${adminService}/cache/invalidate'
13415
13417
  }
13416
13418
  },
13419
+ ButtonAiServiceCache: {
13420
+ type: 'CustomButton',
13421
+ text: t('backoffice.ButtonAnalyticsServiceCache'),
13422
+ resetAfterTime: 3,
13423
+ apiInterface: {
13424
+ create: '${aiService}/cache/invalidate'
13425
+ }
13426
+ },
13417
13427
  ButtonAnalyticsServiceCache: {
13418
13428
  type: 'CustomButton',
13419
13429
  text: t('backoffice.ButtonAnalyticsServiceCache'),
@@ -13526,6 +13536,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
13526
13536
  isTitle: true,
13527
13537
  text: 'Admin Service'
13528
13538
  },
13539
+ LabelAiService: {
13540
+ type: 'CustomText',
13541
+ isTitle: true,
13542
+ text: 'Ai Service'
13543
+ },
13529
13544
  LabelAnalyticsService: {
13530
13545
  type: 'CustomText',
13531
13546
  isTitle: true,
@@ -14054,6 +14069,15 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
14054
14069
  id: 'ButtonAdminServiceCache',
14055
14070
  type: 'CustomButton'
14056
14071
  }]
14072
+ }, {
14073
+ type: 'SideBySide',
14074
+ items: [{
14075
+ id: 'LabelAiService',
14076
+ type: 'CustomText'
14077
+ }, {
14078
+ id: 'ButtonAiServiceCache',
14079
+ type: 'CustomButton'
14080
+ }]
14057
14081
  }, {
14058
14082
  type: 'SideBySide',
14059
14083
  items: [{
@@ -14172,6 +14196,12 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
14172
14196
  IDMFeaturesEditor: {
14173
14197
  type: 'IDMFeaturesEditor'
14174
14198
  },
14199
+ IDMOrganizationFeaturesEditor: {
14200
+ type: 'IDMOrganizationFeaturesEditor'
14201
+ },
14202
+ IDMOrganizationOptionsEditor: {
14203
+ type: 'IDMOrganizationOptionsEditor'
14204
+ },
14175
14205
  MediaTable: {
14176
14206
  type: 'MediaTable'
14177
14207
  }
@@ -15312,6 +15342,20 @@ var menu = [{
15312
15342
  permission: 'idm_global_features',
15313
15343
  icon: 'HistoryOutlined',
15314
15344
  haSubRoutes: false
15345
+ }, {
15346
+ id: 'IDMOrganizationFeaturesEditor',
15347
+ path: 'organizationfeatures',
15348
+ label: 'backoffice.menu.items.label.IDMOrganizationFeatures',
15349
+ permission: 'idm_catalogs',
15350
+ icon: 'HistoryOutlined',
15351
+ haSubRoutes: false
15352
+ }, {
15353
+ id: 'IDMOrganizationOptionsEditor',
15354
+ path: 'organizationoptions',
15355
+ label: 'backoffice.menu.items.label.IDMOrganizationOptions',
15356
+ permission: 'idm_catalogs',
15357
+ icon: 'HistoryOutlined',
15358
+ haSubRoutes: false
15315
15359
  }, {
15316
15360
  id: 'IDMCatalogEditor',
15317
15361
  path: 'catalogs',
@@ -18498,6 +18542,19 @@ function useSelectSimpleData (_ref) {
18498
18542
  });
18499
18543
  return selected.value;
18500
18544
  }, [selected]);
18545
+
18546
+ //initialize the selected value if it is not set yet and handle race condition between value and options
18547
+ useEffect(function () {
18548
+ if (value && options && selected == undefined) {
18549
+ var sel = findByValue(value, options, selectMapping);
18550
+ if (sel) {
18551
+ var selectedValues = Array.isArray(sel) ? sel.map(function (item) {
18552
+ return item.value;
18553
+ }) : sel.value;
18554
+ onSelectionChanged(selectedValues, sel);
18555
+ }
18556
+ }
18557
+ }, [value, options]);
18501
18558
  var setLoadedOptions = function setLoadedOptions(options) {
18502
18559
  var _options$;
18503
18560
  setOptions(options);
@@ -27366,16 +27423,27 @@ var TableWrapper = function TableWrapper(_ref) {
27366
27423
  return sel == dt._id;
27367
27424
  });
27368
27425
  });
27369
- if (!data || data.length == 0) {
27426
+ // Ensure each data row exposes catalogItem for rule evaluation
27427
+ if (data && data.length > 0) {
27428
+ data = data.map(function (dt) {
27429
+ var _ref2, _dt$catalogItem;
27430
+ return _objectSpread$G(_objectSpread$G({}, dt), {}, {
27431
+ catalogItem: (_ref2 = (_dt$catalogItem = dt.catalogItem) !== null && _dt$catalogItem !== void 0 ? _dt$catalogItem : state.catalogItem) !== null && _ref2 !== void 0 ? _ref2 : null
27432
+ });
27433
+ });
27434
+ } else {
27435
+ var _state$catalogItem;
27436
+ // Normalize empty selection
27370
27437
  data = [{
27371
- catalogItem: state.catalogItem
27438
+ catalogItem: (_state$catalogItem = state.catalogItem) !== null && _state$catalogItem !== void 0 ? _state$catalogItem : null
27372
27439
  }];
27373
27440
  }
27374
- return !aplyRules({
27441
+ var ruleResult = aplyRules({
27375
27442
  data: data,
27376
27443
  rootStore: root,
27377
27444
  rules: action.rule
27378
27445
  });
27446
+ return !ruleResult.applied;
27379
27447
  }
27380
27448
  function checkPermission(permission) {
27381
27449
  if (!permission) return true;
@@ -27423,17 +27491,17 @@ var TableWrapper = function TableWrapper(_ref) {
27423
27491
  icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
27424
27492
  size: "middle",
27425
27493
  onClick: function onClick() {
27426
- var _state$catalogItem, _state$catalogItem2, _state$catalogItem3;
27494
+ var _state$catalogItem2, _state$catalogItem3, _state$catalogItem4;
27427
27495
  var selectedData = state.data.filter(function (dt) {
27428
27496
  return state.selected.includes(dt._id);
27429
27497
  });
27430
27498
  root.downloadStore.openDownload({
27431
27499
  data: selectedData.length ? selectedData : state.mappingData,
27432
27500
  action: action,
27433
- catalogCodex: (_state$catalogItem = state.catalogItem) === null || _state$catalogItem === void 0 ? void 0 : _state$catalogItem.codex,
27434
- dealerId: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.dealerId,
27501
+ catalogCodex: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.codex,
27502
+ dealerId: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.dealerId,
27435
27503
  currentUrl: state.currentFetchUrl,
27436
- sessionGuid: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.sessionGuid
27504
+ sessionGuid: (_state$catalogItem4 = state.catalogItem) === null || _state$catalogItem4 === void 0 ? void 0 : _state$catalogItem4.sessionGuid
27437
27505
  });
27438
27506
  },
27439
27507
  children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : t('backoffice.basetable.download')
@@ -27619,17 +27687,17 @@ var TableWrapper = function TableWrapper(_ref) {
27619
27687
  });
27620
27688
  };
27621
27689
  var BaseTable = observer(TableWrapper);
27622
- function DeleteButton(_ref2) {
27623
- var _ref2$selected = _ref2.selected,
27624
- selected = _ref2$selected === void 0 ? [] : _ref2$selected,
27625
- total = _ref2.total,
27626
- _ref2$min = _ref2.min,
27627
- min = _ref2$min === void 0 ? 0 : _ref2$min,
27628
- deleting = _ref2.deleting,
27629
- onDelete = _ref2.onDelete,
27630
- disabled = _ref2.disabled,
27631
- label = _ref2.label,
27632
- labelDialog = _ref2.labelDialog;
27690
+ function DeleteButton(_ref3) {
27691
+ var _ref3$selected = _ref3.selected,
27692
+ selected = _ref3$selected === void 0 ? [] : _ref3$selected,
27693
+ total = _ref3.total,
27694
+ _ref3$min = _ref3.min,
27695
+ min = _ref3$min === void 0 ? 0 : _ref3$min,
27696
+ deleting = _ref3.deleting,
27697
+ onDelete = _ref3.onDelete,
27698
+ disabled = _ref3.disabled,
27699
+ label = _ref3.label,
27700
+ labelDialog = _ref3.labelDialog;
27633
27701
  var _useTranslation2 = useTranslation(),
27634
27702
  t = _useTranslation2.t;
27635
27703
  var hasSelected = (selected === null || selected === void 0 ? void 0 : selected.length) > 0;
@@ -27657,16 +27725,16 @@ function DeleteButton(_ref2) {
27657
27725
  })
27658
27726
  });
27659
27727
  }
27660
- function CopyButton(_ref3) {
27728
+ function CopyButton(_ref4) {
27661
27729
  var _state$configuration$24;
27662
- var state = _ref3.state;
27730
+ var state = _ref4.state;
27663
27731
  var root = useStore();
27664
27732
  new _default$d({
27665
27733
  apiInterface: state.configuration.apiInterface,
27666
27734
  type: 'Table'
27667
27735
  }, root);
27668
27736
  var onCopy = /*#__PURE__*/function () {
27669
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
27737
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
27670
27738
  var _state$configuration$21;
27671
27739
  var copyAction, _iterator3, _step3, selectedRow;
27672
27740
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -27703,11 +27771,11 @@ function CopyButton(_ref3) {
27703
27771
  }, _callee);
27704
27772
  }));
27705
27773
  return function onCopy() {
27706
- return _ref4.apply(this, arguments);
27774
+ return _ref5.apply(this, arguments);
27707
27775
  };
27708
27776
  }();
27709
27777
  var onCopyAction = /*#__PURE__*/function () {
27710
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
27778
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
27711
27779
  var _state$configuration$22, _state$configuration$23;
27712
27780
  var copyAction, id, data;
27713
27781
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -27768,7 +27836,7 @@ function CopyButton(_ref3) {
27768
27836
  }, _callee3);
27769
27837
  }));
27770
27838
  return function onCopyAction() {
27771
- return _ref5.apply(this, arguments);
27839
+ return _ref6.apply(this, arguments);
27772
27840
  };
27773
27841
  }();
27774
27842
  var _useTranslation3 = useTranslation(),
@@ -27780,11 +27848,11 @@ function CopyButton(_ref3) {
27780
27848
  children: t('backoffice.basetable.copy')
27781
27849
  });
27782
27850
  }
27783
- function BulkAction(_ref6) {
27851
+ function BulkAction(_ref7) {
27784
27852
  var _state$selected3;
27785
- var action = _ref6.action,
27786
- state = _ref6.state,
27787
- progressBar = _ref6.progressBar;
27853
+ var action = _ref7.action,
27854
+ state = _ref7.state,
27855
+ progressBar = _ref7.progressBar;
27788
27856
  var root = useStore();
27789
27857
  var _useTranslation4 = useTranslation(),
27790
27858
  t = _useTranslation4.t;
@@ -27869,7 +27937,7 @@ function BulkAction(_ref6) {
27869
27937
  return true;
27870
27938
  };
27871
27939
  var callback = /*#__PURE__*/function () {
27872
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(updatedData) {
27940
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(updatedData) {
27873
27941
  var _action$callback;
27874
27942
  var apiInterface, data, i, dataEntry;
27875
27943
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
@@ -27963,7 +28031,7 @@ function BulkAction(_ref6) {
27963
28031
  }, _callee4, null, [[2, 37]]);
27964
28032
  }));
27965
28033
  return function callback(_x2) {
27966
- return _ref7.apply(this, arguments);
28034
+ return _ref8.apply(this, arguments);
27967
28035
  };
27968
28036
  }();
27969
28037
  return /*#__PURE__*/jsx(Popover, {
@@ -27993,8 +28061,8 @@ function BulkAction(_ref6) {
27993
28061
  }, 'edit')
27994
28062
  });
27995
28063
  }
27996
- function SelectionText(_ref8) {
27997
- var selected = _ref8.selected;
28064
+ function SelectionText(_ref9) {
28065
+ var selected = _ref9.selected;
27998
28066
  var _useTranslation5 = useTranslation(),
27999
28067
  t = _useTranslation5.t;
28000
28068
  if (!(selected !== null && selected !== void 0 && selected.length)) {
@@ -32257,7 +32325,8 @@ var useEnricherContext = function useEnricherContext() {
32257
32325
  selectedPackage: {
32258
32326
  _id: urlPackageId || '',
32259
32327
  name: '',
32260
- isApi: false
32328
+ isApi: false,
32329
+ onlyPlaceholder: true
32261
32330
  },
32262
32331
  enricherService: root.configurationStore.apiConfig.enricherService,
32263
32332
  organizationId: root.dataStore.organizationId || '',
@@ -32299,7 +32368,8 @@ var useEnricherContext = function useEnricherContext() {
32299
32368
  _id: pkg,
32300
32369
  name: '',
32301
32370
  isoLanguageIds: [],
32302
- isApi: false
32371
+ isApi: false,
32372
+ onlyPlaceholder: true
32303
32373
  };
32304
32374
  } else {
32305
32375
  newPackage = pkg;
@@ -32342,7 +32412,8 @@ var useEnricherContext = function useEnricherContext() {
32342
32412
  _id: urlPackageId,
32343
32413
  name: '',
32344
32414
  isoLanguageIds: [],
32345
- isApi: false
32415
+ isApi: false,
32416
+ onlyPlaceholder: true
32346
32417
  });
32347
32418
  }
32348
32419
  }, [urlPackageId, getContext().packageId, setSelectedPackage]);
@@ -32726,6 +32797,7 @@ var useTools = function useTools(_ref) {
32726
32797
  var catalogId = _ref.catalogId,
32727
32798
  packageId = _ref.packageId,
32728
32799
  isApi2 = _ref.isApi2,
32800
+ onlyPlaceholder = _ref.onlyPlaceholder,
32729
32801
  mainInformationWindowCodex = _ref.mainInformationWindowCodex,
32730
32802
  serie = _ref.serie,
32731
32803
  item = _ref.item,
@@ -32773,7 +32845,9 @@ var useTools = function useTools(_ref) {
32773
32845
  packageId: packageId,
32774
32846
  isIDMData: !isApi2 ? '1' : undefined
32775
32847
  }, parameters),
32776
- elementProps: catalogId ? _objectSpread$o({
32848
+ elementProps: onlyPlaceholder ? {
32849
+ onlyPlaceholder: true
32850
+ } : catalogId ? _objectSpread$o({
32777
32851
  // open configurator for idm catalog
32778
32852
  useIDMService: true,
32779
32853
  catalogId: catalogId,
@@ -32863,7 +32937,7 @@ var useTools = function useTools(_ref) {
32863
32937
  return tool.id;
32864
32938
  })) || []));
32865
32939
  };
32866
- }, [mainInformationWindowCodex, catalogId, packageId, conditionalTools]);
32940
+ }, [mainInformationWindowCodex, catalogId, packageId, conditionalTools, onlyPlaceholder]);
32867
32941
  return {
32868
32942
  updateConfigurator: updateConfigurator,
32869
32943
  updateInformationWindow: updateInformationWindow
@@ -32881,7 +32955,8 @@ var TableGroups = observer(function () {
32881
32955
  viewOnly = _useModule.viewOnly;
32882
32956
  useTools({
32883
32957
  packageId: packageId,
32884
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
32958
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
32959
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
32885
32960
  });
32886
32961
  var applicationData = useMemo(function () {
32887
32962
  return {
@@ -33546,7 +33621,8 @@ var TablePackages = observer(function () {
33546
33621
  setSelectedPackage = _useEnricherContext.setSelectedPackage,
33547
33622
  selectedPackage = _useEnricherContext.selectedPackage;
33548
33623
  useTools({
33549
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
33624
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
33625
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
33550
33626
  });
33551
33627
  var organizationId = root.dataStore.organizationId;
33552
33628
  var organizationDisplayText = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.displayName;
@@ -33803,6 +33879,9 @@ var TablePackages = observer(function () {
33803
33879
  apiInterface: {
33804
33880
  read: apiConfig.authService + "/organizations/".concat(organizationId, "/related")
33805
33881
  },
33882
+ filter: function filter(_, lookupData) {
33883
+ return lookupData._id !== organizationId;
33884
+ },
33806
33885
  lookupValue: 'displayName',
33807
33886
  lookupKey: '_id',
33808
33887
  serverType: 'nodejs',
@@ -33900,7 +33979,8 @@ var TableProperties = observer(function () {
33900
33979
  viewOnly = _useModule.viewOnly;
33901
33980
  useTools({
33902
33981
  packageId: packageId,
33903
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
33982
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
33983
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
33904
33984
  });
33905
33985
  var applicationData = useMemo(function () {
33906
33986
  return {
@@ -33947,18 +34027,26 @@ var TableProperties = observer(function () {
33947
34027
  additionalFields: ['featureNosDisplayTexts'],
33948
34028
  isDictionary: true
33949
34029
  }, {
33950
- field: 'optionKeys',
34030
+ field: 'optionIds',
33951
34031
  headerName: 'backoffice.idmEnricher.renaming.label.optionKeys',
33952
34032
  cellDataType: 'lookup',
33953
34033
  editable: !viewOnly,
33954
34034
  customParams: {
33955
34035
  nameField: 'optionKeysDisplayTexts',
33956
- displayLabelTemplate: '${name} (${value})',
34036
+ displayLabelTemplate: '${name} (${optionKeys}) in Features: ${optionFeatureNos}',
34037
+ lookupLabelTemplate: '${name} (${optionKey}) in Features: ${featureNos}',
33957
34038
  apiInterface: {
33958
34039
  read: apiConfig.enricherService + '/packages/${packageId}/lookup/options'
33959
34040
  },
33960
34041
  lookupValue: 'optionText',
33961
- lookupKey: 'optionKey',
34042
+ lookupKey: '_id',
34043
+ additionalMappings: [{
34044
+ lookupField: 'optionKey',
34045
+ targetField: 'optionKeys'
34046
+ }, {
34047
+ lookupField: 'featureNos',
34048
+ targetField: 'optionFeatureNos'
34049
+ }],
33962
34050
  multiple: true,
33963
34051
  translated: true,
33964
34052
  filter: {
@@ -33968,7 +34056,7 @@ var TableProperties = observer(function () {
33968
34056
  filter: '${featureNos}'
33969
34057
  }
33970
34058
  },
33971
- additionalFields: ['optionKeysDisplayTexts'],
34059
+ additionalFields: ['optionKeysDisplayTexts', 'optionKeys', 'optionFeatureNos'],
33972
34060
  isDictionary: true
33973
34061
  }, createTranslatedColumnConfig('name', 'backoffice.idmEnricher.properties.label.name', selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, true), createTranslatedColumnConfig('value', 'backoffice.idmEnricher.properties.label.value', selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, true), {
33974
34062
  field: 'serieNos',
@@ -34747,6 +34835,7 @@ var RenamingTable = observer(function (_ref) {
34747
34835
  var _useTools = useTools({
34748
34836
  packageId: packageId,
34749
34837
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
34838
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
34750
34839
  setArticle: setSelectedItem,
34751
34840
  setSerie: setSelectedSerie,
34752
34841
  serie: selectedSerie,
@@ -35348,6 +35437,7 @@ var ExclusivityTable = observer(function (_ref) {
35348
35437
  var _useTools = useTools({
35349
35438
  packageId: packageId,
35350
35439
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35440
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
35351
35441
  setArticle: setSelectedItem,
35352
35442
  setSerie: setSelectedSerie,
35353
35443
  serie: selectedSerie,
@@ -35482,7 +35572,8 @@ var TableTabGroups = observer(function () {
35482
35572
  viewOnly = _useModule.viewOnly;
35483
35573
  useTools({
35484
35574
  packageId: packageId,
35485
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
35575
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35576
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35486
35577
  });
35487
35578
  var applicationData = useMemo(function () {
35488
35579
  return {
@@ -35587,7 +35678,8 @@ var TablePartlistPos = observer(function () {
35587
35678
  viewOnly = _useModule.viewOnly;
35588
35679
  useTools({
35589
35680
  packageId: packageId,
35590
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
35681
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35682
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35591
35683
  });
35592
35684
  var posInvisibility = useMemo(function () {
35593
35685
  return [{
@@ -37058,7 +37150,8 @@ var TablePriceList = observer(function () {
37058
37150
  setSelectedNodeId = _React$useState4[1];
37059
37151
  useTools({
37060
37152
  packageId: packageId,
37061
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
37153
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
37154
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
37062
37155
  });
37063
37156
  var setNodeDataValue = useCallback(function (data) {
37064
37157
  spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
@@ -37347,10 +37440,10 @@ function IDMEnricherEditor (_ref) {
37347
37440
  display: 'flex',
37348
37441
  flexDirection: 'column'
37349
37442
  },
37350
- children: /*#__PURE__*/jsx(Content$5, {})
37443
+ children: /*#__PURE__*/jsx(Content$7, {})
37351
37444
  });
37352
37445
  }
37353
- function Content$5() {
37446
+ function Content$7() {
37354
37447
  return /*#__PURE__*/jsxs(Routes, {
37355
37448
  children: [/*#__PURE__*/jsx(Route, {
37356
37449
  index: true,
@@ -40376,7 +40469,7 @@ var TableSeries = observer(function () {
40376
40469
  });
40377
40470
  });
40378
40471
 
40379
- var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40472
+ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40380
40473
  var organizationId = _ref.organizationId,
40381
40474
  selectedCatalog = _ref.selectedCatalog,
40382
40475
  featureClassId = _ref.featureClassId,
@@ -40450,7 +40543,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40450
40543
  displayLabelTemplate: '${value}',
40451
40544
  lookupLabelTemplate: '${name} (${value})',
40452
40545
  apiInterface: {
40453
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
40546
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
40454
40547
  },
40455
40548
  lookupKey: 'featureNo',
40456
40549
  lookupValue: 'featureText',
@@ -40568,7 +40661,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40568
40661
  }, featureClassId ? featureClassId : 'features');
40569
40662
  });
40570
40663
 
40571
- function Features(_ref) {
40664
+ function Features$1(_ref) {
40572
40665
  var readOnly = _ref.readOnly;
40573
40666
  var _useTranslation = useTranslation();
40574
40667
  _useTranslation.t;
@@ -40594,7 +40687,7 @@ function Features(_ref) {
40594
40687
  headerName: 'backoffice.idmCatalog.features.label.featureNo',
40595
40688
  required: true,
40596
40689
  unique: true
40597
- }, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', ['DE', 'EN'], true), {
40690
+ }, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', ['DE', 'EN', 'FR', 'IT'], true), {
40598
40691
  field: 'sequenceNo',
40599
40692
  headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
40600
40693
  required: true,
@@ -40632,7 +40725,7 @@ function Features(_ref) {
40632
40725
  }, 'features');
40633
40726
  }
40634
40727
 
40635
- var TableFeatures$1 = observer(function () {
40728
+ var TableFeatures$2 = observer(function () {
40636
40729
  var _useDivaCore = useDivaCore(),
40637
40730
  jwt = _useDivaCore.state.jwt;
40638
40731
  var _useTranslation = useTranslation(),
@@ -40651,7 +40744,7 @@ var TableFeatures$1 = observer(function () {
40651
40744
  conditionalTools: [{
40652
40745
  id: 'globalfeatures',
40653
40746
  name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
40654
- elementComponent: Features,
40747
+ elementComponent: Features$1,
40655
40748
  elementProps: {
40656
40749
  readOnly: true
40657
40750
  },
@@ -40732,7 +40825,7 @@ var TableFeatures$1 = observer(function () {
40732
40825
  })]
40733
40826
  })]
40734
40827
  })
40735
- }), selectedCatalog && /*#__PURE__*/jsx(Features$1, {
40828
+ }), selectedCatalog && /*#__PURE__*/jsx(Features$2, {
40736
40829
  organizationId: organizationId,
40737
40830
  selectedCatalog: selectedCatalog,
40738
40831
  hooks: hooks,
@@ -40742,7 +40835,7 @@ var TableFeatures$1 = observer(function () {
40742
40835
  });
40743
40836
  });
40744
40837
 
40745
- var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40838
+ var Options$1 = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40746
40839
  var organizationId = _ref.organizationId,
40747
40840
  selectedCatalog = _ref.selectedCatalog,
40748
40841
  apiConfig = _ref.apiConfig,
@@ -40906,7 +40999,7 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40906
40999
  });
40907
41000
  });
40908
41001
 
40909
- var TableOptions = observer(function () {
41002
+ var TableOptions$1 = observer(function () {
40910
41003
  var _selectedCatalog$name;
40911
41004
  var _useTranslation = useTranslation(),
40912
41005
  t = _useTranslation.t;
@@ -40977,7 +41070,7 @@ var TableOptions = observer(function () {
40977
41070
  })]
40978
41071
  })]
40979
41072
  })
40980
- }), selectedCatalog && /*#__PURE__*/jsx(Options, {
41073
+ }), selectedCatalog && /*#__PURE__*/jsx(Options$1, {
40981
41074
  organizationId: organizationId,
40982
41075
  selectedCatalog: selectedCatalog,
40983
41076
  hooks: hooks,
@@ -41008,7 +41101,7 @@ var TableFeatureClasses = observer(function () {
41008
41101
  conditionalTools: [{
41009
41102
  id: 'features',
41010
41103
  name: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
41011
- elementComponent: Features$1,
41104
+ elementComponent: Features$2,
41012
41105
  elementProps: {
41013
41106
  organizationId: organizationId,
41014
41107
  selectedCatalog: selectedCatalog,
@@ -41694,7 +41787,7 @@ function OptionCombinations(_ref) {
41694
41787
  editorElementProps: {
41695
41788
  nameField: 'featureRefsDisplayTexts',
41696
41789
  apiInterface: {
41697
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
41790
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41698
41791
  },
41699
41792
  filter: function filter(_, lookupData) {
41700
41793
  var _decision$featureRefs8;
@@ -41719,10 +41812,31 @@ function OptionCombinations(_ref) {
41719
41812
  },
41720
41813
  defaultValue: []
41721
41814
  }] : decision.decisionType == 3 ? [{
41722
- headerName: 'backoffice.idmCatalog.optionCombinations.label.actions',
41815
+ headerName: 'backoffice.idmCatalog.optionCombinations.label.setPosCountValue',
41723
41816
  field: 'actions',
41724
- cellDataType: 'array',
41725
- defaultValue: []
41817
+ cellDataType: 'number',
41818
+ required: true,
41819
+ customParams: {
41820
+ useParser: true,
41821
+ useFormatter: true
41822
+ },
41823
+ valueFormatter: function valueFormatter(_ref2) {
41824
+ _ref2.data;
41825
+ var value = _ref2.value;
41826
+ if (Array.isArray(value)) {
41827
+ var action = value === null || value === void 0 ? void 0 : value.find(function (action) {
41828
+ return action.startsWith('SET_POS_COUNT_VALUE');
41829
+ });
41830
+ return action ? Number(action.split(':')[1]) : undefined;
41831
+ }
41832
+ return value;
41833
+ },
41834
+ valueParser: function valueParser(_ref3) {
41835
+ var newValue = _ref3.newValue;
41836
+ if (newValue == '') return undefined;
41837
+ return ["SET_POS_COUNT_VALUE:".concat(newValue)];
41838
+ },
41839
+ additionalFields: ['projectActions']
41726
41840
  }] : []), [{
41727
41841
  headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
41728
41842
  field: 'sequence',
@@ -41750,13 +41864,6 @@ function OptionCombinations(_ref) {
41750
41864
  field: '_id',
41751
41865
  editable: false,
41752
41866
  cellDataType: 'objectId'
41753
- }, {
41754
- field: 'organizationId',
41755
- editable: false,
41756
- hide: true,
41757
- lockVisible: true,
41758
- suppressColumnsToolPanel: true,
41759
- defaultValue: '${organizationId}'
41760
41867
  }, {
41761
41868
  field: 'catalogId',
41762
41869
  editable: false,
@@ -41913,7 +42020,7 @@ var TableDecisions = observer(function () {
41913
42020
  nameField: 'featureRefsDisplayTexts',
41914
42021
  displayLabelTemplate: '${name} (${value})',
41915
42022
  apiInterface: {
41916
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42023
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41917
42024
  },
41918
42025
  lookupValue: 'featureText',
41919
42026
  lookupKey: 'featureNo',
@@ -42665,7 +42772,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42665
42772
  editorElementProps: {
42666
42773
  nameField: 'featureNosDisplayTexts',
42667
42774
  apiInterface: {
42668
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42775
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42669
42776
  },
42670
42777
  filter: function filter(_, lookupData) {
42671
42778
  var _priceFeatureGroup$fe7;
@@ -42852,7 +42959,7 @@ function PriceFeatureGroupFinishes(_ref) {
42852
42959
  editorElementProps: {
42853
42960
  nameField: 'featureNosDisplayTexts',
42854
42961
  apiInterface: {
42855
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42962
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42856
42963
  },
42857
42964
  filter: function filter(_, lookupData) {
42858
42965
  var _priceFeatureGroup$fe7;
@@ -43206,6 +43313,7 @@ var TablePrices = observer(function () {
43206
43313
  cellDataType: 'lookup',
43207
43314
  customParams: {
43208
43315
  nameField: 'typeNo',
43316
+ filterCellType: 'objectId',
43209
43317
  displayLabelTemplate: '${name} (${value})',
43210
43318
  apiInterface: {
43211
43319
  read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/items'
@@ -43336,7 +43444,8 @@ function Items(_ref) {
43336
43444
  create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options',
43337
43445
  restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43338
43446
  "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43339
- update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}'
43447
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43448
+ bulk: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/bulk'
43340
43449
  },
43341
43450
  dateFormat: 'DD.MM.YYYY, HH:mm:ss',
43342
43451
  floatingFilter: true,
@@ -43494,10 +43603,10 @@ function IDMCatalogEditor (_ref) {
43494
43603
  display: 'flex',
43495
43604
  flexDirection: 'column'
43496
43605
  },
43497
- children: /*#__PURE__*/jsx(Content$4, {})
43606
+ children: /*#__PURE__*/jsx(Content$6, {})
43498
43607
  });
43499
43608
  }
43500
- function Content$4() {
43609
+ function Content$6() {
43501
43610
  return /*#__PURE__*/jsxs(Routes, {
43502
43611
  children: [/*#__PURE__*/jsx(Route, {
43503
43612
  index: true,
@@ -43510,10 +43619,10 @@ function Content$4() {
43510
43619
  element: /*#__PURE__*/jsx(TableItems, {})
43511
43620
  }), /*#__PURE__*/jsx(Route, {
43512
43621
  path: ":catalogId/features",
43513
- element: /*#__PURE__*/jsx(TableFeatures$1, {})
43622
+ element: /*#__PURE__*/jsx(TableFeatures$2, {})
43514
43623
  }), /*#__PURE__*/jsx(Route, {
43515
43624
  path: ":catalogId/options",
43516
- element: /*#__PURE__*/jsx(TableOptions, {})
43625
+ element: /*#__PURE__*/jsx(TableOptions$1, {})
43517
43626
  }), /*#__PURE__*/jsx(Route, {
43518
43627
  path: ":catalogId/optiongroups",
43519
43628
  element: /*#__PURE__*/jsx(TableOptionGroups, {})
@@ -43543,9 +43652,9 @@ function CollectionMembers(_ref) {
43543
43652
  var collection = _ref.collection,
43544
43653
  organizationId = _ref.organizationId,
43545
43654
  apiConfig = _ref.apiConfig;
43546
- var _useTranslation = useTranslation(),
43547
- t = _useTranslation.t,
43548
- i18n = _useTranslation.i18n;
43655
+ var _useTranslation = useTranslation();
43656
+ _useTranslation.t;
43657
+ var i18n = _useTranslation.i18n;
43549
43658
  var applicationData = useMemo(function () {
43550
43659
  return {
43551
43660
  organizationId: organizationId,
@@ -43586,36 +43695,33 @@ function CollectionMembers(_ref) {
43586
43695
  lookupKey: '_id',
43587
43696
  multiple: false,
43588
43697
  translated: false,
43589
- //add it to the row context, so it can be used in the validator but will not be saved to the server
43698
+ //add it to the row context, so it can be used for filtering but will not be saved to the server
43590
43699
  additionalMappings: [{
43591
43700
  lookupField: 'published',
43592
43701
  targetField: '__diva_context.additionalData.published'
43593
- }]
43702
+ }],
43703
+ filter: function filter(_, lookupData) {
43704
+ var _lookupData$published;
43705
+ return (_lookupData$published = lookupData.published) === null || _lookupData$published === void 0 ? void 0 : _lookupData$published[organizationId];
43706
+ }
43594
43707
  },
43595
43708
  additionalFields: ['enricherPackageName'],
43596
- isDictionary: false,
43597
- cellValueValidator: function cellValueValidator(_ref2) {
43598
- var _data$__diva_context;
43599
- var data = _ref2.data;
43600
- if (!((_data$__diva_context = data.__diva_context) !== null && _data$__diva_context !== void 0 && (_data$__diva_context = _data$__diva_context.additionalData) !== null && _data$__diva_context !== void 0 && (_data$__diva_context = _data$__diva_context.published) !== null && _data$__diva_context !== void 0 && _data$__diva_context[organizationId])) {
43601
- return t('backoffice.idmCatalogEditor.collection.enricherPackage.notPublishedError');
43602
- }
43603
- return undefined;
43604
- }
43709
+ isDictionary: false
43605
43710
  }, {
43606
43711
  field: 'serieNos',
43607
43712
  headerName: 'backoffice.idmCatalogEditor.collectionmembers.label.serieNos',
43608
43713
  cellDataType: 'lookup',
43609
- editable: function editable(_ref3) {
43610
- var data = _ref3.data;
43611
- return data.enricherPackageId;
43714
+ editable: function editable(_ref2) {
43715
+ var data = _ref2.data,
43716
+ context = _ref2.context;
43717
+ return (context === null || context === void 0 ? void 0 : context.isPasting) || !!data.enricherPackageId;
43612
43718
  },
43613
43719
  customParams: {
43614
43720
  nameField: 'serieNosDisplayTexts',
43615
43721
  filterCellType: 'number',
43616
43722
  displayLabelTemplate: '${name} (${value})',
43617
43723
  apiInterface: {
43618
- read: apiConfig.enricherService + '/packages/${enricherPackageId}/lookup/series'
43724
+ read: apiConfig.enricherService + '/live/v3.0/catalogs/${__diva_context.additionalData.published.' + organizationId + '.liveCatalogId}/series'
43619
43725
  },
43620
43726
  lookupValue: 'seriesName',
43621
43727
  lookupKey: 'serieNo',
@@ -43825,10 +43931,10 @@ function IDMCollectionEditor(_ref) {
43825
43931
  display: 'flex',
43826
43932
  flexDirection: 'column'
43827
43933
  },
43828
- children: /*#__PURE__*/jsx(Content$3, {})
43934
+ children: /*#__PURE__*/jsx(Content$5, {})
43829
43935
  });
43830
43936
  }
43831
- function Content$3() {
43937
+ function Content$5() {
43832
43938
  return /*#__PURE__*/jsx(Routes, {
43833
43939
  children: /*#__PURE__*/jsx(Route, {
43834
43940
  index: true,
@@ -43838,9 +43944,174 @@ function Content$3() {
43838
43944
  });
43839
43945
  }
43840
43946
 
43947
+ var TableFeatures$1 = observer(function () {
43948
+ var _useTranslation = useTranslation(),
43949
+ t = _useTranslation.t;
43950
+ return /*#__PURE__*/jsxs(Fragment, {
43951
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
43952
+ title: /*#__PURE__*/jsx("div", {
43953
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures')
43954
+ })
43955
+ }), /*#__PURE__*/jsx(Features$1, {})]
43956
+ });
43957
+ });
43958
+
43959
+ function IDMFeaturesEditor(_ref) {
43960
+ _objectDestructuringEmpty(_ref);
43961
+ return /*#__PURE__*/jsx("div", {
43962
+ style: {
43963
+ height: '85vh',
43964
+ display: 'flex',
43965
+ flexDirection: 'column'
43966
+ },
43967
+ children: /*#__PURE__*/jsx(Content$4, {})
43968
+ });
43969
+ }
43970
+ function Content$4() {
43971
+ return /*#__PURE__*/jsx(Routes, {
43972
+ children: /*#__PURE__*/jsx(Route, {
43973
+ index: true,
43974
+ path: "",
43975
+ element: /*#__PURE__*/jsx(TableFeatures$1, {})
43976
+ })
43977
+ });
43978
+ }
43979
+
43980
+ function Features(_ref) {
43981
+ var readOnly = _ref.readOnly;
43982
+ var root = useStore();
43983
+ var apiConfig = root.configurationStore.apiConfig;
43984
+ var organizationId = root.dataStore.organizationId;
43985
+ var applicationData = useMemo(function () {
43986
+ return {
43987
+ organizationId: organizationId
43988
+ };
43989
+ }, [organizationId]);
43990
+ var _useTranslation = useTranslation(),
43991
+ t = _useTranslation.t;
43992
+ var configuration = useMemo(function () {
43993
+ var _root$dataStore$curre;
43994
+ var headerPosVariationType = [{
43995
+ name: t('backoffice.idmCatalog.features.label.vt.I'),
43996
+ value: 'I'
43997
+ }, {
43998
+ name: t('backoffice.idmCatalog.features.label.vt.K'),
43999
+ value: 'K'
44000
+ }, {
44001
+ name: t('backoffice.idmCatalog.features.label.vt.P'),
44002
+ value: 'P'
44003
+ }];
44004
+ var featureT = [{
44005
+ name: t('backoffice.idmCatalog.features.label.featureTDic.M'),
44006
+ value: 'M'
44007
+ }, {
44008
+ name: t('backoffice.idmCatalog.features.label.featureTDic.C'),
44009
+ value: 'C'
44010
+ }, {
44011
+ name: t('backoffice.idmCatalog.features.label.featureTDic.O'),
44012
+ value: 'O'
44013
+ }];
44014
+ return {
44015
+ type: 'dotnetSSM',
44016
+ apiInterface: {
44017
+ read: apiConfig.idmService + '/v3.0/${organizationId}/features',
44018
+ create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features',
44019
+ restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}/restore',
44020
+ "delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
44021
+ update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
44022
+ bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/bulk'
44023
+ },
44024
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
44025
+ colDef: [{
44026
+ field: 'featureNo',
44027
+ headerName: 'backoffice.idmCatalog.features.label.featureNo',
44028
+ required: true,
44029
+ unique: true
44030
+ }, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.settings.languages, true), {
44031
+ field: 'sequenceNo',
44032
+ headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
44033
+ required: true,
44034
+ cellDataType: 'number'
44035
+ }, {
44036
+ field: 'headerPosVariationType',
44037
+ headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
44038
+ required: true,
44039
+ cellDataType: 'enum',
44040
+ customParams: {
44041
+ enumData: headerPosVariationType,
44042
+ displayLabelTemplate: '${name} (${value})'
44043
+ }
44044
+ }, {
44045
+ field: 'featureT',
44046
+ headerName: 'backoffice.idmCatalog.features.label.featureT',
44047
+ cellDataType: 'enum',
44048
+ customParams: {
44049
+ enumData: featureT,
44050
+ displayLabelTemplate: '${name} (${value})'
44051
+ }
44052
+ }, {
44053
+ field: 'measureUnit',
44054
+ headerName: 'backoffice.idmCatalog.features.label.measureUnit'
44055
+ }, {
44056
+ field: 'measureParameter',
44057
+ headerName: 'backoffice.idmCatalog.features.label.measureParameter'
44058
+ }, {
44059
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
44060
+ field: 'lastUpdatedDate',
44061
+ cellDataType: 'dateString',
44062
+ editable: false
44063
+ }, {
44064
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
44065
+ field: 'createdDate',
44066
+ cellDataType: 'dateString',
44067
+ editable: false
44068
+ }, {
44069
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
44070
+ field: 'createdByDisplayText',
44071
+ editable: false
44072
+ }, {
44073
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
44074
+ field: 'lastUpdatedByDisplayText',
44075
+ editable: false
44076
+ }, {
44077
+ headerName: 'backoffice.idmCatalog.general.label._id',
44078
+ field: '_id',
44079
+ editable: false,
44080
+ cellDataType: 'objectId'
44081
+ }, {
44082
+ field: 'organizationId',
44083
+ editable: false,
44084
+ hide: true,
44085
+ lockVisible: true,
44086
+ suppressColumnsToolPanel: true,
44087
+ defaultValue: '${organizationId}'
44088
+ }]
44089
+ };
44090
+ }, []);
44091
+ return /*#__PURE__*/jsx(Spreadsheet, {
44092
+ gridId: 'crud-grid_global_features',
44093
+ applicationData: applicationData,
44094
+ configuration: configuration
44095
+ }, 'features');
44096
+ }
44097
+
43841
44098
  var TableFeatures = observer(function () {
43842
44099
  var _useTranslation = useTranslation(),
43843
44100
  t = _useTranslation.t;
44101
+ useTools({
44102
+ conditionalTools: [{
44103
+ id: 'globalfeatures',
44104
+ name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
44105
+ elementComponent: Features$1,
44106
+ elementProps: {
44107
+ readOnly: true
44108
+ },
44109
+ where: 'right',
44110
+ condition: function condition() {
44111
+ return true;
44112
+ }
44113
+ }]
44114
+ });
43844
44115
  return /*#__PURE__*/jsxs(Fragment, {
43845
44116
  children: [/*#__PURE__*/jsx(Descriptions$1, {
43846
44117
  title: /*#__PURE__*/jsx("div", {
@@ -43850,7 +44121,196 @@ var TableFeatures = observer(function () {
43850
44121
  });
43851
44122
  });
43852
44123
 
43853
- function IDMFeaturesEditor(_ref) {
44124
+ function IDMOrganizationFeaturesEditor(_ref) {
44125
+ _objectDestructuringEmpty(_ref);
44126
+ return /*#__PURE__*/jsx("div", {
44127
+ style: {
44128
+ height: '85vh',
44129
+ display: 'flex',
44130
+ flexDirection: 'column'
44131
+ },
44132
+ children: /*#__PURE__*/jsx(Content$3, {})
44133
+ });
44134
+ }
44135
+ function Content$3() {
44136
+ return /*#__PURE__*/jsx(Routes, {
44137
+ children: /*#__PURE__*/jsx(Route, {
44138
+ index: true,
44139
+ path: "",
44140
+ element: /*#__PURE__*/jsx(TableFeatures, {})
44141
+ })
44142
+ });
44143
+ }
44144
+
44145
+ function Options(_ref) {
44146
+ var _root$dataStore$curre;
44147
+ var readOnly = _ref.readOnly;
44148
+ var root = useStore();
44149
+ var apiConfig = root.configurationStore.apiConfig;
44150
+ var organizationId = root.dataStore.organizationId;
44151
+ var languages = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.settings.languages;
44152
+ var applicationData = useMemo(function () {
44153
+ return {
44154
+ organizationId: organizationId
44155
+ };
44156
+ }, [organizationId]);
44157
+ var _useTranslation = useTranslation();
44158
+ _useTranslation.t;
44159
+ var configuration = useMemo(function () {
44160
+ return {
44161
+ type: 'dotnetSSM',
44162
+ apiInterface: {
44163
+ read: apiConfig.idmService + '/v3.0/${organizationId}/options',
44164
+ create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options',
44165
+ restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}/restore',
44166
+ "delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
44167
+ update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
44168
+ bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/bulk'
44169
+ },
44170
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
44171
+ colDef: [{
44172
+ field: 'optionKey',
44173
+ required: true
44174
+ }, {
44175
+ headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
44176
+ field: 'sequenceNo',
44177
+ cellDataType: 'number'
44178
+ }, createTranslatedColumnConfig('optionText', 'backoffice.idmCatalog.options.label.optionText', languages, true), createTranslatedColumnConfig('optionCommentText', 'backoffice.idmCatalog.options.label.optionCommentText', languages), {
44179
+ headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
44180
+ field: 'optionFreeText',
44181
+ cellDataType: 'boolean'
44182
+ }, {
44183
+ field: 'featureNos',
44184
+ headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
44185
+ cellDataType: 'lookup',
44186
+ editable: true,
44187
+ required: false,
44188
+ customParams: {
44189
+ nameField: 'featureIdsDisplayTexts',
44190
+ filterCellType: 'number',
44191
+ displayLabelTemplate: '${name} (${value})',
44192
+ apiInterface: {
44193
+ read: apiConfig.idmService + '/v3.0/${organizationId}/features'
44194
+ },
44195
+ lookupValue: 'featureText',
44196
+ lookupKey: 'featureNo',
44197
+ lookupKeyFilterType: {
44198
+ type: 'equals',
44199
+ filterType: 'number'
44200
+ },
44201
+ additionalMappings: [{
44202
+ lookupField: '_id',
44203
+ targetField: 'featureIds'
44204
+ }],
44205
+ multiple: true,
44206
+ translated: true
44207
+ },
44208
+ additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
44209
+ isDictionary: true
44210
+ }, {
44211
+ headerName: 'backoffice.idmCatalog.items.label.validation',
44212
+ children: [{
44213
+ headerName: 'backoffice.idmCatalog.general.label.validFromDate',
44214
+ field: 'validFromDate',
44215
+ cellDataType: 'dateString',
44216
+ customParams: {
44217
+ dateFormat: 'DD.MM.YYYY'
44218
+ }
44219
+ }, {
44220
+ headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
44221
+ field: 'validUntilDate',
44222
+ cellDataType: 'dateString',
44223
+ customParams: {
44224
+ dateFormat: 'DD.MM.YYYY'
44225
+ }
44226
+ }]
44227
+ }, {
44228
+ headerName: 'backoffice.idmCatalog.options.label.material',
44229
+ children: [{
44230
+ headerName: 'backoffice.idmCatalog.options.label.materialNo',
44231
+ field: 'materialNo',
44232
+ editable: false
44233
+ }, {
44234
+ headerName: 'backoffice.idmCatalog.options.label.materialColorR',
44235
+ field: 'materialColorR',
44236
+ cellDataType: 'number'
44237
+ }, {
44238
+ headerName: 'backoffice.idmCatalog.options.label.materialColorG',
44239
+ field: 'materialColorG',
44240
+ cellDataType: 'number'
44241
+ }, {
44242
+ headerName: 'backoffice.idmCatalog.options.label.materialColorB',
44243
+ field: 'materialColorB',
44244
+ cellDataType: 'number'
44245
+ }]
44246
+ }, {
44247
+ headerName: 'backoffice.idmCatalog.options.label.measurement',
44248
+ children: [{
44249
+ headerName: 'backoffice.idmCatalog.options.label.measureNo',
44250
+ field: 'measureNo',
44251
+ cellDataType: 'number',
44252
+ editable: false
44253
+ }, {
44254
+ headerName: 'backoffice.idmCatalog.options.label.measureValue',
44255
+ field: 'measureValue',
44256
+ cellDataType: 'number'
44257
+ }, {
44258
+ headerName: 'backoffice.idmCatalog.options.label.measureUnit',
44259
+ field: 'measureUnit'
44260
+ }]
44261
+ }, {
44262
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
44263
+ field: 'lastUpdatedDate',
44264
+ cellDataType: 'dateString',
44265
+ editable: false
44266
+ }, {
44267
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
44268
+ field: 'createdDate',
44269
+ cellDataType: 'dateString',
44270
+ editable: false
44271
+ }, {
44272
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
44273
+ field: 'createdByDisplayText',
44274
+ editable: false
44275
+ }, {
44276
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
44277
+ field: 'lastUpdatedByDisplayText',
44278
+ editable: false
44279
+ }, {
44280
+ headerName: 'backoffice.idmCatalog.general.label._id',
44281
+ field: '_id',
44282
+ editable: false,
44283
+ cellDataType: 'objectId'
44284
+ }, {
44285
+ field: 'organizationId',
44286
+ editable: false,
44287
+ hide: true,
44288
+ lockVisible: true,
44289
+ suppressColumnsToolPanel: true,
44290
+ defaultValue: '${organizationId}'
44291
+ }]
44292
+ };
44293
+ }, []);
44294
+ return /*#__PURE__*/jsx(Spreadsheet, {
44295
+ gridId: 'crud-grid_global_features',
44296
+ applicationData: applicationData,
44297
+ configuration: configuration
44298
+ }, 'features');
44299
+ }
44300
+
44301
+ var TableOptions = observer(function () {
44302
+ var _useTranslation = useTranslation(),
44303
+ t = _useTranslation.t;
44304
+ return /*#__PURE__*/jsxs(Fragment, {
44305
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
44306
+ title: /*#__PURE__*/jsx("div", {
44307
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions')
44308
+ })
44309
+ }), /*#__PURE__*/jsx(Options, {})]
44310
+ });
44311
+ });
44312
+
44313
+ function IDMOrganizationOptionsEditor(_ref) {
43854
44314
  _objectDestructuringEmpty(_ref);
43855
44315
  return /*#__PURE__*/jsx("div", {
43856
44316
  style: {
@@ -43866,7 +44326,7 @@ function Content$2() {
43866
44326
  children: /*#__PURE__*/jsx(Route, {
43867
44327
  index: true,
43868
44328
  path: "",
43869
- element: /*#__PURE__*/jsx(TableFeatures, {})
44329
+ element: /*#__PURE__*/jsx(TableOptions, {})
43870
44330
  })
43871
44331
  });
43872
44332
  }
@@ -44428,6 +44888,12 @@ var ContentCard = observer(function (_ref3) {
44428
44888
  }, configId), configuration.type == 'IDMFeaturesEditor' && /*#__PURE__*/jsx(IDMFeaturesEditor, {
44429
44889
  configuration: configuration,
44430
44890
  id: configId
44891
+ }, configId), configuration.type == 'IDMOrganizationFeaturesEditor' && /*#__PURE__*/jsx(IDMOrganizationFeaturesEditor, {
44892
+ configuration: configuration,
44893
+ id: configId
44894
+ }, configId), configuration.type == 'IDMOrganizationOptionsEditor' && /*#__PURE__*/jsx(IDMOrganizationOptionsEditor, {
44895
+ configuration: configuration,
44896
+ id: configId
44431
44897
  }, configId), configuration.type == 'MediaTable' && /*#__PURE__*/jsx(MediaTable, {
44432
44898
  configuration: configuration,
44433
44899
  id: configId
@@ -45047,13 +45513,15 @@ var ArticleSelection$1 = observer(ArticleSelection);
45047
45513
  function ownKeys$4(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; }
45048
45514
  function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
45049
45515
  function useWysiwyg$1(_ref) {
45050
- var _tool$parameters;
45516
+ var _tool$parameters, _tool$elementProps5;
45051
45517
  var tool = _ref.tool,
45052
45518
  toolbar = _ref.toolbar;
45053
45519
  var _useDivaCore = useDivaCore(),
45054
45520
  _useDivaCore$actions = _useDivaCore.actions,
45055
45521
  subscribeEvents = _useDivaCore$actions.subscribeEvents,
45056
45522
  unSubscribeEvents = _useDivaCore$actions.unSubscribeEvents;
45523
+ var _useTranslation = useTranslation(),
45524
+ t = _useTranslation.t;
45057
45525
  var root = useStore();
45058
45526
  var _useState = useState(false),
45059
45527
  _useState2 = _slicedToArray(_useState, 2),
@@ -45065,34 +45533,54 @@ function useWysiwyg$1(_ref) {
45065
45533
  setMask = _useState4[1];
45066
45534
  var _useState5 = useState(),
45067
45535
  _useState6 = _slicedToArray(_useState5, 2),
45068
- articleCodex = _useState6[0],
45069
- setArticleCodex = _useState6[1];
45070
- var _useState7 = useState([]),
45536
+ loadingText = _useState6[0],
45537
+ setLoadingText = _useState6[1];
45538
+ var _useState7 = useState(false),
45071
45539
  _useState8 = _slicedToArray(_useState7, 2),
45072
- itemList = _useState8[0],
45073
- setItemList = _useState8[1];
45074
- var _useState9 = useState({
45075
- catalogCodex: (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.catalogCodex
45076
- }),
45540
+ isLoadingMask = _useState8[0],
45541
+ setLoadingMask = _useState8[1];
45542
+ var _useState9 = useState(false),
45077
45543
  _useState10 = _slicedToArray(_useState9, 2),
45078
- serie = _useState10[0],
45079
- setSerie = _useState10[1];
45080
- var _useState11 = useState([]),
45544
+ isLoadingCatalog = _useState10[0],
45545
+ setLoadingCatalog = _useState10[1];
45546
+ var _useState11 = useState(false),
45081
45547
  _useState12 = _slicedToArray(_useState11, 2),
45082
- serieList = _useState12[0],
45083
- setSerieList = _useState12[1];
45084
- var _useState13 = useState(tool.parameters.catalogId),
45548
+ isLoadingPackage = _useState12[0],
45549
+ setLoadingPackage = _useState12[1];
45550
+ var _useState13 = useState(false),
45085
45551
  _useState14 = _slicedToArray(_useState13, 2),
45086
- catalogId = _useState14[0],
45087
- setCatalogId = _useState14[1];
45552
+ isLoadingArticles = _useState14[0],
45553
+ setLoadingArticles = _useState14[1];
45088
45554
  var _useState15 = useState(),
45089
45555
  _useState16 = _slicedToArray(_useState15, 2),
45090
- currentNav = _useState16[0],
45091
- setCurrentNav = _useState16[1];
45092
- var _useState17 = useState(),
45556
+ articleCodex = _useState16[0],
45557
+ setArticleCodex = _useState16[1];
45558
+ var _useState17 = useState([]),
45093
45559
  _useState18 = _slicedToArray(_useState17, 2),
45094
- doNavigate = _useState18[0],
45095
- setDoNavigate = _useState18[1];
45560
+ itemList = _useState18[0],
45561
+ setItemList = _useState18[1];
45562
+ var _useState19 = useState({
45563
+ catalogCodex: (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.catalogCodex
45564
+ }),
45565
+ _useState20 = _slicedToArray(_useState19, 2),
45566
+ serie = _useState20[0],
45567
+ setSerie = _useState20[1];
45568
+ var _useState21 = useState([]),
45569
+ _useState22 = _slicedToArray(_useState21, 2),
45570
+ serieList = _useState22[0],
45571
+ setSerieList = _useState22[1];
45572
+ var _useState23 = useState(tool.parameters.catalogId),
45573
+ _useState24 = _slicedToArray(_useState23, 2),
45574
+ catalogId = _useState24[0],
45575
+ setCatalogId = _useState24[1];
45576
+ var _useState25 = useState(),
45577
+ _useState26 = _slicedToArray(_useState25, 2),
45578
+ currentNav = _useState26[0],
45579
+ setCurrentNav = _useState26[1];
45580
+ var _useState27 = useState(),
45581
+ _useState28 = _slicedToArray(_useState27, 2),
45582
+ doNavigate = _useState28[0],
45583
+ setDoNavigate = _useState28[1];
45096
45584
  useEffect(function () {
45097
45585
  if (!toolbar.hidden) setDoReset(true);
45098
45586
  }, [toolbar.hidden]);
@@ -45220,26 +45708,36 @@ function useWysiwyg$1(_ref) {
45220
45708
  };
45221
45709
  }();
45222
45710
  useEffect(function () {
45711
+ var _tool$elementProps;
45712
+ if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.onlyPlaceholder) return;
45223
45713
  if (doReset) {
45224
- var _tool$elementProps, _tool$elementProps3;
45714
+ var _tool$elementProps2, _tool$elementProps4;
45225
45715
  if (currentNav) setDoNavigate(currentNav);
45226
- if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.showCatalogSelection && !serieList.length) {
45227
- var _tool$elementProps2;
45228
- if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.loadPackage) {
45229
- loadPackage(tool.parameters.packageId);
45716
+ if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.showCatalogSelection && !serieList.length) {
45717
+ var _tool$elementProps3;
45718
+ if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.loadPackage) {
45719
+ setLoadingPackage(true);
45720
+ loadPackage(tool.parameters.packageId).then(function () {
45721
+ return setLoadingPackage(false);
45722
+ });
45230
45723
  } else {
45231
- loadCatalogs(tool.elementProps.catalogId);
45724
+ setLoadingCatalog(true);
45725
+ loadCatalogs(tool.elementProps.catalogId).then(function () {
45726
+ return setLoadingCatalog(false);
45727
+ });
45232
45728
  }
45233
45729
  }
45234
- if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.loadMask) {
45730
+ if ((_tool$elementProps4 = tool.elementProps) !== null && _tool$elementProps4 !== void 0 && _tool$elementProps4.loadMask) {
45731
+ setLoadingMask(true);
45235
45732
  loadMask(tool.parameters.packageId).then(function () {
45236
- return setDoReset(false);
45733
+ setLoadingMask(false);
45734
+ setDoReset(false);
45237
45735
  });
45238
45736
  } else {
45239
45737
  setDoReset(false);
45240
45738
  }
45241
45739
  }
45242
- }, [doReset]);
45740
+ }, [doReset, (_tool$elementProps5 = tool.elementProps) === null || _tool$elementProps5 === void 0 ? void 0 : _tool$elementProps5.onlyPlaceholder]);
45243
45741
  useEffect(function () {
45244
45742
  setArticleCodex(undefined);
45245
45743
  if (serie !== null && serie !== void 0 && serie.catalogCodex) {
@@ -45255,6 +45753,7 @@ function useWysiwyg$1(_ref) {
45255
45753
  setArticleCodex(undefined);
45256
45754
  setSerie(undefined);
45257
45755
  setItemList([]);
45756
+ setLoadingArticles(true);
45258
45757
  setSerieList([]);
45259
45758
  }, [tool.parameters.catalogId, tool.parameters.packageId]);
45260
45759
  var onEventCalled = /*#__PURE__*/function () {
@@ -45277,6 +45776,7 @@ function useWysiwyg$1(_ref) {
45277
45776
  });
45278
45777
  }
45279
45778
  setItemList(articles);
45779
+ setLoadingArticles(false);
45280
45780
  if (articleCodex === undefined && articles !== null && articles !== void 0 && (_articles$ = articles[0]) !== null && _articles$ !== void 0 && _articles$.value) setArticleCodex(articles[0].value);
45281
45781
  }
45282
45782
  if (e.type === 'navigatedToOption') {
@@ -45299,7 +45799,7 @@ function useWysiwyg$1(_ref) {
45299
45799
  };
45300
45800
  }, [articleCodex]);
45301
45801
  var settings = useMemo(function () {
45302
- var _tool$elementProps4, _tool$elementProps5, _tool$elementProps6;
45802
+ var _tool$elementProps6, _tool$elementProps7, _tool$elementProps8;
45303
45803
  return {
45304
45804
  language: 'DE',
45305
45805
  showSelectionModeZero: true,
@@ -45356,9 +45856,9 @@ function useWysiwyg$1(_ref) {
45356
45856
  tooltipPosition: 'left-center',
45357
45857
  clientEvents: ['onWebPlanerConfigChange', 'onArticlesLoaded']
45358
45858
  },
45359
- useIDMService: (_tool$elementProps4 = tool.elementProps) === null || _tool$elementProps4 === void 0 ? void 0 : _tool$elementProps4.useIDMService,
45360
- useEnricherService: (_tool$elementProps5 = tool.elementProps) === null || _tool$elementProps5 === void 0 ? void 0 : _tool$elementProps5.useEnricherService,
45361
- useMask: (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.loadMask,
45859
+ useIDMService: (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.useIDMService,
45860
+ useEnricherService: (_tool$elementProps7 = tool.elementProps) === null || _tool$elementProps7 === void 0 ? void 0 : _tool$elementProps7.useEnricherService,
45861
+ useMask: (_tool$elementProps8 = tool.elementProps) === null || _tool$elementProps8 === void 0 ? void 0 : _tool$elementProps8.loadMask,
45362
45862
  templateConfig: {
45363
45863
  Layout: 'wysiwyg',
45364
45864
  NavigationButton: 'standard',
@@ -45379,6 +45879,19 @@ function useWysiwyg$1(_ref) {
45379
45879
  }
45380
45880
  };
45381
45881
  }, []);
45882
+ useEffect(function () {
45883
+ if (isLoadingPackage) {
45884
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.package'));
45885
+ } else if (isLoadingCatalog) {
45886
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.catalog'));
45887
+ } else if (isLoadingMask) {
45888
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.mask'));
45889
+ } else if (isLoadingArticles) {
45890
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.articles'));
45891
+ } else {
45892
+ setLoadingText(undefined);
45893
+ }
45894
+ }, [isLoadingPackage, isLoadingCatalog, isLoadingMask, isLoadingArticles]);
45382
45895
  return {
45383
45896
  itemList: itemList,
45384
45897
  setItemList: setItemList,
@@ -45394,7 +45907,8 @@ function useWysiwyg$1(_ref) {
45394
45907
  setDoReset: setDoReset,
45395
45908
  doNavigate: doNavigate,
45396
45909
  setDoNavigate: setDoNavigate,
45397
- catalogId: catalogId
45910
+ catalogId: catalogId,
45911
+ loadingText: loadingText
45398
45912
  };
45399
45913
  }
45400
45914
 
@@ -45512,6 +46026,7 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45512
46026
  }
45513
46027
  }, [tool.parameters]);
45514
46028
  useEffect(function () {
46029
+ if (tool.elementProps.onlyPlaceholder) return;
45515
46030
  if (tool.elementProps.initSerie) {
45516
46031
  if (tool.elementProps.useEnricherService) {
45517
46032
  var _state$serieList$find;
@@ -45546,6 +46061,9 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45546
46061
  });
45547
46062
  }
45548
46063
  }
46064
+ if (tool.elementProps.onlyPlaceholder) {
46065
+ return /*#__PURE__*/jsx("div", {});
46066
+ }
45549
46067
  if (state !== null && state !== void 0 && state.mask) {
45550
46068
  var _state$mask;
45551
46069
  if (!((_state$mask = state.mask) !== null && _state$mask !== void 0 && _state$mask.catalogCodex) || !state.mask.accountId) return /*#__PURE__*/jsx(Fragment, {
@@ -45556,14 +46074,18 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45556
46074
  errorCode: "BACKO_0004",
45557
46075
  children: /*#__PURE__*/jsxs("div", {
45558
46076
  className: wrapper$2,
45559
- children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
45560
- state: state,
45561
- setSerie: tool.elementProps.setSerie
45562
- }), /*#__PURE__*/jsx(ArticleSelection$1, {
45563
- state: state,
45564
- setArticle: tool.elementProps.setArticle
46077
+ children: [!state.loadingText && /*#__PURE__*/jsxs(Fragment, {
46078
+ children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
46079
+ state: state,
46080
+ setSerie: tool.elementProps.setSerie
46081
+ }), /*#__PURE__*/jsx(ArticleSelection$1, {
46082
+ state: state,
46083
+ setArticle: tool.elementProps.setArticle
46084
+ })]
46085
+ }), state.loadingText && /*#__PURE__*/jsx("div", {
46086
+ children: state.loadingText
45565
46087
  }), state.mask && !state.doReset && /*#__PURE__*/jsx("div", {
45566
- hidden: !state.articleCodex,
46088
+ hidden: !state.articleCodex && !!state.loadingText,
45567
46089
  className: confContainer,
45568
46090
  children: /*#__PURE__*/jsx(WebPlannerReact, {
45569
46091
  settings: state.settings,
@@ -45593,7 +46115,7 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45593
46115
  }
45594
46116
  }
45595
46117
  },
45596
- isVisible: !!state.articleCodex
46118
+ isVisible: !!state.articleCodex && !state.loadingText
45597
46119
  }, state.articleCodex)
45598
46120
  })]
45599
46121
  })