@crystaldesign/diva-backoffice 25.14.0-beta.9 → 25.15.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/build/esm/index.js +748 -232
  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/PartlistPos.d.ts.map +1 -1
  15. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts.map +1 -1
  16. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts.map +1 -1
  17. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts.map +1 -1
  18. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
  19. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts +5 -0
  20. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts.map +1 -0
  21. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts +9 -0
  22. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts.map +1 -0
  23. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts +5 -0
  24. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts.map +1 -0
  25. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts +5 -0
  26. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts.map +1 -0
  27. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts +6 -0
  28. package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts.map +1 -0
  29. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts +5 -0
  30. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts.map +1 -0
  31. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts +9 -0
  32. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts.map +1 -0
  33. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts +5 -0
  34. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts.map +1 -0
  35. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts +5 -0
  36. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts.map +1 -0
  37. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts +6 -0
  38. package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts.map +1 -0
  39. package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
  40. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/MediaViewerCell/index.d.ts.map +1 -1
  41. package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
  42. package/package.json +9 -9
@@ -3899,7 +3899,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
3899
3899
  rule: [{
3900
3900
  match: {
3901
3901
  sourceField: 'catalogItem',
3902
- value: undefined
3902
+ value: null
3903
3903
  }
3904
3904
  }],
3905
3905
  download: [{
@@ -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
  });
