@crystaldesign/diva-backoffice 25.14.0-beta.2 → 25.14.0-beta.20
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.
- package/build/esm/index.js +685 -164
- package/build/types/backoffice/src/Configuration.d.ts +4 -2
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Content/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts +1 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts +3 -1
- package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionCombinations/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionGroupOptions.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/CollectionMembers.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/hooks/useEnricherContext.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableProperties/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/types.d.ts +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts +5 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/Tables/Features.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts +9 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts +5 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/modules/TableFeatures/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts +5 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/types.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts +6 -0
- package/build/types/backoffice/src/ui/IDMOrganizationFeaturesEditor/useNavigation.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts +5 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/Tables/Options.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts +9 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts +5 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/modules/TableOptions/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts +5 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/types.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts +6 -0
- package/build/types/backoffice/src/ui/IDMOrganizationOptionsEditor/useNavigation.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -3899,7 +3899,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
3899
3899
|
rule: [{
|
|
3900
3900
|
match: {
|
|
3901
3901
|
sourceField: 'catalogItem',
|
|
3902
|
-
value:
|
|
3902
|
+
value: null
|
|
3903
3903
|
}
|
|
3904
3904
|
}],
|
|
3905
3905
|
download: [{
|
|
@@ -9081,6 +9081,16 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9081
9081
|
onSave: function onSave(data) {
|
|
9082
9082
|
return data;
|
|
9083
9083
|
}
|
|
9084
|
+
}, {
|
|
9085
|
+
name: ['settings', 'makeApiKey'],
|
|
9086
|
+
label: t('backoffice.form.organizationdetails.items.settings.makeApiKey'),
|
|
9087
|
+
permission: 'backoffice_admin_organizations',
|
|
9088
|
+
type: 'input'
|
|
9089
|
+
}, {
|
|
9090
|
+
name: ['settings', 'leadTableApiKey'],
|
|
9091
|
+
label: t('backoffice.form.organizationdetails.items.settings.leadTableApiKey'),
|
|
9092
|
+
permission: 'backoffice_admin_organizations',
|
|
9093
|
+
type: 'input'
|
|
9084
9094
|
}, {
|
|
9085
9095
|
type: 'subTitle',
|
|
9086
9096
|
name: t('backoffice.form.organizationdetails.socialUrls'),
|
|
@@ -9215,14 +9225,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9215
9225
|
label: t('backoffice.form.organizationdetails.items.settings.externalContactUrl'),
|
|
9216
9226
|
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
|
9217
9227
|
type: 'input'
|
|
9218
|
-
}, {
|
|
9219
|
-
name: t('backoffice.subtitle.ai'),
|
|
9220
|
-
type: 'subTitle',
|
|
9221
|
-
orientation: 'left',
|
|
9222
|
-
style: {
|
|
9223
|
-
marginBottom: '40px'
|
|
9224
|
-
},
|
|
9225
|
-
permission: 'backoffice_admin_organizations'
|
|
9226
9228
|
}, {
|
|
9227
9229
|
name: ['settings', 'aiSettings', 'monthlyOrgRenderingLimit'],
|
|
9228
9230
|
label: t('backoffice.form.organizationdetails.items.ai.monthlyOrgRenderingLimit'),
|
|
@@ -9230,7 +9232,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9230
9232
|
permission: 'backoffice_admin_organizations',
|
|
9231
9233
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9232
9234
|
hidden: function hidden(data) {
|
|
9233
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9235
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9234
9236
|
},
|
|
9235
9237
|
disabled: function disabled(data) {
|
|
9236
9238
|
var _data$settings;
|
|
@@ -9296,7 +9298,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9296
9298
|
permission: 'backoffice_admin_organizations',
|
|
9297
9299
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9298
9300
|
hidden: function hidden(data) {
|
|
9299
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9301
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9300
9302
|
},
|
|
9301
9303
|
disabled: function disabled(data) {
|
|
9302
9304
|
var _data$settings2;
|
|
@@ -9310,7 +9312,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9310
9312
|
permission: 'backoffice_admin_organizations',
|
|
9311
9313
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9312
9314
|
hidden: function hidden(data) {
|
|
9313
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9315
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9314
9316
|
},
|
|
9315
9317
|
disabled: function disabled(data) {
|
|
9316
9318
|
var _data$settings3;
|
|
@@ -9324,7 +9326,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9324
9326
|
permission: 'backoffice_admin_organizations',
|
|
9325
9327
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9326
9328
|
hidden: function hidden(data) {
|
|
9327
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9329
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9328
9330
|
},
|
|
9329
9331
|
disabled: function disabled(data) {
|
|
9330
9332
|
var _data$settings4;
|
|
@@ -9338,7 +9340,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9338
9340
|
permission: 'backoffice_admin_organizations',
|
|
9339
9341
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9340
9342
|
hidden: function hidden(data) {
|
|
9341
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9343
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9342
9344
|
},
|
|
9343
9345
|
disabled: function disabled(data) {
|
|
9344
9346
|
var _data$settings5;
|
|
@@ -9352,7 +9354,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9352
9354
|
permission: 'backoffice_admin_organizations',
|
|
9353
9355
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9354
9356
|
hidden: function hidden(data) {
|
|
9355
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9357
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9356
9358
|
},
|
|
9357
9359
|
disabled: function disabled(data) {
|
|
9358
9360
|
var _data$settings6;
|
|
@@ -9366,7 +9368,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9366
9368
|
permission: 'backoffice_admin_organizations',
|
|
9367
9369
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9368
9370
|
hidden: function hidden(data) {
|
|
9369
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9371
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9370
9372
|
},
|
|
9371
9373
|
helpText: 'anonymous enduser limit'
|
|
9372
9374
|
}, {
|
|
@@ -9376,7 +9378,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9376
9378
|
permission: 'backoffice_admin_organizations',
|
|
9377
9379
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9378
9380
|
hidden: function hidden(data) {
|
|
9379
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9381
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9380
9382
|
},
|
|
9381
9383
|
helpText: 'logged in enduser limit'
|
|
9382
9384
|
}, {
|
|
@@ -9386,7 +9388,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9386
9388
|
permission: 'backoffice_admin_organizations',
|
|
9387
9389
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9388
9390
|
hidden: function hidden(data) {
|
|
9389
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9391
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9390
9392
|
}
|
|
9391
9393
|
}, {
|
|
9392
9394
|
name: ['settings', 'aiSettings', 'noLimit'],
|
|
@@ -9396,7 +9398,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9396
9398
|
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9397
9399
|
defaultValue: false,
|
|
9398
9400
|
hidden: function hidden(data) {
|
|
9399
|
-
return (data === null || data === void 0 ? void 0 : data.type)
|
|
9401
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'SUPPLIER' || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER';
|
|
9400
9402
|
}
|
|
9401
9403
|
},
|
|
9402
9404
|
// Theme Configuration
|
|
@@ -13414,6 +13416,14 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
13414
13416
|
create: '${adminService}/cache/invalidate'
|
|
13415
13417
|
}
|
|
13416
13418
|
},
|
|
13419
|
+
ButtonAiServiceCache: {
|
|
13420
|
+
type: 'CustomButton',
|
|
13421
|
+
text: t('backoffice.ButtonAnalyticsServiceCache'),
|
|
13422
|
+
resetAfterTime: 3,
|
|
13423
|
+
apiInterface: {
|
|
13424
|
+
create: '${aiService}/cache/invalidate'
|
|
13425
|
+
}
|
|
13426
|
+
},
|
|
13417
13427
|
ButtonAnalyticsServiceCache: {
|
|
13418
13428
|
type: 'CustomButton',
|
|
13419
13429
|
text: t('backoffice.ButtonAnalyticsServiceCache'),
|
|
@@ -13526,6 +13536,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
13526
13536
|
isTitle: true,
|
|
13527
13537
|
text: 'Admin Service'
|
|
13528
13538
|
},
|
|
13539
|
+
LabelAiService: {
|
|
13540
|
+
type: 'CustomText',
|
|
13541
|
+
isTitle: true,
|
|
13542
|
+
text: 'Ai Service'
|
|
13543
|
+
},
|
|
13529
13544
|
LabelAnalyticsService: {
|
|
13530
13545
|
type: 'CustomText',
|
|
13531
13546
|
isTitle: true,
|
|
@@ -14054,6 +14069,15 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
14054
14069
|
id: 'ButtonAdminServiceCache',
|
|
14055
14070
|
type: 'CustomButton'
|
|
14056
14071
|
}]
|
|
14072
|
+
}, {
|
|
14073
|
+
type: 'SideBySide',
|
|
14074
|
+
items: [{
|
|
14075
|
+
id: 'LabelAiService',
|
|
14076
|
+
type: 'CustomText'
|
|
14077
|
+
}, {
|
|
14078
|
+
id: 'ButtonAiServiceCache',
|
|
14079
|
+
type: 'CustomButton'
|
|
14080
|
+
}]
|
|
14057
14081
|
}, {
|
|
14058
14082
|
type: 'SideBySide',
|
|
14059
14083
|
items: [{
|
|
@@ -14172,6 +14196,12 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
14172
14196
|
IDMFeaturesEditor: {
|
|
14173
14197
|
type: 'IDMFeaturesEditor'
|
|
14174
14198
|
},
|
|
14199
|
+
IDMOrganizationFeaturesEditor: {
|
|
14200
|
+
type: 'IDMOrganizationFeaturesEditor'
|
|
14201
|
+
},
|
|
14202
|
+
IDMOrganizationOptionsEditor: {
|
|
14203
|
+
type: 'IDMOrganizationOptionsEditor'
|
|
14204
|
+
},
|
|
14175
14205
|
MediaTable: {
|
|
14176
14206
|
type: 'MediaTable'
|
|
14177
14207
|
}
|
|
@@ -15312,6 +15342,20 @@ var menu = [{
|
|
|
15312
15342
|
permission: 'idm_global_features',
|
|
15313
15343
|
icon: 'HistoryOutlined',
|
|
15314
15344
|
haSubRoutes: false
|
|
15345
|
+
}, {
|
|
15346
|
+
id: 'IDMOrganizationFeaturesEditor',
|
|
15347
|
+
path: 'organizationfeatures',
|
|
15348
|
+
label: 'backoffice.menu.items.label.IDMOrganizationFeatures',
|
|
15349
|
+
permission: 'idm_catalogs',
|
|
15350
|
+
icon: 'HistoryOutlined',
|
|
15351
|
+
haSubRoutes: false
|
|
15352
|
+
}, {
|
|
15353
|
+
id: 'IDMOrganizationOptionsEditor',
|
|
15354
|
+
path: 'organizationoptions',
|
|
15355
|
+
label: 'backoffice.menu.items.label.IDMOrganizationOptions',
|
|
15356
|
+
permission: 'idm_catalogs',
|
|
15357
|
+
icon: 'HistoryOutlined',
|
|
15358
|
+
haSubRoutes: false
|
|
15315
15359
|
}, {
|
|
15316
15360
|
id: 'IDMCatalogEditor',
|
|
15317
15361
|
path: 'catalogs',
|
|
@@ -18498,6 +18542,19 @@ function useSelectSimpleData (_ref) {
|
|
|
18498
18542
|
});
|
|
18499
18543
|
return selected.value;
|
|
18500
18544
|
}, [selected]);
|
|
18545
|
+
|
|
18546
|
+
//initialize the selected value if it is not set yet and handle race condition between value and options
|
|
18547
|
+
useEffect(function () {
|
|
18548
|
+
if (value && options && selected == undefined) {
|
|
18549
|
+
var sel = findByValue(value, options, selectMapping);
|
|
18550
|
+
if (sel) {
|
|
18551
|
+
var selectedValues = Array.isArray(sel) ? sel.map(function (item) {
|
|
18552
|
+
return item.value;
|
|
18553
|
+
}) : sel.value;
|
|
18554
|
+
onSelectionChanged(selectedValues, sel);
|
|
18555
|
+
}
|
|
18556
|
+
}
|
|
18557
|
+
}, [value, options]);
|
|
18501
18558
|
var setLoadedOptions = function setLoadedOptions(options) {
|
|
18502
18559
|
var _options$;
|
|
18503
18560
|
setOptions(options);
|
|
@@ -27366,16 +27423,27 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
27366
27423
|
return sel == dt._id;
|
|
27367
27424
|
});
|
|
27368
27425
|
});
|
|
27369
|
-
|
|
27426
|
+
// Ensure each data row exposes catalogItem for rule evaluation
|
|
27427
|
+
if (data && data.length > 0) {
|
|
27428
|
+
data = data.map(function (dt) {
|
|
27429
|
+
var _ref2, _dt$catalogItem;
|
|
27430
|
+
return _objectSpread$G(_objectSpread$G({}, dt), {}, {
|
|
27431
|
+
catalogItem: (_ref2 = (_dt$catalogItem = dt.catalogItem) !== null && _dt$catalogItem !== void 0 ? _dt$catalogItem : state.catalogItem) !== null && _ref2 !== void 0 ? _ref2 : null
|
|
27432
|
+
});
|
|
27433
|
+
});
|
|
27434
|
+
} else {
|
|
27435
|
+
var _state$catalogItem;
|
|
27436
|
+
// Normalize empty selection
|
|
27370
27437
|
data = [{
|
|
27371
|
-
catalogItem: state.catalogItem
|
|
27438
|
+
catalogItem: (_state$catalogItem = state.catalogItem) !== null && _state$catalogItem !== void 0 ? _state$catalogItem : null
|
|
27372
27439
|
}];
|
|
27373
27440
|
}
|
|
27374
|
-
|
|
27441
|
+
var ruleResult = aplyRules({
|
|
27375
27442
|
data: data,
|
|
27376
27443
|
rootStore: root,
|
|
27377
27444
|
rules: action.rule
|
|
27378
27445
|
});
|
|
27446
|
+
return !ruleResult.applied;
|
|
27379
27447
|
}
|
|
27380
27448
|
function checkPermission(permission) {
|
|
27381
27449
|
if (!permission) return true;
|
|
@@ -27423,17 +27491,17 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
27423
27491
|
icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
|
|
27424
27492
|
size: "middle",
|
|
27425
27493
|
onClick: function onClick() {
|
|
27426
|
-
var _state$
|
|
27494
|
+
var _state$catalogItem2, _state$catalogItem3, _state$catalogItem4;
|
|
27427
27495
|
var selectedData = state.data.filter(function (dt) {
|
|
27428
27496
|
return state.selected.includes(dt._id);
|
|
27429
27497
|
});
|
|
27430
27498
|
root.downloadStore.openDownload({
|
|
27431
27499
|
data: selectedData.length ? selectedData : state.mappingData,
|
|
27432
27500
|
action: action,
|
|
27433
|
-
catalogCodex: (_state$
|
|
27434
|
-
dealerId: (_state$
|
|
27501
|
+
catalogCodex: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.codex,
|
|
27502
|
+
dealerId: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.dealerId,
|
|
27435
27503
|
currentUrl: state.currentFetchUrl,
|
|
27436
|
-
sessionGuid: (_state$
|
|
27504
|
+
sessionGuid: (_state$catalogItem4 = state.catalogItem) === null || _state$catalogItem4 === void 0 ? void 0 : _state$catalogItem4.sessionGuid
|
|
27437
27505
|
});
|
|
27438
27506
|
},
|
|
27439
27507
|
children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : t('backoffice.basetable.download')
|
|
@@ -27619,17 +27687,17 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
27619
27687
|
});
|
|
27620
27688
|
};
|
|
27621
27689
|
var BaseTable = observer(TableWrapper);
|
|
27622
|
-
function DeleteButton(
|
|
27623
|
-
var
|
|
27624
|
-
selected =
|
|
27625
|
-
total =
|
|
27626
|
-
|
|
27627
|
-
min =
|
|
27628
|
-
deleting =
|
|
27629
|
-
onDelete =
|
|
27630
|
-
disabled =
|
|
27631
|
-
label =
|
|
27632
|
-
labelDialog =
|
|
27690
|
+
function DeleteButton(_ref3) {
|
|
27691
|
+
var _ref3$selected = _ref3.selected,
|
|
27692
|
+
selected = _ref3$selected === void 0 ? [] : _ref3$selected,
|
|
27693
|
+
total = _ref3.total,
|
|
27694
|
+
_ref3$min = _ref3.min,
|
|
27695
|
+
min = _ref3$min === void 0 ? 0 : _ref3$min,
|
|
27696
|
+
deleting = _ref3.deleting,
|
|
27697
|
+
onDelete = _ref3.onDelete,
|
|
27698
|
+
disabled = _ref3.disabled,
|
|
27699
|
+
label = _ref3.label,
|
|
27700
|
+
labelDialog = _ref3.labelDialog;
|
|
27633
27701
|
var _useTranslation2 = useTranslation(),
|
|
27634
27702
|
t = _useTranslation2.t;
|
|
27635
27703
|
var hasSelected = (selected === null || selected === void 0 ? void 0 : selected.length) > 0;
|
|
@@ -27657,16 +27725,16 @@ function DeleteButton(_ref2) {
|
|
|
27657
27725
|
})
|
|
27658
27726
|
});
|
|
27659
27727
|
}
|
|
27660
|
-
function CopyButton(
|
|
27728
|
+
function CopyButton(_ref4) {
|
|
27661
27729
|
var _state$configuration$24;
|
|
27662
|
-
var state =
|
|
27730
|
+
var state = _ref4.state;
|
|
27663
27731
|
var root = useStore();
|
|
27664
27732
|
new _default$d({
|
|
27665
27733
|
apiInterface: state.configuration.apiInterface,
|
|
27666
27734
|
type: 'Table'
|
|
27667
27735
|
}, root);
|
|
27668
27736
|
var onCopy = /*#__PURE__*/function () {
|
|
27669
|
-
var
|
|
27737
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
27670
27738
|
var _state$configuration$21;
|
|
27671
27739
|
var copyAction, _iterator3, _step3, selectedRow;
|
|
27672
27740
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -27703,11 +27771,11 @@ function CopyButton(_ref3) {
|
|
|
27703
27771
|
}, _callee);
|
|
27704
27772
|
}));
|
|
27705
27773
|
return function onCopy() {
|
|
27706
|
-
return
|
|
27774
|
+
return _ref5.apply(this, arguments);
|
|
27707
27775
|
};
|
|
27708
27776
|
}();
|
|
27709
27777
|
var onCopyAction = /*#__PURE__*/function () {
|
|
27710
|
-
var
|
|
27778
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
27711
27779
|
var _state$configuration$22, _state$configuration$23;
|
|
27712
27780
|
var copyAction, id, data;
|
|
27713
27781
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -27768,7 +27836,7 @@ function CopyButton(_ref3) {
|
|
|
27768
27836
|
}, _callee3);
|
|
27769
27837
|
}));
|
|
27770
27838
|
return function onCopyAction() {
|
|
27771
|
-
return
|
|
27839
|
+
return _ref6.apply(this, arguments);
|
|
27772
27840
|
};
|
|
27773
27841
|
}();
|
|
27774
27842
|
var _useTranslation3 = useTranslation(),
|
|
@@ -27780,11 +27848,11 @@ function CopyButton(_ref3) {
|
|
|
27780
27848
|
children: t('backoffice.basetable.copy')
|
|
27781
27849
|
});
|
|
27782
27850
|
}
|
|
27783
|
-
function BulkAction(
|
|
27851
|
+
function BulkAction(_ref7) {
|
|
27784
27852
|
var _state$selected3;
|
|
27785
|
-
var action =
|
|
27786
|
-
state =
|
|
27787
|
-
progressBar =
|
|
27853
|
+
var action = _ref7.action,
|
|
27854
|
+
state = _ref7.state,
|
|
27855
|
+
progressBar = _ref7.progressBar;
|
|
27788
27856
|
var root = useStore();
|
|
27789
27857
|
var _useTranslation4 = useTranslation(),
|
|
27790
27858
|
t = _useTranslation4.t;
|
|
@@ -27869,7 +27937,7 @@ function BulkAction(_ref6) {
|
|
|
27869
27937
|
return true;
|
|
27870
27938
|
};
|
|
27871
27939
|
var callback = /*#__PURE__*/function () {
|
|
27872
|
-
var
|
|
27940
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(updatedData) {
|
|
27873
27941
|
var _action$callback;
|
|
27874
27942
|
var apiInterface, data, i, dataEntry;
|
|
27875
27943
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -27963,7 +28031,7 @@ function BulkAction(_ref6) {
|
|
|
27963
28031
|
}, _callee4, null, [[2, 37]]);
|
|
27964
28032
|
}));
|
|
27965
28033
|
return function callback(_x2) {
|
|
27966
|
-
return
|
|
28034
|
+
return _ref8.apply(this, arguments);
|
|
27967
28035
|
};
|
|
27968
28036
|
}();
|
|
27969
28037
|
return /*#__PURE__*/jsx(Popover, {
|
|
@@ -27993,8 +28061,8 @@ function BulkAction(_ref6) {
|
|
|
27993
28061
|
}, 'edit')
|
|
27994
28062
|
});
|
|
27995
28063
|
}
|
|
27996
|
-
function SelectionText(
|
|
27997
|
-
var selected =
|
|
28064
|
+
function SelectionText(_ref9) {
|
|
28065
|
+
var selected = _ref9.selected;
|
|
27998
28066
|
var _useTranslation5 = useTranslation(),
|
|
27999
28067
|
t = _useTranslation5.t;
|
|
28000
28068
|
if (!(selected !== null && selected !== void 0 && selected.length)) {
|
|
@@ -32257,7 +32325,8 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
32257
32325
|
selectedPackage: {
|
|
32258
32326
|
_id: urlPackageId || '',
|
|
32259
32327
|
name: '',
|
|
32260
|
-
isApi: false
|
|
32328
|
+
isApi: false,
|
|
32329
|
+
onlyPlaceholder: true
|
|
32261
32330
|
},
|
|
32262
32331
|
enricherService: root.configurationStore.apiConfig.enricherService,
|
|
32263
32332
|
organizationId: root.dataStore.organizationId || '',
|
|
@@ -32299,7 +32368,8 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
32299
32368
|
_id: pkg,
|
|
32300
32369
|
name: '',
|
|
32301
32370
|
isoLanguageIds: [],
|
|
32302
|
-
isApi: false
|
|
32371
|
+
isApi: false,
|
|
32372
|
+
onlyPlaceholder: true
|
|
32303
32373
|
};
|
|
32304
32374
|
} else {
|
|
32305
32375
|
newPackage = pkg;
|
|
@@ -32342,7 +32412,8 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
32342
32412
|
_id: urlPackageId,
|
|
32343
32413
|
name: '',
|
|
32344
32414
|
isoLanguageIds: [],
|
|
32345
|
-
isApi: false
|
|
32415
|
+
isApi: false,
|
|
32416
|
+
onlyPlaceholder: true
|
|
32346
32417
|
});
|
|
32347
32418
|
}
|
|
32348
32419
|
}, [urlPackageId, getContext().packageId, setSelectedPackage]);
|
|
@@ -32726,6 +32797,7 @@ var useTools = function useTools(_ref) {
|
|
|
32726
32797
|
var catalogId = _ref.catalogId,
|
|
32727
32798
|
packageId = _ref.packageId,
|
|
32728
32799
|
isApi2 = _ref.isApi2,
|
|
32800
|
+
onlyPlaceholder = _ref.onlyPlaceholder,
|
|
32729
32801
|
mainInformationWindowCodex = _ref.mainInformationWindowCodex,
|
|
32730
32802
|
serie = _ref.serie,
|
|
32731
32803
|
item = _ref.item,
|
|
@@ -32773,7 +32845,9 @@ var useTools = function useTools(_ref) {
|
|
|
32773
32845
|
packageId: packageId,
|
|
32774
32846
|
isIDMData: !isApi2 ? '1' : undefined
|
|
32775
32847
|
}, parameters),
|
|
32776
|
-
elementProps:
|
|
32848
|
+
elementProps: onlyPlaceholder ? {
|
|
32849
|
+
onlyPlaceholder: true
|
|
32850
|
+
} : catalogId ? _objectSpread$o({
|
|
32777
32851
|
// open configurator for idm catalog
|
|
32778
32852
|
useIDMService: true,
|
|
32779
32853
|
catalogId: catalogId,
|
|
@@ -32863,7 +32937,7 @@ var useTools = function useTools(_ref) {
|
|
|
32863
32937
|
return tool.id;
|
|
32864
32938
|
})) || []));
|
|
32865
32939
|
};
|
|
32866
|
-
}, [mainInformationWindowCodex, catalogId, packageId, conditionalTools]);
|
|
32940
|
+
}, [mainInformationWindowCodex, catalogId, packageId, conditionalTools, onlyPlaceholder]);
|
|
32867
32941
|
return {
|
|
32868
32942
|
updateConfigurator: updateConfigurator,
|
|
32869
32943
|
updateInformationWindow: updateInformationWindow
|
|
@@ -32881,7 +32955,8 @@ var TableGroups = observer(function () {
|
|
|
32881
32955
|
viewOnly = _useModule.viewOnly;
|
|
32882
32956
|
useTools({
|
|
32883
32957
|
packageId: packageId,
|
|
32884
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
|
32958
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
32959
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
32885
32960
|
});
|
|
32886
32961
|
var applicationData = useMemo(function () {
|
|
32887
32962
|
return {
|
|
@@ -33546,7 +33621,8 @@ var TablePackages = observer(function () {
|
|
|
33546
33621
|
setSelectedPackage = _useEnricherContext.setSelectedPackage,
|
|
33547
33622
|
selectedPackage = _useEnricherContext.selectedPackage;
|
|
33548
33623
|
useTools({
|
|
33549
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
|
33624
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
33625
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
33550
33626
|
});
|
|
33551
33627
|
var organizationId = root.dataStore.organizationId;
|
|
33552
33628
|
var organizationDisplayText = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.displayName;
|
|
@@ -33803,6 +33879,9 @@ var TablePackages = observer(function () {
|
|
|
33803
33879
|
apiInterface: {
|
|
33804
33880
|
read: apiConfig.authService + "/organizations/".concat(organizationId, "/related")
|
|
33805
33881
|
},
|
|
33882
|
+
filter: function filter(_, lookupData) {
|
|
33883
|
+
return lookupData._id !== organizationId;
|
|
33884
|
+
},
|
|
33806
33885
|
lookupValue: 'displayName',
|
|
33807
33886
|
lookupKey: '_id',
|
|
33808
33887
|
serverType: 'nodejs',
|
|
@@ -33900,7 +33979,8 @@ var TableProperties = observer(function () {
|
|
|
33900
33979
|
viewOnly = _useModule.viewOnly;
|
|
33901
33980
|
useTools({
|
|
33902
33981
|
packageId: packageId,
|
|
33903
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
|
33982
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
33983
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
33904
33984
|
});
|
|
33905
33985
|
var applicationData = useMemo(function () {
|
|
33906
33986
|
return {
|
|
@@ -33947,18 +34027,26 @@ var TableProperties = observer(function () {
|
|
|
33947
34027
|
additionalFields: ['featureNosDisplayTexts'],
|
|
33948
34028
|
isDictionary: true
|
|
33949
34029
|
}, {
|
|
33950
|
-
field: '
|
|
34030
|
+
field: 'optionIds',
|
|
33951
34031
|
headerName: 'backoffice.idmEnricher.renaming.label.optionKeys',
|
|
33952
34032
|
cellDataType: 'lookup',
|
|
33953
34033
|
editable: !viewOnly,
|
|
33954
34034
|
customParams: {
|
|
33955
34035
|
nameField: 'optionKeysDisplayTexts',
|
|
33956
|
-
displayLabelTemplate: '${name} (${
|
|
34036
|
+
displayLabelTemplate: '${name} (${optionKeys}) in Features: ${optionFeatureNos}',
|
|
34037
|
+
lookupLabelTemplate: '${name} (${optionKey}) in Features: ${featureNos}',
|
|
33957
34038
|
apiInterface: {
|
|
33958
34039
|
read: apiConfig.enricherService + '/packages/${packageId}/lookup/options'
|
|
33959
34040
|
},
|
|
33960
34041
|
lookupValue: 'optionText',
|
|
33961
|
-
lookupKey: '
|
|
34042
|
+
lookupKey: '_id',
|
|
34043
|
+
additionalMappings: [{
|
|
34044
|
+
lookupField: 'optionKey',
|
|
34045
|
+
targetField: 'optionKeys'
|
|
34046
|
+
}, {
|
|
34047
|
+
lookupField: 'featureNos',
|
|
34048
|
+
targetField: 'optionFeatureNos'
|
|
34049
|
+
}],
|
|
33962
34050
|
multiple: true,
|
|
33963
34051
|
translated: true,
|
|
33964
34052
|
filter: {
|
|
@@ -33968,7 +34056,7 @@ var TableProperties = observer(function () {
|
|
|
33968
34056
|
filter: '${featureNos}'
|
|
33969
34057
|
}
|
|
33970
34058
|
},
|
|
33971
|
-
additionalFields: ['optionKeysDisplayTexts'],
|
|
34059
|
+
additionalFields: ['optionKeysDisplayTexts', 'optionKeys', 'optionFeatureNos'],
|
|
33972
34060
|
isDictionary: true
|
|
33973
34061
|
}, createTranslatedColumnConfig('name', 'backoffice.idmEnricher.properties.label.name', selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, true), createTranslatedColumnConfig('value', 'backoffice.idmEnricher.properties.label.value', selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isoLanguageIds, true), {
|
|
33974
34062
|
field: 'serieNos',
|
|
@@ -34747,6 +34835,7 @@ var RenamingTable = observer(function (_ref) {
|
|
|
34747
34835
|
var _useTools = useTools({
|
|
34748
34836
|
packageId: packageId,
|
|
34749
34837
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
34838
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
|
|
34750
34839
|
setArticle: setSelectedItem,
|
|
34751
34840
|
setSerie: setSelectedSerie,
|
|
34752
34841
|
serie: selectedSerie,
|
|
@@ -35348,6 +35437,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
35348
35437
|
var _useTools = useTools({
|
|
35349
35438
|
packageId: packageId,
|
|
35350
35439
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
35440
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
|
|
35351
35441
|
setArticle: setSelectedItem,
|
|
35352
35442
|
setSerie: setSelectedSerie,
|
|
35353
35443
|
serie: selectedSerie,
|
|
@@ -35482,7 +35572,8 @@ var TableTabGroups = observer(function () {
|
|
|
35482
35572
|
viewOnly = _useModule.viewOnly;
|
|
35483
35573
|
useTools({
|
|
35484
35574
|
packageId: packageId,
|
|
35485
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
|
35575
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
35576
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
35486
35577
|
});
|
|
35487
35578
|
var applicationData = useMemo(function () {
|
|
35488
35579
|
return {
|
|
@@ -35587,7 +35678,8 @@ var TablePartlistPos = observer(function () {
|
|
|
35587
35678
|
viewOnly = _useModule.viewOnly;
|
|
35588
35679
|
useTools({
|
|
35589
35680
|
packageId: packageId,
|
|
35590
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
|
35681
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
35682
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
35591
35683
|
});
|
|
35592
35684
|
var posInvisibility = useMemo(function () {
|
|
35593
35685
|
return [{
|
|
@@ -37058,7 +37150,8 @@ var TablePriceList = observer(function () {
|
|
|
37058
37150
|
setSelectedNodeId = _React$useState4[1];
|
|
37059
37151
|
useTools({
|
|
37060
37152
|
packageId: packageId,
|
|
37061
|
-
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi
|
|
37153
|
+
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
37154
|
+
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
37062
37155
|
});
|
|
37063
37156
|
var setNodeDataValue = useCallback(function (data) {
|
|
37064
37157
|
spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
|
|
@@ -37347,10 +37440,10 @@ function IDMEnricherEditor (_ref) {
|
|
|
37347
37440
|
display: 'flex',
|
|
37348
37441
|
flexDirection: 'column'
|
|
37349
37442
|
},
|
|
37350
|
-
children: /*#__PURE__*/jsx(Content$
|
|
37443
|
+
children: /*#__PURE__*/jsx(Content$7, {})
|
|
37351
37444
|
});
|
|
37352
37445
|
}
|
|
37353
|
-
function Content$
|
|
37446
|
+
function Content$7() {
|
|
37354
37447
|
return /*#__PURE__*/jsxs(Routes, {
|
|
37355
37448
|
children: [/*#__PURE__*/jsx(Route, {
|
|
37356
37449
|
index: true,
|
|
@@ -40376,7 +40469,7 @@ var TableSeries = observer(function () {
|
|
|
40376
40469
|
});
|
|
40377
40470
|
});
|
|
40378
40471
|
|
|
40379
|
-
var Features$
|
|
40472
|
+
var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
40380
40473
|
var organizationId = _ref.organizationId,
|
|
40381
40474
|
selectedCatalog = _ref.selectedCatalog,
|
|
40382
40475
|
featureClassId = _ref.featureClassId,
|
|
@@ -40450,7 +40543,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
|
40450
40543
|
displayLabelTemplate: '${value}',
|
|
40451
40544
|
lookupLabelTemplate: '${name} (${value})',
|
|
40452
40545
|
apiInterface: {
|
|
40453
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/
|
|
40546
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
|
|
40454
40547
|
},
|
|
40455
40548
|
lookupKey: 'featureNo',
|
|
40456
40549
|
lookupValue: 'featureText',
|
|
@@ -40568,7 +40661,7 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
|
40568
40661
|
}, featureClassId ? featureClassId : 'features');
|
|
40569
40662
|
});
|
|
40570
40663
|
|
|
40571
|
-
function Features(_ref) {
|
|
40664
|
+
function Features$1(_ref) {
|
|
40572
40665
|
var readOnly = _ref.readOnly;
|
|
40573
40666
|
var _useTranslation = useTranslation();
|
|
40574
40667
|
_useTranslation.t;
|
|
@@ -40594,7 +40687,7 @@ function Features(_ref) {
|
|
|
40594
40687
|
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
40595
40688
|
required: true,
|
|
40596
40689
|
unique: true
|
|
40597
|
-
}, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', ['DE', 'EN'], true), {
|
|
40690
|
+
}, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', ['DE', 'EN', 'FR', 'IT'], true), {
|
|
40598
40691
|
field: 'sequenceNo',
|
|
40599
40692
|
headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
|
|
40600
40693
|
required: true,
|
|
@@ -40632,7 +40725,7 @@ function Features(_ref) {
|
|
|
40632
40725
|
}, 'features');
|
|
40633
40726
|
}
|
|
40634
40727
|
|
|
40635
|
-
var TableFeatures$
|
|
40728
|
+
var TableFeatures$2 = observer(function () {
|
|
40636
40729
|
var _useDivaCore = useDivaCore(),
|
|
40637
40730
|
jwt = _useDivaCore.state.jwt;
|
|
40638
40731
|
var _useTranslation = useTranslation(),
|
|
@@ -40651,7 +40744,7 @@ var TableFeatures$1 = observer(function () {
|
|
|
40651
40744
|
conditionalTools: [{
|
|
40652
40745
|
id: 'globalfeatures',
|
|
40653
40746
|
name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
|
|
40654
|
-
elementComponent: Features,
|
|
40747
|
+
elementComponent: Features$1,
|
|
40655
40748
|
elementProps: {
|
|
40656
40749
|
readOnly: true
|
|
40657
40750
|
},
|
|
@@ -40732,7 +40825,7 @@ var TableFeatures$1 = observer(function () {
|
|
|
40732
40825
|
})]
|
|
40733
40826
|
})]
|
|
40734
40827
|
})
|
|
40735
|
-
}), selectedCatalog && /*#__PURE__*/jsx(Features$
|
|
40828
|
+
}), selectedCatalog && /*#__PURE__*/jsx(Features$2, {
|
|
40736
40829
|
organizationId: organizationId,
|
|
40737
40830
|
selectedCatalog: selectedCatalog,
|
|
40738
40831
|
hooks: hooks,
|
|
@@ -40742,7 +40835,7 @@ var TableFeatures$1 = observer(function () {
|
|
|
40742
40835
|
});
|
|
40743
40836
|
});
|
|
40744
40837
|
|
|
40745
|
-
var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
|
|
40838
|
+
var Options$1 = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
|
|
40746
40839
|
var organizationId = _ref.organizationId,
|
|
40747
40840
|
selectedCatalog = _ref.selectedCatalog,
|
|
40748
40841
|
apiConfig = _ref.apiConfig,
|
|
@@ -40906,7 +40999,7 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
|
|
|
40906
40999
|
});
|
|
40907
41000
|
});
|
|
40908
41001
|
|
|
40909
|
-
var TableOptions = observer(function () {
|
|
41002
|
+
var TableOptions$1 = observer(function () {
|
|
40910
41003
|
var _selectedCatalog$name;
|
|
40911
41004
|
var _useTranslation = useTranslation(),
|
|
40912
41005
|
t = _useTranslation.t;
|
|
@@ -40977,7 +41070,7 @@ var TableOptions = observer(function () {
|
|
|
40977
41070
|
})]
|
|
40978
41071
|
})]
|
|
40979
41072
|
})
|
|
40980
|
-
}), selectedCatalog && /*#__PURE__*/jsx(Options, {
|
|
41073
|
+
}), selectedCatalog && /*#__PURE__*/jsx(Options$1, {
|
|
40981
41074
|
organizationId: organizationId,
|
|
40982
41075
|
selectedCatalog: selectedCatalog,
|
|
40983
41076
|
hooks: hooks,
|
|
@@ -41008,7 +41101,7 @@ var TableFeatureClasses = observer(function () {
|
|
|
41008
41101
|
conditionalTools: [{
|
|
41009
41102
|
id: 'features',
|
|
41010
41103
|
name: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
|
|
41011
|
-
elementComponent: Features$
|
|
41104
|
+
elementComponent: Features$2,
|
|
41012
41105
|
elementProps: {
|
|
41013
41106
|
organizationId: organizationId,
|
|
41014
41107
|
selectedCatalog: selectedCatalog,
|
|
@@ -41694,7 +41787,7 @@ function OptionCombinations(_ref) {
|
|
|
41694
41787
|
editorElementProps: {
|
|
41695
41788
|
nameField: 'featureRefsDisplayTexts',
|
|
41696
41789
|
apiInterface: {
|
|
41697
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/
|
|
41790
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
|
|
41698
41791
|
},
|
|
41699
41792
|
filter: function filter(_, lookupData) {
|
|
41700
41793
|
var _decision$featureRefs8;
|
|
@@ -41719,10 +41812,31 @@ function OptionCombinations(_ref) {
|
|
|
41719
41812
|
},
|
|
41720
41813
|
defaultValue: []
|
|
41721
41814
|
}] : decision.decisionType == 3 ? [{
|
|
41722
|
-
headerName: 'backoffice.idmCatalog.optionCombinations.label.
|
|
41815
|
+
headerName: 'backoffice.idmCatalog.optionCombinations.label.setPosCountValue',
|
|
41723
41816
|
field: 'actions',
|
|
41724
|
-
cellDataType: '
|
|
41725
|
-
|
|
41817
|
+
cellDataType: 'number',
|
|
41818
|
+
required: true,
|
|
41819
|
+
customParams: {
|
|
41820
|
+
useParser: true,
|
|
41821
|
+
useFormatter: true
|
|
41822
|
+
},
|
|
41823
|
+
valueFormatter: function valueFormatter(_ref2) {
|
|
41824
|
+
_ref2.data;
|
|
41825
|
+
var value = _ref2.value;
|
|
41826
|
+
if (Array.isArray(value)) {
|
|
41827
|
+
var action = value === null || value === void 0 ? void 0 : value.find(function (action) {
|
|
41828
|
+
return action.startsWith('SET_POS_COUNT_VALUE');
|
|
41829
|
+
});
|
|
41830
|
+
return action ? Number(action.split(':')[1]) : undefined;
|
|
41831
|
+
}
|
|
41832
|
+
return value;
|
|
41833
|
+
},
|
|
41834
|
+
valueParser: function valueParser(_ref3) {
|
|
41835
|
+
var newValue = _ref3.newValue;
|
|
41836
|
+
if (newValue == '') return undefined;
|
|
41837
|
+
return ["SET_POS_COUNT_VALUE:".concat(newValue)];
|
|
41838
|
+
},
|
|
41839
|
+
additionalFields: ['projectActions']
|
|
41726
41840
|
}] : []), [{
|
|
41727
41841
|
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
41728
41842
|
field: 'sequence',
|
|
@@ -41750,13 +41864,6 @@ function OptionCombinations(_ref) {
|
|
|
41750
41864
|
field: '_id',
|
|
41751
41865
|
editable: false,
|
|
41752
41866
|
cellDataType: 'objectId'
|
|
41753
|
-
}, {
|
|
41754
|
-
field: 'organizationId',
|
|
41755
|
-
editable: false,
|
|
41756
|
-
hide: true,
|
|
41757
|
-
lockVisible: true,
|
|
41758
|
-
suppressColumnsToolPanel: true,
|
|
41759
|
-
defaultValue: '${organizationId}'
|
|
41760
41867
|
}, {
|
|
41761
41868
|
field: 'catalogId',
|
|
41762
41869
|
editable: false,
|
|
@@ -41913,7 +42020,7 @@ var TableDecisions = observer(function () {
|
|
|
41913
42020
|
nameField: 'featureRefsDisplayTexts',
|
|
41914
42021
|
displayLabelTemplate: '${name} (${value})',
|
|
41915
42022
|
apiInterface: {
|
|
41916
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/
|
|
42023
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
|
|
41917
42024
|
},
|
|
41918
42025
|
lookupValue: 'featureText',
|
|
41919
42026
|
lookupKey: 'featureNo',
|
|
@@ -42665,7 +42772,7 @@ function PriceFeatureGroupPercentageSurcharge(_ref) {
|
|
|
42665
42772
|
editorElementProps: {
|
|
42666
42773
|
nameField: 'featureNosDisplayTexts',
|
|
42667
42774
|
apiInterface: {
|
|
42668
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/
|
|
42775
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
|
|
42669
42776
|
},
|
|
42670
42777
|
filter: function filter(_, lookupData) {
|
|
42671
42778
|
var _priceFeatureGroup$fe7;
|
|
@@ -42852,7 +42959,7 @@ function PriceFeatureGroupFinishes(_ref) {
|
|
|
42852
42959
|
editorElementProps: {
|
|
42853
42960
|
nameField: 'featureNosDisplayTexts',
|
|
42854
42961
|
apiInterface: {
|
|
42855
|
-
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/
|
|
42962
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
|
|
42856
42963
|
},
|
|
42857
42964
|
filter: function filter(_, lookupData) {
|
|
42858
42965
|
var _priceFeatureGroup$fe7;
|
|
@@ -43336,7 +43443,8 @@ function Items(_ref) {
|
|
|
43336
43443
|
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options',
|
|
43337
43444
|
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
|
|
43338
43445
|
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
|
|
43339
|
-
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}'
|
|
43446
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/${optionKey}',
|
|
43447
|
+
bulk: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/optiongroups/${selectedOptionGroup}/options/bulk'
|
|
43340
43448
|
},
|
|
43341
43449
|
dateFormat: 'DD.MM.YYYY, HH:mm:ss',
|
|
43342
43450
|
floatingFilter: true,
|
|
@@ -43494,10 +43602,10 @@ function IDMCatalogEditor (_ref) {
|
|
|
43494
43602
|
display: 'flex',
|
|
43495
43603
|
flexDirection: 'column'
|
|
43496
43604
|
},
|
|
43497
|
-
children: /*#__PURE__*/jsx(Content$
|
|
43605
|
+
children: /*#__PURE__*/jsx(Content$6, {})
|
|
43498
43606
|
});
|
|
43499
43607
|
}
|
|
43500
|
-
function Content$
|
|
43608
|
+
function Content$6() {
|
|
43501
43609
|
return /*#__PURE__*/jsxs(Routes, {
|
|
43502
43610
|
children: [/*#__PURE__*/jsx(Route, {
|
|
43503
43611
|
index: true,
|
|
@@ -43510,10 +43618,10 @@ function Content$4() {
|
|
|
43510
43618
|
element: /*#__PURE__*/jsx(TableItems, {})
|
|
43511
43619
|
}), /*#__PURE__*/jsx(Route, {
|
|
43512
43620
|
path: ":catalogId/features",
|
|
43513
|
-
element: /*#__PURE__*/jsx(TableFeatures$
|
|
43621
|
+
element: /*#__PURE__*/jsx(TableFeatures$2, {})
|
|
43514
43622
|
}), /*#__PURE__*/jsx(Route, {
|
|
43515
43623
|
path: ":catalogId/options",
|
|
43516
|
-
element: /*#__PURE__*/jsx(TableOptions, {})
|
|
43624
|
+
element: /*#__PURE__*/jsx(TableOptions$1, {})
|
|
43517
43625
|
}), /*#__PURE__*/jsx(Route, {
|
|
43518
43626
|
path: ":catalogId/optiongroups",
|
|
43519
43627
|
element: /*#__PURE__*/jsx(TableOptionGroups, {})
|
|
@@ -43543,9 +43651,9 @@ function CollectionMembers(_ref) {
|
|
|
43543
43651
|
var collection = _ref.collection,
|
|
43544
43652
|
organizationId = _ref.organizationId,
|
|
43545
43653
|
apiConfig = _ref.apiConfig;
|
|
43546
|
-
var _useTranslation = useTranslation()
|
|
43547
|
-
|
|
43548
|
-
i18n = _useTranslation.i18n;
|
|
43654
|
+
var _useTranslation = useTranslation();
|
|
43655
|
+
_useTranslation.t;
|
|
43656
|
+
var i18n = _useTranslation.i18n;
|
|
43549
43657
|
var applicationData = useMemo(function () {
|
|
43550
43658
|
return {
|
|
43551
43659
|
organizationId: organizationId,
|
|
@@ -43586,36 +43694,33 @@ function CollectionMembers(_ref) {
|
|
|
43586
43694
|
lookupKey: '_id',
|
|
43587
43695
|
multiple: false,
|
|
43588
43696
|
translated: false,
|
|
43589
|
-
//add it to the row context, so it can be used
|
|
43697
|
+
//add it to the row context, so it can be used for filtering but will not be saved to the server
|
|
43590
43698
|
additionalMappings: [{
|
|
43591
43699
|
lookupField: 'published',
|
|
43592
43700
|
targetField: '__diva_context.additionalData.published'
|
|
43593
|
-
}]
|
|
43701
|
+
}],
|
|
43702
|
+
filter: function filter(_, lookupData) {
|
|
43703
|
+
var _lookupData$published;
|
|
43704
|
+
return (_lookupData$published = lookupData.published) === null || _lookupData$published === void 0 ? void 0 : _lookupData$published[organizationId];
|
|
43705
|
+
}
|
|
43594
43706
|
},
|
|
43595
43707
|
additionalFields: ['enricherPackageName'],
|
|
43596
|
-
isDictionary: false
|
|
43597
|
-
cellValueValidator: function cellValueValidator(_ref2) {
|
|
43598
|
-
var _data$__diva_context;
|
|
43599
|
-
var data = _ref2.data;
|
|
43600
|
-
if (!((_data$__diva_context = data.__diva_context) !== null && _data$__diva_context !== void 0 && (_data$__diva_context = _data$__diva_context.additionalData) !== null && _data$__diva_context !== void 0 && (_data$__diva_context = _data$__diva_context.published) !== null && _data$__diva_context !== void 0 && _data$__diva_context[organizationId])) {
|
|
43601
|
-
return t('backoffice.idmCatalogEditor.collection.enricherPackage.notPublishedError');
|
|
43602
|
-
}
|
|
43603
|
-
return undefined;
|
|
43604
|
-
}
|
|
43708
|
+
isDictionary: false
|
|
43605
43709
|
}, {
|
|
43606
43710
|
field: 'serieNos',
|
|
43607
43711
|
headerName: 'backoffice.idmCatalogEditor.collectionmembers.label.serieNos',
|
|
43608
43712
|
cellDataType: 'lookup',
|
|
43609
|
-
editable: function editable(
|
|
43610
|
-
var data =
|
|
43611
|
-
|
|
43713
|
+
editable: function editable(_ref2) {
|
|
43714
|
+
var data = _ref2.data,
|
|
43715
|
+
context = _ref2.context;
|
|
43716
|
+
return (context === null || context === void 0 ? void 0 : context.isPasting) || !!data.enricherPackageId;
|
|
43612
43717
|
},
|
|
43613
43718
|
customParams: {
|
|
43614
43719
|
nameField: 'serieNosDisplayTexts',
|
|
43615
43720
|
filterCellType: 'number',
|
|
43616
43721
|
displayLabelTemplate: '${name} (${value})',
|
|
43617
43722
|
apiInterface: {
|
|
43618
|
-
read: apiConfig.enricherService + '/
|
|
43723
|
+
read: apiConfig.enricherService + '/live/v3.0/catalogs/${__diva_context.additionalData.published.' + organizationId + '.liveCatalogId}/series'
|
|
43619
43724
|
},
|
|
43620
43725
|
lookupValue: 'seriesName',
|
|
43621
43726
|
lookupKey: 'serieNo',
|
|
@@ -43825,10 +43930,10 @@ function IDMCollectionEditor(_ref) {
|
|
|
43825
43930
|
display: 'flex',
|
|
43826
43931
|
flexDirection: 'column'
|
|
43827
43932
|
},
|
|
43828
|
-
children: /*#__PURE__*/jsx(Content$
|
|
43933
|
+
children: /*#__PURE__*/jsx(Content$5, {})
|
|
43829
43934
|
});
|
|
43830
43935
|
}
|
|
43831
|
-
function Content$
|
|
43936
|
+
function Content$5() {
|
|
43832
43937
|
return /*#__PURE__*/jsx(Routes, {
|
|
43833
43938
|
children: /*#__PURE__*/jsx(Route, {
|
|
43834
43939
|
index: true,
|
|
@@ -43838,9 +43943,174 @@ function Content$3() {
|
|
|
43838
43943
|
});
|
|
43839
43944
|
}
|
|
43840
43945
|
|
|
43946
|
+
var TableFeatures$1 = observer(function () {
|
|
43947
|
+
var _useTranslation = useTranslation(),
|
|
43948
|
+
t = _useTranslation.t;
|
|
43949
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
43950
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
43951
|
+
title: /*#__PURE__*/jsx("div", {
|
|
43952
|
+
children: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures')
|
|
43953
|
+
})
|
|
43954
|
+
}), /*#__PURE__*/jsx(Features$1, {})]
|
|
43955
|
+
});
|
|
43956
|
+
});
|
|
43957
|
+
|
|
43958
|
+
function IDMFeaturesEditor(_ref) {
|
|
43959
|
+
_objectDestructuringEmpty(_ref);
|
|
43960
|
+
return /*#__PURE__*/jsx("div", {
|
|
43961
|
+
style: {
|
|
43962
|
+
height: '85vh',
|
|
43963
|
+
display: 'flex',
|
|
43964
|
+
flexDirection: 'column'
|
|
43965
|
+
},
|
|
43966
|
+
children: /*#__PURE__*/jsx(Content$4, {})
|
|
43967
|
+
});
|
|
43968
|
+
}
|
|
43969
|
+
function Content$4() {
|
|
43970
|
+
return /*#__PURE__*/jsx(Routes, {
|
|
43971
|
+
children: /*#__PURE__*/jsx(Route, {
|
|
43972
|
+
index: true,
|
|
43973
|
+
path: "",
|
|
43974
|
+
element: /*#__PURE__*/jsx(TableFeatures$1, {})
|
|
43975
|
+
})
|
|
43976
|
+
});
|
|
43977
|
+
}
|
|
43978
|
+
|
|
43979
|
+
function Features(_ref) {
|
|
43980
|
+
var readOnly = _ref.readOnly;
|
|
43981
|
+
var root = useStore();
|
|
43982
|
+
var apiConfig = root.configurationStore.apiConfig;
|
|
43983
|
+
var organizationId = root.dataStore.organizationId;
|
|
43984
|
+
var applicationData = useMemo(function () {
|
|
43985
|
+
return {
|
|
43986
|
+
organizationId: organizationId
|
|
43987
|
+
};
|
|
43988
|
+
}, [organizationId]);
|
|
43989
|
+
var _useTranslation = useTranslation(),
|
|
43990
|
+
t = _useTranslation.t;
|
|
43991
|
+
var configuration = useMemo(function () {
|
|
43992
|
+
var _root$dataStore$curre;
|
|
43993
|
+
var headerPosVariationType = [{
|
|
43994
|
+
name: t('backoffice.idmCatalog.features.label.vt.I'),
|
|
43995
|
+
value: 'I'
|
|
43996
|
+
}, {
|
|
43997
|
+
name: t('backoffice.idmCatalog.features.label.vt.K'),
|
|
43998
|
+
value: 'K'
|
|
43999
|
+
}, {
|
|
44000
|
+
name: t('backoffice.idmCatalog.features.label.vt.P'),
|
|
44001
|
+
value: 'P'
|
|
44002
|
+
}];
|
|
44003
|
+
var featureT = [{
|
|
44004
|
+
name: t('backoffice.idmCatalog.features.label.featureTDic.M'),
|
|
44005
|
+
value: 'M'
|
|
44006
|
+
}, {
|
|
44007
|
+
name: t('backoffice.idmCatalog.features.label.featureTDic.C'),
|
|
44008
|
+
value: 'C'
|
|
44009
|
+
}, {
|
|
44010
|
+
name: t('backoffice.idmCatalog.features.label.featureTDic.O'),
|
|
44011
|
+
value: 'O'
|
|
44012
|
+
}];
|
|
44013
|
+
return {
|
|
44014
|
+
type: 'dotnetSSM',
|
|
44015
|
+
apiInterface: {
|
|
44016
|
+
read: apiConfig.idmService + '/v3.0/${organizationId}/features',
|
|
44017
|
+
create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features',
|
|
44018
|
+
restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}/restore',
|
|
44019
|
+
"delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
|
|
44020
|
+
update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/${_id}',
|
|
44021
|
+
bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/features/bulk'
|
|
44022
|
+
},
|
|
44023
|
+
dateFormat: 'DD.MM.YYYY, HH:mm:ss',
|
|
44024
|
+
colDef: [{
|
|
44025
|
+
field: 'featureNo',
|
|
44026
|
+
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
44027
|
+
required: true,
|
|
44028
|
+
unique: true
|
|
44029
|
+
}, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.settings.languages, true), {
|
|
44030
|
+
field: 'sequenceNo',
|
|
44031
|
+
headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
|
|
44032
|
+
required: true,
|
|
44033
|
+
cellDataType: 'number'
|
|
44034
|
+
}, {
|
|
44035
|
+
field: 'headerPosVariationType',
|
|
44036
|
+
headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
|
|
44037
|
+
required: true,
|
|
44038
|
+
cellDataType: 'enum',
|
|
44039
|
+
customParams: {
|
|
44040
|
+
enumData: headerPosVariationType,
|
|
44041
|
+
displayLabelTemplate: '${name} (${value})'
|
|
44042
|
+
}
|
|
44043
|
+
}, {
|
|
44044
|
+
field: 'featureT',
|
|
44045
|
+
headerName: 'backoffice.idmCatalog.features.label.featureT',
|
|
44046
|
+
cellDataType: 'enum',
|
|
44047
|
+
customParams: {
|
|
44048
|
+
enumData: featureT,
|
|
44049
|
+
displayLabelTemplate: '${name} (${value})'
|
|
44050
|
+
}
|
|
44051
|
+
}, {
|
|
44052
|
+
field: 'measureUnit',
|
|
44053
|
+
headerName: 'backoffice.idmCatalog.features.label.measureUnit'
|
|
44054
|
+
}, {
|
|
44055
|
+
field: 'measureParameter',
|
|
44056
|
+
headerName: 'backoffice.idmCatalog.features.label.measureParameter'
|
|
44057
|
+
}, {
|
|
44058
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
44059
|
+
field: 'lastUpdatedDate',
|
|
44060
|
+
cellDataType: 'dateString',
|
|
44061
|
+
editable: false
|
|
44062
|
+
}, {
|
|
44063
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
44064
|
+
field: 'createdDate',
|
|
44065
|
+
cellDataType: 'dateString',
|
|
44066
|
+
editable: false
|
|
44067
|
+
}, {
|
|
44068
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
44069
|
+
field: 'createdByDisplayText',
|
|
44070
|
+
editable: false
|
|
44071
|
+
}, {
|
|
44072
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
44073
|
+
field: 'lastUpdatedByDisplayText',
|
|
44074
|
+
editable: false
|
|
44075
|
+
}, {
|
|
44076
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
44077
|
+
field: '_id',
|
|
44078
|
+
editable: false,
|
|
44079
|
+
cellDataType: 'objectId'
|
|
44080
|
+
}, {
|
|
44081
|
+
field: 'organizationId',
|
|
44082
|
+
editable: false,
|
|
44083
|
+
hide: true,
|
|
44084
|
+
lockVisible: true,
|
|
44085
|
+
suppressColumnsToolPanel: true,
|
|
44086
|
+
defaultValue: '${organizationId}'
|
|
44087
|
+
}]
|
|
44088
|
+
};
|
|
44089
|
+
}, []);
|
|
44090
|
+
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
44091
|
+
gridId: 'crud-grid_global_features',
|
|
44092
|
+
applicationData: applicationData,
|
|
44093
|
+
configuration: configuration
|
|
44094
|
+
}, 'features');
|
|
44095
|
+
}
|
|
44096
|
+
|
|
43841
44097
|
var TableFeatures = observer(function () {
|
|
43842
44098
|
var _useTranslation = useTranslation(),
|
|
43843
44099
|
t = _useTranslation.t;
|
|
44100
|
+
useTools({
|
|
44101
|
+
conditionalTools: [{
|
|
44102
|
+
id: 'globalfeatures',
|
|
44103
|
+
name: t('backoffice.menu.features.label.IDMGlobalFeatures'),
|
|
44104
|
+
elementComponent: Features$1,
|
|
44105
|
+
elementProps: {
|
|
44106
|
+
readOnly: true
|
|
44107
|
+
},
|
|
44108
|
+
where: 'right',
|
|
44109
|
+
condition: function condition() {
|
|
44110
|
+
return true;
|
|
44111
|
+
}
|
|
44112
|
+
}]
|
|
44113
|
+
});
|
|
43844
44114
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
43845
44115
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
43846
44116
|
title: /*#__PURE__*/jsx("div", {
|
|
@@ -43850,7 +44120,196 @@ var TableFeatures = observer(function () {
|
|
|
43850
44120
|
});
|
|
43851
44121
|
});
|
|
43852
44122
|
|
|
43853
|
-
function
|
|
44123
|
+
function IDMOrganizationFeaturesEditor(_ref) {
|
|
44124
|
+
_objectDestructuringEmpty(_ref);
|
|
44125
|
+
return /*#__PURE__*/jsx("div", {
|
|
44126
|
+
style: {
|
|
44127
|
+
height: '85vh',
|
|
44128
|
+
display: 'flex',
|
|
44129
|
+
flexDirection: 'column'
|
|
44130
|
+
},
|
|
44131
|
+
children: /*#__PURE__*/jsx(Content$3, {})
|
|
44132
|
+
});
|
|
44133
|
+
}
|
|
44134
|
+
function Content$3() {
|
|
44135
|
+
return /*#__PURE__*/jsx(Routes, {
|
|
44136
|
+
children: /*#__PURE__*/jsx(Route, {
|
|
44137
|
+
index: true,
|
|
44138
|
+
path: "",
|
|
44139
|
+
element: /*#__PURE__*/jsx(TableFeatures, {})
|
|
44140
|
+
})
|
|
44141
|
+
});
|
|
44142
|
+
}
|
|
44143
|
+
|
|
44144
|
+
function Options(_ref) {
|
|
44145
|
+
var _root$dataStore$curre;
|
|
44146
|
+
var readOnly = _ref.readOnly;
|
|
44147
|
+
var root = useStore();
|
|
44148
|
+
var apiConfig = root.configurationStore.apiConfig;
|
|
44149
|
+
var organizationId = root.dataStore.organizationId;
|
|
44150
|
+
var languages = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.settings.languages;
|
|
44151
|
+
var applicationData = useMemo(function () {
|
|
44152
|
+
return {
|
|
44153
|
+
organizationId: organizationId
|
|
44154
|
+
};
|
|
44155
|
+
}, [organizationId]);
|
|
44156
|
+
var _useTranslation = useTranslation();
|
|
44157
|
+
_useTranslation.t;
|
|
44158
|
+
var configuration = useMemo(function () {
|
|
44159
|
+
return {
|
|
44160
|
+
type: 'dotnetSSM',
|
|
44161
|
+
apiInterface: {
|
|
44162
|
+
read: apiConfig.idmService + '/v3.0/${organizationId}/options',
|
|
44163
|
+
create: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options',
|
|
44164
|
+
restore: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}/restore',
|
|
44165
|
+
"delete": readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
|
|
44166
|
+
update: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/${_id}',
|
|
44167
|
+
bulk: readOnly ? undefined : apiConfig.idmService + '/v3.0/${organizationId}/options/bulk'
|
|
44168
|
+
},
|
|
44169
|
+
dateFormat: 'DD.MM.YYYY, HH:mm:ss',
|
|
44170
|
+
colDef: [{
|
|
44171
|
+
field: 'optionKey',
|
|
44172
|
+
required: true
|
|
44173
|
+
}, {
|
|
44174
|
+
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
44175
|
+
field: 'sequenceNo',
|
|
44176
|
+
cellDataType: 'number'
|
|
44177
|
+
}, createTranslatedColumnConfig('optionText', 'backoffice.idmCatalog.options.label.optionText', languages, true), createTranslatedColumnConfig('optionCommentText', 'backoffice.idmCatalog.options.label.optionCommentText', languages), {
|
|
44178
|
+
headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
|
|
44179
|
+
field: 'optionFreeText',
|
|
44180
|
+
cellDataType: 'boolean'
|
|
44181
|
+
}, {
|
|
44182
|
+
field: 'featureNos',
|
|
44183
|
+
headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
|
|
44184
|
+
cellDataType: 'lookup',
|
|
44185
|
+
editable: true,
|
|
44186
|
+
required: false,
|
|
44187
|
+
customParams: {
|
|
44188
|
+
nameField: 'featureIdsDisplayTexts',
|
|
44189
|
+
filterCellType: 'number',
|
|
44190
|
+
displayLabelTemplate: '${name} (${value})',
|
|
44191
|
+
apiInterface: {
|
|
44192
|
+
read: apiConfig.idmService + '/v3.0/${organizationId}/features'
|
|
44193
|
+
},
|
|
44194
|
+
lookupValue: 'featureText',
|
|
44195
|
+
lookupKey: 'featureNo',
|
|
44196
|
+
lookupKeyFilterType: {
|
|
44197
|
+
type: 'equals',
|
|
44198
|
+
filterType: 'number'
|
|
44199
|
+
},
|
|
44200
|
+
additionalMappings: [{
|
|
44201
|
+
lookupField: '_id',
|
|
44202
|
+
targetField: 'featureIds'
|
|
44203
|
+
}],
|
|
44204
|
+
multiple: true,
|
|
44205
|
+
translated: true
|
|
44206
|
+
},
|
|
44207
|
+
additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
|
|
44208
|
+
isDictionary: true
|
|
44209
|
+
}, {
|
|
44210
|
+
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
44211
|
+
children: [{
|
|
44212
|
+
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
44213
|
+
field: 'validFromDate',
|
|
44214
|
+
cellDataType: 'dateString',
|
|
44215
|
+
customParams: {
|
|
44216
|
+
dateFormat: 'DD.MM.YYYY'
|
|
44217
|
+
}
|
|
44218
|
+
}, {
|
|
44219
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
44220
|
+
field: 'validUntilDate',
|
|
44221
|
+
cellDataType: 'dateString',
|
|
44222
|
+
customParams: {
|
|
44223
|
+
dateFormat: 'DD.MM.YYYY'
|
|
44224
|
+
}
|
|
44225
|
+
}]
|
|
44226
|
+
}, {
|
|
44227
|
+
headerName: 'backoffice.idmCatalog.options.label.material',
|
|
44228
|
+
children: [{
|
|
44229
|
+
headerName: 'backoffice.idmCatalog.options.label.materialNo',
|
|
44230
|
+
field: 'materialNo',
|
|
44231
|
+
editable: false
|
|
44232
|
+
}, {
|
|
44233
|
+
headerName: 'backoffice.idmCatalog.options.label.materialColorR',
|
|
44234
|
+
field: 'materialColorR',
|
|
44235
|
+
cellDataType: 'number'
|
|
44236
|
+
}, {
|
|
44237
|
+
headerName: 'backoffice.idmCatalog.options.label.materialColorG',
|
|
44238
|
+
field: 'materialColorG',
|
|
44239
|
+
cellDataType: 'number'
|
|
44240
|
+
}, {
|
|
44241
|
+
headerName: 'backoffice.idmCatalog.options.label.materialColorB',
|
|
44242
|
+
field: 'materialColorB',
|
|
44243
|
+
cellDataType: 'number'
|
|
44244
|
+
}]
|
|
44245
|
+
}, {
|
|
44246
|
+
headerName: 'backoffice.idmCatalog.options.label.measurement',
|
|
44247
|
+
children: [{
|
|
44248
|
+
headerName: 'backoffice.idmCatalog.options.label.measureNo',
|
|
44249
|
+
field: 'measureNo',
|
|
44250
|
+
cellDataType: 'number',
|
|
44251
|
+
editable: false
|
|
44252
|
+
}, {
|
|
44253
|
+
headerName: 'backoffice.idmCatalog.options.label.measureValue',
|
|
44254
|
+
field: 'measureValue',
|
|
44255
|
+
cellDataType: 'number'
|
|
44256
|
+
}, {
|
|
44257
|
+
headerName: 'backoffice.idmCatalog.options.label.measureUnit',
|
|
44258
|
+
field: 'measureUnit'
|
|
44259
|
+
}]
|
|
44260
|
+
}, {
|
|
44261
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
44262
|
+
field: 'lastUpdatedDate',
|
|
44263
|
+
cellDataType: 'dateString',
|
|
44264
|
+
editable: false
|
|
44265
|
+
}, {
|
|
44266
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
44267
|
+
field: 'createdDate',
|
|
44268
|
+
cellDataType: 'dateString',
|
|
44269
|
+
editable: false
|
|
44270
|
+
}, {
|
|
44271
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
44272
|
+
field: 'createdByDisplayText',
|
|
44273
|
+
editable: false
|
|
44274
|
+
}, {
|
|
44275
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
44276
|
+
field: 'lastUpdatedByDisplayText',
|
|
44277
|
+
editable: false
|
|
44278
|
+
}, {
|
|
44279
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
44280
|
+
field: '_id',
|
|
44281
|
+
editable: false,
|
|
44282
|
+
cellDataType: 'objectId'
|
|
44283
|
+
}, {
|
|
44284
|
+
field: 'organizationId',
|
|
44285
|
+
editable: false,
|
|
44286
|
+
hide: true,
|
|
44287
|
+
lockVisible: true,
|
|
44288
|
+
suppressColumnsToolPanel: true,
|
|
44289
|
+
defaultValue: '${organizationId}'
|
|
44290
|
+
}]
|
|
44291
|
+
};
|
|
44292
|
+
}, []);
|
|
44293
|
+
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
44294
|
+
gridId: 'crud-grid_global_features',
|
|
44295
|
+
applicationData: applicationData,
|
|
44296
|
+
configuration: configuration
|
|
44297
|
+
}, 'features');
|
|
44298
|
+
}
|
|
44299
|
+
|
|
44300
|
+
var TableOptions = observer(function () {
|
|
44301
|
+
var _useTranslation = useTranslation(),
|
|
44302
|
+
t = _useTranslation.t;
|
|
44303
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
44304
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
44305
|
+
title: /*#__PURE__*/jsx("div", {
|
|
44306
|
+
children: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions')
|
|
44307
|
+
})
|
|
44308
|
+
}), /*#__PURE__*/jsx(Options, {})]
|
|
44309
|
+
});
|
|
44310
|
+
});
|
|
44311
|
+
|
|
44312
|
+
function IDMOrganizationOptionsEditor(_ref) {
|
|
43854
44313
|
_objectDestructuringEmpty(_ref);
|
|
43855
44314
|
return /*#__PURE__*/jsx("div", {
|
|
43856
44315
|
style: {
|
|
@@ -43866,7 +44325,7 @@ function Content$2() {
|
|
|
43866
44325
|
children: /*#__PURE__*/jsx(Route, {
|
|
43867
44326
|
index: true,
|
|
43868
44327
|
path: "",
|
|
43869
|
-
element: /*#__PURE__*/jsx(
|
|
44328
|
+
element: /*#__PURE__*/jsx(TableOptions, {})
|
|
43870
44329
|
})
|
|
43871
44330
|
});
|
|
43872
44331
|
}
|
|
@@ -44428,6 +44887,12 @@ var ContentCard = observer(function (_ref3) {
|
|
|
44428
44887
|
}, configId), configuration.type == 'IDMFeaturesEditor' && /*#__PURE__*/jsx(IDMFeaturesEditor, {
|
|
44429
44888
|
configuration: configuration,
|
|
44430
44889
|
id: configId
|
|
44890
|
+
}, configId), configuration.type == 'IDMOrganizationFeaturesEditor' && /*#__PURE__*/jsx(IDMOrganizationFeaturesEditor, {
|
|
44891
|
+
configuration: configuration,
|
|
44892
|
+
id: configId
|
|
44893
|
+
}, configId), configuration.type == 'IDMOrganizationOptionsEditor' && /*#__PURE__*/jsx(IDMOrganizationOptionsEditor, {
|
|
44894
|
+
configuration: configuration,
|
|
44895
|
+
id: configId
|
|
44431
44896
|
}, configId), configuration.type == 'MediaTable' && /*#__PURE__*/jsx(MediaTable, {
|
|
44432
44897
|
configuration: configuration,
|
|
44433
44898
|
id: configId
|
|
@@ -45047,13 +45512,15 @@ var ArticleSelection$1 = observer(ArticleSelection);
|
|
|
45047
45512
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
45048
45513
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
45049
45514
|
function useWysiwyg$1(_ref) {
|
|
45050
|
-
var _tool$parameters;
|
|
45515
|
+
var _tool$parameters, _tool$elementProps5;
|
|
45051
45516
|
var tool = _ref.tool,
|
|
45052
45517
|
toolbar = _ref.toolbar;
|
|
45053
45518
|
var _useDivaCore = useDivaCore(),
|
|
45054
45519
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
45055
45520
|
subscribeEvents = _useDivaCore$actions.subscribeEvents,
|
|
45056
45521
|
unSubscribeEvents = _useDivaCore$actions.unSubscribeEvents;
|
|
45522
|
+
var _useTranslation = useTranslation(),
|
|
45523
|
+
t = _useTranslation.t;
|
|
45057
45524
|
var root = useStore();
|
|
45058
45525
|
var _useState = useState(false),
|
|
45059
45526
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -45065,34 +45532,54 @@ function useWysiwyg$1(_ref) {
|
|
|
45065
45532
|
setMask = _useState4[1];
|
|
45066
45533
|
var _useState5 = useState(),
|
|
45067
45534
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
45068
|
-
|
|
45069
|
-
|
|
45070
|
-
var _useState7 = useState(
|
|
45535
|
+
loadingText = _useState6[0],
|
|
45536
|
+
setLoadingText = _useState6[1];
|
|
45537
|
+
var _useState7 = useState(false),
|
|
45071
45538
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
45072
|
-
|
|
45073
|
-
|
|
45074
|
-
var _useState9 = useState(
|
|
45075
|
-
catalogCodex: (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.catalogCodex
|
|
45076
|
-
}),
|
|
45539
|
+
isLoadingMask = _useState8[0],
|
|
45540
|
+
setLoadingMask = _useState8[1];
|
|
45541
|
+
var _useState9 = useState(false),
|
|
45077
45542
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
45078
|
-
|
|
45079
|
-
|
|
45080
|
-
var _useState11 = useState(
|
|
45543
|
+
isLoadingCatalog = _useState10[0],
|
|
45544
|
+
setLoadingCatalog = _useState10[1];
|
|
45545
|
+
var _useState11 = useState(false),
|
|
45081
45546
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
45082
|
-
|
|
45083
|
-
|
|
45084
|
-
var _useState13 = useState(
|
|
45547
|
+
isLoadingPackage = _useState12[0],
|
|
45548
|
+
setLoadingPackage = _useState12[1];
|
|
45549
|
+
var _useState13 = useState(false),
|
|
45085
45550
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
45086
|
-
|
|
45087
|
-
|
|
45551
|
+
isLoadingArticles = _useState14[0],
|
|
45552
|
+
setLoadingArticles = _useState14[1];
|
|
45088
45553
|
var _useState15 = useState(),
|
|
45089
45554
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
45090
|
-
|
|
45091
|
-
|
|
45092
|
-
var _useState17 = useState(),
|
|
45555
|
+
articleCodex = _useState16[0],
|
|
45556
|
+
setArticleCodex = _useState16[1];
|
|
45557
|
+
var _useState17 = useState([]),
|
|
45093
45558
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
45094
|
-
|
|
45095
|
-
|
|
45559
|
+
itemList = _useState18[0],
|
|
45560
|
+
setItemList = _useState18[1];
|
|
45561
|
+
var _useState19 = useState({
|
|
45562
|
+
catalogCodex: (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.catalogCodex
|
|
45563
|
+
}),
|
|
45564
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
45565
|
+
serie = _useState20[0],
|
|
45566
|
+
setSerie = _useState20[1];
|
|
45567
|
+
var _useState21 = useState([]),
|
|
45568
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
45569
|
+
serieList = _useState22[0],
|
|
45570
|
+
setSerieList = _useState22[1];
|
|
45571
|
+
var _useState23 = useState(tool.parameters.catalogId),
|
|
45572
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
45573
|
+
catalogId = _useState24[0],
|
|
45574
|
+
setCatalogId = _useState24[1];
|
|
45575
|
+
var _useState25 = useState(),
|
|
45576
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
45577
|
+
currentNav = _useState26[0],
|
|
45578
|
+
setCurrentNav = _useState26[1];
|
|
45579
|
+
var _useState27 = useState(),
|
|
45580
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
45581
|
+
doNavigate = _useState28[0],
|
|
45582
|
+
setDoNavigate = _useState28[1];
|
|
45096
45583
|
useEffect(function () {
|
|
45097
45584
|
if (!toolbar.hidden) setDoReset(true);
|
|
45098
45585
|
}, [toolbar.hidden]);
|
|
@@ -45220,26 +45707,36 @@ function useWysiwyg$1(_ref) {
|
|
|
45220
45707
|
};
|
|
45221
45708
|
}();
|
|
45222
45709
|
useEffect(function () {
|
|
45710
|
+
var _tool$elementProps;
|
|
45711
|
+
if ((_tool$elementProps = tool.elementProps) !== null && _tool$elementProps !== void 0 && _tool$elementProps.onlyPlaceholder) return;
|
|
45223
45712
|
if (doReset) {
|
|
45224
|
-
var _tool$
|
|
45713
|
+
var _tool$elementProps2, _tool$elementProps4;
|
|
45225
45714
|
if (currentNav) setDoNavigate(currentNav);
|
|
45226
|
-
if ((_tool$
|
|
45227
|
-
var _tool$
|
|
45228
|
-
if ((_tool$
|
|
45229
|
-
|
|
45715
|
+
if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.showCatalogSelection && !serieList.length) {
|
|
45716
|
+
var _tool$elementProps3;
|
|
45717
|
+
if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.loadPackage) {
|
|
45718
|
+
setLoadingPackage(true);
|
|
45719
|
+
loadPackage(tool.parameters.packageId).then(function () {
|
|
45720
|
+
return setLoadingPackage(false);
|
|
45721
|
+
});
|
|
45230
45722
|
} else {
|
|
45231
|
-
|
|
45723
|
+
setLoadingCatalog(true);
|
|
45724
|
+
loadCatalogs(tool.elementProps.catalogId).then(function () {
|
|
45725
|
+
return setLoadingCatalog(false);
|
|
45726
|
+
});
|
|
45232
45727
|
}
|
|
45233
45728
|
}
|
|
45234
|
-
if ((_tool$
|
|
45729
|
+
if ((_tool$elementProps4 = tool.elementProps) !== null && _tool$elementProps4 !== void 0 && _tool$elementProps4.loadMask) {
|
|
45730
|
+
setLoadingMask(true);
|
|
45235
45731
|
loadMask(tool.parameters.packageId).then(function () {
|
|
45236
|
-
|
|
45732
|
+
setLoadingMask(false);
|
|
45733
|
+
setDoReset(false);
|
|
45237
45734
|
});
|
|
45238
45735
|
} else {
|
|
45239
45736
|
setDoReset(false);
|
|
45240
45737
|
}
|
|
45241
45738
|
}
|
|
45242
|
-
}, [doReset]);
|
|
45739
|
+
}, [doReset, (_tool$elementProps5 = tool.elementProps) === null || _tool$elementProps5 === void 0 ? void 0 : _tool$elementProps5.onlyPlaceholder]);
|
|
45243
45740
|
useEffect(function () {
|
|
45244
45741
|
setArticleCodex(undefined);
|
|
45245
45742
|
if (serie !== null && serie !== void 0 && serie.catalogCodex) {
|
|
@@ -45255,6 +45752,7 @@ function useWysiwyg$1(_ref) {
|
|
|
45255
45752
|
setArticleCodex(undefined);
|
|
45256
45753
|
setSerie(undefined);
|
|
45257
45754
|
setItemList([]);
|
|
45755
|
+
setLoadingArticles(true);
|
|
45258
45756
|
setSerieList([]);
|
|
45259
45757
|
}, [tool.parameters.catalogId, tool.parameters.packageId]);
|
|
45260
45758
|
var onEventCalled = /*#__PURE__*/function () {
|
|
@@ -45277,6 +45775,7 @@ function useWysiwyg$1(_ref) {
|
|
|
45277
45775
|
});
|
|
45278
45776
|
}
|
|
45279
45777
|
setItemList(articles);
|
|
45778
|
+
setLoadingArticles(false);
|
|
45280
45779
|
if (articleCodex === undefined && articles !== null && articles !== void 0 && (_articles$ = articles[0]) !== null && _articles$ !== void 0 && _articles$.value) setArticleCodex(articles[0].value);
|
|
45281
45780
|
}
|
|
45282
45781
|
if (e.type === 'navigatedToOption') {
|
|
@@ -45299,7 +45798,7 @@ function useWysiwyg$1(_ref) {
|
|
|
45299
45798
|
};
|
|
45300
45799
|
}, [articleCodex]);
|
|
45301
45800
|
var settings = useMemo(function () {
|
|
45302
|
-
var _tool$
|
|
45801
|
+
var _tool$elementProps6, _tool$elementProps7, _tool$elementProps8;
|
|
45303
45802
|
return {
|
|
45304
45803
|
language: 'DE',
|
|
45305
45804
|
showSelectionModeZero: true,
|
|
@@ -45356,9 +45855,9 @@ function useWysiwyg$1(_ref) {
|
|
|
45356
45855
|
tooltipPosition: 'left-center',
|
|
45357
45856
|
clientEvents: ['onWebPlanerConfigChange', 'onArticlesLoaded']
|
|
45358
45857
|
},
|
|
45359
|
-
useIDMService: (_tool$
|
|
45360
|
-
useEnricherService: (_tool$
|
|
45361
|
-
useMask: (_tool$
|
|
45858
|
+
useIDMService: (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.useIDMService,
|
|
45859
|
+
useEnricherService: (_tool$elementProps7 = tool.elementProps) === null || _tool$elementProps7 === void 0 ? void 0 : _tool$elementProps7.useEnricherService,
|
|
45860
|
+
useMask: (_tool$elementProps8 = tool.elementProps) === null || _tool$elementProps8 === void 0 ? void 0 : _tool$elementProps8.loadMask,
|
|
45362
45861
|
templateConfig: {
|
|
45363
45862
|
Layout: 'wysiwyg',
|
|
45364
45863
|
NavigationButton: 'standard',
|
|
@@ -45379,6 +45878,19 @@ function useWysiwyg$1(_ref) {
|
|
|
45379
45878
|
}
|
|
45380
45879
|
};
|
|
45381
45880
|
}, []);
|
|
45881
|
+
useEffect(function () {
|
|
45882
|
+
if (isLoadingPackage) {
|
|
45883
|
+
setLoadingText(t('backoffice.wysiwyg.configurator.loading.package'));
|
|
45884
|
+
} else if (isLoadingCatalog) {
|
|
45885
|
+
setLoadingText(t('backoffice.wysiwyg.configurator.loading.catalog'));
|
|
45886
|
+
} else if (isLoadingMask) {
|
|
45887
|
+
setLoadingText(t('backoffice.wysiwyg.configurator.loading.mask'));
|
|
45888
|
+
} else if (isLoadingArticles) {
|
|
45889
|
+
setLoadingText(t('backoffice.wysiwyg.configurator.loading.articles'));
|
|
45890
|
+
} else {
|
|
45891
|
+
setLoadingText(undefined);
|
|
45892
|
+
}
|
|
45893
|
+
}, [isLoadingPackage, isLoadingCatalog, isLoadingMask, isLoadingArticles]);
|
|
45382
45894
|
return {
|
|
45383
45895
|
itemList: itemList,
|
|
45384
45896
|
setItemList: setItemList,
|
|
@@ -45394,7 +45906,8 @@ function useWysiwyg$1(_ref) {
|
|
|
45394
45906
|
setDoReset: setDoReset,
|
|
45395
45907
|
doNavigate: doNavigate,
|
|
45396
45908
|
setDoNavigate: setDoNavigate,
|
|
45397
|
-
catalogId: catalogId
|
|
45909
|
+
catalogId: catalogId,
|
|
45910
|
+
loadingText: loadingText
|
|
45398
45911
|
};
|
|
45399
45912
|
}
|
|
45400
45913
|
|
|
@@ -45512,6 +46025,7 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
45512
46025
|
}
|
|
45513
46026
|
}, [tool.parameters]);
|
|
45514
46027
|
useEffect(function () {
|
|
46028
|
+
if (tool.elementProps.onlyPlaceholder) return;
|
|
45515
46029
|
if (tool.elementProps.initSerie) {
|
|
45516
46030
|
if (tool.elementProps.useEnricherService) {
|
|
45517
46031
|
var _state$serieList$find;
|
|
@@ -45546,6 +46060,9 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
45546
46060
|
});
|
|
45547
46061
|
}
|
|
45548
46062
|
}
|
|
46063
|
+
if (tool.elementProps.onlyPlaceholder) {
|
|
46064
|
+
return /*#__PURE__*/jsx("div", {});
|
|
46065
|
+
}
|
|
45549
46066
|
if (state !== null && state !== void 0 && state.mask) {
|
|
45550
46067
|
var _state$mask;
|
|
45551
46068
|
if (!((_state$mask = state.mask) !== null && _state$mask !== void 0 && _state$mask.catalogCodex) || !state.mask.accountId) return /*#__PURE__*/jsx(Fragment, {
|
|
@@ -45556,14 +46073,18 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
45556
46073
|
errorCode: "BACKO_0004",
|
|
45557
46074
|
children: /*#__PURE__*/jsxs("div", {
|
|
45558
46075
|
className: wrapper$2,
|
|
45559
|
-
children: [
|
|
45560
|
-
|
|
45561
|
-
|
|
45562
|
-
|
|
45563
|
-
|
|
45564
|
-
|
|
46076
|
+
children: [!state.loadingText && /*#__PURE__*/jsxs(Fragment, {
|
|
46077
|
+
children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
|
|
46078
|
+
state: state,
|
|
46079
|
+
setSerie: tool.elementProps.setSerie
|
|
46080
|
+
}), /*#__PURE__*/jsx(ArticleSelection$1, {
|
|
46081
|
+
state: state,
|
|
46082
|
+
setArticle: tool.elementProps.setArticle
|
|
46083
|
+
})]
|
|
46084
|
+
}), state.loadingText && /*#__PURE__*/jsx("div", {
|
|
46085
|
+
children: state.loadingText
|
|
45565
46086
|
}), state.mask && !state.doReset && /*#__PURE__*/jsx("div", {
|
|
45566
|
-
hidden: !state.articleCodex,
|
|
46087
|
+
hidden: !state.articleCodex && !!state.loadingText,
|
|
45567
46088
|
className: confContainer,
|
|
45568
46089
|
children: /*#__PURE__*/jsx(WebPlannerReact, {
|
|
45569
46090
|
settings: state.settings,
|
|
@@ -45593,7 +46114,7 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
45593
46114
|
}
|
|
45594
46115
|
}
|
|
45595
46116
|
},
|
|
45596
|
-
isVisible: !!state.articleCodex
|
|
46117
|
+
isVisible: !!state.articleCodex && !state.loadingText
|
|
45597
46118
|
}, state.articleCodex)
|
|
45598
46119
|
})]
|
|
45599
46120
|
})
|