@crystaldesign/diva-seller 26.3.0-beta.30 → 26.3.0-beta.32
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
CHANGED
|
@@ -959,7 +959,7 @@ function _apiLoadCatalogInfoEnricher() {
|
|
|
959
959
|
while (1) switch (_context8.prev = _context8.next) {
|
|
960
960
|
case 0:
|
|
961
961
|
enricherUrl = _ref7.enricherUrl, serieNo = _ref7.serieNo, catalogId = _ref7.catalogId, language = _ref7.language, jwt = _ref7.jwt;
|
|
962
|
-
fullUrl = enricherUrl + '/live/v3.0/catalogs/' + catalogId + '/series' +
|
|
962
|
+
fullUrl = enricherUrl + '/live/v3.0/catalogs/' + catalogId + '/series/' + serieNo;
|
|
963
963
|
_context8.next = 4;
|
|
964
964
|
return fetch(fullUrl, {
|
|
965
965
|
headers: {
|
|
@@ -980,7 +980,7 @@ function _apiLoadCatalogInfoEnricher() {
|
|
|
980
980
|
}
|
|
981
981
|
throw new Error(response.Error);
|
|
982
982
|
case 7:
|
|
983
|
-
cat = response
|
|
983
|
+
cat = response;
|
|
984
984
|
if (cat) {
|
|
985
985
|
_context8.next = 10;
|
|
986
986
|
break;
|
|
@@ -1132,12 +1132,12 @@ function apiLoadEnricherArticles(_x13) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
function _apiLoadEnricherArticles() {
|
|
1134
1134
|
_apiLoadEnricherArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref9) {
|
|
1135
|
-
var
|
|
1135
|
+
var serieNo, catalogId, enricherUrl, jwt, language, t, fullUrl, response, articleList, i, _jsonArticle$widthBas, _jsonArticle$heightBa, _jsonArticle$depthBas, _jsonArticle$detailIn, jsonArticle;
|
|
1136
1136
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
1137
1137
|
while (1) switch (_context10.prev = _context10.next) {
|
|
1138
1138
|
case 0:
|
|
1139
|
-
|
|
1140
|
-
fullUrl = enricherUrl + '/live/v3.0/catalogs/' + catalogId + '/series/' +
|
|
1139
|
+
serieNo = _ref9.serieNo, catalogId = _ref9.catalogId, enricherUrl = _ref9.enricherUrl, jwt = _ref9.jwt, language = _ref9.language, t = _ref9.t;
|
|
1140
|
+
fullUrl = enricherUrl + '/live/v3.0/catalogs/' + catalogId + '/series/' + serieNo + '/items?fields=serieNo;itemIdentification;catalogPage;weightBrutto;weightNetto;volume;minimumDeliveryTime;widthBasicShapeNominalValue;widthBasicShapeFrom;widthBasicShapeTo;widthBasicShapeStepSize;heightBasicShapeNominalValue;heightBasicShapeFrom;heightBasicShapeTo;heightBasicShapeStepSize;depthBasicShapeNominalValue;depthBasicShapeFrom;depthBasicShapeTo;depthBasicShapeStepSize;typeKey;eClassNo;detailInfoRefs;detailInfos;partListExclusive;partListRef;decisionRefs;typeNo;sequenceNo;edpNumber;eanNumber;shortText;fullText;planningAdvice;salesNumber';
|
|
1141
1141
|
_context10.next = 4;
|
|
1142
1142
|
return fetch(fullUrl, {
|
|
1143
1143
|
headers: {
|
|
@@ -2683,7 +2683,7 @@ function useSellerStateData(_ref) {
|
|
|
2683
2683
|
enricherUrl: apiConfig.enricherService,
|
|
2684
2684
|
jwt: jwt,
|
|
2685
2685
|
language: i18n.language,
|
|
2686
|
-
|
|
2686
|
+
serieNo: (_catalog2 = catalog) === null || _catalog2 === void 0 ? void 0 : _catalog2.codex,
|
|
2687
2687
|
t: t
|
|
2688
2688
|
});
|
|
2689
2689
|
case 45:
|
|
@@ -8959,6 +8959,7 @@ function useModelInfoPage (_ref) {
|
|
|
8959
8959
|
openPlanner = _useSellerState$actio.openPlanner,
|
|
8960
8960
|
openComponent = _useSellerState$actio.openComponent,
|
|
8961
8961
|
checkAccountLogin = _useSellerState$actio.checkAccountLogin,
|
|
8962
|
+
loadCollections = _useSellerState$actio.loadCollections,
|
|
8962
8963
|
_useSellerState$state = _useSellerState.state,
|
|
8963
8964
|
currentAccountLoginId = _useSellerState$state.currentAccountLoginId,
|
|
8964
8965
|
currentBasketState = _useSellerState$state.currentBasketState,
|
|
@@ -8966,7 +8967,8 @@ function useModelInfoPage (_ref) {
|
|
|
8966
8967
|
configurationData = _useSellerState$state.configurationData,
|
|
8967
8968
|
returnTo = _useSellerState$state.returnTo,
|
|
8968
8969
|
sessionGuid = _useSellerState$state.sessionGuid,
|
|
8969
|
-
originProductId = _useSellerState$state.originProductId
|
|
8970
|
+
originProductId = _useSellerState$state.originProductId,
|
|
8971
|
+
collections = _useSellerState$state.collections;
|
|
8970
8972
|
var _useDivaCore = useDivaCore(),
|
|
8971
8973
|
organization = _useDivaCore.state.organization,
|
|
8972
8974
|
_useDivaCore$actions = _useDivaCore.actions,
|
|
@@ -8976,7 +8978,7 @@ function useModelInfoPage (_ref) {
|
|
|
8976
8978
|
useEffect(function () {
|
|
8977
8979
|
var load = /*#__PURE__*/function () {
|
|
8978
8980
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
8979
|
-
var accountSessionId, _catalogInfoData$, catalogInfoData;
|
|
8981
|
+
var accountSessionId, _collection$enricherS, coll, collection, isIDMData, _catalogInfoData$, catalogInfoData;
|
|
8980
8982
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8981
8983
|
while (1) switch (_context.prev = _context.next) {
|
|
8982
8984
|
case 0:
|
|
@@ -8993,7 +8995,7 @@ function useModelInfoPage (_ref) {
|
|
|
8993
8995
|
toggleLoading('seller-model-info', false, true);
|
|
8994
8996
|
accountSessionId = undefined;
|
|
8995
8997
|
if (!(organization.type === 'RETAILER')) {
|
|
8996
|
-
_context.next =
|
|
8998
|
+
_context.next = 25;
|
|
8997
8999
|
break;
|
|
8998
9000
|
}
|
|
8999
9001
|
if (accountId) {
|
|
@@ -9011,18 +9013,42 @@ function useModelInfoPage (_ref) {
|
|
|
9011
9013
|
});
|
|
9012
9014
|
return _context.abrupt("return");
|
|
9013
9015
|
case 11:
|
|
9014
|
-
|
|
9016
|
+
if (!(collections !== null && collections !== void 0)) {
|
|
9017
|
+
_context.next = 15;
|
|
9018
|
+
break;
|
|
9019
|
+
}
|
|
9020
|
+
_context.t0 = collections;
|
|
9021
|
+
_context.next = 18;
|
|
9022
|
+
break;
|
|
9023
|
+
case 15:
|
|
9024
|
+
_context.next = 17;
|
|
9025
|
+
return loadCollections({});
|
|
9026
|
+
case 17:
|
|
9027
|
+
_context.t0 = _context.sent.data;
|
|
9028
|
+
case 18:
|
|
9029
|
+
coll = _context.t0;
|
|
9030
|
+
collection = coll === null || coll === void 0 ? void 0 : coll.find(function (c) {
|
|
9031
|
+
return c.id == collectionId;
|
|
9032
|
+
});
|
|
9033
|
+
isIDMData = !!(collection !== null && collection !== void 0 && (_collection$enricherS = collection.enricherSeries) !== null && _collection$enricherS !== void 0 && _collection$enricherS.find(function (s) {
|
|
9034
|
+
return s.serieNo === catalogCodex;
|
|
9035
|
+
}));
|
|
9036
|
+
if (isIDMData) {
|
|
9037
|
+
_context.next = 25;
|
|
9038
|
+
break;
|
|
9039
|
+
}
|
|
9040
|
+
_context.next = 24;
|
|
9015
9041
|
return checkAccountLogin({
|
|
9016
9042
|
accountId: accountId
|
|
9017
9043
|
});
|
|
9018
|
-
case
|
|
9044
|
+
case 24:
|
|
9019
9045
|
accountSessionId = _context.sent;
|
|
9020
|
-
case
|
|
9046
|
+
case 25:
|
|
9021
9047
|
if (!catalogCodex) {
|
|
9022
|
-
_context.next =
|
|
9048
|
+
_context.next = 37;
|
|
9023
9049
|
break;
|
|
9024
9050
|
}
|
|
9025
|
-
_context.next =
|
|
9051
|
+
_context.next = 28;
|
|
9026
9052
|
return loadCatalogInfo({
|
|
9027
9053
|
catalogCodex: catalogCodex,
|
|
9028
9054
|
accountSessionId: accountSessionId,
|
|
@@ -9030,10 +9056,10 @@ function useModelInfoPage (_ref) {
|
|
|
9030
9056
|
collectionId: collectionId,
|
|
9031
9057
|
language: i18n.language || 'en'
|
|
9032
9058
|
});
|
|
9033
|
-
case
|
|
9059
|
+
case 28:
|
|
9034
9060
|
catalogInfoData = _context.sent;
|
|
9035
9061
|
if (catalogInfoData) {
|
|
9036
|
-
_context.next =
|
|
9062
|
+
_context.next = 33;
|
|
9037
9063
|
break;
|
|
9038
9064
|
}
|
|
9039
9065
|
toggleLoading('seller-model-info', false, false);
|
|
@@ -9041,12 +9067,12 @@ function useModelInfoPage (_ref) {
|
|
|
9041
9067
|
type: 'SELLER'
|
|
9042
9068
|
});
|
|
9043
9069
|
return _context.abrupt("return");
|
|
9044
|
-
case
|
|
9070
|
+
case 33:
|
|
9045
9071
|
{
|
|
9046
|
-
_context.next =
|
|
9072
|
+
_context.next = 35;
|
|
9047
9073
|
break;
|
|
9048
9074
|
}
|
|
9049
|
-
case
|
|
9075
|
+
case 35:
|
|
9050
9076
|
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
9051
9077
|
|
|
9052
9078
|
//if there is no relevant catalog information, as a normal seller continue directly to the planner
|
|
@@ -9056,14 +9082,14 @@ function useModelInfoPage (_ref) {
|
|
|
9056
9082
|
onOpenPlanner(accountSessionId);
|
|
9057
9083
|
}
|
|
9058
9084
|
}
|
|
9059
|
-
case
|
|
9085
|
+
case 37:
|
|
9060
9086
|
LOG$4.successTransaction('ON_OPEN_MODULE_INFO', {
|
|
9061
9087
|
cat: catalogCodex,
|
|
9062
9088
|
accountId: accountId
|
|
9063
9089
|
});
|
|
9064
9090
|
setLoading(false);
|
|
9065
9091
|
toggleLoading('seller-model-info', false, false);
|
|
9066
|
-
case
|
|
9092
|
+
case 40:
|
|
9067
9093
|
case "end":
|
|
9068
9094
|
return _context.stop();
|
|
9069
9095
|
}
|
|
@@ -14425,7 +14451,9 @@ var ModelAnalytics = function ModelAnalytics(_ref) {
|
|
|
14425
14451
|
loadCollections = _useSellerState$actio.loadCollections,
|
|
14426
14452
|
_useSellerState$state = _useSellerState.state,
|
|
14427
14453
|
sessionGuid = _useSellerState$state.sessionGuid,
|
|
14428
|
-
configurationData = _useSellerState$state.configurationData
|
|
14454
|
+
configurationData = _useSellerState$state.configurationData,
|
|
14455
|
+
collections = _useSellerState$state.collections,
|
|
14456
|
+
currentCollectionId = _useSellerState$state.currentCollectionId;
|
|
14429
14457
|
var _useTranslation = useTranslation(),
|
|
14430
14458
|
t = _useTranslation.t,
|
|
14431
14459
|
i18n = _useTranslation.i18n;
|
|
@@ -14485,9 +14513,10 @@ var ModelAnalytics = function ModelAnalytics(_ref) {
|
|
|
14485
14513
|
setMapping(keyMap);
|
|
14486
14514
|
}, [data]);
|
|
14487
14515
|
useEffect(function () {
|
|
14516
|
+
if (!currentCollectionId) return;
|
|
14488
14517
|
var load = /*#__PURE__*/function () {
|
|
14489
14518
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
14490
|
-
var accountSessionId, catalogInfoData;
|
|
14519
|
+
var accountSessionId, _collection$enricherS, coll, collection, isIDMData, catalogInfoData;
|
|
14491
14520
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
14492
14521
|
while (1) switch (_context.prev = _context.next) {
|
|
14493
14522
|
case 0:
|
|
@@ -14495,7 +14524,7 @@ var ModelAnalytics = function ModelAnalytics(_ref) {
|
|
|
14495
14524
|
toggleLoading('seller-model-info', false, true);
|
|
14496
14525
|
accountSessionId = undefined;
|
|
14497
14526
|
if (!(organization.type === 'RETAILER')) {
|
|
14498
|
-
_context.next =
|
|
14527
|
+
_context.next = 23;
|
|
14499
14528
|
break;
|
|
14500
14529
|
}
|
|
14501
14530
|
if (accountId) {
|
|
@@ -14509,31 +14538,55 @@ var ModelAnalytics = function ModelAnalytics(_ref) {
|
|
|
14509
14538
|
toggleLoading('seller-model-info', false, false);
|
|
14510
14539
|
return _context.abrupt("return");
|
|
14511
14540
|
case 9:
|
|
14512
|
-
|
|
14541
|
+
if (!(collections !== null && collections !== void 0)) {
|
|
14542
|
+
_context.next = 13;
|
|
14543
|
+
break;
|
|
14544
|
+
}
|
|
14545
|
+
_context.t0 = collections;
|
|
14546
|
+
_context.next = 16;
|
|
14547
|
+
break;
|
|
14548
|
+
case 13:
|
|
14549
|
+
_context.next = 15;
|
|
14550
|
+
return loadCollections({});
|
|
14551
|
+
case 15:
|
|
14552
|
+
_context.t0 = _context.sent.data;
|
|
14553
|
+
case 16:
|
|
14554
|
+
coll = _context.t0;
|
|
14555
|
+
collection = coll === null || coll === void 0 ? void 0 : coll.find(function (c) {
|
|
14556
|
+
return c.id == currentCollectionId;
|
|
14557
|
+
});
|
|
14558
|
+
isIDMData = !!(collection !== null && collection !== void 0 && (_collection$enricherS = collection.enricherSeries) !== null && _collection$enricherS !== void 0 && _collection$enricherS.find(function (s) {
|
|
14559
|
+
return s.serieNo === catalogCodex;
|
|
14560
|
+
}));
|
|
14561
|
+
if (isIDMData) {
|
|
14562
|
+
_context.next = 23;
|
|
14563
|
+
break;
|
|
14564
|
+
}
|
|
14565
|
+
_context.next = 22;
|
|
14513
14566
|
return checkAccountLogin({
|
|
14514
14567
|
accountId: accountId
|
|
14515
14568
|
});
|
|
14516
|
-
case
|
|
14569
|
+
case 22:
|
|
14517
14570
|
accountSessionId = _context.sent;
|
|
14518
|
-
case
|
|
14571
|
+
case 23:
|
|
14519
14572
|
if (!catalogCodex) {
|
|
14520
|
-
_context.next =
|
|
14573
|
+
_context.next = 28;
|
|
14521
14574
|
break;
|
|
14522
14575
|
}
|
|
14523
|
-
_context.next =
|
|
14576
|
+
_context.next = 26;
|
|
14524
14577
|
return loadCatalogInfo({
|
|
14525
14578
|
catalogCodex: catalogCodex,
|
|
14526
14579
|
accountSessionId: accountSessionId,
|
|
14527
14580
|
accountId: accountId,
|
|
14528
14581
|
language: i18n.language || 'en'
|
|
14529
14582
|
});
|
|
14530
|
-
case
|
|
14583
|
+
case 26:
|
|
14531
14584
|
catalogInfoData = _context.sent;
|
|
14532
14585
|
setData(catalogInfoData === null || catalogInfoData === void 0 ? void 0 : catalogInfoData[0]);
|
|
14533
|
-
case
|
|
14586
|
+
case 28:
|
|
14534
14587
|
setLoading(false);
|
|
14535
14588
|
toggleLoading('seller-model-info', false, false);
|
|
14536
|
-
case
|
|
14589
|
+
case 30:
|
|
14537
14590
|
case "end":
|
|
14538
14591
|
return _context.stop();
|
|
14539
14592
|
}
|
|
@@ -14544,7 +14597,7 @@ var ModelAnalytics = function ModelAnalytics(_ref) {
|
|
|
14544
14597
|
};
|
|
14545
14598
|
}();
|
|
14546
14599
|
load();
|
|
14547
|
-
}, [accountId, catalogCodex, i18n.language, sessionGuid]);
|
|
14600
|
+
}, [accountId, catalogCodex, i18n.language, sessionGuid, currentCollectionId]);
|
|
14548
14601
|
if (!config) throw new Error('no analyticsConfig defined');
|
|
14549
14602
|
if (loading || !data) return /*#__PURE__*/jsx(Fragment, {});
|
|
14550
14603
|
var optionsArray = Object.values(data.options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Analytics/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,KAAK,KAAK,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAI3D,QAAA,MAAM,cAAc,gCAAiC,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Analytics/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,KAAK,KAAK,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAI3D,QAAA,MAAM,cAAc,gCAAiC,KAAK,sBAsIzD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModelInfoPage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/InfoWithProducts/useModelInfoPage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAIrD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,kBAAkB;;;;;;
|
|
1
|
+
{"version":3,"file":"useModelInfoPage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/InfoWithProducts/useModelInfoPage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAIrD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,kBAAkB;;;;;;wCA+IxE,OAAO;EAsDpB"}
|
|
@@ -64,13 +64,13 @@ interface LoadArticleProps {
|
|
|
64
64
|
export declare function apiLoadArticles({ serverUrlAPI, catalogCodex, accountSessionId, lang }: LoadArticleProps): Promise<Article[]>;
|
|
65
65
|
interface LoadArticleEnricherProps {
|
|
66
66
|
enricherUrl: string;
|
|
67
|
-
|
|
67
|
+
serieNo: string;
|
|
68
68
|
catalogId: string;
|
|
69
69
|
jwt: string;
|
|
70
70
|
language: string;
|
|
71
71
|
t: any;
|
|
72
72
|
}
|
|
73
|
-
export declare function apiLoadEnricherArticles({
|
|
73
|
+
export declare function apiLoadEnricherArticles({ serieNo, catalogId, enricherUrl, jwt, language, t }: LoadArticleEnricherProps): Promise<Article[]>;
|
|
74
74
|
interface LoadBasketProps {
|
|
75
75
|
divaNr?: string;
|
|
76
76
|
apiConfig: ApiConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-seller",
|
|
3
|
-
"version": "26.3.0-beta.
|
|
3
|
+
"version": "26.3.0-beta.32",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"react-dom": "^18.3.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@crystaldesign/analytics": "26.3.0-beta.
|
|
33
|
-
"@crystaldesign/products-component": "26.3.0-beta.
|
|
34
|
-
"@crystaldesign/real-time-viewer": "26.3.0-beta.
|
|
32
|
+
"@crystaldesign/analytics": "26.3.0-beta.32",
|
|
33
|
+
"@crystaldesign/products-component": "26.3.0-beta.32",
|
|
34
|
+
"@crystaldesign/real-time-viewer": "26.3.0-beta.32",
|
|
35
35
|
"@emotion/react": "^11.4.1",
|
|
36
36
|
"@emotion/styled": "^11.3.0",
|
|
37
37
|
"@mui/icons-material": "^6.1.5",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
},
|
|
44
44
|
"types": "./build/types/seller/src/index.d.ts",
|
|
45
45
|
"module": "build/esm/index.js",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "7f52b82c5c24e043d0f1231ef9e0c42c0745c444"
|
|
47
47
|
}
|