@crystaldesign/diva-backoffice 25.14.0-beta.5 → 25.14.0-beta.50

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 (45) hide show
  1. package/build/esm/index.js +766 -240
  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/ArticleSelection/index.d.ts +1 -1
  6. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts.map +1 -1
  7. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts.map +1 -1
  8. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts +4 -1
  9. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts.map +1 -1
  10. package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
  11. package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts +17 -7
  12. package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts.map +1 -1
  13. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionCombinations/index.d.ts.map +1 -1
  14. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionGroupOptions.d.ts.map +1 -1
  15. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PartlistPos.d.ts.map +1 -1
  16. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts.map +1 -1
  17. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts.map +1 -1
  18. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts.map +1 -1
  19. package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/CollectionMembers.d.ts.map +1 -1
  20. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
  21. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableProperties/index.d.ts.map +1 -1
  22. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts +5 -0
  23. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts.map +1 -0
  24. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts +9 -0
  25. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts.map +1 -0
  26. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts +5 -0
  27. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts.map +1 -0
  28. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts +5 -0
  29. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts.map +1 -0
  30. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts +6 -0
  31. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts.map +1 -0
  32. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts +5 -0
  33. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts.map +1 -0
  34. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts +9 -0
  35. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts.map +1 -0
  36. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts +5 -0
  37. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts.map +1 -0
  38. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts +5 -0
  39. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts.map +1 -0
  40. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts +6 -0
  41. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts.map +1 -0
  42. package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
  43. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/MediaViewerCell/index.d.ts.map +1 -1
  44. package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
  45. 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: [{
@@ -5271,12 +5271,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
5271
5271
  sorter: 2,
5272
5272
  filter: 'advanced',
5273
5273
  align: 'center'
5274
- }, {
5275
- title: t('backoffice.table.mediastorage.columns.title.cacheFolderName'),
5276
- field: 'cacheFolderName',
5277
- sorter: 3,
5278
- filter: 'advanced',
5279
- align: 'center'
5280
5274
  }, {
5281
5275
  title: t('backoffice.table.mediastorage.columns.title.publicUrl'),
5282
5276
  field: 'publicUrl',
@@ -5308,10 +5302,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
5308
5302
  title: t('backoffice.table.mediastorage.columns.title.pathNumLevels'),
5309
5303
  field: 'pathNumLevels',
5310
5304
  hidden: true
5311
- }, {
5312
- title: t('backoffice.table.mediastorage.columns.title.cacheFolderName'),
5313
- field: 'cacheFolderName',
5314
- hidden: true
5315
5305
  }, {
5316
5306
  title: t('backoffice.table.mediastorage.columns.title.s3Bucket'),
5317
5307
  field: 's3Bucket',
@@ -5424,9 +5414,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
5424
5414
  }, {
5425
5415
  targetField: 'pathNumLevels',
5426
5416
  sourceField: 'pathNumLevels'
5427
- }, {
5428
- targetField: 'cacheFolderName',
5429
- sourceField: 'cacheFolderName'
5430
5417
  }, {
5431
5418
  targetField: 's3Bucket',
5432
5419
  sourceField: 's3Bucket'
@@ -7353,9 +7340,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
7353
7340
  label: t('backoffice.form.updatemediastorage.items.pathNumLevels'),
7354
7341
  name: 'pathNumLevels',
7355
7342
  type: 'number'
7356
- }, {
7357
- label: t('backoffice.form.updatemediastorage.items.cacheFolderName'),
7358
- name: 'cacheFolderName'
7359
7343
  }, {
7360
7344
  label: t('backoffice.form.updatemediastorage.items.s3Bucket'),
7361
7345
  name: 's3Bucket'
@@ -7414,9 +7398,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
7414
7398
  label: t('backoffice.form.createmediastorage.items.pathNumLevels'),
7415
7399
  name: 'pathNumLevels',
7416
7400
  type: 'number'
7417
- }, {
7418
- label: t('backoffice.form.createmediastorage.items.cacheFolderName'),
7419
- name: 'cacheFolderName'
7420
7401
  }, {
7421
7402
  label: t('backoffice.form.createmediastorage.items.s3Bucket'),
7422
7403
  name: 's3Bucket'
@@ -7874,7 +7855,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
7874
7855
  allowedTypes: ['image/*'],
7875
7856
  mediaItemRefField: 'mediaItemRefPreviewImage',
7876
7857
  urlField: 'previewImage',
7877
- functionType: 'CAT'
7858
+ functionType: 'RPI'
7878
7859
  }, {
7879
7860
  name: 'isGlobal',
7880
7861
  label: t('backoffice.table.prompts.columns.isGlobal'),
@@ -7967,7 +7948,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
7967
7948
  allowedTypes: ['image/*'],
7968
7949
  mediaItemRefField: 'mediaItemRefPreviewImage',
7969
7950
  urlField: 'previewImage',
7970
- functionType: 'CAT',
7951
+ functionType: 'RPI',
7971
7952
  readonly: true
7972
7953
  }, {
7973
7954
  name: 'isGlobal',
@@ -9081,6 +9062,16 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9081
9062
  onSave: function onSave(data) {
9082
9063
  return data;
9083
9064
  }
9065
+ }, {
9066
+ name: ['settings', 'makeApiKey'],
9067
+ label: t('backoffice.form.organizationdetails.items.settings.makeApiKey'),
9068
+ permission: 'backoffice_admin_organizations',
9069
+ type: 'input'
9070
+ }, {
9071
+ name: ['settings', 'leadTableApiKey'],
9072
+ label: t('backoffice.form.organizationdetails.items.settings.leadTableApiKey'),
9073
+ permission: 'backoffice_admin_organizations',
9074
+ type: 'input'
9084
9075
  }, {
9085
9076
  type: 'subTitle',
9086
9077
  name: t('backoffice.form.organizationdetails.socialUrls'),
@@ -9215,14 +9206,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9215
9206
  label: t('backoffice.form.organizationdetails.items.settings.externalContactUrl'),
9216
9207
  tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
9217
9208
  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
9209
  }, {
9227
9210
  name: ['settings', 'aiSettings', 'monthlyOrgRenderingLimit'],
9228
9211
  label: t('backoffice.form.organizationdetails.items.ai.monthlyOrgRenderingLimit'),
@@ -9230,7 +9213,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9230
9213
  permission: 'backoffice_admin_organizations',
9231
9214
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9232
9215
  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';
9216
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9234
9217
  },
9235
9218
  disabled: function disabled(data) {
9236
9219
  var _data$settings;
@@ -9296,7 +9279,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9296
9279
  permission: 'backoffice_admin_organizations',
9297
9280
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9298
9281
  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';
9282
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9300
9283
  },
9301
9284
  disabled: function disabled(data) {
9302
9285
  var _data$settings2;
@@ -9310,7 +9293,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9310
9293
  permission: 'backoffice_admin_organizations',
9311
9294
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9312
9295
  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';
9296
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9314
9297
  },
9315
9298
  disabled: function disabled(data) {
9316
9299
  var _data$settings3;
@@ -9324,7 +9307,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9324
9307
  permission: 'backoffice_admin_organizations',
9325
9308
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9326
9309
  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';
9310
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9328
9311
  },
9329
9312
  disabled: function disabled(data) {
9330
9313
  var _data$settings4;
@@ -9338,7 +9321,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9338
9321
  permission: 'backoffice_admin_organizations',
9339
9322
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9340
9323
  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';
9324
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9342
9325
  },
9343
9326
  disabled: function disabled(data) {
9344
9327
  var _data$settings5;
@@ -9352,7 +9335,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9352
9335
  permission: 'backoffice_admin_organizations',
9353
9336
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9354
9337
  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';
9338
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9356
9339
  },
9357
9340
  disabled: function disabled(data) {
9358
9341
  var _data$settings6;
@@ -9366,7 +9349,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9366
9349
  permission: 'backoffice_admin_organizations',
9367
9350
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9368
9351
  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';
9352
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9370
9353
  },
9371
9354
  helpText: 'anonymous enduser limit'
9372
9355
  }, {
@@ -9376,7 +9359,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9376
9359
  permission: 'backoffice_admin_organizations',
9377
9360
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9378
9361
  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';
9362
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9380
9363
  },
9381
9364
  helpText: 'logged in enduser limit'
9382
9365
  }, {
@@ -9386,7 +9369,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9386
9369
  permission: 'backoffice_admin_organizations',
9387
9370
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9388
9371
  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';
9372
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9390
9373
  }
9391
9374
  }, {
9392
9375
  name: ['settings', 'aiSettings', 'noLimit'],
@@ -9396,7 +9379,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9396
9379
  tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9397
9380
  defaultValue: false,
9398
9381
  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';
9382
+ return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
9400
9383
  }
9401
9384
  },
9402
9385
  // Theme Configuration
@@ -9640,7 +9623,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9640
9623
  mediaItemRefField: 'mediaItemRefImage',
9641
9624
  urlField: 'image',
9642
9625
  label: t('backoffice.form.api2servers.items.url'),
9643
- functionType: 'CAT',
9626
+ functionType: 'CI_INF',
9644
9627
  hidden: function hidden(d) {
9645
9628
  return (d === null || d === void 0 ? void 0 : d.type) !== 'Image' && d !== undefined;
9646
9629
  },
@@ -9661,7 +9644,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9661
9644
  mediaItemRefField: 'mediaItemRefVideo',
9662
9645
  urlField: 'video',
9663
9646
  label: t('backoffice.form.api2servers.items.url'),
9664
- functionType: 'INF',
9647
+ functionType: 'CI_INF',
9665
9648
  hidden: function hidden(d) {
9666
9649
  return (d === null || d === void 0 ? void 0 : d.type) !== 'Video';
9667
9650
  },
@@ -10323,9 +10306,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
10323
10306
  }, {
10324
10307
  value: '3DEXPORT',
10325
10308
  label: '3DEXPORT'
10326
- }, {
10327
- value: 'SPIN',
10328
- label: 'SPIN'
10329
10309
  }, {
10330
10310
  value: 'AR',
10331
10311
  label: 'AR'
@@ -10530,13 +10510,13 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
10530
10510
  label: t('backoffice.form.renderjob.itemSelector'),
10531
10511
  mode: 'single',
10532
10512
  type: 'select',
10533
- values: ['HQ', 'AR', 'MASTER', '3DEXPORT', 'SPIN', 'CUTOUT'],
10513
+ values: ['HQ', 'AR', 'MASTER', '3DEXPORT', 'CUTOUT'],
10534
10514
  readonly: {
10535
10515
  field: 'state',
10536
10516
  op: 'gt',
10537
10517
  value: 3
10538
10518
  },
10539
- placeholder: 'z.B.: HQ, AR, SPIN'
10519
+ placeholder: 'z.B.: HQ, AR'
10540
10520
  },
10541
10521
  items: [[{
10542
10522
  name: '_id',
@@ -13414,6 +13394,14 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
13414
13394
  create: '${adminService}/cache/invalidate'
13415
13395
  }
13416
13396
  },
13397
+ ButtonAiServiceCache: {
13398
+ type: 'CustomButton',
13399
+ text: t('backoffice.ButtonAnalyticsServiceCache'),
13400
+ resetAfterTime: 3,
13401
+ apiInterface: {
13402
+ create: '${aiService}/cache/invalidate'
13403
+ }
13404
+ },
13417
13405
  ButtonAnalyticsServiceCache: {
13418
13406
  type: 'CustomButton',
13419
13407
  text: t('backoffice.ButtonAnalyticsServiceCache'),
@@ -13526,6 +13514,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
13526
13514
  isTitle: true,
13527
13515
  text: 'Admin Service'
13528
13516
  },
13517
+ LabelAiService: {
13518
+ type: 'CustomText',
13519
+ isTitle: true,
13520
+ text: 'Ai Service'
13521
+ },
13529
13522
  LabelAnalyticsService: {
13530
13523
  type: 'CustomText',
13531
13524
  isTitle: true,
@@ -14054,6 +14047,15 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
14054
14047
  id: 'ButtonAdminServiceCache',
14055
14048
  type: 'CustomButton'
14056
14049
  }]
