@mjhls/mjh-framework 1.0.1082-404-v4 → 1.0.1082-404-v6

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/dist/cjs/View.js CHANGED
@@ -895,7 +895,7 @@ var RelevantTopics = function RelevantTopics(props) {
895
895
  { key: relatedLink.label, className: 'related-link' },
896
896
  React__default["default"].createElement(
897
897
  'a',
898
- { className: 'related-links recomm', style: { color: 'blue' }, href: relatedLink.href },
898
+ { className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
899
899
  relatedLink.label
900
900
  ),
901
901
  React__default["default"].createElement(
@@ -1271,12 +1271,24 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
1271
1271
  if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
1272
1272
  return null;
1273
1273
  }
1274
- if (documentGroup.parent) {
1275
- relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{
1276
- label: documentGroup.name,
1277
- href: cpModificationRequired ? getDocumentGroupUrl(documentGroup) : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/') ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path
1278
- }]);
1279
- }
1274
+
1275
+ var doc_url = cpModificationRequired ? getDocumentGroupUrl(documentGroup) : documentGroup.ancestor ? documentGroup.parent && !documentGroup.path.includes('/') ? '/' + documentGroup.ancestor + '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.ancestor + '/' + documentGroup.path : documentGroup.parent ? !documentGroup.path.includes('/') ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '' + documentGroup.path : '' + documentGroup.path;
1276
+
1277
+ var href = '' + doc_url;
1278
+ relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
1279
+ // if (documentGroup.parent) {
1280
+ // relatedLinks = [
1281
+ // ...relatedLinks,
1282
+ // {
1283
+ // label: documentGroup.name,
1284
+ // href: cpModificationRequired
1285
+ // ? getDocumentGroupUrl(documentGroup)
1286
+ // : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
1287
+ // ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
1288
+ // : `/${documentGroup.path}`
1289
+ // }
1290
+ // ]
1291
+ // }
1280
1292
  });
1281
1293
  }
1282
1294
  if (content_placement && content_placement.length > 0) {
@@ -1286,10 +1298,9 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
1286
1298
  if (cp.excludeRelatedContents) {
1287
1299
  return null;
1288
1300
  }
1289
- // const cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path
1290
- var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.parent && !cp.path.includes('/') ? '/' + cp.parent + '/' + cp.path : '/' + cp.path;
1301
+
1302
+ var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.ancestor ? cp.parent && !cp.path.includes('/') ? '/' + cp.ancestor + '/' + cp.parent + '/' + cp.path : '/' + cp.ancestor + '/' + cp.path : cp.parent ? !cp.path.includes('/') ? '/' + cp.parent + '/' + cp.path : '' + cp.path : '' + cp.path;
1291
1303
  var href = '' + cp_url;
1292
- console.log("hrwef", href);
1293
1304
  relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
1294
1305
  });
1295
1306
  }
package/dist/esm/View.js CHANGED
@@ -885,7 +885,7 @@ var RelevantTopics = function RelevantTopics(props) {
885
885
  { key: relatedLink.label, className: 'related-link' },
886
886
  React__default.createElement(
887
887
  'a',
888
- { className: 'related-links recomm', style: { color: 'blue' }, href: relatedLink.href },
888
+ { className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
889
889
  relatedLink.label
890
890
  ),
891
891
  React__default.createElement(
@@ -1261,12 +1261,24 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1261
1261
  if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
1262
1262
  return null;
1263
1263
  }
1264
- if (documentGroup.parent) {
1265
- relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{
1266
- label: documentGroup.name,
1267
- href: cpModificationRequired ? getDocumentGroupUrl(documentGroup) : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/') ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path
1268
- }]);
1269
- }
1264
+
1265
+ var doc_url = cpModificationRequired ? getDocumentGroupUrl(documentGroup) : documentGroup.ancestor ? documentGroup.parent && !documentGroup.path.includes('/') ? '/' + documentGroup.ancestor + '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.ancestor + '/' + documentGroup.path : documentGroup.parent ? !documentGroup.path.includes('/') ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '' + documentGroup.path : '' + documentGroup.path;
1266
+
1267
+ var href = '' + doc_url;
1268
+ relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
1269
+ // if (documentGroup.parent) {
1270
+ // relatedLinks = [
1271
+ // ...relatedLinks,
1272
+ // {
1273
+ // label: documentGroup.name,
1274
+ // href: cpModificationRequired
1275
+ // ? getDocumentGroupUrl(documentGroup)
1276
+ // : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
1277
+ // ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
1278
+ // : `/${documentGroup.path}`
1279
+ // }
1280
+ // ]
1281
+ // }
1270
1282
  });
1271
1283
  }
1272
1284
  if (content_placement && content_placement.length > 0) {
@@ -1276,10 +1288,9 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1276
1288
  if (cp.excludeRelatedContents) {
1277
1289
  return null;
1278
1290
  }
1279
- // const cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path
1280
- var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.parent && !cp.path.includes('/') ? '/' + cp.parent + '/' + cp.path : '/' + cp.path;
1291
+
1292
+ var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.ancestor ? cp.parent && !cp.path.includes('/') ? '/' + cp.ancestor + '/' + cp.parent + '/' + cp.path : '/' + cp.ancestor + '/' + cp.path : cp.parent ? !cp.path.includes('/') ? '/' + cp.parent + '/' + cp.path : '' + cp.path : '' + cp.path;
1281
1293
  var href = '' + cp_url;
1282
- console.log("hrwef", href);
1283
1294
  relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
1284
1295
  });
1285
1296
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.1082-404-v4",
3
+ "version": "1.0.1082-404-v6",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",