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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import React, { createElement, createContext, useState, useEffect, useRef, useMemo, forwardRef, useImperativeHandle, useCallback, createRef, useReducer, useContext, memo, useDeferredValue } from 'react';
3
3
  import 'antd/dist/reset.css';
4
- import { Form as Form$2, Button, Input as Input$1, Popover, Typography, Divider, Progress, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox as Checkbox$1, InputNumber, Modal as Modal$2, Tabs, Cascader, Descriptions, Row, Col, Tooltip as Tooltip$1, Collapse, List as List$1, Skeleton, Alert, Card, Upload as Upload$2, Table as Table$1, Switch, Popconfirm, Image, Slider, Breadcrumb, Result as Result$1, message, Layout, Drawer, ConfigProvider, theme } from 'antd';
4
+ import { Divider, Form as Form$2, Button, Input as Input$1, Popover, Typography, Progress, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox as Checkbox$1, InputNumber, Modal as Modal$2, Tabs, Cascader, Descriptions, Row, Col, Tooltip as Tooltip$1, Collapse, List as List$1, Skeleton, Alert, Card, Upload as Upload$2, Table as Table$1, Switch, Popconfirm, Image, Slider, Breadcrumb, Result as Result$1, message, Layout, Drawer, ConfigProvider, theme } from 'antd';
5
5
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
6
  import { observer } from 'mobx-react-lite';
7
7
  import { getLogger, DivaError, useTranslation, useDivaCore, DivaUtils } from '@crystaldesign/diva-core';
@@ -1824,7 +1824,7 @@ var _default$7 = /*#__PURE__*/function () {
1824
1824
  }]);
1825
1825
  }();
1826
1826
  var replaceStuff = function replaceStuff(text, apiConfig) {
1827
- return text.replaceAll('${authService}', apiConfig.authService).replaceAll('${mediaService}', apiConfig.mediaService).replaceAll('${messageService}', apiConfig.messageService).replaceAll('${basketService}', apiConfig.basketService).replaceAll('${supportService}', apiConfig.supportService).replaceAll('${adminService}', apiConfig.adminService).replaceAll('${catalogService}', apiConfig.catalogService).replaceAll('${api2}', apiConfig.api2.ek).replaceAll('${analyticsService}', apiConfig.analyticsService).replaceAll('${reportService}', apiConfig.reportService);
1827
+ return text.replaceAll('${authService}', apiConfig.authService).replaceAll('${mediaService}', apiConfig.mediaService).replaceAll('${aiService}', apiConfig.aiService).replaceAll('${messageService}', apiConfig.messageService).replaceAll('${basketService}', apiConfig.basketService).replaceAll('${supportService}', apiConfig.supportService).replaceAll('${adminService}', apiConfig.adminService).replaceAll('${catalogService}', apiConfig.catalogService).replaceAll('${api2}', apiConfig.api2.ek).replaceAll('${analyticsService}', apiConfig.analyticsService).replaceAll('${reportService}', apiConfig.reportService);
1828
1828
  };
1829
1829
  function runThroughObjectReqursive(obj, apiConfig) {
1830
1830
  for (var key in obj) {
@@ -2157,7 +2157,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
2157
2157
  onlyAsMappingData: true
2158
2158
  }
2159
2159
  },
2160
- downloadAction: {
2160
+ downloadAction: [{
2161
2161
  label: t('backoffice.table.roe.downloadAction.label'),
2162
2162
  actionType: 'Download',
2163
2163
  id: 'DownloadAction',
@@ -2177,7 +2177,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
2177
2177
  },
2178
2178
  mediaType: 'file'
2179
2179
  }]
2180
- }
2180
+ }]
2181
2181
  },
2182
2182
  TableAllUsers: {
2183
2183
  type: 'Table',
@@ -3892,7 +3892,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
3892
3892
  sorter: 2
3893
3893
  }]
3894
3894
  }] : [])),
3895
- downloadAction: {
3895
+ downloadAction: [{
3896
3896
  actionType: 'Download',
3897
3897
  id: 'DownloadAction',
3898
3898
  rule: [{
@@ -3909,7 +3909,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
3909
3909
  type: 'url',
3910
3910
  url: apiConfig.baseCdnUrl + '/static/xlsx/RETAIL-p.xlsx'
3911
3911
  }]
3912
- },
3912
+ }],
3913
3913
  apiInterface: {
3914
3914
  read: {
3915
3915
  list: '${api2}?function=GetJsonTranslations&actualOfflineVersion=${actualOfflineVersion}&actualOfflineParentDir=${actualOfflineParentDir}&catalogGuid=${id}&catalogCodex=${codex}&filterContext=${filterContex}',
@@ -4157,7 +4157,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
4157
4157
  targetField: 'newData'
4158
4158
  }]
4159
4159
  },
4160
- downloadAction: {
4160
+ downloadAction: [{
4161
4161
  actionType: 'Download',
4162
4162
  id: 'DownloadAction',
4163
4163
  rule: [{
@@ -4174,7 +4174,22 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
4174
4174
  type: 'url',
4175
4175
  url: apiConfig.baseCdnUrl + '/static/xlsx/RETAIL-p.xlsx'
4176
4176
  }]
4177
- }
4177
+ }, {
4178
+ actionType: 'Download',
4179
+ id: 'DownloadExcelFullPartlist',
4180
+ label: t('backoffice.table.partlists.downloadaction.label.excel'),
4181
+ rule: [{
4182
+ match: {
4183
+ sourceField: 'catalogItem',
4184
+ value: undefined
4185
+ }
4186
+ }],
4187
+ download: [{
4188
+ type: 'api2file',
4189
+ fileName: 'fullpartlist.xlsx',
4190
+ url: '${api2}?function=GetBackofficePartlistExcel&catalogCodex=${catalogCodex}'
4191
+ }]
4192
+ }]
4178
4193
  },
4179
4194
  TableContentItems: {
4180
4195
  title: t('backoffice.table.contentitems.title'),
@@ -4434,6 +4449,164 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
4434
4449
  "delete": '${catalogService}/contentItems/${id}'
4435
4450
  }
4436
4451
  },
