declare module "vendor/microevent" { class MicroEvent = Record, N extends keyof EventMap = keyof EventMap> { _eventTypes: EventMap; _events: Partial void)[]>>; bind(eventName: EN, callback: (...args: EventMap[EN]) => void): void; unbind(eventName: EN, callback: (...args: EventMap[EN]) => void): void; trigger(eventName: EN, ...args: EventMap[EN]): void; } type TypeArg = C extends MicroEvent ? U : never; export type EventArg> = TypeArg[N][0]; export default MicroEvent; } declare module "lib/incito-browser/types" { interface TjekOfferV1 { ids: { type: string; provider: string; value: string; }[]; title: string; description: string; quantity: string; products: { id: string; title: string; image: string; }[]; labels: any[]; link: string; } export type Views = FallbackView | View | TextView | AbsoluteLayout | FlexLayout | ImageView | VideoEmbedView | VideoView; type Color = string; type Unit = number | { [k: string]: unknown; }; /** * Layout format */ export interface IIncito { /** * The identifier of the Incito used to future reference. */ id: string; /** * The Incito specification version */ version: '1.0.0'; /** * The locale that defines the contents in `root_view` the best. */ locale?: string; /** * An object that can contain any metadata for the Incito. */ meta?: { author?: string; system?: string; build_time?: number; [k: string]: unknown; }; /** * The main view entry point for the Incito. */ root_view: FallbackView | View | TextView | AbsoluteLayout | FlexLayout | ImageView | VideoEmbedView | VideoView; /** * External font assets loaded to be used in the Incito. */ font_assets?: { [k: string]: { src: [ ('woff' | 'woff2' | 'truetype' | 'svg' | 'opentype' | 'embedded-opentype'), string ][]; weight?: string; style?: string; [k: string]: unknown; }; }; /** * The overall theme of the Incito that all views inherit from. */ theme?: { font_family?: [string, ...string[]]; background_color?: Color; text_color?: Color; line_spacing_multiplier?: number; style?: string; }; /** * Table of Contents */ table_of_contents?: { title: string; view_id: string; }[]; [k: string]: unknown; } interface FallbackView { id?: string; role?: string; /** * Container for meta data */ meta?: { ['tjek.offer.v1']?: TjekOfferV1; title?: string; [k: string]: unknown; }; feature_labels?: string[]; child_views?: Views[]; background_color?: Color; background_image?: string; background_tile_mode?: 'repeat_x' | 'repeat_y' | 'repeat'; background_image_position?: 'left_top' | 'left_center' | 'left_bottom' | 'center_top' | 'center_center' | 'center_bottom' | 'right_top' | 'right_center' | 'right_bottom'; background_image_scale_type?: 'center_crop' | 'center_inside'; gravity?: 'center_horizontal' | 'left_horizontal' | 'right_horizontal'; accessibility_label?: string; accessibility_hidden?: boolean; clip_children?: boolean; title?: string; link?: string; layout_width?: Unit; layout_height?: Unit; max_height?: Unit; max_width?: Unit; min_width?: Unit; min_height?: Unit; layout_left?: Unit; layout_top?: Unit; layout_bottom?: Unit; layout_margin?: Unit; layout_margin_left?: Unit; layout_margin_right?: Unit; layout_margin_bottom?: Unit; layout_margin_top?: Unit; padding?: Unit; padding_top?: Unit; padding_left?: Unit; padding_right?: Unit; padding_bottom?: Unit; layout_right?: Unit; transform_scale?: number; transform_translate_x?: Unit; transform_translate_y?: Unit; transform_rotate?: number; transform_origin?: [string, string]; stroke_color?: Color; stroke_width?: Unit; stroke_style?: 'solid' | 'dotted' | 'dashed'; stroke_top_width?: Unit; stroke_top_color?: Color; stroke_right_width?: Unit; stroke_right_color?: Color; stroke_bottom_width?: Unit; stroke_bottom_color?: Color; stroke_left_width?: Unit; stroke_left_color?: Color; corner_radius?: Unit; corner_top_right_radius?: Unit; corner_top_left_radius?: Unit; corner_bottom_right_radius?: Unit; corner_bottom_left_radius?: Unit; shadow_color?: Color; shadow_dx?: number; shadow_dy?: number; shadow_radius?: number; layout_flex_shrink?: number; layout_flex_grow?: number; layout_flex_basis?: Unit; [k: string]: unknown; } interface View extends FallbackView { view_name: 'View'; } export interface TextView extends FallbackView { view_name: 'TextView'; text_all_caps?: boolean; font_family?: [string, ...string[]]; text: string; text_color?: Color; text_alignment?: string; text_size?: number; text_style?: 'bold' | 'italic' | 'bold|italic'; text_decoration_line?: ('overline' | 'line-through' | 'underline')[]; text_shadow?: string; text_prevent_widow?: boolean; line_spacing_multiplier?: string | number; spans?: { start?: number; end?: number; name?: 'superscript' | 'link'; url?: string; style?: 'bold' | 'italic'; [k: string]: unknown; }[]; max_lines?: number; } interface AbsoluteLayout extends FallbackView { view_name: 'AbsoluteLayout'; } interface FlexLayout extends FallbackView { view_name: 'FlexLayout'; layout_flex_align_items?: 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline'; layout_flex_justify_content?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around'; layout_flex_direction?: 'row' | 'column'; } export interface ImageView extends FallbackView { view_name: 'ImageView'; /** * The URL to the source image */ src: string; /** * The caption describing the image */ label?: string; } export interface VideoEmbedView extends FallbackView { view_name: 'VideoEmbedView'; /** * The URL to the source video */ src: string; } export interface VideoView extends FallbackView { view_name: 'VideoView'; /** * The URL to the source video */ src: string; autoplay?: boolean; loop?: boolean; controls?: boolean; mime: string; } } declare module "lib/incito-browser/incito" { import MicroEvent from "vendor/microevent"; import './incito.styl'; import { IIncito } from "lib/incito-browser/types"; export default class Incito extends MicroEvent<{ started: []; destroyed: []; incitoEmbedLoaded: [{ el: HTMLElement; }]; sectionVisible: [{ sectionId: string; sectionPosition: number; }]; sectionHidden: [{ sectionId: string; sectionPosition: number; }]; }> { containerEl: HTMLElement; incito: IIncito; el: HTMLDivElement; ids: Record>; sections: unknown[]; canLazyload: boolean; styleEl: HTMLStyleElement; lazyObserver: IntersectionObserver; videoObserver: IntersectionObserver; sectionObserver: IntersectionObserver; sectionVisibility: Map; constructor(containerEl: HTMLElement, { incito, canLazyload }: { incito: IIncito; canLazyload?: boolean; }); render(): void; start(): void; destroy(): void; observeElements(el: HTMLDivElement): void; loadEl(el: any): void; triggerSectionVisibility(sectionEl: HTMLElement, visible: boolean): void; visibility: DocumentVisibilityState; onVisibilityChange(newVisibility: DocumentVisibilityState): void; handleBlur: () => void; handleFocus: () => void; handleVisibility: () => void; handlePageHide: () => void; handleBeforeUnload: () => void; enableLazyloading(): void; renderHtml(view: any, shouldLazyload?: boolean): string; } } declare module "lib/config-defaults" { export const coreUrl = "https://squid-api.tjek.com"; export const coreUrlStaging = "https://squid-api.tjek-staging.com"; export const eventsTrackUrl = "https://wolf-api.tjek.com/sync"; export const eventsTrackUrlStaging = "https://wolf-api.tjek-staging.com/sync"; } declare module "lib/storage/client-local" { export function get(key: any): any; export function set(key: string, value: any): void; export function remove(key: string): void; export function setWithEvent(key: string, value: any, eventName: string): void; } declare module "vendor/gator" { function Gator(this: { element: HTMLElement; id: number; }, element: HTMLElement, id?: number): any; export default Gator; } declare module "lib/util" { export const isBrowser: () => boolean; export const isNode: () => boolean; export function error(err: Error & { code?: string; time?: Date; statusCode?: number; }, options?: { message?: string; code?: string; name?: string; stack?: string; statusCode?: number; }): Error & { code?: string; time?: Date; statusCode?: number; }; export function getQueryParam(field: any, url?: string): string; export function throttle(fn: (...args: A) => unknown, threshold?: number, scope?: object): (...args: A) => void; export function debounce(fn: (...args: A) => unknown, threshold?: number, scope?: object): (...args: A) => void; export function chunk(arr: I[], size: number): I[][]; export const on: (el: HTMLElement, events: string | string[], selector: string, callback: (event: any) => void) => any; export const off: (el: HTMLElement, events?: string | string[], selector?: string, callback?: (event: any) => void) => any; } declare module "lib/kits/events/tracker" { type TrackerClient = { id: string; }; export interface BaseEvent { _v: number; _e: keyof WolfEventTypeMap; _i: string; _a: string; _t: number; 'l.h'?: string; 'l.ht'?: number; 'l.c'?: string; ab?: Record; } interface PagedPublicationOpenedEvent { 'pp.id': string; vt: string; } interface PagedPublicationPageOpenedEvent { 'pp.id': string; 'ppp.n': number; vt: string; } interface OfferOpenedEvent { 'of.id': string; s?: string; a?: string; vt: string; } type ClientSessionOpenedEvent = object; interface SearchedEvent { 'sea.q': string; 'sea.l'?: string; vt: string; } interface FirstOfferClickedAfterSearchEvent { 'sea.q': string; 'sea.l'?: string; 'of.id': string; 'of.ids': string[]; } interface AnyOfferClickedAfterSearchEvent { 'sea.q': string; 'sea.l'?: string; 'of.id': string; } interface IncitoPublicationOpenedEvent { 'ip.id': string; 'pp.vt'?: string; vt: string; } interface ViewedSearchResultsThenLeftEvent { 'sea.q': string; 'sea.l'?: string; 'sea.v': number; } interface PotentialLocalBusinessVisitEvent { 'l.hac': number; 'lb.id': string; 'lb.dis': number; 'lb.bid': string; 'b.cin': boolean; 'b.cint': number; vt: string; } interface IncitoPublicationOpenedV2Event { 'ip.id': string; 'ip.paged': boolean; vt: string; } interface AnalyticsV2Event { d?: string; os?: string; osv?: string; _av: string; c: string; a: string; s?: string; ps?: string; l?: string; v?: number; f?: string[]; vt: string; } interface IncitoPublicationSectionViewedEvent { _t: BaseEvent['_t']; 'ip.id': string; 'ips.id': string; 'ips.p': number; mos: number; vt: string; } interface WolfEventTypeMap { 1: PagedPublicationOpenedEvent; 2: PagedPublicationPageOpenedEvent; 3: OfferOpenedEvent; 4: ClientSessionOpenedEvent; 5: SearchedEvent; 6: FirstOfferClickedAfterSearchEvent; 7: AnyOfferClickedAfterSearchEvent; 8: IncitoPublicationOpenedEvent; 9: ViewedSearchResultsThenLeftEvent; 10: PotentialLocalBusinessVisitEvent; 11: IncitoPublicationOpenedV2Event; 12: AnalyticsV2Event; 13: IncitoPublicationSectionViewedEvent; } export type WolfEvent = WolfEventTypeMap[keyof WolfEventTypeMap]; const locationSources: readonly ["gps", "geoip", "manual", "fallback"]; interface TrackerLocation { geohash: string | null; source: (typeof locationSources)[number] | null; time: number | null; country: string | null; } class Tracker { hasMadeInitialDispatch: boolean; location: TrackerLocation; trackId: string | null; poolLimit: number; pool: (BaseEvent & WolfEvent)[]; client: TrackerClient; eventsTrackUrl: string; handleVisibility: () => void; handleBlur: () => void; handlePageHide: () => void; handleBeforeUnload: () => void; constructor(options?: { trackId?: string; poolLimit?: number; client?: TrackerClient; eventsTrackUrl?: string; }); setEventsTrackUrl(eventsTrackUrl: string): void; trackEvent(type: T, properties: WolfEventTypeMap[T], version?: number): this; setLocation(location: Partial): this; trackPagedPublicationOpened(properties: PagedPublicationOpenedEvent, version?: number): this; trackPagedPublicationPageOpened(properties: PagedPublicationPageOpenedEvent, version?: number): this; trackOfferOpened(properties: OfferOpenedEvent, version?: number): this; trackSearched(properties: SearchedEvent, version?: number): this; trackIncitoPublicationOpened(properties: IncitoPublicationOpenedV2Event, version?: number): this; trackIncitoPublicationSectionOpened(properties: { 'ip.id': string; 'ips.id': string; 'ips.p': number; mos: number; vt: string; _t: number; }, version?: number): this; createViewToken(...parts: string[]): string; dispatchLimit: number; dispatchTimeout: ReturnType | null; dispatch(): void; dispatchBeacon(): void; } export default Tracker; } declare module "lib/kits/core/request" { function request({ coreUrl, url: rawUrl, apiKey, qs, method, headers, body }: { coreUrl?: string; url: string | URL; apiKey?: string; qs?: Record; method?: RequestInit['method']; headers?: Record; body?: RequestInit['body']; }, callback?: (error: Error | null, result?: T | null) => void): Promise>; export default request; } declare module "lib/kits/core/index" { export { default as request } from "lib/kits/core/request"; export type V2App = { id: number; name: string; }; export type V2Currency = 'DKK' | 'EUR' | 'NOK' | 'PLN' | 'SEK' | 'ISK' | 'RON'; export type V2CountryCode = 'DE' | 'DK' | 'GL' | 'NL' | 'NO' | 'PL' | 'SE' | 'FI' | 'SJ' | 'IS' | 'RO'; export interface V2Branding { name: string; website?: string; description?: string; color: string; logo: string; pageflip: { color: string; logo: string; }; } interface V2Images { thumb: string; view: string; zoom: string; } interface V2Pricing { pre_price: number | null; price: number; currency: V2Currency; } interface V2Quantity { pieces: { from: number; to: number; }; size: { from: number; to: number; }; unit: { si: { factor: number; symbol: string; }; symbol: string; } | null; } export interface V2Offer { branding: V2Branding; id: string; heading: string; description: string; catalog_page: number | null; catalog_id: string | null; dealer_id: string; dealer: V2Dealer; images: V2Images; links: { webshop: string | null; }; pricing: V2Pricing; publish: string; run_from: string; run_till: string; quantity: V2Quantity; /** @deprecated */ store_id?: null; } type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday'; export interface V2Store { id: string; ern: string; graph_id: string; street: string; city: string; zip_code: string; country: { unsubscribe_print_url?: string; id: V2CountryCode; }; openingHours?: ({ opens: string; closes: string; day_of_week: DayOfWeek; } | { opens: string; closes: string; valid_from: string; valid_until: string; } | { valid_from: string; valid_until: string; } | { day_of_week: DayOfWeek; })[]; latitude: number; longitude: number; dealer_url: string; dealer_id: string; dealer: V2Dealer; branding: V2Branding; category_ids: string[]; /** @deprecated */ facebook_page_id?: null; /** @deprecated */ twitter_handle?: null; /** @deprecated */ youtube_user_id?: null; /** @deprecated */ contact?: null; } export interface V2Catalog { id: string; ern: string; run_from: string; store_id: string | null; store_url: null; images: V2Images; types: ('incito' | 'paged')[]; incito_publication_id: string | null; all_stores: boolean; dealer_url: string; branding: V2Branding; pdf_url: string; label: string; run_till: string; /** @deprecated */ pages?: { view: []; thumb: []; zoom: []; }; background: string; category_ids: []; offer_count: number; page_count: number; dealer_id: string; dealer: V2Dealer; dimensions: { width: 1; height: number; }; } export interface V2Page { view: string; thumb: string; zoom: string; } export interface V2Dealer { id: string; ern: string; markets: { slug: string; country_code: V2CountryCode; }[]; /** @deprecated */ graph_id?: null; name: string; website: string; description: string; logo: string; color: string; pageflip: { logo: string; color: string; }; country: { id: V2CountryCode; /** @deprecated */ unsubscribe_print_url: null; }; description_markdown: string; favorite_count: number; is_incito_supported: boolean; locale: string; category_ids: number[]; is_content_public: boolean; } export interface V2Hotspot { type: string; locations: Record; id: string; run_from: number; run_till: number; heading: string; webshop?: any; offer: { id: string; ern: string; heading: string; pricing: V2Pricing; quantity: V2Quantity; run_from: string; run_till: string; publish: string; }; id_collection: { type: 'id'; provider: 'shopgun-core'; value: string; }[]; } export interface V2Dealerfront { catalogs: V2Catalog[]; dealer: V2Dealer; } export interface V2PageDecoration { page_number: number; title: string | null; website_link: string | null; website_link_title?: string | null; hotspots?: { x1: number; x2: number; y1: number; y2: number; rotate: number; embed_link: string; link: string; }[] | null; } } declare module "lib/kits/events/index" { export { default as Tracker } from "lib/kits/events/tracker"; } declare module "lib/kits/incito-publication/event-tracking" { import MicroEvent, { EventArg } from "vendor/microevent"; import Incito from "lib/incito-browser/incito"; import type { V2Catalog } from "lib/kits/core/index"; import type { Tracker } from "lib/kits/events/index"; class IncitoPublicationEventTracking extends MicroEvent { eventTracker: Tracker | undefined; details: V2Catalog | undefined; constructor(eventTracker?: Tracker, details?: V2Catalog); trackOpened(): this; trackIncitoPublicationOpenedMinimumMosMs: number; sectionVisibility: Map; onSectionVisible: ({ sectionId, sectionPosition }: EventArg) => this; onSectionHidden: ({ sectionId, sectionPosition }: EventArg) => this; } export default IncitoPublicationEventTracking; } declare module "lib/kits/incito-publication/viewer" { import MicroEvent from "vendor/microevent"; import Incito from "lib/incito-browser/incito"; import { IIncito } from "lib/incito-browser/types"; import { V2Catalog } from "lib/kits/core/index"; import { Tracker } from "lib/kits/events/index"; import EventTracking from "lib/kits/incito-publication/event-tracking"; import './viewer.styl'; interface ViewerInit { incito: IIncito; eventTracker?: Tracker; details?: V2Catalog; } class Viewer extends MicroEvent { static Incito: typeof Incito; el: any; options: ViewerInit; incito: Incito; _eventTracking: EventTracking; constructor(el: HTMLElement, options: ViewerInit); start(): this; destroy(): void; } export default Viewer; } declare module "lib/kits/incito-publication/controls" { import Viewer from "lib/kits/incito-publication/viewer"; export default class Controls { viewer: Viewer; progressEl: HTMLElement | null; constructor(viewer: Viewer); destroy: () => void; scroll: () => void; } } declare module "lib/kits/incito-publication/bootstrapper" { import { IIncito } from "lib/incito-browser/types"; import { V2Catalog } from "lib/kits/core/index"; import { Tracker } from "lib/kits/events/index"; import Viewer from "lib/kits/incito-publication/viewer"; interface BootstrapperInit { el: HTMLElement; id?: string; apiKey?: string; coreUrl?: string; eventTracker?: Tracker; } export default class Bootstrapper { deviceCategory: string; pixelRatio: number; pointer: string; orientation: string; time: string; locale: string; featureLabels: string[]; versionsSupported: string[]; enableLazyLoading: boolean; options: BootstrapperInit; maxWidth: number; constructor(options?: BootstrapperInit); getFeatureLabels(): string[]; anonymizeFeatureLabels(): { key: any; value: number; }[]; fetch(callback?: (err: any, res?: { details: V2Catalog; incito: IIncito; }) => void): Promise<{ details: V2Catalog; incito: IIncito; }>; fetchDetails: (id: string, callback?: (error: Error | null, result?: V2Catalog) => void) => Promise; fetchIncito: (id: string, callback?: (error: Error | null, result?: IIncito) => void) => Promise; createViewer({ details, incito }: { details?: V2Catalog; incito: IIncito; }): Viewer; } } declare module "lib/translations" { export function t(key: string, view?: any): any; export function update(translations: Record): void; } declare module "lib/verso-browser/animation" { export default class Animation { run: number; el: HTMLElement; constructor(el: HTMLElement); animate({ x, y, scale, easing, duration }?: { x: string | number; y?: string | number; scale?: number; easing?: string; duration?: number; }, callback?: () => void): this; } } declare module "lib/verso-browser/page_spread" { import './page_spread.styl'; interface PageSpreadInit { id: string; type?: string; pageIds: string[]; width: number; left: number; maxZoomScale: number; } export default class PageSpread { visibility: string; positioned: boolean; active: boolean; el: HTMLElement; options: PageSpreadInit; id: string; type?: string; pageIds: string[]; width: number; left: number; maxZoomScale: number; constructor(el: HTMLElement, options: PageSpreadInit); isZoomable(): boolean; isScrollable(): boolean; getEl(): HTMLElement; getOverlayEls(): NodeListOf; getPageEls(): NodeListOf; getRect(): DOMRect; getContentRect(): { top: number; left: number; right: number; bottom: number; width: number; height: number; }; getId(): string; getType(): string; getPageIds(): string[]; getWidth(): number; getLeft(): number; getMaxZoomScale(): number; getVisibility(): string; setVisibility(visibility: any): this; position(): this; activate(): void; deactivate(): void; } } declare module "lib/verso-browser/verso" { import MicroEvent from "vendor/microevent"; import Animation from "lib/verso-browser/animation"; import PageSpread from "lib/verso-browser/page_spread"; import Manager from './vendor/hammer/Manager'; import './verso.styl'; interface VersoInit { swipeVelocity?: number; swipeThreshold?: number; navigationDuration?: number; navigationPanDuration?: number; zoomDuration?: number; doubleTapDelay?: number; pageId?: string; } export default class Verso extends MicroEvent { position: number; pinching: boolean; panning: boolean; transform: { left: number; top: number; scale: number; }; startTransform: { left: number; top: number; scale: number; }; started: boolean; destroyed: boolean; _events: {}; el: HTMLElement; scrollerEl: HTMLElement; pageSpreadEls: NodeListOf; pageSpreads: PageSpread[]; pageIds: Record; options: VersoInit; swipeVelocity: number; swipeThreshold: number; navigationDuration: number; navigationPanDuration: number; zoomDuration: number; tap: { count: number; delay: number; timeout?: NodeJS.Timeout; }; animation: Animation; hammer: Manager; coarsePointerQuery: MediaQueryList | null; prefersReducedMotionQuery: MediaQueryList | null; constructor(el: HTMLElement, options?: VersoInit); start(): this; destroy(): void | this; first(options?: Parameters[1]): void; prev(options?: Parameters[1]): void; next(options?: Parameters[1]): void; last(options?: Parameters[1]): void; navigateTo(newPosition: number, options?: { duration?: number; velocity?: number; }): void; getPosition(): number; setPosition(position: number): this; getLeftTransformFromPageSpread(position: number, pageSpread: PageSpread): number; getCarouselFromPageSpread(pageSpreadSubject: PageSpread): { visible: PageSpread[]; gone: PageSpread[]; }; getCoordinateInfo(x: number, y: number, pageSpread: PageSpread): { x: number; y: number; contentX: number; contentY: number; pageX: number; pageY: number; overlayEls: HTMLElement[]; pageEl: null | HTMLElement; isInsideContentX: boolean; isInsideContentY: boolean; isInsideContent: boolean; }; getPageSpreadCount(): number; getActivePageSpread(): PageSpread; getPageSpreadFromPosition(position: number): PageSpread; getPageSpreadPositionFromPageId(pageId: string): number; zoomTo({ duration, easing, scale, x, y, bounds }?: { duration?: number; easing?: string; scale: number; x: number; y: number; bounds?: boolean; }, callback?: () => void): void; refresh(): this; onPanStart: (e: any) => void; onPanMove: (e: any) => void; onPanEnd: (e: any) => void; onPinchStart: () => void; onPinchMove: (e: any) => void; onPinchEnd: (e: any) => void; onPress: (e: any) => void; onContextmenu: (e: any) => boolean; onWheel: (e: WheelEvent) => void; onSingletap: (e: any) => void; onTouchStart: (e: any) => void; onTouchEnd: (e: any) => void; onResize: () => void; } } declare module "lib/kits/core-ui/page-decorations" { import { V2PageDecoration } from "lib/kits/core/index"; import './page-decorations.styl'; const PageDecorations: () => { render: ({ pageDecorations, aspectRatio }: { pageDecorations: V2PageDecoration[]; aspectRatio: number; }) => HTMLDivElement; hide: () => void; show: () => void; }; export default PageDecorations; } declare module "lib/key-codes" { export const ESC = 27; export const ARROW_RIGHT = 39; export const ARROW_LEFT = 37; export const SPACE = 32; export const NUMBER_ONE = 49; export const ENTER = "Enter"; } declare module "lib/kits/core-ui/popover" { import MicroEvent from "vendor/microevent"; import './popover.styl'; interface PopoverOptions { header?: string; singleChoiceItems?: any; template?: string; x: number; y: number; } class Popover extends MicroEvent { el: HTMLDivElement; backgroundEl: HTMLDivElement; options: PopoverOptions; constructor(options: PopoverOptions); render(): this; destroy(): void; position(): void; addEventListeners(): void; keyUp: (e: any) => void; resize: () => void; scroll: () => void; } export default Popover; } declare module "lib/kits/core-ui/single-choice-popover" { export default function singleChoicePopover({ items, el, header, x, y }: { items: any; el: HTMLElement; header?: string; x: number; y: number; }, callback: any): { destroy(): void; }; } declare module "lib/kits/paged-publication/controls" { import MicroEvent from "vendor/microevent"; interface PagedPublicationControlsInit { keyboard: 'disabled' | 'enabled' | 'global'; } class PagedPublicationControls extends MicroEvent { options: PagedPublicationControlsInit; root: HTMLElement; progress: HTMLElement | null; progressBar: HTMLElement | null; progressLabel: HTMLElement | null; prevControl: HTMLElement | null; nextControl: HTMLElement | null; close: HTMLElement | null; keyDownHandler: typeof this.keyDown; constructor(el: HTMLElement, options?: PagedPublicationControlsInit); destroy: () => void; beforeNavigation: (e: any) => void; prevClicked: (e: MouseEvent) => void; nextClicked: (e: MouseEvent) => void; closeClicked: (e: MouseEvent) => void; keyDown: (e: KeyboardEvent) => void; } export default PagedPublicationControls; } declare module "lib/kits/paged-publication/page-spread" { import MicroEvent from "vendor/microevent"; import { Page, PageMode } from "lib/kits/paged-publication/page-spreads"; interface PagedPublicationPageSpreadInit { id: string; pages: Page[]; maxZoomScale: number; width: number; pageMode: PageMode; } class PagedPublicationPageSpread extends MicroEvent<{ pageLoaded: [{ pageSpreadId: string; page: Page; }]; pagesLoaded: [{ pageSpreadId: string; pages: Page[]; }]; }> { contentsRendered: boolean; hotspotsRendered: boolean; el: HTMLElement; options: PagedPublicationPageSpreadInit; constructor(options: PagedPublicationPageSpreadInit); getId(): string; getEl(): HTMLElement; getPages(): Page[]; renderEl(): HTMLDivElement; renderContents(): this; clearContents(): this; zoomIn(): void; zoomOut(): void; } export default PagedPublicationPageSpread; } declare module "lib/kits/paged-publication/page-spreads" { import MicroEvent from "vendor/microevent"; import PagedPublicationPageSpread from "lib/kits/paged-publication/page-spread"; export interface Page { id: string; label: string; pageNumber: number; images: { medium: string; large: string; }; } export type PageMode = 'single' | 'double'; interface PagedPublicationPageSpreadsInit { pages: Page[]; width: number; maxZoomScale: number; } class PagedPublicationPageSpreads extends MicroEvent<{ pageLoaded: [{ pageSpreadId: string; page: Page; }]; pagesLoaded: [{ pageSpreadId: string; pages: Page[]; }]; }> { collection: PagedPublicationPageSpread[]; ids: Record; options: PagedPublicationPageSpreadsInit; constructor(options: PagedPublicationPageSpreadsInit); get(id: string): PagedPublicationPageSpread; getFrag(): DocumentFragment; update(pageMode?: PageMode): this; } export default PagedPublicationPageSpreads; } declare module "lib/kits/paged-publication/core" { import MicroEvent from "vendor/microevent"; import PageSpread from "lib/verso-browser/page_spread"; import Verso from "lib/verso-browser/verso"; import PageSpreads, { PageMode } from "lib/kits/paged-publication/page-spreads"; interface PagedPublicationCoreInit { id: string; pageId?: string; pages?: unknown[]; pageSpreadWidth?: number; pageSpreadMaxZoomScale?: number; idleDelay?: number; resizeDelay?: number; color?: string; } class PagedPublicationCore extends MicroEvent { defaults: { pages: any[]; pageSpreadWidth: number; pageSpreadMaxZoomScale: number; idleDelay: number; resizeDelay: number; color: string; }; rootEl: HTMLElement; pagesEl: HTMLElement | null; options: PagedPublicationCoreInit; pageId: string; verso: Verso; pageMode: PageMode; idleTimeout: NodeJS.Timeout | undefined; pageSpreads: PageSpreads; resizeListener: () => void; constructor(el: HTMLElement, options: PagedPublicationCoreInit); start: () => void; destroy: () => void; makeOptions(options: Partial, defaults: typeof this.defaults): PagedPublicationCoreInit; getOption(key: string): any; setColor(color: string): void; createVerso(): Verso; getVerso(): Verso; getContentRect(pageSpread: any): { top: number; left: number; right: number; bottom: number; width: number; height: number; }; formatProgressLabel(pageSpread: any): string; renderPageSpreads(): this; findPage(pageId: any): any; pageLoaded: (e: any) => void; pagesLoaded: (e: any) => void; beforeNavigation: (e: any) => void; afterNavigation: (e: any) => void; attemptedNavigation: (e: any) => void; pointerdown: (e: any) => void; clicked: (e: any) => void; doubleClicked: (e: any) => void; pressed: (e: any) => void; contextmenu: (e: any) => void; panStart: () => void; panEnd: () => void; zoomedIn: (e: any) => void; zoomedOut: (e: any) => void; getPageMode(): PageMode; resetIdleTimer(): this; startIdleTimer(): this; switchPageMode(pageMode: PageMode): this; overridePageSpreadContentRect: (pageSpread: PageSpread) => () => { top: number; left: number; right: number; bottom: number; width: number; height: number; }; resize: () => void; unload: () => void; } export default PagedPublicationCore; } declare module "lib/kits/paged-publication/event-tracking" { import MicroEvent from "vendor/microevent"; import Tracker from "lib/kits/events/tracker"; import PagedPublicationPageSpread from "lib/kits/paged-publication/page-spread"; class PagedPublicationEventTracking extends MicroEvent { hidden: boolean; pageSpread: null | PagedPublicationPageSpread; eventTracker: Tracker; id: string; constructor(eventTracker: Tracker, id: string); destroy: () => void; trackOpened(): this; trackPageSpreadAppeared(pageNumbers: number[]): this; appeared: (e: any) => void; disappeared: () => void; beforeNavigation: () => void; afterNavigation: (e: any) => void; attemptedNavigation: (e: any) => void; panStart: (e: any) => void; pageSpreadAppeared(pageSpread: PagedPublicationPageSpread, verso?: { newPosition: number; previousPosition: number; }): void; pageSpreadDisappeared(): void; } export default PagedPublicationEventTracking; } declare module "locales/da_DK" { const _default: { locale_code: string; publication_viewer_shopping_list_label: string; publication_viewer_shopping_list_clear_button: string; publication_viewer_delete_crossed_out_button: string; publication_viewer_print_button: string; publication_viewer_download_button: string; publication_viewer_until_label: string; publication_viewer_offer_date_range: string; publication_viewer_menu_date_range: string; publication_viewer_expires_in_days_label: string; publication_viewer_valid_in_days_label: string; publication_viewer_expired_label: string; publication_viewer_pages_button: string; publication_viewer_offers_button: string; publication_viewer_search_text: string; publication_viewer_currency: string; publication_viewer_hotspot_picker_header: string; publication_viewer_overview_button: string; publication_viewer_close_label: string; publication_viewer_add_to_shopping_list: string; publication_viewer_visit_webshop_link: string; publication_viewer_upcoming: string; publication_viewer_offer_price_from: string; publication_viewer_offer_price_for: string; publication_viewer_offer_valid_from: string; publication_viewer_no_product_message: string; publication_viewer_offer_increase_quantity: string; publication_viewer_offer_decrease_quantity: string; }; export default _default; } declare module "locales/en_US" { const _default_1: { locale_code: string; publication_viewer_shopping_list_label: string; publication_viewer_shopping_list_clear_button: string; publication_viewer_delete_crossed_out_button: string; publication_viewer_print_button: string; publication_viewer_download_button: string; publication_viewer_until_label: string; publication_viewer_offer_date_range: string; publication_viewer_menu_date_range: string; publication_viewer_expires_in_days_label: string; publication_viewer_valid_in_days_label: string; publication_viewer_expired_label: string; publication_viewer_pages_button: string; publication_viewer_offers_button: string; publication_viewer_search_text: string; publication_viewer_currency: string; publication_viewer_hotspot_picker_header: string; publication_viewer_overview_button: string; publication_viewer_close_label: string; publication_viewer_add_to_shopping_list: string; publication_viewer_visit_webshop_link: string; publication_viewer_upcoming: string; publication_viewer_offer_price_from: string; publication_viewer_offer_price_for: string; publication_viewer_offer_valid_from: string; publication_viewer_no_product_message: string; publication_viewer_offer_increase_quantity: string; publication_viewer_offer_decrease_quantity: string; }; export default _default_1; } declare module "locales/sv_SE" { const _default_2: { locale_code: string; publication_viewer_shopping_list_label: string; publication_viewer_shopping_list_clear_button: string; publication_viewer_delete_crossed_out_button: string; publication_viewer_print_button: string; publication_viewer_download_button: string; publication_viewer_until_label: string; publication_viewer_offer_date_range: string; publication_viewer_menu_date_range: string; publication_viewer_expires_in_days_label: string; publication_viewer_valid_in_days_label: string; publication_viewer_expired_label: string; publication_viewer_pages_button: string; publication_viewer_offers_button: string; publication_viewer_search_text: string; publication_viewer_currency: string; publication_viewer_hotspot_picker_header: string; publication_viewer_overview_button: string; publication_viewer_close_label: string; publication_viewer_add_to_shopping_list: string; publication_viewer_visit_webshop_link: string; publication_viewer_upcoming: string; publication_viewer_offer_price_from: string; publication_viewer_offer_price_for: string; publication_viewer_offer_valid_from: string; publication_viewer_no_product_message: string; publication_viewer_offer_increase_quantity: string; publication_viewer_offer_decrease_quantity: string; }; export default _default_2; } declare module "locales/nb_NO" { const _default_3: { locale_code: string; publication_viewer_shopping_list_label: string; publication_viewer_shopping_list_clear_button: string; publication_viewer_delete_crossed_out_button: string; publication_viewer_print_button: string; publication_viewer_download_button: string; publication_viewer_until_label: string; publication_viewer_offer_date_range: string; publication_viewer_menu_date_range: string; publication_viewer_expires_in_days_label: string; publication_viewer_valid_in_days_label: string; publication_viewer_expired_label: string; publication_viewer_pages_button: string; publication_viewer_offers_button: string; publication_viewer_search_text: string; publication_viewer_currency: string; publication_viewer_hotspot_picker_header: string; publication_viewer_overview_button: string; publication_viewer_close_label: string; publication_viewer_add_to_shopping_list: string; publication_viewer_visit_webshop_link: string; publication_viewer_upcoming: string; publication_viewer_offer_price_from: string; publication_viewer_offer_price_for: string; publication_viewer_offer_valid_from: string; publication_viewer_no_product_message: string; publication_viewer_offer_increase_quantity: string; publication_viewer_offer_decrease_quantity: string; }; export default _default_3; } declare module "locales/index" { export { default as da_dk } from "locales/da_DK"; export { default as en_us } from "locales/en_US"; export { default as sv_se } from "locales/sv_SE"; export { default as nb_no } from "locales/nb_NO"; } declare module "lib/kits/core-ui/components/helpers/component" { export const insertAfter: (referenceNode: any, newNode: any) => void; export const destroyModal: () => void; export const createModal: (container: HTMLElement, destroyCallback?: (event: any) => void) => void; export const formatPrice: (price: any, localeCode?: string, currency?: string) => string; export const parseDateStr: (dateStr: string) => Date; export const formatDate: (dateStr: string, options?: Intl.DateTimeFormatOptions) => string; export const getDateRange: (fromDateStr: any, tillDateStr: any, templateKey: any) => any; export const getPubState: (fromDateStr: any, tillDateStr: any) => "inactive" | "active" | "expired"; export const getPubStateMessage: (fromDateStr: any, tillDateStr: any) => any; export const translate: (key?: string, view?: {}) => any; export const transformFilter: (filter: any) => any; export const getColorBrightness: (color: any) => "dark" | "light"; export const pushQueryParam: (queryParams?: {}) => any; export const getHashFragments: (hashParam: any) => { publicationId: string; pageNum: string; }; export const transformWebshopLink: (url: any) => any; export const dispatchProductClickEvent: (detail: any) => void; export const animateShoppingListCounter: () => void; export const updateShoppingList: (offer: any, action: "plus" | "minus") => void; export const closeSidebar: () => void; export const displayOfferMessage: (clickedEl: any, message: any) => void; export const getLocaleCode: (countryId: string) => string; export const calculateProductPrice: (offer: any, totalQuantityByOffer?: number) => number; export const getTotalQuantityByOffer: (savedOffers: any, offerId: any) => any; export const formatDateForReader: (date: any) => string; } declare module "lib/kits/paged-publication/hotspots" { import MicroEvent from "vendor/microevent"; import PageSpread from "lib/verso-browser/page_spread"; import { V2Hotspot } from "lib/kits/core/index"; import PagedPublicationPageSpread from "lib/kits/paged-publication/page-spread"; import { Page } from "lib/kits/paged-publication/page-spreads"; class PagedPublicationHotspots extends MicroEvent { currentPageSpreadId: null | string; pageSpreadsLoaded: {}; cache: Record; constructor(); renderHotspots({ versoPageSpread, pageSpread, hotspots, pages, ratio }: { versoPageSpread: PageSpread; pageSpread: PagedPublicationPageSpread; hotspots: V2Hotspot[]; pages: Page[]; ratio: number; }): this; requestHotspots(id: string, pages: Page[]): void; hotspotsReceived: (e: any) => void; getCache(pageSpreadId: string): { versoPageSpread: PageSpread; pageSpread: PagedPublicationPageSpread; hotspots: V2Hotspot[]; pages: Page[]; ratio: number; }; setCache(pageSpreadId: string, data: (typeof this.cache)[keyof typeof this.cache]): this; afterNavigation: (e: any) => void; pagesLoaded: (e: any) => void; resized: () => void; } export default PagedPublicationHotspots; } declare module "lib/kits/paged-publication/viewer" { import MicroEvent from "vendor/microevent"; import Verso from "lib/verso-browser/verso"; import { V2Hotspot, V2PageDecoration } from "lib/kits/core/index"; import { Tracker } from "lib/kits/events/index"; import Controls from "lib/kits/paged-publication/controls"; import Core from "lib/kits/paged-publication/core"; import EventTracking from "lib/kits/paged-publication/event-tracking"; import Hotspots from "lib/kits/paged-publication/hotspots"; import { Page } from "lib/kits/paged-publication/page-spreads"; import './viewer.styl'; function defaultPickHotspot(hotspots: V2Hotspot[], e: any, el: HTMLElement, callback: any): () => void; export interface ViewerInit { id: string; ownedBy: unknown; pages?: Page[]; pageSpreadWidth?: number; pageSpreadMaxZoomScale?: number; pageId?: string; idleDelay?: number; resizeDelay?: number; color?: string; eventTracker: Tracker; keyboard: 'disabled' | 'enabled' | 'global'; hotspotRatio?: number; pickHotspot?: typeof defaultPickHotspot; } class Viewer extends MicroEvent { _hotspots: Hotspots; hotspots: Record | null; hotspotQueue: { id: string; pages: Page[]; }[]; popover: null | { destroy: () => void; }; el: HTMLElement; _core: Core; _controls: Controls; _eventTracking: EventTracking; pageDecorations: V2PageDecoration[]; options: ViewerInit; constructor(el: HTMLElement, options?: ViewerInit); start(): this; destroy: () => this; navigateTo(position: any, options: any): this; navigateToIndex(position: any, options: any): this; navigateToPageId(pageId: any, options?: Parameters[1]): this; first: (options?: Parameters[0]) => this; prev: (options: Parameters[0]) => this; next: (options: Parameters[0]) => this; last: (options?: Parameters[0]) => this; getPointerEventHotspots(e: any): V2Hotspot[]; pickHotspot(e: any, callback: (hotspot: V2Hotspot) => void): void; processHotspotQueue(): void; hotspotsRequested: (e: any) => void; applyHotspots(hotspots: any): void; applyPageDecorations(pageDecorations?: V2PageDecoration[]): void; getPageDecorations(): V2PageDecoration[]; beforeNavigation: () => void; clicked: (e: any) => void; pointerdown: (e: any) => void; contextmenu: (e: any) => void; pressed: (e: any) => void; enterKeyPressed: (el: any) => void; } export default Viewer; } declare module "lib/kits/paged-publication/bootstrapper" { import { request, V2Catalog, V2Hotspot, V2Page, V2PageDecoration } from "lib/kits/core/index"; import type { Tracker } from "lib/kits/events/index"; import Viewer, { ViewerInit } from "lib/kits/paged-publication/viewer"; interface BootstrapperInit { el: HTMLElement; id: string; pageId: string; eventTracker: Tracker; apiKey: string; coreUrl: string; keyboard: 'disabled' | 'enabled' | 'global'; } export default class Bootstrapper { options: BootstrapperInit; constructor(options?: {}); createViewer(data: { details: V2Catalog; pages: V2Page[]; }, viewerOptions?: Partial): Viewer; transformPageDecorationHotspots(pageDecorations: V2PageDecoration[]): { id: string; type: string; embed_link: string; link: string; rotate: number; locations: any; }[]; applyHotspots(viewer: Viewer, hotspots: V2Hotspot[], pageDecorations?: V2PageDecoration[]): void; fetch(callback?: Parameters[1]): Promise<{ details: V2Catalog; pages: V2Page[]; }>; fetchDetails: (callback?: Parameters[1]) => Promise; fetchPages: (callback?: Parameters[1]) => Promise; fetchHotspots: (callback?: Parameters[1]) => Promise; fetchPageDecorations: (callback?: Parameters[1]) => Promise; applyPageDecorations(viewer: Viewer, pageDecorations: V2PageDecoration[]): void; } } declare module "@tjek/sdk" { export { default as Incito } from "lib/incito-browser/incito"; export { default as EventTracker } from "lib/kits/events/tracker"; export { default as IncitoPublicationBootstrapper } from "lib/kits/incito-publication/bootstrapper"; export { default as PagedPublicationBootstrapper } from "lib/kits/paged-publication/bootstrapper"; export type * from "lib/kits/core/index"; }