@crystaldesign/diva-backoffice 25.2.0-beta.28 → 25.2.0-beta.3

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 (44) hide show
  1. package/build/esm/index.js +348 -417
  2. package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
  3. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Features.d.ts.map +1 -1
  4. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Items.d.ts.map +1 -1
  5. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionCombinations.d.ts.map +1 -1
  6. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts.map +1 -1
  7. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PartlistPos.d.ts.map +1 -1
  8. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts.map +1 -1
  9. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts.map +1 -1
  10. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts +1 -6
  11. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/Forms/IDMImportForm.d.ts.map +1 -1
  12. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/OpenModalButton/index.d.ts.map +1 -1
  13. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/FeatureSelector.d.ts +1 -1
  14. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/FeatureSelector.d.ts.map +1 -1
  15. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/SeriesSelector.d.ts +1 -1
  16. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/SeriesSelector.d.ts.map +1 -1
  17. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts +1 -5
  18. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadButton/index.d.ts.map +1 -1
  19. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableDecisions/index.d.ts.map +1 -1
  20. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableDetailInfos/index.d.ts.map +1 -1
  21. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableFeatureClasses/index.d.ts.map +1 -1
  22. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePartlists/index.d.ts.map +1 -1
  23. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.d.ts.map +1 -1
  24. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableSeries/index.d.ts.map +1 -1
  25. package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/CollectionMembers.d.ts.map +1 -1
  26. package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts +1 -3
  27. package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts.map +1 -1
  28. package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/index.d.ts.map +1 -1
  29. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/FeatureSelector.d.ts +1 -1
  30. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/FeatureSelector.d.ts.map +1 -1
  31. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/SeriesSelector.d.ts +1 -1
  32. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/SeriesSelector.d.ts.map +1 -1
  33. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableExclusivity/tableConfiguration.d.ts.map +1 -1
  34. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableGroups/index.d.ts.map +1 -1
  35. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePriceList/index.d.ts.map +1 -1
  36. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableProperties/index.d.ts.map +1 -1
  37. package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts +1 -1
  38. package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
  39. package/build/types/backoffice/src/ui/Table/StandardTable/useTableData.d.ts.map +1 -1
  40. package/build/types/backoffice/src/ui/Table/types.d.ts +1 -2
  41. package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
  42. package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts +24 -25
  43. package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts.map +1 -1
  44. package/package.json +10 -10
@@ -1969,14 +1969,17 @@ function loadConfiguration(t, root, config, lang) {
1969
1969
  width: 160
1970
1970
  }],
1971
1971
  apiInterface: {
1972
- read: '${analyticsService}/businessevents?organizationId=${organizationId}'
1972
+ read: {
1973
+ list: '${analyticsService}/businessevents?organizationId=${organizationId}',
1974
+ filterServerSide: true
1975
+ }
1973
1976
  },