4452
+ TablePrompts: {
4453
+ title: t('backoffice.table.prompts.title'),
4454
+ type: 'Table',
4455
+ canRefresh: true,
4456
+ pagination: {
4457
+ pageSize: 50
4458
+ },
4459
+ copyAction: {
4460
+ actionType: 'Detail',
4461
+ type: 'Form',
4462
+ id: 'FormEditPrompt',
4463
+ disableOnMultiselect: true,
4464
+ resetToggleAfter: true,
4465
+ title: t('backoffice.table.prompt.copyAction.title'),
4466
+ label: t('backoffice.table.services.copyAction.label'),
4467
+ mapping: {
4468
+ type: 'body',
4469
+ map: [{
4470
+ targetField: 'name',
4471
+ sourceField: 'name'
4472
+ }, {
4473
+ targetField: 'defaultPrompt',
4474
+ sourceField: 'defaultPrompt'
4475
+ }, {
4476
+ targetField: 'enhancements',
4477
+ sourceField: 'enhancements'
4478
+ }, {
4479
+ targetField: 'cdnImageAdditions',
4480
+ sourceField: 'cdnImageAdditions'
4481
+ }, {
4482
+ targetField: 'specificPrompts',
4483
+ sourceField: 'specificPrompts'
4484
+ }, {
4485
+ targetField: 'analysisInstructions',
4486
+ sourceField: 'analysisInstructions'
4487
+ }, {
4488
+ targetField: 'priority',
4489
+ sourceField: 'priority'
4490
+ }, {
4491
+ targetField: 'engine',
4492
+ sourceField: 'engine'
4493
+ }, {
4494
+ targetField: 'type',
4495
+ sourceField: 'type'
4496
+ }, {
4497
+ targetField: 'previewImage',
4498
+ sourceField: 'previewImage'
4499
+ }, {
4500
+ targetField: 'organizationId',
4501
+ globalValue: 'organizationId'
4502
+ }]
4503
+ }
4504
+ },
4505
+ createAction: {
4506
+ actionType: 'Detail',
4507
+ type: 'Form',
4508
+ id: 'FormEditPrompt'
4509
+ },
4510
+ deleteAction: {},
4511
+ columns: [{
4512
+ title: t('backoffice.table.prompts.columns.name'),
4513
+ field: 'name',
4514
+ sorter: 1,
4515
+ filter: 'advanced',
4516
+ width: 200
4517
+ }, {
4518
+ title: t('backoffice.table.prompts.columns.promptKey'),
4519
+ field: 'promptKey',
4520
+ sorter: 1,
4521
+ filter: 'advanced',
4522
+ width: 150
4523
+ }, {
4524
+ title: t('backoffice.table.prompts.columns.priority'),
4525
+ field: 'priority',
4526
+ sorter: 1,
4527
+ filter: 'advanced',
4528
+ width: 100
4529
+ }, {
4530
+ title: t('backoffice.table.prompts.columns.engine'),
4531
+ field: 'engine',
4532
+ sorter: 1,
4533
+ filter: 'advanced',
4534
+ width: 120
4535
+ }, {
4536
+ title: t('backoffice.table.prompts.columns.type'),
4537
+ field: 'type',
4538
+ sorter: 1,
4539
+ filter: 'advanced',
4540
+ width: 100
4541
+ }, {
4542
+ title: t('backoffice.table.prompts.columns.previewImage'),
4543
+ field: 'previewImage',
4544
+ type: 'media',
4545
+ width: 100,
4546
+ align: 'center'
4547
+ }, {
4548
+ title: t('backoffice.table.prompts.columns.defaultPrompt'),
4549
+ field: 'defaultPrompt',
4550
+ sorter: 1,
4551
+ filter: 'advanced',
4552
+ width: 200
4553
+ }, {
4554
+ title: t('backoffice._id'),
4555
+ field: '_id',
4556
+ sorter: 1,
4557
+ filter: 'advanced',
4558
+ width: 100
4559
+ }, {
4560
+ title: t('backoffice.table.views.lastUpdated'),
4561
+ field: 'lastUpdated',
4562
+ defaultSortOrder: 'descend',
4563
+ type: 'unixTimeStamp',
4564
+ sorter: 1,
4565
+ filter: 'advanced',
4566
+ width: 240
4567
+ }, {
4568
+ title: t('backoffice.table.views.lastUpdatedBy'),
4569
+ field: 'lastUpdatedBy_displayText',
4570
+ sorter: 1,
4571
+ filter: 'advanced',
4572
+ width: 200
4573
+ }, {
4574
+ title: t('backoffice.table.medien.columns.title.organizationId'),
4575
+ field: 'organizationId',
4576
+ sorter: 1,
4577
+ filter: 'advanced',
4578
+ width: 160
4579
+ }],
4580
+ rowAction: [{
4581
+ actionType: 'Detail',
4582
+ disableOnMultiselect: true,
4583
+ type: 'Form',
4584
+ id: 'FormEditPrompt',
4585
+ title: t('backoffice.table.prompt.edit'),
4586
+ label: t('backoffice.edit')
4587
+ }, {
4588
+ disableOnMultiselect: true,
4589
+ actionType: 'Detail',
4590
+ type: 'Form',
4591
+ id: 'FormShowPrompt',
4592
+ title: t('backoffice.table.prompt.show'),
4593
+ label: t('backoffice.show')
4594
+ }],
4595
+ apiInterface: {
4596
+ read: {
4597
+ list: '${aiService}/prompts?organizationId=${organizationId}',
4598
+ filterServerSide: true
4599
+ },
4600
+ "delete": '${aiService}/prompts/${id}'
4601
+ },
4602
+ mapping: {
4603
+ type: 'query',
4604
+ map: [{
4605
+ globalValue: 'organizationId',
4606
+ targetField: 'organizationId'
4607
+ }]
4608
+ }
4609
+ },
4437
4610
  TableApplicationTranslations: {
4438
4611
  title: t('backoffice.table.applicationtranslation.title'),
4439
4612
  type: 'Table',
@@ -5444,10 +5617,10 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
5444
5617
  fields: ['parentOrganizations']
5445
5618
  }
5446
5619
  },
5447
- downloadAction: {
5620
+ downloadAction: [{
5448
5621
  actionType: 'CsvExport',
5449
5622
  fileName: 'SubOrganizations'
5450
- }
5623
+ }]
5451
5624
  },
5452
5625
  TableAllOrganizationUsers: {
5453
5626
  title: t('backoffice.table.allorgusers.title'),
@@ -5573,10 +5746,10 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
5573
5746
  disableOnToggle: true,
5574
5747
  permission: 'backoffice_create_user'
5575
5748
  },
5576
- downloadAction: {
5749
+ downloadAction: [{
5577
5750
  actionType: 'CsvExport',
5578
5751
  fileName: 'benutzer'
5579
- },
5752
+ }],
5580
5753
  rowAction: [{
5581
5754
  actionType: 'Detail',
5582
5755
  type: 'Form',
@@ -6145,7 +6318,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
6145
6318
  }]
6146
6319
  }
6147
6320
  },
6148
- downloadAction: {
6321
+ downloadAction: [{
6149
6322
  actionType: 'Download',
6150
6323
  id: 'DownloadRenderjobAction',
6151
6324
  rule: [{
@@ -6166,7 +6339,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
6166
6339
  }]
6167
6340
  }
6168
6341
  }]
6169
- },
6342
+ }],
6170
6343
  rowAction: [{
6171
6344
  actionType: 'Detail',
6172
6345
  type: 'Form',
@@ -7593,6 +7766,198 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
7593
7766
  permission: 'backoffice_admin_users_access_all'
7594
7767
  }]
7595
7768
  },
