@widgetic/editor 3.10.42 → 3.10.43

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/lib/dev/editor.js CHANGED
@@ -13347,7 +13347,7 @@ WidgetEditor = (function(superClass) {
13347
13347
  this.el.append(this.tabs.el);
13348
13348
  LoginPopup.place(this.el);
13349
13349
  Blogvio.pubsub.subscribe('api/token/update', this._updateLoggedInStatus);
13350
- this.el.attr('editorVersion', "3.10.42");
13350
+ this.el.attr('editorVersion', "3.10.43");
13351
13351
  }
13352
13352
 
13353
13353
 
@@ -23278,7 +23278,7 @@ try {
23278
23278
  api.token = localStorage.getItem('instagramAuthToken');
23279
23279
  } catch (error1) {}
23280
23280
 
23281
- console.log("EDITOR Instagram Service current user's token:", api.token);
23281
+ console.log("Editor Instagram Service current user's token:", api.token);
23282
23282
 
23283
23283
  auth_url = "https://api.instagram.com/oauth/authorize/?client_id=" + api.client_id + "&redirect_uri=" + api.redirect_uri + "&response_type=" + api.response_type + "&scope=" + api.scope;
23284
23284
 
@@ -23300,7 +23300,6 @@ InstagramService = (function(superClass) {
23300
23300
 
23301
23301
  InstagramService.prototype.getUser = function(token) {
23302
23302
  var url;
23303
- console.log("Editor Instagram Service getUser:", token, api.api_url);
23304
23303
  url = api.api_url + "/me";
23305
23304
  return $.ajax({
23306
23305
  url: url,
@@ -23316,16 +23315,17 @@ InstagramService = (function(superClass) {
23316
23315
  if (interactive == null) {
23317
23316
  interactive = true;
23318
23317
  }
23318
+ console.log("Editor Instagram Service _auth method:", interactive, api.token);
23319
23319
  if (api.token != null) {
23320
23320
  this.getUser(api.token).then((function(_this) {
23321
23321
  return function(result) {
23322
- console.log("Editor get User result:", result);
23322
+ console.log("Editor Instagram Service getUser result:", result);
23323
23323
  _this.user = result;
23324
23324
  return _this.trigger('auth', _this.authenticated = true);
23325
23325
  };
23326
23326
  })(this))["catch"]((function(_this) {
23327
23327
  return function() {
23328
- console.log("Editor get User error:", error);
23328
+ console.log("Editor Instagram Service getUser error:", error);
23329
23329
  return _this.deauth();
23330
23330
  };
23331
23331
  })(this));
@@ -23972,12 +23972,17 @@ InstagramBrowser = (function(superClass) {
23972
23972
  this.connectedAccount = this.content[0];
23973
23973
  this.service.getUser(this.connectedAccount.token).then((function(_this) {
23974
23974
  return function(user) {
23975
+ console.log("Editor Instagram Browser CT getUser result:", user);
23975
23976
  if (user.error) {
23976
- return _this.onAuth(false);
23977
+ return _this._updateLogoutIntent(_this.connectedAccount);
23977
23978
  } else {
23978
23979
  return _this._updateLogoutIntent(user);
23979
23980
  }
23980
23981
  };
23982
+ })(this))["catch"]((function(_this) {
23983
+ return function(err) {
23984
+ return console.log("Editor Browser getUser err:", err);
23985
+ };
23981
23986
  })(this));
23982
23987
  }
23983
23988
  }
@@ -23999,6 +24004,7 @@ InstagramBrowser = (function(superClass) {
23999
24004
  };
24000
24005
 
24001
24006
  InstagramBrowser.prototype.auth = function(e) {
24007
+ console.log("Editor Instagram Browser auth handler:", e, this.authenticated);
24002
24008
  if (this.authenticated) {
24003
24009
  return;
24004
24010
  }
@@ -24009,7 +24015,7 @@ InstagramBrowser = (function(superClass) {
24009
24015
  InstagramBrowser.prototype.onAuth = function(authenticated) {
24010
24016
  var item;
24011
24017
  this.authenticated = authenticated;
24012
- console.log("Editor browser onAuth:", this.authenticated);
24018
+ console.log("Editor Instagram Browser onAuth:", this.authenticated, this.service.user);
24013
24019
  this.el.attr({
24014
24020
  authenticated: this.authenticated
24015
24021
  });
@@ -24028,6 +24034,7 @@ InstagramBrowser = (function(superClass) {
24028
24034
  item.type = 'user_id';
24029
24035
  item.id = this.service.user.id;
24030
24036
  item.url = 'Instagram User: @' + this.service.user.username;
24037
+ item.username = this.service.user.username;
24031
24038
  this.connectedAccount = item;
24032
24039
  return this.trigger('add', item);
24033
24040
  };
@@ -24055,7 +24062,6 @@ InstagramBrowser = (function(superClass) {
24055
24062
  };
24056
24063
 
24057
24064
  InstagramBrowser.prototype._updateLogoutIntent = function(user) {
24058
- console.log("update logout intent:", user);
24059
24065
  this.logoutIntent.remove();
24060
24066
  this.logoutIntent = $(LogoutIntent(user));
24061
24067
  return this.el.append(this.logoutIntent);