1974
1977
  filter: {
1975
1978
  period: {
1976
1979
  title: t('backoffice.FilterBoxAnalytics.filter.zeitraum'),
1977
1980
  fromField: 'fromTimeStamp',
1978
1981
  toField: 'toTimeStamp',
1979
- "default": 30
1982
+ "default": '30'
1980
1983
  },
1981
1984
  select: {
1982
1985
  filterField: 'status',
@@ -2022,43 +2025,138 @@ function loadConfiguration(t, root, config, lang) {
2022
2025
  DetailApplicationState: {
2023
2026
  type: 'JsonEditor'
2024
2027
  },
2025
- TableClientOEOverview: {
2028
+ TableClientRenderJobs: {
2026
2029
  type: 'Table',
2027
- title: t('backoffice.table.roe.title'),
2030
+ title: t('backoffice.table.renderjobs.title'),
2031
+ canRefresh: true,
2028
2032
  columns: [{
2029
- title: t('backoffice.table.roe.name'),
2030
- field: '_id',
2031
- filter: 'advanced',
2032
- sorter: 2
2033
+ title: t('backoffice.table.renderjobs.columns.state'),
2034
+ field: 'state',
2035
+ sorter: 1,
2036
+ filter: {
2037
+ type: 'multiselect',
2038
+ values: [{
2039
+ value: 0,
2040
+ label: 'renderjob.stateincart'
2041
+ }, {
2042
+ value: 1,
2043
+ groupedValues: [1, 2, 3],
2044
+ label: 'renderjob.state.1'
2045
+ }, {
2046
+ value: 2,
2047
+ groupedValues: [4, 5, 6, 7, 8, 9, 11],
2048
+ label: 'renderjob.stateinprogress'
2049
+ }, {
2050
+ value: 10,
2051
+ label: 'renderjob.state.10'
2052
+ }, {
2053
+ value: 12,
2054
+ label: 'renderjob.state.12'
2055
+ }]
2056
+ },
2057
+ translationPrefix: 'renderjob.state',
2058
+ type: 'string',
2059
+ groupedValuesDisplayString: [{
2060
+ values: [0],
2061
+ text: t('renderjob.stateincart')
2062
+ }, {
2063
+ values: [1, 2, 3],
2064
+ text: t('renderjob.state.1')
2065
+ }, {
2066
+ values: [4, 5, 6, 7, 9, 8, 11],
2067
+ text: t('renderjob.stateinprogress')
2068
+ }],
2069
+ width: 130
2033
2070
  }, {
2034
- title: t('backoffice.table.roe.countHQ'),
2035
- field: 'countHQ',
2071
+ title: t('backoffice.table.renderjobs.columns.divaNr'),
2072
+ field: 'divaNr',
2036
2073
  filter: 'advanced',
2037
2074
  sorter: 2,
2038
- width: 50
2075
+ width: 120
2039
2076
  }, {
2040
- title: t('backoffice.table.roe.countAR'),
2041
- field: 'countAR',
2077
+ title: t('backoffice.table.renderjobs.columns.VariantId'),
2078
+ field: 'divaNrVariantId',
2042
2079
  filter: 'advanced',
2043
2080
  sorter: 2,
2044
- width: 50
2081
+ width: 120
2082
+ }, {
2083
+ title: t('backoffice.table.renderjobs.columns.fileUrl'),
2084
+ field: 'fileUrl',
2085
+ type: 'media',
2086
+ align: 'center',
2087
+ width: 100
2045
2088
  }, {
2046
- title: t('backoffice.table.roe.countAmbient'),
2047
- field: 'countAmbient',
2089
+ title: t('backoffice.table.renderjobs.columns.realTimeRenderUrl'),
2090
+ field: 'realTimeRenderUrl',
2091
+ type: 'media',
2092
+ align: 'center',
2093
+ width: 100
2094
+ }, {
2095
+ title: t('backoffice.table.renderjobs.columns.job'),
2096
+ field: 'job',
2097
+ sorter: 3,
2048
2098
  filter: 'advanced',
2049
- sorter: 2,
2050
- width: 50
2099
+ width: 100
2051
2100
  }, {
2052
- title: t('backoffice.table.roe.count3DExport'),
2053
- field: 'count3DExport',
2101
+ title: t('backoffice.table.renderjobs.columns.fileName'),
2102
+ field: 'fileName',
2103
+ sorter: 3,
2054
2104
  filter: 'advanced',
2055
- sorter: 2,
2056
- width: 50
2105
+ width: 220
2106
+ }, {
2107
+ title: t('backoffice.table.renderjobs.columns.viewPoint'),
2108
+ field: 'viewPoint',
2109
+ sorter: 4,
2110
+ filter: 'advanced',
2111
+ width: 100
2112
+ }, {
2113
+ title: t('backoffice.table.renderjobs.columns.renderScene'),
2114
+ field: 'renderScene_displayText',
2115
+ sorter: 4,
2116
+ filter: 'advanced',
2117
+ width: 200
2118
+ }, {
2119
+ title: t('backoffice.table.renderjobs.columns.group'),
2120
+ field: 'group',
2121
+ sorter: 11,
2122
+ filter: 'advanced',
2123
+ width: 200
2124
+ }, {
2125
+ title: t('backoffice.table.renderjobs.columns.productName'),
2126
+ field: 'productName',
2127
+ sorter: 12,
2128
+ filter: 'advanced',
2129
+ width: 180
2130
+ }, {
2131
+ title: t('backoffice.table.invitations.organization'),
2132
+ field: 'organizationName',
2133
+ sorter: 1,
2134
+ width: 200,
2135
+ hidden: function hidden(_, globalFilter) {
2136
+ var _globalFilter$toggle;
2137
+ return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle = globalFilter.toggle) !== null && _globalFilter$toggle !== void 0 && (_globalFilter$toggle = _globalFilter$toggle['hierarchy']) !== null && _globalFilter$toggle !== void 0 && _globalFilter$toggle[0]);
2138
+ }
2139
+ }, {
2140
+ title: t('backoffice.table.renderjobs.columns.created'),
2141
+ field: 'created',
2142
+ sorter: 15,
2143
+ type: 'unixTimeStamp',
2144
+ defaultSortOrder: 'descend',
2145
+ width: 160,
2146
+ filter: 'interval'
2147
+ }, {
2148
+ title: t('backoffice.table.renderjobs.columns.lastUpdated'),
2149
+ field: 'lastUpdated',
2150
+ sorter: 15,
2151
+ type: 'unixTimeStamp',
2152
+ defaultSortOrder: 'descend',
2153
+ width: 160,
2154
+ filter: 'interval'
2057
2155
  }],
2058
2156
  apiInterface: {
2059
2157
  read: {
2060
- list: '${mediaService}/renderjobs/overview?from=${from}&to=${to}',
2061
- filterServerSide: false
2158
+ list: '${mediaService}/renderjobs?organizationId=${organizationId}',
2159
+ filterServerSide: true
2062
2160
  },
2063
2161
  update: {
2064
2162
  url: '${mediaService}/renderjobs/{_id}/state',
@@ -2068,32 +2166,83 @@ function loadConfiguration(t, root, config, lang) {
2068
2166
  mapping: {
2069
2167
  type: 'query',
2070
2168
  map: [{
2071
- sourceField: 'from',
2072
- targetField: 'from'
2169
+ sourceField: 'hierarchy',
2170
+ targetField: 'hierarchy'
2073
2171
  }, {
2074
- sourceField: 'to',
2075
- targetField: 'to'
2172
+ globalValue: 'selectedOrganizationId',
2173
+ targetField: 'organizationId'
2076
2174
  }]
2077
2175
  },
2078
2176
  filter: {
2079
2177
  toggle: {
2080
- globalValue: 'organizationId',
2081
- fields: ['organizationId'],
2082
- label: t('backoffice.table.clientrelations.filter.label.allorgs'),
2083
- labelOff: t('backoffice.table.clientrelations.filter.label.allorgs'),
2084
- inverted: true,
2085
- inQuery: true,
2086
- permission: 'backoffice_taskstatus_allorgs',
2087
- isAnd: true
2088
- },
2089
- period: {
2090
- title: t('backoffice.FilterBoxAnalytics.filter.zeitraum'),
2091
- fromField: 'from',
2092
- toField: 'to',
2093
- "default": 30,
2094
- onlyAsMappingData: true
2178
+ fields: ['hierarchy'],
2179
+ label: t('backoffice.table.allorgusers.filter.toggle.label'),
2180
+ labelOff: t('backoffice.table.allorgusers.filter.toggle.labelOff'),
2181
+ inQuery: true
2095
2182
  }
2096
- }
2183
+ },
2184
+ rowAction: [{
2185
+ actionType: 'SimpleChangeValueButton',
2186
+ label: t('backoffice.renderjobs.order'),
2187
+ id: 'OrderClientRenderJob',
2188
+ rule: [
2189
+ //only created renderjobs can be ordered
2190
+ {
2191
+ match: {
2192
+ sourceField: 'state',
2193
+ value: 0
2194
+ }
2195
+ }],
2196
+ newValues: [{
2197
+ field: 'state',
2198
+ value: 1
2199
+ }],
2200
+ apiInterface: {
2201
+ update: {
2202
+ url: '${mediaService}/renderjobs/{_id}/state',
2203
+ method: 'PATCH'
2204
+ }
2205
+ }
2206
+ }, {
2207
+ actionType: 'SimpleChangeValueButton',
2208
+ label: t('backoffice.cancel'),
2209
+ id: 'CancelClientRenderJob',
2210
+ rule: [
2211
+ //only ordered and created renderjobs can bbe canceled
2212
+ {
2213
+ or: [{
2214
+ match: {
2215
+ sourceField: 'state',
2216
+ value: 0
2217
+ }
2218
+ }, {
2219
+ match: {
2220
+ sourceField: 'state',
2221
+ value: 1
2222
+ }
2223
+ }, {
2224
+ match: {
2225
+ sourceField: 'state',
2226
+ value: 2
2227
+ }
2228
+ }, {
2229
+ match: {
2230
+ sourceField: 'state',
2231
+ value: 3
2232
+ }
2233
+ }]
2234
+ }],
2235
+ newValues: [{
2236
+ field: 'state',
2237
+ value: 10
2238
+ }],
2239
+ apiInterface: {
2240
+ update: {
2241
+ url: '${mediaService}/renderjobs/{_id}/state',
2242
+ method: 'PATCH'
2243
+ }
2244
+ }
2245
+ }]
2097
2246
  },
2098
2247
  TableAllUsers: {
2099
2248
  type: 'Table',
@@ -4750,8 +4899,8 @@ function loadConfiguration(t, root, config, lang) {
4750
4899
  sorter: 1,
4751
4900
  width: 200,
4752
4901
  hidden: function hidden(_, globalFilter) {
4753
- var _globalFilter$toggle;
4754
- return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle = globalFilter.toggle) !== null && _globalFilter$toggle !== void 0 && (_globalFilter$toggle = _globalFilter$toggle['hierarchy']) !== null && _globalFilter$toggle !== void 0 && _globalFilter$toggle[0]);
4902
+ var _globalFilter$toggle2;
4903
+ return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle2 = globalFilter.toggle) !== null && _globalFilter$toggle2 !== void 0 && (_globalFilter$toggle2 = _globalFilter$toggle2['hierarchy']) !== null && _globalFilter$toggle2 !== void 0 && _globalFilter$toggle2[0]);
4755
4904
  }
4756
4905
  }, {
4757
4906
  title: t('backoffice.table.invitations.mailsend'),
@@ -4988,8 +5137,8 @@ function loadConfiguration(t, root, config, lang) {
4988
5137
  field: 'organizationDisplayName',
4989
5138
  width: 150,
4990
5139
  hidden: function hidden(_, globalFilter) {
4991
- var _globalFilter$toggle2;
4992
- return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle2 = globalFilter.toggle) !== null && _globalFilter$toggle2 !== void 0 && (_globalFilter$toggle2 = _globalFilter$toggle2['hierarchy']) !== null && _globalFilter$toggle2 !== void 0 && _globalFilter$toggle2[0]);
5140
+ var _globalFilter$toggle3;
5141
+ return !(globalFilter !== null && globalFilter !== void 0 && (_globalFilter$toggle3 = globalFilter.toggle) !== null && _globalFilter$toggle3 !== void 0 && (_globalFilter$toggle3 = _globalFilter$toggle3['hierarchy']) !== null && _globalFilter$toggle3 !== void 0 && _globalFilter$toggle3[0]);
4993
5142
  }
4994
5143
  }, {
4995
5144
  title: t('backoffice.table.allorgusers.created'),
@@ -7668,7 +7817,10 @@ function loadConfiguration(t, root, config, lang) {
7668
7817
  style: {
7669
7818
  marginBottom: '20px'
7670
7819
  },
7671
- permission: 'backoffice_admin_organizations'
7820
+ permission: 'backoffice_admin_organizations',
7821
+ hidden: function hidden(data) {
7822
+ return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
7823
+ }
7672
7824
  }, {
7673
7825
  name: 'Info',
7674
7826
  type: 'text',
@@ -7676,7 +7828,10 @@ function loadConfiguration(t, root, config, lang) {
7676
7828
  marginBottom: '30px'
7677
7829
  },
7678
7830
  text: t('backoffice.form.organizationdetails.items.licensesdesc'),
7679
- permission: 'backoffice_admin_organizations'
7831
+ permission: 'backoffice_admin_organizations',
7832
+ hidden: function hidden(data) {
7833
+ return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
7834
+ }
7680
7835
  }, {
7681
7836
  name: ['settings', 'enable3DExport'],
7682
7837
  label: t('backoffice.form.organizationdetails.items.settings.enable3DExport'),
@@ -7693,22 +7848,6 @@ function loadConfiguration(t, root, config, lang) {
7693
7848
  value: false
7694
7849
  }],
7695
7850
  permission: 'backoffice_sys_admin_organizations'
7696
- }, {
7697
- name: ['settings', 'renderjobSeparateMaterials'],
7698
- label: t('backoffice.form.organizationdetails.items.settings.renderjobSeparateMaterials'),
7699
- permission: 'backoffice_admin_organizations',
7700
- type: 'radio',
7701
- optionType: 'button',
7702
- options: [{
7703
- label: t('backoffice.form.organizationdetails.items.vererbt'),
7704
- value: undefined
7705
- }, {
7706
- label: t('backoffice.form.organizationdetails.items.ja'),
7707
- value: true
7708
- }, {
7709
- label: t('backoffice.form.organizationdetails.items.nein'),
7710
- value: false
7711
- }]
7712
7851
  }, {
7713
7852
  name: ['settings', 'enableAR'],
7714
7853
  label: t('backoffice.form.organizationdetails.items.settings.enableAR'),
@@ -7799,7 +7938,10 @@ function loadConfiguration(t, root, config, lang) {
7799
7938
  style: {
7800
7939
  marginBottom: '40px'
7801
7940
  },
7802
- permission: 'backoffice_admin_organizations'
7941
+ permission: 'backoffice_admin_organizations',
7942
+ hidden: function hidden(data) {
7943
+ return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
7944
+ }
7803
7945
  }, {
7804
7946
  name: 'iln',
7805
7947
  label: t('backoffice.form.organizationdetails.items.iln'),
@@ -13392,11 +13534,10 @@ var menu = [{
13392
13534
  permission: 'backoffice_current_organization',
13393
13535
  icon: 'ApartmentOutlined'
13394
13536
  }, {
13395
- id: 'TableClientOEOverview',
13396
- path: 'orderentry',
13397
- label: 'backoffice.menu.items.label.oeoverview',
13398
- icon: 'FileImageOutlined',
13399
- permission: 'backoffice_renderjobs_overview'
13537
+ id: 'TableClientRenderJobs',
13538
+ path: 'renderjobs',
13539
+ label: 'backoffice.menu.items.label.renderjobs',
13540
+ icon: 'FileImageOutlined'
13400
13541
  }, {
13401
13542
  id: 'catalogArea',
13402
13543
  path: 'catalogs',
@@ -16618,7 +16759,6 @@ function parseDataEntry(item, selectMapping) {
16618
16759
  * Returns the data of the selected option(s) based on the selectMapping configuration
16619
16760
  */
16620
16761
  function parseReturnData(options, selectMapping) {
16621
- if (!options) return undefined;
16622
16762
  if (Array.isArray(options)) return options.map(function (option) {
16623
16763
  return parseReturnData(option, selectMapping);
16624
16764
  });
@@ -25235,7 +25375,7 @@ var TableWrapper = function TableWrapper(_ref) {
25235
25375
  state.onGlobalFilterPeriod(values[0].valueOf(), values[1].valueOf());
25236
25376
  }
25237
25377
  },
25238
- defaultValue: [(_state$globalFilter2 = state.globalFilter) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2.timeStamp) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2['fromTimeStamp']) !== null && _state$globalFilter2 !== void 0 && _state$globalFilter2[0] ? dayjs((_state$globalFilter3 = state.globalFilter) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3.timeStamp) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3['fromTimeStamp']) === null || _state$globalFilter3 === void 0 ? void 0 : _state$globalFilter3[0]) : dayjs(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000)),
25378
+ value: [(_state$globalFilter2 = state.globalFilter) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2.timeStamp) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2['fromTimeStamp']) !== null && _state$globalFilter2 !== void 0 && _state$globalFilter2[0] ? dayjs((_state$globalFilter3 = state.globalFilter) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3.timeStamp) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3['fromTimeStamp']) === null || _state$globalFilter3 === void 0 ? void 0 : _state$globalFilter3[0]) : dayjs(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000)),
25239
25379
  // Convert to Dayjs
