/** * Generated bundle index. Do not edit. */ import { TranslateService } from "@ngx-translate/core"; import * as i0 from "@angular/core"; import { AfterContentInit, AfterViewInit, DestroyRef, ElementRef, EnvironmentProviders, InjectionToken, ModuleWithProviders, OnDestroy, OnInit, PipeTransform, Provider, Signal, TemplateRef, Type, WritableSignal } from "@angular/core"; import { AppBaseComponent, AppService, BaseComponent, IAppOptions, ListMode as ListMode$1, PageBaseComponent } from "@smartsoft001/angular"; import { HttpClient, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http"; import * as i1 from "@angular/router"; import { ActivatedRoute, CanActivateFn, ResolveFn, Route, Router, RouterFeatures } from "@angular/router"; import { ArticleWidget, ArticleWidgetType, Config, ConfigMenuItem, ConfigPageType, IArticleWidget, IArticleWidgetAudio, IArticleWidgetGalleryImage, IArticleWidgetGalleryObject, IArticleWidgetImage, IArticleWidgetMedia, IArticleWidgetText, ITab, IUser as IUser$1, MenuItem, MsFile, MsFileFromFeature, Page, PageSection, PageSectionAppearance, PageSectionCounterWidget, PageSectionCta, PageSectionDictionaryFilterTarget, PageSectionDictionaryTarget, PageSectionGrid, PageSectionKey, PageSectionMedia, PageSectionRaw, PageSectionTarget } from "@smartsoft001-mobilems/models"; import { DomSanitizer, MetaDefinition, SafeHtml, SafeStyle } from "@angular/platform-browser"; import { Observable, Subscription } from "rxjs"; import { CrudFacade, CrudSearchService, CrudService, ICrudFilter, ICrudFilterQueryItem } from "@smartsoft001/crud-shell-angular"; import { IEntity } from "@smartsoft001/domain-core"; import { MsObject } from "@smartsoft001-mobilems/objects-domain"; import { MasonryOptions } from "@thisissoon/angular-masonry"; export declare function setTranslationsAndLang(service: TranslateService): void; export interface ITranslateData { MODEL: object; } export declare const TRANSLATE_DATA_PL: ITranslateData; export interface ITranslationsOptions { /** `/api/translations` in dev, `setting/theme` in production (the CMS owns the texts). */ url: string; /** Default 5000 ms. */ timeoutMs?: number; } /** * Loads the app texts for every `languages` entry present in the payload. * Never throws: missing or malformed translations only warn, so the app * still boots (with raw keys) when the CMS is not seeded yet. */ export declare function loadTranslations(http: HttpClient, translate: TranslateService, options: ITranslationsOptions, languages: string[]): Promise; /** * Which delegated link handlers the app shell (`AppComponent`) runs over its * whole content, CMS `[innerHTML]` included. A key left out of an object is on. */ export interface IContentLinksOptions { /** `ExternalLinksDirective` on the shell: leave-site modal, Router for internal links, `rel`, new-tab note. */ externalLinks?: boolean; /** `InPageAnchorsDirective` on the shell: `#id` links scroll within the page. */ inPageAnchors?: boolean; } /** * The resolved `IMobilemsAppOptions.contentLinks`, provided by `AppComponent` * on its own element. The shell's host directives read it with `self: true`, * so a `[smartExternalLinks]` / `[smartInPageAnchors]` anywhere else ignores it. */ export declare const MOBILEMS_CONTENT_LINKS: InjectionToken>; /** * Opt-in: `undefined` and `false` give both off (the shell behaves as before), * `true` gives both on, an object turns on every key it does not set to `false`. */ export declare function resolveContentLinks(option: IContentLinksOptions | boolean | undefined): Required; /** Runtime configuration every MobilEMS app has. */ export interface IMobilemsEnvironment { production: boolean; version: string; apiUrl: string; siteUrl: string; multimediaUrl: string; useLocalTranslations: boolean; } /** * An app-specific runtime key. In the browser it is read from `window.env` * under the property name, on the server from `process.env[env]` (a list: * the first variable that is set wins). `parse` turns the raw string into * the value; without it the raw string (or `''`) is used. */ export interface IMobilemsEnvKey { env: string | readonly string[]; parse?: (raw: string | undefined) => T; } type EnvKeys = Record>; /** The app runtime environment, for `EnvironmentService` and `provideMobilemsApp({ environment })`. */ export declare const MOBILEMS_ENVIRONMENT: InjectionToken; /** Core + extra key definitions of an environment made by `createMobilemsEnvironment`. */ export declare function mobilemsEnvKeys(environment: object): EnvKeys; /** First set `process.env` variable of a source, `undefined` outside Node. */ export declare function readProcessEnv(source: string | readonly string[]): string | undefined; /** Value of a key from a raw source value (string from env, or an already typed value). */ export declare function envValue(definition: IMobilemsEnvKey, raw: unknown): unknown; /** * The app's mutable runtime environment, filled once while the module loads: * from `window.env` (`/env.js`) in the browser, from `process.env` on the * server. `EnvironmentService` refreshes it at startup (SSR → TransferState → * browser). Never throws: missing values are `''` (or the `parse` result). * * export const environment = createMobilemsEnvironment<{ adobeFontsKitId: string }>({ * adobeFontsKitId: { env: 'ADOBE_FONTS_KIT_ID' }, * }); */ export declare function createMobilemsEnvironment = Record>(extra?: { [K in keyof E]: IMobilemsEnvKey; }): IMobilemsEnvironment & E; export type SeoMetadataType = 'article' | 'website'; export interface ISeoMetadata { title: string; description?: string; image?: string; imageWidth?: number; imageHeight?: number; imageAlt?: string; type?: SeoMetadataType; url?: string; /** * Opt-in: a root-relative `url` (`/artysci/4421/jan`) is resolved against the * site origin and becomes the canonical. Without it a relative `url` is ignored * and the request URL is used, as before. */ resolveRelativeUrl?: boolean; } /** What a museum app passes as `provideMobilemsApp({ seo })`. */ export interface IMobilemsSeoOptions { /** Translation key of the site name; default `'MODEL.mainTitle'`. */ siteNameKey?: string; /** Used when the key is not loaded yet (ngx-translate returns the key) or empty. */ siteNameFallback: Record; /** `og:locale` per language; default `{ pl: 'pl_PL', en: 'en_GB' }`. */ locales?: Record; defaultOgImage: { url: string; width: number; height: number; }; /** JSON-LD `Organization`; omitted → only the `WebSite` node is emitted. */ organization?: { name: string; url: string; logoPath?: string; }; /** Absolute site origin for canonical/og URLs, read at call time (runtime env). */ siteUrl: () => string | undefined; /** Path of the search page for the JSON-LD `SearchAction`; default `'/wyszukaj'`. */ searchPath?: string; /** Default 170. */ maxDescriptionLength?: number; } /** The options plus the app languages, as `MuseumSeoService` injects them. */ export interface IMuseumSeoConfig extends IMobilemsSeoOptions { languages: string[]; defaultLanguage: string; } export declare const MOBILEMS_SEO_OPTIONS: InjectionToken; /** One skip link: the element id to jump to and the translation key of its label. */ export interface ISkipLink { targetId: string; translationKey: string; } export interface ILanguagesOptions { /** Languages the museum ships translations for, e.g. `['pl', 'en']`. */ available: string[]; /** Used when no valid preference is found; must be in `available`. */ default: string; } export interface ISkipLinksOptions { /** Middle links on the home page (nav and footer links are added automatically). */ home: ISkipLink[]; /** Middle links on every other page. */ subpage: ISkipLink[]; } export interface IMobilemsAppOptions { /** Written to the `app-version` meta tag. */ version?: string; languages: ILanguagesOptions; skipLinks: ISkipLinksOptions; /** Paths (without query string) treated as the home page. Default `DEFAULT_HOME_PATHS`. */ homePaths?: string[]; /** Overrides merged over the shell's default `IAppOptions` (logo, provider, menu, style). */ app?: Partial; /** When set, the app texts are fetched from `url` right after the language is resolved. */ translations?: ITranslationsOptions; /** Museum SEO constants for `MuseumSeoService` (site name, OG image, organization, site URL). */ seo?: IMobilemsSeoOptions; /** * The app runtime environment (`createMobilemsEnvironment`): provided as * `MOBILEMS_ENVIRONMENT` and the default for `version`. */ environment?: IMobilemsEnvironment; /** CMS slug and route of the home page; defaults `strona-glowna` / `/strona-glowna`. */ homePage?: { slug?: string; path?: string; }; /** * Delegated handling of links inside the app shell (external-link modal, * in-page `#id` anchors). Opt-in, default off: `true` turns both on, an * object turns on every key it does not set to `false`. */ contentLinks?: IContentLinksOptions | boolean; } export declare const MOBILEMS_APP_OPTIONS: InjectionToken; export declare const NAV_SKIP_LINK: ISkipLink; export declare const FOOTER_SKIP_LINK: ISkipLink; export declare const DEFAULT_HOME_PATHS: readonly string[]; /** * Developer errors surface at provider construction, before bootstrap, with the * offending field in the message. */ export declare function validateMobilemsAppOptions(options: IMobilemsAppOptions): void; /** * Navigation state for a navigation that stays on the same page and must not * steal focus (tabs, list pagination, "more" buttons — MOB-1662). Pass as * `state` in `router.navigate(...)`. */ export declare const KEEP_FOCUS_STATE: { readonly keepFocus: true; }; /** * After every navigation focus lands on `#skip-links` (the top of the page for * screen readers), unless the navigation asked for `keepFocus`. */ export declare function setupRouteFocus(router: Router, document: Document, destroyRef: DestroyRef): void; /** * Everything a museum app's root used to wire by hand: language resolution, * the global `Config` load, the `app-version` meta tag and focus-after-navigation. * * Place it before any project initialiser that depends on the language (the * translations fetch): the language is resolved synchronously at the start of * the initialiser, so later initialisers see the right `Accept-Language`. */ export declare function provideMobilemsApp(options: IMobilemsAppOptions): EnvironmentProviders; export declare class SharedConfig { apiUrl: string; multimediaUrl: string; mainLogoPath: string; styleVariables?: Record; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export interface IMobilemsCoreOptions { routes: Route[]; /** Extra `provideRouter` features after the built-in in-memory scrolling. */ routerFeatures?: RouterFeatures[]; shared: SharedConfig; /** Class interceptors registered after the framework ones and before the dedupe interceptor. */ interceptors?: Type[]; } /** `AppService.initTitle()` would overwrite titles set through `SeoService.updateTitle()`. */ export declare class NoOpAppService extends AppService { initTitle(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * The provider set every museum app used to copy into `app.config.ts`: * hydration, zoneless change detection, router, HttpClient with the MobilEMS * interceptors, NgRx, Masonry, ngx-translate and `SharedModule.forRoot()`. * * NgRx devtools are not included (not a framework dependency) — add * `provideStoreDevtools(...)` in the app when wanted. */ export declare function provideMobilemsCore(options: IMobilemsCoreOptions): EnvironmentProviders; /** First letter upper-cased; `null`/`undefined` become `''`. */ export declare class CapitalizePipe implements PipeTransform { transform(value: string | null | undefined): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } export declare class AltTextPipe implements PipeTransform { private translationService; transform(file?: MsFile, baseAlt?: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } export type FileUrlMode = 'cache' | 'big' | 'noCache'; export declare class FileUrlService { private readonly config; get(fileOrPath?: MsFile | string, mode?: FileUrlMode, noImagePlaceholder?: string): string; private replaceExtensionIfCache; private getFileName; private getPath; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export declare class FileUrlPipe implements PipeTransform { private readonly service; transform(file?: MsFile | string, mode?: FileUrlMode): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } export declare class BackgroundUrlPipe implements PipeTransform { private readonly sanitizer; private readonly service; transform(file?: MsFile, mode?: FileUrlMode): SafeStyle; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } /** * Muza (cache) przechowuje miniatury katalogowe wyłącznie pod `media/dictionaries` * jako `.jpg`, nawet gdy oryginał ma inne rozszerzenie — stąd bezwarunkowy * `.png` → `.jpg`. Poza tym katalogiem (np. `entry_collections`) CDN oddaje * plik z jego prawdziwym rozszerzeniem (bywa `.PNG`); wymuszenie `.jpg` * tam trafia w 404/ORB (MOB-1564). Współdzielona z `objects-grid-item`, * `objects-list-item` i `new-objects-carousel`, które renderują ten sam typ * zdjęcia co ten pipe. */ export declare function replaceExtension(path: string, mode: FileUrlMode): string; /** * Tekst z pola HTML Muzy (tytuł artykułu przychodzi jako `

…

`) jako * zwykły tekst: bez znaczników, z encjami zamienionymi na znaki i sklejonymi * białymi znakami. `smartRemoveHtml` frameworka wycina nieznane mu encje — * na danych Kresów „(1918–2012)” stawało się „(19182012)” (MOB-1808). * * Bez `DOMParser` (SSR): znaczniki usuwane przed dekodowaniem i jeszcze raz * po nim, więc zakodowany znacznik (`<img …>`) też nie przetrwa. * Wynik to tekst — wiązać przez interpolację, nigdy jako `innerHTML`. */ export declare function toPlainText(value: unknown): string; export declare class PlainTextPipe implements PipeTransform { transform(value: unknown): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } /** * Usuwa znaczniki ``/`` z HTML, zostawiając ich treść. * Dla zajawek renderowanych wewnątrz klikalnej karty (``) — * link w linku jest niepoprawny i nieobsługiwalny dla czytników ekranu. */ export declare class StripAnchorsPipe implements PipeTransform { transform(value: string | null | undefined): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } export declare class LanguageInterceptor implements HttpInterceptor { private readonly translateService; intercept(req: HttpRequest, next: HttpHandler): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export declare class PreviewAuthInterceptor implements HttpInterceptor { intercept(req: HttpRequest, next: HttpHandler): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export declare class SsrTimeoutInterceptor implements HttpInterceptor { private readonly platformId; intercept(req: HttpRequest, next: HttpHandler): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Collapses identical requests that are in flight at the same time into a * single network call. * * The app shell, header and footer all need the config on init and several * vendor components request it independently, so one page view fired the same * endpoints several times in parallel and the API answered 503 (MOB-1008). * * Only overlapping requests share a response — once a request settles its * entry is dropped, so this never serves stale data to a later navigation. */ export declare class DedupeRequestInterceptor implements HttpInterceptor { private readonly inFlight; intercept(req: HttpRequest, next: HttpHandler): Observable>; private isDeduplicable; private keyFor; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Zamienia encje HTML na znaki, które reprezentują. Działa identycznie na * serwerze i w przeglądarce (bez `DOMParser`), więc SSR i klient generują ten * sam tekst. */ export declare function decodeHtmlEntities(text: string | undefined): string; /** * Przygotowuje tekst pod meta tagi: dekoduje encje i skleja wszystkie białe * znaki (w tym twarde spacje) w pojedyncze zwykłe spacje. Bez tego * `meta[name="description"]` i `twitter:description` trafiały do wyników * wyszukiwania z surowym ` ` (MOB-1033). */ export declare function normalizeMetaText(text: string | undefined): string; /** * Encje nazwane HTML (MOB-1808) — pełny zestaw HTML 4 (252, wygenerowany * z `html.entities.name2codepoint`) i polskie litery oraz odstępy z HTML 5, * których używa edytor Muzy (`ą`, `ł`, `ż`…). Mapa jest * statyczna, więc dekodowanie działa tak samo w SSR i w przeglądarce. */ export declare const HTML_NAMED_ENTITIES: Readonly>; export declare function stripHtml(html: string | undefined): string; /** * Normalizes a URL by adding https:// protocol if not present. * Preserves relative paths starting with /. * * @param url - The URL to normalize * @returns Normalized URL with protocol, or original relative path * * @example * normalizeUrl('example.com') // 'https://example.com' * normalizeUrl('/gallery/123') // '/gallery/123' * normalizeUrl('https://example.com') // 'https://example.com' */ export declare function normalizeUrl(url: string): string; export interface IHomePathOptions { /** * Podlasie's header rule (the `HeaderBaseComponent` default): the url must * equal a home path, or start with it followed by `?` (not for `/`). A * fragment, a query on `/` and a trailing slash are not home. Default * `false`: the lenient rule. */ strict?: boolean; } /** * Whether `url` is one of the home paths. Lenient by default: the query and * the fragment are ignored and one trailing slash is dropped, on both sides of * the comparison. `{ strict: true }` reproduces Podlasie's header rule (see * `IHomePathOptions.strict`). In both modes sub-pages and prefixes * (`/strona-glowna-2`, `/strona-glowna/x`) are not home. */ export declare function isHomePath(url: string, homePaths?: readonly string[], options?: IHomePathOptions): boolean; /** Wynik klasyfikacji adresu linku. */ export type LinkClassification = /** Ten sam serwis — nawigacja Routerem po `path` (pathname + search + hash). */ { kind: 'internal'; path: string; } | /** Inny serwis — przed wyjściem modal „Opuszczasz stronę”. */ { kind: 'external'; href: string; } | /** `mailto:`, `tel:`, `javascript:`, lokalny `#fragment`, pusty/błędny adres — bez obsługi. */ { kind: 'ignore'; }; export interface IClassifyLinkOptions { /** Baza dla adresów względnych. Domyślnie `document.baseURI`, na serwerze `siteUrl`. */ base?: string; /** Bieżące pochodzenie. Domyślnie `window.location.origin`. */ origin?: string; /** * Publiczny adres serwisu (`IMobilemsEnvironment.siteUrl`). Domyślnie * `window.env.siteUrl` (`env.js`). */ siteUrl?: string; } /** * Jedyny klasyfikator linków (dyrektywy `appExternalLink`/`appExternalLinks`, * menu z CMS, `isInternalLink`). * * Adres jest rozwiązywany jak w przeglądarce: `new URL(href, base)`, więc * `./x`, `x/y`, `?q` i `/x` to linki wewnętrzne. Pochodzenie porównujemy z * bieżącym `origin` i z `siteUrl` (opcja albo `env.js`) (bez `www.` i bez rozróżnienia * http/https — ten sam serwis pod obydwoma adresami). */ export declare function classifyLink(href: string | null | undefined, options?: IClassifyLinkOptions): LinkClassification; /** * Determines if a URL is an internal link (relative path or same-origin URL) * * Thin wrapper over {@link classifyLink} — the single link classifier. * * @param url - The URL to check * @param currentOrigin - (optional) Current origin for testing. Defaults to window.location.origin * @returns true if the URL is internal (relative path or same origin), false if external or invalid * * @example * isInternalLink('/gallery/123') // true * isInternalLink('https://museum.example.com/gallery') // true (if current origin matches) * isInternalLink('https://external.com/page') // false */ export declare function isInternalLink(url: string | null | undefined, currentOrigin?: string): boolean; export interface INamedEntry { name?: string; comment?: string; } /** Wpis słownikowy z API (twórca, datowanie, miejsce, rodzaj, …). */ export interface INamedEntrySource { id?: number | string | null; name?: string | null; /** Tekst albo wpis słownikowy `{ id, name }` (obiekty w widżetach artykułu). */ role?: string | { id?: number | string | null; name?: string | null; } | null; comment?: string | null; } /** * Wpis rozbity do renderowania wg „Opisu pól” MobileMS: `name [role] * (comment)` — rola w nawiasie kwadratowym, komentarz innym krojem (muted), * obie części tylko gdy niepuste. */ export interface INamedEntryParts { id?: number | string | null; name: string; role: string | null; comment: string | null; } /** * Formats `{ name, comment }` entries (createPlaces, createDates) into the * `Name (comment); Other` string rendered on the object cards. * * "nieznany" is a valid dictionary value and stays visible (MOB-1023). Only * entries without a name are dropped — they would otherwise join into empty * segments like `" ; ; Warszawa"`. */ export declare function formatNamedEntries(entries: INamedEntry[] | undefined): string; /** * Wpisy `{ name, role, comment }` jako osobne części (szablon rysuje * komentarz innym krojem). Wpisy bez nazwy odpadają, „nieznany” zostaje. */ export declare function namedEntryParts(entries: ReadonlyArray | null | undefined): INamedEntryParts[]; /** * Tekst do porównań „na oko” w filtrach list: małe litery, bez znaków * diakrytycznych (NFD + usunięcie znaków łączących). `ł`/`Ł` nie mają postaci * złożonej w NFD, więc mapujemy je osobno. Bez przycinania spacji. */ export declare function normalizeSearchText(value: string): string; /** * Licznik zmian tłumaczeń — zmiana języka (PL/EN) i doczytanie słownika. * `computed`, które składa teksty przez `translate.instant()`, czyta ten * sygnał, żeby przeliczyć się po przełączeniu języka (inaczej zostałby * tekst z pierwszego renderu). Wywoływać w kontekście wstrzykiwania. */ export declare function translationChanges(translate: TranslateService): Signal; /** Klucz dopisku „(otwiera się w nowej karcie)” — wspólny dla CTA, menu i treści CMS. */ export declare const NEW_TAB_KEY = "HOME.sections.opensInNewTab"; /** Te same teksty co w `translations.json` (pl/en). */ export declare const NEW_TAB_FALLBACK: { readonly pl: "otwiera się w nowej karcie"; readonly en: "opens in a new tab"; }; /** * Tekst dopisku w bieżącym języku. Produkcja bierze tłumaczenia wyłącznie * z CMS, a brakujący klucz ngx-translate zwraca surowy — wtedy tekst * zastępczy w języku strony, nie klucz. */ export declare function newTabText(translate: TranslateService): string; /** * `newTabText` jako sygnał — przelicza się po zmianie języka i doczytaniu * słownika (zoneless: szablon nie wywoła `instant()` ponownie sam z siebie). * Wywoływać w kontekście wstrzykiwania. */ export declare function newTabTextSignal(translate: TranslateService): Signal; /** * `page` z komponentu paginacji jest 1-based (numer widocznej strony). * Serwisy CRUD frameworka (`CrudBaseService.getList`, `CollectionsService`) * liczą stronę API jako `offset / limit`, a `offset` 0 to strona 1 — więc * strona N ma `offset = N × limit` (nie `(N − 1) × limit`, przy którym strona 2 * pobierała znowu stronę 1). Jedyne miejsce z tym przeliczeniem — konsumenci * paginacji mają go używać zamiast liczyć `offset` sami. */ export declare function pageToOffset(page: number, limit: number): number; /** Odwrotność {@link pageToOffset} — do wyświetlenia numeru strony z offsetu. */ export declare function offsetToPage(offset: number, limit: number): number; /** * A dictionary id from the API boundary: a finite number, or a numeric * string turned into one; anything else is `null`. */ export declare function normalizeCycleId(value: unknown): number | null; /** * Jedna pozycja parametru `?filter=` list katalogu (obiekty, kolekcje, * artykuły). Format pochodzi z linków * „filtruj po twórcy” na karcie obiektu (`{ name, data }`, słownik jako * `{ id, value }`), rozszerzony o `type` dla zakresów dat (`>=` / `<=`) oraz * o wartości proste (tekst, liczba, tak/nie) — dzięki temu link „Udostępnij * wyniki wyszukiwania” odtwarza cały bieżący filtr. */ export interface ICatalogFilterParamItem { name: string; data: Array<{ id: string | number | null; value: string; }> | string | number | boolean; type?: string; } /** Nazwa pozycji niosącej frazę — fraza nie jest pozycją `query`. */ export declare const SEARCH_TEXT_PARAM_NAME = "searchText"; /** Wynik parsowania `?filter=` — pozycje zapytania i ewentualna fraza. */ export interface IParsedCatalogFilterParam { query: ICrudFilterQueryItem[]; searchText?: string; } /** * Buduje wartość `?filter=` z bieżącego filtra listy. Puste wartości są * pomijane, a pusty wynik daje `null` (link bez parametru). */ export declare function serializeCatalogFilter(filter: Pick | null | undefined): string | null; /** * Odczytuje `?filter=` — zgodnie wstecz ze starszymi linkami (brak `type` * oznacza `=`). Uszkodzony JSON daje pusty filtr zamiast wyjątku w efekcie. */ export declare function parseCatalogFilterParam(raw: string | null | undefined): IParsedCatalogFilterParam | null; /** Parametry adresu listy katalogu: filtr z frazą, sortowanie i rozmiar strony. */ export interface ICatalogListQueryParams { filter?: string; sort?: string; limit?: string; } /** Sortowanie i rozmiar strony odczytane z adresu listy. */ export interface ICatalogListParams { sortBy?: string; sortDesc?: boolean; limit?: number; } /** * Adres listy głównej z kompletem filtrów — `?filter=` (z frazą jako * `searchText`, czyli `filter[phrase]` w API), `?sort=` (`-asc|desc`) * i `?limit=`. Zakładki wyników wyszukiwania przekazują tak swój filtr * liście głównej (MOB-1818). Puste pozycje są pomijane. */ export declare function catalogListQueryParams(filter: Pick | null | undefined): ICatalogListQueryParams; /** * Odczytuje `?sort=` i `?limit=` z adresu listy. Nieznany format jest * pomijany — lista zostaje przy swoich domyślnych wartościach. */ export declare function parseCatalogListParams(params: Record | null | undefined): ICatalogListParams; /** * `?filter=` of a catalog list for one dictionary value. The API filters * dictionaries by `id` only (`filter[creators][]=name` gives 400), so an entry * without an `id` searches for its value as a phrase (`searchText` -> * `filter[phrase]`). */ export declare function catalogEntryFilterParams(filter: string, id: number | string | null | undefined, name: string): { filter: string; }; /** Stan listy katalogu, z którego „więcej ↓” dociąga kolejne strony. */ export interface ICatalogLoadMoreSource { /** Bieżąca strona z fasady (fasada trzyma tylko jedną stronę). */ list: Signal; filter: Signal; totalCount: Signal; loading: Signal; /** Odczyt przez fasadę, np. `(filter) => facade.read(filter)`. */ read: (filter: ICrudFilter) => void; /** Rozmiar strony, gdy filtr go nie ma. */ defaultLimit: number; /** * Po doczytaniu strony: liczba nowych kart i indeks pierwszej z nich — * strona ogłasza to czytnikom ekranu i przenosi fokus. */ onAppended?: (added: number, firstIndex: number) => void; } export interface ICatalogLoadMore { /** Karty na liście — przy „więcej” poprzednie strony + bieżąca. */ readonly items: Signal; /** Są jeszcze wyniki za bieżącą stroną. */ readonly hasMore: Signal; /** Trwa dociąganie — lista zostaje, stan ładowania ma tylko przycisk. */ readonly isAppending: Signal; loadMore(): void; } /** * „więcej ↓” pod listą na mobile (jak na /obiekty, makieta 2300:51213): * dopisuje kolejną stronę wyników pod kartami zamiast paginacji. Karty * z poprzednich stron trzymamy tutaj — inny filtr albo strona z paginacji * unieważnia doczytane karty. Wywołać w kontekście wstrzykiwania (efekt). */ export declare function createCatalogLoadMore(source: ICatalogLoadMoreSource): ICatalogLoadMore; /** Fasada CRUD widziana przez strażnika — filtr ostatniego `Read` i odczyt. */ export interface ICrudReadGuardFacade { filter: Signal; read(filter: ICrudFilter): void; } /** Wynik strażnika: czy lista/licznik w store należą do bieżącego filtra. */ export interface ICrudReadGuard { fresh: Signal; } /** * Klucz filtra niezależny od kolejności pól — porównanie „po normalizacji”. * `undefined` pomijane, jak w JSON. */ export declare function crudFilterKey(filter: ICrudFilter | null | undefined): string; /** * Strażnik wyścigu odpowiedzi we wspólnym slice CRUD (MOB-1817). Listy * katalogu i zakładki wyszukiwarki wysyłają `Read` do tej samej encji, a efekt * frameworka nie anuluje poprzedniego żądania i reducer przyjmuje każdy * `Read Success` — wolna odpowiedź starej trasy mogłaby nadpisać listę nowej. * * Strażnik śledzi akcje `Read Success/Failure` encji: wynik jest „świeży”, * gdy jego filtr (po normalizacji) równa się filtrowi ostatniego `Read` * (`facade.filter()`). Do tego czasu lista ma pokazywać ładowanie. Jeśli * nieaktualna odpowiedź przyszła już PO świeżej (i nadpisała jej listę * w store), strażnik ponawia odczyt bieżącego filtra. * * Bez Store (testy jednostkowe) zwraca zawsze `fresh = true`. */ export declare function createCrudReadGuard(facade: ICrudReadGuardFacade): ICrudReadGuard; /** * Event data emitted when a click is detected outside an element. * * @example * ```typescript * const clickEvent: ClickOutsideEvent = { * event: mouseEvent, * target: element * }; * ``` */ export interface ClickOutsideEvent { /** * The native MouseEvent that triggered the outside click. */ event: MouseEvent; /** * The target element that was clicked. */ target: EventTarget | null; } export type IDictionaryEntry = { id: number | null; name: string; extraData?: { image: string; description: string; }; }; export type IDictionary = { data: { extraData: Record | null; items: IDictionaryEntry[]; paginatorDetails: { currentPage: number; maxPerPage: number; totalItemsCount: number; totalPagesCount: number; }; }; message: string | null; status: number | null; }; export interface IArticleListItem { id: number; title: string; subTitle: string; authors: { id: number; name: string; }[]; creators: { id: number; name: string; }[]; image: { id: number; filePath: string; extension: string; altText: string; fileName: string; }; quote: string; quoteVisible: boolean; shortDescription: string; publicationDate: string; category: number; templateName: string; color: string; titleColor: string; visited: number; keywords: { id: number; name: string; }[]; cycles: { id: number; name: string; }[]; copyright: { id: number; name: string; image: string; link: string; restricted: boolean; }; leftWidgets: any; rightWidgets: any; bottomWidgets: any; fileName: string; imageDesktop: { id: number; filePath: string; extension: string; altText: string; fileName: string; }; imageTablet: { id: number; filePath: string; extension: string; altText: string; fileName: string; }; imageMobile: { id: number; filePath: string; extension: string; altText: string; fileName: string; }; liked: boolean; likesNumber: number; articleTypes: { id: number; name: string; }[]; virtualExhibitionSlides: any; } export interface IObject { id: number; likes: number; collected: boolean; liked: boolean; masterpieces: boolean; title: string; slug: string | null; image: IImage; authors: IAuthorDetails[]; otherTitles: unknown[]; seriesTitles: ISeriesTitle[]; createDates: ICreateDate[]; createPlaces: ICreatePlace[]; types: IType[]; inventoryNumber: string; description: string | null; createdAt: string; updatedAt: string; techniques: ITechnique[]; materials: IMaterial[]; extraNumbers: IExtraNumber[]; } export interface IImage { id: number; position: number; filePath: string; extension: string; altText: string | null; altTextEn: string | null; vimeoUrl: string | null; } export interface IAuthorDetails { id: number; name: string; role: string; comment: string | null; dateFrom: string | null; dateTo: string | null; placeDateOfBirth: string | null; placeDateOfDeath: string | null; biography: string | null; period: string | null; additionalRoles: unknown[]; baseConnectionObjects: unknown[]; dcClassification: string | null; } export interface ISeriesTitle { id: number; name: string; comment: string | null; } export interface ICreateDate { id: number; name: string; comment: string | null; } export interface ICreatePlace { id: number; name: string; role: string | null; lat: number; lon: number; comment: string | null; hierarchy: unknown | null; includeHierarchy: boolean; baseConnectionObjects: unknown[]; } export interface IType { id: number; name: string; comment: string | null; commentsEnabled: boolean; bugReportEnabled: boolean; editedDescription: string | null; hierarchy: unknown | null; includeHierarchy: boolean; baseConnectionObjects: unknown[]; } export interface ITechnique { id: number; name: string; comment: string | null; } export interface IMaterial { id: number; name: string; comment: string | null; } export interface IExtraNumber { id: number; number: string; comment: string | null; } export interface IPartner { id: string; name: string; extraData?: { name?: string; phone?: string; emailAddress?: string; description?: string; shortDescription?: string; address?: string; logo?: MsFile; image?: MsFile; website?: string; }; } export interface IHomePage { id: number; title: string; content: { changingThisBreaksApplicationSecurity: null | any; }; extraContent: null | any; image: null | any; items: any[]; seo: { description: null | any; keywords: null | any; lastModified: null | any; robots: null | any; title: null | any; }; slides: Array; slug: null | string; subTitle: null | any; template: { tag: string | 'default'; payload: null | any; }; virtualExhibitionSlides: any[]; } export interface IHomePageSlide { id: number; title: string; author: string | null; textPosition: 'left' | 'right' | 'center'; imageDesktop: string | null; imageTablet: string | null; imageMobile: string | null; imageInfo: string | null; link: string; position: number; subTitle: string | null; textColor: string | null; uppercase: boolean; } /** * Token providing the parent page title (e.g., article name) to child components. * Used as a fallback for download filenames when widget data has no title. */ export declare const PARENT_TITLE_TOKEN: InjectionToken>; /** Pozycja słownikowa filtra z id znormalizowanym do liczby. */ export type IDictionaryFilterItem = IDictionaryEntry & { id: number; }; /** * Wpis słownikowy w wartości filtra: obiekt z id (liczba albo niepusty * napis). Odrzuca `null`, prymitywy i obiekty bez id — wartość filtra * pochodzi z adresu i pamięci, więc bywa dowolna (recenzja MOB-1826). */ export declare function isDictionaryEntry(item: unknown): item is IDictionaryEntry; /** Wpisy słownikowe wartości filtra (`isDictionaryEntry`); nie-tablica → `[]`. */ export declare function dictionaryEntries(value: unknown): IDictionaryEntry[]; /** * Klucz porównania id wpisu: liczbowe id (także `"3"`) jako liczba, inne * napisy bez zmian; brak id → `null`. */ export declare function dictionaryEntryKey(id: unknown): string | null; /** * Wartość słownikowej pozycji filtra (`cycles`, `keywords`, …) jako lista * pozycji z liczbowym id — bez `null`, napisów, obiektów bez poprawnego id * i powtórzeń (`"7"` z deep linku i `7` ze słownika to ten sam wpis). * Wartość nie-tablicowa (`null`, `true`, tekst) daje pustą listę (recenzja * MOB-1826: `[null]` w odtworzonym filtrze wywracało panel). */ export declare function dictionaryFilterItems(value: unknown): IDictionaryFilterItem[]; /** * Chipy paska: zaznaczone pozycje filtra na początku, potem wynik słownika * bez nich — zaznaczony cykl zostaje widoczny i da się go odznaczyć także * wtedy, gdy fraza „Wyszukaj tagi” (`q`) go nie zwraca (MOB-1815/MOB-1826). */ export declare function mergeSelectedTags(selected: readonly IDictionaryFilterItem[], tags: readonly IDictionaryEntry[]): IDictionaryEntry[]; /** * Nowa wartość pozycji filtra po kliknięciu w tag: zdejmuje wpis o tym samym * znormalizowanym id (klik w `3` zdejmuje `"3"` z deep linku) albo go * dokłada. Zdarzenie bez poprawnego id zwraca `null` — nic do zmiany. */ export declare function toggleDictionaryFilterItem(value: unknown, toggled: IDictionaryEntry | null | undefined): IDictionaryFilterItem[] | null; /** * Sequence of numbers for element ids (`aria-labelledby`, `aria-controls`, * `
` / `