@mjhls/mjh-framework 1.0.810 → 1.0.811-gate-test
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/README.md +170 -170
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +3 -2
- package/dist/cjs/AD300x250x600.js +3 -2
- package/dist/cjs/AD728x90.js +3 -2
- package/dist/cjs/ADFloatingFooter.js +3 -2
- package/dist/cjs/ADGutter.js +3 -2
- package/dist/cjs/ADSkyscraper.js +3 -2
- package/dist/cjs/ADSponsoredResources.js +3 -2
- package/dist/cjs/ADWebcast.js +3 -2
- package/dist/cjs/ADWelcome.js +3 -2
- package/dist/cjs/AccordionPanel.js +2 -2
- package/dist/cjs/AdSlot.js +3 -2
- package/dist/cjs/AdSlotsProvider.js +3 -2
- package/dist/cjs/AlgoliaSearch.js +14100 -19
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +6 -5
- package/dist/cjs/ArticleSeriesLandingPage.js +5 -4
- package/dist/cjs/ArticleSeriesListing.js +5 -4
- package/dist/cjs/Auth.js +4 -321
- package/dist/cjs/AuthWrapper.js +725 -0
- package/dist/cjs/CMEDeck.js +3 -2
- package/dist/cjs/Column3.js +3 -2
- package/dist/cjs/ConferenceArticleCard.js +15 -15
- package/dist/cjs/DeckContent.js +12 -11
- package/dist/cjs/DeckQueue.js +3 -2
- package/dist/cjs/{Dfp-3f0ed4c8.js → Dfp-93399f8c.js} +2 -1
- package/dist/cjs/EventsDeck.js +18 -18
- package/dist/cjs/ExternalResources.js +6 -5
- package/dist/cjs/Feature.js +1 -1
- package/dist/cjs/GridContent.js +5 -4
- package/dist/cjs/HamMagazine.js +15 -15
- package/dist/cjs/HorizontalArticleListing.js +6 -5
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/IssueLanding.js +34 -33
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +3 -2
- package/dist/cjs/MasterDeck.js +13 -12
- package/dist/cjs/MediaSeriesLanding.js +313 -421
- package/dist/cjs/NavMagazine.js +16 -16
- package/dist/cjs/NavNative.js +12 -12
- package/dist/cjs/NavNormal.js +2 -2
- package/dist/cjs/OncliveHero.js +1 -1
- package/dist/cjs/PartnerDetailListing.js +8 -7
- package/dist/cjs/PdfDownload.js +2 -2
- package/dist/cjs/PubSection.js +5 -4
- package/dist/cjs/PublicationLanding.js +29 -29
- package/dist/cjs/QueueDeckExpanded.js +5 -4
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/RelatedContent.js +28 -28
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SeriesListingDeck.js +4 -3
- package/dist/cjs/{SeriesSlider-2db54929.js → SeriesSlider-c022ce04.js} +5 -5
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/{SocialSearchComponent-948138c7.js → SocialSearchComponent-ecb4f972.js} +3 -3
- package/dist/cjs/TaxonomyDescription.js +6 -5
- package/dist/cjs/TemplateNormal.js +8 -7
- package/dist/cjs/Ustream.js +4 -4
- package/dist/cjs/VideoProgramLandingPage.js +6 -5
- package/dist/cjs/VideoSeriesCard.js +1 -1
- package/dist/cjs/VideoSeriesLandingPage.js +5 -4
- package/dist/cjs/VideoSeriesListing.js +5 -4
- package/dist/cjs/View.js +62 -34
- package/dist/cjs/YoutubeGroup.js +5 -5
- package/dist/cjs/events-1b438fe7.js +469 -0
- package/dist/cjs/faundadb.js +329 -0
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getSerializers.js +6 -5
- package/dist/cjs/{getTargeting-fbbe92ba.js → getTargeting-c8081c76.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +5 -2
- package/dist/cjs/{index-a766f892.js → index-667c091e.js} +3 -3
- package/dist/cjs/index-8041a4eb.js +99 -0
- package/dist/cjs/{index-0e4427c8.js → index-fc2f1ca2.js} +2 -467
- package/dist/cjs/{index.esm-f27f80d9.js → index.esm-05850a2f.js} +1 -1
- package/dist/cjs/{index.esm-9225638f.js → index.esm-3b9b8952.js} +1 -1
- package/dist/cjs/{index.esm-2bb721c8.js → index.esm-8123cf40.js} +1 -1
- package/dist/cjs/{index.esm-00a6aade.js → index.esm-974f47d9.js} +1 -1
- package/dist/cjs/index.js +16 -14
- package/dist/cjs/{main-f1c77adb.js → main-025fdc78.js} +3 -3
- package/dist/cjs/md5-e1ca5797.js +323 -0
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +7 -6
- package/dist/esm/AD300x250x600.js +7 -6
- package/dist/esm/AD728x90.js +8 -7
- package/dist/esm/ADFloatingFooter.js +10 -9
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +10 -9
- package/dist/esm/{ADInfeed-33e556f5.js → ADInfeed-6ed88032.js} +5 -5
- package/dist/esm/ADSkyscraper.js +10 -9
- package/dist/esm/ADSponsoredResources.js +10 -9
- package/dist/esm/ADWebcast.js +10 -9
- package/dist/esm/ADWelcome.js +14 -13
- package/dist/esm/{ADlgInfeed-1270c526.js → ADlgInfeed-e02d1d98.js} +4 -4
- package/dist/esm/AccordionPanel.js +18 -18
- package/dist/esm/AdSlot.js +6 -5
- package/dist/esm/AdSlotsProvider.js +5 -4
- package/dist/esm/AlgoliaSearch.js +14120 -39
- package/dist/esm/AlphabeticList.js +13 -13
- package/dist/esm/ArticleCarousel.js +6 -6
- package/dist/esm/ArticleProgramLandingPage.js +18 -17
- package/dist/esm/ArticleSeriesLandingPage.js +13 -12
- package/dist/esm/ArticleSeriesListing.js +32 -31
- package/dist/esm/Auth.js +71 -388
- package/dist/esm/AuthWrapper.js +719 -0
- package/dist/esm/{AuthorComponent-30aeba69.js → AuthorComponent-5ae7409f.js} +10 -10
- package/dist/esm/{BlockContent-c99c9a8d.js → BlockContent-52cf21c5.js} +3 -3
- package/dist/esm/Breadcrumbs.js +11 -11
- package/dist/esm/CMEDeck.js +62 -61
- package/dist/esm/Column1.js +5 -5
- package/dist/esm/Column2.js +12 -12
- package/dist/esm/Column3.js +24 -23
- package/dist/esm/ConferenceArticleCard.js +28 -28
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +58 -57
- package/dist/esm/DeckQueue.js +43 -42
- package/dist/esm/{Dfp-be030f2a.js → Dfp-43f121ff.js} +11 -10
- package/dist/esm/EventsDeck.js +81 -81
- package/dist/esm/ExternalResources.js +36 -35
- package/dist/esm/Feature.js +15 -15
- package/dist/esm/ForbesHero.js +26 -26
- package/dist/esm/GridContent.js +104 -103
- package/dist/esm/GridHero.js +27 -27
- package/dist/esm/GroupDeck.js +34 -34
- package/dist/esm/HamMagazine.js +95 -95
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +6 -6
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +32 -31
- package/dist/esm/HorizontalHero.js +20 -20
- package/dist/esm/IssueContentDeck.js +39 -39
- package/dist/esm/IssueDeck.js +33 -33
- package/dist/esm/IssueLanding.js +43 -42
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +17 -16
- package/dist/esm/MasterDeck.js +47 -46
- package/dist/esm/MediaSeriesLanding.js +336 -444
- package/dist/esm/NavDvm.js +43 -43
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +99 -99
- package/dist/esm/NavNative.js +86 -86
- package/dist/esm/NavNormal.js +22 -22
- package/dist/esm/OncliveHero.js +13 -13
- package/dist/esm/OncliveLargeHero.js +50 -50
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +63 -62
- package/dist/esm/PdfDownload.js +7 -7
- package/dist/esm/PopUpModal.js +8 -8
- package/dist/esm/PubSection.js +15 -14
- package/dist/esm/PubToc.js +5 -5
- package/dist/esm/PublicationDeck.js +33 -33
- package/dist/esm/PublicationLanding.js +78 -78
- package/dist/esm/QueueDeckExpanded.js +247 -246
- package/dist/esm/RecentNews.js +18 -18
- package/dist/esm/RelatedContent.js +43 -43
- package/dist/esm/RelatedTopicsDropdown.js +21 -21
- package/dist/esm/RolesDeck.js +13 -13
- package/dist/esm/Search.js +5 -5
- package/dist/esm/SeriesListingDeck.js +20 -19
- package/dist/esm/{SeriesSlider-c8477bf3.js → SeriesSlider-8414085b.js} +23 -23
- package/dist/esm/SideFooter.js +21 -21
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-db963c3e.js → SocialSearchComponent-cd38ae60.js} +22 -22
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +35 -35
- package/dist/esm/TaxonomyDescription.js +14 -13
- package/dist/esm/TemplateNormal.js +31 -30
- package/dist/esm/ThumbnailCard.js +9 -9
- package/dist/esm/Ustream.js +18 -18
- package/dist/esm/VerticalHero.js +11 -11
- package/dist/esm/VideoProgramLandingPage.js +25 -24
- package/dist/esm/VideoSeriesCard.js +15 -15
- package/dist/esm/VideoSeriesFilter.js +6 -6
- package/dist/esm/VideoSeriesLandingPage.js +13 -12
- package/dist/esm/VideoSeriesListing.js +48 -47
- package/dist/esm/View.js +221 -193
- package/dist/esm/YahooHero.js +23 -23
- package/dist/esm/YoutubeGroup.js +32 -32
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-b43c695a.js} +3 -3
- package/dist/esm/events-6c3a7a63.js +467 -0
- package/dist/esm/faundadb.js +321 -0
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getSerializers.js +9 -8
- package/dist/esm/{getTargeting-0958ad0e.js → getTargeting-2302c1b4.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
- package/dist/esm/{index-5cc7b406.js → index-2446af28.js} +4 -469
- package/dist/esm/{index-755f2cc2.js → index-35bdcc81.js} +4 -4
- package/dist/esm/index-67e1773f.js +94 -0
- package/dist/esm/{index-f354da27.js → index-d2fb744b.js} +339 -339
- package/dist/esm/{index.es-a6137319.js → index.es-c6222053.js} +5 -5
- package/dist/esm/{index.esm-f6156a57.js → index.esm-3fdda599.js} +1 -1
- package/dist/esm/{index.esm-37268dca.js → index.esm-8016b507.js} +16 -16
- package/dist/esm/{index.esm-d4932dea.js → index.esm-a8ff922c.js} +1 -1
- package/dist/esm/{index.esm-e874e770.js → index.esm-d6f88d94.js} +1 -1
- package/dist/esm/index.js +41 -39
- package/dist/esm/{main-d4165069.js → main-b5c5aac1.js} +19 -19
- package/dist/esm/md5-4e42248e.js +321 -0
- package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-91f9716f.js} +5 -5
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/package.json +111 -109
- /package/dist/cjs/{ADInfeed-d9976673.js → ADInfeed-77f334bb.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-0610e1bb.js → ADlgInfeed-0664c67f.js} +0 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7f8f9219.js';
|
|
2
|
+
import { m as md5 } from './md5-4e42248e.js';
|
|
3
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
4
|
+
import './es6.string.iterator-bc33758b.js';
|
|
5
|
+
import './_to-object-b50e61c3.js';
|
|
6
|
+
import './web.dom.iterable-4109ff68.js';
|
|
7
|
+
import './_library-528f1934.js';
|
|
8
|
+
import './core.get-iterator-method-133dfacd.js';
|
|
9
|
+
import './_iter-detect-7e5e5ce2.js';
|
|
10
|
+
|
|
11
|
+
var encrypt = function () {
|
|
12
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(password) {
|
|
13
|
+
var hash;
|
|
14
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
15
|
+
while (1) {
|
|
16
|
+
switch (_context.prev = _context.next) {
|
|
17
|
+
case 0:
|
|
18
|
+
hash = md5(password);
|
|
19
|
+
return _context.abrupt('return', hash);
|
|
20
|
+
|
|
21
|
+
case 2:
|
|
22
|
+
case 'end':
|
|
23
|
+
return _context.stop();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, _callee, this);
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
return function encrypt(_x) {
|
|
30
|
+
return _ref.apply(this, arguments);
|
|
31
|
+
};
|
|
32
|
+
}();
|
|
33
|
+
|
|
34
|
+
var comparePassword = function () {
|
|
35
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(plainTextPassword, hashedPassword) {
|
|
36
|
+
var hash;
|
|
37
|
+
return regenerator.wrap(function _callee2$(_context2) {
|
|
38
|
+
while (1) {
|
|
39
|
+
switch (_context2.prev = _context2.next) {
|
|
40
|
+
case 0:
|
|
41
|
+
hash = md5(plainTextPassword);
|
|
42
|
+
return _context2.abrupt('return', hash === hashedPassword);
|
|
43
|
+
|
|
44
|
+
case 2:
|
|
45
|
+
case 'end':
|
|
46
|
+
return _context2.stop();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, _callee2, this);
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
return function comparePassword(_x2, _x3) {
|
|
53
|
+
return _ref2.apply(this, arguments);
|
|
54
|
+
};
|
|
55
|
+
}();
|
|
56
|
+
|
|
57
|
+
var faunadb = require('faunadb'),
|
|
58
|
+
q = faunadb.query;
|
|
59
|
+
|
|
60
|
+
var registerUser = function () {
|
|
61
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(body) {
|
|
62
|
+
var secret = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'fnAEG3Bb7AACAC0BiSQFYGBLFUtHjn3QOTKE1iBX';
|
|
63
|
+
var data, client, hashedPassword, result;
|
|
64
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
65
|
+
while (1) {
|
|
66
|
+
switch (_context.prev = _context.next) {
|
|
67
|
+
case 0:
|
|
68
|
+
_context.prev = 0;
|
|
69
|
+
data = body;
|
|
70
|
+
|
|
71
|
+
if (secret) {
|
|
72
|
+
_context.next = 4;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
throw new Error('Missing secret key');
|
|
77
|
+
|
|
78
|
+
case 4:
|
|
79
|
+
client = new faunadb.Client({ secret: secret });
|
|
80
|
+
_context.next = 7;
|
|
81
|
+
return encrypt(data.Password);
|
|
82
|
+
|
|
83
|
+
case 7:
|
|
84
|
+
hashedPassword = _context.sent;
|
|
85
|
+
|
|
86
|
+
data.Password = hashedPassword;
|
|
87
|
+
|
|
88
|
+
_context.next = 11;
|
|
89
|
+
return client.query(q.Create(q.Collection('Users'), {
|
|
90
|
+
data: data
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
case 11:
|
|
94
|
+
result = _context.sent;
|
|
95
|
+
|
|
96
|
+
if (!(!result || !result.data || result.data.Email != data.Email)) {
|
|
97
|
+
_context.next = 14;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
throw new Error('Failed to register!');
|
|
102
|
+
|
|
103
|
+
case 14:
|
|
104
|
+
return _context.abrupt('return', result);
|
|
105
|
+
|
|
106
|
+
case 17:
|
|
107
|
+
_context.prev = 17;
|
|
108
|
+
_context.t0 = _context['catch'](0);
|
|
109
|
+
return _context.abrupt('return', { error: _context.t0.message });
|
|
110
|
+
|
|
111
|
+
case 20:
|
|
112
|
+
case 'end':
|
|
113
|
+
return _context.stop();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, _callee, this, [[0, 17]]);
|
|
117
|
+
}));
|
|
118
|
+
|
|
119
|
+
return function registerUser(_x) {
|
|
120
|
+
return _ref.apply(this, arguments);
|
|
121
|
+
};
|
|
122
|
+
}();
|
|
123
|
+
|
|
124
|
+
var findUserByEmail = function () {
|
|
125
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(email) {
|
|
126
|
+
var secret = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'fnAEG3Bb7AACAC0BiSQFYGBLFUtHjn3QOTKE1iBX';
|
|
127
|
+
var client, result;
|
|
128
|
+
return regenerator.wrap(function _callee2$(_context2) {
|
|
129
|
+
while (1) {
|
|
130
|
+
switch (_context2.prev = _context2.next) {
|
|
131
|
+
case 0:
|
|
132
|
+
_context2.prev = 0;
|
|
133
|
+
client = new faunadb.Client({ secret: secret });
|
|
134
|
+
_context2.next = 4;
|
|
135
|
+
return client.query(q.Get(q.Match(q.Index('Email'), email)));
|
|
136
|
+
|
|
137
|
+
case 4:
|
|
138
|
+
result = _context2.sent;
|
|
139
|
+
return _context2.abrupt('return', result ? true : false);
|
|
140
|
+
|
|
141
|
+
case 8:
|
|
142
|
+
_context2.prev = 8;
|
|
143
|
+
_context2.t0 = _context2['catch'](0);
|
|
144
|
+
return _context2.abrupt('return', false);
|
|
145
|
+
|
|
146
|
+
case 11:
|
|
147
|
+
case 'end':
|
|
148
|
+
return _context2.stop();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, _callee2, this, [[0, 8]]);
|
|
152
|
+
}));
|
|
153
|
+
|
|
154
|
+
return function findUserByEmail(_x3) {
|
|
155
|
+
return _ref2.apply(this, arguments);
|
|
156
|
+
};
|
|
157
|
+
}();
|
|
158
|
+
|
|
159
|
+
var authenticateUser = function () {
|
|
160
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3(email, password) {
|
|
161
|
+
var secret = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'fnAEG3Bb7AACAC0BiSQFYGBLFUtHjn3QOTKE1iBX';
|
|
162
|
+
var client, result, hashedPassword, isAuth;
|
|
163
|
+
return regenerator.wrap(function _callee3$(_context3) {
|
|
164
|
+
while (1) {
|
|
165
|
+
switch (_context3.prev = _context3.next) {
|
|
166
|
+
case 0:
|
|
167
|
+
_context3.prev = 0;
|
|
168
|
+
client = new faunadb.Client({ secret: secret });
|
|
169
|
+
_context3.next = 4;
|
|
170
|
+
return client.query(q.Get(q.Match(q.Index('Email'), email)));
|
|
171
|
+
|
|
172
|
+
case 4:
|
|
173
|
+
result = _context3.sent;
|
|
174
|
+
hashedPassword = result.data.Password;
|
|
175
|
+
_context3.next = 8;
|
|
176
|
+
return comparePassword(password, hashedPassword);
|
|
177
|
+
|
|
178
|
+
case 8:
|
|
179
|
+
isAuth = _context3.sent;
|
|
180
|
+
return _context3.abrupt('return', isAuth ? { email: email } : false);
|
|
181
|
+
|
|
182
|
+
case 12:
|
|
183
|
+
_context3.prev = 12;
|
|
184
|
+
_context3.t0 = _context3['catch'](0);
|
|
185
|
+
|
|
186
|
+
console.log(_context3.t0);
|
|
187
|
+
return _context3.abrupt('return', false);
|
|
188
|
+
|
|
189
|
+
case 16:
|
|
190
|
+
case 'end':
|
|
191
|
+
return _context3.stop();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, _callee3, this, [[0, 12]]);
|
|
195
|
+
}));
|
|
196
|
+
|
|
197
|
+
return function authenticateUser(_x5, _x6) {
|
|
198
|
+
return _ref3.apply(this, arguments);
|
|
199
|
+
};
|
|
200
|
+
}();
|
|
201
|
+
|
|
202
|
+
var updateUserSecret = function () {
|
|
203
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4(email, hash) {
|
|
204
|
+
var secret = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'fnAEG3Bb7AACAC0BiSQFYGBLFUtHjn3QOTKE1iBX';
|
|
205
|
+
var expiration, client, result;
|
|
206
|
+
return regenerator.wrap(function _callee4$(_context4) {
|
|
207
|
+
while (1) {
|
|
208
|
+
switch (_context4.prev = _context4.next) {
|
|
209
|
+
case 0:
|
|
210
|
+
expiration = new Date().getTime() + 43200000; //1day
|
|
211
|
+
|
|
212
|
+
_context4.prev = 1;
|
|
213
|
+
|
|
214
|
+
console.log(email, hash, expiration);
|
|
215
|
+
client = new faunadb.Client({ secret: secret });
|
|
216
|
+
_context4.next = 6;
|
|
217
|
+
return client.query(q.Update(q.Select(['ref'], q.Get(q.Match(q.Index('Email'), email))), { data: { secretKey: hash, secretExpiration: expiration } }));
|
|
218
|
+
|
|
219
|
+
case 6:
|
|
220
|
+
result = _context4.sent;
|
|
221
|
+
return _context4.abrupt('return', result ? true : false);
|
|
222
|
+
|
|
223
|
+
case 10:
|
|
224
|
+
_context4.prev = 10;
|
|
225
|
+
_context4.t0 = _context4['catch'](1);
|
|
226
|
+
|
|
227
|
+
console.log(_context4.t0);
|
|
228
|
+
return _context4.abrupt('return', false);
|
|
229
|
+
|
|
230
|
+
case 14:
|
|
231
|
+
case 'end':
|
|
232
|
+
return _context4.stop();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}, _callee4, this, [[1, 10]]);
|
|
236
|
+
}));
|
|
237
|
+
|
|
238
|
+
return function updateUserSecret(_x8, _x9) {
|
|
239
|
+
return _ref4.apply(this, arguments);
|
|
240
|
+
};
|
|
241
|
+
}();
|
|
242
|
+
|
|
243
|
+
var updateUserPassword = function () {
|
|
244
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee5(hash, newPassword) {
|
|
245
|
+
var secret = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'fnAEG3Bb7AACAC0BiSQFYGBLFUtHjn3QOTKE1iBX';
|
|
246
|
+
var now, client, result, expiration, password, updatePassword;
|
|
247
|
+
return regenerator.wrap(function _callee5$(_context5) {
|
|
248
|
+
while (1) {
|
|
249
|
+
switch (_context5.prev = _context5.next) {
|
|
250
|
+
case 0:
|
|
251
|
+
_context5.prev = 0;
|
|
252
|
+
now = Date.now();
|
|
253
|
+
client = new faunadb.Client({ secret: secret });
|
|
254
|
+
_context5.next = 5;
|
|
255
|
+
return client.query(q.Get(q.Match(q.Index('SecretKey'), hash)));
|
|
256
|
+
|
|
257
|
+
case 5:
|
|
258
|
+
result = _context5.sent;
|
|
259
|
+
expiration = result.data.secretExpiration;
|
|
260
|
+
|
|
261
|
+
if (!(now > expiration)) {
|
|
262
|
+
_context5.next = 9;
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
throw new Error('eKey has expired.');
|
|
267
|
+
|
|
268
|
+
case 9:
|
|
269
|
+
if (!(now < expiration)) {
|
|
270
|
+
_context5.next = 18;
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
_context5.next = 12;
|
|
275
|
+
return encrypt(newPassword);
|
|
276
|
+
|
|
277
|
+
case 12:
|
|
278
|
+
password = _context5.sent;
|
|
279
|
+
_context5.next = 15;
|
|
280
|
+
return client.query(q.Update(q.Select(['ref'], q.Get(q.Match(q.Index('SecretKey'), hash))), { data: { Password: password, secretKey: '' } }));
|
|
281
|
+
|
|
282
|
+
case 15:
|
|
283
|
+
updatePassword = _context5.sent;
|
|
284
|
+
|
|
285
|
+
if (updatePassword) {
|
|
286
|
+
_context5.next = 18;
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
throw new Error('Failed to update password.');
|
|
291
|
+
|
|
292
|
+
case 18:
|
|
293
|
+
if (!(!result || result.error)) {
|
|
294
|
+
_context5.next = 20;
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
throw new Error('User not found');
|
|
299
|
+
|
|
300
|
+
case 20:
|
|
301
|
+
return _context5.abrupt('return', true);
|
|
302
|
+
|
|
303
|
+
case 23:
|
|
304
|
+
_context5.prev = 23;
|
|
305
|
+
_context5.t0 = _context5['catch'](0);
|
|
306
|
+
return _context5.abrupt('return', { err: _context5.t0 });
|
|
307
|
+
|
|
308
|
+
case 26:
|
|
309
|
+
case 'end':
|
|
310
|
+
return _context5.stop();
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}, _callee5, this, [[0, 23]]);
|
|
314
|
+
}));
|
|
315
|
+
|
|
316
|
+
return function updateUserPassword(_x11, _x12) {
|
|
317
|
+
return _ref5.apply(this, arguments);
|
|
318
|
+
};
|
|
319
|
+
}();
|
|
320
|
+
|
|
321
|
+
export { authenticateUser, findUserByEmail, registerUser, updateUserPassword, updateUserSecret };
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -8,9 +8,9 @@ var getQuery = function getQuery(type) {
|
|
|
8
8
|
|
|
9
9
|
switch (type) {
|
|
10
10
|
case 'related':
|
|
11
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
11
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
12
12
|
case 'article':
|
|
13
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
|
|
13
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
|
|
14
14
|
case 'publication':
|
|
15
15
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
16
16
|
case 'issue':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export { g as default } from './index-
|
|
3
|
-
import './BlockContent-
|
|
2
|
+
export { g as default } from './index-d2fb744b.js';
|
|
3
|
+
import './BlockContent-52cf21c5.js';
|
|
4
4
|
import './entities-932b50cf.js';
|
|
5
5
|
import './slicedToArray-be2f7a22.js';
|
|
6
6
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -10,7 +10,8 @@ import './_to-object-b50e61c3.js';
|
|
|
10
10
|
import './core.get-iterator-method-133dfacd.js';
|
|
11
11
|
import 'react-bootstrap';
|
|
12
12
|
import './index-0dbff1d1.js';
|
|
13
|
-
import './index-
|
|
13
|
+
import './index-2446af28.js';
|
|
14
|
+
import './events-6c3a7a63.js';
|
|
14
15
|
import 'prop-types';
|
|
15
16
|
import 'next/router';
|
|
16
17
|
import './index-c7e2ac95.js';
|
|
@@ -21,14 +22,14 @@ import './asyncToGenerator-7f8f9219.js';
|
|
|
21
22
|
import './_library-528f1934.js';
|
|
22
23
|
import './_iter-detect-7e5e5ce2.js';
|
|
23
24
|
import './Segment.js';
|
|
24
|
-
import './main-
|
|
25
|
+
import './main-b5c5aac1.js';
|
|
25
26
|
import './extends-f076879e.js';
|
|
26
27
|
import './_object-pie-133f504a.js';
|
|
27
|
-
import './index-
|
|
28
|
+
import './index-35bdcc81.js';
|
|
28
29
|
import 'react-dom';
|
|
29
30
|
import './typeof-a286cf0c.js';
|
|
30
31
|
import './_is-array-3e99e06e.js';
|
|
31
|
-
import './brightcove-react-player-loader.es-
|
|
32
|
+
import './brightcove-react-player-loader.es-b43c695a.js';
|
|
32
33
|
import './GroupDeck.js';
|
|
33
34
|
import './smoothscroll-fa4e3f8c.js';
|
|
34
35
|
import './moment-bc12cb97.js';
|
|
@@ -48,6 +49,6 @@ import 'react-bootstrap/Col';
|
|
|
48
49
|
import './inherits-f71787cf.js';
|
|
49
50
|
import './_object-sap-f353c2a9.js';
|
|
50
51
|
import './define-property-fe54dc9f.js';
|
|
51
|
-
import './index.esm-
|
|
52
|
-
import './iconBase-
|
|
52
|
+
import './index.esm-3fdda599.js';
|
|
53
|
+
import './iconBase-602d52fe.js';
|
|
53
54
|
import 'react-bootstrap/Figure';
|
|
@@ -2,18 +2,18 @@ import { _ as _extends } from './extends-f076879e.js';
|
|
|
2
2
|
import { _ as _toConsumableArray } from './toConsumableArray-6d9a4616.js';
|
|
3
3
|
|
|
4
4
|
var getContentPlacementUrl = function getContentPlacementUrl(cp) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var cp_url = '';
|
|
6
|
+
if (cp.ancestor && typeof cp.ancestor == 'string') {
|
|
7
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
|
|
11
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.parent;
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.path;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
return cp_url;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
var getTargeting = function getTargeting(props) {
|
package/dist/esm/getTargeting.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './extends-f076879e.js';
|
|
2
2
|
import './toConsumableArray-6d9a4616.js';
|
|
3
|
-
export { g as default } from './getTargeting-
|
|
3
|
+
export { g as default } from './getTargeting-2302c1b4.js';
|
|
4
4
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
5
5
|
import './_to-object-b50e61c3.js';
|
|
6
6
|
import './_object-pie-133f504a.js';
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
function _interopNamespace(e) {
|
|
6
|
-
if (e && e.__esModule) return e;
|
|
7
|
-
var n = Object.create(null);
|
|
8
|
-
if (e) {
|
|
9
|
-
Object.keys(e).forEach(function (k) {
|
|
10
|
-
if (k !== 'default') {
|
|
11
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return e[k];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n['default'] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
1
|
+
import { createContext, createElement } from 'react';
|
|
26
2
|
|
|
27
3
|
var DefaultContext = {
|
|
28
4
|
color: undefined,
|
|
@@ -31,7 +7,7 @@ var DefaultContext = {
|
|
|
31
7
|
style: undefined,
|
|
32
8
|
attr: undefined
|
|
33
9
|
};
|
|
34
|
-
var IconContext =
|
|
10
|
+
var IconContext = createContext && createContext(DefaultContext);
|
|
35
11
|
|
|
36
12
|
var __assign = undefined && undefined.__assign || function () {
|
|
37
13
|
__assign = Object.assign || function (t) {
|
|
@@ -58,7 +34,7 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
58
34
|
|
|
59
35
|
function Tree2Element(tree) {
|
|
60
36
|
return tree && tree.map(function (node, i) {
|
|
61
|
-
return
|
|
37
|
+
return createElement(node.tag, __assign({
|
|
62
38
|
key: i
|
|
63
39
|
}, node.attr), Tree2Element(node.child));
|
|
64
40
|
});
|
|
@@ -66,7 +42,7 @@ function Tree2Element(tree) {
|
|
|
66
42
|
|
|
67
43
|
function GenIcon(data) {
|
|
68
44
|
return function (props) {
|
|
69
|
-
return
|
|
45
|
+
return createElement(IconBase, __assign({
|
|
70
46
|
attr: __assign({}, data.attr)
|
|
71
47
|
}, props), Tree2Element(data.child));
|
|
72
48
|
};
|
|
@@ -82,7 +58,7 @@ function IconBase(props) {
|
|
|
82
58
|
title = props.title,
|
|
83
59
|
svgProps = __rest(props, ["attr", "title"]);
|
|
84
60
|
|
|
85
|
-
return
|
|
61
|
+
return createElement("svg", __assign({
|
|
86
62
|
stroke: "currentColor",
|
|
87
63
|
fill: "currentColor",
|
|
88
64
|
strokeWidth: "0"
|
|
@@ -94,13 +70,12 @@ function IconBase(props) {
|
|
|
94
70
|
height: computedSize,
|
|
95
71
|
width: computedSize,
|
|
96
72
|
xmlns: "http://www.w3.org/2000/svg"
|
|
97
|
-
}), title &&
|
|
73
|
+
}), title && createElement("title", null, title), props.children);
|
|
98
74
|
};
|
|
99
75
|
|
|
100
|
-
return IconContext !== undefined ?
|
|
76
|
+
return IconContext !== undefined ? createElement(IconContext.Consumer, null, function (conf) {
|
|
101
77
|
return elem(conf);
|
|
102
78
|
}) : elem(DefaultContext);
|
|
103
79
|
}
|
|
104
80
|
|
|
105
|
-
|
|
106
|
-
exports.IconContext = IconContext;
|
|
81
|
+
export { GenIcon as G, IconContext as I };
|