@next-core/brick-kit 2.131.1 → 2.132.0
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/CHANGELOG.md +16 -0
- package/dist/index.bundle.js +44 -51
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +44 -52
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/internal/getGeneralGlobals.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1565,44 +1565,6 @@ function getDynamicReadOnlyProxy(_ref) {
|
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
1567
|
|
|
1568
|
-
var misc;
|
|
1569
|
-
function getRuntimeMisc() {
|
|
1570
|
-
if (!misc) {
|
|
1571
|
-
misc = {
|
|
1572
|
-
isInIframe: false,
|
|
1573
|
-
isInIframeOfSameSite: false,
|
|
1574
|
-
isInIframeOfNext: false,
|
|
1575
|
-
isInIframeOfVisualBuilder: false,
|
|
1576
|
-
isInIframeOfLegacyConsole: false
|
|
1577
|
-
};
|
|
1578
|
-
|
|
1579
|
-
if (window !== window.parent) {
|
|
1580
|
-
misc.isInIframe = true;
|
|
1581
|
-
|
|
1582
|
-
try {
|
|
1583
|
-
// Handle:
|
|
1584
|
-
// - Previewing in visual builder by iframe.
|
|
1585
|
-
// - Nesting next in next.
|
|
1586
|
-
// - Nesting console in next.
|
|
1587
|
-
if (window.origin === window.parent.origin) {
|
|
1588
|
-
misc.isInIframeOfSameSite = true;
|
|
1589
|
-
var selfIsNext = getBasePath() === "/next/";
|
|
1590
|
-
var parentPathname = window.parent.location.pathname;
|
|
1591
|
-
var parentIsNext = parentPathname.startsWith("/next/");
|
|
1592
|
-
misc.isInIframeOfNext = (Number(selfIsNext) ^ Number(parentIsNext)) === 0;
|
|
1593
|
-
misc.isInIframeOfVisualBuilder = parentPathname.startsWith("".concat(parentIsNext ? "/next" : "", "/visual-builder/"));
|
|
1594
|
-
misc.isInIframeOfLegacyConsole = selfIsNext && !parentIsNext;
|
|
1595
|
-
}
|
|
1596
|
-
} catch (e) {// do nothing
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
Object.freeze(misc);
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
return misc;
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
1568
|
// `GeneralGlobals` are globals which are page-state-agnostic,
|
|
1607
1569
|
// thus they can be used both in storyboard expressions and functions.
|
|
1608
1570
|
function getGeneralGlobals(attemptToVisitGlobals, options) {
|
|
@@ -1655,9 +1617,6 @@ function getIndividualGlobal(variableName, _ref) {
|
|
|
1655
1617
|
getCssPropertyValue: collectCoverage ? () => "" : getCssPropertyValue
|
|
1656
1618
|
};
|
|
1657
1619
|
|
|
1658
|
-
case "RUNTIME_MISC":
|
|
1659
|
-
return collectCoverage ? fakeRuntimeMisc() : getRuntimeMisc();
|
|
1660
|
-
|
|
1661
1620
|
case "console":
|
|
1662
1621
|
return isStoryboardFunction ? getReadOnlyProxy(console) : undefined;
|
|
1663
1622
|
|
|
@@ -1693,16 +1652,6 @@ function fakeCheckPermissions() {
|
|
|
1693
1652
|
return true;
|
|
1694
1653
|
}
|
|
1695
1654
|
|
|
1696
|
-
function fakeRuntimeMisc() {
|
|
1697
|
-
return {
|
|
1698
|
-
isInIframe: false,
|
|
1699
|
-
isInIframeOfSameSite: false,
|
|
1700
|
-
isInIframeOfNext: false,
|
|
1701
|
-
isInIframeOfVisualBuilder: false,
|
|
1702
|
-
isInIframeOfLegacyConsole: false
|
|
1703
|
-
};
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
1655
|
/** @internal */
|
|
1707
1656
|
|
|
1708
1657
|
/** @internal */
|
|
@@ -8820,6 +8769,44 @@ function getPropsOfCustomTemplate(tagName) {
|
|
|
8820
8769
|
return ((_state$map = state === null || state === void 0 ? void 0 : state.map(item => item.name)) !== null && _state$map !== void 0 ? _state$map : []).concat(Object.keys((_proxy$properties = proxy === null || proxy === void 0 ? void 0 : proxy.properties) !== null && _proxy$properties !== void 0 ? _proxy$properties : {}));
|
|
8821
8770
|
}
|
|
8822
8771
|
|
|
8772
|
+
var misc;
|
|
8773
|
+
function getRuntimeMisc() {
|
|
8774
|
+
if (!misc) {
|
|
8775
|
+
misc = {
|
|
8776
|
+
isInIframe: false,
|
|
8777
|
+
isInIframeOfSameSite: false,
|
|
8778
|
+
isInIframeOfNext: false,
|
|
8779
|
+
isInIframeOfVisualBuilder: false,
|
|
8780
|
+
isInIframeOfLegacyConsole: false
|
|
8781
|
+
};
|
|
8782
|
+
|
|
8783
|
+
if (window !== window.parent) {
|
|
8784
|
+
misc.isInIframe = true;
|
|
8785
|
+
|
|
8786
|
+
try {
|
|
8787
|
+
// Handle:
|
|
8788
|
+
// - Previewing in visual builder by iframe.
|
|
8789
|
+
// - Nesting next in next.
|
|
8790
|
+
// - Nesting console in next.
|
|
8791
|
+
if (window.origin === window.parent.origin) {
|
|
8792
|
+
misc.isInIframeOfSameSite = true;
|
|
8793
|
+
var selfIsNext = getBasePath() === "/next/";
|
|
8794
|
+
var parentPathname = window.parent.location.pathname;
|
|
8795
|
+
var parentIsNext = parentPathname.startsWith("/next/");
|
|
8796
|
+
misc.isInIframeOfNext = (Number(selfIsNext) ^ Number(parentIsNext)) === 0;
|
|
8797
|
+
misc.isInIframeOfVisualBuilder = parentPathname.startsWith("".concat(parentIsNext ? "/next" : "", "/visual-builder/"));
|
|
8798
|
+
misc.isInIframeOfLegacyConsole = selfIsNext && !parentIsNext;
|
|
8799
|
+
}
|
|
8800
|
+
} catch (e) {// do nothing
|
|
8801
|
+
}
|
|
8802
|
+
}
|
|
8803
|
+
|
|
8804
|
+
Object.freeze(misc);
|
|
8805
|
+
}
|
|
8806
|
+
|
|
8807
|
+
return misc;
|
|
8808
|
+
}
|
|
8809
|
+
|
|
8823
8810
|
class Kernel {
|
|
8824
8811
|
constructor() {
|
|
8825
8812
|
var _this = this;
|
|
@@ -8950,6 +8937,11 @@ class Kernel {
|
|
|
8950
8937
|
|
|
8951
8938
|
listenDevtoolsEagerly();
|
|
8952
8939
|
_this2.mountPoints = mountPoints;
|
|
8940
|
+
|
|
8941
|
+
if (getRuntimeMisc().isInIframeOfSameSite && !getRuntimeMisc().isInIframeOfVisualBuilder) {
|
|
8942
|
+
document.body.classList.add("bars-hidden-in-iframe");
|
|
8943
|
+
}
|
|
8944
|
+
|
|
8953
8945
|
yield Promise.all([_this2.loadCheckLogin(), _this2.loadMicroApps()]);
|
|
8954
8946
|
|
|
8955
8947
|
if (_this2.bootstrapData.storyboards.length === 0) {
|
|
@@ -14776,5 +14768,5 @@ function useProvider() {
|
|
|
14776
14768
|
}));
|
|
14777
14769
|
}
|
|
14778
14770
|
|
|
14779
|
-
export { BrickAsComponent, BrickWrapper, DisplayByFeatureFlags, EasyopsEmpty, ErrorBoundary, FeatureFlagsProvider, ForwardRefSingleBrickAsComponent, ModalElement, SingleBrickAsComponent, StoryboardFunctionRegistryFactory, UpdatingElement, authenticate, batchSetAppsLocalTheme, checkIf, checkIfByTransform, createHistory, createRuntime, developHelper, doTransform, event, getAuth, getCssPropertyValue, getCurrentTheme, getHistory, getMockInfo, getRuntime, handleHttpError, httpErrorToString, i18nText, initI18n, isLoggedIn, logout, looseCheckIf, looseCheckIfByTransform, looseCheckIfOfComputed, method, preprocessTransformProperties, property, reTransformForDevtools, renderEasyopsEmpty, transformElementProperties, transformIntermediateData, transformProperties, useApplyPageTitle, useCurrentApp, useCurrentMode, useCurrentTheme, useFeatureFlags, useLocation, useProvider, useRecentApps };
|
|
14771
|
+
export { BrickAsComponent, BrickWrapper, DisplayByFeatureFlags, EasyopsEmpty, ErrorBoundary, FeatureFlagsProvider, ForwardRefSingleBrickAsComponent, ModalElement, SingleBrickAsComponent, StoryboardFunctionRegistryFactory, UpdatingElement, authenticate, batchSetAppsLocalTheme, checkIf, checkIfByTransform, createHistory, createRuntime, developHelper, doTransform, event, getAuth, getCssPropertyValue, getCurrentTheme, getHistory, getMockInfo, getRuntime, getRuntimeMisc, handleHttpError, httpErrorToString, i18nText, initI18n, isLoggedIn, logout, looseCheckIf, looseCheckIfByTransform, looseCheckIfOfComputed, method, preprocessTransformProperties, property, reTransformForDevtools, renderEasyopsEmpty, transformElementProperties, transformIntermediateData, transformProperties, useApplyPageTitle, useCurrentApp, useCurrentMode, useCurrentTheme, useFeatureFlags, useLocation, useProvider, useRecentApps };
|
|
14780
14772
|
//# sourceMappingURL=index.esm.js.map
|