@perceptimagery/dita-configurator-staging 0.1.5000 → 0.1.5001
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/dist/index.js +13 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111,7 +111,7 @@ var __publicField = (obj, key, value) => {
|
|
|
111
111
|
host: "https://api.sprie.io"
|
|
112
112
|
};
|
|
113
113
|
const config = Object.freeze(Config$1);
|
|
114
|
-
const version = "0.1.
|
|
114
|
+
const version = "0.1.5001";
|
|
115
115
|
class APIServiceFactory {
|
|
116
116
|
constructor(fetcher) {
|
|
117
117
|
__publicField(this, "isAuthenticated");
|
|
@@ -127,7 +127,6 @@ var __publicField = (obj, key, value) => {
|
|
|
127
127
|
*/
|
|
128
128
|
async Authenticate(apiKey) {
|
|
129
129
|
this.fetcher.LoadConfig();
|
|
130
|
-
console.log(this.fetcher.LoadConfig());
|
|
131
130
|
if (this.fetcher.IsTokenExpired() || this.fetcher.IsConfigExpired()) {
|
|
132
131
|
await this.AuthServiceApi(apiKey);
|
|
133
132
|
}
|
|
@@ -39395,7 +39394,6 @@ var __publicField = (obj, key, value) => {
|
|
|
39395
39394
|
|
|
39396
39395
|
`
|
|
39397
39396
|
);
|
|
39398
|
-
console.log("MinXis ", shader.uniforms.minX, "\n", "maxXis ", shader.uniforms.maxX, "\n", "MinYis ", shader.uniforms.minY, "\n", "MaxYis", shader.uniforms.maxY);
|
|
39399
39397
|
};
|
|
39400
39398
|
node.matrixAutoUpdate = true;
|
|
39401
39399
|
lensMaterial.matrixAutoUpdate = true;
|
|
@@ -40266,7 +40264,6 @@ var __publicField = (obj, key, value) => {
|
|
|
40266
40264
|
* @returns {boolean} true if success, false if error
|
|
40267
40265
|
*/
|
|
40268
40266
|
async Init() {
|
|
40269
|
-
this.loadMesage();
|
|
40270
40267
|
try {
|
|
40271
40268
|
this.scanApiKeyFromCurrentScriptTag();
|
|
40272
40269
|
await this.authenticate();
|
|
@@ -40277,7 +40274,6 @@ var __publicField = (obj, key, value) => {
|
|
|
40277
40274
|
await this.mountElement();
|
|
40278
40275
|
this.status = ESDKStatus.Done;
|
|
40279
40276
|
this.isLoaded = true;
|
|
40280
|
-
this.log(`SprieEmbed Loaded ${this.loadCount} embeds on this page`);
|
|
40281
40277
|
if (this.isLoaded) {
|
|
40282
40278
|
setTimeout(() => {
|
|
40283
40279
|
this.hideLoader();
|
|
@@ -40949,17 +40945,24 @@ var __publicField = (obj, key, value) => {
|
|
|
40949
40945
|
id: "Checkout-button",
|
|
40950
40946
|
onClick: () => {
|
|
40951
40947
|
if (selectedFrame && selectedLens) {
|
|
40952
|
-
const
|
|
40953
|
-
const
|
|
40948
|
+
const frameVariantId = selectedFrame.metadata.find((item) => item.key == "variantId");
|
|
40949
|
+
const lensVariantId = selectedLens.metadata.find((item) => item.key == "variantId");
|
|
40950
|
+
const frameId = frameVariantId ? frameVariantId.value : null;
|
|
40951
|
+
const lensId = lensVariantId ? lensVariantId.value : null;
|
|
40954
40952
|
const eventData = {
|
|
40955
|
-
|
|
40956
|
-
|
|
40953
|
+
frameIdentifier: frameId,
|
|
40954
|
+
lensIdentifier: lensId
|
|
40957
40955
|
};
|
|
40958
40956
|
customEvent.emitEvent("onAddToCart", eventData);
|
|
40957
|
+
if (frameId && lensId) {
|
|
40958
|
+
window.open("https://dita.com/cart/" + frameId + ":1," + lensId + ":1", "_blank");
|
|
40959
|
+
} else {
|
|
40960
|
+
console.log("Either the selected frame or the lens has an invalid identifier.");
|
|
40961
|
+
}
|
|
40959
40962
|
}
|
|
40960
40963
|
},
|
|
40961
40964
|
type: "button",
|
|
40962
|
-
children: "
|
|
40965
|
+
children: "Add to cart"
|
|
40963
40966
|
}
|
|
40964
40967
|
)
|
|
40965
40968
|
] })
|
|
@@ -48698,8 +48701,6 @@ var __publicField = (obj, key, value) => {
|
|
|
48698
48701
|
};
|
|
48699
48702
|
this.sdkService = new SDKServiceFactory(sdkProps);
|
|
48700
48703
|
this.sdkService.Init();
|
|
48701
|
-
console.log("SDK succesfully intialized:");
|
|
48702
|
-
console.log("Hi from https://sprie.io/");
|
|
48703
48704
|
}
|
|
48704
48705
|
load(sku) {
|
|
48705
48706
|
this.uiService.loadBySKU(sku);
|