@@ -34762,7 +34830,7 @@ var RenamingTable = observer(function (_ref) {
34762
34830
  setSelectedSerie = _useModule.setSelectedSerie,
34763
34831
  viewOnly = _useModule.viewOnly;
34764
34832
  var _useTools = useTools({
34765
- packageId: packageId,
34833
+ enricherPackage: selectedPackage,
34766
34834
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
34767
34835
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
34768
34836
  setArticle: setSelectedItem,
@@ -35364,7 +35432,7 @@ var ExclusivityTable = observer(function (_ref) {
35364
35432
  selectedItem = _useModule.selectedItem,
35365
35433
  viewOnly = _useModule.viewOnly;
35366
35434
  var _useTools = useTools({
35367
- packageId: packageId,
35435
+ enricherPackage: selectedPackage,
35368
35436
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35369
35437
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
35370
35438
  setArticle: setSelectedItem,
@@ -35500,7 +35568,7 @@ var TableTabGroups = observer(function () {
35500
35568
  selectedPackage = _useModule.selectedPackage,
35501
35569
  viewOnly = _useModule.viewOnly;
35502
35570
  useTools({
35503
- packageId: packageId,
35571
+ enricherPackage: selectedPackage,
35504
35572
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35505
35573
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35506
35574
  });
@@ -35606,7 +35674,7 @@ var TablePartlistPos = observer(function () {
35606
35674
  selectedPackage = _useModule.selectedPackage,
35607
35675
  viewOnly = _useModule.viewOnly;
35608
35676
  useTools({
35609
- packageId: packageId,
35677
+ enricherPackage: selectedPackage,
35610
35678
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
35611
35679
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
35612
35680
  });
@@ -37078,7 +37146,7 @@ var TablePriceList = observer(function () {
37078
37146
  selectedNodeId = _React$useState4[0],
37079
37147
  setSelectedNodeId = _React$useState4[1];
37080
37148
  useTools({
37081
- packageId: packageId,
37149
+ enricherPackage: selectedPackage,
37082
37150
  isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
37083
37151
  onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
37084
37152
  });
@@ -37369,10 +37437,10 @@ function IDMEnricherEditor (_ref) {
37369
37437
  display: 'flex',
37370
37438
  flexDirection: 'column'
37371
37439
  },
37372
- children: /*#__PURE__*/jsx(Content$5, {})
37440
+ children: /*#__PURE__*/jsx(Content$7, {})
37373
37441
  });
37374
37442
  }
37375
- function Content$5() {
37443
+ function Content$7() {
37376
37444
  return /*#__PURE__*/jsxs(Routes, {
37377
37445
  children: [/*#__PURE__*/jsx(Route, {
37378
37446
  index: true,
@@ -38978,6 +39046,16 @@ var TableCatalogs = observer(function () {
38978
39046
  headerName: 'backoffice.idmCatalog.general.label.postBox',
38979
39047
  field: 'postBox',
38980
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
+ }
38981
39059
  }, {
38982
39060
  headerName: 'backoffice.idmCatalog.general.label.telephone',
38983
39061
  field: 'telephoneSwitchboard',
@@ -39105,11 +39183,13 @@ var TableCatalogs = observer(function () {
39105
39183
  children: [{
39106
39184
  headerName: 'backoffice.idmCatalog.general.label.priceTypeNo',
39107
39185
  field: 'priceTypeNo',
39108
- cellDataType: 'number'
39186
+ cellDataType: 'number',
39187
+ required: true
39109
39188
  }, {
39110
39189
  headerName: 'backoffice.idmCatalog.general.label.widthX',
39111
39190
  field: 'widthX',
39112
39191
  cellDataType: 'enum',
39192
+ required: true,
39113
39193
  customParams: {
39114
39194
  enumData: priceDependent,
39115
39195
  displayLabelTemplate: '${name} (${value})'
@@ -39118,6 +39198,7 @@ var TableCatalogs = observer(function () {
39118
39198
  headerName: 'backoffice.idmCatalog.general.label.depthY',
39119
39199
  field: 'depthY',
39120
39200
  cellDataType: 'enum',
39201
+ required: true,
39121
39202
  customParams: {
39122
39203
  enumData: priceDependent,
39123
39204
  displayLabelTemplate: '${name} (${value})'
@@ -39126,6 +39207,7 @@ var TableCatalogs = observer(function () {
39126
39207
  headerName: 'backoffice.idmCatalog.general.label.heightZ',
39127
39208
  field: 'heightZ',
39128
39209
  cellDataType: 'enum',
39210
+ required: true,
39129
39211
  customParams: {
39130
39212
  enumData: priceDependent,
39131
39213
  displayLabelTemplate: '${name} (${value})'
@@ -39134,6 +39216,7 @@ var TableCatalogs = observer(function () {
39134
39216
  headerName: 'backoffice.idmCatalog.general.label.basicUnit',
39135
39217
  field: 'basicUnit',
39136
39218
  cellDataType: 'enum',
39219
+ required: true,
39137
39220
  customParams: {
39138
39221
  enumData: unit,
39139
39222
  displayLabelTemplate: '${name} (${value})'
@@ -39142,6 +39225,7 @@ var TableCatalogs = observer(function () {
39142
39225
  headerName: 'backoffice.idmCatalog.general.label.roundingUnit',
39143
39226
  field: 'roundingUnit',
39144
39227
  cellDataType: 'enum',
39228
+ required: true,
39145
39229
  customParams: {
39146
39230
  enumData: unit,
39147
39231
  displayLabelTemplate: '${name} (${value})'
@@ -39150,6 +39234,7 @@ var TableCatalogs = observer(function () {
39150
39234
  headerName: 'backoffice.idmCatalog.general.label.roundingType',
39151
39235
  field: 'roundingType',
39152
39236
  cellDataType: 'enum',
39237
+ required: true,
39153
39238
  customParams: {
39154
39239
  enumData: roundingType,
39155
39240
  displayLabelTemplate: '${name} (${value})'
@@ -39157,7 +39242,8 @@ var TableCatalogs = observer(function () {
39157
39242
  }, {
39158
39243
  headerName: 'backoffice.idmCatalog.general.label.basicPriceDependent',
39159
39244
  field: 'basicPriceDependent',
39160
- cellDataType: 'boolean'
39245
+ cellDataType: 'boolean',
39246
+ required: true
39161
39247
  }, {
39162
39248
  headerName: 'backoffice.idmCatalog.general.label.priceTypeFormula',
39163
39249
  field: 'priceTypeFormula'
@@ -40113,7 +40199,7 @@ var TableItems = observer(function () {
40113
40199
  apiConfig = _useModule.apiConfig,
40114
40200
  organizationId = _useModule.organizationId;
40115
40201
  useTools({
40116
- catalogId: catalogId,
40202
+ catalog: selectedCatalog,
40117
40203
  serie: selectedSerie,
40118
40204
  setSerie: setSelectedSerie,
40119
40205
  setArticle: setSelectedItem,
@@ -40198,7 +40284,7 @@ var TableSeries = observer(function () {
40198
40284
  setSelectedSerie = _React$useState2[1];
40199
40285
  useTools({
40200
40286
  mainInformationWindowCodex: 'IDM_SERIES_TABLE_INFO',
40201
- catalogId: catalogId,
40287
+ catalog: selectedCatalog,
40202
40288
  serie: selectedGlobalSerie,
40203
40289
  setSerie: setGlobalSelectedSerie,
40204
40290
  conditionalTools: [{
@@ -40208,7 +40294,7 @@ var TableSeries = observer(function () {
40208
40294
  elementProps: {
40209
40295
  organizationId: organizationId,
40210
40296
  selectedCatalog: selectedCatalog,
40211
- selectedSerie: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id,
40297
+ selectedSerie: selectedSerie,
40212
40298
  apiConfig: apiConfig
40213
40299
  },
40214
40300
  condition: function condition() {
@@ -40398,7 +40484,7 @@ var TableSeries = observer(function () {
40398
40484
  });
40399
40485
  });
40400
40486
 
40401
- var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40487
+ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40402
40488
  var organizationId = _ref.organizationId,
40403
40489
  selectedCatalog = _ref.selectedCatalog,
40404
40490
  featureClassId = _ref.featureClassId,
@@ -40472,7 +40558,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40472
40558
  displayLabelTemplate: '${value}',
40473
40559
  lookupLabelTemplate: '${name} (${value})',
40474
40560
  apiInterface: {
40475
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
40561
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
40476
40562
  },
40477
40563
  lookupKey: 'featureNo',
40478
40564
  lookupValue: 'featureText',
@@ -40590,7 +40676,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40590
40676
  }, featureClassId ? featureClassId : 'features');
40591
40677
  });
40592
40678
 
40593
- function Features(_ref) {
40679
+ function Features$1(_ref) {
40594
40680
  var readOnly = _ref.readOnly;
40595
40681
  var _useTranslation = useTranslation();
40596
40682
  _useTranslation.t;
@@ -40654,7 +40740,7 @@ function Features(_ref) {
40654
40740
  }, 'features');
40655
40741
  }
40656
40742
 
40657
- var TableFeatures$1 = observer(function () {
40743
+ var TableFeatures$2 = observer(function () {
40658
40744
  var _useDivaCore = useDivaCore(),
40659
40745
  jwt = _useDivaCore.state.jwt;
40660
40746
  var _useTranslation = useTranslation(),
@@ -40667,13 +40753,13 @@ var TableFeatures$1 = observer(function () {
40667
40753
  setSelectedSerie = _useModule.setSelectedSerie,
40668
40754
  setSelectedItem = _useModule.setSelectedItem;
40669
40755
  var _useTools = useTools({
40670
- catalogId: catalogId,
40756
+ catalog: selectedCatalog,
40671
40757
  setSerie: setSelectedSerie,
40672
40758
  setArticle: setSelectedItem,
40673
40759
  conditionalTools: [{
40674
40760
  id: 'globalfeatures',
40675
40761
  name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
40676
- elementComponent: Features,
40762
+ elementComponent: Features$1,
40677
40763
  elementProps: {
40678
40764
  readOnly: true
40679
40765
  },
@@ -40754,7 +40840,7 @@ var TableFeatures$1 = observer(function () {
40754
40840
  })]
40755
40841
  })]
40756
40842
  })
40757
- }), selectedCatalog && /*#__PURE__*/jsx(Features$1, {
40843
+ }), selectedCatalog && /*#__PURE__*/jsx(Features$2, {
40758
40844
  organizationId: organizationId,
40759
40845
  selectedCatalog: selectedCatalog,
40760
40846
  hooks: hooks,
@@ -40764,7 +40850,7 @@ var TableFeatures$1 = observer(function () {
40764
40850
  });
40765
40851
  });
40766
40852
 
40767
- var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40853
+ var Options$1 = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40768
40854
  var organizationId = _ref.organizationId,
40769
40855
  selectedCatalog = _ref.selectedCatalog,
40770
40856
  apiConfig = _ref.apiConfig,
@@ -40928,7 +41014,7 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
40928
41014
  });
40929
41015
  });
40930
41016
 
40931
- var TableOptions = observer(function () {
41017
+ var TableOptions$1 = observer(function () {
40932
41018
  var _selectedCatalog$name;
40933
41019
  var _useTranslation = useTranslation(),
40934
41020
  t = _useTranslation.t;
@@ -40942,7 +41028,7 @@ var TableOptions = observer(function () {
40942
41028
  setSelectedSerie = _useModule.setSelectedSerie,
40943
41029
  setSelectedItem = _useModule.setSelectedItem;
40944
41030
  var _useTools = useTools({
40945
- catalogId: catalogId,
41031
+ catalog: selectedCatalog,
40946
41032
  setSerie: setSelectedSerie,
40947
41033
  setArticle: setSelectedItem
40948
41034
  }),
@@ -40999,7 +41085,7 @@ var TableOptions = observer(function () {
40999
41085
  })]
41000
41086
  })]
41001
41087
  })
41002
- }), selectedCatalog && /*#__PURE__*/jsx(Options, {
41088
+ }), selectedCatalog && /*#__PURE__*/jsx(Options$1, {
41003
41089
  organizationId: organizationId,
41004
41090
  selectedCatalog: selectedCatalog,
41005
41091
  hooks: hooks,
@@ -41024,13 +41110,13 @@ var TableFeatureClasses = observer(function () {
41024
41110
  selectedFeatureClass = _React$useState2[0],
41025
41111
  setSelectedFeatureClass = _React$useState2[1];
41026
41112
  useTools({
41027
- catalogId: catalogId,
41113
+ catalog: selectedCatalog,
41028
41114
  setSerie: setSelectedSerie,
41029
41115
  setArticle: setSelectedItem,
41030
41116
  conditionalTools: [{
41031
41117
  id: 'features',
41032
41118
  name: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
41033
- elementComponent: Features$1,
41119
+ elementComponent: Features$2,
41034
41120
  elementProps: {
41035
41121
  organizationId: organizationId,
41036
41122
  selectedCatalog: selectedCatalog,
@@ -41716,7 +41802,7 @@ function OptionCombinations(_ref) {
41716
41802
  editorElementProps: {
41717
41803
  nameField: 'featureRefsDisplayTexts',
41718
41804
  apiInterface: {
41719
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
41805
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41720
41806
  },
41721
41807
  filter: function filter(_, lookupData) {
41722
41808
  var _decision$featureRefs8;
@@ -41741,14 +41827,36 @@ function OptionCombinations(_ref) {
41741
41827
  },
41742
41828
  defaultValue: []
41743
41829
  }] : decision.decisionType == 3 ? [{
41744
- headerName: 'backoffice.idmCatalog.optionCombinations.label.actions',
41830
+ headerName: 'backoffice.idmCatalog.optionCombinations.label.setPosCountValue',
41745
41831
  field: 'actions',
41746
- cellDataType: 'array',
41747
- 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']
41748
41855
  }] : []), [{
41749
41856
  headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
41750
41857
  field: 'sequence',
41751
- cellDataType: 'number'
41858
+ cellDataType: 'number',
41859
+ required: true
41752
41860
  }, {
41753
41861
  headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
41754
41862
  field: 'lastUpdatedDate',
@@ -41772,13 +41880,6 @@ function OptionCombinations(_ref) {
41772
41880
  field: '_id',
41773
41881
  editable: false,
41774
41882
  cellDataType: 'objectId'
41775
- }, {
41776
- field: 'organizationId',
41777
- editable: false,
41778
- hide: true,
41779
- lockVisible: true,
41780
- suppressColumnsToolPanel: true,
41781
- defaultValue: '${organizationId}'
41782
41883
  }, {
41783
41884
  field: 'catalogId',
41784
41885
  editable: false,
@@ -41825,7 +41926,7 @@ var TableDecisions = observer(function () {
41825
41926
  spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
41826
41927
  }, [selectedNodeId]);
41827
41928
  useTools({
41828
- catalogId: catalogId,
41929
+ catalog: selectedCatalog,
41829
41930
  setSerie: setSelectedSerie,
41830
41931
  setArticle: setSelectedItem,
41831
41932
  conditionalTools: [{
@@ -41935,7 +42036,7 @@ var TableDecisions = observer(function () {
41935
42036
  nameField: 'featureRefsDisplayTexts',
41936
42037
  displayLabelTemplate: '${name} (${value})',
41937
42038
  apiInterface: {
41938
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42039
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41939
42040
  },
41940
42041
  lookupValue: 'featureText',
41941
42042
  lookupKey: 'featureNo',
@@ -42038,7 +42139,7 @@ var TableDetailInfos = observer(function () {
42038
42139
  selectedMedia = _React$useState2[0],
42039
42140
  setSelectedMedia = _React$useState2[1];
42040
42141
  useTools({
42041
- catalogId: catalogId,
42142
+ catalog: selectedCatalog,
42042
42143
  setSerie: setSelectedSerie,
42043
42144
  setArticle: setSelectedItem,
42044
42145
  conditionalTools: [{
@@ -42254,6 +42355,7 @@ function PartlistPos(_ref) {
42254
42355
  cellDataType: 'number'
42255
42356
  }, {
42256
42357
  field: 'itemRefSerieNo',
42358
+ required: true,
42257
42359
  headerName: 'backoffice.idmCatalog.partlistpos.label.itemRefSerieNo',
42258
42360
  cellDataType: 'lookup',
42259
42361
  editable: true,
@@ -42281,6 +42383,7 @@ function PartlistPos(_ref) {
42281
42383
  isDictionary: true
42282
42384
  }, {
42283
42385
  field: 'itemRefTypeNo',
42386
+ required: true,
42284
42387
  headerName: 'backoffice.idmCatalog.partlistpos.label.itemRefTypeNo',
42285
42388
  cellDataType: 'lookup',
42286
42389
  customParams: {
@@ -42297,8 +42400,9 @@ function PartlistPos(_ref) {
42297
42400
  additionalFields: ['itemRefTypeNoDisplayText'],
42298
42401
  isDictionary: true,
42299
42402
  editable: function editable(_ref2) {
42300
- var data = _ref2.data;
42301
- 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;
42302
42406
  }
42303
42407
  }, {
42304
42408
  field: 'decisions',
@@ -42464,7 +42568,7 @@ var TablePartlists = observer(function () {
42464
42568
  selectedPartlist = _React$useState2[0],
42465
42569
  setSelectedPartlist = _React$useState2[1];
42466
42570
  useTools({
42467
- catalogId: catalogId,
42571
+ catalog: selectedCatalog,
42468
42572
  setSerie: setSelectedSerie,
42469
42573
  setArticle: setSelectedItem,
42470
42574
  conditionalTools: [{
@@ -42687,7 +42791,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42687
42791
  editorElementProps: {
42688
42792
  nameField: 'featureNosDisplayTexts',
42689
42793
  apiInterface: {
42690
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42794
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42691
42795
  },
42692
42796
  filter: function filter(_, lookupData) {
42693
42797
  var _priceFeatureGroup$fe7;
@@ -42706,15 +42810,39 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42706
42810
  }, {
42707
42811
  headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
42708
42812
  field: 'sequence',
42709
- cellDataType: 'number'
42813
+ cellDataType: 'number',
42814
+ required: true
42710
42815
  }, {
42711
42816
  headerName: 'backoffice.idmCatalog.priceFeatureGroupPercentageSurcharge.label.priceFactor',
42712
42817
  field: 'priceFactor',
42713
- cellDataType: 'number'
42818
+ cellDataType: 'number',
42819
+ required: true
42714
42820
  }, {
42715
42821
  headerName: 'backoffice.idmCatalog.priceFeatureGroupPercentageSurcharge.label.priceFeatureGroups',
42716
- field: 'priceFeatureGroups',
42717
- 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']
42718
42846
  }, {
42719
42847
  headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.validFromDate',
42720
42848
  field: 'validFromDate',
@@ -42747,20 +42875,6 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
42747
42875
  field: '_id',
42748
42876
  editable: false,
42749
42877
  cellDataType: 'objectId'
42750
- }, {
42751
- field: 'organizationId',
42752
- editable: false,
42753
- hide: true,
42754
- lockVisible: true,
42755
- suppressColumnsToolPanel: true,
42756
- defaultValue: '${organizationId}'
42757
- }, {
42758
- field: 'catalogId',
42759
- editable: false,
42760
- hide: true,
42761
- lockVisible: true,
42762
- suppressColumnsToolPanel: true,
42763
- defaultValue: '${catalogId}'
42764
42878
  }, {
42765
42879
  field: 'optionsSetRefs',
42766
42880
  hide: true,
@@ -42874,7 +42988,7 @@ function PriceFeatureGroupFinishes(_ref) {
42874
42988
  editorElementProps: {
42875
42989
  nameField: 'featureNosDisplayTexts',
42876
42990
  apiInterface: {
42877
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
42991
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
42878
42992
  },
42879
42993
  filter: function filter(_, lookupData) {
42880
42994
  var _priceFeatureGroup$fe7;
@@ -42996,7 +43110,7 @@ var TablePriceFeatureGroups = observer(function () {
42996
43110
  return (_spreadsheetRef$curre = spreadsheetRef.current) === null || _spreadsheetRef$curre === void 0 ? void 0 : _spreadsheetRef$curre.setNodeDataValue(selectedNodeId, data);
42997
43111
  }, [selectedNodeId]);
42998
43112
  useTools({
42999
- catalogId: catalogId,
43113
+ catalog: selectedCatalog,
43000
43114
  setSerie: setSelectedSerie,
43001
43115
  setArticle: setSelectedItem,
43002
43116
  conditionalTools: [{
@@ -43025,7 +43139,7 @@ var TablePriceFeatureGroups = observer(function () {
43025
43139
  setNodeDataValue: setNodeDataValue,
43026
43140
  setIsPercentage: setIsPercentage
43027
43141
  },
43028
- disabled: isPercentage === false,
43142
+ disabled: isPercentage === false || (selectedPriceFeatureGroup === null || selectedPriceFeatureGroup === void 0 ? void 0 : selectedPriceFeatureGroup.additionalPrice) == false,
43029
43143
  condition: function condition() {
43030
43144
  return (selectedPriceFeatureGroup === null || selectedPriceFeatureGroup === void 0 ? void 0 : selectedPriceFeatureGroup._id) !== undefined;
43031
43145
  }
@@ -43192,7 +43306,7 @@ var TablePrices = observer(function () {
43192
43306
  apiConfig = _useModule.apiConfig,
43193
43307
  organizationId = _useModule.organizationId;
43194
43308
  useTools({
43195
- catalogId: catalogId,
43309
+ catalog: selectedCatalog,
43196
43310
  serie: selectedSerie,
43197
43311
  setSerie: setSelectedSerie,
43198
43312
  setArticle: setSelectedItem,
@@ -43228,6 +43342,7 @@ var TablePrices = observer(function () {
43228
43342
  cellDataType: 'lookup',
43229
43343
  customParams: {
43230
43344
  nameField: 'typeNo',
43345
+ filterCellType: 'objectId',
43231
43346
  displayLabelTemplate: '${name} (${value})',
43232
43347
  apiInterface: {
43233
43348
  read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/items'
@@ -43235,7 +43350,7 @@ var TablePrices = observer(function () {
43235
43350
  lookupValue: 'typeNo',
43236
43351
  lookupKey: '_id',
43237
43352
  multiple: false,
43238
- translated: true
43353
+ translated: false
43239
43354
  },
43240
43355
  additionalFields: ['typeNo'],
43241
43356
  editable: false
@@ -43414,7 +43529,7 @@ var TableOptionGroups = observer(function () {
43414
43529
  selectedOptionGroup = _React$useState2[0],
43415
43530
  setSelectedOptionGroup = _React$useState2[1];
43416
43531
  useTools({
43417
- catalogId: catalogId,
43532
+ catalog: selectedCatalog,
43418
43533
  setSerie: setSelectedSerie,
43419
43534
  setArticle: setSelectedItem,
43420
43535
  conditionalTools: [{
@@ -43517,10 +43632,10 @@ function IDMCatalogEditor (_ref) {
43517
43632
  display: 'flex',
43518
43633
  flexDirection: 'column'
43519
43634
  },
43520
- children: /*#__PURE__*/jsx(Content$4, {})
43635
+ children: /*#__PURE__*/jsx(Content$6, {})
43521
43636
  });
43522
43637
  }
43523
- function Content$4() {
43638
+ function Content$6() {
43524
43639
  return /*#__PURE__*/jsxs(Routes, {
43525
43640
  children: [/*#__PURE__*/jsx(Route, {
43526
43641
  index: true,
@@ -43533,10 +43648,10 @@ function Content$4() {
43533
43648
  element: /*#__PURE__*/jsx(TableItems, {})
43534
43649
  }), /*#__PURE__*/jsx(Route, {
43535
43650
  path: ":catalogId/features",
43536
- element: /*#__PURE__*/jsx(TableFeatures$1, {})
43651
+ element: /*#__PURE__*/jsx(TableFeatures$2, {})
43537
43652
  }), /*#__PURE__*/jsx(Route, {
43538
43653
  path: ":catalogId/options",
43539
- element: /*#__PURE__*/jsx(TableOptions, {})
43654
+ element: /*#__PURE__*/jsx(TableOptions$1, {})
43540
43655
  }), /*#__PURE__*/jsx(Route, {
43541
43656
  path: ":catalogId/optiongroups",
43542
43657
  element: /*#__PURE__*/jsx(TableOptionGroups, {})
@@ -43845,10 +43960,10 @@ function IDMCollectionEditor(_ref) {
43845
43960
  display: 'flex',
43846
43961
  flexDirection: 'column'
43847
43962
  },
43848
- children: /*#__PURE__*/jsx(Content$3, {})
43963
+ children: /*#__PURE__*/jsx(Content$5, {})
43849
43964
  });
43850
43965
  }
43851
- function Content$3() {
43966
+ function Content$5() {
43852
43967
  return /*#__PURE__*/jsx(Routes, {
43853
43968
  children: /*#__PURE__*/jsx(Route, {
43854
43969
  index: true,
@@ -43858,9 +43973,176 @@ function Content$3() {
43858
43973
  });
43859
43974
  }
43860
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
+
43861
44129
  var TableFeatures = observer(function () {
43862
44130
  var _useTranslation = useTranslation(),
43863
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
+ });
43864
44146
  return /*#__PURE__*/jsxs(Fragment, {
43865
44147
  children: [/*#__PURE__*/jsx(Descriptions$1, {
43866
44148
  title: /*#__PURE__*/jsx("div", {
@@ -43870,7 +44152,198 @@ var TableFeatures = observer(function () {
43870
44152
  });
43871
44153
  });
43872
44154
 
43873
- 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) {
43874
44347
  _objectDestructuringEmpty(_ref);
43875
44348
  return /*#__PURE__*/jsx("div", {
43876
44349
  style: {
@@ -43886,7 +44359,7 @@ function Content$2() {
43886
44359
  children: /*#__PURE__*/jsx(Route, {
43887
44360
  index: true,
43888
44361
  path: "",
43889
- element: /*#__PURE__*/jsx(TableFeatures, {})
44362
+ element: /*#__PURE__*/jsx(TableOptions, {})
43890
44363
  })
43891
44364
  });
43892
44365
  }
@@ -44448,6 +44921,12 @@ var ContentCard = observer(function (_ref3) {
44448
44921
  }, configId), configuration.type == 'IDMFeaturesEditor' && /*#__PURE__*/jsx(IDMFeaturesEditor, {
44449
44922
  configuration: configuration,
44450
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
44451
44930
  }, configId), configuration.type == 'MediaTable' && /*#__PURE__*/jsx(MediaTable, {
44452
44931
  configuration: configuration,
44453
44932
  id: configId
@@ -44973,12 +45452,14 @@ styleInject(css_248z$5);
44973
45452
 
44974
45453
  var wrapper$2 = "wrapper-Q13-g";
44975
45454
  var confContainer = "conf-container-Sm5LL";
44976
- 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";
44977
45458
  styleInject(css_248z$4);
44978
45459
 
44979
45460
  var wrapper$1 = "wrapper-IcNC5";
44980
45461
  var select$1 = "select-jVMz-";
44981
- 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";
44982
45463
  styleInject(css_248z$3);
44983
45464
 
44984
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; }
@@ -44988,8 +45469,8 @@ var ArticleSelection = function ArticleSelection(_ref) {
44988
45469
  itemList = _ref$state.itemList,
44989
45470
  articleCodex = _ref$state.articleCodex,
44990
45471
  setArticleCodex = _ref$state.setArticleCodex,
44991
- setDoReset = _ref$state.setDoReset,
44992
45472
  mask = _ref$state.mask,
45473
+ serie = _ref$state.serie,
44993
45474
  setArticle = _ref.setArticle;
44994
45475
  var _useTranslation = useTranslation(),
44995
45476
  t = _useTranslation.t;
@@ -45040,6 +45521,7 @@ var ArticleSelection = function ArticleSelection(_ref) {
45040
45521
  return /*#__PURE__*/jsxs("div", {
45041
45522
  className: wrapper$1,
45042
45523
  children: [/*#__PURE__*/jsx(Select$1, {
45524
+ disabled: !(serie !== null && serie !== void 0 && serie.catalogCodex),
45043
45525
  placeholder: t('backoffice.configurator.article.placeholder'),
45044
45526
  value: articleCodex,
45045
45527
  options: groupedArticles,
@@ -45048,17 +45530,15 @@ var ArticleSelection = function ArticleSelection(_ref) {
45048
45530
  setArticle === null || setArticle === void 0 || setArticle(value);
45049
45531
  },
45050
45532
  className: select$1
45051
- }), showPartlistFilter && /*#__PURE__*/jsx(Button, {
45052
- icon: filterPartlist ? /*#__PURE__*/jsx(DatabaseOutlined$1, {}) : /*#__PURE__*/jsx(DatabaseFilled, {}),
45053
- title: t(filterPartlist ? 'configuration.hidepartlist' : 'configuration.showpartlist'),
45054
- onClick: function onClick() {
45055
- return setFilterPartlist(!filterPartlist);
45056
- }
45057
- }), /*#__PURE__*/jsx(Button, {
45058
- icon: /*#__PURE__*/jsx(ReloadOutlined$1, {}),
45059
- onClick: function onClick() {
45060
- return setDoReset(true);
45061
- }
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
+ })
45062
45542
  })]
45063
45543
  });
45064
45544
  };
@@ -45067,7 +45547,7 @@ var ArticleSelection$1 = observer(ArticleSelection);
45067
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; }
45068
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; }
45069
45549
  function useWysiwyg$1(_ref) {
45070
- var _tool$parameters, _tool$elementProps5;
45550
+ var _tool$parameters, _tool$elementProps, _tool$elementProps6;
45071
45551
  var tool = _ref.tool,
45072
45552
  toolbar = _ref.toolbar;
45073
45553
  var _useDivaCore = useDivaCore(),
@@ -45123,18 +45603,30 @@ function useWysiwyg$1(_ref) {
45123
45603
  _useState22 = _slicedToArray(_useState21, 2),
45124
45604
  serieList = _useState22[0],
45125
45605
  setSerieList = _useState22[1];
45126
- 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
+ }),
45127
45615
  _useState24 = _slicedToArray(_useState23, 2),
45128
- catalogId = _useState24[0],
45129
- setCatalogId = _useState24[1];
45130
- var _useState25 = useState(),
45616
+ language = _useState24[0],
45617
+ setLanguage = _useState24[1];
45618
+ var _useState25 = useState(tool.parameters.catalogId),
45131
45619
  _useState26 = _slicedToArray(_useState25, 2),
45132
- currentNav = _useState26[0],
45133
- setCurrentNav = _useState26[1];
45620
+ catalogId = _useState26[0],
45621
+ setCatalogId = _useState26[1];
45134
45622
  var _useState27 = useState(),
45135
45623
  _useState28 = _slicedToArray(_useState27, 2),
45136
- doNavigate = _useState28[0],
45137
- 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];
45138
45630
  useEffect(function () {
45139
45631
  if (!toolbar.hidden) setDoReset(true);
45140
45632
  }, [toolbar.hidden]);
@@ -45262,14 +45754,14 @@ function useWysiwyg$1(_ref) {
45262
45754
  };
45263
45755
  }();
45264
45756
  useEffect(function () {
45265
- var _tool$elementProps;
45266
- 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;
45267
45759
  if (doReset) {
45268
- var _tool$elementProps2, _tool$elementProps4;
45760
+ var _tool$elementProps3, _tool$elementProps5;
45269
45761
  if (currentNav) setDoNavigate(currentNav);
45270
- if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.showCatalogSelection && !serieList.length) {
45271
- var _tool$elementProps3;
45272
- 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) {
45273
45765
  setLoadingPackage(true);
45274
45766
  loadPackage(tool.parameters.packageId).then(function () {
45275
45767
  return setLoadingPackage(false);
@@ -45281,7 +45773,7 @@ function useWysiwyg$1(_ref) {
45281
45773
  });
45282
45774
  }
45283
45775
  }
45284
- 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) {
45285
45777
  setLoadingMask(true);
45286
45778
  loadMask(tool.parameters.packageId).then(function () {
45287
45779
  setLoadingMask(false);
@@ -45291,7 +45783,7 @@ function useWysiwyg$1(_ref) {
45291
45783
  setDoReset(false);
45292
45784
  }
45293
45785
  }
45294
- }, [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]);
45295
45787
  useEffect(function () {
45296
45788
  setArticleCodex(undefined);
45297
45789
  if (serie !== null && serie !== void 0 && serie.catalogCodex) {
@@ -45353,9 +45845,9 @@ function useWysiwyg$1(_ref) {
45353
45845
  };
45354
45846
  }, [articleCodex]);
45355
45847
  var settings = useMemo(function () {
45356
- var _tool$elementProps6, _tool$elementProps7, _tool$elementProps8;
45848
+ var _tool$elementProps7, _tool$elementProps8, _tool$elementProps9;
45357
45849
  return {
45358
- language: 'DE',
45850
+ language: language,
45359
45851
  showSelectionModeZero: true,
45360
45852
  dontLoadAdditionalModelInfos: true,
45361
45853
  onErrorHandling: {
@@ -45405,14 +45897,13 @@ function useWysiwyg$1(_ref) {
45405
45897
  sizeGallery: '50px',
45406
45898
  sizeDefault: '240px'
45407
45899
  },
45408
- pricePreview: 'fromCurrentPrice',
45409
45900
  hideConfigFoldArrow: true,
45410
45901
  tooltipPosition: 'left-center',
45411
45902
  clientEvents: ['onWebPlanerConfigChange', 'onArticlesLoaded']
45412
45903
  },
45413
- useIDMService: (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.useIDMService,
45414
- useEnricherService: (_tool$elementProps7 = tool.elementProps) === null || _tool$elementProps7 === void 0 ? void 0 : _tool$elementProps7.useEnricherService,
45415
- 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,
45416
45907
  templateConfig: {
45417
45908
  Layout: 'wysiwyg',
45418
45909
  NavigationButton: 'standard',
@@ -45432,7 +45923,7 @@ function useWysiwyg$1(_ref) {
45432
45923
  ProductHeaderFunction: 'standard'
45433
45924
  }
45434
45925
  };
45435
- }, []);
45926
+ }, [language]);
45436
45927
  useEffect(function () {
45437
45928
  if (isLoadingPackage) {
45438
45929
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.package'));
@@ -45440,12 +45931,17 @@ function useWysiwyg$1(_ref) {
45440
45931
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.catalog'));
45441
45932
  } else if (isLoadingMask) {
45442
45933
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.mask'));
45443
- } 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
45444
45936
  setLoadingText(t('backoffice.wysiwyg.configurator.loading.articles'));
45445
45937
  } else {
45446
45938
  setLoadingText(undefined);
45447
45939
  }
45448
- }, [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
+ };
45449
45945
  return {
45450
45946
  itemList: itemList,
45451
45947
  setItemList: setItemList,
@@ -45462,7 +45958,10 @@ function useWysiwyg$1(_ref) {
45462
45958
  doNavigate: doNavigate,
45463
45959
  setDoNavigate: setDoNavigate,
45464
45960
  catalogId: catalogId,
45465
- loadingText: loadingText
45961
+ loadingText: loadingText,
45962
+ language: language,
45963
+ setLanguage: onSetLanguage,
45964
+ availableLanguages: availableLanguages
45466
45965
  };
45467
45966
  }
45468
45967
 
@@ -45562,7 +46061,7 @@ var CatalogSelection$1 = observer(CatalogSelection);
45562
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; }
45563
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; }
45564
46063
  var Wsyiwyg = function Wsyiwyg(_ref) {
45565
- 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;
45566
46065
  var tool = _ref.tool,
45567
46066
  toolbar = _ref.toolbar;
45568
46067
  var _useDivaCore = useDivaCore(),
@@ -45607,14 +46106,6 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45607
46106
  state.setArticleCodex(tool.elementProps.initItem);
45608
46107
  }
45609
46108
  }, [tool.elementProps.initItem, tool.elementProps.initSerie, state.serieList]);
45610
- if (!((_state$serie = state.serie) !== null && _state$serie !== void 0 && _state$serie.catalogCodex)) {
45611
- if (tool.elementProps.showCatalogSelection) {
45612
- return /*#__PURE__*/jsx(CatalogSelection$1, {
45613
- state: state,
45614
- setSerie: tool.elementProps.setSerie
45615
- });
45616
- }
45617
- }
45618
46109
  if (tool.elementProps.onlyPlaceholder) {
45619
46110
  return /*#__PURE__*/jsx("div", {});
45620
46111
  }
@@ -45628,13 +46119,37 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45628
46119
  errorCode: "BACKO_0004",
45629
46120
  children: /*#__PURE__*/jsxs("div", {
45630
46121
  className: wrapper$2,
45631
- children: [!state.loadingText && /*#__PURE__*/jsxs(Fragment, {
45632
- children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
45633
- state: state,
45634
- setSerie: tool.elementProps.setSerie
45635
- }), /*#__PURE__*/jsx(ArticleSelection$1, {
45636
- state: state,
45637
- 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
+ })
45638
46153
  })]
45639
46154
  }), state.loadingText && /*#__PURE__*/jsx("div", {
45640
46155
  children: state.loadingText
@@ -45652,17 +46167,18 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
45652
46167
  resetArticle: '',
45653
46168
  disableToggle: '1',
45654
46169
  startDivaNr: 'DIVA-000000',
45655
- 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
45656
- }, (_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 ? {
45657
46172
  serieId: state.serie.serieId
45658
46173
  } : {}), {}, {
45659
- 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,
45660
46175
  returnTo: 'DONT_SAVE_BASKET',
45661
46176
  organizationId: organizationId,
45662
46177
  no3DConnection: 'true'
45663
46178
  }),
45664
46179
  internal: {
45665
46180
  catalogMask: state.mask,
46181
+ language: state.language,
45666
46182
  actions: {
45667
46183
  toggleLoading: function toggleLoading(subId, _, toggle) {
45668
46184
  return toolbar.toggleLoading(tool.id, subId, toggle);