whenFirstSeen("[data-fancybox]", () => {
void import("./Component/Image/Viewer").then(({ setup }) => setup());
});
+ whenFirstSeen(".jsImageViewer", () => {
+ console.warn("The class `jsImageViewer` is deprecated. Use the attribute `data-fancybox` instead.");
+ void import("./Component/Image/Viewer").then(({ setupLegacy }) => setupLegacy());
+ });
// Move the reCAPTCHA widget overlay to the `pageOverlayContainer`
// when widget form elements are placed in a dialog.
});
}
+export function setupLegacy() {
+ void getDefaultConfig().then((config) => {
+ Fancybox.bind(".jsImageViewer", {
+ ...config,
+ groupAll: true,
+ });
+ });
+}
+
export async function createFancybox(userSlides?: Array<userSlideType>): Promise<Fancybox> {
return new Fancybox(userSlides, await getDefaultConfig());
}
(0, LazyLoader_1.whenFirstSeen)("[data-fancybox]", () => {
void new Promise((resolve_9, reject_9) => { require(["./Component/Image/Viewer"], resolve_9, reject_9); }).then(tslib_1.__importStar).then(({ setup }) => setup());
});
+ (0, LazyLoader_1.whenFirstSeen)(".jsImageViewer", () => {
+ console.warn("The class `jsImageViewer` is deprecated. Use the attribute `data-fancybox` instead.");
+ void new Promise((resolve_10, reject_10) => { require(["./Component/Image/Viewer"], resolve_10, reject_10); }).then(tslib_1.__importStar).then(({ setupLegacy }) => setupLegacy());
+ });
// Move the reCAPTCHA widget overlay to the `pageOverlayContainer`
// when widget form elements are placed in a dialog.
const observer = new MutationObserver((mutations) => {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setup = setup;
+ exports.setupLegacy = setupLegacy;
exports.createFancybox = createFancybox;
exports.getLocalization = getLocalization;
const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"];
ui_1.Fancybox.bind("[data-fancybox]", config);
});
}
+ function setupLegacy() {
+ void getDefaultConfig().then((config) => {
+ ui_1.Fancybox.bind(".jsImageViewer", {
+ ...config,
+ groupAll: true,
+ });
+ });
+ }
async function createFancybox(userSlides) {
return new ui_1.Fancybox(userSlides, await getDefaultConfig());
}