14050
+ }, {
14051
+ type: 'SideBySide',
14052
+ items: [{
14053
+ id: 'LabelAiService',
14054
+ type: 'CustomText'
14055
+ }, {
14056
+ id: 'ButtonAiServiceCache',
14057
+ type: 'CustomButton'
14058
+ }]
14057
14059
  }, {
14058
14060
  type: 'SideBySide',
14059
14061
  items: [{
@@ -14172,12 +14174,18 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
14172
14174
  IDMFeaturesEditor: {
14173
14175
  type: 'IDMFeaturesEditor'
14174
14176
  },
14177
+ IDMOrganizationFeaturesEditor: {
14178
+ type: 'IDMOrganizationFeaturesEditor'
14179
+ },
14180
+ IDMOrganizationOptionsEditor: {
14181
+ type: 'IDMOrganizationOptionsEditor'
14182
+ },
14175
14183
  MediaTable: {
14176
14184
  type: 'MediaTable'
14177
14185
  }
14178
14186
  };
14179
14187
  }
14180
- var functionTypeValues = ['PROD', 'PROD_SEC', 'PROD_CLOSE', 'PROD_MILIEU', 'SHO', 'CONFIG_INFO', 'AR_INFO', 'PROD_DETAIL', 'CAT', 'PLN', 'LOG', 'FUNC', 'COMMERCIAL', 'TPL', 'ASI', 'PLT', 'CAI', 'BAN', 'INF', 'OTH', 'ART', 'OPV'];
14188
+ var functionTypeValues = ['PROD', 'PROD_MILIEU', 'PROD_DETAIL', 'SHO', 'AR_INFO', 'ART', 'LOG', 'BAN', 'INF', 'OTH'];
14181
14189
 
14182
14190
  function styleInject(css, ref) {
14183
14191
  if ( ref === void 0 ) ref = {};
@@ -15312,6 +15320,20 @@ var menu = [{
15312
15320
  permission: 'idm_global_features',
15313
15321
  icon: 'HistoryOutlined',
15314
15322
  haSubRoutes: false
15323
+ }, {
15324
+ id: 'IDMOrganizationFeaturesEditor',
15325
+ path: 'organizationfeatures',
15326
+ label: 'backoffice.menu.items.label.IDMOrganizationFeatures',
15327
+ permission: 'idm_catalogs',
15328
+ icon: 'HistoryOutlined',
15329
+ haSubRoutes: false
15330
+ }, {
15331
+ id: 'IDMOrganizationOptionsEditor',
15332
+ path: 'organizationoptions',
15333
+ label: 'backoffice.menu.items.label.IDMOrganizationOptions',
15334
+ permission: 'idm_catalogs',
15335
+ icon: 'HistoryOutlined',
15336
+ haSubRoutes: false
15315
15337
  }, {
15316
15338
  id: 'IDMCatalogEditor',
15317
15339
  path: 'catalogs',
@@ -18498,6 +18520,19 @@ function useSelectSimpleData (_ref) {
18498
18520
  });
18499
18521
  return selected.value;
18500
18522
  }, [selected]);
18523
+
18524
+ //initialize the selected value if it is not set yet and handle race condition between value and options
18525
+ useEffect(function () {
18526
+ if (value && options && selected == undefined) {
18527
+ var sel = findByValue(value, options, selectMapping);
18528
+ if (sel) {
18529
+ var selectedValues = Array.isArray(sel) ? sel.map(function (item) {
18530
+ return item.value;
18531
+ }) : sel.value;
18532
+ onSelectionChanged(selectedValues, sel);
18533
+ }
18534
+ }
18535
+ }, [value, options]);
18501
18536
  var setLoadedOptions = function setLoadedOptions(options) {
18502
18537
  var _options$;
18503
18538
  setOptions(options);
@@ -27366,16 +27401,27 @@ var TableWrapper = function TableWrapper(_ref) {
27366
27401
  return sel == dt._id;
27367
27402
  });
27368
27403
  });
27369
- if (!data || data.length == 0) {
27404
+ // Ensure each data row exposes catalogItem for rule evaluation
27405
+ if (data && data.length > 0) {
27406
+ data = data.map(function (dt) {
27407
+ var _ref2, _dt$catalogItem;
27408
+ return _objectSpread$G(_objectSpread$G({}, dt), {}, {
27409
+ catalogItem: (_ref2 = (_dt$catalogItem = dt.catalogItem) !== null && _dt$catalogItem !== void 0 ? _dt$catalogItem : state.catalogItem) !== null && _ref2 !== void 0 ? _ref2 : null
27410
+ });
27411
+ });
27412
+ } else {
27413
+ var _state$catalogItem;
27414
+ // Normalize empty selection
27370
27415
  data = [{
27371
- catalogItem: state.catalogItem
27416
+ catalogItem: (_state$catalogItem = state.catalogItem) !== null && _state$catalogItem !== void 0 ? _state$catalogItem : null
27372
27417
  }];
27373
27418
  }
27374
- return !aplyRules({
27419
+ var ruleResult = aplyRules({
27375
27420
  data: data,
27376
27421
  rootStore: root,
27377
27422
  rules: action.rule
27378
27423
  });
27424
+ return !ruleResult.applied;
27379
27425
  }
27380
27426
  function checkPermission(permission) {
27381
27427
  if (!permission) return true;
@@ -27423,17 +27469,17 @@ var TableWrapper = function TableWrapper(_ref) {
27423
27469
  icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
27424
27470
  size: "middle",
27425
27471
  onClick: function onClick() {
27426
- var _state$catalogItem, _state$catalogItem2, _state$catalogItem3;
27472
+ var _state$catalogItem2, _state$catalogItem3, _state$catalogItem4;
27427
27473
  var selectedData = state.data.filter(function (dt) {
27428
27474
  return state.selected.includes(dt._id);
27429
27475
  });
27430
27476
  root.downloadStore.openDownload({
27431
27477
  data: selectedData.length ? selectedData : state.mappingData,
27432
27478
  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,
27479
+ catalogCodex: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.codex,
27480
+ dealerId: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.dealerId,
27435
27481
  currentUrl: state.currentFetchUrl,
27436
- sessionGuid: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.sessionGuid
27482
+ sessionGuid: (_state$catalogItem4 = state.catalogItem) === null || _state$catalogItem4 === void 0 ? void 0 : _state$catalogItem4.sessionGuid
27437
27483
  });
27438
27484
  },
27439
27485
  children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : t('backoffice.basetable.download')
@@ -27619,17 +27665,17 @@ var TableWrapper = function TableWrapper(_ref) {
27619
27665
  });
27620
27666
  };
27621
27667
  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;
27668
+ function DeleteButton(_ref3) {
27669
+ var _ref3$selected = _ref3.selected,
27670
+ selected = _ref3$selected === void 0 ? [] : _ref3$selected,
27671
+ total = _ref3.total,
27672
+ _ref3$min = _ref3.min,
27673
+ min = _ref3$min === void 0 ? 0 : _ref3$min,
27674
+ deleting = _ref3.deleting,
27675
+ onDelete = _ref3.onDelete,
27676
+ disabled = _ref3.disabled,
27677
+ label = _ref3.label,
27678
+ labelDialog = _ref3.labelDialog;
27633
27679
  var _useTranslation2 = useTranslation(),
27634
27680
  t = _useTranslation2.t;
27635
27681
  var hasSelected = (selected === null || selected === void 0 ? void 0 : selected.length) > 0;
@@ -27657,16 +27703,16 @@ function DeleteButton(_ref2) {
27657
27703
  })
27658
27704
  });
27659
27705
  }
27660
- function CopyButton(_ref3) {
27706
+ function CopyButton(_ref4) {
27661
27707
  var _state$configuration$24;
27662
- var state = _ref3.state;
27708
+ var state = _ref4.state;
27663
27709
  var root = useStore();
27664
27710
  new _default$d({
27665
27711
  apiInterface: state.configuration.apiInterface,
27666
27712
  type: 'Table'
27667
27713
  }, root);
27668
27714
  var onCopy = /*#__PURE__*/function () {
27669
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
27715
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
27670
27716
  var _state$configuration$21;
27671
27717
  var copyAction, _iterator3, _step3, selectedRow;
27672
27718
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -27703,11 +27749,11 @@ function CopyButton(_ref3) {
27703
27749
  }, _callee);
27704
27750
  }));
27705
27751
  return function onCopy() {
27706
- return _ref4.apply(this, arguments);
27752
+ return _ref5.apply(this, arguments);
27707
27753
  };
27708
27754
  }();
27709
27755
  var onCopyAction = /*#__PURE__*/function () {
27710
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
27756
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
27711
27757
  var _state$configuration$22, _state$configuration$23;
27712
27758
  var copyAction, id, data;
27713
27759
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -27768,7 +27814,7 @@ function CopyButton(_ref3) {
27768
27814
  }, _callee3);
27769
27815
  }));
27770
27816
  return function onCopyAction() {
27771
- return _ref5.apply(this, arguments);
27817
+ return _ref6.apply(this, arguments);
27772
27818
  };
27773
27819
  }();
27774
27820
  var _useTranslation3 = useTranslation(),
@@ -27780,11 +27826,11 @@ function CopyButton(_ref3) {
27780
27826
  children: t('backoffice.basetable.copy')
27781
27827
  });
27782
27828
  }
27783
- function BulkAction(_ref6) {
27829
+ function BulkAction(_ref7) {
27784
27830
  var _state$selected3;
27785
- var action = _ref6.action,
27786
- state = _ref6.state,
27787
- progressBar = _ref6.progressBar;
27831
+ var action = _ref7.action,
27832
+ state = _ref7.state,
27833
+ progressBar = _ref7.progressBar;
27788
27834
  var root = useStore();
27789
27835
  var _useTranslation4 = useTranslation(),
27790
27836
  t = _useTranslation4.t;
@@ -27869,7 +27915,7 @@ function BulkAction(_ref6) {
27869
27915
  return true;
27870
27916
  };
27871
27917
  var callback = /*#__PURE__*/function () {
27872
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(updatedData) {
27918
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(updatedData) {
27873
27919
  var _action$callback;
27874
27920
  var apiInterface, data, i, dataEntry;
27875
27921
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
@@ -27963,7 +28009,7 @@ function BulkAction(_ref6) {
27963
28009
  }, _callee4, null, [[2, 37]]);
27964
28010
  }));
27965
28011
  return function callback(_x2) {
27966
- return _ref7.apply(this, arguments);
28012
+ return _ref8.apply(this, arguments);
27967
28013
  };
27968
28014
  }();
27969
28015
  return /*#__PURE__*/jsx(Popover, {
@@ -27993,8 +28039,8 @@ function BulkAction(_ref6) {
27993
28039
  }, 'edit')
27994
28040
  });
27995
28041
  }
