@crystaldesign/diva-backoffice 25.14.0-beta.3 → 25.14.0-beta.30

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 +691 -156
  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,
@@ -32761,6 +32833,12 @@ var useTools = function useTools(_ref) {
32761
32833
  }
32762
32834
  return undefined;
32763
32835
  }, [serie]);
32836
+ var initItem = useMemo(function () {
32837
+ if (item) {
32838
+ return item.typeNo;
32839
+ }
32840
+ return undefined;
32841
+ }, [item]);
32764
32842
  var createConfigurator = function createConfigurator() {
32765
32843
  var parameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
32766
32844
  return createTool({
@@ -32773,30 +32851,35 @@ var useTools = function useTools(_ref) {
32773
32851
  packageId: packageId,
32774
32852
  isIDMData: !isApi2 ? '1' : undefined
32775
32853
  }, parameters),
32776
- elementProps: catalogId ? _objectSpread$o({
32854
+ elementProps: onlyPlaceholder ? {
32855
+ onlyPlaceholder: true
32856
+ } : catalogId ? _objectSpread$o(_objectSpread$o({
32777
32857
  // open configurator for idm catalog
32778
32858
  useIDMService: true,
32779
32859
  catalogId: catalogId,
32780
32860
  showCatalogSelection: true,
32781
- initItem: item === null || item === void 0 ? void 0 : item.typeNo,
32782
32861
  setSerie: setSerie,
32783
32862
  setArticle: setArticle
32784
- }, initSerie ? {
32863
+ }, initItem ? {
32864
+ initItem: initItem
32865
+ } : {}), initSerie ? {
32785
32866
  initSerie: initSerie
32786
- } : {}) : isApi2 ? {
32867
+ } : {}) : isApi2 ? _objectSpread$o({
32787
32868
  // open configurator for api2 package (configurator light)
32788
- loadMask: true,
32789
- initItem: item === null || item === void 0 ? void 0 : item.typeNo
32790
- } : _objectSpread$o({
32869
+ loadMask: true
32870
+ }, initItem ? {
32871
+ initItem: initItem
32872
+ } : {}) : _objectSpread$o(_objectSpread$o({
32791
32873
  // open configurator for idm package
32792
32874
  useEnricherService: true,
32793
32875
  loadPackage: true,
32794
32876
  packageId: packageId,
32795
32877
  showCatalogSelection: true,
32796
- initItem: item === null || item === void 0 ? void 0 : item.typeNo,
32797
32878
  setSerie: setSerie,
32798
32879
  setArticle: setArticle
32799
- }, initSerie ? {
32880
+ }, initItem ? {
32881
+ initItem: initItem
32882
+ } : {}), initSerie ? {
32800
32883
  initSerie: initSerie
32801
32884
  } : {})
32802
32885
  });
@@ -32863,7 +32946,7 @@ var useTools = function useTools(_ref) {
32863
32946
  return tool.id;
32864
32947
  })) || []));
32865
32948
  };
