@crystaldesign/diva-backoffice 25.14.0-beta.47 → 25.14.0-beta.49
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 +142 -90
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/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 +4 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts +17 -7
- package/build/types/backoffice/src/ui/CommonComponents/useTools.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -32757,8 +32757,8 @@ function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
32757
32757
|
* Custom hook for managing tools and configurator functionality
|
|
32758
32758
|
*
|
|
32759
32759
|
* @param props - The hook props
|
|
32760
|
-
* @param props.
|
|
32761
|
-
* @param props.
|
|
32760
|
+
* @param props.catalog - Catalog object for configurator tools
|
|
32761
|
+
* @param props.enricherPackage - Enricher package object for configurator tools
|
|
32762
32762
|
* @param props.isApi2 - Whether to use API2 mode
|
|
32763
32763
|
* @param props.mainInformationWindowCodex - Main information window codex
|
|
32764
32764
|
* @param props.serie - Serie object for configurator tools
|
|
@@ -32772,8 +32772,8 @@ function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
32772
32772
|
* @returns {Function} removeSecondaryTables - Function to remove secondary tables
|
|
32773
32773
|
*/
|
|
32774
32774
|
var useTools = function useTools(_ref) {
|
|
32775
|
-
var
|
|
32776
|
-
|
|
32775
|
+
var catalog = _ref.catalog,
|
|
32776
|
+
enricherPackage = _ref.enricherPackage,
|
|
32777
32777
|
isApi2 = _ref.isApi2,
|
|
32778
32778
|
onlyPlaceholder = _ref.onlyPlaceholder,
|
|
32779
32779
|
mainInformationWindowCodex = _ref.mainInformationWindowCodex,
|
|
@@ -32783,6 +32783,9 @@ var useTools = function useTools(_ref) {
|
|
|
32783
32783
|
setArticle = _ref.setArticle,
|
|
32784
32784
|
conditionalTools = _ref.conditionalTools;
|
|
32785
32785
|
var root = useStore();
|
|
32786
|
+
var catalogId = catalog === null || catalog === void 0 ? void 0 : catalog._id;
|
|
32787
|
+
var packageId = enricherPackage === null || enricherPackage === void 0 ? void 0 : enricherPackage._id;
|
|
32788
|
+
var isoLanguageIds = (catalog === null || catalog === void 0 ? void 0 : catalog.isoLanguageIds) || (enricherPackage === null || enricherPackage === void 0 ? void 0 : enricherPackage.isoLanguageIds);
|
|
32786
32789
|
var createTool = function createTool(tool) {
|
|
32787
32790
|
return _objectSpread$o({
|
|
32788
32791
|
startWidth: 600,
|
|
@@ -32831,23 +32834,27 @@ var useTools = function useTools(_ref) {
|
|
|
32831
32834
|
}, parameters),
|
|
32832
32835
|
elementProps: onlyPlaceholder ? {
|
|
32833
32836
|
onlyPlaceholder: true
|
|
32834
|
-
} : catalogId ? _objectSpread$o(_objectSpread$o({
|
|
32837
|
+
} : catalogId ? _objectSpread$o(_objectSpread$o(_objectSpread$o({
|
|
32835
32838
|
// open configurator for idm catalog
|
|
32836
32839
|
useIDMService: true,
|
|
32837
32840
|
catalogId: catalogId,
|
|
32838
32841
|
showCatalogSelection: true,
|
|
32839
32842
|
setSerie: setSerie,
|
|
32840
32843
|
setArticle: setArticle
|
|
32841
|
-
},
|
|
32844
|
+
}, isoLanguageIds ? {
|
|
32845
|
+
isoLanguageIds: isoLanguageIds
|
|
32846
|
+
} : {}), initItem ? {
|
|
32842
32847
|
initItem: initItem
|
|
32843
32848
|
} : {}), initSerie ? {
|
|
32844
32849
|
initSerie: initSerie
|
|
32845
|
-
} : {}) : isApi2 ? _objectSpread$o({
|
|
32850
|
+
} : {}) : isApi2 ? _objectSpread$o(_objectSpread$o({
|
|
32846
32851
|
// open configurator for api2 package (configurator light)
|
|
32847
32852
|
loadMask: true
|
|
32848
|
-
},
|
|
32853
|
+
}, isoLanguageIds ? {
|
|
32854
|
+
isoLanguageIds: isoLanguageIds
|
|
32855
|
+
} : {}), initItem ? {
|
|
32849
32856
|
initItem: initItem
|
|
32850
|
-
} : {}) : _objectSpread$o(_objectSpread$o({
|
|
32857
|
+
} : {}) : _objectSpread$o(_objectSpread$o(_objectSpread$o({
|
|
32851
32858
|
// open configurator for idm package
|
|
32852
32859
|
useEnricherService: true,
|
|
32853
32860
|
loadPackage: true,
|
|
@@ -32855,7 +32862,9 @@ var useTools = function useTools(_ref) {
|
|
|
32855
32862
|
showCatalogSelection: true,
|
|
32856
32863
|
setSerie: setSerie,
|
|
32857
32864
|
setArticle: setArticle
|
|
32858
|
-
},
|
|
32865
|
+
}, isoLanguageIds ? {
|
|
32866
|
+
isoLanguageIds: isoLanguageIds
|
|
32867
|
+
} : {}), initItem ? {
|
|
32859
32868
|
initItem: initItem
|
|
32860
32869
|
} : {}), initSerie ? {
|
|
32861
32870
|
initSerie: initSerie
|
|
@@ -32941,7 +32950,7 @@ var TableGroups = observer(function () {
|
|
|
32941
32950
|
selectedPackage = _useModule.selectedPackage,
|
|
32942
32951
|
viewOnly = _useModule.viewOnly;
|
|
32943
32952
|
useTools({
|
|
32944
|
-
|
|
32953
|
+
enricherPackage: selectedPackage,
|
|
32945
32954
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
32946
32955
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
32947
32956
|
});
|
|
@@ -33608,6 +33617,7 @@ var TablePackages = observer(function () {
|
|
|
33608
33617
|
setSelectedPackage = _useEnricherContext.setSelectedPackage,
|
|
33609
33618
|
selectedPackage = _useEnricherContext.selectedPackage;
|
|
33610
33619
|
useTools({
|
|
33620
|
+
enricherPackage: selectedPackage,
|
|
33611
33621
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
33612
33622
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
33613
33623
|
});
|
|
@@ -33965,7 +33975,7 @@ var TableProperties = observer(function () {
|
|
|
33965
33975
|
selectedPackage = _useModule.selectedPackage,
|
|
33966
33976
|
viewOnly = _useModule.viewOnly;
|
|
33967
33977
|
useTools({
|
|
33968
|
-
|
|
33978
|
+
enricherPackage: selectedPackage,
|
|
33969
33979
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
33970
33980
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
33971
33981
|
});
|
|
@@ -34820,7 +34830,7 @@ var RenamingTable = observer(function (_ref) {
|
|
|
34820
34830
|
setSelectedSerie = _useModule.setSelectedSerie,
|
|
34821
34831
|
viewOnly = _useModule.viewOnly;
|
|
34822
34832
|
var _useTools = useTools({
|
|
34823
|
-
|
|
34833
|
+
enricherPackage: selectedPackage,
|
|
34824
34834
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
34825
34835
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
|
|
34826
34836
|
setArticle: setSelectedItem,
|
|
@@ -35422,7 +35432,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
35422
35432
|
selectedItem = _useModule.selectedItem,
|
|
35423
35433
|
viewOnly = _useModule.viewOnly;
|
|
35424
35434
|
var _useTools = useTools({
|
|
35425
|
-
|
|
35435
|
+
enricherPackage: selectedPackage,
|
|
35426
35436
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
35427
35437
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder,
|
|
35428
35438
|
setArticle: setSelectedItem,
|
|
@@ -35558,7 +35568,7 @@ var TableTabGroups = observer(function () {
|
|
|
35558
35568
|
selectedPackage = _useModule.selectedPackage,
|
|
35559
35569
|
viewOnly = _useModule.viewOnly;
|
|
35560
35570
|
useTools({
|
|
35561
|
-
|
|
35571
|
+
enricherPackage: selectedPackage,
|
|
35562
35572
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
35563
35573
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
35564
35574
|
});
|
|
@@ -35664,7 +35674,7 @@ var TablePartlistPos = observer(function () {
|
|
|
35664
35674
|
selectedPackage = _useModule.selectedPackage,
|
|
35665
35675
|
viewOnly = _useModule.viewOnly;
|
|
35666
35676
|
useTools({
|
|
35667
|
-
|
|
35677
|
+
enricherPackage: selectedPackage,
|
|
35668
35678
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
35669
35679
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
35670
35680
|
});
|
|
@@ -37136,7 +37146,7 @@ var TablePriceList = observer(function () {
|
|
|
37136
37146
|
selectedNodeId = _React$useState4[0],
|
|
37137
37147
|
setSelectedNodeId = _React$useState4[1];
|
|
37138
37148
|
useTools({
|
|
37139
|
-
|
|
37149
|
+
enricherPackage: selectedPackage,
|
|
37140
37150
|
isApi2: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.isApi,
|
|
37141
37151
|
onlyPlaceholder: selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.onlyPlaceholder
|
|
37142
37152
|
});
|
|
@@ -40189,7 +40199,7 @@ var TableItems = observer(function () {
|
|
|
40189
40199
|
apiConfig = _useModule.apiConfig,
|
|
40190
40200
|
organizationId = _useModule.organizationId;
|
|
40191
40201
|
useTools({
|
|
40192
|
-
|
|
40202
|
+
catalog: selectedCatalog,
|
|
40193
40203
|
serie: selectedSerie,
|
|
40194
40204
|
setSerie: setSelectedSerie,
|
|
40195
40205
|
setArticle: setSelectedItem,
|
|
@@ -40274,7 +40284,7 @@ var TableSeries = observer(function () {
|
|
|
40274
40284
|
setSelectedSerie = _React$useState2[1];
|
|
40275
40285
|
useTools({
|
|
40276
40286
|
mainInformationWindowCodex: 'IDM_SERIES_TABLE_INFO',
|
|
40277
|
-
|
|
40287
|
+
catalog: selectedCatalog,
|
|
40278
40288
|
serie: selectedGlobalSerie,
|
|
40279
40289
|
setSerie: setGlobalSelectedSerie,
|
|
40280
40290
|
conditionalTools: [{
|
|
@@ -40284,7 +40294,7 @@ var TableSeries = observer(function () {
|
|
|
40284
40294
|
elementProps: {
|
|
40285
40295
|
organizationId: organizationId,
|
|
40286
40296
|
selectedCatalog: selectedCatalog,
|
|
40287
|
-
selectedSerie: selectedSerie
|
|
40297
|
+
selectedSerie: selectedSerie,
|
|
40288
40298
|
apiConfig: apiConfig
|
|
40289
40299
|
},
|
|
40290
40300
|
condition: function condition() {
|
|
@@ -40743,7 +40753,7 @@ var TableFeatures$2 = observer(function () {
|
|
|
40743
40753
|
setSelectedSerie = _useModule.setSelectedSerie,
|
|
40744
40754
|
setSelectedItem = _useModule.setSelectedItem;
|
|
40745
40755
|
var _useTools = useTools({
|
|
40746
|
-
|
|
40756
|
+
catalog: selectedCatalog,
|
|
40747
40757
|
setSerie: setSelectedSerie,
|
|
40748
40758
|
setArticle: setSelectedItem,
|
|
40749
40759
|
conditionalTools: [{
|
|
@@ -41018,7 +41028,7 @@ var TableOptions$1 = observer(function () {
|
|
|
41018
41028
|
setSelectedSerie = _useModule.setSelectedSerie,
|
|
41019
41029
|
setSelectedItem = _useModule.setSelectedItem;
|
|
41020
41030
|
var _useTools = useTools({
|
|
41021
|
-
|
|
41031
|
+
catalog: selectedCatalog,
|
|
41022
41032
|
setSerie: setSelectedSerie,
|
|
41023
41033
|
setArticle: setSelectedItem
|
|
41024
41034
|
}),
|
|
@@ -41100,7 +41110,7 @@ var TableFeatureClasses = observer(function () {
|
|
|
41100
41110
|
selectedFeatureClass = _React$useState2[0],
|
|
41101
41111
|
setSelectedFeatureClass = _React$useState2[1];
|
|
41102
41112
|
useTools({
|
|
41103
|
-
|
|
41113
|
+
catalog: selectedCatalog,
|
|
41104
41114
|
setSerie: setSelectedSerie,
|
|
41105
41115
|
setArticle: setSelectedItem,
|
|
41106
41116
|
conditionalTools: [{
|
|
@@ -41916,7 +41926,7 @@ var TableDecisions = observer(function () {
|
|
|
41916
41926
|
spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
|
|
41917
41927
|
}, [selectedNodeId]);
|
|
41918
41928
|
useTools({
|
|
41919
|
-
|
|
41929
|
+
catalog: selectedCatalog,
|
|
41920
41930
|
setSerie: setSelectedSerie,
|
|
41921
41931
|
setArticle: setSelectedItem,
|
|
41922
41932
|
conditionalTools: [{
|
|
@@ -42129,7 +42139,7 @@ var TableDetailInfos = observer(function () {
|
|
|
42129
42139
|
selectedMedia = _React$useState2[0],
|
|
42130
42140
|
setSelectedMedia = _React$useState2[1];
|
|
42131
42141
|
useTools({
|
|
42132
|
-
|
|
42142
|
+
catalog: selectedCatalog,
|
|
42133
42143
|
setSerie: setSelectedSerie,
|
|
42134
42144
|
setArticle: setSelectedItem,
|
|
42135
42145
|
conditionalTools: [{
|
|
@@ -42558,7 +42568,7 @@ var TablePartlists = observer(function () {
|
|
|
42558
42568
|
selectedPartlist = _React$useState2[0],
|
|
42559
42569
|
setSelectedPartlist = _React$useState2[1];
|
|
42560
42570
|
useTools({
|
|
42561
|
-
|
|
42571
|
+
catalog: selectedCatalog,
|
|
42562
42572
|
setSerie: setSelectedSerie,
|
|
42563
42573
|
setArticle: setSelectedItem,
|
|
42564
42574
|
conditionalTools: [{
|
|
@@ -43100,7 +43110,7 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
43100
43110
|
return (_spreadsheetRef$curre = spreadsheetRef.current) === null || _spreadsheetRef$curre === void 0 ? void 0 : _spreadsheetRef$curre.setNodeDataValue(selectedNodeId, data);
|
|
43101
43111
|
}, [selectedNodeId]);
|
|
43102
43112
|
useTools({
|
|
43103
|
-
|
|
43113
|
+
catalog: selectedCatalog,
|
|
43104
43114
|
setSerie: setSelectedSerie,
|
|
43105
43115
|
setArticle: setSelectedItem,
|
|
43106
43116
|
conditionalTools: [{
|
|
@@ -43296,7 +43306,7 @@ var TablePrices = observer(function () {
|
|
|
43296
43306
|
apiConfig = _useModule.apiConfig,
|
|
43297
43307
|
organizationId = _useModule.organizationId;
|
|
43298
43308
|
useTools({
|
|
43299
|
-
|
|
43309
|
+
catalog: selectedCatalog,
|
|
43300
43310
|
serie: selectedSerie,
|
|
43301
43311
|
setSerie: setSelectedSerie,
|
|
43302
43312
|
setArticle: setSelectedItem,
|
|
@@ -43519,7 +43529,7 @@ var TableOptionGroups = observer(function () {
|
|
|
43519
43529
|
selectedOptionGroup = _React$useState2[0],
|
|
43520
43530
|
setSelectedOptionGroup = _React$useState2[1];
|
|
43521
43531
|
useTools({
|
|
43522
|
-
|
|
43532
|
+
catalog: selectedCatalog,
|
|
43523
43533
|
setSerie: setSelectedSerie,
|
|
43524
43534
|
setArticle: setSelectedItem,
|
|
43525
43535
|
conditionalTools: [{
|
|
@@ -44046,7 +44056,9 @@ function Features(_ref) {
|
|
|
44046
44056
|
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
44047
44057
|
required: true,
|
|
44048
44058
|
unique: true
|
|
44049
|
-
}, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.
|
|
44059
|
+
}, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', ((_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 || (_root$dataStore$curre = _root$dataStore$curre.settings.languages) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.map(function (value) {
|
|
44060
|
+
return value.toUpperCase();
|
|
44061
|
+
})) || ['DE'], true), {
|
|
44050
44062
|
field: 'sequenceNo',
|
|
44051
44063
|
headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
|
|
44052
44064
|
required: true,
|
|
@@ -44167,7 +44179,9 @@ function Options(_ref) {
|
|
|
44167
44179
|
var root = useStore();
|
|
44168
44180
|
var apiConfig = root.configurationStore.apiConfig;
|
|
44169
44181
|
var organizationId = root.dataStore.organizationId;
|
|
44170
|
-
var languages = (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.
|
|
44182
|
+
var languages = ((_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 || (_root$dataStore$curre = _root$dataStore$curre.settings.languages) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.map(function (value) {
|
|
44183
|
+
return value.toUpperCase();
|
|
44184
|
+
})) || ['DE'];
|
|
44171
44185
|
var applicationData = useMemo(function () {
|
|
44172
44186
|
return {
|
|
44173
44187
|
organizationId: organizationId
|
|
@@ -45438,12 +45452,14 @@ styleInject(css_248z$5);
|
|
|
45438
45452
|
|
|
45439
45453
|
var wrapper$2 = "wrapper-Q13-g";
|
|
45440
45454
|
var confContainer = "conf-container-Sm5LL";
|
|
45441
|
-
var
|
|
45455
|
+
var languageWrapper = "language-wrapper-43xln";
|
|
45456
|
+
var languageSelect = "language-select-03fGC";
|
|
45457
|
+
var css_248z$4 = ".wrapper-Q13-g {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.conf-container-Sm5LL {\n padding-top: 10px;\n background: white;\n color: black;\n height: calc(100% - 40px);\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n position: relative;\n overflow: hidden;\n}\n\n.darkmode .conf-container-Sm5LL {\n border-color: #424242;\n}\n\n.language-wrapper-43xln {\n display: flex;\n gap: 16px;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.language-select-03fGC {\n z-index: 1000;\n flex: 1;\n max-width: calc(100% - 48px);\n}\n";
|
|
45442
45458
|
styleInject(css_248z$4);
|
|
45443
45459
|
|
|
45444
45460
|
var wrapper$1 = "wrapper-IcNC5";
|
|
45445
45461
|
var select$1 = "select-jVMz-";
|
|
45446
|
-
var css_248z$3 = ".wrapper-IcNC5 {\n display: flex;\n gap: 16px;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.select-jVMz- {\n z-index: 1000;\n flex: 1;\n max-width: 100% - 48px;\n}\n";
|
|
45462
|
+
var css_248z$3 = ".wrapper-IcNC5 {\n display: flex;\n gap: 16px;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.select-jVMz- {\n z-index: 1000;\n flex: 1;\n max-width: calc(100% - 48px);\n}\n";
|
|
45447
45463
|
styleInject(css_248z$3);
|
|
45448
45464
|
|
|
45449
45465
|
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -45453,8 +45469,8 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
|
45453
45469
|
itemList = _ref$state.itemList,
|
|
45454
45470
|
articleCodex = _ref$state.articleCodex,
|
|
45455
45471
|
setArticleCodex = _ref$state.setArticleCodex,
|
|
45456
|
-
setDoReset = _ref$state.setDoReset,
|
|
45457
45472
|
mask = _ref$state.mask,
|
|
45473
|
+
serie = _ref$state.serie,
|
|
45458
45474
|
setArticle = _ref.setArticle;
|
|
45459
45475
|
var _useTranslation = useTranslation(),
|
|
45460
45476
|
t = _useTranslation.t;
|
|
@@ -45505,6 +45521,7 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
|
45505
45521
|
return /*#__PURE__*/jsxs("div", {
|
|
45506
45522
|
className: wrapper$1,
|
|
45507
45523
|
children: [/*#__PURE__*/jsx(Select$1, {
|
|
45524
|
+
disabled: !(serie !== null && serie !== void 0 && serie.catalogCodex),
|
|
45508
45525
|
placeholder: t('backoffice.configurator.article.placeholder'),
|
|
45509
45526
|
value: articleCodex,
|
|
45510
45527
|
options: groupedArticles,
|
|
@@ -45513,17 +45530,15 @@ var ArticleSelection = function ArticleSelection(_ref) {
|
|
|
45513
45530
|
setArticle === null || setArticle === void 0 || setArticle(value);
|
|
45514
45531
|
},
|
|
45515
45532
|
className: select$1
|
|
45516
|
-
}),
|
|
45517
|
-
|
|
45518
|
-
|
|
45519
|
-
|
|
45520
|
-
|
|
45521
|
-
|
|
45522
|
-
|
|
45523
|
-
|
|
45524
|
-
|
|
45525
|
-
return setDoReset(true);
|
|
45526
|
-
}
|
|
45533
|
+
}), /*#__PURE__*/jsx(Tooltip$1, {
|
|
45534
|
+
title: !showPartlistFilter ? t('configuration.nopartlist') : t(filterPartlist ? 'configuration.hidepartlist' : 'configuration.showpartlist'),
|
|
45535
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
45536
|
+
icon: filterPartlist ? /*#__PURE__*/jsx(DatabaseOutlined$1, {}) : /*#__PURE__*/jsx(DatabaseFilled, {}),
|
|
45537
|
+
onClick: function onClick() {
|
|
45538
|
+
return setFilterPartlist(!filterPartlist);
|
|
45539
|
+
},
|
|
45540
|
+
disabled: !showPartlistFilter
|
|
45541
|
+
})
|
|
45527
45542
|
})]
|
|
45528
45543
|
});
|
|
45529
45544
|
};
|
|
@@ -45532,7 +45547,7 @@ var ArticleSelection$1 = observer(ArticleSelection);
|
|
|
45532
45547
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
45533
45548
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
45534
45549
|
function useWysiwyg$1(_ref) {
|
|
45535
|
-
var _tool$parameters, _tool$
|
|
45550
|
+
var _tool$parameters, _tool$elementProps, _tool$elementProps6;
|
|
45536
45551
|
var tool = _ref.tool,
|
|
45537
45552
|
toolbar = _ref.toolbar;
|
|
45538
45553
|
var _useDivaCore = useDivaCore(),
|
|
@@ -45588,18 +45603,30 @@ function useWysiwyg$1(_ref) {
|
|
|
45588
45603
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
45589
45604
|
serieList = _useState22[0],
|
|
45590
45605
|
setSerieList = _useState22[1];
|
|
45591
|
-
var
|
|
45606
|
+
var availableLanguages = ((_tool$elementProps = tool.elementProps) === null || _tool$elementProps === void 0 ? void 0 : _tool$elementProps.isoLanguageIds) || ['DE'];
|
|
45607
|
+
var _useState23 = useState(function () {
|
|
45608
|
+
var _root$i18n$language;
|
|
45609
|
+
var initialLanguage = ((_root$i18n$language = root.i18n.language) === null || _root$i18n$language === void 0 ? void 0 : _root$i18n$language.toUpperCase()) || 'DE';
|
|
45610
|
+
if (!availableLanguages.includes(initialLanguage)) {
|
|
45611
|
+
initialLanguage = availableLanguages[0];
|
|
45612
|
+
}
|
|
45613
|
+
return initialLanguage;
|
|
45614
|
+
}),
|
|
45592
45615
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
45593
|
-
|
|
45594
|
-
|
|
45595
|
-
var _useState25 = useState(),
|
|
45616
|
+
language = _useState24[0],
|
|
45617
|
+
setLanguage = _useState24[1];
|
|
45618
|
+
var _useState25 = useState(tool.parameters.catalogId),
|
|
45596
45619
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
45597
|
-
|
|
45598
|
-
|
|
45620
|
+
catalogId = _useState26[0],
|
|
45621
|
+
setCatalogId = _useState26[1];
|
|
45599
45622
|
var _useState27 = useState(),
|
|
45600
45623
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
45601
|
-
|
|
45602
|
-
|
|
45624
|
+
currentNav = _useState28[0],
|
|
45625
|
+
setCurrentNav = _useState28[1];
|
|
45626
|
+
var _useState29 = useState(),
|
|
45627
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
45628
|
+
doNavigate = _useState30[0],
|
|
45629
|
+
setDoNavigate = _useState30[1];
|
|
45603
45630
|
useEffect(function () {
|
|
45604
45631
|
if (!toolbar.hidden) setDoReset(true);
|
|
45605
45632
|
}, [toolbar.hidden]);
|
|
@@ -45727,14 +45754,14 @@ function useWysiwyg$1(_ref) {
|
|
|
45727
45754
|
};
|
|
45728
45755
|
}();
|
|
45729
45756
|
useEffect(function () {
|
|
45730
|
-
var _tool$
|
|
45731
|
-
if ((_tool$
|
|
45757
|
+
var _tool$elementProps2;
|
|
45758
|
+
if ((_tool$elementProps2 = tool.elementProps) !== null && _tool$elementProps2 !== void 0 && _tool$elementProps2.onlyPlaceholder) return;
|
|
45732
45759
|
if (doReset) {
|
|
45733
|
-
var _tool$
|
|
45760
|
+
var _tool$elementProps3, _tool$elementProps5;
|
|
45734
45761
|
if (currentNav) setDoNavigate(currentNav);
|
|
45735
|
-
if ((_tool$
|
|
45736
|
-
var _tool$
|
|
45737
|
-
if ((_tool$
|
|
45762
|
+
if ((_tool$elementProps3 = tool.elementProps) !== null && _tool$elementProps3 !== void 0 && _tool$elementProps3.showCatalogSelection && !serieList.length) {
|
|
45763
|
+
var _tool$elementProps4;
|
|
45764
|
+
if ((_tool$elementProps4 = tool.elementProps) !== null && _tool$elementProps4 !== void 0 && _tool$elementProps4.loadPackage) {
|
|
45738
45765
|
setLoadingPackage(true);
|
|
45739
45766
|
loadPackage(tool.parameters.packageId).then(function () {
|
|
45740
45767
|
return setLoadingPackage(false);
|
|
@@ -45746,7 +45773,7 @@ function useWysiwyg$1(_ref) {
|
|
|
45746
45773
|
});
|
|
45747
45774
|
}
|
|
45748
45775
|
}
|
|
45749
|
-
if ((_tool$
|
|
45776
|
+
if ((_tool$elementProps5 = tool.elementProps) !== null && _tool$elementProps5 !== void 0 && _tool$elementProps5.loadMask) {
|
|
45750
45777
|
setLoadingMask(true);
|
|
45751
45778
|
loadMask(tool.parameters.packageId).then(function () {
|
|
45752
45779
|
setLoadingMask(false);
|
|
@@ -45756,7 +45783,7 @@ function useWysiwyg$1(_ref) {
|
|
|
45756
45783
|
setDoReset(false);
|
|
45757
45784
|
}
|
|
45758
45785
|
}
|
|
45759
|
-
}, [doReset, (_tool$
|
|
45786
|
+
}, [doReset, (_tool$elementProps6 = tool.elementProps) === null || _tool$elementProps6 === void 0 ? void 0 : _tool$elementProps6.onlyPlaceholder]);
|
|
45760
45787
|
useEffect(function () {
|
|
45761
45788
|
setArticleCodex(undefined);
|
|
45762
45789
|
if (serie !== null && serie !== void 0 && serie.catalogCodex) {
|
|
@@ -45818,9 +45845,9 @@ function useWysiwyg$1(_ref) {
|
|
|
45818
45845
|
};
|
|
45819
45846
|
}, [articleCodex]);
|
|
45820
45847
|
var settings = useMemo(function () {
|
|
45821
|
-
var _tool$
|
|
45848
|
+
var _tool$elementProps7, _tool$elementProps8, _tool$elementProps9;
|
|
45822
45849
|
return {
|
|
45823
|
-
language:
|
|
45850
|
+
language: language,
|
|
45824
45851
|
showSelectionModeZero: true,
|
|
45825
45852
|
dontLoadAdditionalModelInfos: true,
|
|
45826
45853
|
onErrorHandling: {
|
|
@@ -45874,9 +45901,9 @@ function useWysiwyg$1(_ref) {
|
|
|
45874
45901
|
tooltipPosition: 'left-center',
|
|
45875
45902
|
clientEvents: ['onWebPlanerConfigChange', 'onArticlesLoaded']
|
|
45876
45903
|
},
|
|
45877
|
-
useIDMService: (_tool$
|
|
45878
|
-
useEnricherService: (_tool$
|
|
45879
|
-
useMask: (_tool$
|
|
45904
|
+
useIDMService: (_tool$elementProps7 = tool.elementProps) === null || _tool$elementProps7 === void 0 ? void 0 : _tool$elementProps7.useIDMService,
|
|
45905
|
+
useEnricherService: (_tool$elementProps8 = tool.elementProps) === null || _tool$elementProps8 === void 0 ? void 0 : _tool$elementProps8.useEnricherService,
|
|
45906
|
+
useMask: (_tool$elementProps9 = tool.elementProps) === null || _tool$elementProps9 === void 0 ? void 0 : _tool$elementProps9.loadMask,
|
|
45880
45907
|
templateConfig: {
|
|
45881
45908
|
Layout: 'wysiwyg',
|
|
45882
45909
|
NavigationButton: 'standard',
|
|
@@ -45896,7 +45923,7 @@ function useWysiwyg$1(_ref) {
|
|
|
45896
45923
|
ProductHeaderFunction: 'standard'
|
|
45897
45924
|
}
|
|
45898
45925
|
};
|
|
45899
|
-
}, []);
|
|
45926
|
+
}, [language]);
|
|
45900
45927
|
useEffect(function () {
|
|
45901
45928
|
if (isLoadingPackage) {
|
|
45902
45929
|
setLoadingText(t('backoffice.wysiwyg.configurator.loading.package'));
|
|
@@ -45904,12 +45931,17 @@ function useWysiwyg$1(_ref) {
|
|
|
45904
45931
|
setLoadingText(t('backoffice.wysiwyg.configurator.loading.catalog'));
|
|
45905
45932
|
} else if (isLoadingMask) {
|
|
45906
45933
|
setLoadingText(t('backoffice.wysiwyg.configurator.loading.mask'));
|
|
45907
|
-
} else if (isLoadingArticles) {
|
|
45934
|
+
} else if (isLoadingArticles && serie !== null && serie !== void 0 && serie.catalogCodex) {
|
|
45935
|
+
// Only show article-loading text once a serie is selected
|
|
45908
45936
|
setLoadingText(t('backoffice.wysiwyg.configurator.loading.articles'));
|
|
45909
45937
|
} else {
|
|
45910
45938
|
setLoadingText(undefined);
|
|
45911
45939
|
}
|
|
45912
|
-
}, [isLoadingPackage, isLoadingCatalog, isLoadingMask, isLoadingArticles]);
|
|
45940
|
+
}, [isLoadingPackage, isLoadingCatalog, isLoadingMask, isLoadingArticles, serie === null || serie === void 0 ? void 0 : serie.catalogCodex]);
|
|
45941
|
+
var onSetLanguage = function onSetLanguage(lang) {
|
|
45942
|
+
setLanguage(lang);
|
|
45943
|
+
setDoReset(true);
|
|
45944
|
+
};
|
|
45913
45945
|
return {
|
|
45914
45946
|
itemList: itemList,
|
|
45915
45947
|
setItemList: setItemList,
|
|
@@ -45926,7 +45958,10 @@ function useWysiwyg$1(_ref) {
|
|
|
45926
45958
|
doNavigate: doNavigate,
|
|
45927
45959
|
setDoNavigate: setDoNavigate,
|
|
45928
45960
|
catalogId: catalogId,
|
|
45929
|
-
loadingText: loadingText
|
|
45961
|
+
loadingText: loadingText,
|
|
45962
|
+
language: language,
|
|
45963
|
+
setLanguage: onSetLanguage,
|
|
45964
|
+
availableLanguages: availableLanguages
|
|
45930
45965
|
};
|
|
45931
45966
|
}
|
|
45932
45967
|
|
|
@@ -46026,7 +46061,7 @@ var CatalogSelection$1 = observer(CatalogSelection);
|
|
|
46026
46061
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
46027
46062
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
46028
46063
|
var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
46029
|
-
var _state$serie, _tool$parameters, _state$articleCodex, _state$serie$catalogC, _state$
|
|
46064
|
+
var _state$serie, _state$serie2, _state$serie3, _state$serie4, _tool$parameters, _state$articleCodex, _state$serie$catalogC, _state$serie5, _state$mask2, _state$serie6, _state$serie$accountI, _state$serie7, _state$mask3;
|
|
46030
46065
|
var tool = _ref.tool,
|
|
46031
46066
|
toolbar = _ref.toolbar;
|
|
46032
46067
|
var _useDivaCore = useDivaCore(),
|
|
@@ -46071,14 +46106,6 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
46071
46106
|
state.setArticleCodex(tool.elementProps.initItem);
|
|
46072
46107
|
}
|
|
46073
46108
|
}, [tool.elementProps.initItem, tool.elementProps.initSerie, state.serieList]);
|
|
46074
|
-
if (!((_state$serie = state.serie) !== null && _state$serie !== void 0 && _state$serie.catalogCodex)) {
|
|
46075
|
-
if (tool.elementProps.showCatalogSelection) {
|
|
46076
|
-
return /*#__PURE__*/jsx(CatalogSelection$1, {
|
|
46077
|
-
state: state,
|
|
46078
|
-
setSerie: tool.elementProps.setSerie
|
|
46079
|
-
});
|
|
46080
|
-
}
|
|
46081
|
-
}
|
|
46082
46109
|
if (tool.elementProps.onlyPlaceholder) {
|
|
46083
46110
|
return /*#__PURE__*/jsx("div", {});
|
|
46084
46111
|
}
|
|
@@ -46092,13 +46119,37 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
46092
46119
|
errorCode: "BACKO_0004",
|
|
46093
46120
|
children: /*#__PURE__*/jsxs("div", {
|
|
46094
46121
|
className: wrapper$2,
|
|
46095
|
-
children: [
|
|
46096
|
-
|
|
46097
|
-
|
|
46098
|
-
|
|
46099
|
-
|
|
46100
|
-
|
|
46101
|
-
|
|
46122
|
+
children: [!!tool.elementProps.showCatalogSelection && /*#__PURE__*/jsx(CatalogSelection$1, {
|
|
46123
|
+
state: state,
|
|
46124
|
+
setSerie: tool.elementProps.setSerie
|
|
46125
|
+
}), ((_state$serie = state.serie) === null || _state$serie === void 0 ? void 0 : _state$serie.catalogCodex) && /*#__PURE__*/jsx(ArticleSelection$1, {
|
|
46126
|
+
state: state,
|
|
46127
|
+
setArticle: tool.elementProps.setArticle
|
|
46128
|
+
}), ((_state$serie2 = state.serie) === null || _state$serie2 === void 0 ? void 0 : _state$serie2.catalogCodex) && /*#__PURE__*/jsxs("div", {
|
|
46129
|
+
className: languageWrapper,
|
|
46130
|
+
children: [/*#__PURE__*/jsx(Select$1, {
|
|
46131
|
+
className: languageSelect,
|
|
46132
|
+
disabled: !((_state$serie3 = state.serie) !== null && _state$serie3 !== void 0 && _state$serie3.catalogCodex),
|
|
46133
|
+
placeholder: t('backoffice.configurator.language.placeholder'),
|
|
46134
|
+
value: state.language,
|
|
46135
|
+
options: state.availableLanguages.map(function (lang) {
|
|
46136
|
+
return {
|
|
46137
|
+
label: t('language.' + lang.toLowerCase()),
|
|
46138
|
+
value: lang
|
|
46139
|
+
};
|
|
46140
|
+
}),
|
|
46141
|
+
onChange: function onChange(value) {
|
|
46142
|
+
return state.setLanguage(value);
|
|
46143
|
+
}
|
|
46144
|
+
}), /*#__PURE__*/jsx(Tooltip$1, {
|
|
46145
|
+
title: t('backoffice.configurator.language.reload'),
|
|
46146
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
46147
|
+
icon: /*#__PURE__*/jsx(ReloadOutlined$1, {}),
|
|
46148
|
+
onClick: function onClick() {
|
|
46149
|
+
return state.setDoReset(true);
|
|
46150
|
+
},
|
|
46151
|
+
disabled: !((_state$serie4 = state.serie) !== null && _state$serie4 !== void 0 && _state$serie4.catalogCodex)
|
|
46152
|
+
})
|
|
46102
46153
|
})]
|
|
46103
46154
|
}), state.loadingText && /*#__PURE__*/jsx("div", {
|
|
46104
46155
|
children: state.loadingText
|
|
@@ -46116,17 +46167,18 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
46116
46167
|
resetArticle: '',
|
|
46117
46168
|
disableToggle: '1',
|
|
46118
46169
|
startDivaNr: 'DIVA-000000',
|
|
46119
|
-
catalogCodex: (_state$serie$catalogC = (_state$
|
|
46120
|
-
}, (_state$
|
|
46170
|
+
catalogCodex: (_state$serie$catalogC = (_state$serie5 = state.serie) === null || _state$serie5 === void 0 ? void 0 : _state$serie5.catalogCodex) !== null && _state$serie$catalogC !== void 0 ? _state$serie$catalogC : (_state$mask2 = state.mask) === null || _state$mask2 === void 0 ? void 0 : _state$mask2.catalogCodex
|
|
46171
|
+
}, (_state$serie6 = state.serie) !== null && _state$serie6 !== void 0 && _state$serie6.serieId ? {
|
|
46121
46172
|
serieId: state.serie.serieId
|
|
46122
46173
|
} : {}), {}, {
|
|
46123
|
-
accountGuid: (_state$serie$accountI = (_state$
|
|
46174
|
+
accountGuid: (_state$serie$accountI = (_state$serie7 = state.serie) === null || _state$serie7 === void 0 ? void 0 : _state$serie7.accountId) !== null && _state$serie$accountI !== void 0 ? _state$serie$accountI : (_state$mask3 = state.mask) === null || _state$mask3 === void 0 ? void 0 : _state$mask3.accountId,
|
|
46124
46175
|
returnTo: 'DONT_SAVE_BASKET',
|
|
46125
46176
|
organizationId: organizationId,
|
|
46126
46177
|
no3DConnection: 'true'
|
|
46127
46178
|
}),
|
|
46128
46179
|
internal: {
|
|
46129
46180
|
catalogMask: state.mask,
|
|
46181
|
+
language: state.language,
|
|
46130
46182
|
actions: {
|
|
46131
46183
|
toggleLoading: function toggleLoading(subId, _, toggle) {
|
|
46132
46184
|
return toolbar.toggleLoading(tool.id, subId, toggle);
|
|
@@ -12,7 +12,7 @@ type Props = {
|
|
|
12
12
|
state: WysiwygState;
|
|
13
13
|
setArticle?: (article: any) => void;
|
|
14
14
|
};
|
|
15
|
-
declare const _default: (({ state: { itemList, articleCodex, setArticleCodex,
|
|
15
|
+
declare const _default: (({ state: { itemList, articleCodex, setArticleCodex, mask, serie }, setArticle }: Props) => React.JSX.Element) & {
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKzD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AACD,KAAK,KAAK,GAAG;IAAE,KAAK,EAAE,YAAY,CAAC;IAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKzD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AACD,KAAK,KAAK,GAAG;IAAE,KAAK,EAAE,YAAY,CAAC;IAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAA;CAAE,CAAC;2GAEiC,KAAK;;;AAqDhH,wBAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAMtD,QAAA,MAAM,OAAO,sBAAuB,SAAS,sBAuG5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { CatalogMask, Configuration } from '@crystaldesign/web-planner-logic';
|
|
1
|
+
import { CatalogMask, Configuration, Langs } from '@crystaldesign/web-planner-logic';
|
|
2
2
|
import { ToolProps } from '../../../Navigation/types';
|
|
3
3
|
export interface WysiwygState {
|
|
4
4
|
itemList: Article[];
|
|
5
5
|
setItemList: (a: Article[]) => void;
|
|
6
6
|
articleCodex: string | undefined;
|
|
7
7
|
setArticleCodex: (a: string | undefined) => void;
|
|
8
|
+
language: Langs;
|
|
9
|
+
setLanguage: (lang: Langs) => void;
|
|
10
|
+
availableLanguages: Langs[];
|
|
8
11
|
serieList: Catalog[];
|
|
9
12
|
setSerieList: (a: Catalog[]) => void;
|
|
10
13
|
serie: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWysiwygConfigurator.d.ts","sourceRoot":"","sources":["../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"useWysiwygConfigurator.d.ts","sourceRoot":"","sources":["../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAGrF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC;IAChB,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;IACnC,kBAAkB,EAAE,KAAK,EAAE,CAAC;IAC5B,SAAS,EAAE,OAAO,EAAE,CAAC;IACrB,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAClF,QAAQ,EAAE,CAAC,CAAC,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAClG,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AACD,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS,GAAG,YAAY,CAkU7E"}
|
|
@@ -2,14 +2,24 @@ import { Tool } from '../../layout/Navigation/types';
|
|
|
2
2
|
export type ConditionalTool = Tool & {
|
|
3
3
|
condition?: () => boolean;
|
|
4
4
|
};
|
|
5
|
+
export type Catalog = {
|
|
6
|
+
_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
isoLanguageIds: string[];
|
|
9
|
+
};
|
|
10
|
+
export type EnricherPackage = {
|
|
11
|
+
_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
isoLanguageIds: string[];
|
|
14
|
+
};
|
|
5
15
|
/**
|
|
6
16
|
* Props for the useTools hook
|
|
7
17
|
*/
|
|
8
18
|
export type UseToolsProps = {
|
|
9
|
-
/** Catalog
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
19
|
+
/** Catalog object for configurator tools */
|
|
20
|
+
catalog?: Catalog;
|
|
21
|
+
/** Enricher package object for configurator tools */
|
|
22
|
+
enricherPackage?: EnricherPackage;
|
|
13
23
|
/** Serie object for configurator tools */
|
|
14
24
|
serie?: any;
|
|
15
25
|
/** Item object with type number */
|
|
@@ -33,8 +43,8 @@ export type UseToolsProps = {
|
|
|
33
43
|
* Custom hook for managing tools and configurator functionality
|
|
34
44
|
*
|
|
35
45
|
* @param props - The hook props
|
|
36
|
-
* @param props.
|
|
37
|
-
* @param props.
|
|
46
|
+
* @param props.catalog - Catalog object for configurator tools
|
|
47
|
+
* @param props.enricherPackage - Enricher package object for configurator tools
|
|
38
48
|
* @param props.isApi2 - Whether to use API2 mode
|
|
39
49
|
* @param props.mainInformationWindowCodex - Main information window codex
|
|
40
50
|
* @param props.serie - Serie object for configurator tools
|
|
@@ -47,7 +57,7 @@ export type UseToolsProps = {
|
|
|
47
57
|
* @returns {Function} addSecondaryTables - Function to add secondary tables
|
|
48
58
|
* @returns {Function} removeSecondaryTables - Function to remove secondary tables
|
|
49
59
|
*/
|
|
50
|
-
export declare const useTools: ({
|
|
60
|
+
export declare const useTools: ({ catalog, enricherPackage, isApi2, onlyPlaceholder, mainInformationWindowCodex, serie, item, setSerie, setArticle, conditionalTools, }: UseToolsProps) => {
|
|
51
61
|
updateConfigurator: (parameters?: {
|
|
52
62
|
[key: string]: string;
|
|
53
63
|
}) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/CommonComponents/useTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG;IACnC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,
|
|
1
|
+
{"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/CommonComponents/useTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG;IACnC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qDAAqD;IACrD,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,mCAAmC;IACnC,IAAI,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sCAAsC;IACtC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oCAAoC;IACpC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,uBAAuB;IACvB,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,4IAWlB,aAAa;sCAuF0B;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;qCARzB,MAAM,QAAQ,OAAO;CAiD9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "25.14.0-beta.
|
|
3
|
+
"version": "25.14.0-beta.49",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@ant-design/icons": "5.4.0",
|
|
17
17
|
"@babel/runtime": "7.24.7",
|
|
18
|
-
"@crystaldesign/content-box": "25.14.0-beta.
|
|
19
|
-
"@crystaldesign/content-item": "25.14.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "25.14.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "25.14.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "25.14.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "25.14.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "25.14.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "25.14.0-beta.49",
|
|
19
|
+
"@crystaldesign/content-item": "25.14.0-beta.49",
|
|
20
|
+
"@crystaldesign/diva-core": "25.14.0-beta.49",
|
|
21
|
+
"@crystaldesign/diva-utils": "25.14.0-beta.49",
|
|
22
|
+
"@crystaldesign/media-upload": "25.14.0-beta.49",
|
|
23
|
+
"@crystaldesign/rtf-editor": "25.14.0-beta.49",
|
|
24
|
+
"@crystaldesign/spreadsheet": "25.14.0-beta.49",
|
|
25
25
|
"@google/model-viewer": "3.5.0",
|
|
26
26
|
"ag-charts-community": "^10.1.0",
|
|
27
27
|
"ag-charts-react": "^10.1.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"module": "build/esm/index.js",
|
|
53
53
|
"types": "./build/types/backoffice/src/index.d.ts",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "95d60504c9597fbc66fc14a46a697e9bb7475e93"
|
|
55
55
|
}
|