27996
- function SelectionText(_ref8) {
27997
- var selected = _ref8.selected;
28042
+ function SelectionText(_ref9) {
28043
+ var selected = _ref9.selected;
27998
28044
  var _useTranslation5 = useTranslation(),
27999
28045
  t = _useTranslation5.t;
28000
28046
  if (!(selected !== null && selected !== void 0 && selected.length)) {
@@ -32711,8 +32757,8 @@ function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t
32711
32757
  * Custom hook for managing tools and configurator functionality
32712
32758
  *
32713
32759
  * @param props - The hook props
32714
- * @param props.catalogId - Catalog ID for configurator tools
32715
- * @param props.packageId - Package ID for configurator tools
32760
+ * @param props.catalog - Catalog object for configurator tools
32761
+ * @param props.enricherPackage - Enricher package object for configurator tools
32716
32762
  * @param props.isApi2 - Whether to use API2 mode
32717
32763
  * @param props.mainInformationWindowCodex - Main information window codex
32718
32764
  * @param props.serie - Serie object for configurator tools
@@ -32726,8 +32772,8 @@ function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t
32726
32772
  * @returns {Function} removeSecondaryTables - Function to remove secondary tables
32727
32773
  */
32728
32774
  var useTools = function useTools(_ref) {
32729
- var catalogId = _ref.catalogId,
32730
- packageId = _ref.packageId,
32775
+ var catalog = _ref.catalog,
32776
+ enricherPackage = _ref.enricherPackage,
32731
32777
  isApi2 = _ref.isApi2,
32732
32778
  onlyPlaceholder = _ref.onlyPlaceholder,
32733
32779
  mainInformationWindowCodex = _ref.mainInformationWindowCodex,
@@ -32737,6 +32783,9 @@ var useTools = function useTools(_ref) {
32737
32783
  setArticle = _ref.setArticle,
32738
32784
  conditionalTools = _ref.conditionalTools;
32739
32785
  var root = useStore();
32786
+ var catalogId = catalog === null || catalog === void 0 ? void 0 : catalog._id;
32787
+ var packageId = enricherPackage === null || enricherPackage === void 0 ? void 0 : enricherPackage._id;
32788
+ var isoLanguageIds = (catalog === null || catalog === void 0 ? void 0 : catalog.isoLanguageIds) || (enricherPackage === null || enricherPackage === void 0 ? void 0 : enricherPackage.isoLanguageIds);
32740
32789
  var createTool = function createTool(tool) {
32741
32790
  return _objectSpread$o({
32742
32791
  startWidth: 600,
@@ -32765,6 +32814,12 @@ var useTools = function useTools(_ref) {
32765
32814
  }
32766
32815
  return undefined;
32767
32816
  }, [serie]);
32817
+ var initItem = useMemo(function () {
32818
+ if (item) {
32819
+ return item.typeNo;
32820
+ }
32821
+ return undefined;
32822
+ }, [item]);
32768
32823
  var createConfigurator = function createConfigurator() {
32769
32824
  var parameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
32770
32825
  return createTool({
@@ -32779,30 +32834,39 @@ var useTools = function useTools(_ref) {
32779
32834
  }, parameters),
32780
32835
  elementProps: onlyPlaceholder ? {
32781
32836
  onlyPlaceholder: true
32782
- } : catalogId ? _objectSpread$o({
32837
+ } : catalogId ? _objectSpread$o(_objectSpread$o(_objectSpread$o({
32783
32838
  // open configurator for idm catalog
32784
32839
  useIDMService: true,
32785
32840
  catalogId: catalogId,
32786
32841
  showCatalogSelection: true,
32787
- initItem: item === null || item === void 0 ? void 0 : item.typeNo,
32788
32842
  setSerie: setSerie,
32789
32843
  setArticle: setArticle
32790
- }, initSerie ? {
32844
+ }, isoLanguageIds ? {
32845
+ isoLanguageIds: isoLanguageIds
32846
+ } : {}), initItem ? {
32847
+ initItem: initItem
32848
+ } : {}), initSerie ? {
32791
32849
  initSerie: initSerie
32792
- } : {}) : isApi2 ? {
32850
+ } : {}) : isApi2 ? _objectSpread$o(_objectSpread$o({
32793
32851
  // open configurator for api2 package (configurator light)
32794
- loadMask: true,
32795
- initItem: item === null || item === void 0 ? void 0 : item.typeNo
32796
- } : _objectSpread$o({
32852
+ loadMask: true
32853
+ }, isoLanguageIds ? {
32854
+ isoLanguageIds: isoLanguageIds
32855
+ } : {}), initItem ? {
32856
+ initItem: initItem
32857
+ } : {}) : _objectSpread$o(_objectSpread$o(_objectSpread$o({
32797
32858
  // open configurator for idm package
32798
32859
  useEnricherService: true,
32799
32860
  loadPackage: true,
32800
32861
  packageId: packageId,
32801
32862
  showCatalogSelection: true,
32802
- initItem: item === null || item === void 0 ? void 0 : item.typeNo,
32803
32863
  setSerie: setSerie,
32804
32864
  setArticle: setArticle
32805
- }, initSerie ? {
32865
+ }, isoLanguageIds ? {
32866
+ isoLanguageIds: isoLanguageIds
32867
+ } : {}), initItem ? {
32868
+ initItem: initItem
32869
+ } : {}), initSerie ? {
32806
32870
  initSerie: initSerie
32807
32871
  } : {})
32808
32872
  });
@@ -32869,7 +32933,7 @@ var useTools = function useTools(_ref) {
32869
32933
  return tool.id;
32870
32934
  })) || []));
32871
32935
  };
32872
- }, [mainInformationWindowCodex, catalogId, packageId, conditionalTools, onlyPlaceholder]);
32936
+ }, [mainInformationWindowCodex, catalogId, packageId, conditionalTools, onlyPlaceholder, item, serie]);
32873
32937
  return {
32874
32938
  updateConfigurator: updateConfigurator,
32875
32939
  updateInformationWindow: updateInformationWindow
@@ -32886,7 +32950,7 @@ var TableGroups = observer(function () {
32886
32950
  selectedPackage = _useModule.selectedPackage,
32887
32951
  viewOnly = _useModule.viewOnly;
32888
32952
  useTools({
32889
- packageId: packageId,
32953
+ enricherPackage: selectedPackage,
32890
32954
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
32891
32955
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
32892
32956
  });
@@ -33553,6 +33617,7 @@ var TablePackages = observer(function () {
33553
33617
  setSelectedPackage = _useEnricherContext.setSelectedPackage,
33554
33618
  selectedPackage = _useEnricherContext.selectedPackage;
33555
33619
  useTools({
33620
+ enricherPackage: selectedPackage,
33556
33621
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
33557
33622
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
33558
33623
  });
@@ -33811,6 +33876,9 @@ var TablePackages = observer(function () {
33811
33876
  apiInterface: {
33812
33877
  read: apiConfig.authService + "/organizations/".concat(organizationId, "/related")
33813
33878
  },
33879
+ filter: function filter(_, lookupData) {
33880
+ return lookupData._id !== organizationId;
33881
+ },
33814
33882
  lookupValue: 'displayName',
33815
33883
  lookupKey: '_id',
33816
33884
  serverType: 'nodejs',
@@ -33907,7 +33975,7 @@ var TableProperties = observer(function () {
33907
33975
  selectedPackage = _useModule.selectedPackage,
33908
33976
  viewOnly = _useModule.viewOnly;
33909
33977
  useTools({
33910
- packageId: packageId,
33978
+ enricherPackage: selectedPackage,
33911
33979
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
33912
33980
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
33913
33981
  });
@@ -33956,18 +34024,26 @@ var TableProperties = observer(function () {
33956
34024
  additionalFields: ['featureNosDisplayTexts'],
33957
34025
  isDictionary: true
33958
34026
  }, {
33959
- field: 'optionKeys',
34027
+ field: 'optionIds',
33960
34028
  headerName: 'backoffice.idmEnricher.renaming.label.optionKeys',
33961
34029
  cellDataType: 'lookup',
33962
34030
  editable: !viewOnly,
33963
34031
  customParams: {
33964
34032
  nameField: 'optionKeysDisplayTexts',
33965
- displayLabelTemplate: '${name} (${value})',
34033
+ displayLabelTemplate: '${name} (${optionKeys}) in Features: ${optionFeatureNos}',
34034
+ lookupLabelTemplate: '${name} (${optionKey}) in Features: ${featureNos}',
33966
34035
  apiInterface: {
33967
34036
  read: apiConfig.enricherService + '/packages/${packageId}/lookup/options'
33968
34037
  },
33969
34038
  lookupValue: 'optionText',
33970
- lookupKey: 'optionKey',
34039
+ lookupKey: '_id',
34040
+ additionalMappings: [{
34041
+ lookupField: 'optionKey',
34042
+ targetField: 'optionKeys'
34043
+ }, {
34044
+ lookupField: 'featureNos',
34045
+ targetField: 'optionFeatureNos'
34046
+ }],
33971
34047
  multiple: true,
33972
34048
  translated: true,
33973
34049
  filter: {
@@ -33977,7 +34053,7 @@ var TableProperties = observer(function () {
33977
34053
  filter: '${featureNos}'
33978
34054
  }
33979
34055
  },
33980
- additionalFields: ['optionKeysDisplayTexts'],
34056
+ additionalFields: ['optionKeysDisplayTexts', 'optionKeys', 'optionFeatureNos'],
33981
34057
  isDictionary: true
33982
34058
  }, 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), {
33983
34059
  field: 'serieNos',
@@ -34754,7 +34830,7 @@ var RenamingTable = observer(function (_ref) {
34754
34830
  setSelectedSerie = _useModule.setSelectedSerie,
34755
34831
  viewOnly = _useModule.viewOnly;
34756
34832
  var _useTools = useTools({
34757
- packageId: packageId,
34833
+ enricherPackage: selectedPackage,
34758
34834
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
34759
34835
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
34760
34836
  setArticle: setSelectedItem,
@@ -35356,7 +35432,7 @@ var ExclusivityTable = observer(function (_ref) {
35356
35432
  selectedItem = _useModule.selectedItem,
35357
35433
  viewOnly = _useModule.viewOnly;
35358
35434
  var _useTools = useTools({
35359
- packageId: packageId,
35435
+ enricherPackage: selectedPackage,
35360
35436
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35361
35437
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
35362
35438
  setArticle: setSelectedItem,
@@ -35492,7 +35568,7 @@ var TableTabGroups = observer(function () {
35492
35568
  selectedPackage = _useModule.selectedPackage,
35493
35569
  viewOnly = _useModule.viewOnly;
35494
35570
  useTools({
35495
- packageId: packageId,
35571
+ enricherPackage: selectedPackage,
35496
35572
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35497
35573
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35498
35574
  });
@@ -35598,7 +35674,7 @@ var TablePartlistPos = observer(function () {
35598
35674
  selectedPackage = _useModule.selectedPackage,
35599
35675
  viewOnly = _useModule.viewOnly;
35600
35676
  useTools({
35601
- packageId: packageId,
35677
+ enricherPackage: selectedPackage,
35602
35678
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35603
35679
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35604
35680
  });
@@ -37070,7 +37146,7 @@ var TablePriceList = observer(function () {
37070
37146
  selectedNodeId = _React$useState4[0],
37071
37147
  setSelectedNodeId = _React$useState4[1];
37072
37148
  useTools({
37073
- packageId: packageId,
37149
+ enricherPackage: selectedPackage,
37074
37150
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
37075
37151
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
37076
37152
  });
@@ -37361,10 +37437,10 @@ function IDMEnricherEditor (_ref) {
37361
37437
  display: 'flex',
37362
37438
  flexDirection: 'column'
37363
37439
  },
37364
- children: /*#__PURE__*/jsx(Content$5, {})
37440
+ children: /*#__PURE__*/jsx(Content$7, {})
37365
37441
  });
37366
37442
  }
37367
- function Content$5() {
37443
+ function Content$7() {
37368
37444
  return /*#__PURE__*/jsxs(Routes, {
37369
37445
  children: [/*#__PURE__*/jsx(Route, {
37370
37446
  index: true,
@@ -38970,6 +39046,16 @@ var TableCatalogs = observer(function () {
38970
39046
  headerName: 'backoffice.idmCatalog.general.label.postBox',
38971
39047
  field: 'postBox',
38972
39048
  regex: '[0-9a-zA-Z]{0,10}'
39049
+ }, {
39050
+ headerName: 'backoffice.idmCatalog.general.label.contactSupplierIsoCountryId',
39051
+ field: 'contactSupplierIsoCountryId',
39052
+ cellDataType: 'enum',
39053
+ editable: true,
39054
+ required: true,
39055
+ defaultValue: 'DE',
39056
+ customParams: {
39057
+ enumData: getCountryKey(t)
39058
+ }
38973
39059
  }, {
38974
39060
  headerName: 'backoffice.idmCatalog.general.label.telephone',
38975
39061
  field: 'telephoneSwitchboard',
@@ -39097,11 +39183,13 @@ var TableCatalogs = observer(function () {
39097
39183
  children: [{
39098
39184
  headerName: 'backoffice.idmCatalog.general.label.priceTypeNo',
39099
39185
  field: 'priceTypeNo',
39100
- cellDataType: 'number'
39186
+ cellDataType: 'number',
39187
+ required: true
39101
39188
  }, {
39102
39189
  headerName: 'backoffice.idmCatalog.general.label.widthX',
39103
39190
  field: 'widthX',
39104
39191
  cellDataType: 'enum',
39192
+ required: true,
39105
39193
  customParams: {
39106
39194
  enumData: priceDependent,
39107
39195
  displayLabelTemplate: '${name} (${value})'
@@ -39110,6 +39198,7 @@ var TableCatalogs = observer(function () {
39110
39198
  headerName: 'backoffice.idmCatalog.general.label.depthY',
39111
39199
  field: 'depthY',
39112
39200
  cellDataType: 'enum',
39201
+ required: true,
39113
39202
  customParams: {
39114
39203
  enumData: priceDependent,
39115
39204
  displayLabelTemplate: '${name} (${value})'
@@ -39118,6 +39207,7 @@ var TableCatalogs = observer(function () {
39118
39207
  headerName: 'backoffice.idmCatalog.general.label.heightZ',
39119
39208
  field: 'heightZ',
39120
39209
  cellDataType: 'enum',
39210
+ required: true,
39121
39211
  customParams: {
39122
39212
  enumData: priceDependent,
39123
39213
  displayLabelTemplate: '${name} (${value})'
@@ -39126,6 +39216,7 @@ var TableCatalogs = observer(function () {
39126
39216
  headerName: 'backoffice.idmCatalog.general.label.basicUnit',
39127
39217
  field: 'basicUnit',
39128
39218
  cellDataType: 'enum',
39219
+ required: true,
39129
39220
  customParams: {
39130
39221
  enumData: unit,
39131
39222
  displayLabelTemplate: '${name} (${value})'
@@ -39134,6 +39225,7 @@ var TableCatalogs = observer(function () {
39134
39225
  headerName: 'backoffice.idmCatalog.general.label.roundingUnit',
39135
39226
  field: 'roundingUnit',
39136
39227
  cellDataType: 'enum',
39228
+ required: true,
39137
39229
  customParams: {
39138
39230
  enumData: unit,
39139
39231
  displayLabelTemplate: '${name} (${value})'
@@ -39142,6 +39234,7 @@ var TableCatalogs = observer(function () {
39142
39234
  headerName: 'backoffice.idmCatalog.general.label.roundingType',
39143
39235
  field: 'roundingType',
39144
39236
  cellDataType: 'enum',
39237
+ required: true,
39145
39238
  customParams: {
39146
39239
  enumData: roundingType,
39147
39240
  displayLabelTemplate: '${name} (${value})'
@@ -39149,7 +39242,8 @@ var TableCatalogs = observer(function () {
39149
39242
  }, {
39150
39243
  headerName: 'backoffice.idmCatalog.general.label.basicPriceDependent',
39151
39244
  field: 'basicPriceDependent',
39152
- cellDataType: 'boolean'
39245
+ cellDataType: 'boolean',
39246
+ required: true
39153
39247
  }, {
39154
39248
  headerName: 'backoffice.idmCatalog.general.label.priceTypeFormula',
39155
39249
  field: 'priceTypeFormula'
@@ -40105,7 +40199,7 @@ var TableItems = observer(function () {
40105
40199
  apiConfig = _useModule.apiConfig,
40106
40200
  organizationId = _useModule.organizationId;
40107
40201
  useTools({
40108
- catalogId: catalogId,
40202
+ catalog: selectedCatalog,
40109
40203
  serie: selectedSerie,
40110
40204
  setSerie: setSelectedSerie,
40111
40205
  setArticle: setSelectedItem,
@@ -40190,7 +40284,7 @@ var TableSeries = observer(function () {
40190
40284
  setSelectedSerie = _React$useState2[1];
40191
40285
  useTools({
40192
40286
  mainInformationWindowCodex: 'IDM_SERIES_TABLE_INFO',
40193
- catalogId: catalogId,
40287
+ catalog: selectedCatalog,
40194
40288
  serie: selectedGlobalSerie,
40195
40289
  setSerie: setGlobalSelectedSerie,
40196
40290
  conditionalTools: [{
@@ -40200,7 +40294,7 @@ var TableSeries = observer(function () {
40200
40294
  elementProps: {
40201
40295
  organizationId: organizationId,
40202
40296
  selectedCatalog: selectedCatalog,
40203
- selectedSerie: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id,
40297
+ selectedSerie: selectedSerie,
40204
40298
  apiConfig: apiConfig
40205
40299
  },
40206
40300
  condition: function condition() {
@@ -40390,7 +40484,7 @@ var TableSeries = observer(function () {
40390
40484
  });
40391
40485
  });
40392
40486
 
40393
- var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40487
+ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40394
40488
  var organizationId = _ref.organizationId,
40395
40489
  selectedCatalog = _ref.selectedCatalog,
40396
40490
  featureClassId = _ref.featureClassId,
@@ -40464,7 +40558,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40464
40558
  displayLabelTemplate: '${value}',
40465
40559
  lookupLabelTemplate: '${name} (${value})',
40466
40560
  apiInterface: {
40467
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
40561
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
40468
40562
  },
40469
40563
  lookupKey: 'featureNo',
40470
40564
  lookupValue: 'featureText',
@@ -40582,7 +40676,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40582
40676
  }, featureClassId ? featureClassId : 'features');
40583
40677
  });
40584
40678
 
40585
- function Features(_ref) {
40679
+ function Features$1(_ref) {
40586
40680
  var readOnly = _ref.readOnly;
40587
40681
  var _useTranslation = useTranslation();
40588
40682
  _useTranslation.t;
@@ -40646,7 +40740,7 @@ function Features(_ref) {
40646
40740
  }, 'features');
40647
40741
  }
40648
40742
 
40649
- var TableFeatures$1 = observer(function () {
40743
+ var TableFeatures$2 = observer(function () {
40650
40744
  var _useDivaCore = useDivaCore(),
40651
40745
  jwt = _useDivaCore.state.jwt;
40652
40746
  var _useTranslation = useTranslation(),
@@ -40659,13 +40753,13 @@ var TableFeatures$1 = observer(function () {
40659
40753
  setSelectedSerie = _useModule.setSelectedSerie,
40660
40754
  setSelectedItem = _useModule.setSelectedItem;
40661
40755
  var _useTools = useTools({
40662
- catalogId: catalogId,
40756
+ catalog: selectedCatalog,
40663
40757
  setSerie: setSelectedSerie,
40664
40758
  setArticle: setSelectedItem,
40665
40759
  conditionalTools: [{
40666
40760
  id: 'globalfeatures',
40667
40761
  name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
40668
- elementComponent: Features,
40762
+ elementComponent: Features$1,
40669
40763
  elementProps: {
40670
40764
  readOnly: true
40671
40765
  },
@@ -40746,7 +40840,7 @@ var TableFeatures$1 = observer(function () {
40746
40840
  })]
40747
40841
  })]
40748
40842
  })
40749
- }), selectedCatalog && /*#__PURE__*/jsx(Features$1, {
40843
+ }), selectedCatalog && /*#__PURE__*/jsx(Features$2, {
40750
40844
  organizationId: organizationId,
40751
40845
  selectedCatalog: selectedCatalog,
40752
40846
  hooks: hooks,
@@ -40756,7 +40850,7 @@ var TableFeatures$1 = observer(function () {
40756
40850
  });
40757
40851
  });
40758
40852
 
40759
- var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40853
+ var Options$1 = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40760
40854
  var organizationId = _ref.organizationId,
40761
40855
  selectedCatalog = _ref.selectedCatalog,
40762
40856
  apiConfig = _ref.apiConfig,
@@ -40920,7 +41014,7 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40920
41014
  });
40921
41015
  });
40922
41016
 
40923
- var TableOptions = observer(function () {
41017
+ var TableOptions$1 = observer(function () {
40924
41018
  var _selectedCatalog$name;
40925
41019
  var _useTranslation = useTranslation(),
40926
41020
  t = _useTranslation.t;
@@ -40934,7 +41028,7 @@ var TableOptions = observer(function () {
40934
41028
  setSelectedSerie = _useModule.setSelectedSerie,
40935
41029
  setSelectedItem = _useModule.setSelectedItem;
40936
41030
  var _useTools = useTools({
40937
- catalogId: catalogId,
41031
+ catalog: selectedCatalog,
40938
41032
  setSerie: setSelectedSerie,
40939
41033
  setArticle: setSelectedItem
40940
41034
  }),
@@ -40991,7 +41085,7 @@ var TableOptions = observer(function () {
40991
41085
  })]
40992
41086
  })]
40993
41087
  })
40994
- }), selectedCatalog && /*#__PURE__*/jsx(Options, {
41088
+ }), selectedCatalog && /*#__PURE__*/jsx(Options$1, {
40995
41089
  organizationId: organizationId,
40996
41090
  selectedCatalog: selectedCatalog,
40997
41091
  hooks: hooks,
@@ -41016,13 +41110,13 @@ var TableFeatureClasses = observer(function () {
41016
41110
  selectedFeatureClass = _React$useState2[0],
41017
41111
  setSelectedFeatureClass = _React$useState2[1];
41018
41112
  useTools({
41019
- catalogId: catalogId,
41113
+ catalog: selectedCatalog,
41020
41114
  setSerie: setSelectedSerie,
41021
41115
  setArticle: setSelectedItem,
41022
41116
  conditionalTools: [{
41023
41117
  id: 'features',
41024
41118
  name: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
41025
- elementComponent: Features$1,
41119
+ elementComponent: Features$2,
41026
41120
  elementProps: {
41027
41121
  organizationId: organizationId,
41028
41122
  selectedCatalog: selectedCatalog,
@@ -41708,7 +41802,7 @@ function OptionCombinations(_ref) {
41708
41802
  editorElementProps: {
41709
41803
  nameField: 'featureRefsDisplayTexts',
41710
41804
  apiInterface: {
41711
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
41805
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41712
41806
  },
41713
41807
  filter: function filter(_, lookupData) {
41714
41808
  var _decision$featureRefs8;
@@ -41733,14 +41827,36 @@ function OptionCombinations(_ref) {
41733
41827
  },
41734
41828
  defaultValue: []
41735
41829
  }] : decision.decisionType == 3 ? [{
41736
- headerName: 'backoffice.idmCatalog.optionCombinations.label.actions',
41830
+ headerName: 'backoffice.idmCatalog.optionCombinations.label.setPosCountValue',
41737
41831
  field: 'actions',
41738
- cellDataType: 'array',
41739
- defaultValue: []
41832
+ cellDataType: 'number',
41833
+ required: true,
41834
+ customParams: {
41835
+ useParser: true,
41836
+ useFormatter: true
41837
+ },
41838
+ valueFormatter: function valueFormatter(_ref2) {
41839
+ _ref2.data;
41840
+ var value = _ref2.value;
41841
+ if (Array.isArray(value)) {
41842
+ var action = value === null || value === void 0 ? void 0 : value.find(function (action) {
41843
+ return action.startsWith('SET_POS_COUNT_VALUE');
41844
+ });
41845
+ return action ? Number(action.split(':')[1]) : undefined;
41846
+ }
41847
+ return value;
41848
+ },
41849
+ valueParser: function valueParser(_ref3) {
41850
+ var newValue = _ref3.newValue;
41851
+ if (newValue == '') return undefined;
41852
+ return ["SET_POS_COUNT_VALUE:".concat(newValue)];
41853
+ },
41854
+ additionalFields: ['projectActions']
41740
41855
  }] : []), [{
41741
41856
  headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
41742
41857
  field: 'sequence',
41743
- cellDataType: 'number'
41858
+ cellDataType: 'number',
41859
+ required: true
41744
41860
  }, {
41745
41861
  headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
41746
41862
  field: 'lastUpdatedDate',
@@ -41764,13 +41880,6 @@ function OptionCombinations(_ref) {
41764
41880
  field: '_id',
41765
41881
  editable: false,
41766
41882
  cellDataType: 'objectId'
41767
- }, {
41768
- field: 'organizationId',
41769
- editable: false,
41770
- hide: true,
41771
- lockVisible: true,
41772
- suppressColumnsToolPanel: true,
41773
- defaultValue: '${organizationId}'
41774
41883
  }, {
41775
41884
  field: 'catalogId',
41776
41885
  editable: false,
@@ -41817,7 +41926,7 @@ var TableDecisions = observer(function () {
41817
41926
  spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
41818
41927
  }, [selectedNodeId]);
41819
41928
  useTools({
41820
- catalogId: catalogId,
41929
+ catalog: selectedCatalog,
41821
41930
  setSerie: setSelectedSerie,
41822
41931
  setArticle: setSelectedItem,
41823
41932
  conditionalTools: [{
@@ -41927,7 +42036,7 @@ var TableDecisions = observer(function () {
41927
42036
  nameField: 'featureRefsDisplayTexts',
41928
42037
  displayLabelTemplate: '${name} (${value})',
41929
42038
  apiInterface: {
41930
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42039
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41931
42040
  },
41932
42041
  lookupValue: 'featureText',
41933
42042
  lookupKey: 'featureNo',
@@ -42030,7 +42139,7 @@ var TableDetailInfos = observer(function () {
42030
42139
  selectedMedia = _React$useState2[0],
42031
42140
  setSelectedMedia = _React$useState2[1];
42032
42141
  useTools({
42033
- catalogId: catalogId,
42142
+ catalog: selectedCatalog,
42034
42143
  setSerie: setSelectedSerie,
42035
42144
  setArticle: setSelectedItem,
42036
42145
  conditionalTools: [{
@@ -42246,6 +42355,7 @@ function PartlistPos(_ref) {
42246
42355
  cellDataType: 'number'
42247
42356
  }, {
42248
42357
  field: 'itemRefSerieNo',
42358
+ required: true,
42249
42359
  headerName: 'backoffice.idmCatalog.partlistpos.label.itemRefSerieNo',
42250
42360
  cellDataType: 'lookup',
42251
42361
  editable: true,
@@ -42273,6 +42383,7 @@ function PartlistPos(_ref) {
42273
42383
  isDictionary: true
42274
42384
  }, {
42275
42385
  field: 'itemRefTypeNo',
42386
+ required: true,
42276
42387
  headerName: 'backoffice.idmCatalog.partlistpos.label.itemRefTypeNo',
42277
42388
  cellDataType: 'lookup',
42278
42389
  customParams: {
@@ -42289,8 +42400,9 @@ function PartlistPos(_ref) {
42289
42400
  additionalFields: ['itemRefTypeNoDisplayText'],
42290
42401
  isDictionary: true,
42291
42402
  editable: function editable(_ref2) {
42292
- var data = _ref2.data;
42293
- return !!data.itemRefSerieNo;
42403
+ var data = _ref2.data,
42404
+ context = _ref2.context;
42405
+ return (context === null || context === void 0 ? void 0 : context.isPasting) || !!data.itemRefSerieNo;
42294
42406
  }
42295
42407
  }, {
42296
42408
  field: 'decisions',
@@ -42456,7 +42568,7 @@ var TablePartlists = observer(function () {
42456
42568
  selectedPartlist = _React$useState2[0],
42457
42569
  setSelectedPartlist = _React$useState2[1];
42458
42570
  useTools({
42459
- catalogId: catalogId,
42571
+ catalog: selectedCatalog,
42460
42572
  setSerie: setSelectedSerie,
42461
42573
  setArticle: setSelectedItem,
42462
42574
  conditionalTools: [{
@@ -42679,7 +42791,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42679
42791
  editorElementProps: {
42680
42792
  nameField: 'featureNosDisplayTexts',
42681
42793
  apiInterface: {
42682
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42794
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42683
42795
  },
42684
42796
  filter: function filter(_, lookupData) {
42685
42797
  var _priceFeatureGroup$fe7;
@@ -42698,15 +42810,39 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42698
42810
  }, {
42699
42811
  headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
42700
42812
  field: 'sequence',
42701
- cellDataType: 'number'
42813
+ cellDataType: 'number',
42814
+ required: true
42702
42815
  }, {
42703
42816
  headerName: 'backoffice.idmCatalog.priceFeatureGroupPercentageSurcharge.label.priceFactor',
42704
42817
  field: 'priceFactor',
42705
- cellDataType: 'number'
42818
+ cellDataType: 'number',
42819
+ required: true
42706
42820
  }, {
42707
42821
  headerName: 'backoffice.idmCatalog.priceFeatureGroupPercentageSurcharge.label.priceFeatureGroups',
42708
- field: 'priceFeatureGroups',
42709
- cellDataType: 'array'
42822
+ field: 'pricefeaturegroups',
42823
+ cellDataType: 'lookup',
42824
+ customParams: {
42825
+ nameField: 'pricefeaturegroupsDisplayTexts',
42826
+ apiInterface: {
42827
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups'
42828
+ },
42829
+ lookupValue: 'priceFeatureGroupText',
42830
+ lookupKey: 'priceFeatureGroupNo',
42831
+ lookupKeyFilterType: {
42832
+ type: 'equals',
42833
+ filterType: 'text'
42834
+ },
42835
+ multiple: true,
42836
+ translated: true,
42837
+ filter: function filter(_, lookupData) {
42838
+ return priceFeatureGroup.priceFeatureGroupNo !== lookupData.priceFeatureGroupNo && !lookupData.isPercentage;
42839
+ },
42840
+ additionalMappings: [{
42841
+ lookupField: 'isPercentage',
42842
+ targetField: '__diva_context.additionalData.isPercentage'
42843
+ }]
42844
+ },
42845
+ additionalFields: ['pricefeaturegroupsDisplayTexts']
42710
42846
  }, {
42711
42847
  headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.validFromDate',
42712
42848
  field: 'validFromDate',
@@ -42739,20 +42875,6 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42739
42875
  field: '_id',
42740
42876
  editable: false,
42741
42877
  cellDataType: 'objectId'
42742
- }, {
42743
- field: 'organizationId',
42744
- editable: false,
42745
- hide: true,
42746
- lockVisible: true,
42747
- suppressColumnsToolPanel: true,
42748
- defaultValue: '${organizationId}'
42749
- }, {
42750
- field: 'catalogId',
42751
- editable: false,
42752
- hide: true,
42753
- lockVisible: true,
42754
- suppressColumnsToolPanel: true,
42755
- defaultValue: '${catalogId}'
42756
42878
  }, {
42757
42879
  field: 'optionsSetRefs',
42758
42880
  hide: true,
@@ -42866,7 +42988,7 @@ function PriceFeatureGroupFinishes(_ref) {
42866
42988
  editorElementProps: {
42867
42989
  nameField: 'featureNosDisplayTexts',
42868
42990
  apiInterface: {
42869
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42991
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42870
42992
  },
42871
42993
  filter: function filter(_, lookupData) {
42872
42994
  var _priceFeatureGroup$fe7;
@@ -42988,7 +43110,7 @@ var TablePriceFeatureGroups = observer(function () {
42988
43110
  return (_spreadsheetRef$curre = spreadsheetRef.current) === null || _spreadsheetRef$curre === void 0 ? void 0 : _spreadsheetRef$curre.setNodeDataValue(selectedNodeId, data);
42989
43111
  }, [selectedNodeId]);
42990
43112
  useTools({
42991
- catalogId: catalogId,
43113
+ catalog: selectedCatalog,
42992
43114
  setSerie: setSelectedSerie,
42993
43115
  setArticle: setSelectedItem,
42994
43116
  conditionalTools: [{
@@ -43017,7 +43139,7 @@ var TablePriceFeatureGroups = observer(function () {
43017
43139
  setNodeDataValue: setNodeDataValue,
43018
43140
  setIsPercentage: setIsPercentage
43019
43141
  },
43020
- disabled: isPercentage === false,
43142
+ disabled: isPercentage === false || (selectedPriceFeatureGroup === null || selectedPriceFeatureGroup === void 0 ? void 0 : selectedPriceFeatureGroup.additionalPrice) == false,
43021
43143
  condition: function condition() {
43022
43144
  return (selectedPriceFeatureGroup === null || selectedPriceFeatureGroup === void 0 ? void 0 : selectedPriceFeatureGroup._id) !== undefined;
43023
43145
  }
@@ -43184,7 +43306,7 @@ var TablePrices = observer(function () {
43184
43306
  apiConfig = _useModule.apiConfig,
43185
43307
  organizationId = _useModule.organizationId;
43186
43308
  useTools({
43187
- catalogId: catalogId,
43309
+ catalog: selectedCatalog,
43188
43310
  serie: selectedSerie,
43189
43311
  setSerie: setSelectedSerie,
43190
43312
  setArticle: setSelectedItem,
@@ -43220,6 +43342,7 @@ var TablePrices = observer(function () {
43220
43342
  cellDataType: 'lookup',
43221
43343
  customParams: {
43222
43344
  nameField: 'typeNo',
43345
+ filterCellType: 'objectId',
43223
43346
  displayLabelTemplate: '${name} (${value})',
43224
43347
  apiInterface: {
43225
43348
  read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/items'
@@ -43227,7 +43350,7 @@ var TablePrices = observer(function () {
43227
43350
  lookupValue: 'typeNo',
43228
43351
  lookupKey: '_id',
43229
43352
  multiple: false,
43230
- translated: true
43353
+ translated: false
43231
43354
  },
43232
43355
  additionalFields: ['typeNo'],
43233
43356
  editable: false
@@ -43350,7 +43473,8 @@ function Items(_ref) {
43350
43473
  create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options',
43351
43474
  restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43352
43475
  "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43353
- update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}'
43476
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
43477
+ bulk: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/bulk'
43354
43478
  },
43355
43479
  dateFormat: 'DD.MM.YYYY, HH:mm:ss',
43356
43480
  floatingFilter: true,
@@ -43405,7 +43529,7 @@ var TableOptionGroups = observer(function () {
43405
43529
  selectedOptionGroup = _React$useState2[0],
43406
43530
  setSelectedOptionGroup = _React$useState2[1];
43407
43531
  useTools({
43408
- catalogId: catalogId,
43532
+ catalog: selectedCatalog,
43409
43533
  setSerie: setSelectedSerie,
43410
43534
  setArticle: setSelectedItem,
43411
43535
  conditionalTools: [{
@@ -43508,10 +43632,10 @@ function IDMCatalogEditor (_ref) {
43508
43632
  display: 'flex',
43509
43633
  flexDirection: 'column'
43510
43634
  },
43511
- children: /*#__PURE__*/jsx(Content$4, {})
43635
+ children: /*#__PURE__*/jsx(Content$6, {})
43512
43636
  });
43513
43637
  }
43514
- function Content$4() {
43638
+ function Content$6() {
43515
43639
  return /*#__PURE__*/jsxs(Routes, {
43516
43640
  children: [/*#__PURE__*/jsx(Route, {
43517
43641
  index: true,
@@ -43524,10 +43648,10 @@ function Content$4() {
43524
43648
  element: /*#__PURE__*/jsx(TableItems, {})
43525
43649
  }), /*#__PURE__*/jsx(Route, {
43526
43650
  path: ":catalogId/features",
43527
- element: /*#__PURE__*/jsx(TableFeatures$1, {})
43651
+ element: /*#__PURE__*/jsx(TableFeatures$2, {})
43528
43652
  }), /*#__PURE__*/jsx(Route, {
43529
43653
  path: ":catalogId/options",
43530
- element: /*#__PURE__*/jsx(TableOptions, {})
43654
+ element: /*#__PURE__*/jsx(TableOptions$1, {})
43531
43655
  }), /*#__PURE__*/jsx(Route, {
43532
43656
  path: ":catalogId/optiongroups",
43533
43657
  element: /*#__PURE__*/jsx(TableOptionGroups, {})
@@ -43617,15 +43741,16 @@ function CollectionMembers(_ref) {
43617
43741
  headerName: 'backoffice.idmCatalogEditor.collectionmembers.label.serieNos',
43618
43742
  cellDataType: 'lookup',
43619
43743
  editable: function editable(_ref2) {
43620
- var data = _ref2.data;
43621
- return data.enricherPackageId;
43744
+ var data = _ref2.data,
43745
+ context = _ref2.context;
43746
+ return (context === null || context === void 0 ? void 0 : context.isPasting) || !!data.enricherPackageId;
43622
43747
  },
43623
43748
  customParams: {
43624
43749
  nameField: 'serieNosDisplayTexts',
43625
43750
  filterCellType: 'number',
43626
43751
  displayLabelTemplate: '${name} (${value})',
43627
43752
  apiInterface: {
43628
- read: apiConfig.enricherService + '/packages/${enricherPackageId}/lookup/series'
43753
+ read: apiConfig.enricherService + '/live/v3.0/catalogs/${__diva_context.additionalData.published.' + organizationId + '.liveCatalogId}/series'
43629
43754
  },
43630
43755
  lookupValue: 'seriesName',
43631
43756
  lookupKey: 'serieNo',
@@ -43835,10 +43960,10 @@ function IDMCollectionEditor(_ref) {
43835
43960
  display: 'flex',
43836
43961
  flexDirection: 'column'
43837
43962
  },
43838
- children: /*#__PURE__*/jsx(Content$3, {})
43963
+ children: /*#__PURE__*/jsx(Content$5, {})
43839
43964
  });
43840
43965
  }
43841
- function Content$3() {
43966
+ function Content$5() {
43842
43967
  return /*#__PURE__*/jsx(Routes, {
43843
43968
  children: /*#__PURE__*/jsx(Route, {
43844
43969
  index: true,
@@ -43848,9 +43973,176 @@ function Content$3() {
43848
43973
  });
43849
43974
  }
43850
43975
 
43976
+ var TableFeatures$1 = observer(function () {
43977
+ var _useTranslation = useTranslation(),
43978
+ t = _useTranslation.t;
43979
+ return /*#__PURE__*/jsxs(Fragment, {
43980
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
43981
+ title: /*#__PURE__*/jsx("div", {
43982
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures')
43983
+ })
43984
+ }), /*#__PURE__*/jsx(Features$1, {})]
43985
+ });
43986
+ });
43987
+
43988
+ function IDMFeaturesEditor(_ref) {
43989
+ _objectDestructuringEmpty(_ref);
43990
+ return /*#__PURE__*/jsx("div", {
43991
+ style: {
43992
+ height: '85vh',
43993
+ display: 'flex',
43994
+ flexDirection: 'column'
43995
+ },
43996
+ children: /*#__PURE__*/jsx(Content$4, {})
43997
+ });
43998
+ }
43999
+ function Content$4() {
44000
+ return /*#__PURE__*/jsx(Routes, {
44001
+ children: /*#__PURE__*/jsx(Route, {
44002
+ index: true,
44003
+ path: "",
44004
+ element: /*#__PURE__*/jsx(TableFeatures$1, {})
44005
+ })
44006
+ });
44007
+ }
44008
+
44009
+ function Features(_ref) {
44010
+ var readOnly = _ref.readOnly;
44011
+ var root = useStore();
44012
+ var apiConfig = root.configurationStore.apiConfig;
44013
+ var organizationId = root.dataStore.organizationId;
44014
+ var applicationData = useMemo(function () {
44015
+ return {
44016
+ organizationId: organizationId
44017
+ };
44018
+ }, [organizationId]);
44019
+ var _useTranslation = useTranslation(),
44020
+ t = _useTranslation.t;
44021
+ var configuration = useMemo(function () {
44022
+ var _root$dataStore$curre;
44023
+ var headerPosVariationType = [{
44024
+ name: t('backoffice.idmCatalog.features.label.vt.I'),
44025
+ value: 'I'
44026
+ }, {
44027
+ name: t('backoffice.idmCatalog.features.label.vt.K'),
44028
+ value: 'K'
44029
+ }, {
44030
+ name: t('backoffice.idmCatalog.features.label.vt.P'),
44031
+ value: 'P'
44032
+ }];
44033
+ var featureT = [{
44034
+ name: t('backoffice.idmCatalog.features.label.featureTDic.M'),
44035
+ value: 'M'
44036
+ }, {
44037
+ name: t('backoffice.idmCatalog.features.label.featureTDic.C'),
44038
+ value: 'C'
44039
+ }, {
44040
+ name: t('backoffice.idmCatalog.features.label.featureTDic.O'),
44041
+ value: 'O'
44042
+ }];
44043
+ return {
44044
+ type: 'dotnetSSM',
44045
+ apiInterface: {
44046
+ read: apiConfig.idmService + '/v3.0/${organizationId}/features',
44047
+ create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features',
44048
+ restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}/restore',
44049
+ "delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
44050
+ update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
44051
+ bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/bulk'
44052
+ },
44053
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
44054
+ colDef: [{
44055
+ field: 'featureNo',
44056
+ headerName: 'backoffice.idmCatalog.features.label.featureNo',
44057
+ required: true,
44058
+ unique: true
44059
+ }, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', ((_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 || (_root$dataStore$curre = _root$dataStore$curre.settings.languages) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.map(function (value) {
44060
+ return value.toUpperCase();
44061
+ })) || ['DE'], true), {
44062
+ field: 'sequenceNo',
44063
+ headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
44064
+ required: true,
44065
+ cellDataType: 'number'
44066
+ }, {
44067
+ field: 'headerPosVariationType',
44068
+ headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
44069
+ required: true,
44070
+ cellDataType: 'enum',
44071
+ customParams: {
44072
+ enumData: headerPosVariationType,
44073
+ displayLabelTemplate: '${name} (${value})'
44074
+ }
44075
+ }, {
44076
+ field: 'featureT',
44077
+ headerName: 'backoffice.idmCatalog.features.label.featureT',
44078
+ cellDataType: 'enum',
44079
+ customParams: {
44080
+ enumData: featureT,
44081
+ displayLabelTemplate: '${name} (${value})'
44082
+ }
44083
+ }, {
44084
+ field: 'measureUnit',
44085
+ headerName: 'backoffice.idmCatalog.features.label.measureUnit'
44086
+ }, {
44087
+ field: 'measureParameter',
44088
+ headerName: 'backoffice.idmCatalog.features.label.measureParameter'
44089
+ }, {
44090
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
44091
+ field: 'lastUpdatedDate',
44092
+ cellDataType: 'dateString',
44093
+ editable: false
44094
+ }, {
44095
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
44096
+ field: 'createdDate',
44097
+ cellDataType: 'dateString',
44098
+ editable: false
44099
+ }, {
44100
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
44101
+ field: 'createdByDisplayText',
44102
+ editable: false
44103
+ }, {
44104
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
44105
+ field: 'lastUpdatedByDisplayText',
44106
+ editable: false
44107
+ }, {
44108
+ headerName: 'backoffice.idmCatalog.general.label._id',
44109
+ field: '_id',
44110
+ editable: false,
44111
+ cellDataType: 'objectId'
44112
+ }, {
44113
+ field: 'organizationId',
44114
+ editable: false,
44115
+ hide: true,
44116
+ lockVisible: true,
44117
+ suppressColumnsToolPanel: true,
44118
+ defaultValue: '${organizationId}'
44119
+ }]
44120
+ };
44121
+ }, []);
44122
+ return /*#__PURE__*/jsx(Spreadsheet, {
44123
+ gridId: 'crud-grid_global_features',
44124
+ applicationData: applicationData,
44125
+ configuration: configuration
44126
+ }, 'features');
44127
+ }
44128
+
43851
44129
  var TableFeatures = observer(function () {
43852
44130
  var _useTranslation = useTranslation(),
43853
44131
  t = _useTranslation.t;
44132
+ useTools({
44133
+ conditionalTools: [{
44134
+ id: 'globalfeatures',
44135
+ name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
44136
+ elementComponent: Features$1,
44137
+ elementProps: {
44138
+ readOnly: true
44139
+ },
44140
+ where: 'right',
44141
+ condition: function condition() {
44142
+ return true;
44143
+ }
44144
+ }]
44145
+ });
43854
44146
  return /*#__PURE__*/jsxs(Fragment, {
43855
44147
  children: [/*#__PURE__*/jsx(Descriptions$1, {
43856
44148
  title: /*#__PURE__*/jsx("div", {
@@ -43860,7 +44152,198 @@ var TableFeatures = observer(function () {
43860
44152
  });
43861
44153
  });
43862
44154
 
43863
- function IDMFeaturesEditor(_ref) {
44155
+ function IDMOrganizationFeaturesEditor(_ref) {
44156
+ _objectDestructuringEmpty(_ref);
44157
+ return /*#__PURE__*/jsx("div", {
44158
+ style: {
44159
+ height: '85vh',
44160
+ display: 'flex',
44161
+ flexDirection: 'column'
44162
+ },
44163
+ children: /*#__PURE__*/jsx(Content$3, {})
44164
+ });
44165
+ }
44166
+ function Content$3() {
44167
+ return /*#__PURE__*/jsx(Routes, {
44168
+ children: /*#__PURE__*/jsx(Route, {
44169
+ index: true,
44170
+ path: "",
44171
+ element: /*#__PURE__*/jsx(TableFeatures, {})
44172
+ })
44173
+ });
44174
+ }
44175
+
44176
+ function Options(_ref) {
44177
+ var _root$dataStore$curre;
44178
+ var readOnly = _ref.readOnly;
44179
+ var root = useStore();
44180
+ var apiConfig = root.configurationStore.apiConfig;
44181
+ var organizationId = root.dataStore.organizationId;
44182
+ var languages = ((_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 || (_root$dataStore$curre = _root$dataStore$curre.settings.languages) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.map(function (value) {
44183
+ return value.toUpperCase();
44184
+ })) || ['DE'];
44185
+ var applicationData = useMemo(function () {
44186
+ return {
44187
+ organizationId: organizationId
44188
+ };
44189
+ }, [organizationId]);
44190
+ var _useTranslation = useTranslation();
44191
+ _useTranslation.t;
44192
+ var configuration = useMemo(function () {
44193
+ return {
44194
+ type: 'dotnetSSM',
44195
+ apiInterface: {
44196
+ read: apiConfig.idmService + '/v3.0/${organizationId}/options',
44197
+ create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options',
44198
+ restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}/restore',
44199
+ "delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
44200
+ update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
44201
+ bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/bulk'
44202
+ },
44203
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
44204
+ colDef: [{
44205
+ field: 'optionKey',
44206
+ required: true
44207
+ }, {
44208
+ headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
44209
+ field: 'sequenceNo',
44210
+ cellDataType: 'number'
44211
+ }, createTranslatedColumnConfig('optionText', 'backoffice.idmCatalog.options.label.optionText', languages, true), createTranslatedColumnConfig('optionCommentText', 'backoffice.idmCatalog.options.label.optionCommentText', languages), {
44212
+ headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
44213
+ field: 'optionFreeText',
44214
+ cellDataType: 'boolean'
44215
+ }, {
44216
+ field: 'featureNos',
44217
+ headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
44218
+ cellDataType: 'lookup',
44219
+ editable: true,
44220
+ required: false,
44221
+ customParams: {
44222
+ nameField: 'featureIdsDisplayTexts',
44223
+ filterCellType: 'number',
44224
+ displayLabelTemplate: '${name} (${value})',
44225
+ apiInterface: {
44226
+ read: apiConfig.idmService + '/v3.0/${organizationId}/features'
44227
+ },
44228
+ lookupValue: 'featureText',
44229
+ lookupKey: 'featureNo',
44230
+ lookupKeyFilterType: {
44231
+ type: 'equals',
44232
+ filterType: 'number'
44233
+ },
44234
+ additionalMappings: [{
44235
+ lookupField: '_id',
44236
+ targetField: 'featureIds'
44237
+ }],
44238
+ multiple: true,
44239
+ translated: true
44240
+ },
44241
+ additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
44242
+ isDictionary: true
44243
+ }, {
44244
+ headerName: 'backoffice.idmCatalog.items.label.validation',
44245
+ children: [{
44246
+ headerName: 'backoffice.idmCatalog.general.label.validFromDate',
44247
+ field: 'validFromDate',
44248
+ cellDataType: 'dateString',
44249
+ customParams: {
44250
+ dateFormat: 'DD.MM.YYYY'
44251
+ }
44252
+ }, {
44253
+ headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
44254
+ field: 'validUntilDate',
44255
+ cellDataType: 'dateString',
44256
+ customParams: {
44257
+ dateFormat: 'DD.MM.YYYY'
44258
+ }
44259
+ }]
44260
+ }, {
44261
+ headerName: 'backoffice.idmCatalog.options.label.material',
44262
+ children: [{
44263
+ headerName: 'backoffice.idmCatalog.options.label.materialNo',
44264
+ field: 'materialNo',
44265
+ editable: false
44266
+ }, {
44267
+ headerName: 'backoffice.idmCatalog.options.label.materialColorR',
44268
+ field: 'materialColorR',
44269
+ cellDataType: 'number'
44270
+ }, {
44271
+ headerName: 'backoffice.idmCatalog.options.label.materialColorG',
44272
+ field: 'materialColorG',
44273
+ cellDataType: 'number'
44274
+ }, {
44275
+ headerName: 'backoffice.idmCatalog.options.label.materialColorB',
44276
+ field: 'materialColorB',
44277
+ cellDataType: 'number'
44278
+ }]
44279
+ }, {
44280
+ headerName: 'backoffice.idmCatalog.options.label.measurement',
44281
+ children: [{
44282
+ headerName: 'backoffice.idmCatalog.options.label.measureNo',
44283
+ field: 'measureNo',
44284
+ cellDataType: 'number',
44285
+ editable: false
44286
+ }, {
44287
+ headerName: 'backoffice.idmCatalog.options.label.measureValue',
44288
+ field: 'measureValue',
44289
+ cellDataType: 'number'
44290
+ }, {
44291
+ headerName: 'backoffice.idmCatalog.options.label.measureUnit',
44292
+ field: 'measureUnit'
44293
+ }]
44294
+ }, {
44295
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
44296
+ field: 'lastUpdatedDate',
44297
+ cellDataType: 'dateString',
44298
+ editable: false
44299
+ }, {
44300
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
44301
+ field: 'createdDate',
44302
+ cellDataType: 'dateString',
44303
+ editable: false
44304
+ }, {
44305
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
44306
+ field: 'createdByDisplayText',
44307
+ editable: false
44308
+ }, {
44309
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
44310
+ field: 'lastUpdatedByDisplayText',
44311
+ editable: false
44312
+ }, {
44313
+ headerName: 'backoffice.idmCatalog.general.label._id',
44314
+ field: '_id',
44315
+ editable: false,
44316
+ cellDataType: 'objectId'
44317
+ }, {
44318
+ field: 'organizationId',
44319
+ editable: false,
44320
+ hide: true,
44321
+ lockVisible: true,
44322
+ suppressColumnsToolPanel: true,
44323
+ defaultValue: '${organizationId}'
44324
+ }]
44325
+ };
44326
+ }, []);
44327
+ return /*#__PURE__*/jsx(Spreadsheet, {
44328
+ gridId: 'crud-grid_global_features',
44329
+ applicationData: applicationData,
44330
+ configuration: configuration
44331
+ }, 'features');
44332
+ }
44333
+
44334
+ var TableOptions = observer(function () {
44335
+ var _useTranslation = useTranslation(),
44336
+ t = _useTranslation.t;
44337
+ return /*#__PURE__*/jsxs(Fragment, {
44338
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
44339
+ title: /*#__PURE__*/jsx("div", {
44340
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions')
44341
+ })
44342
+ }), /*#__PURE__*/jsx(Options, {})]
44343
+ });
44344
+ });
44345
+
44346
+ function IDMOrganizationOptionsEditor(_ref) {
43864
44347
  _objectDestructuringEmpty(_ref);
43865
44348
  return /*#__PURE__*/jsx("div", {
43866
44349
  style: {
@@ -43876,7 +44359,7 @@ function Content$2() {
43876
44359
  children: /*#__PURE__*/jsx(Route, {
43877
44360
  index: true,
43878
44361
  path: "",
43879
- element: /*#__PURE__*/jsx(TableFeatures, {})
44362
+ element: /*#__PURE__*/jsx(TableOptions, {})
43880
44363
  })
43881
44364
  });
43882
44365
  }
@@ -44438,6 +44921,12 @@ var ContentCard = observer(function (_ref3) {
44438
44921
  }, configId), configuration.type == 'IDMFeaturesEditor' && /*#__PURE__*/jsx(IDMFeaturesEditor, {
44439
44922
  configuration: configuration,
44440
44923
  id: configId
44924
+ }, configId), configuration.type == 'IDMOrganizationFeaturesEditor' && /*#__PURE__*/jsx(IDMOrganizationFeaturesEditor, {
44925
+ configuration: configuration,
44926
+ id: configId
44927
+ }, configId), configuration.type == 'IDMOrganizationOptionsEditor' && /*#__PURE__*/jsx(IDMOrganizationOptionsEditor, {
44928
+ configuration: configuration,
44929
+ id: configId
44441
44930
  }, configId), configuration.type == 'MediaTable' && /*#__PURE__*/jsx(MediaTable, {
44442
44931
  configuration: configuration,
44443
44932
  id: configId
@@ -44963,12 +45452,14 @@ styleInject(css_248z$5);
44963
45452
 
44964
45453
  var wrapper$2 = "wrapper-Q13-g";
44965
45454
  var confContainer = "conf-container-Sm5LL";
44966
- var css_248z$4 = ".wrapper-Q13-g {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.conf-container-Sm5LL {\n padding-top: 10px;\n background: white;\n color: black;\n height: calc(100% - 40px);\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n position: relative;\n overflow: hidden;\n}\n\n.darkmode .conf-container-Sm5LL {\n border-color: #424242;\n}\n";
45455
+ var languageWrapper = "language-wrapper-43xln";
45456
+ var languageSelect = "language-select-03fGC";
45457
+ var css_248z$4 = ".wrapper-Q13-g {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.conf-container-Sm5LL {\n padding-top: 10px;\n background: white;\n color: black;\n height: calc(100% - 40px);\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n position: relative;\n overflow: hidden;\n}\n\n.darkmode .conf-container-Sm5LL {\n border-color: #424242;\n}\n\n.language-wrapper-43xln {\n display: flex;\n gap: 16px;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.language-select-03fGC {\n z-index: 1000;\n flex: 1;\n max-width: calc(100% - 48px);\n}\n";
44967
45458
  styleInject(css_248z$4);
44968
45459
 
44969
45460
  var wrapper$1 = "wrapper-IcNC5";
44970
45461
  var select$1 = "select-jVMz-";
44971
- var css_248z$3 = ".wrapper-IcNC5 {\n display: flex;\n gap: 16px;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.select-jVMz- {\n z-index: 1000;\n flex: 1;\n max-width: 100% - 48px;\n}\n";
45462
+ var css_248z$3 = ".wrapper-IcNC5 {\n display: flex;\n gap: 16px;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.select-jVMz- {\n z-index: 1000;\n flex: 1;\n max-width: calc(100% - 48px);\n}\n";
44972
45463
  styleInject(css_248z$3);
44973
45464
 
44974
45465
  function ownKeys$5(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; }
@@ -44978,8 +45469,8 @@ var ArticleSelection = function ArticleSelection(_ref) {
44978
45469
  itemList = _ref$state.itemList,
44979
45470
  articleCodex = _ref$state.articleCodex,
44980
45471
  setArticleCodex = _ref$state.setArticleCodex,
44981
- setDoReset = _ref$state.setDoReset,
44982
45472
  mask = _ref$state.mask,
45473
+ serie = _ref$state.serie,
44983
45474
  setArticle = _ref.setArticle;
44984
45475
  var _useTranslation = useTranslation(),
44985
45476
  t = _useTranslation.t;
@@ -45030,6 +45521,7 @@ var ArticleSelection = function ArticleSelection(_ref) {
45030
45521
  return /*#__PURE__*/jsxs("div", {
45031
45522
  className: wrapper$1,
45032
45523
  children: [/*#__PURE__*/jsx(Select$1, {
45524
+ disabled: !(serie !== null && serie !== void 0 && serie.catalogCodex),
45033
45525
  placeholder: t('backoffice.configurator.article.placeholder'),
45034
45526
  value: articleCodex,
45035
45527
  options: groupedArticles,
@@ -45038,17 +45530,15 @@ var ArticleSelection = function ArticleSelection(_ref) {
45038
45530
  setArticle === null || setArticle === void 0 || setArticle(value);
45039
45531
  },
45040
45532
  className: select$1
45041
- }), showPartlistFilter && /*#__PURE__*/jsx(Button, {
45042
- icon: filterPartlist ? /*#__PURE__*/jsx(DatabaseOutlined$1, {}) : /*#__PURE__*/jsx(DatabaseFilled, {}),
45043
- title: t(filterPartlist ? 'configuration.hidepartlist' : 'configuration.showpartlist'),
45044
- onClick: function onClick() {
45045
- return setFilterPartlist(!filterPartlist);
45046
- }
45047
- }), /*#__PURE__*/jsx(Button, {
45048
- icon: /*#__PURE__*/jsx(ReloadOutlined$1, {}),
45049
- onClick: function onClick() {
45050
- return setDoReset(true);
45051
- }
45533
+ }), /*#__PURE__*/jsx(Tooltip$1, {
45534
+ title: !showPartlistFilter ? t('configuration.nopartlist') : t(filterPartlist ? 'configuration.hidepartlist' : 'configuration.showpartlist'),
45535
+ children: /*#__PURE__*/jsx(Button, {
45536
+ icon: filterPartlist ? /*#__PURE__*/jsx(DatabaseOutlined$1, {}) : /*#__PURE__*/jsx(DatabaseFilled, {}),
45537
+ onClick: function onClick() {
45538
+ return setFilterPartlist(!filterPartlist);
45539
+ },
45540
+ disabled: !showPartlistFilter
45541
+ })
45052
45542
  })]
45053
45543
  });
45054
45544
  };
@@ -45057,7 +45547,7 @@ var ArticleSelection$1 = observer(ArticleSelection);
45057
45547
  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; }
45058
45548
  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; }
45059
45549
  function useWysiwyg$1(_ref) {
45060
- var _tool$parameters, _tool$elementProps5;
45550
+ var _tool$parameters, _tool$elementProps, _tool$elementProps6;
45061
45551
  var tool = _ref.tool,
45062
45552
  toolbar = _ref.toolbar;
45063
45553
  var _useDivaCore = useDivaCore(),
@@ -45113,18 +45603,30 @@ function useWysiwyg$1(_ref) {
45113
45603
  _useState22 = _slicedToArray(_useState21, 2),
45114
45604
  serieList = _useState22[0],
45115
45605
  setSerieList = _useState22[1];
45116
- var _useState23 = useState(tool.parameters.catalogId),
45606
+ var availableLanguages = ((_tool$elementProps = tool.elementProps) === null || _tool$elementProps === void 0 ? void 0 : _tool$elementProps.isoLanguageIds) || ['DE'];
45607
+ var _useState23 = useState(function () {
45608
+ var _root$i18n$language;
45609
+ var initialLanguage = ((_root$i18n$language = root.i18n.language) === null || _root$i18n$language === void 0 ? void 0 : _root$i18n$language.toUpperCase()) || 'DE';
45610
+ if (!availableLanguages.includes(initialLanguage)) {
45611
+ initialLanguage = availableLanguages[0];
45612
+ }
45613
+ return initialLanguage;
45614
+ }),
45117
45615
  _useState24 = _slicedToArray(_useState23, 2),
45118
- catalogId = _useState24[0],
45119
- setCatalogId = _useState24[1];
45120
- var _useState25 = useState(),
45616
+ language = _useState24[0],
45617
+ setLanguage = _useState24[1];
45618
+ var _useState25 = useState(tool.parameters.catalogId),
45121
45619
  _useState26 = _slicedToArray(_useState25, 2),
45122
- currentNav = _useState26[0],
45123
- setCurrentNav = _useState26[1];
45620
+ catalogId = _useState26[0],
45621
+ setCatalogId = _useState26[1];
45124
45622
  var _useState27 = useState(),
45125
45623
  _useState28 = _slicedToArray(_useState27, 2),
45126
- doNavigate = _useState28[0],
45127
- setDoNavigate = _useState28[1];
45624
+ currentNav = _useState28[0],
45625
+ setCurrentNav = _useState28[1];
45626
+ var _useState29 = useState(),
45627
+ _useState30 = _slicedToArray(_useState29, 2),
45628
+ doNavigate = _useState30[0],
45629
+ setDoNavigate = _useState30[1];
45128
45630
  useEffect(function () {
45129
45631
  if (!toolbar.hidden) setDoReset(true);
45130
45632
  }, [toolbar.hidden]);
@@ -45252,14 +45754,14 @@ function useWysiwyg$1(_ref) {
45252
45754
  };
45253
45755
  }();
45254
45756
  useEffect(function () {
45255
- var _tool$elementProps;
45256
- if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.onlyPlaceholder) return;
45757
+ var _tool$elementProps2;
45758
+ if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.onlyPlaceholder) return;
45257
45759
  if (doReset) {
45258
- var _tool$elementProps2, _tool$elementProps4;
45760
+ var _tool$elementProps3, _tool$elementProps5;
45259
45761
  if (currentNav) setDoNavigate(currentNav);
45260
- if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.showCatalogSelection && !serieList.length) {
45261
- var _tool$elementProps3;
45262
- if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.loadPackage) {
45762
+ if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.showCatalogSelection && !serieList.length) {
45763
+ var _tool$elementProps4;
45764
+ if ((_tool$elementProps4 = tool.elementProps) !== null && _tool$elementProps4 !== void 0 && _tool$elementProps4.loadPackage) {
45263
45765
  setLoadingPackage(true);
45264
45766
  loadPackage(tool.parameters.packageId).then(function () {
45265
45767
  return setLoadingPackage(false);
@@ -45271,7 +45773,7 @@ function useWysiwyg$1(_ref) {
45271
45773
  });
45272
45774
  }
45273
45775
  }
45274
- if ((_tool$elementProps4 = tool.elementProps) !== null && _tool$elementProps4 !== void 0 && _tool$elementProps4.loadMask) {
45776
+ if ((_tool$elementProps5 = tool.elementProps) !== null && _tool$elementProps5 !== void 0 && _tool$elementProps5.loadMask) {
45275
45777
  setLoadingMask(true);
45276
45778
  loadMask(tool.parameters.packageId).then(function () {
45277
45779
  setLoadingMask(false);
@@ -45281,7 +45783,7 @@ function useWysiwyg$1(_ref) {
45281
45783
  setDoReset(false);
45282
45784
  }
45283
45785
  }
45284
- }, [doReset, (_tool$elementProps5 = tool.elementProps) === null || _tool$elementProps5 === void 0 ? void 0 : _tool$elementProps5.onlyPlaceholder]);
45786
+ }, [doReset, (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.onlyPlaceholder]);
45285
45787
  useEffect(function () {
45286
45788
  setArticleCodex(undefined);
45287
45789
  if (serie !== null && serie !== void 0 && serie.catalogCodex) {
@@ -45343,9 +45845,9 @@ function useWysiwyg$1(_ref) {
45343
45845
  };
45344
45846
  }, [articleCodex]);
45345
45847
  var settings = useMemo(function () {
45346
- var _tool$elementProps6, _tool$elementProps7, _tool$elementProps8;
45848
+ var _tool$elementProps7, _tool$elementProps8, _tool$elementProps9;
45347
45849
  return {
45348
- language: 'DE',
45850
+ language: language,
45349
45851
  showSelectionModeZero: true,
45350
45852
  dontLoadAdditionalModelInfos: true,
45351
45853
  onErrorHandling: {
@@ -45395,14 +45897,13 @@ function useWysiwyg$1(_ref) {
45395
45897
  sizeGallery: '50px',
45396
45898
  sizeDefault: '240px'
45397
45899
  },
45398
- pricePreview: 'fromCurrentPrice',
45399
45900
  hideConfigFoldArrow: true,
45400
45901
  tooltipPosition: 'left-center',
45401
45902
  clientEvents: ['onWebPlanerConfigChange', 'onArticlesLoaded']
45402
45903
  },
45403
- useIDMService: (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.useIDMService,
45404
- useEnricherService: (_tool$elementProps7 = tool.elementProps) === null || _tool$elementProps7 === void 0 ? void 0 : _tool$elementProps7.useEnricherService,
45405
- useMask: (_tool$elementProps8 = tool.elementProps) === null || _tool$elementProps8 === void 0 ? void 0 : _tool$elementProps8.loadMask,
45904
+ useIDMService: (_tool$elementProps7 = tool.elementProps) === null || _tool$elementProps7 === void 0 ? void 0 : _tool$elementProps7.useIDMService,
45905
+ useEnricherService: (_tool$elementProps8 = tool.elementProps) === null || _tool$elementProps8 === void 0 ? void 0 : _tool$elementProps8.useEnricherService,
45906
+ useMask: (_tool$elementProps9 = tool.elementProps) === null || _tool$elementProps9 === void 0 ? void 0 : _tool$elementProps9.loadMask,
45406
45907
  templateConfig: {
45407
45908
  Layout: 'wysiwyg',
45408
45909
  NavigationButton: 'standard',
@@ -45422,7 +45923,7 @@ function useWysiwyg$1(_ref) {
45422
45923
  ProductHeaderFunction: 'standard'
45423
45924
  }
45424
45925
  };
45425
- }, []);
45926
+ }, [language]);
45426
45927
  useEffect(function () {
45427
45928
  if (isLoadingPackage) {
45428
45929
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.package'));
@@ -45430,12 +45931,17 @@ function useWysiwyg$1(_ref) {
45430
45931
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.catalog'));
45431
45932
  } else if (isLoadingMask) {
45432
45933
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.mask'));
45433
- } else if (isLoadingArticles) {
45934
+ } else if (isLoadingArticles && serie !== null && serie !== void 0 && serie.catalogCodex) {
45935
+ // Only show article-loading text once a serie is selected
45434
45936
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.articles'));
45435
45937
  } else {
45436
45938
  setLoadingText(undefined);
45437
45939
  }
45438
- }, [isLoadingPackage, isLoadingCatalog, isLoadingMask, isLoadingArticles]);
45940
+ }, [isLoadingPackage, isLoadingCatalog, isLoadingMask, isLoadingArticles, serie === null || serie === void 0 ? void 0 : serie.catalogCodex]);
45941
+ var onSetLanguage = function onSetLanguage(lang) {
45942
+ setLanguage(lang);
45943
+ setDoReset(true);
45944
+ };
45439
45945
  return {
45440
45946
  itemList: itemList,
45441
45947
  setItemList: setItemList,
@@ -45452,7 +45958,10 @@ function useWysiwyg$1(_ref) {
45452
45958
  doNavigate: doNavigate,
45453
45959
  setDoNavigate: setDoNavigate,
45454
45960
  catalogId: catalogId,
45455
- loadingText: loadingText
45961
+ loadingText: loadingText,
45962
+ language: language,
45963
+ setLanguage: onSetLanguage,
45964
+ availableLanguages: availableLanguages
45456
45965
  };
45457
45966
  }
45458
45967
 
@@ -45552,7 +46061,7 @@ var CatalogSelection$1 = observer(CatalogSelection);
45552
46061
  function ownKeys$3(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; }
45553
46062
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
45554
46063
  var Wsyiwyg = function Wsyiwyg(_ref) {
45555
- var _state$serie, _tool$parameters, _state$articleCodex, _state$serie$catalogC, _state$serie2, _state$mask2, _state$serie3, _state$serie$accountI, _state$serie4, _state$mask3;
46064
+ var _state$serie, _state$serie2, _state$serie3, _state$serie4, _tool$parameters, _state$articleCodex, _state$serie$catalogC, _state$serie5, _state$mask2, _state$serie6, _state$serie$accountI, _state$serie7, _state$mask3;
45556
46065
  var tool = _ref.tool,
45557
46066
  toolbar = _ref.toolbar;
45558
46067
  var _useDivaCore = useDivaCore(),
@@ -45597,14 +46106,6 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45597
46106
  state.setArticleCodex(tool.elementProps.initItem);
45598
46107
  }
45599
46108
  }, [tool.elementProps.initItem, tool.elementProps.initSerie, state.serieList]);
45600
- if (!((_state$serie = state.serie) !== null && _state$serie !== void 0 && _state$serie.catalogCodex)) {
45601
- if (tool.elementProps.showCatalogSelection) {
45602
- return /*#__PURE__*/jsx(CatalogSelection$1, {
45603
- state: state,
45604
- setSerie: tool.elementProps.setSerie
45605
- });
45606
- }
45607
- }
45608
46109
  if (tool.elementProps.onlyPlaceholder) {
45609
46110
  return /*#__PURE__*/jsx("div", {});
45610
46111
  }
@@ -45618,13 +46119,37 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45618
46119
  errorCode: "BACKO_0004",
45619
46120
  children: /*#__PURE__*/jsxs("div", {
45620
46121
  className: wrapper$2,
45621
- children: [!state.loadingText && /*#__PURE__*/jsxs(Fragment, {
45622
- children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
45623
- state: state,
45624
- setSerie: tool.elementProps.setSerie
45625
- }), /*#__PURE__*/jsx(ArticleSelection$1, {
45626
- state: state,
45627
- setArticle: tool.elementProps.setArticle
46122
+ children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
46123
+ state: state,
46124
+ setSerie: tool.elementProps.setSerie
46125
+ }), ((_state$serie = state.serie) === null || _state$serie === void 0 ? void 0 : _state$serie.catalogCodex) && /*#__PURE__*/jsx(ArticleSelection$1, {
46126
+ state: state,
46127
+ setArticle: tool.elementProps.setArticle
46128
+ }), ((_state$serie2 = state.serie) === null || _state$serie2 === void 0 ? void 0 : _state$serie2.catalogCodex) && /*#__PURE__*/jsxs("div", {
46129
+ className: languageWrapper,
46130
+ children: [/*#__PURE__*/jsx(Select$1, {
46131
+ className: languageSelect,
46132
+ disabled: !((_state$serie3 = state.serie) !== null && _state$serie3 !== void 0 && _state$serie3.catalogCodex),
46133
+ placeholder: t('backoffice.configurator.language.placeholder'),
46134
+ value: state.language,
46135
+ options: state.availableLanguages.map(function (lang) {
46136
+ return {
46137
+ label: t('language.' + lang.toLowerCase()),
46138
+ value: lang
46139
+ };
46140
+ }),
46141
+ onChange: function onChange(value) {
46142
+ return state.setLanguage(value);
46143
+ }
46144
+ }), /*#__PURE__*/jsx(Tooltip$1, {
46145
+ title: t('backoffice.configurator.language.reload'),
46146
+ children: /*#__PURE__*/jsx(Button, {
46147
+ icon: /*#__PURE__*/jsx(ReloadOutlined$1, {}),
46148
+ onClick: function onClick() {
46149
+ return state.setDoReset(true);
46150
+ },
46151
+ disabled: !((_state$serie4 = state.serie) !== null && _state$serie4 !== void 0 && _state$serie4.catalogCodex)
46152
+ })
45628
46153
  })]
45629
46154
  }), state.loadingText && /*#__PURE__*/jsx("div", {
45630
46155
  children: state.loadingText
@@ -45642,17 +46167,18 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45642
46167
  resetArticle: '',
45643
46168
  disableToggle: '1',
45644
46169
  startDivaNr: 'DIVA-000000',
45645
- catalogCodex: (_state$serie$catalogC = (_state$serie2 = state.serie) === null || _state$serie2 === void 0 ? void 0 : _state$serie2.catalogCodex) !== null && _state$serie$catalogC !== void 0 ? _state$serie$catalogC : (_state$mask2 = state.mask) === null || _state$mask2 === void 0 ? void 0 : _state$mask2.catalogCodex
45646
- }, (_state$serie3 = state.serie) !== null && _state$serie3 !== void 0 && _state$serie3.serieId ? {
46170
+ catalogCodex: (_state$serie$catalogC = (_state$serie5 = state.serie) === null || _state$serie5 === void 0 ? void 0 : _state$serie5.catalogCodex) !== null && _state$serie$catalogC !== void 0 ? _state$serie$catalogC : (_state$mask2 = state.mask) === null || _state$mask2 === void 0 ? void 0 : _state$mask2.catalogCodex
46171
+ }, (_state$serie6 = state.serie) !== null && _state$serie6 !== void 0 && _state$serie6.serieId ? {
45647
46172
  serieId: state.serie.serieId
45648
46173
  } : {}), {}, {
45649
- accountGuid: (_state$serie$accountI = (_state$serie4 = state.serie) === null || _state$serie4 === void 0 ? void 0 : _state$serie4.accountId) !== null && _state$serie$accountI !== void 0 ? _state$serie$accountI : (_state$mask3 = state.mask) === null || _state$mask3 === void 0 ? void 0 : _state$mask3.accountId,
46174
+ accountGuid: (_state$serie$accountI = (_state$serie7 = state.serie) === null || _state$serie7 === void 0 ? void 0 : _state$serie7.accountId) !== null && _state$serie$accountI !== void 0 ? _state$serie$accountI : (_state$mask3 = state.mask) === null || _state$mask3 === void 0 ? void 0 : _state$mask3.accountId,
45650
46175
  returnTo: 'DONT_SAVE_BASKET',
45651
46176
  organizationId: organizationId,
45652
46177
  no3DConnection: 'true'
45653
46178
  }),
45654
46179
  internal: {
45655
46180
  catalogMask: state.mask,
46181
+ language: state.language,
45656
46182
  actions: {
45657
46183
  toggleLoading: function toggleLoading(subId, _, toggle) {
45658
46184
  return toolbar.toggleLoading(tool.id, subId, toggle);