32866
- }, [mainInformationWindowCodex, catalogId, packageId, conditionalTools]);
32949
+ }, [mainInformationWindowCodex, catalogId, packageId, conditionalTools, onlyPlaceholder, item, serie]);
32867
32950
  return {
32868
32951
  updateConfigurator: updateConfigurator,
32869
32952
  updateInformationWindow: updateInformationWindow
@@ -32881,7 +32964,8 @@ var TableGroups = observer(function () {
32881
32964
  viewOnly = _useModule.viewOnly;
32882
32965
  useTools({
32883
32966
  packageId: packageId,
32884
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
32967
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
32968
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
32885
32969
  });
32886
32970
  var applicationData = useMemo(function () {
32887
32971
  return {
@@ -33546,7 +33630,8 @@ var TablePackages = observer(function () {
33546
33630
  setSelectedPackage = _useEnricherContext.setSelectedPackage,
33547
33631
  selectedPackage = _useEnricherContext.selectedPackage;
33548
33632
  useTools({
33549
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
33633
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
33634
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
33550
33635
  });
33551
33636
  var organizationId = root.dataStore.organizationId;
33552
33637
  var organizationDisplayText = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.displayName;
@@ -33803,6 +33888,9 @@ var TablePackages = observer(function () {
33803
33888
  apiInterface: {
33804
33889
  read: apiConfig.authService + "/organizations/".concat(organizationId, "/related")
33805
33890
  },
33891
+ filter: function filter(_, lookupData) {
33892
+ return lookupData._id !== organizationId;
33893
+ },
33806
33894
  lookupValue: 'displayName',
33807
33895
  lookupKey: '_id',
33808
33896
  serverType: 'nodejs',
@@ -33900,7 +33988,8 @@ var TableProperties = observer(function () {
33900
33988
  viewOnly = _useModule.viewOnly;
33901
33989
  useTools({
33902
33990
  packageId: packageId,
33903
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
33991
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
33992
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
33904
33993
  });
33905
33994
  var applicationData = useMemo(function () {
33906
33995
  return {
@@ -33947,18 +34036,26 @@ var TableProperties = observer(function () {
33947
34036
  additionalFields: ['featureNosDisplayTexts'],
33948
34037
  isDictionary: true
33949
34038
  }, {
33950
- field: 'optionKeys',
34039
+ field: 'optionIds',
33951
34040
  headerName: 'backoffice.idmEnricher.renaming.label.optionKeys',
33952
34041
  cellDataType: 'lookup',
33953
34042
  editable: !viewOnly,
33954
34043
  customParams: {
33955
34044
  nameField: 'optionKeysDisplayTexts',
33956
- displayLabelTemplate: '${name} (${value})',
34045
+ displayLabelTemplate: '${name} (${optionKeys}) in Features: ${optionFeatureNos}',
34046
+ lookupLabelTemplate: '${name} (${optionKey}) in Features: ${featureNos}',
33957
34047
  apiInterface: {
33958
34048
  read: apiConfig.enricherService + '/packages/${packageId}/lookup/options'
33959
34049
  },
33960
34050
  lookupValue: 'optionText',
33961
- lookupKey: 'optionKey',
34051
+ lookupKey: '_id',
34052
+ additionalMappings: [{
34053
+ lookupField: 'optionKey',
34054
+ targetField: 'optionKeys'
34055
+ }, {
34056
+ lookupField: 'featureNos',
34057
+ targetField: 'optionFeatureNos'
34058
+ }],
33962
34059
  multiple: true,
33963
34060
  translated: true,
33964
34061
  filter: {
@@ -33968,7 +34065,7 @@ var TableProperties = observer(function () {
33968
34065
  filter: '${featureNos}'
33969
34066
  }
33970
34067
  },
33971
- additionalFields: ['optionKeysDisplayTexts'],
34068
+ additionalFields: ['optionKeysDisplayTexts', 'optionKeys', 'optionFeatureNos'],
33972
34069
  isDictionary: true
33973
34070
  }, 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
34071
  field: 'serieNos',
@@ -34747,6 +34844,7 @@ var RenamingTable = observer(function (_ref) {
34747
34844
  var _useTools = useTools({
34748
34845
  packageId: packageId,
34749
34846
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
34847
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
34750
34848
  setArticle: setSelectedItem,
34751
34849
  setSerie: setSelectedSerie,
34752
34850
  serie: selectedSerie,
@@ -35348,6 +35446,7 @@ var ExclusivityTable = observer(function (_ref) {
35348
35446
  var _useTools = useTools({
35349
35447
  packageId: packageId,
35350
35448
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35449
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
35351
35450
  setArticle: setSelectedItem,
35352
35451
  setSerie: setSelectedSerie,
35353
35452
  serie: selectedSerie,
@@ -35482,7 +35581,8 @@ var TableTabGroups = observer(function () {
35482
35581
  viewOnly = _useModule.viewOnly;
35483
35582
  useTools({
35484
35583
  packageId: packageId,
35485
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
35584
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35585
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35486
35586
  });
35487
35587
  var applicationData = useMemo(function () {
35488
35588
  return {
@@ -35587,7 +35687,8 @@ var TablePartlistPos = observer(function () {
35587
35687
  viewOnly = _useModule.viewOnly;
35588
35688
  useTools({
35589
35689
  packageId: packageId,
35590
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
35690
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35691
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35591
35692
  });
35592
35693
  var posInvisibility = useMemo(function () {
35593
35694
  return [{
@@ -37058,7 +37159,8 @@ var TablePriceList = observer(function () {
37058
37159
  setSelectedNodeId = _React$useState4[1];
37059
37160
  useTools({
37060
37161
  packageId: packageId,
37061
- isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
37162
+ isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
37163
+ onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
37062
37164
  });
37063
37165
  var setNodeDataValue = useCallback(function (data) {
37064
37166
  spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
@@ -37347,10 +37449,10 @@ function IDMEnricherEditor (_ref) {
37347
37449
  display: 'flex',
37348
37450
  flexDirection: 'column'
37349
37451
  },
37350
- children: /*#__PURE__*/jsx(Content$5, {})
37452
+ children: /*#__PURE__*/jsx(Content$7, {})
37351
37453
  });
37352
37454
  }
37353
- function Content$5() {
37455
+ function Content$7() {
37354
37456
  return /*#__PURE__*/jsxs(Routes, {
37355
37457
  children: [/*#__PURE__*/jsx(Route, {
37356
37458
  index: true,
@@ -40376,7 +40478,7 @@ var TableSeries = observer(function () {
40376
40478
  });
40377
40479
  });
40378
40480
 
40379
- var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40481
+ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40380
40482
  var organizationId = _ref.organizationId,
40381
40483
  selectedCatalog = _ref.selectedCatalog,
40382
40484
  featureClassId = _ref.featureClassId,
@@ -40450,7 +40552,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40450
40552
  displayLabelTemplate: '${value}',
40451
40553
  lookupLabelTemplate: '${name} (${value})',
40452
40554
  apiInterface: {
40453
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
40555
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
40454
40556
  },
40455
40557
  lookupKey: 'featureNo',
40456
40558
  lookupValue: 'featureText',
@@ -40568,7 +40670,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40568
40670
  }, featureClassId ? featureClassId : 'features');
40569
40671
  });
40570
40672
 
40571
- function Features(_ref) {
40673
+ function Features$1(_ref) {
40572
40674
  var readOnly = _ref.readOnly;
40573
40675
  var _useTranslation = useTranslation();
40574
40676
  _useTranslation.t;
@@ -40632,7 +40734,7 @@ function Features(_ref) {
40632
40734
  }, 'features');
40633
40735
  }
40634
40736
 
40635
- var TableFeatures$1 = observer(function () {
40737
+ var TableFeatures$2 = observer(function () {
40636
40738
  var _useDivaCore = useDivaCore(),
40637
40739
  jwt = _useDivaCore.state.jwt;
40638
40740
  var _useTranslation = useTranslation(),
@@ -40651,7 +40753,7 @@ var TableFeatures$1 = observer(function () {
40651
40753
  conditionalTools: [{
40652
40754
  id: 'globalfeatures',
40653
40755
  name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
40654
- elementComponent: Features,
40756
+ elementComponent: Features$1,
40655
40757
  elementProps: {
40656
40758
  readOnly: true
40657
40759
  },
@@ -40732,7 +40834,7 @@ var TableFeatures$1 = observer(function () {
40732
40834
  })]
40733
40835
  })]
40734
40836
  })
40735
- }), selectedCatalog && /*#__PURE__*/jsx(Features$1, {
40837
+ }), selectedCatalog && /*#__PURE__*/jsx(Features$2, {
40736
40838
  organizationId: organizationId,
40737
40839
  selectedCatalog: selectedCatalog,
40738
40840
  hooks: hooks,
@@ -40742,7 +40844,7 @@ var TableFeatures$1 = observer(function () {
40742
40844
  });
40743
40845
  });
40744
40846
 
40745
- var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40847
+ var Options$1 = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40746
40848
  var organizationId = _ref.organizationId,
40747
40849
  selectedCatalog = _ref.selectedCatalog,
40748
40850
  apiConfig = _ref.apiConfig,
@@ -40906,7 +41008,7 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40906
41008
  });
40907
41009
  });
40908
41010
 
40909
- var TableOptions = observer(function () {
41011
+ var TableOptions$1 = observer(function () {
40910
41012
  var _selectedCatalog$name;
40911
41013
  var _useTranslation = useTranslation(),
40912
41014
  t = _useTranslation.t;
@@ -40977,7 +41079,7 @@ var TableOptions = observer(function () {
40977
41079
  })]
40978
41080
  })]
40979
41081
  })
40980
- }), selectedCatalog && /*#__PURE__*/jsx(Options, {
41082
+ }), selectedCatalog && /*#__PURE__*/jsx(Options$1, {
40981
41083
  organizationId: organizationId,
40982
41084
  selectedCatalog: selectedCatalog,
40983
41085
  hooks: hooks,
@@ -41008,7 +41110,7 @@ var TableFeatureClasses = observer(function () {
41008
41110
  conditionalTools: [{
41009
41111
  id: 'features',
41010
41112
  name: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
41011
- elementComponent: Features$1,
41113
+ elementComponent: Features$2,
41012
41114
  elementProps: {
41013
41115
  organizationId: organizationId,
41014
41116
  selectedCatalog: selectedCatalog,
@@ -41694,7 +41796,7 @@ function OptionCombinations(_ref) {
41694
41796
  editorElementProps: {
41695
41797
  nameField: 'featureRefsDisplayTexts',
41696
41798
  apiInterface: {
41697
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
41799
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41698
41800
  },
41699
41801
  filter: function filter(_, lookupData) {
41700
41802
  var _decision$featureRefs8;
@@ -41719,10 +41821,31 @@ function OptionCombinations(_ref) {
41719
41821
  },
41720
41822
  defaultValue: []
41721
41823
  }] : decision.decisionType == 3 ? [{
41722
- headerName: 'backoffice.idmCatalog.optionCombinations.label.actions',
41824
+ headerName: 'backoffice.idmCatalog.optionCombinations.label.setPosCountValue',
41723
41825
  field: 'actions',
41724
- cellDataType: 'array',
41725
- defaultValue: []
41826
+ cellDataType: 'number',
41827
+ required: true,
41828
+ customParams: {
41829
+ useParser: true,
41830
+ useFormatter: true
41831
+ },
41832
+ valueFormatter: function valueFormatter(_ref2) {
41833
+ _ref2.data;
41834
+ var value = _ref2.value;
41835
+ if (Array.isArray(value)) {
41836
+ var action = value === null || value === void 0 ? void 0 : value.find(function (action) {
41837
+ return action.startsWith('SET_POS_COUNT_VALUE');
41838
+ });
41839
+ return action ? Number(action.split(':')[1]) : undefined;
41840
+ }
41841
+ return value;
41842
+ },
41843
+ valueParser: function valueParser(_ref3) {
41844
+ var newValue = _ref3.newValue;
41845
+ if (newValue == '') return undefined;
41846
+ return ["SET_POS_COUNT_VALUE:".concat(newValue)];
41847
+ },
41848
+ additionalFields: ['projectActions']
41726
41849
  }] : []), [{
41727
41850
  headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
41728
41851
  field: 'sequence',
@@ -41750,13 +41873,6 @@ function OptionCombinations(_ref) {
41750
41873
  field: '_id',
41751
41874
  editable: false,
41752
41875
  cellDataType: 'objectId'
41753
- }, {
41754
- field: 'organizationId',
41755
- editable: false,
41756
- hide: true,
41757
- lockVisible: true,
41758
- suppressColumnsToolPanel: true,
41759
- defaultValue: '${organizationId}'
41760
41876
  }, {
41761
41877
  field: 'catalogId',
41762
41878
  editable: false,
@@ -41913,7 +42029,7 @@ var TableDecisions = observer(function () {
41913
42029
  nameField: 'featureRefsDisplayTexts',
41914
42030
  displayLabelTemplate: '${name} (${value})',
41915
42031
  apiInterface: {
41916
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42032
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41917
42033
  },
41918
42034
  lookupValue: 'featureText',
41919
42035
  lookupKey: 'featureNo',
@@ -42665,7 +42781,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42665
42781
  editorElementProps: {
42666
42782
  nameField: 'featureNosDisplayTexts',
42667
42783
  apiInterface: {
42668
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42784
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42669
42785
  },
42670
42786
  filter: function filter(_, lookupData) {
42671
42787
  var _priceFeatureGroup$fe7;
@@ -42852,7 +42968,7 @@ function PriceFeatureGroupFinishes(_ref) {
42852
42968
  editorElementProps: {
42853
42969
  nameField: 'featureNosDisplayTexts',
42854
42970
  apiInterface: {
42855
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42971
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42856
42972
  },
42857
42973
  filter: function filter(_, lookupData) {
42858
42974
  var _priceFeatureGroup$fe7;
@@ -43206,6 +43322,7 @@ var TablePrices = observer(function () {
43206
43322
  cellDataType: 'lookup',
43207
43323
  customParams: {
43208
43324
  nameField: 'typeNo',
43325
+ filterCellType: 'objectId',
43209
43326
  displayLabelTemplate: '${name} (${value})',
43210
43327
  apiInterface: {
43211
43328
  read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/items'
@@ -43336,7 +43453,8 @@ function Items(_ref) {
43336
43453
  create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options',
43337
43454
  restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43338
43455
  "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43339
- update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}'
43456
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43457
+ bulk: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/bulk'
43340
43458
  },
43341
43459
  dateFormat: 'DD.MM.YYYY, HH:mm:ss',
43342
43460
  floatingFilter: true,
@@ -43494,10 +43612,10 @@ function IDMCatalogEditor (_ref) {
43494
43612
  display: 'flex',
43495
43613
  flexDirection: 'column'
43496
43614
  },
43497
- children: /*#__PURE__*/jsx(Content$4, {})
43615
+ children: /*#__PURE__*/jsx(Content$6, {})
43498
43616
  });
43499
43617
  }
43500
- function Content$4() {
43618
+ function Content$6() {
43501
43619
  return /*#__PURE__*/jsxs(Routes, {
43502
43620
  children: [/*#__PURE__*/jsx(Route, {
43503
43621
  index: true,
@@ -43510,10 +43628,10 @@ function Content$4() {
43510
43628
  element: /*#__PURE__*/jsx(TableItems, {})
43511
43629
  }), /*#__PURE__*/jsx(Route, {
43512
43630
  path: ":catalogId/features",
43513
- element: /*#__PURE__*/jsx(TableFeatures$1, {})
43631
+ element: /*#__PURE__*/jsx(TableFeatures$2, {})
43514
43632
  }), /*#__PURE__*/jsx(Route, {
43515
43633
  path: ":catalogId/options",
43516
- element: /*#__PURE__*/jsx(TableOptions, {})
43634
+ element: /*#__PURE__*/jsx(TableOptions$1, {})
43517
43635
  }), /*#__PURE__*/jsx(Route, {
43518
43636
  path: ":catalogId/optiongroups",
43519
43637
  element: /*#__PURE__*/jsx(TableOptionGroups, {})
@@ -43603,15 +43721,16 @@ function CollectionMembers(_ref) {
43603
43721
  headerName: 'backoffice.idmCatalogEditor.collectionmembers.label.serieNos',
43604
43722
  cellDataType: 'lookup',
43605
43723
  editable: function editable(_ref2) {
43606
- var data = _ref2.data;
43607
- return data.enricherPackageId;
43724
+ var data = _ref2.data,
43725
+ context = _ref2.context;
43726
+ return (context === null || context === void 0 ? void 0 : context.isPasting) || !!data.enricherPackageId;
43608
43727
  },
43609
43728
  customParams: {
43610
43729
  nameField: 'serieNosDisplayTexts',
43611
43730
  filterCellType: 'number',
43612
43731
  displayLabelTemplate: '${name} (${value})',
43613
43732
  apiInterface: {
43614
- read: apiConfig.enricherService + '/packages/${enricherPackageId}/lookup/series'
43733
+ read: apiConfig.enricherService + '/live/v3.0/catalogs/${__diva_context.additionalData.published.' + organizationId + '.liveCatalogId}/series'
43615
43734
  },
43616
43735
  lookupValue: 'seriesName',
43617
43736
  lookupKey: 'serieNo',
@@ -43821,10 +43940,10 @@ function IDMCollectionEditor(_ref) {
43821
43940
  display: 'flex',
43822
43941
  flexDirection: 'column'
43823
43942
  },
43824
- children: /*#__PURE__*/jsx(Content$3, {})
43943
+ children: /*#__PURE__*/jsx(Content$5, {})
43825
43944
  });
43826
43945
  }
43827
- function Content$3() {
43946
+ function Content$5() {
43828
43947
  return /*#__PURE__*/jsx(Routes, {
43829
43948
  children: /*#__PURE__*/jsx(Route, {
43830
43949
  index: true,
@@ -43834,9 +43953,174 @@ function Content$3() {
43834
43953
  });
43835
43954
  }
43836
43955
 
43956
+ var TableFeatures$1 = observer(function () {
43957
+ var _useTranslation = useTranslation(),
43958
+ t = _useTranslation.t;
43959
+ return /*#__PURE__*/jsxs(Fragment, {
43960
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
43961
+ title: /*#__PURE__*/jsx("div", {
43962
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures')
43963
+ })
43964
+ }), /*#__PURE__*/jsx(Features$1, {})]
43965
+ });
43966
+ });
43967
+
43968
+ function IDMFeaturesEditor(_ref) {
43969
+ _objectDestructuringEmpty(_ref);
43970
+ return /*#__PURE__*/jsx("div", {
43971
+ style: {
43972
+ height: '85vh',
43973
+ display: 'flex',
43974
+ flexDirection: 'column'
43975
+ },
43976
+ children: /*#__PURE__*/jsx(Content$4, {})
43977
+ });
43978
+ }
43979
+ function Content$4() {
43980
+ return /*#__PURE__*/jsx(Routes, {
43981
+ children: /*#__PURE__*/jsx(Route, {
43982
+ index: true,
43983
+ path: "",
43984
+ element: /*#__PURE__*/jsx(TableFeatures$1, {})
43985
+ })
43986
+ });
43987
+ }
43988
+
43989
+ function Features(_ref) {
43990
+ var readOnly = _ref.readOnly;
43991
+ var root = useStore();
43992
+ var apiConfig = root.configurationStore.apiConfig;
43993
+ var organizationId = root.dataStore.organizationId;
43994
+ var applicationData = useMemo(function () {
43995
+ return {
43996
+ organizationId: organizationId
43997
+ };
43998
+ }, [organizationId]);
43999
+ var _useTranslation = useTranslation(),
44000
+ t = _useTranslation.t;
44001
+ var configuration = useMemo(function () {
44002
+ var _root$dataStore$curre;
44003
+ var headerPosVariationType = [{
44004
+ name: t('backoffice.idmCatalog.features.label.vt.I'),
44005
+ value: 'I'
44006
+ }, {
44007
+ name: t('backoffice.idmCatalog.features.label.vt.K'),
44008
+ value: 'K'
44009
+ }, {
44010
+ name: t('backoffice.idmCatalog.features.label.vt.P'),
44011
+ value: 'P'
44012
+ }];
44013
+ var featureT = [{
44014
+ name: t('backoffice.idmCatalog.features.label.featureTDic.M'),
44015
+ value: 'M'
44016
+ }, {
44017
+ name: t('backoffice.idmCatalog.features.label.featureTDic.C'),
44018
+ value: 'C'
44019
+ }, {
44020
+ name: t('backoffice.idmCatalog.features.label.featureTDic.O'),
44021
+ value: 'O'
44022
+ }];
44023
+ return {
44024
+ type: 'dotnetSSM',
44025
+ apiInterface: {
44026
+ read: apiConfig.idmService + '/v3.0/${organizationId}/features',
44027
+ create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features',
44028
+ restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}/restore',
44029
+ "delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
44030
+ update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
44031
+ bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/bulk'
44032
+ },
44033
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
44034
+ colDef: [{
44035
+ field: 'featureNo',
44036
+ headerName: 'backoffice.idmCatalog.features.label.featureNo',
44037
+ required: true,
44038
+ unique: true
44039
+ }, 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), {
44040
+ field: 'sequenceNo',
44041
+ headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
44042
+ required: true,
44043
+ cellDataType: 'number'
44044
+ }, {
44045
+ field: 'headerPosVariationType',
44046
+ headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
44047
+ required: true,
44048
+ cellDataType: 'enum',
44049
+ customParams: {
44050
+ enumData: headerPosVariationType,
44051
+ displayLabelTemplate: '${name} (${value})'
44052
+ }
44053
+ }, {
44054
+ field: 'featureT',
44055
+ headerName: 'backoffice.idmCatalog.features.label.featureT',
44056
+ cellDataType: 'enum',
44057
+ customParams: {
44058
+ enumData: featureT,
44059
+ displayLabelTemplate: '${name} (${value})'
44060
+ }
44061
+ }, {
44062
+ field: 'measureUnit',
44063
+ headerName: 'backoffice.idmCatalog.features.label.measureUnit'
44064
+ }, {
44065
+ field: 'measureParameter',
44066
+ headerName: 'backoffice.idmCatalog.features.label.measureParameter'
44067
+ }, {
44068
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
44069
+ field: 'lastUpdatedDate',
44070
+ cellDataType: 'dateString',
44071
+ editable: false
44072
+ }, {
44073
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
44074
+ field: 'createdDate',
44075
+ cellDataType: 'dateString',
44076
+ editable: false
44077
+ }, {
44078
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
44079
+ field: 'createdByDisplayText',
44080
+ editable: false
44081
+ }, {
44082
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
44083
+ field: 'lastUpdatedByDisplayText',
44084
+ editable: false
44085
+ }, {
44086
+ headerName: 'backoffice.idmCatalog.general.label._id',
44087
+ field: '_id',
44088
+ editable: false,
44089
+ cellDataType: 'objectId'
44090
+ }, {
44091
+ field: 'organizationId',
44092
+ editable: false,
44093
+ hide: true,
44094
+ lockVisible: true,
44095
+ suppressColumnsToolPanel: true,
44096
+ defaultValue: '${organizationId}'
44097
+ }]
44098
+ };
44099
+ }, []);
44100
+ return /*#__PURE__*/jsx(Spreadsheet, {
44101
+ gridId: 'crud-grid_global_features',
44102
+ applicationData: applicationData,
44103
+ configuration: configuration
44104
+ }, 'features');
44105
+ }
44106
+
43837
44107
  var TableFeatures = observer(function () {
43838
44108
  var _useTranslation = useTranslation(),
43839
44109
  t = _useTranslation.t;
44110
+ useTools({
44111
+ conditionalTools: [{
44112
+ id: 'globalfeatures',
44113
+ name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
44114
+ elementComponent: Features$1,
44115
+ elementProps: {
44116
+ readOnly: true
44117
+ },
44118
+ where: 'right',
44119
+ condition: function condition() {
44120
+ return true;
44121
+ }
44122
+ }]
44123
+ });
43840
44124
  return /*#__PURE__*/jsxs(Fragment, {
43841
44125
  children: [/*#__PURE__*/jsx(Descriptions$1, {
43842
44126
  title: /*#__PURE__*/jsx("div", {
@@ -43846,7 +44130,196 @@ var TableFeatures = observer(function () {
43846
44130
  });
43847
44131
  });
43848
44132
 
43849
- function IDMFeaturesEditor(_ref) {
44133
+ function IDMOrganizationFeaturesEditor(_ref) {
44134
+ _objectDestructuringEmpty(_ref);
44135
+ return /*#__PURE__*/jsx("div", {
44136
+ style: {
44137
+ height: '85vh',
44138
+ display: 'flex',
44139
+ flexDirection: 'column'
44140
+ },
44141
+ children: /*#__PURE__*/jsx(Content$3, {})
44142
+ });
44143
+ }
44144
+ function Content$3() {
44145
+ return /*#__PURE__*/jsx(Routes, {
44146
+ children: /*#__PURE__*/jsx(Route, {
44147
+ index: true,
44148
+ path: "",
44149
+ element: /*#__PURE__*/jsx(TableFeatures, {})
44150
+ })
44151
+ });
44152
+ }
44153
+
44154
+ function Options(_ref) {
44155
+ var _root$dataStore$curre;
44156
+ var readOnly = _ref.readOnly;
44157
+ var root = useStore();
44158
+ var apiConfig = root.configurationStore.apiConfig;
44159
+ var organizationId = root.dataStore.organizationId;
44160
+ var languages = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.settings.languages;
44161
+ var applicationData = useMemo(function () {
44162
+ return {
44163
+ organizationId: organizationId
44164
+ };
44165
+ }, [organizationId]);
44166
+ var _useTranslation = useTranslation();
44167
+ _useTranslation.t;
44168
+ var configuration = useMemo(function () {
44169
+ return {
44170
+ type: 'dotnetSSM',
44171
+ apiInterface: {
44172
+ read: apiConfig.idmService + '/v3.0/${organizationId}/options',
44173
+ create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options',
44174
+ restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}/restore',
44175
+ "delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
44176
+ update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
44177
+ bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/bulk'
44178
+ },
44179
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
44180
+ colDef: [{
44181
+ field: 'optionKey',
44182
+ required: true
44183
+ }, {
44184
+ headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
44185
+ field: 'sequenceNo',
44186
+ cellDataType: 'number'
44187
+ }, createTranslatedColumnConfig('optionText', 'backoffice.idmCatalog.options.label.optionText', languages, true), createTranslatedColumnConfig('optionCommentText', 'backoffice.idmCatalog.options.label.optionCommentText', languages), {
44188
+ headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
44189
+ field: 'optionFreeText',
44190
+ cellDataType: 'boolean'
44191
+ }, {
44192
+ field: 'featureNos',
44193
+ headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
44194
+ cellDataType: 'lookup',
44195
+ editable: true,
44196
+ required: false,
44197
+ customParams: {
44198
+ nameField: 'featureIdsDisplayTexts',
44199
+ filterCellType: 'number',
44200
+ displayLabelTemplate: '${name} (${value})',
44201
+ apiInterface: {
44202
+ read: apiConfig.idmService + '/v3.0/${organizationId}/features'
44203
+ },
44204
+ lookupValue: 'featureText',
44205
+ lookupKey: 'featureNo',
44206
+ lookupKeyFilterType: {
44207
+ type: 'equals',
44208
+ filterType: 'number'
44209
+ },
44210
+ additionalMappings: [{
44211
+ lookupField: '_id',
44212
+ targetField: 'featureIds'
44213
+ }],
44214
+ multiple: true,
44215
+ translated: true
44216
+ },
44217
+ additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
44218
+ isDictionary: true
44219
+ }, {
44220
+ headerName: 'backoffice.idmCatalog.items.label.validation',
44221
+ children: [{
44222
+ headerName: 'backoffice.idmCatalog.general.label.validFromDate',
44223
+ field: 'validFromDate',
44224
+ cellDataType: 'dateString',
44225
+ customParams: {
44226
+ dateFormat: 'DD.MM.YYYY'
44227
+ }
44228
+ }, {
44229
+ headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
44230
+ field: 'validUntilDate',
44231
+ cellDataType: 'dateString',
44232
+ customParams: {
44233
+ dateFormat: 'DD.MM.YYYY'
44234
+ }
44235
+ }]
44236
+ }, {
44237
+ headerName: 'backoffice.idmCatalog.options.label.material',
44238
+ children: [{
44239
+ headerName: 'backoffice.idmCatalog.options.label.materialNo',
44240
+ field: 'materialNo',
44241
+ editable: false
44242
+ }, {
44243
+ headerName: 'backoffice.idmCatalog.options.label.materialColorR',
44244
+ field: 'materialColorR',
44245
+ cellDataType: 'number'
44246
+ }, {
44247
+ headerName: 'backoffice.idmCatalog.options.label.materialColorG',
44248
+ field: 'materialColorG',
44249
+ cellDataType: 'number'
44250
+ }, {
44251
+ headerName: 'backoffice.idmCatalog.options.label.materialColorB',
44252
+ field: 'materialColorB',
44253
+ cellDataType: 'number'
44254
+ }]
44255
+ }, {
44256
+ headerName: 'backoffice.idmCatalog.options.label.measurement',
44257
+ children: [{
44258
+ headerName: 'backoffice.idmCatalog.options.label.measureNo',
44259
+ field: 'measureNo',
44260
+ cellDataType: 'number',
44261
+ editable: false
44262
+ }, {
44263
+ headerName: 'backoffice.idmCatalog.options.label.measureValue',
44264
+ field: 'measureValue',
44265
+ cellDataType: 'number'
44266
+ }, {
44267
+ headerName: 'backoffice.idmCatalog.options.label.measureUnit',
44268
+ field: 'measureUnit'
44269
+ }]
44270
+ }, {
44271
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
44272
+ field: 'lastUpdatedDate',
44273
+ cellDataType: 'dateString',
44274
+ editable: false
44275
+ }, {
44276
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
44277
+ field: 'createdDate',
44278
+ cellDataType: 'dateString',
44279
+ editable: false
44280
+ }, {
44281
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
44282
+ field: 'createdByDisplayText',
44283
+ editable: false
44284
+ }, {
44285
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
44286
+ field: 'lastUpdatedByDisplayText',
44287
+ editable: false
44288
+ }, {
44289
+ headerName: 'backoffice.idmCatalog.general.label._id',
44290
+ field: '_id',
44291
+ editable: false,
44292
+ cellDataType: 'objectId'
44293
+ }, {
44294
+ field: 'organizationId',
44295
+ editable: false,
44296
+ hide: true,
44297
+ lockVisible: true,
44298
+ suppressColumnsToolPanel: true,
44299
+ defaultValue: '${organizationId}'
44300
+ }]
44301
+ };
44302
+ }, []);
44303
+ return /*#__PURE__*/jsx(Spreadsheet, {
44304
+ gridId: 'crud-grid_global_features',
44305
+ applicationData: applicationData,
44306
+ configuration: configuration
44307
+ }, 'features');
44308
+ }
44309
+
44310
+ var TableOptions = observer(function () {
44311
+ var _useTranslation = useTranslation(),
44312
+ t = _useTranslation.t;
44313
+ return /*#__PURE__*/jsxs(Fragment, {
44314
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
44315
+ title: /*#__PURE__*/jsx("div", {
44316
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions')
44317
+ })
44318
+ }), /*#__PURE__*/jsx(Options, {})]
44319
+ });
44320
+ });
44321
+
44322
+ function IDMOrganizationOptionsEditor(_ref) {
43850
44323
  _objectDestructuringEmpty(_ref);
43851
44324
  return /*#__PURE__*/jsx("div", {
43852
44325
  style: {
@@ -43862,7 +44335,7 @@ function Content$2() {
43862
44335
  children: /*#__PURE__*/jsx(Route, {
43863
44336
  index: true,
43864
44337
  path: "",
43865
- element: /*#__PURE__*/jsx(TableFeatures, {})
44338
+ element: /*#__PURE__*/jsx(TableOptions, {})
43866
44339
  })
43867
44340
  });
43868
44341
  }
@@ -44424,6 +44897,12 @@ var ContentCard = observer(function (_ref3) {
44424
44897
  }, configId), configuration.type == 'IDMFeaturesEditor' && /*#__PURE__*/jsx(IDMFeaturesEditor, {
44425
44898
  configuration: configuration,
44426
44899
  id: configId
44900
+ }, configId), configuration.type == 'IDMOrganizationFeaturesEditor' && /*#__PURE__*/jsx(IDMOrganizationFeaturesEditor, {
44901
+ configuration: configuration,
44902
+ id: configId
44903
+ }, configId), configuration.type == 'IDMOrganizationOptionsEditor' && /*#__PURE__*/jsx(IDMOrganizationOptionsEditor, {
44904
+ configuration: configuration,
44905
+ id: configId
44427
44906
  }, configId), configuration.type == 'MediaTable' && /*#__PURE__*/jsx(MediaTable, {
44428
44907
  configuration: configuration,
44429
44908
  id: configId
@@ -45043,13 +45522,15 @@ var ArticleSelection$1 = observer(ArticleSelection);
45043
45522
  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; }
45044
45523
  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; }
45045
45524
  function useWysiwyg$1(_ref) {
45046
- var _tool$parameters;
45525
+ var _tool$parameters, _tool$elementProps5;
45047
45526
  var tool = _ref.tool,
45048
45527
  toolbar = _ref.toolbar;
45049
45528
  var _useDivaCore = useDivaCore(),
45050
45529
  _useDivaCore$actions = _useDivaCore.actions,
45051
45530
  subscribeEvents = _useDivaCore$actions.subscribeEvents,
45052
45531
  unSubscribeEvents = _useDivaCore$actions.unSubscribeEvents;
45532
+ var _useTranslation = useTranslation(),
45533
+ t = _useTranslation.t;
45053
45534
  var root = useStore();
45054
45535
  var _useState = useState(false),
45055
45536
  _useState2 = _slicedToArray(_useState, 2),
@@ -45061,34 +45542,54 @@ function useWysiwyg$1(_ref) {
45061
45542
  setMask = _useState4[1];
45062
45543
  var _useState5 = useState(),
45063
45544
  _useState6 = _slicedToArray(_useState5, 2),
45064
- articleCodex = _useState6[0],
45065
- setArticleCodex = _useState6[1];
45066
- var _useState7 = useState([]),
45545
+ loadingText = _useState6[0],
45546
+ setLoadingText = _useState6[1];
45547
+ var _useState7 = useState(false),
45067
45548
  _useState8 = _slicedToArray(_useState7, 2),
45068
- itemList = _useState8[0],
45069
- setItemList = _useState8[1];
45070
- var _useState9 = useState({
45071
- catalogCodex: (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.catalogCodex
45072
- }),
45549
+ isLoadingMask = _useState8[0],
45550
+ setLoadingMask = _useState8[1];
45551
+ var _useState9 = useState(false),
45073
45552
  _useState10 = _slicedToArray(_useState9, 2),
45074
- serie = _useState10[0],
45075
- setSerie = _useState10[1];
45076
- var _useState11 = useState([]),
45553
+ isLoadingCatalog = _useState10[0],
45554
+ setLoadingCatalog = _useState10[1];
45555
+ var _useState11 = useState(false),
45077
45556
  _useState12 = _slicedToArray(_useState11, 2),
45078
- serieList = _useState12[0],
45079
- setSerieList = _useState12[1];
45080
- var _useState13 = useState(tool.parameters.catalogId),
45557
+ isLoadingPackage = _useState12[0],
45558
+ setLoadingPackage = _useState12[1];
45559
+ var _useState13 = useState(false),
45081
45560
  _useState14 = _slicedToArray(_useState13, 2),
45082
- catalogId = _useState14[0],
45083
- setCatalogId = _useState14[1];
45561
+ isLoadingArticles = _useState14[0],
45562
+ setLoadingArticles = _useState14[1];
45084
45563
  var _useState15 = useState(),
45085
45564
  _useState16 = _slicedToArray(_useState15, 2),
45086
- currentNav = _useState16[0],
45087
- setCurrentNav = _useState16[1];
45088
- var _useState17 = useState(),
45565
+ articleCodex = _useState16[0],
45566
+ setArticleCodex = _useState16[1];
45567
+ var _useState17 = useState([]),
45089
45568
  _useState18 = _slicedToArray(_useState17, 2),
45090
- doNavigate = _useState18[0],
45091
- setDoNavigate = _useState18[1];
45569
+ itemList = _useState18[0],
45570
+ setItemList = _useState18[1];
45571
+ var _useState19 = useState({
45572
+ catalogCodex: (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.catalogCodex
45573
+ }),
45574
+ _useState20 = _slicedToArray(_useState19, 2),
45575
+ serie = _useState20[0],
45576
+ setSerie = _useState20[1];
45577
+ var _useState21 = useState([]),
45578
+ _useState22 = _slicedToArray(_useState21, 2),
45579
+ serieList = _useState22[0],
45580
+ setSerieList = _useState22[1];
45581
+ var _useState23 = useState(tool.parameters.catalogId),
45582
+ _useState24 = _slicedToArray(_useState23, 2),
45583
+ catalogId = _useState24[0],
45584
+ setCatalogId = _useState24[1];
45585
+ var _useState25 = useState(),
45586
+ _useState26 = _slicedToArray(_useState25, 2),
45587
+ currentNav = _useState26[0],
45588
+ setCurrentNav = _useState26[1];
45589
+ var _useState27 = useState(),
45590
+ _useState28 = _slicedToArray(_useState27, 2),
45591
+ doNavigate = _useState28[0],
45592
+ setDoNavigate = _useState28[1];
45092
45593
  useEffect(function () {
45093
45594
  if (!toolbar.hidden) setDoReset(true);
45094
45595
  }, [toolbar.hidden]);
@@ -45216,26 +45717,36 @@ function useWysiwyg$1(_ref) {
45216
45717
  };
45217
45718
  }();
45218
45719
  useEffect(function () {
45720
+ var _tool$elementProps;
45721
+ if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.onlyPlaceholder) return;
45219
45722
  if (doReset) {
45220
- var _tool$elementProps, _tool$elementProps3;
45723
+ var _tool$elementProps2, _tool$elementProps4;
45221
45724
  if (currentNav) setDoNavigate(currentNav);
45222
- if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.showCatalogSelection && !serieList.length) {
45223
- var _tool$elementProps2;
45224
- if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.loadPackage) {
45225
- loadPackage(tool.parameters.packageId);
45725
+ if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.showCatalogSelection && !serieList.length) {
45726
+ var _tool$elementProps3;
45727
+ if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.loadPackage) {
45728
+ setLoadingPackage(true);
45729
+ loadPackage(tool.parameters.packageId).then(function () {
45730
+ return setLoadingPackage(false);
45731
+ });
45226
45732
  } else {
45227
- loadCatalogs(tool.elementProps.catalogId);
45733
+ setLoadingCatalog(true);
45734
+ loadCatalogs(tool.elementProps.catalogId).then(function () {
45735
+ return setLoadingCatalog(false);
45736
+ });
45228
45737
  }
45229
45738
  }
45230
- if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.loadMask) {
45739
+ if ((_tool$elementProps4 = tool.elementProps) !== null && _tool$elementProps4 !== void 0 && _tool$elementProps4.loadMask) {
45740
+ setLoadingMask(true);
45231
45741
  loadMask(tool.parameters.packageId).then(function () {
45232
- return setDoReset(false);
45742
+ setLoadingMask(false);
45743
+ setDoReset(false);
45233
45744
  });
45234
45745
  } else {
45235
45746
  setDoReset(false);
45236
45747
  }
45237
45748
  }
45238
- }, [doReset]);
45749
+ }, [doReset, (_tool$elementProps5 = tool.elementProps) === null || _tool$elementProps5 === void 0 ? void 0 : _tool$elementProps5.onlyPlaceholder]);
45239
45750
  useEffect(function () {
45240
45751
  setArticleCodex(undefined);
45241
45752
  if (serie !== null && serie !== void 0 && serie.catalogCodex) {
@@ -45251,6 +45762,7 @@ function useWysiwyg$1(_ref) {
45251
45762
  setArticleCodex(undefined);
45252
45763
  setSerie(undefined);
45253
45764
  setItemList([]);
45765
+ setLoadingArticles(true);
45254
45766
  setSerieList([]);
45255
45767
  }, [tool.parameters.catalogId, tool.parameters.packageId]);
45256
45768
  var onEventCalled = /*#__PURE__*/function () {
@@ -45273,6 +45785,7 @@ function useWysiwyg$1(_ref) {
45273
45785
  });
45274
45786
  }
45275
45787
  setItemList(articles);
45788
+ setLoadingArticles(false);
45276
45789
  if (articleCodex === undefined && articles !== null && articles !== void 0 && (_articles$ = articles[0]) !== null && _articles$ !== void 0 && _articles$.value) setArticleCodex(articles[0].value);
45277
45790
  }
45278
45791
  if (e.type === 'navigatedToOption') {
@@ -45295,7 +45808,7 @@ function useWysiwyg$1(_ref) {
45295
45808
  };
45296
45809
  }, [articleCodex]);
45297
45810
  var settings = useMemo(function () {
45298
- var _tool$elementProps4, _tool$elementProps5, _tool$elementProps6;
45811
+ var _tool$elementProps6, _tool$elementProps7, _tool$elementProps8;
45299
45812
  return {
45300
45813
  language: 'DE',
45301
45814
  showSelectionModeZero: true,
@@ -45352,9 +45865,9 @@ function useWysiwyg$1(_ref) {
45352
45865
  tooltipPosition: 'left-center',
45353
45866
  clientEvents: ['onWebPlanerConfigChange', 'onArticlesLoaded']
45354
45867
  },
45355
- useIDMService: (_tool$elementProps4 = tool.elementProps) === null || _tool$elementProps4 === void 0 ? void 0 : _tool$elementProps4.useIDMService,
45356
- useEnricherService: (_tool$elementProps5 = tool.elementProps) === null || _tool$elementProps5 === void 0 ? void 0 : _tool$elementProps5.useEnricherService,
45357
- useMask: (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.loadMask,
45868
+ useIDMService: (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.useIDMService,
45869
+ useEnricherService: (_tool$elementProps7 = tool.elementProps) === null || _tool$elementProps7 === void 0 ? void 0 : _tool$elementProps7.useEnricherService,
45870
+ useMask: (_tool$elementProps8 = tool.elementProps) === null || _tool$elementProps8 === void 0 ? void 0 : _tool$elementProps8.loadMask,
45358
45871
  templateConfig: {
45359
45872
  Layout: 'wysiwyg',
45360
45873
  NavigationButton: 'standard',
@@ -45375,6 +45888,19 @@ function useWysiwyg$1(_ref) {
45375
45888
  }
45376
45889
  };
45377
45890
  }, []);
45891
+ useEffect(function () {
45892
+ if (isLoadingPackage) {
45893
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.package'));
45894
+ } else if (isLoadingCatalog) {
45895
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.catalog'));
45896
+ } else if (isLoadingMask) {
45897
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.mask'));
45898
+ } else if (isLoadingArticles) {
45899
+ setLoadingText(t('backoffice.wysiwyg.configurator.loading.articles'));
45900
+ } else {
45901
+ setLoadingText(undefined);
45902
+ }
45903
+ }, [isLoadingPackage, isLoadingCatalog, isLoadingMask, isLoadingArticles]);
45378
45904
  return {
45379
45905
  itemList: itemList,
45380
45906
  setItemList: setItemList,
@@ -45390,7 +45916,8 @@ function useWysiwyg$1(_ref) {
45390
45916
  setDoReset: setDoReset,
45391
45917
  doNavigate: doNavigate,
45392
45918
  setDoNavigate: setDoNavigate,
45393
- catalogId: catalogId
45919
+ catalogId: catalogId,
45920
+ loadingText: loadingText
45394
45921
  };
45395
45922
  }
45396
45923
 
@@ -45508,6 +46035,7 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45508
46035
  }
45509
46036
  }, [tool.parameters]);
45510
46037
  useEffect(function () {
46038
+ if (tool.elementProps.onlyPlaceholder) return;
45511
46039
  if (tool.elementProps.initSerie) {
45512
46040
  if (tool.elementProps.useEnricherService) {
45513
46041
  var _state$serieList$find;
@@ -45542,6 +46070,9 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45542
46070
  });
45543
46071
  }
45544
46072
  }
46073
+ if (tool.elementProps.onlyPlaceholder) {
46074
+ return /*#__PURE__*/jsx("div", {});
46075
+ }
45545
46076
  if (state !== null && state !== void 0 && state.mask) {
45546
46077
  var _state$mask;
45547
46078
  if (!((_state$mask = state.mask) !== null && _state$mask !== void 0 && _state$mask.catalogCodex) || !state.mask.accountId) return /*#__PURE__*/jsx(Fragment, {
@@ -45552,14 +46083,18 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45552
46083
  errorCode: "BACKO_0004",
45553
46084
  children: /*#__PURE__*/jsxs("div", {
45554
46085
  className: wrapper$2,
45555
- children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
45556
- state: state,
45557
- setSerie: tool.elementProps.setSerie
45558
- }), /*#__PURE__*/jsx(ArticleSelection$1, {
45559
- state: state,
45560
- setArticle: tool.elementProps.setArticle
46086
+ children: [!state.loadingText && /*#__PURE__*/jsxs(Fragment, {
46087
+ children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
46088
+ state: state,
46089
+ setSerie: tool.elementProps.setSerie
46090
+ }), /*#__PURE__*/jsx(ArticleSelection$1, {
46091
+ state: state,
46092
+ setArticle: tool.elementProps.setArticle
46093
+ })]
46094
+ }), state.loadingText && /*#__PURE__*/jsx("div", {
46095
+ children: state.loadingText
45561
46096
  }), state.mask && !state.doReset && /*#__PURE__*/jsx("div", {
45562
- hidden: !state.articleCodex,
46097
+ hidden: !state.articleCodex && !!state.loadingText,
45563
46098
  className: confContainer,
45564
46099
  children: /*#__PURE__*/jsx(WebPlannerReact, {
45565
46100
  settings: state.settings,
@@ -45589,7 +46124,7 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45589
46124
  }
45590
46125
  }
45591
46126
  },
45592
- isVisible: !!state.articleCodex
46127
+ isVisible: !!state.articleCodex && !state.loadingText
45593
46128
  }, state.articleCodex)
45594
46129
  })]
45595
46130
  })