web-manager 2.1.20 → 2.1.26

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -240,6 +240,17 @@ function Manager() {
240
240
  user.getIdToken(false)
241
241
  .then(function(token) {
242
242
  var done;
243
+ // fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_api', {
244
+ // method: 'POST',
245
+ // body: JSON.stringify({
246
+ // authenticationToken: token,
247
+ // command: 'signup-handler',
248
+ // payload: {
249
+ // newsletterSignUp: domLib.select('.auth-newsletter-input').getValue(),
250
+ // affiliateCode: This.storage().get('auth.affiliateCode', '')
251
+ // }
252
+ // }),
253
+ // })
243
254
  fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_signUpHandler', {
244
255
  method: 'POST',
245
256
  body: JSON.stringify({
package/lib/account.js CHANGED
@@ -207,11 +207,21 @@ function _resolveAccount(self, currentUser, account, options) {
207
207
  account.plan.payment = account.plan.payment || {};
208
208
  account.plan.payment.startDate = account.plan.payment.startDate || {};
209
209
  account.plan.payment.startDate.timestamp = account.plan.payment.startDate.timestamp || '1999-01-01T00:00:00Z';
210
+ account.plan.payment.startDate.timestampUNIX = account.plan.payment.startDate.timestampUNIX || 0;
210
211
  account.plan.payment.frequency = account.plan.payment.frequency || 'unknown';
211
212
  account.plan.payment.orderId = account.plan.payment.orderId || 'unknown';
212
213
  account.plan.payment.resourceId = account.plan.payment.resourceId || 'unknown';
213
214
  account.plan.payment.active = account.plan.payment.active || false;
214
215
 
216
+ account.plan.payment.updatedBy = account.plan.payment.updatedBy || {};
217
+ account.plan.payment.updatedBy.event = account.plan.payment.updatedBy.event || {};
218
+ account.plan.payment.updatedBy.event.id = account.plan.payment.updatedBy.event.id || 'unknown';
219
+ account.plan.payment.updatedBy.event.name = account.plan.payment.updatedBy.event.name || 'unknown';
220
+ account.plan.payment.updatedBy.date = account.plan.payment.updatedBy.date || {};
221
+ account.plan.payment.updatedBy.date.timestamp = account.plan.payment.updatedBy.date.timestamp || '1999-01-01T00:00:00Z';
222
+ account.plan.payment.updatedBy.date.timestampUNIX = account.plan.payment.updatedBy.date.timestampUNIX || 0;
223
+
224
+
215
225
  var planExpireDate = new Date(account.plan.expires.timestamp);
216
226
  var now = new Date();
217
227
  var daysTillExpire = Math.floor(( planExpireDate - now ) / 86400000);
package/lib/dom.js CHANGED
@@ -250,22 +250,27 @@ Dom.prototype.exists = function() {
250
250
  }
251
251
 
252
252
  Dom.loadScript = function(options, callback) {
253
- options = options || {};
254
- options.async = (typeof options.async === 'undefined') ? false : options.async;
255
- options.crossorigin = (typeof options.crossorigin === 'undefined') ? false : options.crossorigin;
256
- var s = document.createElement('script');
257
- s.src = options.src;
258
- s.async = options.async;
259
- if (options.crossorigin) {
260
- s.setAttribute('crossorigin','*');
261
- }
262
- s.onload = function() {
263
- callback();
264
- };
265
- s.onerror = function() {
266
- callback(new Error('Failed to load script ' + options.src));
267
- };
268
- document.head.appendChild(s);
253
+ return new Promise(function(resolve, reject) {
254
+ options = options || {};
255
+ options.async = (typeof options.async === 'undefined') ? false : options.async;
256
+ options.crossorigin = (typeof options.crossorigin === 'undefined') ? false : options.crossorigin;
257
+ var s = document.createElement('script');
258
+ s.src = options.src;
259
+ s.async = options.async;
260
+ if (options.crossorigin) {
261
+ s.setAttribute('crossorigin','*');
262
+ }
263
+ s.onload = function() {
264
+ if (callback) { callback(); }
265
+ return resolve();
266
+ };
267
+ s.onerror = function() {
268
+ var error = new Error('Failed to load script ' + options.src);
269
+ if (callback) { callback(error); }
270
+ return reject(error);
271
+ };
272
+ document.head.appendChild(s);
273
+ });
269
274
  }
270
275
 
271
276
  Dom.select = function(selector, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "2.1.20",
3
+ "version": "2.1.26",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "homepage": "https://itwcreativeworks.com",
25
25
  "dependencies": {
26
- "@sentry/browser": "^6.11.0",
26
+ "@sentry/browser": "^6.15.0",
27
27
  "cookieconsent": "^3.1.1",
28
- "firebase": "^8.9.1",
28
+ "firebase": "^8.10.0",
29
29
  "lazysizes": "^5.3.2"
30
30
  }
31
31
  }