Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
!thirdPartyCookiesCheck.thirdPartyCookieScriptLocation &&
'luigi.third-party-cookie' === e.data.msg
) {
if (e.data.tpc === 'disabled') {
tpcErrorHandling(thirdPartyCookiesCheck);
}
}
});
// listeners are not automatically removed — cancel
// them to prevent memory leaks
// this.on('destroy', storeListener.cancel);
enableRouting(node, config);
}
setContext('store', store);
setContext('getTranslation', getTranslation);
const tpcErrorHandling = thirdpartycookiecheck => {
if (
thirdPartyCookiesCheck &&
thirdPartyCookiesCheck.thirdPartyCookieErrorHandling &&
GenericHelpers.isFunction(
thirdPartyCookiesCheck.thirdPartyCookieErrorHandling
)
) {
thirdPartyCookiesCheck.thirdPartyCookieErrorHandling();
}
};
export const pathExists = async path => {
const data = {
const modalIframeCreated = event => {
modalIframe = event.detail.modalIframe;
modalIframeData = event.detail.modalIframeData;
};
const closeModal = () => {
if (modalIframe) {
getUnsavedChangesModalPromise(modalIframe.contentWindow).then(() => {
mfModal = {
displayed: false
};
});
}
};
setContext('openViewInModal', openViewInModal);
function init(node) {
const isolateAllViews = LuigiConfig.getConfigValue(
'navigation.defaults.isolateView'
);
const config = {
iframe: null,
navigateOk: null,
builderCompatibilityMode: Boolean(window.builderCompatibilityMode),
isolateAllViews
};
LuigiI18N.addCurrentLocaleChangeListener(locale => {
const message = {
msg: 'luigi.current-locale-changed',
currentLocale: locale
};
export function createBasePath(basePath) {
setContext(CONTEXT_KEY, basePath);
}
function createHistory(baseHistory) {
setContext(HISTORY_KEY, baseHistory);
return baseHistory;
}
export function setup(router) {
const initial = router.current();
const response = readable(initial.response, set => {
return router.observe(({ response }) => {
set(response);
});
});
const navigation = readable(initial.navigation, set => {
return router.observe(({ navigation }) => {
set(navigation);
});
});
setContext(routerKey, router);
setContext(responseKey, response);
setContext(navigationKey, navigation);
}
export function getDepth() {
const currentDepth = getContext(CONTEXT_DEPTH_KEY) + 1;
setContext(CONTEXT_DEPTH_KEY, currentDepth);
return currentDepth;
}
export function setup(router) {
const initial = router.current();
const response = readable(initial.response, set => {
return router.observe(({ response }) => {
set(response);
});
});
const navigation = readable(initial.navigation, set => {
return router.observe(({ navigation }) => {
set(navigation);
});
});
setContext(routerKey, router);
setContext(responseKey, response);
setContext(navigationKey, navigation);
}
export function setup(router) {
const initial = router.current();
const response = readable(initial.response, set => {
return router.observe(({ response }) => {
set(response);
});
});
const navigation = readable(initial.navigation, set => {
return router.observe(({ navigation }) => {
set(navigation);
});
});
setContext(routerKey, router);
setContext(responseKey, response);
setContext(navigationKey, navigation);
}