7769
+ FormEditPrompt: {
7770
+ type: 'Form',
7771
+ apiInterface: {
7772
+ update: {
7773
+ url: '${aiService}/prompts/{_id}',
7774
+ method: 'PATCH',
7775
+ jsonPatch: true
7776
+ },
7777
+ create: '${aiService}/prompts'
7778
+ },
7779
+ items: [{
7780
+ name: 'promptKey',
7781
+ label: t('backoffice.table.prompts.columns.promptKey'),
7782
+ type: 'input',
7783
+ required: true
7784
+ }, {
7785
+ name: 'name',
7786
+ label: t('backoffice.table.prompts.columns.name'),
7787
+ type: 'input',
7788
+ required: true
7789
+ }, {
7790
+ name: 'defaultPrompt',
7791
+ label: t('backoffice.table.prompts.columns.defaultPrompt'),
7792
+ type: 'textarea',
7793
+ required: true
7794
+ },
7795
+ // {
7796
+ // name: 'enhancements',
7797
+ // label: t('backoffice.table.prompts.columns.enhancements'),
7798
+ // type: 'array',
7799
+ // items: [
7800
+ // {
7801
+ // name: 'enhancement',
7802
+ // type: 'input',
7803
+ // label: t('backoffice.table.prompts.columns.enhancement'),
7804
+ // },
7805
+ // ],
7806
+ // },
7807
+ {
7808
+ name: 'cdnImageAdditions',
7809
+ label: t('backoffice.table.prompts.columns.cdnImageAdditions'),
7810
+ type: 'array',
7811
+ items: [{
7812
+ name: 'addition',
7813
+ type: 'input',
7814
+ label: t('backoffice.table.prompts.columns.cdnImageAddition')
7815
+ }]
7816
+ }, {
7817
+ name: 'specificPrompts',
7818
+ label: t('backoffice.table.prompts.columns.specificPrompts'),
7819
+ type: 'array',
7820
+ items: [{
7821
+ name: 'key',
7822
+ type: 'input',
7823
+ label: t('backoffice.table.prompts.columns.specificPromptKey'),
7824
+ required: true
7825
+ }, {
7826
+ name: 'prompt',
7827
+ type: 'textarea',
7828
+ label: t('backoffice.table.prompts.columns.specificPromptText'),
7829
+ required: true
7830
+ }]
7831
+ },
7832
+ //{
7833
+ // name: 'analysisInstructions',
7834
+ // label: t('backoffice.table.prompts.columns.analysisInstructions'),
7835
+ // type: 'textarea',
7836
+ // required: true,
7837
+ //},
7838
+ {
7839
+ name: 'priority',
7840
+ label: t('backoffice.table.prompts.columns.priority'),
7841
+ type: 'number',
7842
+ required: true,
7843
+ defaultValue: 1
7844
+ }, {
7845
+ name: 'engine',
7846
+ label: t('backoffice.table.prompts.columns.engine'),
7847
+ type: 'select',
7848
+ values: ['openai', 'grok', 'gemini'],
7849
+ mode: 'single',
7850
+ required: true
7851
+ }, {
7852
+ name: 'type',
7853
+ label: t('backoffice.table.prompts.columns.type'),
7854
+ type: 'select',
7855
+ values: ['TEXT', 'ROOM_RENDERING'],
7856
+ mode: 'single',
7857
+ required: true
7858
+ }, {
7859
+ name: 'previewImage',
7860
+ label: t('backoffice.table.prompts.columns.previewImage'),
7861
+ type: 'media',
7862
+ hideTrash: false,
7863
+ allowedTypes: ['image/*'],
7864
+ mediaItemRefField: 'mediaItemRefPreviewImage',
7865
+ urlField: 'previewImage',
7866
+ functionType: 'CAT'
7867
+ }, {
7868
+ name: 'isGlobal',
7869
+ label: t('backoffice.table.prompts.columns.isGlobal'),
7870
+ type: 'checkbox',
7871
+ defaultValue: false
7872
+ }, {
7873
+ name: 'organizationId',
7874
+ hidden: true
7875
+ }]
7876
+ },
7877
+ FormShowPrompt: {
7878
+ type: 'Form',
7879
+ disableSave: true,
7880
+ items: [{
7881
+ name: 'promptKey',
7882
+ label: t('backoffice.table.prompts.columns.promptKey'),
7883
+ type: 'input',
7884
+ readonly: true
7885
+ }, {
7886
+ name: 'name',
7887
+ label: t('backoffice.table.prompts.columns.name'),
7888
+ type: 'input',
7889
+ readonly: true
7890
+ }, {
7891
+ name: 'defaultPrompt',
7892
+ label: t('backoffice.table.prompts.columns.defaultPrompt'),
7893
+ type: 'textarea',
7894
+ readonly: true
7895
+ }, {
7896
+ name: 'cdnImageAdditions',
7897
+ label: t('backoffice.table.prompts.columns.cdnImageAdditions'),
7898
+ type: 'array',
7899
+ readonly: true,
7900
+ items: [{
7901
+ name: 'addition',
7902
+ type: 'input',
7903
+ label: t('backoffice.table.prompts.columns.cdnImageAddition'),
7904
+ readonly: true
7905
+ }]
7906
+ }, {
7907
+ name: 'specificPrompts',
7908
+ label: t('backoffice.table.prompts.columns.specificPrompts'),
7909
+ type: 'array',
7910
+ readonly: true,
7911
+ items: [{
7912
+ name: 'key',
7913
+ type: 'input',
7914
+ label: t('backoffice.table.prompts.columns.specificPromptKey'),
7915
+ readonly: true
7916
+ }, {
7917
+ name: 'prompt',
7918
+ type: 'textarea',
7919
+ label: t('backoffice.table.prompts.columns.specificPromptText'),
7920
+ readonly: true
7921
+ }]
7922
+ }, {
7923
+ name: 'priority',
7924
+ label: t('backoffice.table.prompts.columns.priority'),
7925
+ type: 'number',
7926
+ readonly: true
7927
+ }, {
7928
+ name: 'engine',
7929
+ label: t('backoffice.table.prompts.columns.engine'),
7930
+ type: 'select',
7931
+ values: ['openai', 'grok', 'gemini'],
7932
+ mode: 'single',
7933
+ readonly: true
7934
+ }, {
7935
+ name: 'type',
7936
+ label: t('backoffice.table.prompts.columns.type'),
7937
+ type: 'select',
7938
+ values: ['TEXT', 'ROOM_RENDERING'],
7939
+ mode: 'single',
7940
+ readonly: true
7941
+ }, {
7942
+ name: 'previewImage',
7943
+ label: t('backoffice.table.prompts.columns.previewImage'),
7944
+ type: 'media',
7945
+ hideTrash: false,
7946
+ allowedTypes: ['image/*'],
7947
+ mediaItemRefField: 'mediaItemRefPreviewImage',
7948
+ urlField: 'previewImage',
7949
+ functionType: 'CAT',
7950
+ readonly: true
7951
+ }, {
7952
+ name: 'isGlobal',
7953
+ label: t('backoffice.table.prompts.columns.isGlobal'),
7954
+ type: 'checkbox',
7955
+ readonly: true
7956
+ }, {
7957
+ name: 'organizationId',
7958
+ hidden: true
7959
+ }]
7960
+ },
7596
7961
  FormOrganizationUserDetails: {
7597
7962
  type: 'Form',
7598
7963
  title: t('backoffice.form.organizationuserdetails.title'),
@@ -8821,6 +9186,159 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
8821
9186
  label: t('backoffice.form.organizationdetails.items.settings.externalContactUrl'),
8822
9187
  tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
8823
9188
  type: 'input'
9189
+ }, {
9190
+ name: t('backoffice.subtitle.ai'),
9191
+ type: 'subTitle',
9192
+ orientation: 'left',
9193
+ style: {
9194
+ marginBottom: '40px'
9195
+ },
9196
+ permission: 'backoffice_admin_organizations'
9197
+ }, {
9198
+ name: ['settings', 'aiSettings', 'monthlyOrgCoinLimit'],
9199
+ label: t('backoffice.form.organizationdetails.items.ai.monthlyOrgCoinLimit'),
9200
+ type: 'number',
9201
+ permission: 'backoffice_admin_organizations',
9202
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9203
+ defaultValue: 100000,
9204
+ hidden: function hidden(data) {
9205
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9206
+ },
9207
+ disabled: function disabled(data) {
9208
+ var _data$settings;
9209
+ return data === null || data === void 0 || (_data$settings = data.settings) === null || _data$settings === void 0 || (_data$settings = _data$settings.aiSettings) === null || _data$settings === void 0 ? void 0 : _data$settings.noLimit;
9210
+ },
9211
+ onValueChange: function onValueChange(value, item, form) {
9212
+ if (value && typeof value === 'number') {
9213
+ // Compute all limits from monthly org limit
9214
+ form.setFieldValue(['settings', 'aiSettings', 'weeklyOrgCoinLimit'], Math.round(value / 2));
9215
+ form.setFieldValue(['settings', 'aiSettings', 'dailyOrgCoinLimit'], Math.round(value / 10));
9216
+ form.setFieldValue(['settings', 'aiSettings', 'monthlyUserCoinLimit'], Math.round(value / 2));
9217
+ form.setFieldValue(['settings', 'aiSettings', 'weeklyUserCoinLimit'], Math.round(value / 4));
9218
+ form.setFieldValue(['settings', 'aiSettings', 'dailyUserCoinLimit'], Math.round(value / 20));
9219
+ var formattedValue = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
9220
+ var price = (value / 100).toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
9221
+ item.helpText = formattedValue + ' divaCoins = €' + price + ' limit per month. Changes to this field will auto-update other limits.';
9222
+ }
9223
+ },
9224
+ helpText: '1000 divaCoins = €1 limit per month. Changes to this field will auto-update other limits.'
9225
+ }, {
9226
+ name: ['settings', 'aiSettings', 'weeklyOrgCoinLimit'],
9227
+ label: t('backoffice.form.organizationdetails.items.ai.weeklyOrgCoinLimit'),
9228
+ type: 'number',
9229
+ permission: 'backoffice_admin_organizations',
9230
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9231
+ defaultValue: 50000,
9232
+ 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';
9234
+ },
9235
+ disabled: function disabled(data) {
9236
+ var _data$settings2;
9237
+ return data === null || data === void 0 || (_data$settings2 = data.settings) === null || _data$settings2 === void 0 || (_data$settings2 = _data$settings2.aiSettings) === null || _data$settings2 === void 0 ? void 0 : _data$settings2.noLimit;
9238
+ },
9239
+ helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
9240
+ }, {
9241
+ name: ['settings', 'aiSettings', 'dailyOrgCoinLimit'],
9242
+ label: t('backoffice.form.organizationdetails.items.ai.dailyOrgCoinLimit'),
9243
+ type: 'number',
9244
+ permission: 'backoffice_admin_organizations',
9245
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9246
+ defaultValue: 10000,
9247
+ hidden: function hidden(data) {
9248
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9249
+ },
9250
+ disabled: function disabled(data) {
9251
+ var _data$settings3;
9252
+ return data === null || data === void 0 || (_data$settings3 = data.settings) === null || _data$settings3 === void 0 || (_data$settings3 = _data$settings3.aiSettings) === null || _data$settings3 === void 0 ? void 0 : _data$settings3.noLimit;
9253
+ },
9254
+ helpText: 'Auto-computed as monthlyOrg/10. Can be manually adjusted.'
9255
+ }, {
9256
+ name: ['settings', 'aiSettings', 'monthlyUserCoinLimit'],
9257
+ label: t('backoffice.form.organizationdetails.items.ai.monthlyUserCoinLimit'),
9258
+ type: 'number',
9259
+ permission: 'backoffice_admin_organizations',
9260
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9261
+ defaultValue: 50000,
9262
+ hidden: function hidden(data) {
9263
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9264
+ },
9265
+ disabled: function disabled(data) {
9266
+ var _data$settings4;
9267
+ return data === null || data === void 0 || (_data$settings4 = data.settings) === null || _data$settings4 === void 0 || (_data$settings4 = _data$settings4.aiSettings) === null || _data$settings4 === void 0 ? void 0 : _data$settings4.noLimit;
9268
+ },
9269
+ helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
9270
+ }, {
9271
+ name: ['settings', 'aiSettings', 'weeklyUserCoinLimit'],
9272
+ label: t('backoffice.form.organizationdetails.items.ai.weeklyUserCoinLimit'),
9273
+ type: 'number',
9274
+ permission: 'backoffice_admin_organizations',
9275
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9276
+ defaultValue: 25000,
9277
+ hidden: function hidden(data) {
9278
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9279
+ },
9280
+ disabled: function disabled(data) {
9281
+ var _data$settings5;
9282
+ return data === null || data === void 0 || (_data$settings5 = data.settings) === null || _data$settings5 === void 0 || (_data$settings5 = _data$settings5.aiSettings) === null || _data$settings5 === void 0 ? void 0 : _data$settings5.noLimit;
9283
+ },
9284
+ helpText: 'Auto-computed as monthlyOrg/4. Can be manually adjusted.'
9285
+ }, {
9286
+ name: ['settings', 'aiSettings', 'dailyUserCoinLimit'],
9287
+ label: t('backoffice.form.organizationdetails.items.ai.dailyUserCoinLimit'),
9288
+ type: 'number',
9289
+ permission: 'backoffice_admin_organizations',
9290
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9291
+ defaultValue: 5000,
9292
+ hidden: function hidden(data) {
9293
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9294
+ },
9295
+ disabled: function disabled(data) {
9296
+ var _data$settings6;
9297
+ return data === null || data === void 0 || (_data$settings6 = data.settings) === null || _data$settings6 === void 0 || (_data$settings6 = _data$settings6.aiSettings) === null || _data$settings6 === void 0 ? void 0 : _data$settings6.noLimit;
9298
+ },
9299
+ helpText: 'Auto-computed as monthlyOrg/20. Can be manually adjusted.'
9300
+ }, {
9301
+ name: ['settings', 'aiSettings', 'anonymousDailyIPLimit'],
9302
+ label: t('backoffice.form.organizationdetails.items.ai.anonymousDailyIPLimit'),
9303
+ type: 'number',
9304
+ permission: 'backoffice_admin_organizations',
9305
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9306
+ defaultValue: 2,
9307
+ hidden: function hidden(data) {
9308
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9309
+ },
9310
+ helpText: 'anonymous enduser limit'
9311
+ }, {
9312
+ name: ['settings', 'aiSettings', 'loggedInDailyIPLimit'],
9313
+ label: t('backoffice.form.organizationdetails.items.ai.loggedInDailyIPLimit'),
9314
+ type: 'number',
9315
+ permission: 'backoffice_admin_organizations',
9316
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9317
+ defaultValue: 10,
9318
+ hidden: function hidden(data) {
9319
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9320
+ },
9321
+ helpText: 'logged in enduser limit'
9322
+ }, {
9323
+ name: ['settings', 'aiSettings', 'leadRewardBonus'],
9324
+ label: t('backoffice.form.organizationdetails.items.ai.leadRewardBonus'),
9325
+ type: 'number',
9326
+ permission: 'backoffice_admin_organizations',
9327
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9328
+ defaultValue: 5,
9329
+ hidden: function hidden(data) {
9330
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9331
+ }
9332
+ }, {
9333
+ name: ['settings', 'aiSettings', 'noLimit'],
9334
+ label: t('backoffice.form.organizationdetails.items.ai.noLimit'),
9335
+ type: 'checkbox',
9336
+ permission: 'backoffice_admin_organizations',
9337
+ tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
9338
+ defaultValue: false,
9339
+ hidden: function hidden(data) {
9340
+ return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
9341
+ }
8824
9342
  }]
