@myop/sdk 0.3.26 → 0.3.28
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/bundled-declarations.d.ts +2 -0
- package/dist/cjs/{_IframeSDK.f8e27dc0.js → _IframeSDK.7c201b5c.js} +22 -13
- package/dist/cjs/_IframeSDK.7c201b5c.js.map +7 -0
- package/dist/cjs/_IframeSDK.7cd7468c.min.js +1 -0
- package/dist/cjs/{_MyopHelpers.859b9bc8.js → _MyopHelpers.3eeac406.js} +3 -0
- package/dist/cjs/{_MyopHelpers.859b9bc8.js.map → _MyopHelpers.3eeac406.js.map} +2 -2
- package/dist/cjs/{_MyopHelpers.6fb8c382.min.js → _MyopHelpers.e8e1216b.min.js} +1 -1
- package/dist/cjs/{_WebComponentSDK.f8bc2f3a.js → _WebComponentSDK.952f7c87.js} +22 -13
- package/dist/cjs/_WebComponentSDK.952f7c87.js.map +7 -0
- package/dist/cjs/_WebComponentSDK.ead0b8a6.min.js +1 -0
- package/dist/cjs/{_hostSDK.9c5e7767.js → _hostSDK.a73e7b24.js} +22 -13
- package/dist/cjs/_hostSDK.a73e7b24.js.map +7 -0
- package/dist/cjs/_hostSDK.a882a5c1.min.js +1 -0
- package/dist/cjs/myop_sdk.js +14 -14
- package/dist/cjs/myop_sdk.js.map +1 -1
- package/dist/cjs/myop_sdk.min.js +1 -1
- package/dist/cjs-bundled/myop_sdk.bundled.js +23 -14
- package/dist/cjs-bundled/myop_sdk.bundled.js.map +2 -2
- package/dist/cjs-bundled/myop_sdk.bundled.min.js +1 -1
- package/dist/module/Iframe/index.js +23 -14
- package/dist/module/Iframe/index.js.map +2 -2
- package/dist/module/SDK.js +23 -14
- package/dist/module/SDK.js.map +2 -2
- package/dist/module/common/index.d.ts +2 -0
- package/dist/module/common/index.js +1 -1
- package/dist/module/common/index.js.map +2 -2
- package/dist/module/embeddedSDK.js +1 -1
- package/dist/module/helpers/index.js +4 -1
- package/dist/module/helpers/index.js.map +2 -2
- package/dist/module/host/embeddedSDK.js +1 -1
- package/dist/module/host/index.js +23 -14
- package/dist/module/host/index.js.map +2 -2
- package/dist/module/webcomponent/index.js +23 -14
- package/dist/module/webcomponent/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/cjs/_IframeSDK.8724e6a9.min.js +0 -1
- package/dist/cjs/_IframeSDK.f8e27dc0.js.map +0 -7
- package/dist/cjs/_WebComponentSDK.9222ca02.min.js +0 -1
- package/dist/cjs/_WebComponentSDK.f8bc2f3a.js.map +0 -7
- package/dist/cjs/_hostSDK.9c5e7767.js.map +0 -7
- package/dist/cjs/_hostSDK.e2851f6a.min.js +0 -1
|
@@ -1703,22 +1703,28 @@ var MyopIframeComponent = class extends BaseMyopComponent {
|
|
|
1703
1703
|
const prevMinWidth = container.style.minWidth;
|
|
1704
1704
|
if (needsHeightCollapse) container.style.minHeight = "".concat(currentIframeHeight, "px");
|
|
1705
1705
|
if (needsWidthCollapse) container.style.minWidth = "".concat(currentIframeWidth, "px");
|
|
1706
|
-
const measureStyle = contentDoc.createElement("style");
|
|
1707
|
-
measureStyle.id = "__myop_measure";
|
|
1708
|
-
const rules = [];
|
|
1709
|
-
if (needsHeightCollapse) {
|
|
1710
|
-
rules.push("height: auto !important", "min-height: 0 !important", "max-height: none !important");
|
|
1711
|
-
}
|
|
1712
|
-
if (needsWidthCollapse) {
|
|
1713
|
-
rules.push("width: auto !important", "min-width: 0 !important", "max-width: none !important");
|
|
1714
|
-
}
|
|
1715
|
-
measureStyle.textContent = "*, *::before, *::after { ".concat(rules.join("; "), "; flex-basis: auto !important; flex-grow: 0 !important; }");
|
|
1716
|
-
contentDoc.head.appendChild(measureStyle);
|
|
1717
1706
|
if (needsHeightCollapse) iframe.style.height = "0px";
|
|
1718
1707
|
if (needsWidthCollapse) iframe.style.width = "0px";
|
|
1719
1708
|
contentWidth = Math.ceil(Math.max(contentDoc.documentElement.scrollWidth, contentDoc.body.scrollWidth, contentDoc.body.getBoundingClientRect().width));
|
|
1720
1709
|
contentHeight = Math.ceil(Math.max(contentDoc.documentElement.scrollHeight, contentDoc.body.scrollHeight, contentDoc.body.getBoundingClientRect().height));
|
|
1721
|
-
|
|
1710
|
+
const needsNuclearHeight = needsHeightCollapse && contentHeight < 2;
|
|
1711
|
+
const needsNuclearWidth = needsWidthCollapse && contentWidth < 2;
|
|
1712
|
+
if (needsNuclearHeight || needsNuclearWidth) {
|
|
1713
|
+
const measureStyle = contentDoc.createElement("style");
|
|
1714
|
+
measureStyle.id = "__myop_measure";
|
|
1715
|
+
const rules = [];
|
|
1716
|
+
if (needsNuclearHeight) {
|
|
1717
|
+
rules.push("height: auto !important", "min-height: 0 !important", "max-height: none !important");
|
|
1718
|
+
}
|
|
1719
|
+
if (needsNuclearWidth) {
|
|
1720
|
+
rules.push("width: auto !important", "min-width: 0 !important", "max-width: none !important");
|
|
1721
|
+
}
|
|
1722
|
+
measureStyle.textContent = "*, *::before, *::after { ".concat(rules.join("; "), "; flex-basis: auto !important; flex-grow: 0 !important; }");
|
|
1723
|
+
contentDoc.head.appendChild(measureStyle);
|
|
1724
|
+
contentWidth = Math.ceil(Math.max(contentDoc.documentElement.scrollWidth, contentDoc.body.scrollWidth, contentDoc.body.getBoundingClientRect().width));
|
|
1725
|
+
contentHeight = Math.ceil(Math.max(contentDoc.documentElement.scrollHeight, contentDoc.body.scrollHeight, contentDoc.body.getBoundingClientRect().height));
|
|
1726
|
+
measureStyle.remove();
|
|
1727
|
+
}
|
|
1722
1728
|
container.style.minHeight = prevMinHeight;
|
|
1723
1729
|
container.style.minWidth = prevMinWidth;
|
|
1724
1730
|
}
|
|
@@ -2034,7 +2040,7 @@ var WebcomponentLoader = class extends BaseMyopLoader {
|
|
|
2034
2040
|
};
|
|
2035
2041
|
|
|
2036
2042
|
// version:myop-sdk-version
|
|
2037
|
-
var myop_sdk_version_default = "0.3.
|
|
2043
|
+
var myop_sdk_version_default = "0.3.28";
|
|
2038
2044
|
|
|
2039
2045
|
// src/host/embeddedSDK.ts
|
|
2040
2046
|
var EMBEDDED_SDK_CONTENT = "";
|
|
@@ -2449,6 +2455,7 @@ var _CloudRepository = class _CloudRepository {
|
|
|
2449
2455
|
this.variants[cacheKey].resolved = componentConfig;
|
|
2450
2456
|
resolve(componentConfig);
|
|
2451
2457
|
} catch (e) {
|
|
2458
|
+
delete this.variants[cacheKey];
|
|
2452
2459
|
reject(e);
|
|
2453
2460
|
}
|
|
2454
2461
|
}
|
|
@@ -2510,6 +2517,7 @@ var _CloudRepository = class _CloudRepository {
|
|
|
2510
2517
|
const json = await res.json();
|
|
2511
2518
|
resolve(json.item);
|
|
2512
2519
|
} catch (e) {
|
|
2520
|
+
delete this.userFlows[componentId];
|
|
2513
2521
|
reject(e);
|
|
2514
2522
|
}
|
|
2515
2523
|
}
|
|
@@ -2528,6 +2536,7 @@ var _CloudRepository = class _CloudRepository {
|
|
|
2528
2536
|
const json = await res.json();
|
|
2529
2537
|
resolve(json.item);
|
|
2530
2538
|
} catch (e) {
|
|
2539
|
+
delete this.userFlows[flowId];
|
|
2531
2540
|
reject(e);
|
|
2532
2541
|
}
|
|
2533
2542
|
}
|