@plattar/plattar-ar-adapter 1.140.3 → 1.147.1

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.
@@ -989,12 +989,6 @@ var ControllerState;
989
989
  * All Plattar Controllers are derived from the same interface
990
990
  */
991
991
  class PlattarController {
992
- constructor(parent) {
993
- this._state = ControllerState.None;
994
- this._element = null;
995
- this._prevQROpt = null;
996
- this._parent = parent;
997
- }
998
992
  /**
999
993
  * Default QR Code rendering options
1000
994
  */
@@ -1002,11 +996,17 @@ class PlattarController {
1002
996
  return {
1003
997
  color: this.getAttribute("qr-color") || "#101721",
1004
998
  qrType: this.getAttribute("qr-style") || "default",
1005
- shorten: this.getAttribute("qr-shorten") || false,
999
+ shorten: this.getAttribute("qr-shorten") || true,
1006
1000
  margin: 0
1007
1001
  };
1008
1002
  }
1009
1003
  ;
1004
+ constructor(parent) {
1005
+ this._state = ControllerState.None;
1006
+ this._element = null;
1007
+ this._prevQROpt = null;
1008
+ this._parent = parent;
1009
+ }
1010
1010
  /**
1011
1011
  * Initialise and start AR mode if available
1012
1012
  */
@@ -2241,7 +2241,7 @@ exports.Util = Util;
2241
2241
  },{}],16:[function(require,module,exports){
2242
2242
  "use strict";
2243
2243
  Object.defineProperty(exports, "__esModule", { value: true });
2244
- exports.default = "1.140.3";
2244
+ exports.default = "1.147.1";
2245
2245
 
2246
2246
  },{}],17:[function(require,module,exports){
2247
2247
  "use strict";
@@ -3539,6 +3539,9 @@ class AnalyticsData {
3539
3539
  get data() {
3540
3540
  return Object.fromEntries(this._map);
3541
3541
  }
3542
+ get map() {
3543
+ return this._map;
3544
+ }
3542
3545
  static _GetUserID() {
3543
3546
  const key = "plattar_user_id";
3544
3547
  let userID = null;
@@ -3708,26 +3711,22 @@ class GoogleAnalytics {
3708
3711
  this._tokens.forEach((token) => {
3709
3712
  const gInstance = gtag;
3710
3713
  if (gInstance) {
3711
- gInstance("event", "app_dimension", { "application_id": data.get("applicationId") });
3712
- gInstance("event", "app_dimension", { "application_title": data.get("applicationTitle") });
3714
+ const eventCategory = data.get("eventCategory"); // 0
3715
+ const eventAction = data.get("eventAction"); // 1
3716
+ const eventLabel = data.get("eventLabel"); // 2
3717
+ var fields = {
3718
+ "send_to": token,
3719
+ "event_category": eventCategory,
3720
+ "event_label": eventLabel
3721
+ };
3722
+ data.map.forEach((value, key) => {
3723
+ fields[key] = value;
3724
+ });
3713
3725
  if (event === "track") {
3714
- const eventCategory = data.get("eventCategory"); // 0
3715
- const eventAction = data.get("eventAction"); // 1
3716
- const eventLabel = data.get("eventLabel"); // 2
3717
- gInstance("event", eventAction, {
3718
- "send_to": token,
3719
- "event_category": eventCategory,
3720
- "event_label": eventLabel
3721
- });
3726
+ gInstance("event", eventAction, fields);
3722
3727
  }
3723
3728
  if (event === "pageview") {
3724
- const eventCategory = data.get("eventCategory"); // 0
3725
- const eventLabel = data.get("eventLabel"); // 2
3726
- gInstance("event", "pageview", {
3727
- "send_to": token,
3728
- "event_category": eventCategory,
3729
- "event_label": eventLabel
3730
- });
3729
+ gInstance("event", "pageview", fields);
3731
3730
  }
3732
3731
  }
3733
3732
  });
@@ -3866,7 +3865,7 @@ exports.Util = Util;
3866
3865
  },{}],42:[function(require,module,exports){
3867
3866
  "use strict";
3868
3867
  Object.defineProperty(exports, "__esModule", { value: true });
3869
- exports.default = "1.134.3";
3868
+ exports.default = "1.144.2";
3870
3869
 
3871
3870
  },{}],43:[function(require,module,exports){
3872
3871
  "use strict";
@@ -4651,9 +4650,9 @@ PlattarServer.match = (serverName) => {
4651
4650
  case "cdn-staging.plattar.space":
4652
4651
  case "staging":
4653
4652
  return {
4654
- base: "https://staging.plattar.space/",
4655
- api_read: "https://staging.plattar.space/api/v2/",
4656
- api_write: "https://cms.plattar.space/api/v2/",
4653
+ base: "https://api.plattar.space/",
4654
+ api_read: "https://api.plattar.space/v3/",
4655
+ api_write: "https://api.plattar.space/v3/",
4657
4656
  cdn: "https://cdn-staging.plattar.space/",
4658
4657
  cdn_image: "https://images.plattar.space/",
4659
4658
  analytics: "https://c.plattar.space/api/v2/analytics",
@@ -5898,7 +5897,7 @@ PlattarUtil.match = (type) => {
5898
5897
 
5899
5898
  module.exports = PlattarUtil;
5900
5899
  },{"../types/application.js":46,"../types/content-pipeline/brief.js":47,"../types/content-pipeline/comment-brief.js":48,"../types/content-pipeline/comment-quote.js":49,"../types/content-pipeline/comment-solution.js":50,"../types/content-pipeline/folder.js":51,"../types/content-pipeline/pipeline-user.js":52,"../types/content-pipeline/quote.js":53,"../types/content-pipeline/rating.js":54,"../types/content-pipeline/solution.js":55,"../types/file/file-audio.js":56,"../types/file/file-image.js":58,"../types/file/file-model.js":59,"../types/file/file-script.js":60,"../types/file/file-video.js":61,"../types/interfaces/plattar-object.js":64,"../types/misc/application-build.js":65,"../types/misc/asset-library":66,"../types/misc/async-job.js":67,"../types/misc/script-event.js":68,"../types/misc/tag.js":69,"../types/page/card-button.js":71,"../types/page/card-html.js":72,"../types/page/card-iframe.js":73,"../types/page/card-image.js":74,"../types/page/card-map.js":75,"../types/page/card-paragraph.js":76,"../types/page/card-row.js":77,"../types/page/card-slider.js":78,"../types/page/card-title.js":79,"../types/page/card-video.js":80,"../types/page/card-youtube.js":81,"../types/page/page.js":82,"../types/product/product-annotation.js":83,"../types/product/product-variation.js":85,"../types/product/product.js":86,"../types/scene/scene-annotation.js":87,"../types/scene/scene-audio.js":88,"../types/scene/scene-button.js":90,"../types/scene/scene-camera.js":91,"../types/scene/scene-carousel.js":92,"../types/scene/scene-image.js":93,"../types/scene/scene-model.js":94,"../types/scene/scene-panorama.js":95,"../types/scene/scene-poller.js":96,"../types/scene/scene-product.js":97,"../types/scene/scene-script.js":98,"../types/scene/scene-shadow.js":99,"../types/scene/scene-video.js":100,"../types/scene/scene-volumetric.js":101,"../types/scene/scene-youtube.js":102,"../types/scene/scene.js":103,"../types/trigger/trigger-image.js":104}],106:[function(require,module,exports){
5901
- module.exports = "1.120.1";
5900
+ module.exports = "1.147.1";
5902
5901
 
5903
5902
  },{}],107:[function(require,module,exports){
5904
5903
  const QRCodeStyling = require("qr-code-styling");
@@ -6119,7 +6118,7 @@ class BaseElement extends HTMLElement {
6119
6118
 
6120
6119
  try {
6121
6120
  const b64 = btoa(url);
6122
- const endpoint = "https://c.plattar.space/api/v2/shorten?base64=" + b64;
6121
+ const endpoint = "https://c2.plattar.space/api/v2/shorten?base64=" + b64;
6123
6122
 
6124
6123
  fetch(endpoint).then((response) => {
6125
6124
  if (!response.ok) {
@@ -6168,9 +6167,8 @@ module.exports = {
6168
6167
  version: Version
6169
6168
  };
6170
6169
  },{"./elements/qrcode-element.js":108,"./version":110}],110:[function(require,module,exports){
6171
- module.exports = "1.134.1";
6172
-
6173
- },{}],111:[function(require,module,exports){
6170
+ arguments[4][106][0].apply(exports,arguments)
6171
+ },{"dup":106}],111:[function(require,module,exports){
6174
6172
  "use strict";
6175
6173
  var __importDefault = (this && this.__importDefault) || function (mod) {
6176
6174
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -7242,18 +7240,19 @@ var getGlobal = function () {
7242
7240
  throw new Error('unable to locate global object');
7243
7241
  }
7244
7242
 
7245
- var global = getGlobal();
7243
+ var globalObject = getGlobal();
7246
7244
 
7247
- module.exports = exports = global.fetch;
7245
+ module.exports = exports = globalObject.fetch;
7248
7246
 
7249
7247
  // Needed for TypeScript and Webpack.
7250
- if (global.fetch) {
7251
- exports.default = global.fetch.bind(global);
7248
+ if (globalObject.fetch) {
7249
+ exports.default = globalObject.fetch.bind(globalObject);
7252
7250
  }
7253
7251
 
7254
- exports.Headers = global.Headers;
7255
- exports.Request = global.Request;
7256
- exports.Response = global.Response;
7252
+ exports.Headers = globalObject.Headers;
7253
+ exports.Request = globalObject.Request;
7254
+ exports.Response = globalObject.Response;
7255
+
7257
7256
  }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
7258
7257
  },{}],132:[function(require,module,exports){
7259
7258
  (function (global){(function (){