8825
9343
  },
8826
9344
  FromAffilateOrganizationDetails: {
@@ -12066,6 +12584,13 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
12066
12584
  permission: 'backoffice_contentitems_global'
12067
12585
  }]
12068
12586
  },
12587
+ GroupPrompts: {
12588
+ type: 'Group',
12589
+ items: [{
12590
+ id: 'TablePrompts',
12591
+ type: 'Table'
12592
+ }]
12593
+ },
12069
12594
  SelectorPermissionRole: {
12070
12595
  type: 'RelationSelector',
12071
12596
  searchApiInterface: {
@@ -14625,6 +15150,12 @@ var menu = [{
14625
15150
  path: 'contentitems',
14626
15151
  label: 'backoffice.menu.items.label.ContentItems',
14627
15152
  icon: 'OrderedListOutlined'
15153
+ }, {
15154
+ id: 'GroupPrompts',
15155
+ path: 'prompts',
15156
+ label: 'backoffice.menu.items.label.Prompts',
15157
+ icon: 'RobotOutlined',
15158
+ permission: 'backoffice_prompts'
14628
15159
  }, {
14629
15160
  id: 'idmTables',
14630
15161
  path: 'idm',
@@ -15240,11 +15771,11 @@ var DownloadStore = /*#__PURE__*/function () {
15240
15771
  this._rootStore = _rootStore;
15241
15772
  _defineProperty(this, "executeDownload", /*#__PURE__*/function () {
15242
15773
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
15243
- var data, action, catalogCodex, dealerId, currentUrl, _iterator, _step, _loop, download;
15774
+ var data, action, catalogCodex, dealerId, currentUrl, sessionGuid, _iterator, _step, _loop, download;
15244
15775
  return _regeneratorRuntime.wrap(function _callee$(_context2) {
15245
15776
  while (1) switch (_context2.prev = _context2.next) {
15246
15777
  case 0:
15247
- data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl;
15778
+ data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl, sessionGuid = _ref.sessionGuid;
15248
15779
  if (!(action.actionType == 'CsvExport' && currentUrl)) {
15249
15780
  _context2.next = 6;
15250
15781
  break;
@@ -15263,63 +15794,98 @@ var DownloadStore = /*#__PURE__*/function () {
15263
15794
  _context2.prev = 8;
15264
15795
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
15265
15796
  var _download$params, _data$fileFormat, _data$fileUrl;
15266
- var url;
15797
+ var _this$_rootStore, file, blob, url;
15267
15798
  return _regeneratorRuntime.wrap(function _loop$(_context) {
15268
15799
  while (1) switch (_context.prev = _context.next) {
15269
15800
  case 0:
15270
15801
  download = _step.value;
15271
15802
  _context.t0 = download.type;
15272
- _context.next = _context.t0 === 'url' ? 4 : _context.t0 === 'field' ? 8 : _context.t0 === 'prefab' ? 15 : _context.t0 === 'request' ? 20 : 24;
15803
+ _context.next = _context.t0 === 'api2file' ? 4 : _context.t0 === 'url' ? 21 : _context.t0 === 'field' ? 25 : _context.t0 === 'prefab' ? 32 : _context.t0 === 'request' ? 37 : 41;
15273
15804
  break;
15274
15805
  case 4:
15806
+ _context.prev = 4;
15807
+ _context.next = 7;
15808
+ return fetch(download.url.replace('${catalogCodex}', catalogCodex).toString(), {
15809
+ method: 'GET',
15810
+ headers: {
15811
+ authorization: "Bearer ".concat((_this$_rootStore = _this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt),
15812
+ SessionGuid: sessionGuid,
15813
+ 'content-type': 'application/json'
15814
+ }
15815
+ });
15816
+ case 7:
15817
+ file = _context.sent;
15818
+ if (file.ok) {
15819
+ _context.next = 11;
15820
+ break;
15821
+ }
15822
+ LOG$d.error(new DivaError("Failed to download file: ".concat(download.fileName, ". Status: ").concat(file.status, " ").concat(file.statusText)));
15823
+ // Optionally, notify the user here
15824
+ return _context.abrupt("break", 41);
15825
+ case 11:
15826
+ _context.next = 13;
15827
+ return file.blob();
15828
+ case 13:
15829
+ blob = _context.sent;
15830
+ DownloadStore.downloadBlob(blob, download.fileName);
15831
+ _context.next = 20;
15832
+ break;
15833
+ case 17:
15834
+ _context.prev = 17;
15835
+ _context.t1 = _context["catch"](4);
15836
+ LOG$d.error(new DivaError("Error during file download (".concat(download.fileName, "):") + _context.t1));
15837
+ // Optionally, notify the user here
15838
+ case 20:
15839
+ return _context.abrupt("break", 41);
15840
+ case 21:
15275
15841
  if (_this.checkCondition(download, data)) {
15276
- _context.next = 6;
15842
+ _context.next = 23;
15277
15843
  break;
15278
15844
  }
15279
- return _context.abrupt("break", 24);
15280
- case 6:
15845
+ return _context.abrupt("break", 41);
15846
+ case 23:
15281
15847
  window.location.href = download.url;
15282
- return _context.abrupt("break", 24);
15283
- case 8:
15848
+ return _context.abrupt("break", 41);
15849
+ case 25:
15284
15850
  if (_this.checkCondition(download, data)) {
15285
- _context.next = 10;
15851
+ _context.next = 27;
15286
15852
  break;
15287
15853
  }
15288
- return _context.abrupt("break", 24);
15289
- case 10:
15854
+ return _context.abrupt("break", 41);
15855
+ case 27:
15290
15856
  url = new URL(data[download.field]);
15291
15857
  (_download$params = download.params) === null || _download$params === void 0 || _download$params.forEach(function (param) {
15292
15858
  url.searchParams.append(param.name, param.value);
15293
15859
  });
15294
- _context.next = 14;
15860
+ _context.next = 31;
15295
15861
  return _this.donwloadFile(url, (data === null || data === void 0 ? void 0 : data.fileName) + '.' + ((_data$fileFormat = data.fileFormat) !== null && _data$fileFormat !== void 0 ? _data$fileFormat : data === null || data === void 0 || (_data$fileUrl = data.fileUrl) === null || _data$fileUrl === void 0 ? void 0 : _data$fileUrl.substring((data === null || data === void 0 ? void 0 : data.fileUrl.lastIndexOf('.')) + 1)));
15296
- case 14:
15297
- return _context.abrupt("break", 24);
15298
- case 15:
15862
+ case 31:
15863
+ return _context.abrupt("break", 41);
15864
+ case 32:
15299
15865
  if (_this.checkCondition(download, data)) {
15300
- _context.next = 17;
15866
+ _context.next = 34;
15301
15867
  break;
15302
15868
  }
15303
- return _context.abrupt("break", 24);
15304
- case 17:
15305
- _context.next = 19;
15869
+ return _context.abrupt("break", 41);
15870
+ case 34:
15871
+ _context.next = 36;
15306
15872
  return _this.connectionFile(download, data, download.url, catalogCodex, dealerId);
15307
- case 19:
15308
- return _context.abrupt("break", 24);
15309
- case 20:
15873
+ case 36:
15874
+ return _context.abrupt("break", 41);
15875
+ case 37:
15310
15876
  if (_this.checkCondition(download, data)) {
15311
- _context.next = 22;
15877
+ _context.next = 39;
15312
15878
  break;
15313
15879
  }
15314
- return _context.abrupt("break", 24);
15315
- case 22:
15316
- _context.next = 24;
15880
+ return _context.abrupt("break", 41);
15881
+ case 39:
15882
+ _context.next = 41;
15317
15883
  return _this.downloadRequest(download, data);
15318
- case 24:
15884
+ case 41:
15319
15885
  case "end":
15320
15886
  return _context.stop();
15321
15887
  }
15322
- }, _loop);
15888
+ }, _loop, null, [[4, 17]]);
15323
15889
  });
15324
15890
  _iterator.s();
15325
15891
  case 11:
@@ -15363,7 +15929,7 @@ var DownloadStore = /*#__PURE__*/function () {
15363
15929
  key: "donwloadFile",
15364
15930
  value: function () {
15365
15931
  var _donwloadFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url, name) {
15366
- var _this$_rootStore;
15932
+ var _this$_rootStore2;
15367
15933
  var file, blob;
15368
15934
  return _regeneratorRuntime.wrap(function _callee2$(_context3) {
15369
15935
  while (1) switch (_context3.prev = _context3.next) {
@@ -15372,7 +15938,7 @@ var DownloadStore = /*#__PURE__*/function () {
15372
15938
  return fetch(url.toString(), {
15373
15939
  method: 'GET',
15374
15940
  headers: {
15375
- authorization: "Bearer ".concat((_this$_rootStore = this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt),
15941
+ authorization: "Bearer ".concat((_this$_rootStore2 = this._rootStore) === null || _this$_rootStore2 === void 0 ? void 0 : _this$_rootStore2.dataStore.jwt),
15376
15942
  'content-type': 'application/json'
15377
15943
  }
15378
15944
  });
@@ -15503,7 +16069,7 @@ var DownloadStore = /*#__PURE__*/function () {
15503
16069
  key: "downloadRequest",
15504
16070
  value: function () {
15505
16071
  var _downloadRequest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
15506
- var _this$_rootStore2;
16072
+ var _this$_rootStore3;
15507
16073
  var url, result, contentType, contentDisposition, fileName, fileNameMatch, blob, base64File, a, mimeType, res;
15508
16074
  return _regeneratorRuntime.wrap(function _callee5$(_context6) {
15509
16075
  while (1) switch (_context6.prev = _context6.next) {
@@ -15519,7 +16085,7 @@ var DownloadStore = /*#__PURE__*/function () {
15519
16085
  return fetch(url, {
15520
16086
  method: 'GET',
15521
16087
  headers: {
15522
- authorization: "Bearer ".concat((_this$_rootStore2 = this._rootStore) === null || _this$_rootStore2 === void 0 ? void 0 : _this$_rootStore2.dataStore.jwt),
16088
+ authorization: "Bearer ".concat((_this$_rootStore3 = this._rootStore) === null || _this$_rootStore3 === void 0 ? void 0 : _this$_rootStore3.dataStore.jwt),
15523
16089
  'content-type': 'application/json',
15524
16090
  Accept: 'application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, */*'
15525
16091
  }
@@ -15616,7 +16182,8 @@ var DownloadStore = /*#__PURE__*/function () {
15616
16182
  data: dt,
15617
16183
  action: props.action,
15618
16184
  catalogCodex: props.catalogCodex,
15619
- dealerId: props.dealerId
16185
+ dealerId: props.dealerId,
16186
+ sessionGuid: props.sessionGuid
15620
16187
  }));
15621
16188
  if (!(promises.length == 10)) {
15622
16189
  _context7.next = 12;
@@ -16759,6 +17326,11 @@ function useFormData (_ref) {
16759
17326
  }
16760
17327
  };
16761
17328
  var onInputChanged = function onInputChanged(id, value, d) {
17329
+ if (id) {
17330
+ var _item$onValueChange;
17331
+ var item = getItem(id !== null && id !== void 0 ? id : '');
17332
+ item === null || item === void 0 || (_item$onValueChange = item.onValueChange) === null || _item$onValueChange === void 0 || _item$onValueChange.call(item, value, item, state.form);
17333
+ }
16762
17334
  var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$10({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
16763
17335
  if (id) {
16764
17336
  setFieldInObject(id, data, value);
@@ -16771,6 +17343,24 @@ function useFormData (_ref) {
16771
17343
  }));
16772
17344
  return data;
16773
17345
  };
17346
+ var getItem = function getItem(id) {
17347
+ var items = selectedItems;
17348
+ var _iterator2 = _createForOfIteratorHelper$k(items),
17349
+ _step2;
17350
+ try {
17351
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
17352
+ var item = _step2.value;
17353
+ if (item.name.toString() === id.toString()) {
17354
+ return item;
17355
+ }
17356
+ }
17357
+ } catch (err) {
17358
+ _iterator2.e(err);
17359
+ } finally {
17360
+ _iterator2.f();
17361
+ }
17362
+ return undefined;
17363
+ };
16774
17364
 
16775
17365
  //if at an array an entry got added or deleted, its handeled by and so we take the data from the formdata
16776
17366
  var mergeCustomizer = function mergeCustomizer(obj, src) {
@@ -16835,19 +17425,19 @@ function useFormData (_ref) {
16835
17425
  }
16836
17426
  function _preSaveProcess() {
16837
17427
  _preSaveProcess = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data, items) {
16838
- var _iterator3, _step3, item, itemName, media, mediaItemRefIdPath, urlPath, arrayData, i, _iterator4, _step4, _media;
17428
+ var _iterator4, _step4, item, itemName, media, mediaItemRefIdPath, urlPath, arrayData, i, _iterator5, _step5, _media;
16839
17429
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
16840
17430
  while (1) switch (_context4.prev = _context4.next) {
16841
17431
  case 0:
16842
- _iterator3 = _createForOfIteratorHelper$k(items);
17432
+ _iterator4 = _createForOfIteratorHelper$k(items);
16843
17433
  _context4.prev = 1;
16844
- _iterator3.s();
17434
+ _iterator4.s();
16845
17435
  case 3:
16846
- if ((_step3 = _iterator3.n()).done) {
17436
+ if ((_step4 = _iterator4.n()).done) {
16847
17437
  _context4.next = 37;
16848
17438
  break;
16849
17439
  }
16850
- item = _step3.value;
17440
+ item = _step4.value;
16851
17441
  itemName = typeof item.name == 'string' ? [item.name] : item.name;
16852
17442
  if (item !== null && item !== void 0 && item.onSave) {
16853
17443
  data = item.onSave(data);
@@ -16919,21 +17509,21 @@ function useFormData (_ref) {
16919
17509
  case 39:
16920
17510
  _context4.prev = 39;
16921
17511
  _context4.t0 = _context4["catch"](1);
16922
- _iterator3.e(_context4.t0);
17512
+ _iterator4.e(_context4.t0);
16923
17513
  case 42:
16924
17514
  _context4.prev = 42;
16925
- _iterator3.f();
17515
+ _iterator4.f();
16926
17516
  return _context4.finish(42);
16927
17517
  case 45:
16928
- _iterator4 = _createForOfIteratorHelper$k(removedMedias);
17518
+ _iterator5 = _createForOfIteratorHelper$k(removedMedias);
16929
17519
  _context4.prev = 46;
16930
- _iterator4.s();
17520
+ _iterator5.s();
16931
17521
  case 48:
16932
- if ((_step4 = _iterator4.n()).done) {
17522
+ if ((_step5 = _iterator5.n()).done) {
16933
17523
  _context4.next = 54;
16934
17524
  break;
16935
17525
  }
16936
- _media = _step4.value;
17526
+ _media = _step5.value;
16937
17527
  _context4.next = 52;
16938
17528
  return _media["delete"]();
16939
17529
  case 52:
@@ -16945,10 +17535,10 @@ function useFormData (_ref) {
16945
17535
  case 56:
16946
17536
  _context4.prev = 56;
16947
17537
  _context4.t1 = _context4["catch"](46);
16948
- _iterator4.e(_context4.t1);
17538
+ _iterator5.e(_context4.t1);
16949
17539
  case 59:
16950
17540
  _context4.prev = 59;
16951
- _iterator4.f();
17541
+ _iterator5.f();
16952
17542
  return _context4.finish(59);
16953
17543
  case 62:
16954
17544
  case "end":
@@ -16963,7 +17553,7 @@ function useFormData (_ref) {
16963
17553
  }
16964
17554
  function _setDynamicFields() {
16965
17555
  _setDynamicFields = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(oldData, newData) {
16966
- var items, getDynamicValue, _getDynamicValue, _iterator5, _step5, item, oldDynamicValue, newDynamicValue;
17556
+ var items, getDynamicValue, _getDynamicValue, _iterator6, _step6, item, oldDynamicValue, newDynamicValue;
16967
17557
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
16968
17558
  while (1) switch (_context6.prev = _context6.next) {
16969
17559
  case 0:
@@ -17008,15 +17598,15 @@ function useFormData (_ref) {
17008
17598
  return _getDynamicValue.apply(this, arguments);
17009
17599
  };
17010
17600
  items = selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
17011
- _iterator5 = _createForOfIteratorHelper$k(items);
17601
+ _iterator6 = _createForOfIteratorHelper$k(items);
17012
17602
  _context6.prev = 4;
17013
- _iterator5.s();
17603
+ _iterator6.s();
17014
17604
  case 6:
17015
- if ((_step5 = _iterator5.n()).done) {
17605
+ if ((_step6 = _iterator6.n()).done) {
17016
17606
  _context6.next = 19;
17017
17607
  break;
17018
17608
  }
17019
- item = _step5.value;
17609
+ item = _step6.value;
17020
17610
  if (!(item.dynamic && typeof item.name == 'string')) {
17021
17611
  _context6.next = 17;
17022
17612
  break;
@@ -17043,10 +17633,10 @@ function useFormData (_ref) {
17043
17633
  case 21:
17044
17634
  _context6.prev = 21;
17045
17635
  _context6.t0 = _context6["catch"](4);
17046
- _iterator5.e(_context6.t0);
17636
+ _iterator6.e(_context6.t0);
17047
17637
  case 24:
17048
17638
  _context6.prev = 24;
17049
- _iterator5.f();
17639
+ _iterator6.f();
17050
17640
  return _context6.finish(24);
17051
17641
  case 27:
17052
17642
  return _context6.abrupt("return", newData);
@@ -17115,19 +17705,19 @@ function useFormData (_ref) {
17115
17705
  }, [state.data]);
17116
17706
  var _keepRemovedMediaItem = /*#__PURE__*/function () {
17117
17707
  var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, items) {
17118
- var _iterator2, _step2, item, itemName, media, mediaItemRefIdPath, urlPath, mediaItemRefId, url, mediaItem, arrayData, i;
17708
+ var _iterator3, _step3, item, itemName, media, mediaItemRefIdPath, urlPath, mediaItemRefId, url, mediaItem, arrayData, i;
17119
17709
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
17120
17710
  while (1) switch (_context3.prev = _context3.next) {
17121
17711
  case 0:
17122
- _iterator2 = _createForOfIteratorHelper$k(items);
17712
+ _iterator3 = _createForOfIteratorHelper$k(items);
17123
17713
  _context3.prev = 1;
17124
- _iterator2.s();
17714
+ _iterator3.s();
17125
17715
  case 3:
17126
- if ((_step2 = _iterator2.n()).done) {
17716
+ if ((_step3 = _iterator3.n()).done) {
17127
17717
  _context3.next = 28;
17128
17718
  break;
17129
17719
  }
17130
- item = _step2.value;
17720
+ item = _step3.value;
17131
17721
  itemName = typeof item.name == 'string' ? [item.name] : item.name;
17132
17722
  if (!(item.type == 'media')) {
17133
17723
  _context3.next = 11;
@@ -17195,10 +17785,10 @@ function useFormData (_ref) {
17195
17785
  case 30:
17196
17786
  _context3.prev = 30;
17197
17787
  _context3.t0 = _context3["catch"](1);
17198
- _iterator2.e(_context3.t0);
17788
+ _iterator3.e(_context3.t0);
17199
17789
  case 33:
17200
17790
  _context3.prev = 33;
17201
- _iterator2.f();
17791
+ _iterator3.f();
17202
17792
  return _context3.finish(33);
17203
17793
  case 36:
17204
17794
  case "end":
@@ -17358,66 +17948,72 @@ var FormList$2 = function FormList(_ref) {
17358
17948
  var add = function add(a) {
17359
17949
  a();
17360
17950
  };
17361
- return /*#__PURE__*/jsx(Form$2.List, {
17362
- name: absoluteName,
17363
- initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
17364
- children: function children(fields, _ref2) {
17365
- var a = _ref2.add,
17366
- r = _ref2.remove;
17367
- return /*#__PURE__*/jsxs(Fragment, {
17368
- children: [fields.map(function (_ref3) {
17369
- var key = _ref3.key,
17370
- name = _ref3.name,
17371
- restField = _objectWithoutProperties(_ref3, _excluded$9);
17372
- return /*#__PURE__*/jsxs("div", {
17373
- id: key.toString(),
17374
- style: {
17375
- display: 'flex'
17376
- },
17377
- children: [!item.disablePushOrPop && /*#__PURE__*/jsx(MinusCircleOutlined, {
17378
- onClick: function onClick() {
17379
- remove(name, r);
17380
- }
17381
- }), /*#__PURE__*/jsx("div", {
17951
+ return /*#__PURE__*/jsxs(Fragment, {
17952
+ children: [/*#__PURE__*/jsx(Divider, {
17953
+ orientation: 'left',
17954
+ children: Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
17955
+ }), /*#__PURE__*/jsx(Form$2.List, {
17956
+ name: absoluteName,
17957
+ initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
17958
+ children: function children(fields, _ref2) {
17959
+ var a = _ref2.add,
17960
+ r = _ref2.remove;
17961
+ return /*#__PURE__*/jsxs(Fragment, {
17962
+ children: [fields.map(function (_ref3) {
17963
+ var key = _ref3.key,
17964
+ name = _ref3.name,
17965
+ restField = _objectWithoutProperties(_ref3, _excluded$9);
17966
+ return /*#__PURE__*/jsxs("div", {
17967
+ id: key.toString(),
17382
17968
  style: {
17383
- flexGrow: 1
17969
+ display: 'flex'
17384
17970
  },
17385
- children: item.items.map(function (i, idx) {
17386
- var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
17387
- var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
17388
- var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
17389
- if (hidden) return /*#__PURE__*/jsx(Fragment, {});
17390
- return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$$(_objectSpread$$({}, restField), {}, {
17391
- id: n.join(),
17392
- key: n.join(),
17393
- name: n,
17394
- rules: state.getRules(i, state.data),
17395
- label: getLabel(i, t),
17396
- valuePropName: i.type == 'checkbox' ? 'checked' : 'value',
17397
- initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
17398
- hasFeedback: !!state.fieldErrors[n.toString()],
17399
- validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
17400
- help: state.fieldErrors[n.toString()],
17401
- hidden: hidden
17402
- }), getElement(_objectSpread$$(_objectSpread$$({}, i), {}, {
17403
- name: n
17404
- }), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
17405
- })
17406
- })]
17407
- }, key);
17408
- }), !item.disablePushOrPop && /*#__PURE__*/jsx(Form$2.Item, {
17409
- children: /*#__PURE__*/jsx(Button, {
17410
- type: "dashed",
17411
- onClick: function onClick() {
17412
- return add(a);
17413
- },
17414
- block: true,
17415
- icon: /*#__PURE__*/jsx(PlusOutlined, {}),
17416
- children: t('backoffice.add_field')
17417
- })
17418
- })]
17419
- });
17420
- }
17971
+ children: [!item.disablePushOrPop && /*#__PURE__*/jsx(MinusCircleOutlined, {
17972
+ onClick: function onClick() {
17973
+ remove(name, r);
17974
+ }
17975
+ }), /*#__PURE__*/jsx("div", {
17976
+ style: {
17977
+ flexGrow: 1
17978
+ },
17979
+ children: item.items.map(function (i, idx) {
17980
+ var _state$fieldErrors$n$;
17981
+ var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
17982
+ var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
17983
+ var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
17984
+ if (hidden) return /*#__PURE__*/jsx(Fragment, {});
17985
+ return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$$(_objectSpread$$({}, restField), {}, {
17986
+ id: n.join(),
17987
+ key: n.join(),
17988
+ name: n,
17989
+ rules: state.getRules(i, state.data),
17990
+ label: getLabel(i, t),
17991
+ valuePropName: i.type == 'checkbox' ? 'checked' : 'value',
17992
+ initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
17993
+ hasFeedback: !!state.fieldErrors[n.toString()],
17994
+ validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
17995
+ help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
17996
+ hidden: hidden
17997
+ }), getElement(_objectSpread$$(_objectSpread$$({}, i), {}, {
17998
+ name: n
17999
+ }), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
18000
+ })
18001
+ })]
18002
+ }, key);
18003
+ }), !item.disablePushOrPop && /*#__PURE__*/jsx(Form$2.Item, {
18004
+ children: /*#__PURE__*/jsx(Button, {
18005
+ type: "dashed",
18006
+ onClick: function onClick() {
18007
+ return add(a);
18008
+ },
18009
+ block: true,
18010
+ icon: /*#__PURE__*/jsx(PlusOutlined, {}),
18011
+ children: t('backoffice.add_field')
18012
+ })
18013
+ })]
18014
+ });
18015
+ }
18016
+ })]
17421
18017
  });
17422
18018
  };
17423
18019
  var FormList$3 = observer(FormList$2);
@@ -19652,6 +20248,7 @@ var Translation = function Translation(_ref) {
19652
20248
  marginLeft: 64
19653
20249
  },
19654
20250
  children: item.items.map(function (i, idx) {
20251
+ var _state$fieldErrors$n$;
19655
20252
  var n = [].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate ? [currentLang] : []));
19656
20253
  var key = typeof n == 'string' ? n : n.join('.');
19657
20254
  var hidden = state.getIsHidden(i, data);
@@ -19668,7 +20265,7 @@ var Translation = function Translation(_ref) {
19668
20265
  initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
19669
20266
  hasFeedback: !!state.fieldErrors[n.toString()],
19670
20267
  validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
19671
- help: state.fieldErrors[n.toString()],
20268
+ help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
19672
20269
  hidden: hidden,
19673
20270
  children: getElement(_objectSpread$V(_objectSpread$V({}, i), {}, {
19674
20271
  name: n
@@ -20157,7 +20754,13 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
20157
20754
  case 'number':
20158
20755
  return /*#__PURE__*/jsx(InputNumber, {
20159
20756
  disabled: disabled,
20160
- value: item.value
20757
+ value: item.value,
20758
+ formatter: function formatter(value) {
20759
+ return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
20760
+ },
20761
+ onChange: function onChange(value) {
20762
+ _onChange(absoluteName, value);
20763
+ }
20161
20764
  });
20162
20765
  case 'checkbox':
20163
20766
  return /*#__PURE__*/jsx(Checkbox$1, {
@@ -20724,7 +21327,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
20724
21327
  var renderFormItems = function renderFormItems(items) {
20725
21328
  return /*#__PURE__*/jsx(Fragment, {
20726
21329
  children: items.map(function (item) {
20727
- var _state$hiddenRequired, _state$hiddenRequired2, _state$hiddenRequired3;
21330
+ var _state$hiddenRequired, _state$fieldErrors$it, _state$hiddenRequired2, _state$hiddenRequired3;
20728
21331
  return /*#__PURE__*/jsxs("div", {
20729
21332
  children: [item.marker && /*#__PURE__*/jsx(InfoCircleOutlined, {}), ['subTitle', 'array', 'text'].includes(item.type) ? getElement(item, setCanSave, state, item.name, state.onInputChanged, onErrorInternal, undefined, undefined, (_state$hiddenRequired = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired === void 0 ? void 0 : _state$hiddenRequired.hidden) : /*#__PURE__*/jsx(Form$2.Item, {
20730
21333
  name: item.name,
@@ -20734,7 +21337,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
20734
21337
  initialValue: item === null || item === void 0 ? void 0 : item.defaultValue,
20735
21338
  hasFeedback: !!state.fieldErrors[item.name.toString()],
20736
21339
  validateStatus: !!state.fieldErrors[item.name.toString()] ? 'error' : undefined,
20737
- help: state.fieldErrors[item.name.toString()],
21340
+ help: (_state$fieldErrors$it = state.fieldErrors[item.name.toString()]) !== null && _state$fieldErrors$it !== void 0 ? _state$fieldErrors$it : item.helpText,
20738
21341
  hidden: (_state$hiddenRequired2 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired2 === void 0 ? void 0 : _state$hiddenRequired2.hidden,
20739
21342
  children: getElement(item, setCanSave, state, item.name, state.onInputChanged, onErrorInternal, root, form, (_state$hiddenRequired3 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired3 === void 0 ? void 0 : _state$hiddenRequired3.hidden)
20740
21343
  }, Array.isArray(item.name) ? item.name.join('.') : item.name)]
@@ -26652,9 +27255,9 @@ var TableWrapper = function TableWrapper(_ref) {
26652
27255
  }
26653
27256
  };
26654
27257
  }, []);
26655
- function isDownloadActionDisabled() {
27258
+ function isDownloadActionDisabled(action) {
26656
27259
  var _state$data;
26657
- if (!state.configuration.downloadAction.rule) return false;
27260
+ if (!action.rule) return false;
26658
27261
  var data = (_state$data = state.data) === null || _state$data === void 0 ? void 0 : _state$data.filter(function (dt) {
26659
27262
  var _state$selected;
26660
27263
  return (_state$selected = state.selected) === null || _state$selected === void 0 ? void 0 : _state$selected.find(function (sel) {
@@ -26669,7 +27272,7 @@ var TableWrapper = function TableWrapper(_ref) {
26669
27272
  return !aplyRules({
26670
27273
  data: data,
26671
27274
  rootStore: root,
26672
- rules: state.configuration.downloadAction.rule
27275
+ rules: action.rule
26673
27276
  });
26674
27277
  }
26675
27278
  function checkPermission(permission) {
@@ -26710,30 +27313,29 @@ var TableWrapper = function TableWrapper(_ref) {
26710
27313
  onSelectedCatalog: state.onSelectedCatalog,
26711
27314
  dontLoadCatalogData: state.configuration.dontLoadCatalogData
26712
27315
  })
26713
- }), state.configuration.downloadAction && /*#__PURE__*/jsx(Button, {
26714
- type: "primary",
26715
- disabled: isDownloadActionDisabled(),
26716
- icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
26717
- size: 'middle',
26718
- onClick: function onClick() {
26719
- var _state$catalogItem, _state$catalogItem2;
26720
- root.downloadStore.openDownload({
26721
- data: state.data.filter(function (dt) {
26722
- return state.selected.find(function (sel) {
26723
- return sel == dt._id;
26724
- });
26725
- }).length ? state.data.filter(function (dt) {
26726
- return state.selected.find(function (sel) {
26727
- return sel == dt._id;
26728
- });
26729
- }) : state.mappingData,
26730
- action: state.configuration.downloadAction,
26731
- catalogCodex: (_state$catalogItem = state.catalogItem) === null || _state$catalogItem === void 0 ? void 0 : _state$catalogItem.codex,
26732
- dealerId: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.dealerId,
26733
- currentUrl: state.currentFetchUrl
26734
- });
26735
- },
26736
- children: t('backoffice.basetable.download')
27316
+ }), state.configuration.downloadAction && state.configuration.downloadAction.length > 0 && state.configuration.downloadAction.map(function (action, index) {
27317
+ var _action$label;
27318
+ return /*#__PURE__*/jsx(Button, {
27319
+ type: "primary",
27320
+ disabled: isDownloadActionDisabled(action),
27321
+ icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
27322
+ size: "middle",
27323
+ onClick: function onClick() {
27324
+ var _state$catalogItem, _state$catalogItem2, _state$catalogItem3;
27325
+ var selectedData = state.data.filter(function (dt) {
27326
+ return state.selected.includes(dt._id);
27327
+ });
27328
+ root.downloadStore.openDownload({
27329
+ data: selectedData.length ? selectedData : state.mappingData,
27330
+ action: action,
27331
+ catalogCodex: (_state$catalogItem = state.catalogItem) === null || _state$catalogItem === void 0 ? void 0 : _state$catalogItem.codex,
27332
+ dealerId: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.dealerId,
27333
+ currentUrl: state.currentFetchUrl,
27334
+ sessionGuid: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.sessionGuid
27335
+ });
27336
+ },
27337
+ children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : t('backoffice.basetable.download')
27338
+ }, index);
26737
27339
  }), state.configuration.canRefresh && /*#__PURE__*/jsx(Button, {
26738
27340
  onClick: function onClick() {
26739
27341
  state.triggerRefresh();
@@ -38522,7 +39124,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
38522
39124
  // if the extend series data is already loaded, use it
38523
39125
  isLoaded = !!((_seriesSelectorState$ = seriesSelectorState.options) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.find(function (option) {
38524
39126
  return option.value === (newSerie === null || newSerie === void 0 ? void 0 : newSerie._id);
38525
- })) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.serieNo);
39127
+ })) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.lastUpdatedDate);
38526
39128
  if (!isLoaded) {
38527
39129
  _context.next = 6;
38528
39130
  break;
@@ -38535,7 +39137,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
38535
39137
  api = new _default$d({
38536
39138
  type: 'SelectSimple',
38537
39139
  apiInterface: {
38538
- read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts")
39140
+ read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts;lastUpdatedDate")
38539
39141
  }
38540
39142
  }, root);
38541
39143
  _context.next = 10;
@@ -39878,28 +40480,32 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
39878
40480
  field: 'optionFreeText',
39879
40481
  cellDataType: 'boolean'
39880
40482
  }, {
39881
- field: 'featureIds',
40483
+ field: 'featureNos',
39882
40484
  headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
39883
40485
  cellDataType: 'lookup',
39884
40486
  editable: true,
39885
40487
  required: false,
39886
40488
  customParams: {
39887
40489
  nameField: 'featureIdsDisplayTexts',
39888
- filterCellType: 'objectId',
40490
+ filterCellType: 'number',
39889
40491
  displayLabelTemplate: '${name} (${value})',
39890
40492
  apiInterface: {
39891
40493
  read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
39892
40494
  },
39893
40495
  lookupValue: 'featureText',
39894
- lookupKey: '_id',
40496
+ lookupKey: 'featureNo',
39895
40497
  lookupKeyFilterType: {
39896
40498
  type: 'equals',
39897
- filterType: 'text'
40499
+ filterType: 'number'
39898
40500
  },
40501
+ additionalMappings: [{
40502
+ lookupField: '_id',
40503
+ targetField: 'featureIds'
40504
+ }],
39899
40505
  multiple: true,
39900
40506
  translated: true
39901
40507
  },
39902
- additionalFields: ['featureIdsDisplayTexts'],
40508
+ additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
39903
40509
  isDictionary: true
39904
40510
  }, {
39905
40511
  headerName: 'backoffice.idmCatalog.items.label.validation',
@@ -42050,7 +42656,8 @@ var TablePriceFeatureGroups = observer(function () {
42050
42656
  organizationId = _useModule.organizationId,
42051
42657
  apiConfig = _useModule.apiConfig,
42052
42658
  setSelectedItem = _useModule.setSelectedItem,
42053
- setSelectedSerie = _useModule.setSelectedSerie;
42659
+ setSelectedSerie = _useModule.setSelectedSerie,
42660
+ resetSeriesSelector = _useModule.resetSeriesSelector;
42054
42661
  var _React$useState = React.useState(),
42055
42662
  _React$useState2 = _slicedToArray(_React$useState, 2),
42056
42663
  selectedPriceFeatureGroup = _React$useState2[0],
@@ -42137,6 +42744,12 @@ var TablePriceFeatureGroups = observer(function () {
42137
42744
  if (current) {
42138
42745
  setSelectedPriceFeatureGroup(_objectSpread$7({}, current.data));
42139
42746
  }
42747
+ if (updates.length == 0 || updates.some(function (update) {
42748
+ var _update$oldData;
42749
+ return !((_update$oldData = update.oldData) !== null && _update$oldData !== void 0 && _update$oldData.priceFeatureGroupNo);
42750
+ })) {
42751
+ resetSeriesSelector();
42752
+ }
42140
42753
  }
42141
42754
  };
42142
42755
  }, [selectedNodeId]);
@@ -42829,15 +43442,15 @@ function TableCollections () {
42829
43442
  }, {
42830
43443
  headerName: 'backoffice.idmEnricher.collections.label.validation',
42831
43444
  children: [{
42832
- headerName: 'backoffice.idmCatalog.general.label.validFromDate',
42833
- field: 'validFromDate',
43445
+ headerName: 'backoffice.idmCatalog.general.label.validFrom',
43446
+ field: 'validFrom',
42834
43447
  cellDataType: 'dateString',
42835
43448
  customParams: {
42836
43449
  dateFormat: 'DD.MM.YYYY'
42837
43450
  }
42838
43451
  }, {
42839
- headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
42840
- field: 'validUntilDate',
43452
+ headerName: 'backoffice.idmCatalog.general.label.validUntil',
43453
+ field: 'validTo',
42841
43454
  cellDataType: 'dateString',
42842
43455
  customParams: {
42843
43456
  dateFormat: 'DD.MM.YYYY'