@mjhls/mjh-framework 1.0.1082-c4 → 1.0.1082-errors-v1

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
@@ -124,8 +124,7 @@ var getDocumentGroupUrl = function getDocumentGroupUrl(docGroup) {
124
124
  if (typeof url !== 'undefined') {
125
125
  url = url + '/' + docGroup.path;
126
126
  } else {
127
- // url = '/' + docGroup.path
128
- return null;
127
+ url = '/' + docGroup.path;
129
128
  }
130
129
 
131
130
  return url;
@@ -148,8 +147,7 @@ var getDocumentGroupName = function getDocumentGroupName(docGroup) {
148
147
  if (typeof name !== 'undefined') {
149
148
  name = name + ' | <b>' + docGroup.name + '</b>';
150
149
  } else {
151
- // name = '<b>' + docGroup.name + '</b>'
152
- return null;
150
+ name = '<b>' + docGroup.name + '</b>';
153
151
  }
154
152
 
155
153
  return name && typeof name != 'undefined' ? name : null;
@@ -199,7 +197,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
199
197
  { style: { textAlign: 'center', fontWeight: 600 } },
200
198
  article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null
201
199
  ),
202
- url && name && React__default["default"].createElement(
200
+ React__default["default"].createElement(
203
201
  'a',
204
202
  {
205
203
  href: url,
@@ -1266,7 +1264,6 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
1266
1264
  };
1267
1265
 
1268
1266
  var RelevantTopics = function RelevantTopics() {
1269
-
1270
1267
  if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
1271
1268
  var relatedLinks = [];
1272
1269
  if (documentGroupMapping && documentGroupMapping.length > 0) {
@@ -1274,23 +1271,12 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
1274
1271
  if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
1275
1272
  return null;
1276
1273
  }
1277
-
1278
- 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;
1279
- var href = '' + doc_url;
1280
- relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: href }]);
1281
- // if (documentGroup.parent) {
1282
- // relatedLinks = [
1283
- // ...relatedLinks,
1284
- // {
1285
- // label: documentGroup.name,
1286
- // href: cpModificationRequired
1287
- // ? getDocumentGroupUrl(documentGroup)
1288
- // : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
1289
- // ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
1290
- // : `/${documentGroup.path}`
1291
- // }
1292
- // ]
1293
- // }
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
+ }
1294
1280
  });
1295
1281
  }
1296
1282
  if (content_placement && content_placement.length > 0) {
@@ -1300,11 +1286,7 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
1300
1286
  if (cp.excludeRelatedContents) {
1301
1287
  return null;
1302
1288
  }
1303
-
1304
- 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;
1305
- var cp_url1 = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.ancestor ? cp.parent && !cp.path.includes('/') ? cp.ancestor + '/' + cp.parent + '/' + cp.path : !cp.path.includes(cp.ancestor) ? cp.ancestor + '/' + cp.path : '' + cp.path : cp.parent ? !cp.path.includes('/') ? cp.parent + '/' + cp.path : '' + cp.path : '' + cp.path;
1306
- console.log("++++++++++++++++++++++cp url+++++++++++", cp_url1);
1307
- console.log("validate", cp.path.includes('' + cp.ancestor));
1289
+ var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.path;
1308
1290
  var href = '/' + cp_url;
1309
1291
  relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
1310
1292
  });
@@ -2401,8 +2383,6 @@ var View = function View(props) {
2401
2383
  var title = _props$article2.title,
2402
2384
  seriesShareOptions = _props$article2.seriesShareOptions;
2403
2385
 
2404
- console.log(props);
2405
-
2406
2386
  var _useState = React.useState(0),
2407
2387
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
2408
2388
  currentPage = _useState2[0],
package/dist/esm/View.js CHANGED
@@ -114,8 +114,7 @@ var getDocumentGroupUrl = function getDocumentGroupUrl(docGroup) {
114
114
  if (typeof url !== 'undefined') {
115
115
  url = url + '/' + docGroup.path;
116
116
  } else {
117
- // url = '/' + docGroup.path
118
- return null;
117
+ url = '/' + docGroup.path;
119
118
  }
120
119
 
121
120
  return url;
@@ -138,8 +137,7 @@ var getDocumentGroupName = function getDocumentGroupName(docGroup) {
138
137
  if (typeof name !== 'undefined') {
139
138
  name = name + ' | <b>' + docGroup.name + '</b>';
140
139
  } else {
141
- // name = '<b>' + docGroup.name + '</b>'
142
- return null;
140
+ name = '<b>' + docGroup.name + '</b>';
143
141
  }
144
142
 
145
143
  return name && typeof name != 'undefined' ? name : null;
@@ -189,7 +187,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
189
187
  { style: { textAlign: 'center', fontWeight: 600 } },
190
188
  article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null
191
189
  ),
192
- url && name && React__default.createElement(
190
+ React__default.createElement(
193
191
  'a',
194
192
  {
195
193
  href: url,
@@ -1256,7 +1254,6 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1256
1254
  };
1257
1255
 
1258
1256
  var RelevantTopics = function RelevantTopics() {
1259
-
1260
1257
  if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
1261
1258
  var relatedLinks = [];
1262
1259
  if (documentGroupMapping && documentGroupMapping.length > 0) {
@@ -1264,23 +1261,12 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1264
1261
  if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
1265
1262
  return null;
1266
1263
  }
1267
-
1268
- 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;
1269
- var href = '' + doc_url;
1270
- relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: href }]);
1271
- // if (documentGroup.parent) {
1272
- // relatedLinks = [
1273
- // ...relatedLinks,
1274
- // {
1275
- // label: documentGroup.name,
1276
- // href: cpModificationRequired
1277
- // ? getDocumentGroupUrl(documentGroup)
1278
- // : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
1279
- // ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
1280
- // : `/${documentGroup.path}`
1281
- // }
1282
- // ]
1283
- // }
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
+ }
1284
1270
  });
1285
1271
  }
1286
1272
  if (content_placement && content_placement.length > 0) {
@@ -1290,11 +1276,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1290
1276
  if (cp.excludeRelatedContents) {
1291
1277
  return null;
1292
1278
  }
1293
-
1294
- 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;
1295
- var cp_url1 = cpModificationRequired ? getContentPlacementUrl(cp) : cp.ancestor ? cp.parent && !cp.path.includes('/') ? cp.ancestor + '/' + cp.parent + '/' + cp.path : !cp.path.includes(cp.ancestor) ? cp.ancestor + '/' + cp.path : '' + cp.path : cp.parent ? !cp.path.includes('/') ? cp.parent + '/' + cp.path : '' + cp.path : '' + cp.path;
1296
- console.log("++++++++++++++++++++++cp url+++++++++++", cp_url1);
1297
- console.log("validate", cp.path.includes('' + cp.ancestor));
1279
+ var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
1298
1280
  var href = '/' + cp_url;
1299
1281
  relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
1300
1282
  });
@@ -2391,8 +2373,6 @@ var View = function View(props) {
2391
2373
  var title = _props$article2.title,
2392
2374
  seriesShareOptions = _props$article2.seriesShareOptions;
2393
2375
 
2394
- console.log(props);
2395
-
2396
2376
  var _useState = useState(0),
2397
2377
  _useState2 = _slicedToArray(_useState, 2),
2398
2378
  currentPage = _useState2[0],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.1082-c4",
3
+ "version": "1.0.1082-errors-v1",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",