@smartsoft001-mobilems/objects-shell-angular 2.128.0 → 2.130.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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { TemplateRef, ModuleWithProviders, Signal, AfterViewInit, WritableSignal, OnInit, ResourceRef } from '@angular/core';
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, ModuleWithProviders, Signal, AfterViewInit, WritableSignal, OnInit, ResourceRef, ElementRef } from '@angular/core';
|
|
3
3
|
import * as _smartsoft001_crud_shell_angular from '@smartsoft001/crud-shell-angular';
|
|
4
|
-
import { ICrudModuleOptionsWithoutRoutng, CrudFacade, State as State$1, CrudListPageBaseComponent, CrudItemPageBaseComponent, CrudService, ICrudFilter } from '@smartsoft001/crud-shell-angular';
|
|
4
|
+
import { ICrudModuleOptionsWithoutRoutng, CrudFacade, State as State$1, CrudListPageBaseComponent, CrudItemPageBaseComponent, CrudService, ICrudFilter, ICrudFilterQueryItem } from '@smartsoft001/crud-shell-angular';
|
|
5
5
|
import { IEntity } from '@smartsoft001/domain-core';
|
|
6
|
-
import * as
|
|
7
|
-
import { FiltersBaseComponent, CrudBaseService, SeoService, TranslationService, IDictionaryPage, ICatalogOptions, ICatalog, ISeoMetadata, INamedEntrySource, INamedEntryParts } from '@smartsoft001-mobilems/angular';
|
|
6
|
+
import * as _smartsoft001_mobilems_angular from '@smartsoft001-mobilems/angular';
|
|
7
|
+
import { FiltersBaseComponent, CrudBaseService, SeoService, TranslationService, IDictionaryPage, ICatalogOptions, ICatalog, ISeoMetadata, INamedEntrySource, INamedEntryParts, FilterType, IDictionaryEntry, FiltersContext, ThemeTag, ShareLinkBaseComponent, FileUrlService, WidgetAudioItem } from '@smartsoft001-mobilems/angular';
|
|
8
8
|
import * as i1 from '@angular/common';
|
|
9
9
|
import { MsObject } from '@smartsoft001-mobilems/objects-domain';
|
|
10
10
|
import * as dist_packages_objects_domain_src from 'dist/packages/objects/domain/src';
|
|
@@ -14,48 +14,52 @@ import * as _ngrx_store from '@ngrx/store';
|
|
|
14
14
|
import { Action } from '@ngrx/store';
|
|
15
15
|
import { MsFile } from '@smartsoft001-mobilems/models';
|
|
16
16
|
import { ListMode } from '@smartsoft001/angular';
|
|
17
|
+
import * as rxjs from 'rxjs';
|
|
17
18
|
import { Observable } from 'rxjs';
|
|
19
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
20
|
+
import { SafeResourceUrl } from '@angular/platform-browser';
|
|
21
|
+
import * as _smartsoft001_mobilems_objects_shell_angular from '@smartsoft001-mobilems/objects-shell-angular';
|
|
18
22
|
|
|
19
23
|
declare class FiltersComponent extends FiltersBaseComponent<MsObject> {
|
|
20
|
-
static ɵfac:
|
|
21
|
-
static ɵcmp:
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FiltersComponent, never>;
|
|
25
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FiltersComponent, "smart-mobilems-objects-filters", never, {}, {}, never, never, true, never>;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
declare class ListComponent {
|
|
25
29
|
private facade;
|
|
26
|
-
list:
|
|
27
|
-
loading:
|
|
28
|
-
itemTpl:
|
|
29
|
-
loadingTpl:
|
|
30
|
-
static ɵfac:
|
|
31
|
-
static ɵcmp:
|
|
30
|
+
list: _angular_core.Signal<dist_packages_objects_domain_src.MsObject[]>;
|
|
31
|
+
loading: _angular_core.Signal<boolean>;
|
|
32
|
+
itemTpl: _angular_core.Signal<TemplateRef<any>>;
|
|
33
|
+
loadingTpl: _angular_core.Signal<TemplateRef<any>>;
|
|
34
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
35
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListComponent, "smart-mobilems-objects-list", never, {}, {}, ["itemTpl", "loadingTpl"], never, true, never>;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
declare class ComponentsModule {
|
|
35
|
-
static ɵfac:
|
|
36
|
-
static ɵmod:
|
|
37
|
-
static ɵinj:
|
|
39
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComponentsModule, never>;
|
|
40
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ComponentsModule, never, [typeof i1.CommonModule, typeof FiltersComponent, typeof ListComponent], [typeof FiltersComponent, typeof ListComponent]>;
|
|
41
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<ComponentsModule>;
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
declare class ObjectsModule {
|
|
41
45
|
static forFeature<T extends IEntity<string>>(options: ICrudModuleOptionsWithoutRoutng<T>): ModuleWithProviders<ObjectsModule>;
|
|
42
|
-
static ɵfac:
|
|
43
|
-
static ɵmod:
|
|
44
|
-
static ɵinj:
|
|
46
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsModule, never>;
|
|
47
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ObjectsModule, never, [typeof _smartsoft001_mobilems_angular.SharedModule, typeof ComponentsModule, typeof _smartsoft001_crud_shell_angular.CrudCoreModule], [typeof ComponentsModule]>;
|
|
48
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<ObjectsModule>;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
declare class ObjectsSharedModule {
|
|
48
52
|
static forFeature<T extends IEntity<string>>(options: ICrudModuleOptionsWithoutRoutng<T>): ModuleWithProviders<ObjectsSharedModule>;
|
|
49
|
-
static ɵfac:
|
|
50
|
-
static ɵmod:
|
|
51
|
-
static ɵinj:
|
|
53
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsSharedModule, never>;
|
|
54
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ObjectsSharedModule, never, [typeof _smartsoft001_mobilems_angular.SharedModule, typeof ComponentsModule, typeof _smartsoft001_crud_shell_angular.CrudModule], [typeof ComponentsModule, typeof _smartsoft001_crud_shell_angular.CrudModule]>;
|
|
55
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<ObjectsSharedModule>;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
declare class ObjectsService extends CrudBaseService<MsObject> {
|
|
55
59
|
getUrlNameForDetails(): string;
|
|
56
60
|
getUrlNameForList(): string;
|
|
57
|
-
static ɵfac:
|
|
58
|
-
static ɵprov:
|
|
61
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsService, never>;
|
|
62
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ObjectsService>;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
declare class ObjectsFacade extends CrudFacade<MsObject> {
|
|
@@ -64,8 +68,8 @@ declare class ObjectsFacade extends CrudFacade<MsObject> {
|
|
|
64
68
|
title: string;
|
|
65
69
|
id: string;
|
|
66
70
|
}): Promise<void>;
|
|
67
|
-
static ɵfac:
|
|
68
|
-
static ɵprov:
|
|
71
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsFacade, never>;
|
|
72
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ObjectsFacade>;
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
type State = State$1<MsObject>;
|
|
@@ -115,25 +119,25 @@ declare abstract class ObjectsListComponent extends CrudListPageBaseComponent<Ms
|
|
|
115
119
|
list: Signal<MsObject[]>;
|
|
116
120
|
loading: Signal<boolean>;
|
|
117
121
|
filter: Signal<_smartsoft001_crud_shell_angular.ICrudFilter>;
|
|
118
|
-
static ɵfac:
|
|
119
|
-
static ɵdir:
|
|
122
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsListComponent, never>;
|
|
123
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectsListComponent, never, never, {}, {}, never, never, true, never>;
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
declare abstract class ObjectsItemComponent extends CrudItemPageBaseComponent<MsObject> {
|
|
123
127
|
protected readonly route: ActivatedRoute;
|
|
124
128
|
protected readonly seoService: SeoService;
|
|
125
129
|
protected readonly translationService: TranslationService;
|
|
126
|
-
protected readonly params:
|
|
130
|
+
protected readonly params: _angular_core.Signal<_angular_router.Params>;
|
|
127
131
|
facade: ObjectsFacade;
|
|
128
|
-
readonly loading:
|
|
129
|
-
readonly item:
|
|
132
|
+
readonly loading: _angular_core.Signal<boolean>;
|
|
133
|
+
readonly item: _angular_core.Signal<MsObject>;
|
|
130
134
|
/** @deprecated No museum uses it; download the card through the app's own download service. */
|
|
131
|
-
readonly isPdfDownloading:
|
|
135
|
+
readonly isPdfDownloading: _angular_core.WritableSignal<boolean>;
|
|
132
136
|
protected constructor();
|
|
133
137
|
/** @deprecated No museum uses it; download the card through the app's own download service. */
|
|
134
138
|
onDownload(): Promise<void>;
|
|
135
|
-
static ɵfac:
|
|
136
|
-
static ɵdir:
|
|
139
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsItemComponent, never>;
|
|
140
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectsItemComponent, never, never, {}, {}, never, never, true, never>;
|
|
137
141
|
}
|
|
138
142
|
|
|
139
143
|
/** Response of `GET object/:id/related`. */
|
|
@@ -231,8 +235,8 @@ declare class ObjectsDataService extends ObjectsService {
|
|
|
231
235
|
loadRelatedCollections(objectId: number | string): Observable<IObjectCollectionSummary[]>;
|
|
232
236
|
/** Whether `search/Object` with the collection's `filter[entryCollections]` contains the object; an error → unknown → `false`. */
|
|
233
237
|
private objectsDataCollectionContains;
|
|
234
|
-
static ɵfac:
|
|
235
|
-
static ɵprov:
|
|
238
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsDataService, never>;
|
|
239
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ObjectsDataService>;
|
|
236
240
|
}
|
|
237
241
|
|
|
238
242
|
type SortType = 'random' | 'date-asc' | 'date-desc' | 'name-asc' | 'name-desc';
|
|
@@ -375,8 +379,8 @@ declare class ObjectMediaService {
|
|
|
375
379
|
private objectMediaAdditional;
|
|
376
380
|
/** Replaces the extension with `.jpg` — CDN cache compatibility. */
|
|
377
381
|
private objectMediaJpg;
|
|
378
|
-
static ɵfac:
|
|
379
|
-
static ɵprov:
|
|
382
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectMediaService, never>;
|
|
383
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ObjectMediaService>;
|
|
380
384
|
}
|
|
381
385
|
|
|
382
386
|
declare const SERVICES: (typeof ObjectsService | {
|
|
@@ -512,8 +516,8 @@ declare abstract class ObjectsCatalogBaseComponent extends ObjectsListComponent
|
|
|
512
516
|
protected applyListSeo(seo: IObjectsCatalogSeo): void;
|
|
513
517
|
private objectsCatalogInitMasonry;
|
|
514
518
|
private objectsCatalogDestroyMasonry;
|
|
515
|
-
static ɵfac:
|
|
516
|
-
static ɵdir:
|
|
519
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsCatalogBaseComponent, never>;
|
|
520
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectsCatalogBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
517
521
|
}
|
|
518
522
|
|
|
519
523
|
/** Options of an object details page, passed to `super(options)`. */
|
|
@@ -605,8 +609,8 @@ declare abstract class ObjectDetailsBaseComponent extends ObjectsItemComponent i
|
|
|
605
609
|
*/
|
|
606
610
|
protected onObjectShown(item: MsObject): void;
|
|
607
611
|
private objectDetailsFetchSsrSeo;
|
|
608
|
-
static ɵfac:
|
|
609
|
-
static ɵdir:
|
|
612
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectDetailsBaseComponent, never>;
|
|
613
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectDetailsBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
610
614
|
}
|
|
611
615
|
|
|
612
616
|
/**
|
|
@@ -709,5 +713,910 @@ interface IAskAboutObject {
|
|
|
709
713
|
*/
|
|
710
714
|
declare function askAboutObjectHref(translate: AskTranslate, object: IAskAboutObject): string | null;
|
|
711
715
|
|
|
712
|
-
|
|
713
|
-
|
|
716
|
+
/** How a field of the advanced filters panel is rendered. */
|
|
717
|
+
type ObjectsAdvancedFilterMode = 'dictionary' | 'tree' | 'text' | 'boolean';
|
|
718
|
+
/** The yes/no checkboxes of the panel ("Na ekspozycji", "Pokaż tylko"). */
|
|
719
|
+
type ObjectsAdvancedFilterBoolean = 'onExhibition' | 'hasImage' | 'hasVideo';
|
|
720
|
+
/**
|
|
721
|
+
* One field of the advanced filters panel. `dictionaryKey` is the API
|
|
722
|
+
* dictionary name (`DataService.loadFilterDictionary`); `key` is the query
|
|
723
|
+
* filter key written through `FiltersContext.filters`. Picking a value in a
|
|
724
|
+
* field with `dependsOn` checks the referenced boolean field (MOB-1802: the
|
|
725
|
+
* field stays enabled); unchecking that boolean clears the field.
|
|
726
|
+
*/
|
|
727
|
+
interface IObjectsAdvancedFilterField {
|
|
728
|
+
key: string;
|
|
729
|
+
labelKey: string;
|
|
730
|
+
mode: ObjectsAdvancedFilterMode;
|
|
731
|
+
dictionaryKey?: string;
|
|
732
|
+
/**
|
|
733
|
+
* The field's own source (`FilterDictionarySource`) instead of the default
|
|
734
|
+
* `DataService.loadFilterDictionary`:
|
|
735
|
+
* - `publicCollections` — `GET public-collections/page/{n}` through
|
|
736
|
+
* `ObjectsDataService.loadCollectionsDictionary`;
|
|
737
|
+
* - `archaeologicalData` — `GET dictionary/{segregation}/search/page/{n}`
|
|
738
|
+
* (one type per segregation) through `ObjectsDataService.loadArchaeologicalDictionary`.
|
|
739
|
+
*/
|
|
740
|
+
source?: 'publicCollections' | 'archaeologicalData';
|
|
741
|
+
/** Segregation of the `ArchaeologicalData` dictionary (only with `source: 'archaeologicalData'`). */
|
|
742
|
+
segregation?: ArchaeologicalSegregation;
|
|
743
|
+
dependsOn?: string;
|
|
744
|
+
}
|
|
745
|
+
/** One write of the panel's batch — handed to `FiltersContext.filters` by the bar. */
|
|
746
|
+
interface IObjectsAdvancedFilterWrite {
|
|
747
|
+
key: string;
|
|
748
|
+
type: '=';
|
|
749
|
+
val: FilterType;
|
|
750
|
+
}
|
|
751
|
+
/** Options of {@link ObjectsAdvancedFiltersBaseComponent}, passed to `super(…)`. */
|
|
752
|
+
interface IObjectsAdvancedFiltersOptions {
|
|
753
|
+
/** The panel's fields — the app's config (Podlasie: `OBJECTS_ADVANCED_FILTER_FIELDS`). */
|
|
754
|
+
fields: readonly IObjectsAdvancedFilterField[];
|
|
755
|
+
/** Query keys the panel writes in its single batch, in this order. */
|
|
756
|
+
managedKeys: readonly string[];
|
|
757
|
+
/**
|
|
758
|
+
* Keys the panel no longer has (MOB-1844). `FiltersContext.filters` changes
|
|
759
|
+
* only the keys it is given, so an old deep link or saved filter would stay
|
|
760
|
+
* active with no field to remove it — "Zastosuj" and "Resetuj" always send
|
|
761
|
+
* them with `val: undefined`. Default `[]`.
|
|
762
|
+
*/
|
|
763
|
+
retiredKeys?: readonly string[];
|
|
764
|
+
/** `locationType` value of "Na ekspozycji: Tak". Default `'Ekspozycja'`. */
|
|
765
|
+
onExhibitionValue?: string;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Logic of the "Filtry zaawansowane" panel (Muzeum Podlasia's
|
|
769
|
+
* `objects-advanced-filters`, MOB-1596, layout per the MOB-1802 mockup).
|
|
770
|
+
* Presentational: reads `filter()`, keeps every edit in a local draft and only
|
|
771
|
+
* writes through `apply` — the parent (the filters bar) performs the single
|
|
772
|
+
* `context.filters` assignment. The template and the field config stay in the app.
|
|
773
|
+
*/
|
|
774
|
+
declare abstract class ObjectsAdvancedFiltersBaseComponent {
|
|
775
|
+
private readonly objectsAdvancedFiltersTranslate;
|
|
776
|
+
private readonly objectsAdvancedFiltersService;
|
|
777
|
+
private readonly objectsAdvancedFiltersOptions;
|
|
778
|
+
/**
|
|
779
|
+
* "Kolekcja tematyczna" (MOB-1844): pages of the `public-collections` list
|
|
780
|
+
* (with the phrase in `filter[phrase]`) instead of a `dictionary/*` dictionary.
|
|
781
|
+
*/
|
|
782
|
+
protected readonly collectionsSource: (page: number, query?: string) => rxjs.Observable<_smartsoft001_mobilems_angular.IDictionaryPage>;
|
|
783
|
+
/**
|
|
784
|
+
* "Filtry archeologiczne" (MOB-1844): the `ArchaeologicalData` dictionary
|
|
785
|
+
* with a segregation — names planned by MobileMS (Kanbanize 50040).
|
|
786
|
+
*/
|
|
787
|
+
protected readonly archeoTownsSource: (page: number, query?: string) => rxjs.Observable<_smartsoft001_mobilems_angular.IDictionaryPage>;
|
|
788
|
+
protected readonly archeoPeriodsSource: (page: number, query?: string) => rxjs.Observable<_smartsoft001_mobilems_angular.IDictionaryPage>;
|
|
789
|
+
protected readonly archeoCulturesSource: (page: number, query?: string) => rxjs.Observable<_smartsoft001_mobilems_angular.IDictionaryPage>;
|
|
790
|
+
readonly filter: _angular_core.InputSignal<ICrudFilter>;
|
|
791
|
+
/** Toggled by the parent — reopening re-derives the draft, discarding it. */
|
|
792
|
+
readonly isOpen: _angular_core.InputSignal<boolean>;
|
|
793
|
+
/** The `/obiekty` list — a full-width band with the content in the page container. */
|
|
794
|
+
readonly fullBleed: _angular_core.InputSignal<boolean>;
|
|
795
|
+
readonly apply: _angular_core.OutputEmitterRef<IObjectsAdvancedFilterWrite[]>;
|
|
796
|
+
protected readonly fields: readonly IObjectsAdvancedFilterField[];
|
|
797
|
+
/** Mobile: the "Filtry archeologiczne" section collapses with a chevron (2276:7709). */
|
|
798
|
+
protected readonly archaeologicalOpen: _angular_core.WritableSignal<boolean>;
|
|
799
|
+
protected readonly draftQuery: _angular_core.WritableSignal<ICrudFilterQueryItem[]>;
|
|
800
|
+
/** Synthetic filter fed to the reused `app-filter-*` inputs so they read the draft. */
|
|
801
|
+
protected readonly draftFilter: _angular_core.Signal<ICrudFilter>;
|
|
802
|
+
protected constructor(options: IObjectsAdvancedFiltersOptions);
|
|
803
|
+
readDictionaryValue(key: string): IDictionaryEntry[];
|
|
804
|
+
onDictionaryToggle(key: string, item: IDictionaryEntry): void;
|
|
805
|
+
onDictionaryClearAll(key: string): void;
|
|
806
|
+
toggleArchaeological(): void;
|
|
807
|
+
onInventoryNumberChange(value: string): void;
|
|
808
|
+
onBooleanToggle(key: ObjectsAdvancedFilterBoolean, checked: boolean): void;
|
|
809
|
+
isBooleanChecked(key: ObjectsAdvancedFilterBoolean): boolean;
|
|
810
|
+
applyDraft(): void;
|
|
811
|
+
reset(): void;
|
|
812
|
+
private objectsAdvancedFiltersToggleFormFeature;
|
|
813
|
+
private objectsAdvancedFiltersWriteDictionary;
|
|
814
|
+
private objectsAdvancedFiltersSetDraftEntry;
|
|
815
|
+
private objectsAdvancedFiltersBuildPayload;
|
|
816
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsAdvancedFiltersBaseComponent, never>;
|
|
817
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectsAdvancedFiltersBaseComponent, never, never, { "filter": { "alias": "filter"; "required": true; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "fullBleed": { "alias": "fullBleed"; "required": false; "isSignal": true; }; }, { "apply": "apply"; }, never, never, true, never>;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/** Sort options of the objects list (the default order). */
|
|
821
|
+
declare const OBJECTS_SORT_OPTIONS: IKeyValue[];
|
|
822
|
+
/** Sort order shown for `?type=new` — newest first. */
|
|
823
|
+
declare const OBJECTS_NEW_TYPE_SORT_OPTIONS: IKeyValue[];
|
|
824
|
+
/** Page sizes of the objects list. */
|
|
825
|
+
declare const OBJECTS_LIMIT_OPTIONS: IKeyValue[];
|
|
826
|
+
/** API query key of the theme tags (cycles) filter. */
|
|
827
|
+
declare const OBJECTS_THEME_TAGS_FILTER_KEY = "cycles";
|
|
828
|
+
/** Chip labels of the yes/no filters from the advanced filters panel. */
|
|
829
|
+
declare const OBJECTS_FILTER_SINGLE_VALUE_LABELS: Readonly<Record<string, string>>;
|
|
830
|
+
/** A filter write in the shape `FiltersContext.filters` accepts. */
|
|
831
|
+
interface IObjectsFilterWrite {
|
|
832
|
+
key: string;
|
|
833
|
+
type: string;
|
|
834
|
+
val: FilterType;
|
|
835
|
+
}
|
|
836
|
+
/** A date range of the date filters (`null` — an open end). */
|
|
837
|
+
interface IObjectsDateRange {
|
|
838
|
+
from: string | null;
|
|
839
|
+
to: string | null;
|
|
840
|
+
}
|
|
841
|
+
/** The sort dropdown key (e.g. `publication-date-desc`) of a sort; no `by` → `random`. */
|
|
842
|
+
declare function objectsSortKey(sort?: {
|
|
843
|
+
by?: string;
|
|
844
|
+
desc?: boolean;
|
|
845
|
+
}): string;
|
|
846
|
+
/** The sort of a sort dropdown key; `random` → an empty `by`. */
|
|
847
|
+
declare function objectsSortFromKey(key: string): {
|
|
848
|
+
by: string;
|
|
849
|
+
desc: boolean;
|
|
850
|
+
};
|
|
851
|
+
/** The list URL (`/obiekty` by default) restoring the current filter (phrase + query items). */
|
|
852
|
+
declare function buildObjectsResultsUrl(origin: string, filter: ICrudFilter | null | undefined, listPath?: string): string;
|
|
853
|
+
|
|
854
|
+
/** Options of {@link ObjectsFiltersBarBaseComponent}, passed to `super(…)`. */
|
|
855
|
+
interface IObjectsFiltersBarOptions {
|
|
856
|
+
/**
|
|
857
|
+
* Load the `Cycle` dictionary for the theme tags (`themeTags`, `tagsQuery`).
|
|
858
|
+
* Default `false`: no `dictionary/Cycle` request; `themeTags` holds only the
|
|
859
|
+
* cycles selected in the filter.
|
|
860
|
+
*/
|
|
861
|
+
cycleTags?: boolean;
|
|
862
|
+
/**
|
|
863
|
+
* Chip labels (translation keys) of the yes/no filters, by query key.
|
|
864
|
+
* Default `OBJECTS_FILTER_SINGLE_VALUE_LABELS`.
|
|
865
|
+
*/
|
|
866
|
+
singleValueLabels?: Readonly<Record<string, string>>;
|
|
867
|
+
/**
|
|
868
|
+
* Single-value filters — their chip clears the whole query item.
|
|
869
|
+
* Default `['categories', 'inventoryNumber', 'locationType']`.
|
|
870
|
+
*/
|
|
871
|
+
singleValueKeys?: readonly string[];
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Logic of the objects list top filter bar (Muzeum Podlasia's `filters-top`):
|
|
875
|
+
* theme tags, applied-filter chips, sort/limit dropdowns, pagination and the
|
|
876
|
+
* grid/list view toggle. The template stays in the app.
|
|
877
|
+
*
|
|
878
|
+
* Every mutation goes through the framework `FiltersContext` provided by
|
|
879
|
+
* `<smart-mobilems-objects-filters>` (passed to each method by the template),
|
|
880
|
+
* which dispatches to the objects facade. With `redirectChanges` on (the search
|
|
881
|
+
* results tab, MOB-1818) filter, sort and page size changes are emitted as one
|
|
882
|
+
* complete filter through `filterRedirect` instead.
|
|
883
|
+
*/
|
|
884
|
+
declare abstract class ObjectsFiltersBarBaseComponent {
|
|
885
|
+
private readonly objectsFiltersBarTranslate;
|
|
886
|
+
private readonly objectsFiltersBarSingleValueLabels;
|
|
887
|
+
private readonly objectsFiltersBarSingleValueKeys;
|
|
888
|
+
private readonly objectsFiltersBarCycleTags;
|
|
889
|
+
/** Query key of the panel's theme tags — `filter[cycles][]`. */
|
|
890
|
+
protected readonly themeTagsFilterKey = "cycles";
|
|
891
|
+
/**
|
|
892
|
+
* The page's current filter, bound straight through to the filter fields.
|
|
893
|
+
* Reads come from here; writes go through the FiltersContext — both sides are
|
|
894
|
+
* the same facade state.
|
|
895
|
+
*/
|
|
896
|
+
readonly filter: _angular_core.InputSignal<ICrudFilter>;
|
|
897
|
+
readonly listMode: _angular_core.InputSignal<ListMode>;
|
|
898
|
+
/**
|
|
899
|
+
* The result count from the list page — only for the response to the
|
|
900
|
+
* current filter (the shared slice guard). Without it the count comes from
|
|
901
|
+
* the framework context.
|
|
902
|
+
*/
|
|
903
|
+
readonly totalCount: _angular_core.InputSignal<number>;
|
|
904
|
+
readonly sortOptions: _angular_core.InputSignal<IKeyValue[]>;
|
|
905
|
+
/**
|
|
906
|
+
* The search results tab (MOB-1818): filter, sort and page size changes do
|
|
907
|
+
* not narrow the list in place, they go to `filterRedirect` with the
|
|
908
|
+
* complete filter. Paging stays in the tab.
|
|
909
|
+
*/
|
|
910
|
+
readonly redirectChanges: _angular_core.InputSignal<boolean>;
|
|
911
|
+
/** The complete filter after a change in the results tab — the list moves to `/obiekty` with it. */
|
|
912
|
+
readonly filterRedirect: _angular_core.OutputEmitterRef<ICrudFilter>;
|
|
913
|
+
readonly listModeChange: _angular_core.OutputEmitterRef<ListMode>;
|
|
914
|
+
/** Free-text search — the list page owns the read so it can persist it. */
|
|
915
|
+
readonly searchEvent: _angular_core.OutputEmitterRef<string>;
|
|
916
|
+
readonly isAdvancedFiltersOn: WritableSignal<boolean>;
|
|
917
|
+
limitOptions: IKeyValue[];
|
|
918
|
+
/** The "Wyszukaj więcej tagów" phrase — empty = the panel's default tags. */
|
|
919
|
+
readonly tagsQuery: WritableSignal<string>;
|
|
920
|
+
/**
|
|
921
|
+
* Panel chips: the selected cycles (from the filter) first, then the
|
|
922
|
+
* dictionary or the phrase result — a selected cycle missing from the `q`
|
|
923
|
+
* result stays and can be unselected (MOB-1826 review). Without the
|
|
924
|
+
* `cycleTags` option only the selected cycles.
|
|
925
|
+
*/
|
|
926
|
+
readonly themeTags: Signal<IDictionaryEntry[]>;
|
|
927
|
+
protected constructor(options?: IObjectsFiltersBarOptions);
|
|
928
|
+
toggleAdvancedFilters(force?: boolean): void;
|
|
929
|
+
onListMode(value: ListMode): void;
|
|
930
|
+
/** Map a sort dropdown key (e.g. `publication-date-desc`) to the matching option. */
|
|
931
|
+
selectedSort(sort?: {
|
|
932
|
+
by?: string;
|
|
933
|
+
desc?: boolean;
|
|
934
|
+
}): IKeyValue;
|
|
935
|
+
selectedLimit(limit?: number): IKeyValue;
|
|
936
|
+
sortChange(context: FiltersContext<MsObject>, value: string): void;
|
|
937
|
+
limitChange(context: FiltersContext<MsObject>, value: string): void;
|
|
938
|
+
pageChange(context: FiltersContext<MsObject>, value: number): void;
|
|
939
|
+
/** Toggle a single dictionary entry on/off for `key`. */
|
|
940
|
+
advancedFilterChange(context: FiltersContext<MsObject>, entry: IDictionaryEntry, key: string): void;
|
|
941
|
+
/** The year field already debounces typing (500 ms, MOB-1866). */
|
|
942
|
+
onCreateDatesFilterChange(context: FiltersContext<MsObject>, range: IObjectsDateRange): void;
|
|
943
|
+
/**
|
|
944
|
+
* Batched write from the "Filtry zaawansowane" panel (MOB-1596) — the panel
|
|
945
|
+
* keeps its own draft and hands over the full snapshot on Zastosuj/Resetuj,
|
|
946
|
+
* so this is the single `context.filters` assignment for that whole edit.
|
|
947
|
+
*/
|
|
948
|
+
onAdvancedFiltersApply(context: FiltersContext<MsObject>, payload: IObjectsFilterWrite[]): void;
|
|
949
|
+
/** A yes/no filter — unchecking sends `undefined`, which removes the query item. */
|
|
950
|
+
onBooleanFilterChange(context: FiltersContext<MsObject>, event: {
|
|
951
|
+
key: string;
|
|
952
|
+
checked: boolean;
|
|
953
|
+
}): void;
|
|
954
|
+
clearFilter(context: FiltersContext<MsObject>, item: ICrudFilterQueryItem, value?: IDictionaryEntry): void;
|
|
955
|
+
isListValue(value: unknown): boolean;
|
|
956
|
+
/** List entries for the chips — no `null` and no entries without an id (MOB-1826 review). */
|
|
957
|
+
listEntries(value: unknown): Array<IDictionaryEntry & {
|
|
958
|
+
text?: string;
|
|
959
|
+
}>;
|
|
960
|
+
/** Chip label of a filter without a list of values — a yes/no one has no value after the colon. */
|
|
961
|
+
singleValueLabel(item: ICrudFilterQueryItem): string;
|
|
962
|
+
$context(context: unknown): FiltersContext<MsObject>;
|
|
963
|
+
/**
|
|
964
|
+
* Write a dictionary filter through the generic `filters` setter. An empty
|
|
965
|
+
* selection must be sent as `undefined` — that is what removes the query item.
|
|
966
|
+
*/
|
|
967
|
+
protected objectsFiltersBarSetDictionary(context: FiltersContext<MsObject>, key: string, value: IDictionaryEntry[]): void;
|
|
968
|
+
/**
|
|
969
|
+
* Where a filter write goes: the framework context (read through the facade)
|
|
970
|
+
* or — in the results tab — the redirect context to `/obiekty` (MOB-1818).
|
|
971
|
+
*/
|
|
972
|
+
private objectsFiltersBarWriteTarget;
|
|
973
|
+
private objectsFiltersBarDictionaryValue;
|
|
974
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsFiltersBarBaseComponent, never>;
|
|
975
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectsFiltersBarBaseComponent, never, never, { "filter": { "alias": "filter"; "required": true; "isSignal": true; }; "listMode": { "alias": "listMode"; "required": false; "isSignal": true; }; "totalCount": { "alias": "totalCount"; "required": false; "isSignal": true; }; "sortOptions": { "alias": "sortOptions"; "required": false; "isSignal": true; }; "redirectChanges": { "alias": "redirectChanges"; "required": false; "isSignal": true; }; }, { "filterRedirect": "filterRedirect"; "listModeChange": "listModeChange"; "searchEvent": "searchEvent"; }, never, never, true, never>;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* Logic of the grey objects search panel (Muzeum Podlasia's
|
|
980
|
+
* `objects-search-panel`, mockup "search tagi filtry" 458:7898, desktop
|
|
981
|
+
* "Frame 502" 2300:51176, mobile "Panel wyszukiwarki" 2300:51195): phrase →
|
|
982
|
+
* theme tags + "Wyszukaj więcej tagów" → date range, "Pokaż" and "Szukaj" →
|
|
983
|
+
* advanced filters. On mobile a "Filtry ↓" button under the phrase field
|
|
984
|
+
* expands the rest of the panel.
|
|
985
|
+
*
|
|
986
|
+
* Presentational — it reads its state from `filter()` and emits events; the
|
|
987
|
+
* parent (the filters bar) writes to `FiltersContext`. No template: each
|
|
988
|
+
* museum extends it and keeps its own HTML, with the phrase input marked
|
|
989
|
+
* `#phraseField`.
|
|
990
|
+
*/
|
|
991
|
+
declare abstract class ObjectsSearchPanelBaseComponent {
|
|
992
|
+
readonly phrase: _angular_core.InputSignal<string>;
|
|
993
|
+
readonly filter: _angular_core.InputSignal<ICrudFilter>;
|
|
994
|
+
/**
|
|
995
|
+
* Theme tags — the whole `Cycle` dictionary or the "Wyszukaj więcej tagów"
|
|
996
|
+
* result; the template decides how many show at once (MOB-1826).
|
|
997
|
+
*/
|
|
998
|
+
readonly tags: _angular_core.InputSignal<ThemeTag[]>;
|
|
999
|
+
/** The parent controls the advanced filters panel state. */
|
|
1000
|
+
readonly isAdvancedFiltersOn: _angular_core.InputSignal<boolean>;
|
|
1001
|
+
/**
|
|
1002
|
+
* The `/obiekty` list also searches by filters alone — "Szukaj" with an
|
|
1003
|
+
* empty phrase is allowed there. In the search results the phrase is part
|
|
1004
|
+
* of the address, so an empty phrase has nowhere to go.
|
|
1005
|
+
*/
|
|
1006
|
+
readonly allowEmptyPhrase: _angular_core.InputSignal<boolean>;
|
|
1007
|
+
/** A full-bleed band (the `/obiekty` list) instead of a grey box (search results). */
|
|
1008
|
+
readonly fullBleed: _angular_core.InputSignal<boolean>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Selected filter chips (state "Selected" 2193:3301 / mobile 2276:7726) —
|
|
1011
|
+
* rendered by the parent and inserted once by the panel; only CSS places
|
|
1012
|
+
* them, so the DOM is the same after SSR and in the browser.
|
|
1013
|
+
*/
|
|
1014
|
+
readonly selectedFiltersTpl: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
1015
|
+
readonly searchPhrase: _angular_core.OutputEmitterRef<string>;
|
|
1016
|
+
readonly tagToggle: _angular_core.OutputEmitterRef<ThemeTag>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Passed through unchanged — the date field debounces the year typing
|
|
1019
|
+
* (MOB-1866), the panel delays nothing here.
|
|
1020
|
+
*/
|
|
1021
|
+
readonly dateRangeChange: _angular_core.OutputEmitterRef<IObjectsDateRange>;
|
|
1022
|
+
readonly booleanFilterChange: _angular_core.OutputEmitterRef<{
|
|
1023
|
+
key: string;
|
|
1024
|
+
checked: boolean;
|
|
1025
|
+
}>;
|
|
1026
|
+
/** "Wyszukaj więcej tagów" — an empty phrase goes back to the default tags. */
|
|
1027
|
+
readonly tagsSearch: _angular_core.OutputEmitterRef<string>;
|
|
1028
|
+
readonly advancedFiltersToggle: _angular_core.OutputEmitterRef<void>;
|
|
1029
|
+
/** One batched payload from the "Filtry zaawansowane" panel's Zastosuj/Resetuj. */
|
|
1030
|
+
readonly advancedFiltersApply: _angular_core.OutputEmitterRef<IObjectsFilterWrite[]>;
|
|
1031
|
+
/** The selected theme tags read from the current filter. */
|
|
1032
|
+
protected readonly selectedTagIds: _angular_core.Signal<number[]>;
|
|
1033
|
+
/** The field text — starts from `phrase()` and follows a change from the URL. */
|
|
1034
|
+
protected readonly searchText: _angular_core.WritableSignal<string>;
|
|
1035
|
+
/** The "Wyszukaj więcej tagów" phrase and the last query sent. */
|
|
1036
|
+
protected readonly tagQuery: _angular_core.WritableSignal<string>;
|
|
1037
|
+
protected readonly submittedTagQuery: _angular_core.WritableSignal<string>;
|
|
1038
|
+
/** "Pokaż wszystkie tagi (N)" expanded — a new search collapses it. */
|
|
1039
|
+
protected readonly tagsExpanded: _angular_core.WritableSignal<boolean>;
|
|
1040
|
+
/** Mobile: "Filtry ↓" expands the tags, dates and buttons (always visible from lg). */
|
|
1041
|
+
protected readonly filtersOpen: _angular_core.WritableSignal<boolean>;
|
|
1042
|
+
/** Mobile: "Więcej tagów" reveals the tag search field (2276:7913). */
|
|
1043
|
+
protected readonly moreTagsOpen: _angular_core.WritableSignal<boolean>;
|
|
1044
|
+
private readonly objectsSearchPanelPhraseField;
|
|
1045
|
+
/** The "Pokaż" boxes' state read from the filter — e.g. after a link with filters. */
|
|
1046
|
+
protected isBooleanFilterOn(key: string): boolean;
|
|
1047
|
+
protected toggleMoreTags(): void;
|
|
1048
|
+
protected toggleFilters(): void;
|
|
1049
|
+
/**
|
|
1050
|
+
* "×" in the phrase field. On the list it also clears the search; in the
|
|
1051
|
+
* search results it only empties the field (a new phrase is a new address).
|
|
1052
|
+
*/
|
|
1053
|
+
protected clearPhrase(): void;
|
|
1054
|
+
protected searchTags(): void;
|
|
1055
|
+
protected onBooleanFilterChange(key: string, checked: boolean): void;
|
|
1056
|
+
/**
|
|
1057
|
+
* Only an explicit action (button / Enter) searches — the panel has no
|
|
1058
|
+
* live search, so there is no debounce here either.
|
|
1059
|
+
*/
|
|
1060
|
+
protected search(): void;
|
|
1061
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsSearchPanelBaseComponent, never>;
|
|
1062
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectsSearchPanelBaseComponent, never, never, { "phrase": { "alias": "phrase"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": true; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; "isAdvancedFiltersOn": { "alias": "isAdvancedFiltersOn"; "required": false; "isSignal": true; }; "allowEmptyPhrase": { "alias": "allowEmptyPhrase"; "required": false; "isSignal": true; }; "fullBleed": { "alias": "fullBleed"; "required": false; "isSignal": true; }; "selectedFiltersTpl": { "alias": "selectedFiltersTpl"; "required": false; "isSignal": true; }; }, { "searchPhrase": "searchPhrase"; "tagToggle": "tagToggle"; "dateRangeChange": "dateRangeChange"; "booleanFilterChange": "booleanFilterChange"; "tagsSearch": "tagsSearch"; "advancedFiltersToggle": "advancedFiltersToggle"; "advancedFiltersApply": "advancedFiltersApply"; }, never, never, true, never>;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/** How long (ms) the "link copied" message stays after a click. */
|
|
1066
|
+
declare const OBJECTS_SHARE_COPIED_TIMEOUT = 3000;
|
|
1067
|
+
/**
|
|
1068
|
+
* Logic of "Share search results" (mock-up "Action panel" 2300:51184): a link
|
|
1069
|
+
* to the objects list with the current filters, shared through
|
|
1070
|
+
* `ShareLinkBaseComponent` — the native share sheet, or a clipboard copy with a
|
|
1071
|
+
* "link copied" flag when the browser has no share sheet. The template stays in
|
|
1072
|
+
* the app.
|
|
1073
|
+
*/
|
|
1074
|
+
declare abstract class ObjectsShareResultsBaseComponent extends ShareLinkBaseComponent {
|
|
1075
|
+
readonly filter: _angular_core.InputSignal<ICrudFilter>;
|
|
1076
|
+
/** The list path the link opens; overridable, read inside `share`. */
|
|
1077
|
+
protected readonly objectsShareResultsListPath: string;
|
|
1078
|
+
/** How long (ms) "copied" stays on; overridable, read inside `share`. */
|
|
1079
|
+
protected readonly objectsShareResultsCopiedTimeout: number;
|
|
1080
|
+
protected get shareLinkCopiedTimeout(): number;
|
|
1081
|
+
protected shareLinkUrl(): string;
|
|
1082
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectsShareResultsBaseComponent, never>;
|
|
1083
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectsShareResultsBaseComponent, never, never, { "filter": { "alias": "filter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Logic-only base of an object media tab (MOB-1801), from Muzeum Podlasia's
|
|
1088
|
+
* `components/tabs`: the `item` and `formFeatureTypes` inputs and `models` —
|
|
1089
|
+
* the object's `additionalImages` of the given form feature types, sorted by
|
|
1090
|
+
* `position`. The tab keeps its template, styles and `host`.
|
|
1091
|
+
*
|
|
1092
|
+
* `mediaTabFilterModels(models)` is a hook (identity by default) that a tab
|
|
1093
|
+
* overrides to narrow the list further.
|
|
1094
|
+
*
|
|
1095
|
+
* ```ts
|
|
1096
|
+
* export class OtherFilesTabComponent extends ObjectMediaTabBaseComponent<IAnimationObject> {}
|
|
1097
|
+
* ```
|
|
1098
|
+
*/
|
|
1099
|
+
declare abstract class ObjectMediaTabBaseComponent<TMedia extends {
|
|
1100
|
+
id: number | string;
|
|
1101
|
+
}> {
|
|
1102
|
+
protected readonly mediaTabFileUrl: FileUrlService;
|
|
1103
|
+
protected readonly mediaTabTranslate: TranslateService;
|
|
1104
|
+
/** The object whose media the tab shows. */
|
|
1105
|
+
readonly item: _angular_core.InputSignal<MsObject>;
|
|
1106
|
+
/** The form feature types (`FormFeatureType`) the tab shows. */
|
|
1107
|
+
readonly formFeatureTypes: _angular_core.InputSignal<FormFeatureType[]>;
|
|
1108
|
+
/** The object's media of `formFeatureTypes`, sorted by `position`, then through `mediaTabFilterModels`. */
|
|
1109
|
+
readonly models: Signal<TMedia[]>;
|
|
1110
|
+
/** Narrows the sorted list. Identity by default. */
|
|
1111
|
+
protected mediaTabFilterModels(models: TMedia[]): TMedia[];
|
|
1112
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectMediaTabBaseComponent<any>, never>;
|
|
1113
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectMediaTabBaseComponent<any>, never, never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "formFeatureTypes": { "alias": "formFeatureTypes"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Logic-only base of the media tabs' download button, from Muzeum Podlasia's
|
|
1118
|
+
* `download-button`: `download()` fetches `url`, saves the blob as `filename`
|
|
1119
|
+
* through a temporary `<a download>` and revokes the object URL. It runs only
|
|
1120
|
+
* from a click, so never on the server. The button keeps its template.
|
|
1121
|
+
*
|
|
1122
|
+
* ```ts
|
|
1123
|
+
* export class DownloadButtonComponent extends ObjectDownloadButtonBaseComponent {}
|
|
1124
|
+
* ```
|
|
1125
|
+
*/
|
|
1126
|
+
declare abstract class ObjectDownloadButtonBaseComponent {
|
|
1127
|
+
private readonly downloadButtonDocument;
|
|
1128
|
+
/** The file URL. An empty URL does nothing. */
|
|
1129
|
+
readonly url: _angular_core.InputSignal<string>;
|
|
1130
|
+
/** The name the file is saved under. */
|
|
1131
|
+
readonly filename: _angular_core.InputSignal<string>;
|
|
1132
|
+
/** `true` while the file is being fetched. */
|
|
1133
|
+
readonly isDownloading: _angular_core.WritableSignal<boolean>;
|
|
1134
|
+
download(): Promise<void>;
|
|
1135
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectDownloadButtonBaseComponent, never>;
|
|
1136
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectDownloadButtonBaseComponent, never, never, { "url": { "alias": "url"; "required": true; "isSignal": true; }; "filename": { "alias": "filename"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/** The `archeoMap` field of an object card (coordinates as strings). */
|
|
1140
|
+
interface IObjectArcheoMap {
|
|
1141
|
+
latitude: string;
|
|
1142
|
+
longitude: string;
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Logic-only base of the object map tab, from Muzeum Podlasia's `map-tab`:
|
|
1146
|
+
* the object's `archeoMap` coordinates. The tab keeps its template (the map
|
|
1147
|
+
* component and its zoom).
|
|
1148
|
+
*
|
|
1149
|
+
* ```ts
|
|
1150
|
+
* export class MapTabComponent extends ObjectMapTabBaseComponent {}
|
|
1151
|
+
* ```
|
|
1152
|
+
*/
|
|
1153
|
+
declare abstract class ObjectMapTabBaseComponent {
|
|
1154
|
+
/** The object whose `archeoMap` the tab shows. */
|
|
1155
|
+
readonly item: _angular_core.InputSignal<MsObject>;
|
|
1156
|
+
private readonly mapTabArcheoMap;
|
|
1157
|
+
/** Truthy (the longitude string) when both coordinates are set. */
|
|
1158
|
+
readonly hasCoordinates: _angular_core.Signal<string>;
|
|
1159
|
+
/** `parseFloat(latitude)`, `0` when missing. */
|
|
1160
|
+
readonly latitude: _angular_core.Signal<number>;
|
|
1161
|
+
/** `parseFloat(longitude)`, `0` when missing. */
|
|
1162
|
+
readonly longitude: _angular_core.Signal<number>;
|
|
1163
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectMapTabBaseComponent, never>;
|
|
1164
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectMapTabBaseComponent, never, never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Logic-only base of an object tab with native `<audio>` players (MOB-1801):
|
|
1169
|
+
* the file URL, title, aria label and download file name of each recording,
|
|
1170
|
+
* shared by `ObjectAudioTabBaseComponent` and
|
|
1171
|
+
* `ObjectAudioDescriptionTabBaseComponent`. The fallback label comes from
|
|
1172
|
+
* `audioMediaTabLabelKey`, read lazily, so a subclass overrides it with a
|
|
1173
|
+
* field.
|
|
1174
|
+
*
|
|
1175
|
+
* ```ts
|
|
1176
|
+
* protected override readonly audioMediaTabLabelKey = 'DETAILS_PAGE.tabs.audio';
|
|
1177
|
+
* ```
|
|
1178
|
+
*/
|
|
1179
|
+
declare abstract class ObjectAudioMediaTabBaseComponent<TMedia extends IAnimationObject = IAnimationObject> extends ObjectMediaTabBaseComponent<TMedia> {
|
|
1180
|
+
/** Translation key of the player label; read lazily, so a subclass can override it. */
|
|
1181
|
+
protected readonly audioMediaTabLabelKey: string;
|
|
1182
|
+
/** The recording's file URL (`noCache`). */
|
|
1183
|
+
getAudioUrl(audio: TMedia): string;
|
|
1184
|
+
/** Alt text in the current language, then the description, then the label key. */
|
|
1185
|
+
getAudioTitle(audio: TMedia): string;
|
|
1186
|
+
/** `<label>: <title>`. */
|
|
1187
|
+
getAudioAriaLabel(audio: TMedia): string;
|
|
1188
|
+
/** The object title, alt text, description or `audio`, plus the extension (`mp3` by default). */
|
|
1189
|
+
getDownloadFilename(audio: TMedia): string;
|
|
1190
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectAudioMediaTabBaseComponent<any>, never>;
|
|
1191
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectAudioMediaTabBaseComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/** Options of `ObjectAudioTabBaseComponent`, passed to `super(options)`. */
|
|
1195
|
+
interface IObjectAudioTabOptions {
|
|
1196
|
+
/**
|
|
1197
|
+
* Keep only recordings with a file (`filePath`), so the "Audio 1, 2…"
|
|
1198
|
+
* numbering counts what is shown (MOB-1872 review). Default `true`
|
|
1199
|
+
* (Muzeum Podlasia); `false` keeps the unfiltered list (sztuki-2, template).
|
|
1200
|
+
*/
|
|
1201
|
+
playableOnly?: boolean;
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Logic-only base of the object audio tab (MOB-1801). Muzeum Podlasia renders
|
|
1205
|
+
* the article player (`app-widget-audio` on `WidgetAudioBaseComponent`,
|
|
1206
|
+
* MOB-1805 / MOB-1872) through `widgetItem` and `trackName`; sztuki-2 and the
|
|
1207
|
+
* template render a native `<audio>` with a download button through
|
|
1208
|
+
* `getAudioUrl`, `getAudioTitle`, `getAudioAriaLabel` and
|
|
1209
|
+
* `getDownloadFilename` (`ObjectAudioMediaTabBaseComponent`, label
|
|
1210
|
+
* `DETAILS_PAGE.tabs.audio`), with `playableOnly: false`. The tab keeps its
|
|
1211
|
+
* template, styles and `host`.
|
|
1212
|
+
*
|
|
1213
|
+
* ```ts
|
|
1214
|
+
* export class AudioTabComponent extends ObjectAudioTabBaseComponent {
|
|
1215
|
+
* constructor() {
|
|
1216
|
+
* super(); // sztuki-2 / template: super({ playableOnly: false })
|
|
1217
|
+
* }
|
|
1218
|
+
* }
|
|
1219
|
+
* ```
|
|
1220
|
+
*/
|
|
1221
|
+
declare abstract class ObjectAudioTabBaseComponent extends ObjectAudioMediaTabBaseComponent {
|
|
1222
|
+
protected readonly audioMediaTabLabelKey: string;
|
|
1223
|
+
private readonly audioTabOptions;
|
|
1224
|
+
protected constructor(options?: IObjectAudioTabOptions);
|
|
1225
|
+
/** With `playableOnly` (default) only recordings with a file. */
|
|
1226
|
+
protected mediaTabFilterModels(models: IAnimationObject[]): IAnimationObject[];
|
|
1227
|
+
/**
|
|
1228
|
+
* The recording in the audio widget's shape: the file in `file`, the
|
|
1229
|
+
* heading from the description (without one — a player without a heading,
|
|
1230
|
+
* as in the mock-up).
|
|
1231
|
+
*/
|
|
1232
|
+
widgetItem(audio: IAnimationObject): WidgetAudioItem;
|
|
1233
|
+
/**
|
|
1234
|
+
* The recording's name for screen readers (the player's button and
|
|
1235
|
+
* slider): the alt text in the current language or the description;
|
|
1236
|
+
* several recordings without names — "Audio 1", "Audio 2"… (MOB-1872
|
|
1237
|
+
* review); a single one — `null`.
|
|
1238
|
+
*/
|
|
1239
|
+
trackName(audio: IAnimationObject, index: number): string | null;
|
|
1240
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectAudioTabBaseComponent, never>;
|
|
1241
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectAudioTabBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Logic-only base of the object audio description tab (MOB-1801), from Muzeum
|
|
1246
|
+
* Podlasia's `audio-description-tab.component.ts` (sztuki-2 and the template
|
|
1247
|
+
* differ by one template class only): the main image above the players and
|
|
1248
|
+
* the names of each recording (`ObjectAudioMediaTabBaseComponent`, label
|
|
1249
|
+
* `OBJECTS.filters.multimedia.audio`). The tab keeps its template, styles and `host`.
|
|
1250
|
+
*
|
|
1251
|
+
* ```ts
|
|
1252
|
+
* export class AudioDescriptionTabComponent extends ObjectAudioDescriptionTabBaseComponent {}
|
|
1253
|
+
* ```
|
|
1254
|
+
*/
|
|
1255
|
+
declare abstract class ObjectAudioDescriptionTabBaseComponent extends ObjectAudioMediaTabBaseComponent {
|
|
1256
|
+
/** The object's main image (`big` = full resolution without cache); `null` without one or for the no-image placeholder. */
|
|
1257
|
+
readonly mainImageUrl: Signal<string | null>;
|
|
1258
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectAudioDescriptionTabBaseComponent, never>;
|
|
1259
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectAudioDescriptionTabBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* Logic-only base of the object documents tab (MOB-1801), from Muzeum
|
|
1264
|
+
* Podlasia's `documents-tab.component.ts` (sztuki-2 and the template differ by
|
|
1265
|
+
* one template class only): each document's URL, display name and download
|
|
1266
|
+
* file name. The tab keeps its template, styles and `host`.
|
|
1267
|
+
*
|
|
1268
|
+
* ```ts
|
|
1269
|
+
* export class DocumentsTabComponent extends ObjectDocumentsTabBaseComponent {}
|
|
1270
|
+
* ```
|
|
1271
|
+
*/
|
|
1272
|
+
declare abstract class ObjectDocumentsTabBaseComponent extends ObjectMediaTabBaseComponent<IAnimationObject> {
|
|
1273
|
+
/** The document's file URL (`noCache`). */
|
|
1274
|
+
getDocumentUrl(doc: IAnimationObject): string;
|
|
1275
|
+
/** Alt text in the current language, then the description, then the upper-case extension (`PDF` by default). */
|
|
1276
|
+
getDocumentDisplayName(doc: IAnimationObject): string;
|
|
1277
|
+
/** Alt text in the current language, description or `document`, plus the extension (`pdf` by default). */
|
|
1278
|
+
getDocumentFileName(doc: IAnimationObject): string;
|
|
1279
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectDocumentsTabBaseComponent, never>;
|
|
1280
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectDocumentsTabBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Logic-only base of an object tab with one video at a time and a dropdown
|
|
1285
|
+
* (MOB-1801), shared by `ObjectAnimationTabBaseComponent` and
|
|
1286
|
+
* `ObjectVideoTabBaseComponent`, 1:1 from Muzeum Podlasia's animation and
|
|
1287
|
+
* video tabs: the selector state, the player reset on a change and the
|
|
1288
|
+
* player helpers. The translation keys and the download fallback name are
|
|
1289
|
+
* abstract fields, read lazily.
|
|
1290
|
+
*/
|
|
1291
|
+
declare abstract class ObjectVideoMediaTabBaseComponent<TMedia extends IAnimationObject = IAnimationObject> extends ObjectMediaTabBaseComponent<TMedia> {
|
|
1292
|
+
/** Translation key of a dropdown option without a name (`<label> <n>`). */
|
|
1293
|
+
protected abstract readonly videoMediaTabOptionLabelKey: string;
|
|
1294
|
+
/** Translation key of the player title and aria label. */
|
|
1295
|
+
protected abstract readonly videoMediaTabTitleKey: string;
|
|
1296
|
+
/** Download file name without the object title, alt text and description. */
|
|
1297
|
+
protected abstract readonly videoMediaTabDownloadName: string;
|
|
1298
|
+
/** The template's native `<video #videoPlayer>`, if it has one. */
|
|
1299
|
+
readonly videoPlayer: Signal<ElementRef<HTMLVideoElement>>;
|
|
1300
|
+
private readonly videoMediaTabPicker;
|
|
1301
|
+
/** The chosen video's key; the first video of each new object. */
|
|
1302
|
+
readonly selectedVideoKey: WritableSignal<string | null>;
|
|
1303
|
+
/** Dropdown options: alt text, description or `<label> <n>`. */
|
|
1304
|
+
readonly videoOptions: Signal<IKeyValue[]>;
|
|
1305
|
+
/** The chosen video, the first one by default. */
|
|
1306
|
+
readonly selectedVideo: Signal<TMedia | null>;
|
|
1307
|
+
/** The dropdown option of `selectedVideo`. */
|
|
1308
|
+
readonly selectedVideoOption: Signal<IKeyValue>;
|
|
1309
|
+
/** Selects a video; a native `#videoPlayer` is paused and rewound. */
|
|
1310
|
+
videoChange(key: string): void;
|
|
1311
|
+
/** The video's file URL (`noCache`). */
|
|
1312
|
+
getVideoUrl(video: TMedia): string;
|
|
1313
|
+
/** Alt text in the current language, then the description, then the title key. */
|
|
1314
|
+
getVideoTitle(video: TMedia): string;
|
|
1315
|
+
/** `<title key>: <title>`. */
|
|
1316
|
+
getVideoAriaLabel(video: TMedia): string;
|
|
1317
|
+
/** The object title, alt text, description or the fallback name, plus the extension (`mp4` by default). */
|
|
1318
|
+
getDownloadFilename(video: TMedia): string;
|
|
1319
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectVideoMediaTabBaseComponent<any>, never>;
|
|
1320
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectVideoMediaTabBaseComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Logic-only base of the object animation tab (MOB-1801), 1:1 from Muzeum
|
|
1325
|
+
* Podlasia (sztuki-2 and the template are identical): options without a name
|
|
1326
|
+
* are `OBJECTS.filters.multimedia.animation <n>`, the player is titled with
|
|
1327
|
+
* `OBJECTS.filters.multimedia.video`, the download falls back to
|
|
1328
|
+
* `animation.mp4`, and `videoChange` pauses and rewinds `#videoPlayer`. The
|
|
1329
|
+
* tab keeps its template, styles and `host`.
|
|
1330
|
+
*
|
|
1331
|
+
* ```ts
|
|
1332
|
+
* export class AnimationTabComponent extends ObjectAnimationTabBaseComponent {}
|
|
1333
|
+
* ```
|
|
1334
|
+
*/
|
|
1335
|
+
declare abstract class ObjectAnimationTabBaseComponent extends ObjectVideoMediaTabBaseComponent {
|
|
1336
|
+
protected readonly videoMediaTabOptionLabelKey: string;
|
|
1337
|
+
protected readonly videoMediaTabTitleKey: string;
|
|
1338
|
+
protected readonly videoMediaTabDownloadName: string;
|
|
1339
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectAnimationTabBaseComponent, never>;
|
|
1340
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectAnimationTabBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Logic-only base of the object video tab (MOB-1801). Options, title and
|
|
1345
|
+
* aria label use `DETAILS_PAGE.tabs.video`. Muzeum Podlasia renders the app's
|
|
1346
|
+
* video player (a new source resets it — a still frame with a play button,
|
|
1347
|
+
* no playback), so its template has no `#videoPlayer` and `videoChange` only
|
|
1348
|
+
* selects the video. Sztuki-2 and the template render a native
|
|
1349
|
+
* `<video #videoPlayer>`, which `videoChange` pauses and rewinds, and a
|
|
1350
|
+
* download button named by `getDownloadFilename` (fallback `video.mp4`). The
|
|
1351
|
+
* tab keeps its template, styles and `host`.
|
|
1352
|
+
*
|
|
1353
|
+
* ```ts
|
|
1354
|
+
* export class VideoTabComponent extends ObjectVideoTabBaseComponent {}
|
|
1355
|
+
* ```
|
|
1356
|
+
*/
|
|
1357
|
+
declare abstract class ObjectVideoTabBaseComponent extends ObjectVideoMediaTabBaseComponent {
|
|
1358
|
+
protected readonly videoMediaTabOptionLabelKey: string;
|
|
1359
|
+
protected readonly videoMediaTabTitleKey: string;
|
|
1360
|
+
protected readonly videoMediaTabDownloadName: string;
|
|
1361
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectVideoTabBaseComponent, never>;
|
|
1362
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectVideoTabBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Logic-only base of the object virtual walk tab (MOB-1801), 1:1 from Muzeum
|
|
1367
|
+
* Podlasia (sztuki-2 and the template are identical): the walk dropdown, the
|
|
1368
|
+
* trusted iframe source and the fullscreen toggle of `#walkContainer`. The
|
|
1369
|
+
* `fullscreenchange` listener is registered in the browser only, through the
|
|
1370
|
+
* injected `DOCUMENT`, and removed on destroy. The tab keeps its template,
|
|
1371
|
+
* styles and `host`.
|
|
1372
|
+
*
|
|
1373
|
+
* ```ts
|
|
1374
|
+
* export class VirtualWalkTabComponent extends ObjectVirtualWalkTabBaseComponent {
|
|
1375
|
+
* constructor() {
|
|
1376
|
+
* super();
|
|
1377
|
+
* }
|
|
1378
|
+
* }
|
|
1379
|
+
* ```
|
|
1380
|
+
*/
|
|
1381
|
+
declare abstract class ObjectVirtualWalkTabBaseComponent extends ObjectMediaTabBaseComponent<IModel3DObject> {
|
|
1382
|
+
private readonly virtualWalkTabSanitizer;
|
|
1383
|
+
private readonly virtualWalkTabDocument;
|
|
1384
|
+
/** The template's `#iframeContainer`. */
|
|
1385
|
+
readonly iframeContainer: Signal<ElementRef<any>>;
|
|
1386
|
+
/** The template's `#walkContainer`, the element shown fullscreen. */
|
|
1387
|
+
readonly walkContainer: Signal<ElementRef<any>>;
|
|
1388
|
+
private readonly virtualWalkTabPicker;
|
|
1389
|
+
/** The chosen walk's key; the first walk of each new object. */
|
|
1390
|
+
readonly selectedWalkKey: WritableSignal<string | null>;
|
|
1391
|
+
/** Dropdown options: alt text, description or `OBJECTS.filters.multimedia.virtualWalk <n>`. */
|
|
1392
|
+
readonly walkOptions: Signal<IKeyValue[]>;
|
|
1393
|
+
/** The chosen walk, the first one by default. */
|
|
1394
|
+
readonly selectedWalk: Signal<IModel3DObject | null>;
|
|
1395
|
+
/** The dropdown option of `selectedWalk`. */
|
|
1396
|
+
readonly selectedWalkOption: Signal<IKeyValue>;
|
|
1397
|
+
/** The selected walk's `iframeSource`, trusted; `null` without one. */
|
|
1398
|
+
readonly safeIframeUrl: Signal<SafeResourceUrl | null>;
|
|
1399
|
+
/** Whether the document is in fullscreen (follows `fullscreenchange`, e.g. Escape). */
|
|
1400
|
+
readonly isFullscreen: WritableSignal<boolean>;
|
|
1401
|
+
protected constructor();
|
|
1402
|
+
/** Selects a walk. */
|
|
1403
|
+
walkChange(key: string): void;
|
|
1404
|
+
/** Alt text in the current language, then the description, then `OBJECTS.filters.multimedia.virtualWalk`. */
|
|
1405
|
+
getWalkTitle(walk: IModel3DObject): string;
|
|
1406
|
+
/** Shows `#walkContainer` fullscreen, or leaves fullscreen. */
|
|
1407
|
+
toggleFullscreen(): void;
|
|
1408
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectVirtualWalkTabBaseComponent, never>;
|
|
1409
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectVirtualWalkTabBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
/** The `online-3d-viewer` `Viewer` calls the 3D tab makes. */
|
|
1413
|
+
interface IObjectModel3dViewer {
|
|
1414
|
+
SetUpVector(direction: unknown, animate: boolean): void;
|
|
1415
|
+
GetBoundingSphere(filter: (meshUserData: unknown) => boolean): unknown;
|
|
1416
|
+
AdjustClippingPlanesToSphere(sphere: unknown): void;
|
|
1417
|
+
FitSphereToWindow(sphere: unknown, animate: boolean): void;
|
|
1418
|
+
SetEdgeSettings(settings: unknown): void;
|
|
1419
|
+
}
|
|
1420
|
+
/** The `online-3d-viewer` `EmbeddedViewer` calls the 3D tab makes. */
|
|
1421
|
+
interface IObjectModel3dEmbeddedViewer {
|
|
1422
|
+
LoadModelFromUrlList(urls: string[]): void;
|
|
1423
|
+
Destroy(): void;
|
|
1424
|
+
GetViewer(): IObjectModel3dViewer;
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* The part of the `online-3d-viewer` module the 3D tab uses. The framework
|
|
1428
|
+
* does not depend on the library: the museum returns its own
|
|
1429
|
+
* `import('online-3d-viewer')` from `loadModel3dLibrary()`, which is
|
|
1430
|
+
* assignable without a cast.
|
|
1431
|
+
*
|
|
1432
|
+
* The colour and edge slots of the `EmbeddedViewer` parameters and the
|
|
1433
|
+
* `EdgeSettings` colour are `any`: constructor parameters are checked
|
|
1434
|
+
* contravariantly (`strictFunctionTypes`), so anything narrower would have to
|
|
1435
|
+
* restate the library's `RGBAColor`, `RGBColor` and `EdgeSettings` classes
|
|
1436
|
+
* member by member. The values come from the same module's constructors.
|
|
1437
|
+
*/
|
|
1438
|
+
interface IObjectModel3dViewerLibrary {
|
|
1439
|
+
EmbeddedViewer: new (parentElement: HTMLElement, parameters: {
|
|
1440
|
+
backgroundColor: any;
|
|
1441
|
+
defaultColor: any;
|
|
1442
|
+
edgeSettings: any;
|
|
1443
|
+
onModelLoaded: () => void;
|
|
1444
|
+
}) => IObjectModel3dEmbeddedViewer;
|
|
1445
|
+
RGBAColor: new (r: number, g: number, b: number, a: number) => unknown;
|
|
1446
|
+
RGBColor: new (r: number, g: number, b: number) => unknown;
|
|
1447
|
+
EdgeSettings: new (showEdges: boolean, edgeColor: any, edgeThreshold: number) => unknown;
|
|
1448
|
+
Direction: {
|
|
1449
|
+
Y: unknown;
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1452
|
+
/** Options of `ObjectModel3dTabBaseComponent`, passed to `super(options)`. */
|
|
1453
|
+
interface IObjectModel3dTabOptions {
|
|
1454
|
+
/**
|
|
1455
|
+
* Keep only models with at least one file to load (`files[].filePath`) —
|
|
1456
|
+
* the same condition as the tab counter, so the default model does not end
|
|
1457
|
+
* in "No files found" (MOB-1872 review). Default `true` (Muzeum Podlasia);
|
|
1458
|
+
* `false` keeps the unfiltered list (sztuki-2, template).
|
|
1459
|
+
*/
|
|
1460
|
+
loadableOnly?: boolean;
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Logic-only base of the object 3D model tab (MOB-1801), 1:1 from Muzeum
|
|
1464
|
+
* Podlasia: the model list, the lazily loaded `online-3d-viewer`, the model
|
|
1465
|
+
* switch, the camera reset, the wireframe and the fullscreen toggle. The tab
|
|
1466
|
+
* keeps its template, styles and `host`, and returns its own
|
|
1467
|
+
* `import('online-3d-viewer')` from `loadModel3dLibrary()` — the framework does
|
|
1468
|
+
* not depend on the library, and the viewer is never loaded on the server.
|
|
1469
|
+
* Podlasie's model file URI panel (MOB-981) stays in Podlasie and follows
|
|
1470
|
+
* `selectedModel`.
|
|
1471
|
+
*
|
|
1472
|
+
* ```ts
|
|
1473
|
+
* export class Model3dTabComponent extends ObjectModel3dTabBaseComponent {
|
|
1474
|
+
* constructor() {
|
|
1475
|
+
* super(); // sztuki-2 / template: super({ loadableOnly: false })
|
|
1476
|
+
* }
|
|
1477
|
+
*
|
|
1478
|
+
* protected loadModel3dLibrary() {
|
|
1479
|
+
* return import('online-3d-viewer');
|
|
1480
|
+
* }
|
|
1481
|
+
* }
|
|
1482
|
+
* ```
|
|
1483
|
+
*/
|
|
1484
|
+
declare abstract class ObjectModel3dTabBaseComponent extends ObjectMediaTabBaseComponent<IModel3DObject> {
|
|
1485
|
+
/** The template's `#viewer3d`, the viewer's canvas container. */
|
|
1486
|
+
readonly viewer3d: _angular_core.Signal<ElementRef<any>>;
|
|
1487
|
+
/** The chosen model's index, bound with `ngModel` (may arrive as a string). */
|
|
1488
|
+
selectedModelIndex: number;
|
|
1489
|
+
/** The chosen model's index as a signal, next to `selectedModelIndex` (`onModelChange`). */
|
|
1490
|
+
readonly selectedModel: WritableSignal<number>;
|
|
1491
|
+
/** A model is loading. */
|
|
1492
|
+
readonly isLoading: WritableSignal<boolean>;
|
|
1493
|
+
/** The load error, `null` without one. */
|
|
1494
|
+
readonly error: WritableSignal<string | null>;
|
|
1495
|
+
/** The edges are shown. */
|
|
1496
|
+
readonly isWireframe: WritableSignal<boolean>;
|
|
1497
|
+
/** Whether the document is in fullscreen (follows `fullscreenchange`, e.g. Escape). */
|
|
1498
|
+
readonly isFullscreen: WritableSignal<boolean>;
|
|
1499
|
+
private readonly model3dTabOptions;
|
|
1500
|
+
private readonly model3dTabDocument;
|
|
1501
|
+
private readonly model3dTabPlatformId;
|
|
1502
|
+
private readonly model3dTabTimeouts;
|
|
1503
|
+
/**
|
|
1504
|
+
* `online-3d-viewer` (+ `three`, ~1.1 MB) is loaded only on the first
|
|
1505
|
+
* init — a static import put the library in the chunk of the whole objects
|
|
1506
|
+
* module, loaded on the `/obiekty` list and every card, also without a 3D
|
|
1507
|
+
* model (Lighthouse, MOB-1850, MOB-1895). One load is shared between
|
|
1508
|
+
* concurrent calls. Created on first use.
|
|
1509
|
+
*/
|
|
1510
|
+
private model3dTabLibraryLoader;
|
|
1511
|
+
/** The number of the latest init — an older call after `await` does not overwrite a newer one. */
|
|
1512
|
+
private model3dTabInitToken;
|
|
1513
|
+
private model3dTabViewer;
|
|
1514
|
+
protected constructor(options?: IObjectModel3dTabOptions);
|
|
1515
|
+
/** The museum's `import('online-3d-viewer')`. Called once, in the browser, on the first init. */
|
|
1516
|
+
protected abstract loadModel3dLibrary(): Promise<IObjectModel3dViewerLibrary>;
|
|
1517
|
+
/** With `loadableOnly` (default) only models with a file to load. */
|
|
1518
|
+
protected mediaTabFilterModels(models: IModel3DObject[]): IModel3DObject[];
|
|
1519
|
+
/** Follows the `selectedModelIndex` dropdown: sets `selectedModel` and loads that model. */
|
|
1520
|
+
onModelChange(): void;
|
|
1521
|
+
/** Fits the model to the window with the Y axis up. A no-op before the library is loaded. */
|
|
1522
|
+
resetCamera(): void;
|
|
1523
|
+
/** Shows or hides the edges. A no-op before the library is loaded. */
|
|
1524
|
+
toggleWireframe(): void;
|
|
1525
|
+
/** Shows the parent of `#viewer3d` fullscreen, or leaves fullscreen. */
|
|
1526
|
+
toggleFullscreen(): void;
|
|
1527
|
+
private model3dTabLibrary;
|
|
1528
|
+
private model3dTabInitViewer;
|
|
1529
|
+
private model3dTabLoadModel;
|
|
1530
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectModel3dTabBaseComponent, never>;
|
|
1531
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectModel3dTabBaseComponent, never, never, {}, {}, never, never, true, never>;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Logic-only base of the sztuki-2 / template `media-sections`: an object's
|
|
1536
|
+
* multimedia as landing-page sections (Figma), each with a heading like
|
|
1537
|
+
* „Galeria zdjęć”; a section without data is not rendered. Order: HD photos →
|
|
1538
|
+
* 3D model → animation → video → audio → virtual walk → audio description →
|
|
1539
|
+
* map → other files. The component keeps its template, heading class and
|
|
1540
|
+
* tab imports.
|
|
1541
|
+
*
|
|
1542
|
+
* ```ts
|
|
1543
|
+
* export class MediaSectionsComponent extends ObjectMediaSectionsBaseComponent {
|
|
1544
|
+
* readonly sectionHeadingClass = '…';
|
|
1545
|
+
* }
|
|
1546
|
+
* ```
|
|
1547
|
+
*/
|
|
1548
|
+
declare abstract class ObjectMediaSectionsBaseComponent {
|
|
1549
|
+
private readonly mediaSectionsFileUrl;
|
|
1550
|
+
private readonly mediaSectionsMedia;
|
|
1551
|
+
/** The object whose multimedia the sections show. */
|
|
1552
|
+
readonly item: _angular_core.InputSignal<MsObject>;
|
|
1553
|
+
/**
|
|
1554
|
+
* Multimedia already shown in the object card's gallery frame (the video /
|
|
1555
|
+
* 3D tabs, MOB-1961) — not repeated in the sections. Default `[]`.
|
|
1556
|
+
*/
|
|
1557
|
+
readonly exclude: _angular_core.InputSignal<readonly ("video" | "model3d")[]>;
|
|
1558
|
+
/** `[IMAGES_HD]` */
|
|
1559
|
+
readonly imagesHDTypes: FormFeatureType[];
|
|
1560
|
+
/** `[MODEL_3D]` */
|
|
1561
|
+
readonly model3DTypes: FormFeatureType[];
|
|
1562
|
+
/** `[ANIMATION]` */
|
|
1563
|
+
readonly animationTypes: FormFeatureType[];
|
|
1564
|
+
/** `[AUDIO_DESKRYPCJA]` */
|
|
1565
|
+
readonly adTypes: FormFeatureType[];
|
|
1566
|
+
/** `[VIRTUAL_WALK]` */
|
|
1567
|
+
readonly virtualWalkTypes: FormFeatureType[];
|
|
1568
|
+
/** `[VIDEO]` */
|
|
1569
|
+
readonly videoTypes: FormFeatureType[];
|
|
1570
|
+
/** `[AUDIO]` */
|
|
1571
|
+
readonly audioTypes: FormFeatureType[];
|
|
1572
|
+
/** `[OTHER]` */
|
|
1573
|
+
readonly otherTypes: FormFeatureType[];
|
|
1574
|
+
/** HD photo thumbnails (without the main image) — fullscreen on click. */
|
|
1575
|
+
readonly hdThumbnailUrls: _angular_core.Signal<string[]>;
|
|
1576
|
+
/** HD photo gallery items (without the main image) for the fullscreen. */
|
|
1577
|
+
readonly hdGalleryItems: _angular_core.Signal<_smartsoft001_mobilems_objects_shell_angular.IObjectGalleryItem[]>;
|
|
1578
|
+
/** Whether the HD fullscreen gallery is open. */
|
|
1579
|
+
readonly hdFullscreenOpen: _angular_core.WritableSignal<boolean>;
|
|
1580
|
+
/** The photo the HD fullscreen gallery shows. */
|
|
1581
|
+
readonly hdFullscreenIndex: _angular_core.WritableSignal<number>;
|
|
1582
|
+
/** Opens the HD fullscreen gallery at the clicked thumbnail. */
|
|
1583
|
+
openHdFullscreen(index: number): void;
|
|
1584
|
+
/** The object title without HTML tags (alt text). */
|
|
1585
|
+
readonly altTitle: _angular_core.Signal<string>;
|
|
1586
|
+
/** HD photos section: any HD thumbnail. */
|
|
1587
|
+
readonly showPhotosHD: _angular_core.Signal<boolean>;
|
|
1588
|
+
/** 3D model section: a real file URL, unless excluded. */
|
|
1589
|
+
readonly showModel3D: _angular_core.Signal<boolean>;
|
|
1590
|
+
/** Animation section: a real file URL. */
|
|
1591
|
+
readonly showAnimation: _angular_core.Signal<boolean>;
|
|
1592
|
+
/**
|
|
1593
|
+
* Video section: a file with a `filePath` (`FileUrlService` gives a
|
|
1594
|
+
* placeholder for non-image extensions), unless excluded.
|
|
1595
|
+
*/
|
|
1596
|
+
readonly showVideo: _angular_core.Signal<boolean>;
|
|
1597
|
+
/** Audio section: a file with a `filePath`. */
|
|
1598
|
+
readonly showAudio: _angular_core.Signal<boolean>;
|
|
1599
|
+
/** Virtual walk section: a walk with an `iframeSource` (not a file URL). */
|
|
1600
|
+
readonly showVirtualWalk: _angular_core.Signal<boolean>;
|
|
1601
|
+
/** The number of audio description files with a real URL. */
|
|
1602
|
+
readonly audioDescriptionCount: _angular_core.Signal<number>;
|
|
1603
|
+
/** Audio description section: any audio description. */
|
|
1604
|
+
readonly showAudioDescription: _angular_core.Signal<boolean>;
|
|
1605
|
+
/** Map section: both `archeoMap` coordinates set. */
|
|
1606
|
+
readonly showMap: _angular_core.Signal<boolean>;
|
|
1607
|
+
/** Other files section (PDF, etc.): a real file URL. */
|
|
1608
|
+
readonly showOther: _angular_core.Signal<boolean>;
|
|
1609
|
+
/** Whether any section is visible. */
|
|
1610
|
+
readonly hasVisibleSections: _angular_core.Signal<boolean>;
|
|
1611
|
+
/**
|
|
1612
|
+
* Whether an additional file of the types has a URL from `FileUrlService`
|
|
1613
|
+
* that is not the no-image placeholder. Reads `item()`, so the calling
|
|
1614
|
+
* `computed` tracks it.
|
|
1615
|
+
*/
|
|
1616
|
+
private mediaSectionsHasContent;
|
|
1617
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectMediaSectionsBaseComponent, never>;
|
|
1618
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ObjectMediaSectionsBaseComponent, never, never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "exclude": { "alias": "exclude"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
export { ASK_ABOUT_OBJECT_KEYS, AdvancedFilterType, ComponentsModule, FiltersComponent, FormFeatureType, ListComponent, MULTIMEDIA_DICTIONARY, OBJECTS_CATALOG_DEFAULTS, OBJECTS_CATALOG_SEO, OBJECTS_FILTER_SINGLE_VALUE_LABELS, OBJECTS_LIMIT_OPTIONS, OBJECTS_NEW_TYPE_SORT_OPTIONS, OBJECTS_SHARE_COPIED_TIMEOUT, OBJECTS_SORT_OPTIONS, OBJECTS_THEME_TAGS_FILTER_KEY, ObjectAnimationTabBaseComponent, ObjectAudioDescriptionTabBaseComponent, ObjectAudioMediaTabBaseComponent, ObjectAudioTabBaseComponent, ObjectDetailsBaseComponent, ObjectDocumentsTabBaseComponent, ObjectDownloadButtonBaseComponent, ObjectMapTabBaseComponent, ObjectMediaSectionsBaseComponent, ObjectMediaService, ObjectMediaTabBaseComponent, ObjectModel3dTabBaseComponent, ObjectVideoMediaTabBaseComponent, ObjectVideoTabBaseComponent, ObjectVirtualWalkTabBaseComponent, ObjectsAdvancedFiltersBaseComponent, ObjectsCatalogBaseComponent, ObjectsDataService, ObjectsFacade, ObjectsFiltersBarBaseComponent, ObjectsItemComponent, ObjectsListComponent, ObjectsModule, ObjectsSearchPanelBaseComponent, ObjectsService, ObjectsShareResultsBaseComponent, ObjectsSharedModule, SERVICES, askAboutObjectHref, bibliography, buildObjectsResultsUrl, descriptionHtml, getObjectsState, getReducer, initialState, inventoryValues, objectTitle, objectsSortFromKey, objectsSortKey, relatedArticles, tagValues };
|
|
1622
|
+
export type { ArchaeologicalSegregation, AskTranslate, FileType, IAnimationObject, IAskAboutObject, IKeyValue, IModel3DObject, IMultimediaDictionaryItem, IObjectArcheoMap, IObjectAudioTabOptions, IObjectBibliographyEntry, IObjectCollectionSummary, IObjectDetailLink, IObjectDetailSource, IObjectDetailsOptions, IObjectGalleryItem, IObjectModel3dEmbeddedViewer, IObjectModel3dTabOptions, IObjectModel3dViewer, IObjectModel3dViewerLibrary, IObjectRelated, IObjectsAdvancedFilterField, IObjectsAdvancedFilterWrite, IObjectsAdvancedFiltersOptions, IObjectsCatalogLoadMore, IObjectsCatalogOptions, IObjectsCatalogSeo, IObjectsDateRange, IObjectsFilterWrite, IObjectsFiltersBarOptions, ISpecificObject, ObjectDetailValue, ObjectsAdvancedFilterBoolean, ObjectsAdvancedFilterMode, SortType, State };
|