@mjhls/mjh-framework 1.0.361 → 1.0.363
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 +1 -1
- package/dist/cjs/index.js +31 -10
- package/dist/esm/index.js +31 -10
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -1798,7 +1798,6 @@ var js_cookie = _commonjsHelpers.createCommonjsModule(function (module, exports)
|
|
|
1798
1798
|
|
|
1799
1799
|
var clientId = process.env.CVENT_CLIENT_ID;
|
|
1800
1800
|
var clientSecret = process.env.CVENT_CLIENT_SECRET;
|
|
1801
|
-
var corsProxy = 'https://cors-anywhere.herokuapp.com/';
|
|
1802
1801
|
var currentTime = momentTimezone$1().toISOString();
|
|
1803
1802
|
var itemsPerPage = 200;
|
|
1804
1803
|
|
|
@@ -1898,15 +1897,37 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1898
1897
|
if (cventAccessToken && cventAccessToken !== 'undefined') {
|
|
1899
1898
|
setAccessToken(cventAccessToken);
|
|
1900
1899
|
} else {
|
|
1901
|
-
|
|
1902
|
-
|
|
1900
|
+
/*const encodedData = window.btoa(clientId + ':' + clientSecret)
|
|
1901
|
+
//const url = `${corsProxy}https://api-platform.cvent.com/ea/oauth2/token`
|
|
1902
|
+
const url = `https://api-platform.cvent.com/ea/oauth2/token`
|
|
1903
|
+
fetch(url, {
|
|
1904
|
+
headers: {
|
|
1905
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
1906
|
+
Authorization: `Basic ${encodedData}`
|
|
1907
|
+
},
|
|
1908
|
+
method: 'POST',
|
|
1909
|
+
body: `grant_type=client_credentials&client_id=${clientId}`
|
|
1910
|
+
})
|
|
1911
|
+
.then((response) => response.json())
|
|
1912
|
+
.then((json) => {
|
|
1913
|
+
const inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000)
|
|
1914
|
+
Cookies.set('cvent_access_token', json.access_token, { expires: inOneHour })
|
|
1915
|
+
setAccessToken(json.access_token)
|
|
1916
|
+
})
|
|
1917
|
+
.catch((e) => console.log(e))*/
|
|
1918
|
+
// hello
|
|
1919
|
+
var url = 'https://beam.mjhlifesciences.com/api/cvent/token';
|
|
1903
1920
|
fetch(url, {
|
|
1904
1921
|
headers: {
|
|
1905
|
-
'Content-Type': 'application/
|
|
1906
|
-
|
|
1922
|
+
'Content-Type': 'application/json',
|
|
1923
|
+
'Accept': 'application/json'
|
|
1907
1924
|
},
|
|
1908
|
-
method: '
|
|
1909
|
-
|
|
1925
|
+
method: 'post',
|
|
1926
|
+
credentials: "include",
|
|
1927
|
+
body: AdSlot._JSON$stringify({
|
|
1928
|
+
clientId: clientId,
|
|
1929
|
+
clientSecret: clientSecret
|
|
1930
|
+
})
|
|
1910
1931
|
}).then(function (response) {
|
|
1911
1932
|
return response.json();
|
|
1912
1933
|
}).then(function (json) {
|
|
@@ -2129,7 +2150,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
2129
2150
|
}
|
|
2130
2151
|
};
|
|
2131
2152
|
|
|
2132
|
-
var corsProxy
|
|
2153
|
+
var corsProxy = 'https://cors-anywhere.herokuapp.com/';
|
|
2133
2154
|
var itemsPerPage$1 = 10;
|
|
2134
2155
|
|
|
2135
2156
|
var CMEDeck = function CMEDeck(_ref) {
|
|
@@ -2148,7 +2169,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2148
2169
|
form.append('keyword', keywords);
|
|
2149
2170
|
_context.prev = 5;
|
|
2150
2171
|
_context.next = 8;
|
|
2151
|
-
return fetch(corsProxy
|
|
2172
|
+
return fetch(corsProxy + 'http://vaccine.mjhassoc.com/doc_loader.php', {
|
|
2152
2173
|
method: 'POST',
|
|
2153
2174
|
body: form
|
|
2154
2175
|
});
|
|
@@ -3186,7 +3207,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3186
3207
|
reactBootstrap.Carousel,
|
|
3187
3208
|
{ activeIndex: carouselIndex, onSelect: function onSelect(selectedIndex, e) {
|
|
3188
3209
|
return onChangeSlide(selectedIndex, router);
|
|
3189
|
-
} },
|
|
3210
|
+
}, interval: null },
|
|
3190
3211
|
slides && slides.map(function (slide) {
|
|
3191
3212
|
return React__default.createElement(
|
|
3192
3213
|
reactBootstrap.Carousel.Item,
|
package/dist/esm/index.js
CHANGED
|
@@ -1795,7 +1795,6 @@ var js_cookie = createCommonjsModule(function (module, exports) {
|
|
|
1795
1795
|
|
|
1796
1796
|
var clientId = process.env.CVENT_CLIENT_ID;
|
|
1797
1797
|
var clientSecret = process.env.CVENT_CLIENT_SECRET;
|
|
1798
|
-
var corsProxy = 'https://cors-anywhere.herokuapp.com/';
|
|
1799
1798
|
var currentTime = momentTimezone$1().toISOString();
|
|
1800
1799
|
var itemsPerPage = 200;
|
|
1801
1800
|
|
|
@@ -1895,15 +1894,37 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1895
1894
|
if (cventAccessToken && cventAccessToken !== 'undefined') {
|
|
1896
1895
|
setAccessToken(cventAccessToken);
|
|
1897
1896
|
} else {
|
|
1898
|
-
|
|
1899
|
-
|
|
1897
|
+
/*const encodedData = window.btoa(clientId + ':' + clientSecret)
|
|
1898
|
+
//const url = `${corsProxy}https://api-platform.cvent.com/ea/oauth2/token`
|
|
1899
|
+
const url = `https://api-platform.cvent.com/ea/oauth2/token`
|
|
1900
|
+
fetch(url, {
|
|
1901
|
+
headers: {
|
|
1902
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
1903
|
+
Authorization: `Basic ${encodedData}`
|
|
1904
|
+
},
|
|
1905
|
+
method: 'POST',
|
|
1906
|
+
body: `grant_type=client_credentials&client_id=${clientId}`
|
|
1907
|
+
})
|
|
1908
|
+
.then((response) => response.json())
|
|
1909
|
+
.then((json) => {
|
|
1910
|
+
const inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000)
|
|
1911
|
+
Cookies.set('cvent_access_token', json.access_token, { expires: inOneHour })
|
|
1912
|
+
setAccessToken(json.access_token)
|
|
1913
|
+
})
|
|
1914
|
+
.catch((e) => console.log(e))*/
|
|
1915
|
+
// hello
|
|
1916
|
+
var url = 'https://beam.mjhlifesciences.com/api/cvent/token';
|
|
1900
1917
|
fetch(url, {
|
|
1901
1918
|
headers: {
|
|
1902
|
-
'Content-Type': 'application/
|
|
1903
|
-
|
|
1919
|
+
'Content-Type': 'application/json',
|
|
1920
|
+
'Accept': 'application/json'
|
|
1904
1921
|
},
|
|
1905
|
-
method: '
|
|
1906
|
-
|
|
1922
|
+
method: 'post',
|
|
1923
|
+
credentials: "include",
|
|
1924
|
+
body: _JSON$stringify({
|
|
1925
|
+
clientId: clientId,
|
|
1926
|
+
clientSecret: clientSecret
|
|
1927
|
+
})
|
|
1907
1928
|
}).then(function (response) {
|
|
1908
1929
|
return response.json();
|
|
1909
1930
|
}).then(function (json) {
|
|
@@ -2126,7 +2147,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
2126
2147
|
}
|
|
2127
2148
|
};
|
|
2128
2149
|
|
|
2129
|
-
var corsProxy
|
|
2150
|
+
var corsProxy = 'https://cors-anywhere.herokuapp.com/';
|
|
2130
2151
|
var itemsPerPage$1 = 10;
|
|
2131
2152
|
|
|
2132
2153
|
var CMEDeck = function CMEDeck(_ref) {
|
|
@@ -2145,7 +2166,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2145
2166
|
form.append('keyword', keywords);
|
|
2146
2167
|
_context.prev = 5;
|
|
2147
2168
|
_context.next = 8;
|
|
2148
|
-
return fetch(corsProxy
|
|
2169
|
+
return fetch(corsProxy + 'http://vaccine.mjhassoc.com/doc_loader.php', {
|
|
2149
2170
|
method: 'POST',
|
|
2150
2171
|
body: form
|
|
2151
2172
|
});
|
|
@@ -3183,7 +3204,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3183
3204
|
Carousel,
|
|
3184
3205
|
{ activeIndex: carouselIndex, onSelect: function onSelect(selectedIndex, e) {
|
|
3185
3206
|
return onChangeSlide(selectedIndex, router);
|
|
3186
|
-
} },
|
|
3207
|
+
}, interval: null },
|
|
3187
3208
|
slides && slides.map(function (slide) {
|
|
3188
3209
|
return React__default.createElement(
|
|
3189
3210
|
Carousel.Item,
|