@mjhls/mjh-framework 1.0.734-beta-0.1 → 1.0.734-beta-0.2
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 +30 -13
- package/dist/cjs/{getTargeting-0d9b6b99.js → getTargeting-5eef5b58.js} +1 -3
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/View.js +30 -13
- package/dist/esm/{getTargeting-a1ebbed5.js → getTargeting-9413f34a.js} +1 -3
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -67,7 +67,7 @@ var getSeriesDetail = require('./getSeriesDetail.js');
|
|
|
67
67
|
require('./index-bd6c9f56.js');
|
|
68
68
|
var getRelatedArticle = require('./getRelatedArticle.js');
|
|
69
69
|
var getQuery = require('./getQuery.js');
|
|
70
|
-
var getTargeting = require('./getTargeting-
|
|
70
|
+
var getTargeting = require('./getTargeting-5eef5b58.js');
|
|
71
71
|
var getKeywords = require('./getKeywords.js');
|
|
72
72
|
var urlFor = require('./urlFor.js');
|
|
73
73
|
var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
@@ -1524,7 +1524,7 @@ View.returnGetInitialProps = function () {
|
|
|
1524
1524
|
while (1) {
|
|
1525
1525
|
switch (_context.prev = _context.next) {
|
|
1526
1526
|
case 0:
|
|
1527
|
-
query = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && _id == \'' + id + '\'][0]
|
|
1527
|
+
query = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && _id == \'' + id + '\'][0]';
|
|
1528
1528
|
_context.next = 3;
|
|
1529
1529
|
return client.fetch(query);
|
|
1530
1530
|
|
|
@@ -1544,7 +1544,7 @@ View.returnGetInitialProps = function () {
|
|
|
1544
1544
|
break;
|
|
1545
1545
|
|
|
1546
1546
|
case 9:
|
|
1547
|
-
article.rootDocumentGroup = rootDoc;
|
|
1547
|
+
article.rootDocumentGroup = rootDoc.identifier.current;
|
|
1548
1548
|
|
|
1549
1549
|
case 10:
|
|
1550
1550
|
case 'end':
|
|
@@ -1562,10 +1562,27 @@ View.returnGetInitialProps = function () {
|
|
|
1562
1562
|
// Calling recursive function if parentDocumentGroup has id
|
|
1563
1563
|
|
|
1564
1564
|
|
|
1565
|
-
if (article && article.parentDocumentGroup && article.parentDocumentGroup._id) {
|
|
1566
|
-
|
|
1565
|
+
if (!(article && article.parentDocumentGroup && article.parentDocumentGroup._id)) {
|
|
1566
|
+
_context2.next = 11;
|
|
1567
|
+
break;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
if (!article.parentDocumentGroup.parent) {
|
|
1571
|
+
_context2.next = 10;
|
|
1572
|
+
break;
|
|
1567
1573
|
}
|
|
1568
1574
|
|
|
1575
|
+
_context2.next = 8;
|
|
1576
|
+
return getRootDoc(article.parentDocumentGroup.parent._ref);
|
|
1577
|
+
|
|
1578
|
+
case 8:
|
|
1579
|
+
_context2.next = 11;
|
|
1580
|
+
break;
|
|
1581
|
+
|
|
1582
|
+
case 10:
|
|
1583
|
+
article.rootDocumentGroup = article.parentDocumentGroup.identifier.current;
|
|
1584
|
+
|
|
1585
|
+
case 11:
|
|
1569
1586
|
relatedArticleQuery = getQuery('related');
|
|
1570
1587
|
|
|
1571
1588
|
article.seriesDetail = getSeriesDetail(article, seriesVid);
|
|
@@ -1622,27 +1639,27 @@ View.returnGetInitialProps = function () {
|
|
|
1622
1639
|
}
|
|
1623
1640
|
|
|
1624
1641
|
if (!article.disableRelatedContent) {
|
|
1625
|
-
_context2.next =
|
|
1642
|
+
_context2.next = 24;
|
|
1626
1643
|
break;
|
|
1627
1644
|
}
|
|
1628
1645
|
|
|
1629
1646
|
article.relatedArticle = null;
|
|
1630
|
-
_context2.next =
|
|
1647
|
+
_context2.next = 28;
|
|
1631
1648
|
break;
|
|
1632
1649
|
|
|
1633
|
-
case
|
|
1650
|
+
case 24:
|
|
1634
1651
|
if (!article) {
|
|
1635
|
-
_context2.next =
|
|
1652
|
+
_context2.next = 28;
|
|
1636
1653
|
break;
|
|
1637
1654
|
}
|
|
1638
1655
|
|
|
1639
|
-
_context2.next =
|
|
1656
|
+
_context2.next = 27;
|
|
1640
1657
|
return getRelatedArticle(context, client, article, prevUrl, '0..2');
|
|
1641
1658
|
|
|
1642
|
-
case
|
|
1659
|
+
case 27:
|
|
1643
1660
|
article.relatedArticle = _context2.sent;
|
|
1644
1661
|
|
|
1645
|
-
case
|
|
1662
|
+
case 28:
|
|
1646
1663
|
return _context2.abrupt('return', {
|
|
1647
1664
|
url: url,
|
|
1648
1665
|
sao: sao,
|
|
@@ -1653,7 +1670,7 @@ View.returnGetInitialProps = function () {
|
|
|
1653
1670
|
sponsoredFlag: sponsoredFlag
|
|
1654
1671
|
});
|
|
1655
1672
|
|
|
1656
|
-
case
|
|
1673
|
+
case 29:
|
|
1657
1674
|
case 'end':
|
|
1658
1675
|
return _context2.stop();
|
|
1659
1676
|
}
|
|
@@ -140,9 +140,7 @@ var getTargeting = function getTargeting(props) {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// returning AD Targeting Group
|
|
143
|
-
if (rootDocumentGroup
|
|
144
|
-
targeting['rootDocumentGroup'] = rootDocumentGroup.identifier.current;
|
|
145
|
-
}
|
|
143
|
+
if (rootDocumentGroup) targeting['rootDocumentGroup'] = rootDocumentGroup;
|
|
146
144
|
return targeting;
|
|
147
145
|
};
|
|
148
146
|
|
package/dist/cjs/getTargeting.js
CHANGED
|
@@ -8,7 +8,7 @@ require('./toConsumableArray-9a3476fe.js');
|
|
|
8
8
|
require('./core.get-iterator-method-f62321d4.js');
|
|
9
9
|
require('./_object-pie-68c5bcbc.js');
|
|
10
10
|
require('./extends-60837c34.js');
|
|
11
|
-
var getTargeting = require('./getTargeting-
|
|
11
|
+
var getTargeting = require('./getTargeting-5eef5b58.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -177,7 +177,7 @@ var Auth = require('./Auth.js');
|
|
|
177
177
|
require('swr');
|
|
178
178
|
require('passport-local');
|
|
179
179
|
require('mysql');
|
|
180
|
-
var getTargeting = require('./getTargeting-
|
|
180
|
+
var getTargeting = require('./getTargeting-5eef5b58.js');
|
|
181
181
|
var View = require('./View.js');
|
|
182
182
|
var getKeywords = require('./getKeywords.js');
|
|
183
183
|
var urlFor = require('./urlFor.js');
|
package/dist/esm/View.js
CHANGED
|
@@ -61,7 +61,7 @@ import getSeriesDetail from './getSeriesDetail.js';
|
|
|
61
61
|
import './index-db3bb315.js';
|
|
62
62
|
import getRelatedArticle from './getRelatedArticle.js';
|
|
63
63
|
import getQuery from './getQuery.js';
|
|
64
|
-
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-
|
|
64
|
+
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-9413f34a.js';
|
|
65
65
|
import getKeywords from './getKeywords.js';
|
|
66
66
|
import urlFor from './urlFor.js';
|
|
67
67
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
@@ -1518,7 +1518,7 @@ View.returnGetInitialProps = function () {
|
|
|
1518
1518
|
while (1) {
|
|
1519
1519
|
switch (_context.prev = _context.next) {
|
|
1520
1520
|
case 0:
|
|
1521
|
-
query = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && _id == \'' + id + '\'][0]
|
|
1521
|
+
query = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && _id == \'' + id + '\'][0]';
|
|
1522
1522
|
_context.next = 3;
|
|
1523
1523
|
return client.fetch(query);
|
|
1524
1524
|
|
|
@@ -1538,7 +1538,7 @@ View.returnGetInitialProps = function () {
|
|
|
1538
1538
|
break;
|
|
1539
1539
|
|
|
1540
1540
|
case 9:
|
|
1541
|
-
article.rootDocumentGroup = rootDoc;
|
|
1541
|
+
article.rootDocumentGroup = rootDoc.identifier.current;
|
|
1542
1542
|
|
|
1543
1543
|
case 10:
|
|
1544
1544
|
case 'end':
|
|
@@ -1556,10 +1556,27 @@ View.returnGetInitialProps = function () {
|
|
|
1556
1556
|
// Calling recursive function if parentDocumentGroup has id
|
|
1557
1557
|
|
|
1558
1558
|
|
|
1559
|
-
if (article && article.parentDocumentGroup && article.parentDocumentGroup._id) {
|
|
1560
|
-
|
|
1559
|
+
if (!(article && article.parentDocumentGroup && article.parentDocumentGroup._id)) {
|
|
1560
|
+
_context2.next = 11;
|
|
1561
|
+
break;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
if (!article.parentDocumentGroup.parent) {
|
|
1565
|
+
_context2.next = 10;
|
|
1566
|
+
break;
|
|
1561
1567
|
}
|
|
1562
1568
|
|
|
1569
|
+
_context2.next = 8;
|
|
1570
|
+
return getRootDoc(article.parentDocumentGroup.parent._ref);
|
|
1571
|
+
|
|
1572
|
+
case 8:
|
|
1573
|
+
_context2.next = 11;
|
|
1574
|
+
break;
|
|
1575
|
+
|
|
1576
|
+
case 10:
|
|
1577
|
+
article.rootDocumentGroup = article.parentDocumentGroup.identifier.current;
|
|
1578
|
+
|
|
1579
|
+
case 11:
|
|
1563
1580
|
relatedArticleQuery = getQuery('related');
|
|
1564
1581
|
|
|
1565
1582
|
article.seriesDetail = getSeriesDetail(article, seriesVid);
|
|
@@ -1616,27 +1633,27 @@ View.returnGetInitialProps = function () {
|
|
|
1616
1633
|
}
|
|
1617
1634
|
|
|
1618
1635
|
if (!article.disableRelatedContent) {
|
|
1619
|
-
_context2.next =
|
|
1636
|
+
_context2.next = 24;
|
|
1620
1637
|
break;
|
|
1621
1638
|
}
|
|
1622
1639
|
|
|
1623
1640
|
article.relatedArticle = null;
|
|
1624
|
-
_context2.next =
|
|
1641
|
+
_context2.next = 28;
|
|
1625
1642
|
break;
|
|
1626
1643
|
|
|
1627
|
-
case
|
|
1644
|
+
case 24:
|
|
1628
1645
|
if (!article) {
|
|
1629
|
-
_context2.next =
|
|
1646
|
+
_context2.next = 28;
|
|
1630
1647
|
break;
|
|
1631
1648
|
}
|
|
1632
1649
|
|
|
1633
|
-
_context2.next =
|
|
1650
|
+
_context2.next = 27;
|
|
1634
1651
|
return getRelatedArticle(context, client, article, prevUrl, '0..2');
|
|
1635
1652
|
|
|
1636
|
-
case
|
|
1653
|
+
case 27:
|
|
1637
1654
|
article.relatedArticle = _context2.sent;
|
|
1638
1655
|
|
|
1639
|
-
case
|
|
1656
|
+
case 28:
|
|
1640
1657
|
return _context2.abrupt('return', {
|
|
1641
1658
|
url: url,
|
|
1642
1659
|
sao: sao,
|
|
@@ -1647,7 +1664,7 @@ View.returnGetInitialProps = function () {
|
|
|
1647
1664
|
sponsoredFlag: sponsoredFlag
|
|
1648
1665
|
});
|
|
1649
1666
|
|
|
1650
|
-
case
|
|
1667
|
+
case 29:
|
|
1651
1668
|
case 'end':
|
|
1652
1669
|
return _context2.stop();
|
|
1653
1670
|
}
|
|
@@ -138,9 +138,7 @@ var getTargeting = function getTargeting(props) {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
// returning AD Targeting Group
|
|
141
|
-
if (rootDocumentGroup
|
|
142
|
-
targeting['rootDocumentGroup'] = rootDocumentGroup.identifier.current;
|
|
143
|
-
}
|
|
141
|
+
if (rootDocumentGroup) targeting['rootDocumentGroup'] = rootDocumentGroup;
|
|
144
142
|
return targeting;
|
|
145
143
|
};
|
|
146
144
|
|
package/dist/esm/getTargeting.js
CHANGED
|
@@ -6,4 +6,4 @@ import './toConsumableArray-43aa614d.js';
|
|
|
6
6
|
import './core.get-iterator-method-e1de7503.js';
|
|
7
7
|
import './_object-pie-33c40e79.js';
|
|
8
8
|
import './extends-eb69e8ac.js';
|
|
9
|
-
export { g as default } from './getTargeting-
|
|
9
|
+
export { g as default } from './getTargeting-9413f34a.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -170,7 +170,7 @@ export { default as Auth } from './Auth.js';
|
|
|
170
170
|
import 'swr';
|
|
171
171
|
import 'passport-local';
|
|
172
172
|
import 'mysql';
|
|
173
|
-
export { g as getTargeting } from './getTargeting-
|
|
173
|
+
export { g as getTargeting } from './getTargeting-9413f34a.js';
|
|
174
174
|
export { default as View } from './View.js';
|
|
175
175
|
export { default as getKeywords } from './getKeywords.js';
|
|
176
176
|
export { default as urlFor } from './urlFor.js';
|