@mjhls/mjh-framework 1.0.362 → 1.0.364

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 CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.362
2
+ # mjh-framework v. 1.0.364
3
3
 
4
4
 
5
5
  > Foundation Framework
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
- var encodedData = window.btoa(clientId + ':' + clientSecret);
1902
- var url = corsProxy + 'https://api-platform.cvent.com/ea/oauth2/token';
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/x-www-form-urlencoded',
1906
- Authorization: 'Basic ' + encodedData
1922
+ 'Content-Type': 'application/json',
1923
+ 'Accept': 'application/json'
1907
1924
  },
1908
- method: 'POST',
1909
- body: 'grant_type=client_credentials&client_id=' + clientId
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) {
@@ -1933,6 +1954,7 @@ var EventsDeck = function EventsDeck(_ref) {
1933
1954
 
1934
1955
  var cardLoader = function cardLoader() {
1935
1956
  var numberOfItemsBeforeAd = 5;
1957
+
1936
1958
  return React__default.createElement(
1937
1959
  Container,
1938
1960
  { style: { padding: 1 } },
@@ -2032,7 +2054,7 @@ var EventsDeck = function EventsDeck(_ref) {
2032
2054
  )
2033
2055
  )
2034
2056
  ),
2035
- speakerInfo && speakerInfo.length && React__default.createElement(
2057
+ speakerInfo && speakerInfo.length > 0 && React__default.createElement(
2036
2058
  Row,
2037
2059
  null,
2038
2060
  React__default.createElement(
@@ -2129,7 +2151,7 @@ var EventsDeck = function EventsDeck(_ref) {
2129
2151
  }
2130
2152
  };
2131
2153
 
2132
- var corsProxy$1 = 'https://cors-anywhere.herokuapp.com/';
2154
+ var corsProxy = 'https://cors-anywhere.herokuapp.com/';
2133
2155
  var itemsPerPage$1 = 10;
2134
2156
 
2135
2157
  var CMEDeck = function CMEDeck(_ref) {
@@ -2148,7 +2170,7 @@ var CMEDeck = function CMEDeck(_ref) {
2148
2170
  form.append('keyword', keywords);
2149
2171
  _context.prev = 5;
2150
2172
  _context.next = 8;
2151
- return fetch(corsProxy$1 + 'http://vaccine.mjhassoc.com/doc_loader.php', {
2173
+ return fetch(corsProxy + 'http://vaccine.mjhassoc.com/doc_loader.php', {
2152
2174
  method: 'POST',
2153
2175
  body: form
2154
2176
  });
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
- var encodedData = window.btoa(clientId + ':' + clientSecret);
1899
- var url = corsProxy + 'https://api-platform.cvent.com/ea/oauth2/token';
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/x-www-form-urlencoded',
1903
- Authorization: 'Basic ' + encodedData
1919
+ 'Content-Type': 'application/json',
1920
+ 'Accept': 'application/json'
1904
1921
  },
1905
- method: 'POST',
1906
- body: 'grant_type=client_credentials&client_id=' + clientId
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) {
@@ -1930,6 +1951,7 @@ var EventsDeck = function EventsDeck(_ref) {
1930
1951
 
1931
1952
  var cardLoader = function cardLoader() {
1932
1953
  var numberOfItemsBeforeAd = 5;
1954
+
1933
1955
  return React__default.createElement(
1934
1956
  Container,
1935
1957
  { style: { padding: 1 } },
@@ -2029,7 +2051,7 @@ var EventsDeck = function EventsDeck(_ref) {
2029
2051
  )
2030
2052
  )
2031
2053
  ),
2032
- speakerInfo && speakerInfo.length && React__default.createElement(
2054
+ speakerInfo && speakerInfo.length > 0 && React__default.createElement(
2033
2055
  Row,
2034
2056
  null,
2035
2057
  React__default.createElement(
@@ -2126,7 +2148,7 @@ var EventsDeck = function EventsDeck(_ref) {
2126
2148
  }
2127
2149
  };
2128
2150
 
2129
- var corsProxy$1 = 'https://cors-anywhere.herokuapp.com/';
2151
+ var corsProxy = 'https://cors-anywhere.herokuapp.com/';
2130
2152
  var itemsPerPage$1 = 10;
2131
2153
 
2132
2154
  var CMEDeck = function CMEDeck(_ref) {
@@ -2145,7 +2167,7 @@ var CMEDeck = function CMEDeck(_ref) {
2145
2167
  form.append('keyword', keywords);
2146
2168
  _context.prev = 5;
2147
2169
  _context.next = 8;
2148
- return fetch(corsProxy$1 + 'http://vaccine.mjhassoc.com/doc_loader.php', {
2170
+ return fetch(corsProxy + 'http://vaccine.mjhassoc.com/doc_loader.php', {
2149
2171
  method: 'POST',
2150
2172
  body: form
2151
2173
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.362",
3
+ "version": "1.0.364",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",