25240
25380
  (_state$globalFilter4 = state.globalFilter) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4.timeStamp) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) !== null && _state$globalFilter4 !== void 0 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
25241
25381
  ]
@@ -26900,7 +27040,7 @@ function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
26900
27040
  function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26901
27041
  var LOG$2 = getLogger('Backoffice', 'TableData');
26902
27042
  function useTableData (_ref) {
26903
- var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$filter4, _configuration$bulkAc, _configuration$apiInt;
27043
+ var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
26904
27044
  var id = _ref.id,
26905
27045
  i18n = _ref.i18n,
26906
27046
  parentData = _ref.parentData,
@@ -26930,11 +27070,6 @@ function useTableData (_ref) {
26930
27070
  _useState8 = _slicedToArray(_useState7, 2),
26931
27071
  catalogItem = _useState8[0],
26932
27072
  onSelectedCatalog = _useState8[1];
26933
- var filterHash = useRef();
26934
- var _useState9 = useState(),
26935
- _useState10 = _slicedToArray(_useState9, 2),
26936
- error = _useState10[0],
26937
- setError = _useState10[1];
26938
27073
  var toggleConfig = (_configuration$filter = configuration.filter) === null || _configuration$filter === void 0 ? void 0 : _configuration$filter.toggle;
26939
27074
  var toggleFilter = {};
26940
27075
  toggleConfig === null || toggleConfig === void 0 || toggleConfig.fields.forEach(function (f) {
@@ -26944,15 +27079,19 @@ function useTableData (_ref) {
26944
27079
  (_configuration$filter2 = configuration.filter) === null || _configuration$filter2 === void 0 || (_configuration$filter2 = _configuration$filter2["default"]) === null || _configuration$filter2 === void 0 || _configuration$filter2.fields.forEach(function (f) {
26945
27080
  return defaultFilter[f] = [configuration.filter["default"].globalValue ? root.getGlobalValue(configuration.filter["default"].globalValue) : true, 'eq'];
26946
27081
  });
26947
- var _useState11 = useState({
27082
+ var _useState9 = useState({
26948
27083
  select: (_configuration$filter3 = configuration.filter) !== null && _configuration$filter3 !== void 0 && (_configuration$filter3 = _configuration$filter3.select) !== null && _configuration$filter3 !== void 0 && _configuration$filter3.defaultValue ? _defineProperty({}, configuration.filter.select.filterField, [configuration.filter.select.defaultValue, 'eq']) : undefined,
26949
27084
  toggle: toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.defaultChecked && !(toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.inverted) || !(toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.defaultChecked) && toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.inverted ? toggleFilter : undefined,
26950
27085
  "default": defaultFilter ? defaultFilter : undefined
26951
27086
  }),
27087
+ _useState10 = _slicedToArray(_useState9, 2),
27088
+ globalFilter = _useState10[0],
27089
+ setGlobaFilter = _useState10[1];
27090
+ var filterHash = useRef();
27091
+ var _useState11 = useState(),
26952
27092
  _useState12 = _slicedToArray(_useState11, 2),
26953
- globalFilter = _useState12[0],
26954
- setGlobaFilter = _useState12[1];
26955
- var periodDefaultValue = (_configuration$filter4 = configuration.filter) === null || _configuration$filter4 === void 0 || (_configuration$filter4 = _configuration$filter4.period) === null || _configuration$filter4 === void 0 ? void 0 : _configuration$filter4["default"];
27093
+ error = _useState12[0],
27094
+ setError = _useState12[1];
26956
27095
  var _useState13 = useState({
26957
27096
  loading: true,
26958
27097
  deleting: false,
@@ -26968,15 +27107,13 @@ function useTableData (_ref) {
26968
27107
  mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
26969
27108
  prefilter: {
26970
27109
  select: globalFilter.select
26971
- },
26972
- from: periodDefaultValue ? Date.now() - periodDefaultValue * 86400000 : undefined,
26973
- to: Date.now()
27110
+ }
26974
27111
  })
26975
27112
  }),
26976
27113
  _useState14 = _slicedToArray(_useState13, 2),
26977
27114
  state = _useState14[0],
26978
27115
  setState = _useState14[1];
26979
- var mappingData = _objectSpread$o(_objectSpread$o(_objectSpread$o({}, parentData), state.data), {}, {
27116
+ var mapping = _objectSpread$o(_objectSpread$o({}, parentData), {}, {
26980
27117
  catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
26981
27118
  sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
26982
27119
  });
@@ -26989,8 +27126,8 @@ function useTableData (_ref) {
26989
27126
  case 0:
26990
27127
  fd = new FormData();
26991
27128
  fd.append('value', JSON.stringify([newData]));
26992
- fd.append('catalogCodex', mappingData.catalogCodex);
26993
- fd.append('sessionGuid', mappingData.sessionGuID);
27129
+ fd.append('catalogCodex', mapping.catalogCodex);
27130
+ fd.append('sessionGuid', mapping.sessionGuID);
26994
27131
  _context.next = 6;
26995
27132
  return apiHandler.create(undefined, undefined, undefined, fd);
26996
27133
  case 6:
@@ -27029,8 +27166,8 @@ function useTableData (_ref) {
27029
27166
  for (var i = 0; i < dataArray.length; i++) {
27030
27167
  var dataRow = dataArray[i];
27031
27168
  if (filterServerSide) {
27032
- var _configuration$filter5;
27033
- if ((_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.select) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.filterField) {
27169
+ var _configuration$filter4;
27170
+ if ((_configuration$filter4 = configuration.filter) !== null && _configuration$filter4 !== void 0 && (_configuration$filter4 = _configuration$filter4.select) !== null && _configuration$filter4 !== void 0 && _configuration$filter4.filterField) {
27034
27171
  onGlobalFilterSelect(dataRow[configuration.filter.select.filterField]);
27035
27172
  } else {
27036
27173
  var _pagination;
@@ -27046,15 +27183,15 @@ function useTableData (_ref) {
27046
27183
  });
27047
27184
  }
27048
27185
  } else {
27049
- var _configuration$filter6, _configuration$filter7;
27186
+ var _configuration$filter5, _configuration$filter6;
27050
27187
  var _updateData2 = updateData({
27051
27188
  data: newInitData,
27052
27189
  dataRow: dataRow
27053
27190
  }),
27054
27191
  nextInitData = _updateData2.data;
27055
27192
  var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData), {}, {
27056
- filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
27057
- }, configuration !== null && configuration !== void 0 && (_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && (_configuration$filter7 = _configuration$filter7.toggle) !== null && _configuration$filter7 !== void 0 && _configuration$filter7.inQuery ? {
27193
+ filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.toggle) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
27194
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery ? {
27058
27195
  genericProps: globalFilter.toggle
27059
27196
  } : undefined), {}, {
27060
27197
  data: nextInitData,
@@ -27085,14 +27222,14 @@ function useTableData (_ref) {
27085
27222
  _useState16 = _slicedToArray(_useState15, 1),
27086
27223
  columns = _useState16[0];
27087
27224
  var triggerRefresh = function triggerRefresh() {
27088
- var _configuration$filter8;
27225
+ var _configuration$filter7;
27089
27226
  setError(undefined);
27090
27227
  var newGlobalFilter = _objectSpread$o({}, globalFilter);
27091
27228
  //on refresh update default filter, since global value can change
27092
- if ((_configuration$filter8 = configuration.filter) !== null && _configuration$filter8 !== void 0 && _configuration$filter8["default"]) {
27093
- var _configuration$filter9;
27229
+ if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
27230
+ var _configuration$filter8;
27094
27231
  var _defaultFilter = {};
27095
- (_configuration$filter9 = configuration.filter) === null || _configuration$filter9 === void 0 || (_configuration$filter9 = _configuration$filter9["default"]) === null || _configuration$filter9 === void 0 || _configuration$filter9.fields.forEach(function (f) {
27232
+ (_configuration$filter8 = configuration.filter) === null || _configuration$filter8 === void 0 || (_configuration$filter8 = _configuration$filter8["default"]) === null || _configuration$filter8 === void 0 || _configuration$filter8.fields.forEach(function (f) {
27096
27233
  return _defaultFilter[f] = [configuration.filter["default"].globalValue ? root.getGlobalValue(configuration.filter["default"].globalValue) : true, 'eq'];
27097
27234
  });
27098
27235
  newGlobalFilter["default"] = _defaultFilter;
@@ -27152,7 +27289,7 @@ function useTableData (_ref) {
27152
27289
  }, [configuration.title, parentData]);
27153
27290
  var getDataById = /*#__PURE__*/function () {
27154
27291
  var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id) {
27155
- var _configuration$filter10;
27292
+ var _configuration$filter9;
27156
27293
  var filters, ssf, data;
27157
27294
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
27158
27295
  while (1) switch (_context2.prev = _context2.next) {
@@ -27166,11 +27303,11 @@ function useTableData (_ref) {
27166
27303
  },
27167
27304
  columns: configuration.columns,
27168
27305
  filters: filters
27169
- }, configuration !== null && configuration !== void 0 && (_configuration$filter10 = configuration.filter) !== null && _configuration$filter10 !== void 0 && (_configuration$filter10 = _configuration$filter10.toggle) !== null && _configuration$filter10 !== void 0 && _configuration$filter10.inQuery ? {
27306
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter9 = configuration.filter) !== null && _configuration$filter9 !== void 0 && (_configuration$filter9 = _configuration$filter9.toggle) !== null && _configuration$filter9 !== void 0 && _configuration$filter9.inQuery ? {
27170
27307
  genericProps: globalFilter.toggle
27171
27308
  } : undefined);
27172
27309
  _context2.next = 5;
27173
- return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$o(_objectSpread$o({}, mappingData), state.mappingData), ssf);
27310
+ return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf);
27174
27311
  case 5:
27175
27312
  data = _context2.sent;
27176
27313
  return _context2.abrupt("return", data);
@@ -27186,18 +27323,17 @@ function useTableData (_ref) {
27186
27323
  }();
27187
27324
  var onChange = /*#__PURE__*/function () {
27188
27325
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(p) {
27189
- var _configuration$filter11, _configuration$filter12, _prefilter$select, _configuration$filter13, _configuration$filter14;
27326
+ var _configuration$filter10, _configuration$filter11, _prefilter$select, _configuration$filter12, _configuration$filter13;
27190
27327
  var prefilter,
27191
27328
  refresh,
27192
27329
  clearSelection,
27193
- addMappingData,
27194
27330
  currentData,
27195
27331
  filterData,
27196
27332
  currentFilterHash,
27197
27333
  currentPagination,
27198
27334
  currentUrl,
27335
+ _configuration$filter14,
27199
27336
  _configuration$filter15,
27200
- _configuration$filter16,
27201
27337
  _prefilter$toggle,
27202
27338
  _parseFilter,
27203
27339
  ssf,
@@ -27213,13 +27349,11 @@ function useTableData (_ref) {
27213
27349
  prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
27214
27350
  refresh = _args3.length > 2 ? _args3[2] : undefined;
27215
27351
  clearSelection = _args3.length > 3 ? _args3[3] : undefined;
27216
- addMappingData = _args3.length > 4 ? _args3[4] : undefined;
27217
27352
  setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
27218
- mappingData: _objectSpread$o(_objectSpread$o({}, state.mappingData), addMappingData),
27219
27353
  loading: true
27220
27354
  }));
27221
27355
  currentData = initData;
27222
- filterData = _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, prefilter.search), ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.applyDefaultValue) !== false || ((_configuration$filter12 = configuration.filter) === null || _configuration$filter12 === void 0 || (_configuration$filter12 = _configuration$filter12.select) === null || _configuration$filter12 === void 0 ? void 0 : _configuration$filter12.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter13 = (_configuration$filter14 = configuration.filter) === null || _configuration$filter14 === void 0 || (_configuration$filter14 = _configuration$filter14.select) === null || _configuration$filter14 === void 0 ? void 0 : _configuration$filter14.filterField) !== null && _configuration$filter13 !== void 0 ? _configuration$filter13 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
27356
+ filterData = _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, prefilter.search), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
27223
27357
  filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
27224
27358
  var _ref7 = _slicedToArray(_ref6, 2);
27225
27359
  _ref7[0];
@@ -27232,7 +27366,7 @@ function useTableData (_ref) {
27232
27366
  });
27233
27367
  filterHash.current = currentFilterHash;
27234
27368
  if (!filterServerSide) {
27235
- _context3.next = 21;
27369
+ _context3.next = 20;
27236
27370
  break;
27237
27371
  }
27238
27372
  ssf = _objectSpread$o({
@@ -27240,32 +27374,32 @@ function useTableData (_ref) {
27240
27374
  columns: configuration.columns,
27241
27375
  filters: filterData,
27242
27376
  sorter: p.sorter
27243
- }, configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery ? {
27377
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && (_configuration$filter14 = _configuration$filter14.toggle) !== null && _configuration$filter14 !== void 0 && _configuration$filter14.inQuery ? {
27244
27378
  genericProps: prefilter.toggle
27245
27379
  } : undefined);
27246
- _context3.next = 15;
27247
- return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$o(_objectSpread$o(_objectSpread$o({}, mappingData), state.mappingData), addMappingData), ssf, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid, parseFilter(!(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? (_prefilter$toggle = prefilter.toggle) !== null && _prefilter$toggle !== void 0 ? _prefilter$toggle : {} : {}, (_parseFilter = parseFilter(p.filters, undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
27248
- case 15:
27380
+ _context3.next = 14;
27381
+ return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid, parseFilter(!(configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery) ? (_prefilter$toggle = prefilter.toggle) !== null && _prefilter$toggle !== void 0 ? _prefilter$toggle : {} : {}, (_parseFilter = parseFilter(p.filters, undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
27382
+ case 14:
27249
27383
  data = _context3.sent;
27250
- currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$o(_objectSpread$o({}, mappingData), state.mappingData), ssf);
27384
+ currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
27251
27385
  currentData = data.data;
27252
27386
  currentPagination = _objectSpread$o(_objectSpread$o({}, currentPagination), {}, {
27253
27387
  total: data.total
27254
27388
  });
27255
- _context3.next = 30;
27389
+ _context3.next = 29;
27256
27390
  break;
27257
- case 21:
27391
+ case 20:
27258
27392
  if (!(!currentData || currentData.length === 0 || refresh)) {
27259
- _context3.next = 27;
27393
+ _context3.next = 26;
27260
27394
  break;
27261
27395
  }
27262
- _context3.next = 24;
27263
- return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$o(_objectSpread$o(_objectSpread$o({}, mappingData), state.mappingData), addMappingData), undefined);
27264
- case 24:
27396
+ _context3.next = 23;
27397
+ return apiHandler.readList(parentMapping || configuration.mapping, mapping, undefined);
27398
+ case 23:
27265
27399
  _data3 = _context3.sent;
27266
27400
  currentData = _data3.data;
27267
27401
  setInitData(currentData);
27268
- case 27:
27402
+ case 26:
27269
27403
  _applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$o(_objectSpread$o({}, p), {}, {
27270
27404
  pagination: currentPagination,
27271
27405
  filters: filterData,
@@ -27274,12 +27408,12 @@ function useTableData (_ref) {
27274
27408
  })), _data4 = _applyFilterAndSortat2.data, pagination = _applyFilterAndSortat2.pagination;
27275
27409
  currentData = _data4;
27276
27410
  currentPagination = pagination;
27277
- case 30:
27411
+ case 29:
27278
27412
  setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
27279
27413
  loading: false,
27280
27414
  data: currentData,
27281
27415
  pagination: currentPagination,
27282
- mappingData: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, parentData), state.mappingData), addMappingData), {}, {
27416
+ mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
27283
27417
  prefilter: prefilter
27284
27418
  }),
27285
27419
  currentFetchUrl: currentUrl
@@ -27290,7 +27424,7 @@ function useTableData (_ref) {
27290
27424
  filters: p.filters,
27291
27425
  sorter: p.sorter
27292
27426
  });
27293
- case 32:
27427
+ case 31:
27294
27428
  case "end":
27295
27429
  return _context3.stop();
27296
27430
  }
@@ -27308,7 +27442,7 @@ function useTableData (_ref) {
27308
27442
  var onDelete = /*#__PURE__*/function () {
27309
27443
  var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
27310
27444
  var _configuration$apiInt2;
27311
- var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$filter17, _configuration$filter18, data;
27445
+ var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$filter16, _configuration$filter17, data;
27312
27446
  return _regeneratorRuntime.wrap(function _callee4$(_context5) {
27313
27447
  while (1) switch (_context5.prev = _context5.next) {
27314
27448
  case 0:
@@ -27323,7 +27457,7 @@ function useTableData (_ref) {
27323
27457
  case 6:
27324
27458
  userPermissions = _context5.sent;
27325
27459
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop(index) {
27326
- var _configuration$filter19, _configuration$filter20;
27460
+ var _configuration$filter18, _configuration$filter19;
27327
27461
  var id, _newData$filter, _newData$filter2, mapToggle, _iterator, _step, _globalFilter$toggle, field, _globalFilter$toggle2, _configuration$delete, _configuration$onErro, _configuration$onErro2, deletedIndex, initDeletedIndex;
27328
27462
  return _regeneratorRuntime.wrap(function _loop$(_context4) {
27329
27463
  while (1) switch (_context4.prev = _context4.next) {
@@ -27339,7 +27473,7 @@ function useTableData (_ref) {
27339
27473
  })) === null || _newData$filter2 === void 0 ? void 0 : _newData$filter2[0];
27340
27474
  }
27341
27475
  mapToggle = {};
27342
- _iterator = _createForOfIteratorHelper$3((_configuration$filter19 = (_configuration$filter20 = configuration.filter) === null || _configuration$filter20 === void 0 || (_configuration$filter20 = _configuration$filter20.toggle) === null || _configuration$filter20 === void 0 ? void 0 : _configuration$filter20.fields) !== null && _configuration$filter19 !== void 0 ? _configuration$filter19 : []);
27476
+ _iterator = _createForOfIteratorHelper$3((_configuration$filter18 = (_configuration$filter19 = configuration.filter) === null || _configuration$filter19 === void 0 || (_configuration$filter19 = _configuration$filter19.toggle) === null || _configuration$filter19 === void 0 ? void 0 : _configuration$filter19.fields) !== null && _configuration$filter18 !== void 0 ? _configuration$filter18 : []);
27343
27477
  try {
27344
27478
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
27345
27479
  field = _step.value;
@@ -27442,14 +27576,14 @@ function useTableData (_ref) {
27442
27576
  break;
27443
27577
  }
27444
27578
  _context5.next = 25;
27445
- return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$o(_objectSpread$o({}, mappingData), state.mappingData), _objectSpread$o({
27579
+ return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$o({
27446
27580
  pagination: _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
27447
27581
  current: current
27448
27582
  }),
27449
27583
  columns: configuration.columns,
27450
- filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
27584
+ filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
27451
27585
  sorter: filterData.sorter
27452
- }, configuration !== null && configuration !== void 0 && (_configuration$filter18 = configuration.filter) !== null && _configuration$filter18 !== void 0 && (_configuration$filter18 = _configuration$filter18.toggle) !== null && _configuration$filter18 !== void 0 && _configuration$filter18.inQuery ? {
27586
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery ? {
27453
27587
  genericProps: globalFilter.toggle
27454
27588
  } : undefined));
27455
27589
  case 25:
@@ -27478,8 +27612,8 @@ function useTableData (_ref) {
27478
27612
  };
27479
27613
  }();
27480
27614
  var onGlobalFilterSelect = function onGlobalFilterSelect(value) {
27481
- var _configuration$filter21;
27482
- if (!((_configuration$filter21 = configuration.filter) !== null && _configuration$filter21 !== void 0 && _configuration$filter21.select)) {
27615
+ var _configuration$filter20;
27616
+ if (!((_configuration$filter20 = configuration.filter) !== null && _configuration$filter20 !== void 0 && _configuration$filter20.select)) {
27483
27617
  LOG$2.error(new DivaError('No global select filter defiend'));
27484
27618
  return;
27485
27619
  }
@@ -27495,8 +27629,8 @@ function useTableData (_ref) {
27495
27629
  }, filterData), newGlobalFilter);
27496
27630
  };
27497
27631
  var onGlobalFilterToggle = function onGlobalFilterToggle() {
27498
- var _configuration$filter22;
27499
- if (!((_configuration$filter22 = configuration.filter) !== null && _configuration$filter22 !== void 0 && _configuration$filter22.toggle)) {
27632
+ var _configuration$filter21;
27633
+ if (!((_configuration$filter21 = configuration.filter) !== null && _configuration$filter21 !== void 0 && _configuration$filter21.toggle)) {
27500
27634
  LOG$2.error(new DivaError('No global toggle filter defined'));
27501
27635
  return;
27502
27636
  }
@@ -27516,8 +27650,8 @@ function useTableData (_ref) {
27516
27650
  if (globalFilter !== null && globalFilter !== void 0 && globalFilter.toggle) onGlobalFilterToggle();
27517
27651
  };
27518
27652
  var onGlobalFilterSearch = function onGlobalFilterSearch(value) {
27519
- var _configuration$filter23;
27520
- if (!((_configuration$filter23 = configuration.filter) !== null && _configuration$filter23 !== void 0 && _configuration$filter23.search)) {
27653
+ var _configuration$filter22;
27654
+ if (!((_configuration$filter22 = configuration.filter) !== null && _configuration$filter22 !== void 0 && _configuration$filter22.search)) {
27521
27655
  LOG$2.error(new DivaError('No global search filter defiend'));
27522
27656
  return;
27523
27657
  }
@@ -27525,8 +27659,8 @@ function useTableData (_ref) {
27525
27659
  search: {}
27526
27660
  });
27527
27661
  if (value) {
27528
- var _configuration$filter24;
27529
- (_configuration$filter24 = configuration.filter) === null || _configuration$filter24 === void 0 || _configuration$filter24.search.fields.forEach(function (f) {
27662
+ var _configuration$filter23;
27663
+ (_configuration$filter23 = configuration.filter) === null || _configuration$filter23 === void 0 || _configuration$filter23.search.fields.forEach(function (f) {
27530
27664
  if (typeof f == 'string') {
27531
27665
  newGlobalFilter.search[f] = [value, 'contains', 1]; //normally global search should be or, so 1
27532
27666
  } else {
@@ -27540,8 +27674,8 @@ function useTableData (_ref) {
27540
27674
  }, filterData), newGlobalFilter);
27541
27675
  };
27542
27676
  var onGlobalFilterPeriod = function onGlobalFilterPeriod(from, to) {
27543
- var _configuration$filter25;
27544
- if (!((_configuration$filter25 = configuration.filter) !== null && _configuration$filter25 !== void 0 && _configuration$filter25.period)) {
27677
+ var _configuration$filter24;
27678
+ if (!((_configuration$filter24 = configuration.filter) !== null && _configuration$filter24 !== void 0 && _configuration$filter24.period)) {
27545
27679
  LOG$2.error(new DivaError('No global period filter defiend'));
27546
27680
  return;
27547
27681
  }
@@ -27550,13 +27684,10 @@ function useTableData (_ref) {
27550
27684
  fromTimeStamp: [from],
27551
27685
  toTimeStamp: [to]
27552
27686
  };
27553
- if (!configuration.filter.period.onlyAsMappingData) setGlobaFilter(newGlobalFilter);
27687
+ setGlobaFilter(newGlobalFilter);
27554
27688
  onChange(_objectSpread$o({
27555
27689
  pagination: state.pagination
27556
- }, filterData), undefined, undefined, undefined, {
27557
- from: from,
27558
- to: to
27559
- });
27690
+ }, filterData), newGlobalFilter);
27560
27691
  };
27561
27692
  return _objectSpread$o(_objectSpread$o({}, state), {}, {
27562
27693
  title: title,
@@ -30399,8 +30530,7 @@ function TableGroups () {
30399
30530
  }, {
30400
30531
  headerName: 'backoffice.idmEnricher.general.label._id',
30401
30532
  field: '_id',
30402
- editable: false,
30403
- cellDataType: 'objectId'
30533
+ editable: false
30404
30534
  }]
30405
30535
  };
30406
30536
  }, [apiInterface, t]);
@@ -31013,8 +31143,7 @@ function TableProperties () {
31013
31143
  }, {
31014
31144
  headerName: 'backoffice.idmEnricher.general.label._id',
31015
31145
  field: '_id',
31016
- editable: false,
31017
- cellDataType: 'objectId'
31146
+ editable: false
31018
31147
  }]
31019
31148
  };
31020
31149
  }, [apiInterface, t]);
@@ -31386,9 +31515,6 @@ function SeriesSelector$1(_ref) {
31386
31515
  var _useTranslation = useTranslation(),
31387
31516
  t = _useTranslation.t,
31388
31517
  i18n = _useTranslation.i18n;
31389
- useEffect(function () {
31390
- setSelectedSerie(undefined);
31391
- }, [packageId]);
31392
31518
  return /*#__PURE__*/jsx(SimpleSelect, {
31393
31519
  apiInterface: {
31394
31520
  read: enricherService + '/packages/' + packageId + '/' + dataSet + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
@@ -31407,7 +31533,7 @@ function SeriesSelector$1(_ref) {
31407
31533
  style: {
31408
31534
  width: 200
31409
31535
  }
31410
- }, packageId);
31536
+ });
31411
31537
  }
31412
31538
 
31413
31539
  function FeatureSelector$1(_ref) {
@@ -31419,9 +31545,6 @@ function FeatureSelector$1(_ref) {
31419
31545
  var _useTranslation = useTranslation(),
31420
31546
  t = _useTranslation.t,
31421
31547
  i18n = _useTranslation.i18n;
31422
- useEffect(function () {
31423
- setSelectedFeature(undefined);
31424
- }, [packageId]);
31425
31548
  return /*#__PURE__*/jsx(SimpleSelect, {
31426
31549
  apiInterface: {
31427
31550
  read: enricherService + '/packages/' + packageId + '/' + dataSet + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
@@ -31440,7 +31563,7 @@ function FeatureSelector$1(_ref) {
31440
31563
  style: {
31441
31564
  width: 200
31442
31565
  }
31443
- }, packageId);
31566
+ });
31444
31567
  }
31445
31568
 
31446
31569
  function useConfiguration (configuration) {
@@ -31770,8 +31893,7 @@ var config = {
31770
31893
  }, {
31771
31894
  field: 'purchaseRetailId',
31772
31895
  headerName: 'backoffice.idmEnricher.exclusivity.label.purchaseRetailId',
31773
- editable: false,
31774
- cellDataType: 'number'
31896
+ editable: false
31775
31897
  }, {
31776
31898
  headerName: 'backoffice.idmEnricher.exclusivity.label.validFrom',
31777
31899
  field: 'validFrom',
@@ -32910,8 +33032,7 @@ function PriceDisplayCellRenderer(props) {
32910
33032
  var _colDef$field, _data$origPrices, _data$manualPrices, _currentPrice$toFixed, _origPrice$toFixed;
32911
33033
  var value = props.value,
32912
33034
  colDef = props.colDef,
32913
- data = props.data,
32914
- commas = props.commas;
33035
+ data = props.data;
32915
33036
  var priceGroup = colDef === null || colDef === void 0 || (_colDef$field = colDef.field) === null || _colDef$field === void 0 ? void 0 : _colDef$field.split('.')[1];
32916
33037
  var origPrice = priceGroup ? data === null || data === void 0 || (_data$origPrices = data.origPrices) === null || _data$origPrices === void 0 ? void 0 : _data$origPrices[priceGroup] : undefined;
32917
33038
  var currentPrice = value !== null && value !== void 0 ? value : undefined;
@@ -32921,10 +33042,10 @@ function PriceDisplayCellRenderer(props) {
32921
33042
  className: container$2,
32922
33043
  children: [/*#__PURE__*/jsxs("span", {
32923
33044
  className: classnames(price, _defineProperty({}, priceManual, isManualPrice)),
32924
- children: [(_currentPrice$toFixed = currentPrice === null || currentPrice === void 0 ? void 0 : currentPrice.toFixed(commas !== null && commas !== void 0 ? commas : 2)) !== null && _currentPrice$toFixed !== void 0 ? _currentPrice$toFixed : '-', isManualPrice && ' *']
33045
+ children: [(_currentPrice$toFixed = currentPrice === null || currentPrice === void 0 ? void 0 : currentPrice.toFixed(2)) !== null && _currentPrice$toFixed !== void 0 ? _currentPrice$toFixed : '-', isManualPrice && ' *']
32925
33046
  }), /*#__PURE__*/jsxs("span", {
32926
33047
  className: originalPrice,
32927
- children: ["(", (_origPrice$toFixed = origPrice === null || origPrice === void 0 ? void 0 : origPrice.toFixed(commas !== null && commas !== void 0 ? commas : 2)) !== null && _origPrice$toFixed !== void 0 ? _origPrice$toFixed : '-', ")"]
33048
+ children: ["(", (_origPrice$toFixed = origPrice === null || origPrice === void 0 ? void 0 : origPrice.toFixed(2)) !== null && _origPrice$toFixed !== void 0 ? _origPrice$toFixed : '-', ")"]
32928
33049
  }), /*#__PURE__*/jsx("span", {
32929
33050
  className: classnames(difference, _defineProperty(_defineProperty(_defineProperty({}, differencePositive, diffPercentage !== undefined && diffPercentage > 0), differenceNegative, diffPercentage !== undefined && diffPercentage < 0), differenceNeutral, diffPercentage === undefined || diffPercentage === 0)),
32930
33051
  children: diffPercentage !== undefined ? /*#__PURE__*/jsxs(Fragment, {
@@ -33015,95 +33136,27 @@ function Prices (_ref) {
33015
33136
  var _useTranslation = useTranslation(),
33016
33137
  t = _useTranslation.t;
33017
33138
  var updatePgPriceFactor = useCallback(function (priceFeatureGroupItem, value) {
33139
+ var _pricelist$pgPricefac;
33018
33140
  if (!selectedSerie) return;
33019
-
33020
- // Create copies of the objects to modify
33021
- var newFactors = _objectSpread$a({}, pricelist.pgPricefactors);
33022
- var serieFactors = _objectSpread$a({}, newFactors[selectedSerie.serieNo]);
33023
- if (value.length === 0) {
33024
- // Remove the empty price feature group
33025
- delete serieFactors[priceFeatureGroupItem];
33026
-
33027
- // If serie factors is now empty, remove the entire serie entry
33028
- if (Object.keys(serieFactors).length === 0) {
33029
- delete newFactors[selectedSerie.serieNo];
33030
- } else {
33031
- newFactors[selectedSerie.serieNo] = serieFactors;
33032
- }
33033
-
33034
- // If no more series exist, set pgPricefactors to undefined
33035
- if (Object.keys(newFactors).length === 0) {
33036
- setNodeDataValue({
33037
- pgPricefactors: undefined
33038
- });
33039
- return;
33040
- }
33041
- } else {
33042
- // Add/update the value
33043
- serieFactors[priceFeatureGroupItem] = value;
33044
- newFactors[selectedSerie.serieNo] = serieFactors;
33045
- }
33141
+ var newFactors = _objectSpread$a(_objectSpread$a({}, pricelist.pgPricefactors), {}, _defineProperty({}, selectedSerie.serieNo, _objectSpread$a(_objectSpread$a({}, (_pricelist$pgPricefac = pricelist.pgPricefactors) === null || _pricelist$pgPricefac === void 0 ? void 0 : _pricelist$pgPricefac[selectedSerie.serieNo]), {}, _defineProperty({}, priceFeatureGroupItem, value))));
33046
33142
  setNodeDataValue({
33047
33143
  pgPricefactors: newFactors
33048
33144
  });
33049
33145
  }, [pricelist, selectedSerie, setNodeDataValue]);
33050
33146
  var updateArticlePriceFactor = useCallback(function (typeNo, value) {
33147
+ var _pricelist$articlePri;
33051
33148
  if (!selectedSerie) return;
33052
-
33053
- // Create copies of the objects to modify
33054
- var newFactors = _objectSpread$a({}, pricelist.articlePricefactors);
33055
- var serieFactors = _objectSpread$a({}, newFactors[selectedSerie.serieNo]);
33056
- if (value.length === 0) {
33057
- // Remove the empty article price factor
33058
- delete serieFactors[typeNo];
33059
-
33060
- // If serie factors is now empty, remove the entire serie entry
33061
- if (Object.keys(serieFactors).length === 0) {
33062
- delete newFactors[selectedSerie.serieNo];
33063
- } else {
33064
- newFactors[selectedSerie.serieNo] = serieFactors;
33065
- }
33066
-
33067
- // If no more series exist, set articlePricefactors to undefined
33068
- if (Object.keys(newFactors).length === 0) {
33069
- setNodeDataValue({
33070
- articlePricefactors: undefined
33071
- });
33072
- return;
33073
- }
33074
- } else {
33075
- // Add/update the value
33076
- serieFactors[typeNo] = value;
33077
- newFactors[selectedSerie.serieNo] = serieFactors;
33078
- }
33149
+ var newFactors = _objectSpread$a(_objectSpread$a({}, pricelist.articlePricefactors), {}, _defineProperty({}, selectedSerie.serieNo, _objectSpread$a(_objectSpread$a({}, (_pricelist$articlePri = pricelist.articlePricefactors) === null || _pricelist$articlePri === void 0 ? void 0 : _pricelist$articlePri[selectedSerie.serieNo]), {}, _defineProperty({}, typeNo, value))));
33079
33150
  setNodeDataValue({
33080
33151
  articlePricefactors: newFactors
33081
33152
  });
33082
33153
  }, [pricelist, selectedSerie, setNodeDataValue]);
33083
33154
  var updateSeriePriceFactor = useCallback(function (value) {
33084
33155
  if (!selectedSerie) return;
33085
-
33086
- // Create a copy of the object to modify
33087
- var newFactors = _objectSpread$a({}, pricelist.seriePricefactors);
33088
- if (value.length === 0) {
33089
- // Remove the empty serie price factor
33090
- delete newFactors[selectedSerie.serieNo];
33091
-
33092
- // If no more series exist, set seriePricefactors to undefined
33093
- if (Object.keys(newFactors).length === 0) {
33094
- setNodeDataValue({
33095
- seriePricefactors: undefined
33096
- });
33097
- return;
33098
- }
33099
- } else {
33100
- // Add/update the value
33101
- newFactors[selectedSerie.serieNo] = value;
33102
- }
33103
33156
  setNodeDataValue({
33104
- seriePricefactors: newFactors
33157
+ seriePricefactors: _defineProperty({}, selectedSerie.serieNo, value)
33105
33158
  });
33106
- }, [pricelist, selectedSerie, setNodeDataValue]);
33159
+ }, [selectedSerie, setNodeDataValue]);
33107
33160
  var applicationData = useMemo(function () {
33108
33161
  return {
33109
33162
  organizationId: organizationId,
@@ -33111,7 +33164,7 @@ function Prices (_ref) {
33111
33164
  pricelistId: pricelist._id,
33112
33165
  serieNo: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo
33113
33166
  };
33114
- }, [organizationId, packageId, selectedSerie, pricelist]);
33167
+ }, [organizationId, packageId, selectedSerie]);
33115
33168
  var apiInterface = useMemo(function () {
33116
33169
  return {
33117
33170
  read: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices',
@@ -33145,10 +33198,10 @@ function Prices (_ref) {
33145
33198
  cellDataType: 'number',
33146
33199
  cellRenderer: PriceFactorCellRenderer,
33147
33200
  valueGetter: function valueGetter(_ref2) {
33148
- var _pricelist$articlePri;
33201
+ var _pricelist$articlePri2;
33149
33202
  var data = _ref2.data;
33150
33203
  if (!data) return;
33151
- return (_pricelist$articlePri = pricelist.articlePricefactors) === null || _pricelist$articlePri === void 0 || (_pricelist$articlePri = _pricelist$articlePri[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$articlePri === void 0 ? void 0 : _pricelist$articlePri[data.typeNo];
33204
+ return (_pricelist$articlePri2 = pricelist.articlePricefactors) === null || _pricelist$articlePri2 === void 0 || (_pricelist$articlePri2 = _pricelist$articlePri2[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$articlePri2 === void 0 ? void 0 : _pricelist$articlePri2[data.typeNo];
33152
33205
  },
33153
33206
  cellRendererParams: {
33154
33207
  onSave: function () {
@@ -33176,7 +33229,7 @@ function Prices (_ref) {
33176
33229
  headerName: priceFeatureGroup.displayText,
33177
33230
  marryChildren: true,
33178
33231
  children: _toConsumableArray((_priceFeatureGroup$ke = (_priceFeatureGroup$ke2 = priceFeatureGroup.keys) === null || _priceFeatureGroup$ke2 === void 0 ? void 0 : _priceFeatureGroup$ke2.map(function (priceFeatureGroupItem, j) {
33179
- var _priceFeatureGroup$ke3, _pricelist$pgPricefac;
33232
+ var _priceFeatureGroup$ke3, _pricelist$pgPricefac2;
33180
33233
  return {
33181
33234
  headerName: priceFeatureGroupItem,
33182
33235
  field: "prices.".concat(priceFeatureGroupItem),
@@ -33185,9 +33238,6 @@ function Prices (_ref) {
33185
33238
  cellDataType: 'number',
33186
33239
  headerTooltip: (_priceFeatureGroup$ke3 = priceFeatureGroup.keysDisplayTexts) === null || _priceFeatureGroup$ke3 === void 0 ? void 0 : _priceFeatureGroup$ke3[j],
33187
33240
  cellRenderer: PriceDisplayCellRenderer,
33188
- cellRendererParams: {
33189
- commas: pricelist.commas
33190
- },
33191
33241
  additionalFields: ["origPrices.".concat(priceFeatureGroupItem)],
33192
33242
  headerClass: inputHeader,
33193
33243
  headerComponentParams: {
@@ -33208,7 +33258,7 @@ function Prices (_ref) {
33208
33258
  return _ref3.apply(this, arguments);
33209
33259
  };
33210
33260
  }()),
33211
- value: (_pricelist$pgPricefac = pricelist.pgPricefactors) === null || _pricelist$pgPricefac === void 0 || (_pricelist$pgPricefac = _pricelist$pgPricefac[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$pgPricefac === void 0 ? void 0 : _pricelist$pgPricefac[priceFeatureGroupItem],
33261
+ value: (_pricelist$pgPricefac2 = pricelist.pgPricefactors) === null || _pricelist$pgPricefac2 === void 0 || (_pricelist$pgPricefac2 = _pricelist$pgPricefac2[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$pgPricefac2 === void 0 ? void 0 : _pricelist$pgPricefac2[priceFeatureGroupItem],
33212
33262
  className: factorInput,
33213
33263
  tooltip: t('backoffice.idmCatalog.prices.priceFactor.label.pfg')
33214
33264
  })
@@ -33257,8 +33307,7 @@ function Prices (_ref) {
33257
33307
  }, {
33258
33308
  headerName: 'backoffice.idmEnricher.general.label._id',
33259
33309
  field: '_id',
33260
- editable: false,
33261
- cellDataType: 'objectId'
33310
+ editable: false
33262
33311
  }])
33263
33312
  };
33264
33313
  }, [apiInterface, selectedSerie, pricelist, priceFeatureGroups]);
@@ -33390,18 +33439,6 @@ function TablePriceList () {
33390
33439
  }
33391
33440
  };
33392
33441
  }, [selectedNodeId]);
33393
- var roundingOptions = useMemo(function () {
33394
- return [{
33395
- name: t('backoffice.idmEnricher.pricelists.rounding.r1'),
33396
- value: 1
33397
- }, {
33398
- name: t('backoffice.idmEnricher.pricelists.rounding.r2'),
33399
- value: 2
33400
- }, {
33401
- name: t('backoffice.idmEnricher.pricelists.rounding.r3'),
33402
- value: 3
33403
- }];
33404
- }, []);
33405
33442
  var configuration = useMemo(function () {
33406
33443
  return {
33407
33444
  type: 'dotnetSSM',
@@ -33445,11 +33482,7 @@ function TablePriceList () {
33445
33482
  headerName: 'backoffice.idmEnricher.pricelists.label.rounding',
33446
33483
  field: 'rounding',
33447
33484
  editable: true,
33448
- cellDataType: 'enum',
33449
- customParams: {
33450
- enumData: roundingOptions,
33451
- displayLabelTemplate: '${name} (${value})'
33452
- }
33485
+ cellDataType: 'number'
33453
33486
  }, {
33454
33487
  headerName: 'backoffice.idmEnricher.pricelists.label.commas',
33455
33488
  field: 'commas',
@@ -33642,77 +33675,30 @@ function UploadButton (_ref) {
33642
33675
  title = _ref.title,
33643
33676
  disabled = _ref.disabled,
33644
33677
  contentType = _ref.contentType,
33645
- setProgress = _ref.setProgress,
33646
- setFileList = _ref.setFileList,
33647
- fileList = _ref.fileList,
33648
- progress = _ref.progress;
33678
+ setProgress = _ref.setProgress;
33649
33679
  var _useTranslation = useTranslation(),
33650
33680
  t = _useTranslation.t;
33651
33681
  var root = useStore();
33652
- var ref = useRef();
33682
+ var _useState = useState([]),
33683
+ _useState2 = _slicedToArray(_useState, 2),
33684
+ fileList = _useState2[0],
33685
+ setFileList = _useState2[1];
33653
33686
  var handleUploadChange = function handleUploadChange(info) {
33654
33687
  var status = info.file.status;
33655
33688
  if (status === 'done') {
33656
- setFileList([]);
33657
- setProgress('SUCCESS');
33658
- if (ref.current) {
33659
- clearInterval(ref.current.interval);
33660
- ref.current = undefined;
33661
- }
33662
- if (info.fileList[0]) {
33663
- info.fileList[0].percent = 100;
33664
- }
33689
+ message.success("".concat(info.file.name, " file uploaded successfully."));
33690
+ setFileList([]); // Clear the file list
33691
+ setProgress('SUCCESS'); // Mark upload as successful
33665
33692
  } else if (status === 'error') {
33666
- setProgress('ERROR');
33667
- if (ref.current) {
33668
- clearInterval(ref.current.interval);
33669
- ref.current = undefined;
33670
- }
33671
- if (info.fileList[0]) {
33672
- info.fileList[0].percent = 100;
33673
- }
33693
+ message.error("".concat(info.file.name, " file upload failed."));
33694
+ setProgress('ERROR'); // Mark upload as failed
33674
33695
  } else if (status === 'removed') {
33675
- setFileList([]);
33676
- setProgress(undefined);
33677
- if (ref.current) {
33678
- clearInterval(ref.current.interval);
33679
- ref.current = undefined;
33680
- }
33696
+ setFileList([]); // Clear the file list
33697
+ setProgress(undefined); // Reset the progress state
33681
33698
  } else {
33682
- setProgress('INPROGRESS');
33683
- if (info.fileList[0]) {
33684
- var file = info.fileList[0];
33685
- if (status === 'uploading') {
33686
- // First 50%, the file is still uploading to browser
33687
- file.percent = (file.percent || 0) / 2;
33688
- if (file.percent === 50) {
33689
- // Calculate size-based progress for the second 50%
33690
- if (file.size) {
33691
- var _ref$current$startTim, _ref$current, _ref$current$interval, _ref$current2;
33692
- var fileSize = file.size;
33693
- var startTime = (_ref$current$startTim = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.startTime) !== null && _ref$current$startTim !== void 0 ? _ref$current$startTim : Date.now();
33694
- var interval = (_ref$current$interval = (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.interval) !== null && _ref$current$interval !== void 0 ? _ref$current$interval : setInterval(function () {
33695
- // Assume 1MB takes about 4 seconds to upload
33696
- var estimatedTimeInSeconds = fileSize / (1024 * 1024) * 4;
33697
- var elapsedTime = (Date.now() - startTime) / 1000;
33698
- // Calculate progress for the second 50%
33699
- var sizeBasedProgress = Math.min(50 * (elapsedTime / estimatedTimeInSeconds), 49);
33700
- // Combine both progress values, ensuring we don't exceed 99
33701
- file.percent = Math.min(50 + sizeBasedProgress, 99);
33702
- setFileList(_toConsumableArray(info.fileList));
33703
- }, 10);
33704
- ref.current = {
33705
- startTime: startTime,
33706
- interval: interval
33707
- };
33708
- }
33709
- }
33710
- } else {
33711
- file.percent = 100; // Set to 100 if not uploading
33712
- }
33713
- }
33699
+ setProgress('INPROGRESS'); // Mark upload as in progress
33700
+ setFileList(info.fileList); // Update the file list during the upload
33714
33701
  }
33715
- setFileList(info.fileList);
33716
33702
  };
33717
33703
  var props = {
33718
33704
  name: 'file',
@@ -33727,7 +33713,7 @@ function UploadButton (_ref) {
33727
33713
  };
33728
33714
  return /*#__PURE__*/jsx(Fragment, {
33729
33715
  children: /*#__PURE__*/jsx(Upload$2, _objectSpread$9(_objectSpread$9({}, props), {}, {
33730
- children: progress !== 'SUCCESS' && /*#__PURE__*/jsx(Button$1, {
33716
+ children: /*#__PURE__*/jsx(Button$1, {
33731
33717
  icon: /*#__PURE__*/jsx(UploadOutlined$1, {}),
33732
33718
  disabled: disabled,
33733
33719
  children: title !== null && title !== void 0 ? title : t('backoffice.idmEnricher.import.upload')
@@ -33740,18 +33726,19 @@ function IDMImportForm (_ref) {
33740
33726
  var idmService = _ref.idmService,
33741
33727
  organizationId = _ref.organizationId,
33742
33728
  setProgress = _ref.setProgress,
33743
- progress = _ref.progress,
33744
- name = _ref.name,
33745
- setName = _ref.setName,
33746
- setFileList = _ref.setFileList,
33747
- fileList = _ref.fileList;
33729
+ progress = _ref.progress;
33748
33730
  var _useTranslation = useTranslation(),
33749
33731
  t = _useTranslation.t;
33732
+ var _useState = useState(''),
33733
+ _useState2 = _slicedToArray(_useState, 2),
33734
+ name = _useState2[0],
33735
+ setName = _useState2[1];
33750
33736
  var uploadAction = "".concat(idmService, "/v3.0/catalogs/upload?organizationId=").concat(organizationId, "&name=").concat(encodeURIComponent(name));
33751
33737
  return /*#__PURE__*/jsxs(Form$1, {
33752
33738
  name: "basic",
33753
33739
  children: [/*#__PURE__*/jsx(Form$1.Item, {
33754
33740
  label: "Name",
33741
+ name: "name",
33755
33742
  rules: [{
33756
33743
  required: true,
33757
33744
  message: t('backoffice.idmEnricher.import.namerequired')
@@ -33760,18 +33747,14 @@ function IDMImportForm (_ref) {
33760
33747
  onChange: function onChange(e) {
33761
33748
  return setName(e.target.value);
33762
33749
  },
33763
- value: name,
33764
- disabled: progress === 'INPROGRESS' || progress === 'SUCCESS'
33750
+ value: name
33765
33751
  })
33766
33752
  }), /*#__PURE__*/jsx(Form$1.Item, {
33767
33753
  children: /*#__PURE__*/jsx(UploadButton, {
33768
33754
  action: uploadAction,
33769
33755
  contentType: "multipart/form-data",
33770
33756
  setProgress: setProgress,
33771
- progress: progress,
33772
- disabled: !name.trim() || progress === 'INPROGRESS',
33773
- setFileList: setFileList,
33774
- fileList: fileList
33757
+ disabled: !name.trim()
33775
33758
  })
33776
33759
  }), /*#__PURE__*/jsxs(Form$1.Item, {
33777
33760
  style: {
@@ -33806,28 +33789,17 @@ function OpenModalButton (_ref) {
33806
33789
  _useState4 = _slicedToArray(_useState3, 2),
33807
33790
  progress = _useState4[0],
33808
33791
  setProgress = _useState4[1];
33809
- var _useState5 = useState(''),
33810
- _useState6 = _slicedToArray(_useState5, 2),
33811
- name = _useState6[0],
33812
- setName = _useState6[1];
33813
- var _useState7 = useState([]),
33814
- _useState8 = _slicedToArray(_useState7, 2),
33815
- fileList = _useState8[0],
33816
- setFileList = _useState8[1];
33817
33792
  var showModal = function showModal() {
33818
33793
  setIsModalOpen(true);
33819
33794
  };
33820
- var resetProgress = function resetProgress() {
33821
- setProgress(undefined);
33822
- setName('');
33823
- setFileList([]);
33824
- };
33825
33795
  var handleOk = function handleOk() {
33826
33796
  setIsModalOpen(false);
33827
- resetProgress();
33828
33797
  onClose();
33829
33798
  };
33830
- var buttonText = progress == undefined || progress == 'ERROR' ? t('backoffice.idmEnricher.import.cancel') : progress === 'INPROGRESS' ? t('backoffice.idmEnricher.import.inprogress') : t('backoffice.idmEnricher.import.finish');
33799
+ var handleCancel = function handleCancel() {
33800
+ setIsModalOpen(false);
33801
+ onClose();
33802
+ };
33831
33803
  return /*#__PURE__*/jsxs(Fragment, {
33832
33804
  children: [/*#__PURE__*/jsx(Button$1, {
33833
33805
  type: "primary",
@@ -33837,30 +33809,15 @@ function OpenModalButton (_ref) {
33837
33809
  title: title,
33838
33810
  open: isModalOpen,
33839
33811
  onOk: handleOk,
33840
- onCancel: handleOk,
33841
- cancelButtonProps: progress !== 'SUCCESS' ? {
33842
- style: {
33843
- display: 'none'
33844
- }
33845
- } : {
33846
- onClick: resetProgress
33847
- },
33848
- closable: progress !== 'INPROGRESS',
33849
- maskClosable: progress !== 'INPROGRESS',
33850
- okText: buttonText,
33851
- cancelText: progress === 'SUCCESS' ? t('backoffice.idmEnricher.import.new') : undefined,
33812
+ onCancel: handleCancel,
33813
+ okText: progress === 'INPROGRESS' ? t('backoffice.idmEnricher.import.inprogress') : 'OK',
33852
33814
  okButtonProps: {
33853
33815
  disabled: progress === 'INPROGRESS'
33854
33816
  } // Disable the button if progress is 'INPROGRESS'
33855
33817
  ,
33856
- destroyOnClose: true,
33857
33818
  children: type === 'IDM_IMPORT' && /*#__PURE__*/jsx(IDMImportForm, {
33858
33819
  setProgress: setProgress,
33859
33820
  progress: progress,
33860
- name: name,
33861
- setName: setName,
33862
- setFileList: setFileList,
33863
- fileList: fileList,
33864
33821
  idmService: idmService,
33865
33822
  organizationId: organizationId
33866
33823
  })
@@ -34262,11 +34219,11 @@ function TableCatalogs () {
34262
34219
  regex: '[0-9a-zA-Z]{0,10}'
34263
34220
  }, {
34264
34221
  headerName: 'backoffice.idmCatalog.general.label.telephone',
34265
- field: 'telephoneSwitchboard',
34222
+ field: 'telephoneSwitchBoard',
34266
34223
  required: true
34267
34224
  }, {
34268
34225
  headerName: 'backoffice.idmCatalog.general.label.faxSwitchBoard',
34269
- field: 'faxSwitchboard',
34226
+ field: 'faxSwitchBoard',
34270
34227
  required: true
34271
34228
  }]
34272
34229
  }, {
@@ -34586,9 +34543,6 @@ function SeriesSelector(_ref) {
34586
34543
  var _useTranslation = useTranslation(),
34587
34544
  t = _useTranslation.t,
34588
34545
  i18n = _useTranslation.i18n;
34589
- useEffect(function () {
34590
- setSelectedSerie(undefined);
34591
- }, [catalogId]);
34592
34546
  return /*#__PURE__*/jsx(SimpleSelect, {
34593
34547
  apiInterface: {
34594
34548
  read: idmService + '/v3.0/catalogs/' + catalogId + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
@@ -34883,6 +34837,11 @@ function Items(_ref) {
34883
34837
  field: 'typeNo',
34884
34838
  required: true,
34885
34839
  unique: true
34840
+ }, {
34841
+ headerName: 'backoffice.idmCatalogEditor.items.label.priceTypeRef',
34842
+ field: 'priceTypeRef',
34843
+ cellDataType: 'number',
34844
+ required: true
34886
34845
  }, {
34887
34846
  headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
34888
34847
  field: 'sequenceNo',
@@ -35114,13 +35073,6 @@ function Items(_ref) {
35114
35073
  headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
35115
35074
  field: 'lastUpdatedByDisplayText',
35116
35075
  editable: false
35117
- }, {
35118
- field: 'priceTypeRef',
35119
- defaultValue: 1,
35120
- editable: false,
35121
- hide: true,
35122
- lockVisible: true,
35123
- suppressColumnsToolPanel: true
35124
35076
  }]
35125
35077
  };
35126
35078
  }, []);
@@ -35366,7 +35318,6 @@ function TableSeries () {
35366
35318
  }, {
35367
35319
  headerName: 'backoffice.idmCatalog.general.label._id',
35368
35320
  field: '_id',
35369
- cellDataType: 'objectId',
35370
35321
  editable: false
35371
35322
  }, {
35372
35323
  field: 'organizationId',
@@ -35525,8 +35476,7 @@ function Options(_ref) {
35525
35476
  headerName: 'backoffice.idmCatalog.options.label.measurement',
35526
35477
  children: [{
35527
35478
  headerName: 'backoffice.idmCatalog.options.label.measureNo',
35528
- field: 'measureNo',
35529
- cellDataType: 'number'
35479
+ field: 'measureNo'
35530
35480
  }, {
35531
35481
  headerName: 'backoffice.idmCatalog.options.label.measureValue',
35532
35482
  field: 'measureValue',
@@ -35718,8 +35668,7 @@ function Features(_ref) {
35718
35668
  }, {
35719
35669
  headerName: 'backoffice.idmCatalog.general.label._id',
35720
35670
  field: '_id',
35721
- editable: false,
35722
- cellDataType: 'objectId'
35671
+ editable: false
35723
35672
  }, {
35724
35673
  field: 'organizationId',
35725
35674
  editable: false,
@@ -35829,9 +35778,6 @@ function FeatureSelector(_ref) {
35829
35778
  var _useTranslation = useTranslation(),
35830
35779
  t = _useTranslation.t,
35831
35780
  i18n = _useTranslation.i18n;
35832
- useEffect(function () {
35833
- setSelectedFeature(undefined);
35834
- }, [catalogId]);
35835
35781
  return /*#__PURE__*/jsx(SimpleSelect, {
35836
35782
  apiInterface: {
35837
35783
  read: idmService + '/v3.0/catalogs/' + catalogId + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
@@ -35850,7 +35796,7 @@ function FeatureSelector(_ref) {
35850
35796
  style: {
35851
35797
  width: 200
35852
35798
  }
35853
- }, catalogId);
35799
+ });
35854
35800
  }
35855
35801
 
35856
35802
  function TableOptions () {
@@ -35966,8 +35912,7 @@ function TableFeatureClasses () {
35966
35912
  colDef: [{
35967
35913
  field: 'featureClassNo',
35968
35914
  headerName: 'backoffice.idmCatalog.featureclasses.label.featureClassNo',
35969
- required: true,
35970
- cellDataType: 'number'
35915
+ required: true
35971
35916
  }, {
35972
35917
  headerName: 'backoffice.idmCatalog.featureclasses.label.featureClassName',
35973
35918
  marryChildren: true,
@@ -36009,8 +35954,7 @@ function TableFeatureClasses () {
36009
35954
  }, {
36010
35955
  headerName: 'backoffice.idmCatalog.general.label._id',
36011
35956
  field: '_id',
36012
- editable: false,
36013
- cellDataType: 'objectId'
35957
+ editable: false
36014
35958
  }, {
36015
35959
  field: 'organizationId',
36016
35960
  editable: false,
@@ -36026,11 +35970,7 @@ function TableFeatureClasses () {
36026
35970
  suppressColumnsToolPanel: true,
36027
35971
  defaultValue: '${catalogId}'
36028
35972
  }, {
36029
- field: 'featureRefs',
36030
- editable: false,
36031
- hide: true,
36032
- lockVisible: true,
36033
- suppressColumnsToolPanel: true
35973
+ field: 'featureRefs'
36034
35974
  }]
36035
35975
  };
36036
35976
  }, []);
@@ -36455,8 +36395,7 @@ function OptionCombinations(_ref8) {
36455
36395
  }, {
36456
36396
  headerName: 'backoffice.idmCatalog.general.label._id',
36457
36397
  field: '_id',
36458
- editable: false,
36459
- cellDataType: 'objectId'
36398
+ editable: false
36460
36399
  }, {
36461
36400
  field: 'organizationId',
36462
36401
  editable: false,
@@ -36679,8 +36618,7 @@ function TableDecisions () {
36679
36618
  }, {
36680
36619
  headerName: 'backoffice.idmCatalog.general.label._id',
36681
36620
  field: '_id',
36682
- editable: false,
36683
- cellDataType: 'objectId'
36621
+ editable: false
36684
36622
  }, {
36685
36623
  field: 'organizationId',
36686
36624
  editable: false,
@@ -36959,8 +36897,7 @@ function TableDetailInfos () {
36959
36897
  }, {
36960
36898
  headerName: 'backoffice.idmCatalog.general.label._id',
36961
36899
  field: '_id',
36962
- editable: false,
36963
- cellDataType: 'objectId'
36900
+ editable: false
36964
36901
  }, {
36965
36902
  headerName: 'backoffice.idmCatalog.detailinfos.label.mediaItemId',
36966
36903
  field: 'mediaItemId'
@@ -37188,8 +37125,7 @@ function PartlistPos(_ref) {
37188
37125
  }, {
37189
37126
  headerName: 'backoffice.idmCatalog.general.label._id',
37190
37127
  field: '_id',
37191
- editable: false,
37192
- cellDataType: 'objectId'
37128
+ editable: false
37193
37129
  }, {
37194
37130
  field: 'organizationId',
37195
37131
  editable: false,
@@ -37314,8 +37250,7 @@ function TablePartlists () {
37314
37250
  }, {
37315
37251
  headerName: 'backoffice.idmCatalog.general.label._id',
37316
37252
  field: '_id',
37317
- editable: false,
37318
- cellDataType: 'objectId'
37253
+ editable: false
37319
37254
  }, {
37320
37255
  field: 'organizationId',
37321
37256
  editable: false,
@@ -37516,8 +37451,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
37516
37451
  }, {
37517
37452
  headerName: 'backoffice.idmCatalog.general.label._id',
37518
37453
  field: '_id',
37519
- editable: false,
37520
- cellDataType: 'objectId'
37454
+ editable: false
37521
37455
  }, {
37522
37456
  field: 'organizationId',
37523
37457
  editable: false,
@@ -37697,8 +37631,7 @@ function PriceFeatureGroupFinishes(_ref) {
37697
37631
  }, {
37698
37632
  headerName: 'backoffice.idmCatalog.general.label._id',
37699
37633
  field: '_id',
37700
- editable: false,
37701
- cellDataType: 'objectId'
37634
+ editable: false
37702
37635
  }, {
37703
37636
  field: 'organizationId',
37704
37637
  editable: false,
@@ -37896,8 +37829,7 @@ function TablePriceFeatureGroups () {
37896
37829
  }, {
37897
37830
  headerName: 'backoffice.idmCatalog.general.label._id',
37898
37831
  field: '_id',
37899
- editable: false,
37900
- cellDataType: 'objectId'
37832
+ editable: false
37901
37833
  }, {
37902
37834
  field: 'organizationId',
37903
37835
  editable: false,
@@ -38208,8 +38140,7 @@ function CollectionMembers(_ref) {
38208
38140
  }, {
38209
38141
  headerName: 'backoffice.idmCatalog.general.label._id',
38210
38142
  field: '_id',
38211
- editable: false,
38212
- cellDataType: 'objectId'
38143
+ editable: false
38213
38144
  }]
38214
38145
  };
38215
38146
  }, [apiInterface]);