@net7/boilerplate-muruca 5.3.5 → 5.4.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.
@@ -2508,6 +2508,352 @@ class MrNetworkDS extends DataSource {
2508
2508
  }
2509
2509
  }
2510
2510
 
2511
+ class MrParallelTextViewerDS extends DataSource {
2512
+ transform(data) {
2513
+ if (!data)
2514
+ return null;
2515
+ /*
2516
+ if (this.options.facsimileOptions && data.facsimile) {
2517
+ if (!data.facsimile.options) {
2518
+ data.facsimile.options = {};
2519
+ }
2520
+ Object.keys(this.options.facsimileOptions).forEach((key) => {
2521
+ data.facsimile.options[key] = this.options.facsimileOptions[key];
2522
+ });
2523
+ } */
2524
+ if (this.options) {
2525
+ // Gestione delle libOptions
2526
+ if (this.options.libOptions) {
2527
+ if (!data.libOptions || typeof data.libOptions !== 'object') {
2528
+ data.libOptions = {};
2529
+ }
2530
+ Object.keys(this.options.libOptions).forEach((key) => {
2531
+ if (!data.libOptions[key] || typeof data.libOptions[key] !== 'object') {
2532
+ data.libOptions[key] = {};
2533
+ }
2534
+ Object.keys(this.options.libOptions[key]).forEach((subKey) => {
2535
+ data.libOptions[key][subKey] = this.options.libOptions[key][subKey];
2536
+ });
2537
+ });
2538
+ // Debug libOptions
2539
+ /* console.log(' DEBUG libOptions:', {
2540
+ 'this.options.libOptions': this.options.libOptions,
2541
+ 'data.libOptions': data.libOptions,
2542
+ 'data.libOptions.pbPage': data.libOptions.pbPage,
2543
+ 'urlIgnore': data.libOptions.pbPage?.urlIgnore
2544
+ }); */
2545
+ }
2546
+ // Gestione della grid
2547
+ if (this.options.grid) {
2548
+ data.grid = this.options.grid;
2549
+ }
2550
+ // Gestione dei panels
2551
+ if (this.options.panels) {
2552
+ this.options.panels.forEach((panelProperties) => {
2553
+ const panelIndex = data.panels.findIndex((panel) => panel.id === panelProperties.id);
2554
+ if (panelIndex !== -1) {
2555
+ data.panels[panelIndex] = {
2556
+ ...data.panels[panelIndex],
2557
+ ...panelProperties
2558
+ };
2559
+ }
2560
+ });
2561
+ }
2562
+ }
2563
+ const { enableClickOnEntities, toggleColumn,
2564
+ // searchId,
2565
+ // searchApi
2566
+ } = this.options || {};
2567
+ data.toggleColumn = toggleColumn;
2568
+ // force tei publisher endpoint value
2569
+ document.addEventListener('pb-page-ready', (ev) => {
2570
+ const { detail } = ev;
2571
+ detail.endpoint = data.endpoint;
2572
+ }, { once: true });
2573
+ // const params = new URLSearchParams(document.location.search);
2574
+ // const id = params.get('id');
2575
+ this.setupViewClickListeners();
2576
+ /* if (data.docs[0]?.view === 'page' && id) {
2577
+ data.docs[0].view = 'div';
2578
+ document.addEventListener(
2579
+ 'pb-end-update',
2580
+ () => {
2581
+ setTimeout(() => {
2582
+ document.dispatchEvent(
2583
+ new CustomEvent('pb-toggle', {
2584
+ detail: {
2585
+ properties: {
2586
+ view: 'page',
2587
+ },
2588
+ action: 'refresh',
2589
+ key: 'transcription',
2590
+ },
2591
+ })
2592
+ );
2593
+ document.dispatchEvent(
2594
+ new CustomEvent('pb-toggle', {
2595
+ detail: {
2596
+ properties: {
2597
+ view: 'single',
2598
+ },
2599
+ action: 'refresh',
2600
+ key: 'addChannel',
2601
+ },
2602
+ })
2603
+ );
2604
+ document.dispatchEvent(
2605
+ new CustomEvent('pb-toggle', {
2606
+ detail: {
2607
+ properties: {
2608
+ view: 'single',
2609
+ id: '',
2610
+ },
2611
+ action: 'refresh',
2612
+ key: 'index',
2613
+ },
2614
+ })
2615
+ );
2616
+ }, 500);
2617
+ },
2618
+ { once: true }
2619
+ );
2620
+ } */
2621
+ if (enableClickOnEntities) {
2622
+ document.addEventListener('pb-end-update', (ev) => {
2623
+ this.scrollElementsIntoView(ev.detail, 'chapter', '#view1');
2624
+ });
2625
+ }
2626
+ /* if (params.get('hq')) {
2627
+ if (searchApi) {
2628
+ const xmlQueryUrl = `${searchApi.url
2629
+ }?resource-id=${searchApi['resource-id']
2630
+ }&searchId=${searchId
2631
+ }&xml=${data.docs[0]?.xml
2632
+ }&${params.toString()}`;
2633
+ data.docs[0].url = xmlQueryUrl;
2634
+ data.docs[0].rootPath = 'api/mrcparts';
2635
+ }
2636
+ document.addEventListener('pb-end-update', (ev: any) => {
2637
+ this.scrollElementsIntoView(ev.detail, 'hq', '#view0');
2638
+ });
2639
+ } */
2640
+ return data;
2641
+ }
2642
+ displayIndex() {
2643
+ if (this.output.toggleColumn) {
2644
+ this.output.toggleColumn = false;
2645
+ }
2646
+ else {
2647
+ this.output.toggleColumn = true;
2648
+ }
2649
+ }
2650
+ setupViewClickListeners() {
2651
+ const attachListeners = () => {
2652
+ setTimeout(() => {
2653
+ const views = document.querySelectorAll('.n7-parallel-text-viewer [id$="-view"]');
2654
+ views.forEach((view) => {
2655
+ if (view.id === 'transcription-view') {
2656
+ return;
2657
+ }
2658
+ if (view.shadowRoot) {
2659
+ if (view.__clickListenerAttached) {
2660
+ return;
2661
+ }
2662
+ const clickListener = (event) => {
2663
+ this.onClick(event);
2664
+ };
2665
+ // Salva il riferimento e marca come attaccato
2666
+ view.__clickListener = clickListener;
2667
+ view.__clickListenerAttached = true;
2668
+ // Attacca il listener in capture phase per catturare tutti i click
2669
+ view.shadowRoot.addEventListener('click', clickListener, true);
2670
+ }
2671
+ });
2672
+ }, 100);
2673
+ };
2674
+ // Attacca al primo caricamento
2675
+ document.addEventListener('pb-end-update', attachListeners);
2676
+ setTimeout(attachListeners, 500);
2677
+ }
2678
+ onClick(payload) {
2679
+ // console.log('🔵 onClick chiamato!', payload);
2680
+ let target = null;
2681
+ const clickPath = payload.path || payload.composedPath();
2682
+ // console.log('🔵 clickPath:', clickPath);
2683
+ // chiusura apparato con tasto
2684
+ const closeButton = clickPath.find((el) => el.className
2685
+ && typeof el.className === 'string'
2686
+ && el.className.includes('close_app'));
2687
+ if (closeButton) {
2688
+ // console.log('Click rilevato sul bottone di chiusura:', closeButton);
2689
+ const parentAppItem = closeButton.closest('.tei-app');
2690
+ if (parentAppItem && parentAppItem.style) {
2691
+ // console.log('Chiusura dell\'elemento tei-app');
2692
+ parentAppItem.style.display = 'none';
2693
+ parentAppItem.style.transform = '';
2694
+ payload.stopPropagation();
2695
+ return;
2696
+ }
2697
+ }
2698
+ // Chiusura note con tasto
2699
+ const closeNoteButton = clickPath.find((el) => el.className
2700
+ && typeof el.className === 'string'
2701
+ && el.className.includes('close_note'));
2702
+ if (closeNoteButton) {
2703
+ // console.log('Click rilevato sul bottone di chiusura nota:', closeNoteButton);
2704
+ const parentNoteItem = closeNoteButton.closest('.note-item');
2705
+ if (parentNoteItem && parentNoteItem.style) {
2706
+ // console.log('Chiusura dell\'elemento note-item');
2707
+ parentNoteItem.style.display = 'none';
2708
+ parentNoteItem.style.transform = '';
2709
+ payload.stopPropagation();
2710
+ return;
2711
+ }
2712
+ }
2713
+ if (payload.path) {
2714
+ target = payload.path.find(({ tagName }) => tagName === 'PB-HIGHLIGHT');
2715
+ }
2716
+ else {
2717
+ target = payload.composedPath().find(({ tagName }) => tagName === 'PB-HIGHLIGHT');
2718
+ }
2719
+ if (target && target.getAttribute('type') === 'app_lem') {
2720
+ const appId = target.getAttribute('key');
2721
+ // console.log('appId:', appId);
2722
+ // Posizione elemento cliccato
2723
+ const clickedElementPosition = target.getBoundingClientRect().top;
2724
+ const apparatusView = document.querySelectorAll('.n7-parallel-text-viewer [id$="-view"]');
2725
+ // console.log('Numero di view trovate:', apparatusView.length);
2726
+ let anchorElement = null;
2727
+ let teiAppElement = null;
2728
+ apparatusView.forEach((view) => {
2729
+ if (view.shadowRoot) {
2730
+ const found = view.shadowRoot.querySelector(`[id="${appId}"]`);
2731
+ if (found) {
2732
+ if (!anchorElement) {
2733
+ anchorElement = found;
2734
+ }
2735
+ const appElement = found.closest('.tei-app');
2736
+ if (appElement && !teiAppElement) {
2737
+ teiAppElement = appElement;
2738
+ }
2739
+ }
2740
+ }
2741
+ });
2742
+ if (teiAppElement) {
2743
+ const isVisible = teiAppElement.style.display === 'block';
2744
+ if (isVisible) {
2745
+ teiAppElement.style.display = 'none';
2746
+ teiAppElement.style.transform = '';
2747
+ }
2748
+ else {
2749
+ teiAppElement.style.display = 'block';
2750
+ // posizione attuale
2751
+ const elementPosition = teiAppElement.getBoundingClientRect().top;
2752
+ // differenza
2753
+ const positionDifference = clickedElementPosition - elementPosition;
2754
+ // spostamento
2755
+ teiAppElement.style.transform = `translateY(${positionDifference}px)`;
2756
+ }
2757
+ }
2758
+ else {
2759
+ console.warn('teiAppElement non trovato!');
2760
+ }
2761
+ }
2762
+ else if (target && target.getAttribute('type') === 'note_line') {
2763
+ const noteId = target.getAttribute('key');
2764
+ // console.log('noteId', noteId);
2765
+ const clickedElementPosition = target.getBoundingClientRect().top;
2766
+ const apparatusView = document.querySelector('.n7-text-viewer #apparato-view');
2767
+ const anchorElement = apparatusView
2768
+ ?.shadowRoot
2769
+ ?.querySelector(`#${noteId}`);
2770
+ const teiNoteElement = anchorElement
2771
+ ? anchorElement.closest('.note-item')
2772
+ : null;
2773
+ if (teiNoteElement) {
2774
+ // Verifica se è visibile
2775
+ const isVisible = teiNoteElement.style.display === 'block';
2776
+ if (isVisible) {
2777
+ teiNoteElement.style.display = 'none';
2778
+ teiNoteElement.style.transform = '';
2779
+ }
2780
+ else {
2781
+ teiNoteElement.style.display = 'block';
2782
+ // posizione attuale
2783
+ const elementPosition = teiNoteElement.getBoundingClientRect().top;
2784
+ // differenza
2785
+ const positionDifference = clickedElementPosition - elementPosition;
2786
+ // spostamento
2787
+ teiNoteElement.style.transform = `translateY(${positionDifference}px)`;
2788
+ }
2789
+ }
2790
+ }
2791
+ else if (target && this.output.toggleColumn === false) {
2792
+ if (target.__key
2793
+ && (target.className.includes('person')
2794
+ || target.className.includes('place'))) {
2795
+ this.output.toggleColumn = true;
2796
+ this.scrollElementsIntoView(target, 'entity', '#text-viewer-index');
2797
+ }
2798
+ }
2799
+ else
2800
+ this.output.toggleColumn = false;
2801
+ }
2802
+ viewListenerUpdate() {
2803
+ document.addEventListener('pb-start-update', function _listener() {
2804
+ document.removeEventListener('pb-start-update', _listener, true);
2805
+ }, true);
2806
+ }
2807
+ changeView(view, refresh) {
2808
+ setTimeout((v, r) => {
2809
+ // console.log(`TEST CHANGE VIEW: ${view}`);
2810
+ document.dispatchEvent(new CustomEvent('pb-toggle', {
2811
+ detail: {
2812
+ properties: {
2813
+ view: v,
2814
+ },
2815
+ action: r ? 'refresh' : '',
2816
+ key: 'transcription',
2817
+ },
2818
+ }));
2819
+ }, 600, view, refresh);
2820
+ }
2821
+ scrollElementsIntoView(target, type, view) {
2822
+ setTimeout(() => {
2823
+ let element;
2824
+ if (type === 'chapter') {
2825
+ if (document
2826
+ .querySelector('.n7-text-viewer #view0')
2827
+ .shadowRoot.querySelector('pb-highlight')) {
2828
+ const highlight = document
2829
+ .querySelector('.n7-text-viewer #view0')
2830
+ .shadowRoot.querySelectorAll('pb-highlight');
2831
+ const highlightId = highlight[highlight.length - 1].id; // s.x
2832
+ const fragmentNumber = highlightId.replace('.', '\\.');
2833
+ element = document
2834
+ .querySelector(view)
2835
+ .shadowRoot.querySelector(`#${fragmentNumber}`);
2836
+ }
2837
+ }
2838
+ else if (type === 'entity') {
2839
+ const key = target.__key;
2840
+ element = document
2841
+ .querySelector(`.n7-text-viewer ${view}`)
2842
+ .shadowRoot.querySelector(`#${key}`);
2843
+ }
2844
+ else if (type === 'hq') {
2845
+ element = document
2846
+ .querySelector(`.n7-text-viewer ${view}`)
2847
+ .shadowRoot.querySelector('.tei-em');
2848
+ }
2849
+ const container = document.querySelector(`.n7-text-viewer ${view}`);
2850
+ if (element) {
2851
+ container.scrollTop = element.offsetTop;
2852
+ }
2853
+ }, 600);
2854
+ }
2855
+ }
2856
+
2511
2857
  class MrSearchPageTitleDS extends DataSource {
2512
2858
  transform() {
2513
2859
  const { title, description, searchId } = this.options.config;
@@ -2963,6 +3309,7 @@ var DS = /*#__PURE__*/Object.freeze({
2963
3309
  MrMetadataDynamicDS: MrMetadataDynamicDS,
2964
3310
  MrNavDS: MrNavDS,
2965
3311
  MrNetworkDS: MrNetworkDS,
3312
+ MrParallelTextViewerDS: MrParallelTextViewerDS,
2966
3313
  MrResourceTabsDS: MrResourceTabsDS,
2967
3314
  MrSearchPageDescriptionDS: MrSearchPageDescriptionDS,
2968
3315
  MrSearchPageTitleDS: MrSearchPageTitleDS,
@@ -3109,6 +3456,24 @@ class MrNetworkEH extends EventHandler {
3109
3456
  }
3110
3457
  }
3111
3458
 
3459
+ class MrParallelTextViewerEH extends EventHandler {
3460
+ listen() {
3461
+ this.innerEvents$.subscribe(({ type, payload }) => {
3462
+ switch (type) {
3463
+ case `${this.hostId}.click`:
3464
+ this.dataSource.onClick(payload);
3465
+ break;
3466
+ case `${this.hostId}.togglecolumn`:
3467
+ this.dataSource.displayIndex();
3468
+ break;
3469
+ default:
3470
+ // console.warn('unhandled event of type', type);
3471
+ break;
3472
+ }
3473
+ });
3474
+ }
3475
+ }
3476
+
3112
3477
  class MrSearchTagsEH extends EventHandler {
3113
3478
  listen() {
3114
3479
  this.innerEvents$.subscribe(({ type, payload }) => {
@@ -3282,6 +3647,7 @@ var EH = /*#__PURE__*/Object.freeze({
3282
3647
  MrMetadataDynamicEH: MrMetadataDynamicEH,
3283
3648
  MrNavEH: MrNavEH,
3284
3649
  MrNetworkEH: MrNetworkEH,
3650
+ MrParallelTextViewerEH: MrParallelTextViewerEH,
3285
3651
  MrSearchPageDescriptionEH: MrSearchPageDescriptionEH,
3286
3652
  MrSearchPageTitleEH: MrSearchPageTitleEH,
3287
3653
  MrSearchResultsEH: MrSearchResultsEH,
@@ -5857,6 +6223,7 @@ const DATASOURCE_MAP$3 = {
5857
6223
  'viewer-tools': MrImageViewerToolsDS,
5858
6224
  'viewer-overlay-details': MrImageViewerOverlayDetailsDS,
5859
6225
  'text-viewer': MrTextViewerDS,
6226
+ 'parallel-text-viewer': MrParallelTextViewerDS,
5860
6227
  'metadata-dynamic': MrMetadataDynamicDS,
5861
6228
  'viewer-iiif': MrImageViewerIiifDS,
5862
6229
  };
@@ -5865,6 +6232,7 @@ const EVENTHANDLER_MAP$2 = {
5865
6232
  'viewer-tools': MrImageViewerToolsEH,
5866
6233
  'viewer-overlay-details': MrImageViewerOverlayDetailsEH,
5867
6234
  'text-viewer': MrTextViewerEH,
6235
+ 'parallel-text-viewer': MrParallelTextViewerEH,
5868
6236
  collection: MrCollectionEH,
5869
6237
  'metadata-dynamic': MrMetadataDynamicEH,
5870
6238
  button: MrButtonEH,
@@ -5964,11 +6332,11 @@ class MrResourceLayoutComponent extends AbstractLayout {
5964
6332
  }
5965
6333
  }
5966
6334
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MrResourceLayoutComponent, deps: [{ token: i1.LayoutsConfigurationService }, { token: i2.ActivatedRoute }, { token: i1.ConfigurationService }, { token: i1.CommunicationService }, { token: i1.MainStateService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: MrLayoutStateService }, { token: MrResourceModalService }, { token: MrLocaleService }], target: i0.ɵɵFactoryTarget.Component }); }
5967
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MrResourceLayoutComponent, selector: "mr-resource-layout", usesInheritance: true, ngImport: i0, template: "<div class=\"mr-resource mr-layout\" \n *ngIf=\"lb.dataSource && lb.dataSource.pageConfig\"\n [ngClass]=\"{\n 'is-loading': ( layoutState.get$('content') | async ) == 'LOADING',\n 'is-error': ( layoutState.get$('content') | async ) == 'ERROR'\n }\">\n <!-- RESOURCE LAYOUT CONTENT -->\n <ng-container [ngSwitch]=\"layoutState.get$('content') | async\">\n <!-- loading -->\n <ng-container *ngSwitchCase=\"'LOADING'\">\n <div class=\"mr-layout__loader\">\n <n7-loader></n7-loader>\n </div>\n </ng-container>\n\n <!-- error -->\n <ng-container *ngSwitchCase=\"'ERROR'\">\n <div class=\"mr-layout__error\">\n <h2>{{ lb.dataSource.errorTitle }}</h2>\n <p>{{ lb.dataSource.errorDescription }}</p>\n </div>\n </ng-container>\n\n <!-- success -->\n <ng-container *ngSwitchCase=\"'SUCCESS'\">\n <ng-container *ngIf=\"lb.dataSource.pageConfig.sections as sections\">\n <!-- Pass the list of blocks to render to the block template -->\n <div class=\"mr-resource__top\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.top }\"></ng-container>\n </div>\n <div class=\"mr-resource__content mr-side-margin\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.content }\"></ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #blocks let-list>\n <ng-container *ngFor=\"let section of list\">\n <section *ngIf=\"lb.widgets[section.id].ds.out$ | async\"\n class=\"{{ 'mr-resource__section mr-resource__' + section.type }}\">\n <ng-container [ngSwitch]=\"section.type\">\n\n <!-- TABS -->\n <ng-container *ngSwitchCase=\"'tabs'\">\n <ng-container *ngFor=\"let tab of lb.widgets[section.id].ds.out$ | async\">\n <n7-anchor-wrapper [data]=\"tab.anchor\" [classes]=\"tab.classes\" *ngIf=\"!tab.hideTab\">\n <span class=\"mr-resource__tabs-item\">{{ tab.label }}</span>\n </n7-anchor-wrapper>\n </ng-container>\n </ng-container>\n\n <!-- INNER TITLE -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"mr-resource__title-content mr-side-margin\">\n <n7-inner-title \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-inner-title>\n </div>\n </ng-container>\n\n <!-- CUSTOM BUTTON -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div class=\"mr-resource__button\">\n <n7-button \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-button>\n </div>\n </ng-container>\n \n <!-- IMAGE VIEWER IIIF -->\n <ng-container *ngSwitchCase=\"'viewer-iiif'\">\n <n7-mirador\n (contextmenu)=\"lb.dataSource.hasContextMenu()\"\n [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-mirador>\n </ng-container>\n \n <!-- IMAGE VIEWER -->\n <ng-container *ngSwitchCase=\"'viewer'\">\n\n <n7-image-viewer \n [data]=\"lb.widgets[section.id].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id].emit\">\n </n7-image-viewer>\n <!-- IMAGE VIEWER TOOLS -->\n <n7-image-viewer-tools *ngIf=\"section.tools\" \n [data]=\"lb.widgets[section.id + '-tools'].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id + '-tools'].emit\">\n </n7-image-viewer-tools>\n <!-- IMAGE VIEWER OVERLAY DETAILS -->\n <div *ngIf=\"lb.widgets[section.id + '-overlay-details'].ds.out$ | async as viewerDetailsData\" \n class=\"mr-resource__viewer-overlay-details\">\n <div class=\"mr-resource__viewer-overlay-details__close\">\n <a class=\"mr-resource__viewer-overlay-details__close-link\" \n (click)=\"lb.eventHandler.emitOuter('overlaycloseclick')\">\n <span class=\"n7-icon-close\"></span>\n </a>\n </div>\n <n7-item-preview \n [data]=\"viewerDetailsData\" \n [emit]=\"lb.widgets[section.id + '-overlay-details'].emit\">\n </n7-item-preview>\n </div>\n\n </ng-container>\n \n <!-- METADATA VIEWER -->\n <ng-container *ngSwitchCase=\"'metadata'\">\n \n <div class=\"mr-content-block mr-content-block-metadata\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <mr-read-more [data]=\"section.readmore\">\n <ng-container *ngIf=\" section?.options?.readmore || section?.options?.groupReadmore;\n else wihoutReadmore\">\n <mr-metadata-readmore\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-readmore>\n </ng-container>\n <ng-template #wihoutReadmore>\n <n7-metadata-viewer\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-metadata-viewer>\n </ng-template>\n </mr-read-more>\n </div>\n </div>\n \n </ng-container>\n \n <!-- METADATA DYNAMIC -->\n <ng-container *ngSwitchCase=\"'metadata-dynamic'\">\n <mr-metadata-dynamic \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-dynamic> \n </ng-container>\n \n <!-- COLLECTION -->\n <ng-container *ngSwitchCase=\"'collection'\">\n <ng-container *ngIf=\"lb.widgets[section.id].ds.out$ | async as collection$\">\n <div *ngIf=\"collection$.items?.length > 0\" class=\"mr-content-block mr-content-block-collection\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content {{ section.grid ? 'n7-grid-' + section.grid : '' }}\">\n <n7-item-preview *ngFor=\"let item of collection$?.items\"\n [data]=\"item\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n </ng-container>\n \n <!-- ITEM PREVIEW -->\n <ng-container *ngSwitchCase=\"'preview'\">\n <div class=\"mr-content-block mr-content-block-item-preview\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-item-preview [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"> \n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n \n <!-- TEXT VIEWER -->\n <ng-container *ngSwitchCase=\"'text-viewer'\">\n <div class=\"mr-content-block mr-content-block-text-viewer\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-text-viewer [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-text-viewer>\n </div>\n </div>\n \n </ng-container>\n\n <!-- MAP -->\n <ng-container *ngSwitchCase=\"'map'\">\n <div class=\"mr-content-block mr-content-block-map\">\n <div class=\"mr-content-block__content\">\n <n7-map [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"></n7-map>\n </div>\n </div>\n </ng-container>\n \n <!-- INFO BOX -->\n <ng-container *ngSwitchCase=\"'info-box'\">\n <div class=\"mr-content-block mr-content-block-info-box\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <div class=\"info-box__mock\">info-box</div> \n </div>\n </div>\n </ng-container>\n \n <!-- BREADCRUMBS -->\n <ng-container *ngSwitchCase=\"'breadcrumbs'\">\n <n7-breadcrumbs [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-breadcrumbs>\n </ng-container>\n\n </ng-container>\n </section>\n </ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.AnchorWrapperComponent, selector: "n7-anchor-wrapper", inputs: ["data", "classes"], outputs: ["clicked"] }, { kind: "component", type: i7.BreadcrumbsComponent, selector: "n7-breadcrumbs", inputs: ["data", "emit"] }, { kind: "component", type: i7.ButtonComponent, selector: "n7-button", inputs: ["data", "emit"] }, { kind: "component", type: i7.ImageViewerComponent, selector: "n7-image-viewer", inputs: ["data", "emit"] }, { kind: "component", type: i7.ImageViewerToolsComponent, selector: "n7-image-viewer-tools", inputs: ["data", "emit"] }, { kind: "component", type: i7.InnerTitleComponent, selector: "n7-inner-title", inputs: ["data", "emit"] }, { kind: "component", type: i7.ItemPreviewComponent, selector: "n7-item-preview", inputs: ["data", "emit"] }, { kind: "component", type: i7.LoaderComponent, selector: "n7-loader", inputs: ["data"] }, { kind: "component", type: i7.MapComponent, selector: "n7-map", inputs: ["data", "emit"] }, { kind: "component", type: i7.MetadataViewerComponent, selector: "n7-metadata-viewer", inputs: ["data", "emit"] }, { kind: "component", type: i7.MiradorComponent, selector: "n7-mirador", inputs: ["data"] }, { kind: "component", type: i7.TextViewerComponent, selector: "n7-text-viewer", inputs: ["data", "emit"] }, { kind: "component", type: MrMetadataReadmoreComponent, selector: "mr-metadata-readmore", inputs: ["data", "emit"] }, { kind: "component", type: ReadMoreComponent, selector: "mr-read-more", inputs: ["data"] }, { kind: "component", type: MrMetadataDynamicComponent, selector: "mr-metadata-dynamic", inputs: ["data", "emit"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }] }); }
6335
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MrResourceLayoutComponent, selector: "mr-resource-layout", usesInheritance: true, ngImport: i0, template: "<div class=\"mr-resource mr-layout\" \n *ngIf=\"lb.dataSource && lb.dataSource.pageConfig\"\n [ngClass]=\"{\n 'is-loading': ( layoutState.get$('content') | async ) == 'LOADING',\n 'is-error': ( layoutState.get$('content') | async ) == 'ERROR'\n }\">\n <!-- RESOURCE LAYOUT CONTENT -->\n <ng-container [ngSwitch]=\"layoutState.get$('content') | async\">\n <!-- loading -->\n <ng-container *ngSwitchCase=\"'LOADING'\">\n <div class=\"mr-layout__loader\">\n <n7-loader></n7-loader>\n </div>\n </ng-container>\n\n <!-- error -->\n <ng-container *ngSwitchCase=\"'ERROR'\">\n <div class=\"mr-layout__error\">\n <h2>{{ lb.dataSource.errorTitle }}</h2>\n <p>{{ lb.dataSource.errorDescription }}</p>\n </div>\n </ng-container>\n\n <!-- success -->\n <ng-container *ngSwitchCase=\"'SUCCESS'\">\n <ng-container *ngIf=\"lb.dataSource.pageConfig.sections as sections\">\n <!-- Pass the list of blocks to render to the block template -->\n <div class=\"mr-resource__top\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.top }\"></ng-container>\n </div>\n <div class=\"mr-resource__content mr-side-margin\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.content }\"></ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #blocks let-list>\n <ng-container *ngFor=\"let section of list\">\n <section *ngIf=\"lb.widgets[section.id].ds.out$ | async\"\n class=\"{{ 'mr-resource__section mr-resource__' + section.type }}\">\n <ng-container [ngSwitch]=\"section.type\">\n\n <!-- TABS -->\n <ng-container *ngSwitchCase=\"'tabs'\">\n <ng-container *ngFor=\"let tab of lb.widgets[section.id].ds.out$ | async\">\n <n7-anchor-wrapper [data]=\"tab.anchor\" [classes]=\"tab.classes\" *ngIf=\"!tab.hideTab\">\n <span class=\"mr-resource__tabs-item\">{{ tab.label }}</span>\n </n7-anchor-wrapper>\n </ng-container>\n </ng-container>\n\n <!-- INNER TITLE -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"mr-resource__title-content mr-side-margin\">\n <n7-inner-title \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-inner-title>\n </div>\n </ng-container>\n\n <!-- CUSTOM BUTTON -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div class=\"mr-resource__button\">\n <n7-button \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-button>\n </div>\n </ng-container>\n \n <!-- IMAGE VIEWER IIIF -->\n <ng-container *ngSwitchCase=\"'viewer-iiif'\">\n <n7-mirador\n (contextmenu)=\"lb.dataSource.hasContextMenu()\"\n [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-mirador>\n </ng-container>\n \n <!-- IMAGE VIEWER -->\n <ng-container *ngSwitchCase=\"'viewer'\">\n\n <n7-image-viewer \n [data]=\"lb.widgets[section.id].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id].emit\">\n </n7-image-viewer>\n <!-- IMAGE VIEWER TOOLS -->\n <n7-image-viewer-tools *ngIf=\"section.tools\" \n [data]=\"lb.widgets[section.id + '-tools'].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id + '-tools'].emit\">\n </n7-image-viewer-tools>\n <!-- IMAGE VIEWER OVERLAY DETAILS -->\n <div *ngIf=\"lb.widgets[section.id + '-overlay-details'].ds.out$ | async as viewerDetailsData\" \n class=\"mr-resource__viewer-overlay-details\">\n <div class=\"mr-resource__viewer-overlay-details__close\">\n <a class=\"mr-resource__viewer-overlay-details__close-link\" \n (click)=\"lb.eventHandler.emitOuter('overlaycloseclick')\">\n <span class=\"n7-icon-close\"></span>\n </a>\n </div>\n <n7-item-preview \n [data]=\"viewerDetailsData\" \n [emit]=\"lb.widgets[section.id + '-overlay-details'].emit\">\n </n7-item-preview>\n </div>\n\n </ng-container>\n \n <!-- METADATA VIEWER -->\n <ng-container *ngSwitchCase=\"'metadata'\">\n \n <div class=\"mr-content-block mr-content-block-metadata\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <mr-read-more [data]=\"section.readmore\">\n <ng-container *ngIf=\" section?.options?.readmore || section?.options?.groupReadmore;\n else wihoutReadmore\">\n <mr-metadata-readmore\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-readmore>\n </ng-container>\n <ng-template #wihoutReadmore>\n <n7-metadata-viewer\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-metadata-viewer>\n </ng-template>\n </mr-read-more>\n </div>\n </div>\n \n </ng-container>\n \n <!-- METADATA DYNAMIC -->\n <ng-container *ngSwitchCase=\"'metadata-dynamic'\">\n <mr-metadata-dynamic \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-dynamic> \n </ng-container>\n \n <!-- COLLECTION -->\n <ng-container *ngSwitchCase=\"'collection'\">\n <ng-container *ngIf=\"lb.widgets[section.id].ds.out$ | async as collection$\">\n <div *ngIf=\"collection$.items?.length > 0\" class=\"mr-content-block mr-content-block-collection\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content {{ section.grid ? 'n7-grid-' + section.grid : '' }}\">\n <n7-item-preview *ngFor=\"let item of collection$?.items\"\n [data]=\"item\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n </ng-container>\n \n <!-- ITEM PREVIEW -->\n <ng-container *ngSwitchCase=\"'preview'\">\n <div class=\"mr-content-block mr-content-block-item-preview\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-item-preview [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"> \n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n \n <!-- TEXT VIEWER -->\n <ng-container *ngSwitchCase=\"'text-viewer'\">\n <div class=\"mr-content-block mr-content-block-text-viewer\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-text-viewer [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-text-viewer>\n </div>\n </div>\n </ng-container>\n\n <!-- PARALLEL TEXT VIEWER -->\n <ng-container *ngSwitchCase=\"'parallel-text-viewer'\">\n <div class=\"mr-content-block mr-content-block-text-viewer mr-content-block-parallel-text-viewer\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-parallel-text-viewer [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-parallel-text-viewer>\n </div>\n </div>\n </ng-container>\n\n <!-- MAP -->\n <ng-container *ngSwitchCase=\"'map'\">\n <div class=\"mr-content-block mr-content-block-map\">\n <div class=\"mr-content-block__content\">\n <n7-map [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"></n7-map>\n </div>\n </div>\n </ng-container>\n \n <!-- INFO BOX -->\n <ng-container *ngSwitchCase=\"'info-box'\">\n <div class=\"mr-content-block mr-content-block-info-box\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <div class=\"info-box__mock\">info-box</div> \n </div>\n </div>\n </ng-container>\n \n <!-- BREADCRUMBS -->\n <ng-container *ngSwitchCase=\"'breadcrumbs'\">\n <n7-breadcrumbs [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-breadcrumbs>\n </ng-container>\n\n </ng-container>\n </section>\n </ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.AnchorWrapperComponent, selector: "n7-anchor-wrapper", inputs: ["data", "classes"], outputs: ["clicked"] }, { kind: "component", type: i7.BreadcrumbsComponent, selector: "n7-breadcrumbs", inputs: ["data", "emit"] }, { kind: "component", type: i7.ButtonComponent, selector: "n7-button", inputs: ["data", "emit"] }, { kind: "component", type: i7.ImageViewerComponent, selector: "n7-image-viewer", inputs: ["data", "emit"] }, { kind: "component", type: i7.ImageViewerToolsComponent, selector: "n7-image-viewer-tools", inputs: ["data", "emit"] }, { kind: "component", type: i7.InnerTitleComponent, selector: "n7-inner-title", inputs: ["data", "emit"] }, { kind: "component", type: i7.ItemPreviewComponent, selector: "n7-item-preview", inputs: ["data", "emit"] }, { kind: "component", type: i7.LoaderComponent, selector: "n7-loader", inputs: ["data"] }, { kind: "component", type: i7.MapComponent, selector: "n7-map", inputs: ["data", "emit"] }, { kind: "component", type: i7.MetadataViewerComponent, selector: "n7-metadata-viewer", inputs: ["data", "emit"] }, { kind: "component", type: i7.MiradorComponent, selector: "n7-mirador", inputs: ["data"] }, { kind: "component", type: i7.TextViewerComponent, selector: "n7-text-viewer", inputs: ["data", "emit"] }, { kind: "component", type: i7.ParallelTextViewerComponent, selector: "n7-parallel-text-viewer", inputs: ["data", "emit"] }, { kind: "component", type: MrMetadataReadmoreComponent, selector: "mr-metadata-readmore", inputs: ["data", "emit"] }, { kind: "component", type: ReadMoreComponent, selector: "mr-read-more", inputs: ["data"] }, { kind: "component", type: MrMetadataDynamicComponent, selector: "mr-metadata-dynamic", inputs: ["data", "emit"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }] }); }
5968
6336
  }
5969
6337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MrResourceLayoutComponent, decorators: [{
5970
6338
  type: Component,
5971
- args: [{ selector: 'mr-resource-layout', template: "<div class=\"mr-resource mr-layout\" \n *ngIf=\"lb.dataSource && lb.dataSource.pageConfig\"\n [ngClass]=\"{\n 'is-loading': ( layoutState.get$('content') | async ) == 'LOADING',\n 'is-error': ( layoutState.get$('content') | async ) == 'ERROR'\n }\">\n <!-- RESOURCE LAYOUT CONTENT -->\n <ng-container [ngSwitch]=\"layoutState.get$('content') | async\">\n <!-- loading -->\n <ng-container *ngSwitchCase=\"'LOADING'\">\n <div class=\"mr-layout__loader\">\n <n7-loader></n7-loader>\n </div>\n </ng-container>\n\n <!-- error -->\n <ng-container *ngSwitchCase=\"'ERROR'\">\n <div class=\"mr-layout__error\">\n <h2>{{ lb.dataSource.errorTitle }}</h2>\n <p>{{ lb.dataSource.errorDescription }}</p>\n </div>\n </ng-container>\n\n <!-- success -->\n <ng-container *ngSwitchCase=\"'SUCCESS'\">\n <ng-container *ngIf=\"lb.dataSource.pageConfig.sections as sections\">\n <!-- Pass the list of blocks to render to the block template -->\n <div class=\"mr-resource__top\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.top }\"></ng-container>\n </div>\n <div class=\"mr-resource__content mr-side-margin\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.content }\"></ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #blocks let-list>\n <ng-container *ngFor=\"let section of list\">\n <section *ngIf=\"lb.widgets[section.id].ds.out$ | async\"\n class=\"{{ 'mr-resource__section mr-resource__' + section.type }}\">\n <ng-container [ngSwitch]=\"section.type\">\n\n <!-- TABS -->\n <ng-container *ngSwitchCase=\"'tabs'\">\n <ng-container *ngFor=\"let tab of lb.widgets[section.id].ds.out$ | async\">\n <n7-anchor-wrapper [data]=\"tab.anchor\" [classes]=\"tab.classes\" *ngIf=\"!tab.hideTab\">\n <span class=\"mr-resource__tabs-item\">{{ tab.label }}</span>\n </n7-anchor-wrapper>\n </ng-container>\n </ng-container>\n\n <!-- INNER TITLE -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"mr-resource__title-content mr-side-margin\">\n <n7-inner-title \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-inner-title>\n </div>\n </ng-container>\n\n <!-- CUSTOM BUTTON -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div class=\"mr-resource__button\">\n <n7-button \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-button>\n </div>\n </ng-container>\n \n <!-- IMAGE VIEWER IIIF -->\n <ng-container *ngSwitchCase=\"'viewer-iiif'\">\n <n7-mirador\n (contextmenu)=\"lb.dataSource.hasContextMenu()\"\n [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-mirador>\n </ng-container>\n \n <!-- IMAGE VIEWER -->\n <ng-container *ngSwitchCase=\"'viewer'\">\n\n <n7-image-viewer \n [data]=\"lb.widgets[section.id].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id].emit\">\n </n7-image-viewer>\n <!-- IMAGE VIEWER TOOLS -->\n <n7-image-viewer-tools *ngIf=\"section.tools\" \n [data]=\"lb.widgets[section.id + '-tools'].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id + '-tools'].emit\">\n </n7-image-viewer-tools>\n <!-- IMAGE VIEWER OVERLAY DETAILS -->\n <div *ngIf=\"lb.widgets[section.id + '-overlay-details'].ds.out$ | async as viewerDetailsData\" \n class=\"mr-resource__viewer-overlay-details\">\n <div class=\"mr-resource__viewer-overlay-details__close\">\n <a class=\"mr-resource__viewer-overlay-details__close-link\" \n (click)=\"lb.eventHandler.emitOuter('overlaycloseclick')\">\n <span class=\"n7-icon-close\"></span>\n </a>\n </div>\n <n7-item-preview \n [data]=\"viewerDetailsData\" \n [emit]=\"lb.widgets[section.id + '-overlay-details'].emit\">\n </n7-item-preview>\n </div>\n\n </ng-container>\n \n <!-- METADATA VIEWER -->\n <ng-container *ngSwitchCase=\"'metadata'\">\n \n <div class=\"mr-content-block mr-content-block-metadata\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <mr-read-more [data]=\"section.readmore\">\n <ng-container *ngIf=\" section?.options?.readmore || section?.options?.groupReadmore;\n else wihoutReadmore\">\n <mr-metadata-readmore\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-readmore>\n </ng-container>\n <ng-template #wihoutReadmore>\n <n7-metadata-viewer\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-metadata-viewer>\n </ng-template>\n </mr-read-more>\n </div>\n </div>\n \n </ng-container>\n \n <!-- METADATA DYNAMIC -->\n <ng-container *ngSwitchCase=\"'metadata-dynamic'\">\n <mr-metadata-dynamic \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-dynamic> \n </ng-container>\n \n <!-- COLLECTION -->\n <ng-container *ngSwitchCase=\"'collection'\">\n <ng-container *ngIf=\"lb.widgets[section.id].ds.out$ | async as collection$\">\n <div *ngIf=\"collection$.items?.length > 0\" class=\"mr-content-block mr-content-block-collection\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content {{ section.grid ? 'n7-grid-' + section.grid : '' }}\">\n <n7-item-preview *ngFor=\"let item of collection$?.items\"\n [data]=\"item\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n </ng-container>\n \n <!-- ITEM PREVIEW -->\n <ng-container *ngSwitchCase=\"'preview'\">\n <div class=\"mr-content-block mr-content-block-item-preview\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-item-preview [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"> \n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n \n <!-- TEXT VIEWER -->\n <ng-container *ngSwitchCase=\"'text-viewer'\">\n <div class=\"mr-content-block mr-content-block-text-viewer\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-text-viewer [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-text-viewer>\n </div>\n </div>\n \n </ng-container>\n\n <!-- MAP -->\n <ng-container *ngSwitchCase=\"'map'\">\n <div class=\"mr-content-block mr-content-block-map\">\n <div class=\"mr-content-block__content\">\n <n7-map [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"></n7-map>\n </div>\n </div>\n </ng-container>\n \n <!-- INFO BOX -->\n <ng-container *ngSwitchCase=\"'info-box'\">\n <div class=\"mr-content-block mr-content-block-info-box\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <div class=\"info-box__mock\">info-box</div> \n </div>\n </div>\n </ng-container>\n \n <!-- BREADCRUMBS -->\n <ng-container *ngSwitchCase=\"'breadcrumbs'\">\n <n7-breadcrumbs [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-breadcrumbs>\n </ng-container>\n\n </ng-container>\n </section>\n </ng-container>\n</ng-template>\n" }]
6339
+ args: [{ selector: 'mr-resource-layout', template: "<div class=\"mr-resource mr-layout\" \n *ngIf=\"lb.dataSource && lb.dataSource.pageConfig\"\n [ngClass]=\"{\n 'is-loading': ( layoutState.get$('content') | async ) == 'LOADING',\n 'is-error': ( layoutState.get$('content') | async ) == 'ERROR'\n }\">\n <!-- RESOURCE LAYOUT CONTENT -->\n <ng-container [ngSwitch]=\"layoutState.get$('content') | async\">\n <!-- loading -->\n <ng-container *ngSwitchCase=\"'LOADING'\">\n <div class=\"mr-layout__loader\">\n <n7-loader></n7-loader>\n </div>\n </ng-container>\n\n <!-- error -->\n <ng-container *ngSwitchCase=\"'ERROR'\">\n <div class=\"mr-layout__error\">\n <h2>{{ lb.dataSource.errorTitle }}</h2>\n <p>{{ lb.dataSource.errorDescription }}</p>\n </div>\n </ng-container>\n\n <!-- success -->\n <ng-container *ngSwitchCase=\"'SUCCESS'\">\n <ng-container *ngIf=\"lb.dataSource.pageConfig.sections as sections\">\n <!-- Pass the list of blocks to render to the block template -->\n <div class=\"mr-resource__top\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.top }\"></ng-container>\n </div>\n <div class=\"mr-resource__content mr-side-margin\">\n <ng-container *ngTemplateOutlet=\"blocks; context: { $implicit: sections.content }\"></ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #blocks let-list>\n <ng-container *ngFor=\"let section of list\">\n <section *ngIf=\"lb.widgets[section.id].ds.out$ | async\"\n class=\"{{ 'mr-resource__section mr-resource__' + section.type }}\">\n <ng-container [ngSwitch]=\"section.type\">\n\n <!-- TABS -->\n <ng-container *ngSwitchCase=\"'tabs'\">\n <ng-container *ngFor=\"let tab of lb.widgets[section.id].ds.out$ | async\">\n <n7-anchor-wrapper [data]=\"tab.anchor\" [classes]=\"tab.classes\" *ngIf=\"!tab.hideTab\">\n <span class=\"mr-resource__tabs-item\">{{ tab.label }}</span>\n </n7-anchor-wrapper>\n </ng-container>\n </ng-container>\n\n <!-- INNER TITLE -->\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"mr-resource__title-content mr-side-margin\">\n <n7-inner-title \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-inner-title>\n </div>\n </ng-container>\n\n <!-- CUSTOM BUTTON -->\n <ng-container *ngSwitchCase=\"'button'\">\n <div class=\"mr-resource__button\">\n <n7-button \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-button>\n </div>\n </ng-container>\n \n <!-- IMAGE VIEWER IIIF -->\n <ng-container *ngSwitchCase=\"'viewer-iiif'\">\n <n7-mirador\n (contextmenu)=\"lb.dataSource.hasContextMenu()\"\n [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-mirador>\n </ng-container>\n \n <!-- IMAGE VIEWER -->\n <ng-container *ngSwitchCase=\"'viewer'\">\n\n <n7-image-viewer \n [data]=\"lb.widgets[section.id].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id].emit\">\n </n7-image-viewer>\n <!-- IMAGE VIEWER TOOLS -->\n <n7-image-viewer-tools *ngIf=\"section.tools\" \n [data]=\"lb.widgets[section.id + '-tools'].ds.out$ | async\" \n [emit]=\"lb.widgets[section.id + '-tools'].emit\">\n </n7-image-viewer-tools>\n <!-- IMAGE VIEWER OVERLAY DETAILS -->\n <div *ngIf=\"lb.widgets[section.id + '-overlay-details'].ds.out$ | async as viewerDetailsData\" \n class=\"mr-resource__viewer-overlay-details\">\n <div class=\"mr-resource__viewer-overlay-details__close\">\n <a class=\"mr-resource__viewer-overlay-details__close-link\" \n (click)=\"lb.eventHandler.emitOuter('overlaycloseclick')\">\n <span class=\"n7-icon-close\"></span>\n </a>\n </div>\n <n7-item-preview \n [data]=\"viewerDetailsData\" \n [emit]=\"lb.widgets[section.id + '-overlay-details'].emit\">\n </n7-item-preview>\n </div>\n\n </ng-container>\n \n <!-- METADATA VIEWER -->\n <ng-container *ngSwitchCase=\"'metadata'\">\n \n <div class=\"mr-content-block mr-content-block-metadata\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <mr-read-more [data]=\"section.readmore\">\n <ng-container *ngIf=\" section?.options?.readmore || section?.options?.groupReadmore;\n else wihoutReadmore\">\n <mr-metadata-readmore\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-readmore>\n </ng-container>\n <ng-template #wihoutReadmore>\n <n7-metadata-viewer\n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </n7-metadata-viewer>\n </ng-template>\n </mr-read-more>\n </div>\n </div>\n \n </ng-container>\n \n <!-- METADATA DYNAMIC -->\n <ng-container *ngSwitchCase=\"'metadata-dynamic'\">\n <mr-metadata-dynamic \n [data]=\"lb.widgets[section.id].ds.out$ | async\"\n [emit]=\"lb.widgets[section.id].emit\">\n </mr-metadata-dynamic> \n </ng-container>\n \n <!-- COLLECTION -->\n <ng-container *ngSwitchCase=\"'collection'\">\n <ng-container *ngIf=\"lb.widgets[section.id].ds.out$ | async as collection$\">\n <div *ngIf=\"collection$.items?.length > 0\" class=\"mr-content-block mr-content-block-collection\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content {{ section.grid ? 'n7-grid-' + section.grid : '' }}\">\n <n7-item-preview *ngFor=\"let item of collection$?.items\"\n [data]=\"item\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n </ng-container>\n \n <!-- ITEM PREVIEW -->\n <ng-container *ngSwitchCase=\"'preview'\">\n <div class=\"mr-content-block mr-content-block-item-preview\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-item-preview [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"> \n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n \n <!-- TEXT VIEWER -->\n <ng-container *ngSwitchCase=\"'text-viewer'\">\n <div class=\"mr-content-block mr-content-block-text-viewer\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-text-viewer [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-text-viewer>\n </div>\n </div>\n </ng-container>\n\n <!-- PARALLEL TEXT VIEWER -->\n <ng-container *ngSwitchCase=\"'parallel-text-viewer'\">\n <div class=\"mr-content-block mr-content-block-text-viewer mr-content-block-parallel-text-viewer\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <n7-parallel-text-viewer [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\">\n </n7-parallel-text-viewer>\n </div>\n </div>\n </ng-container>\n\n <!-- MAP -->\n <ng-container *ngSwitchCase=\"'map'\">\n <div class=\"mr-content-block mr-content-block-map\">\n <div class=\"mr-content-block__content\">\n <n7-map [data]=\"lb.widgets[section.id].ds.out$ | async\" [emit]=\"lb.widgets[section.id].emit\"></n7-map>\n </div>\n </div>\n </ng-container>\n \n <!-- INFO BOX -->\n <ng-container *ngSwitchCase=\"'info-box'\">\n <div class=\"mr-content-block mr-content-block-info-box\">\n <h3 *ngIf=\"section.title\" class=\"mr-content-block__title\">\n {{ section.title }}\n </h3>\n <div class=\"mr-content-block__content\">\n <div class=\"info-box__mock\">info-box</div> \n </div>\n </div>\n </ng-container>\n \n <!-- BREADCRUMBS -->\n <ng-container *ngSwitchCase=\"'breadcrumbs'\">\n <n7-breadcrumbs [data]=\"lb.widgets[section.id].ds.out$ | async\">\n </n7-breadcrumbs>\n </ng-container>\n\n </ng-container>\n </section>\n </ng-container>\n</ng-template>\n" }]
5972
6340
  }], ctorParameters: () => [{ type: i1.LayoutsConfigurationService }, { type: i2.ActivatedRoute }, { type: i1.ConfigurationService }, { type: i1.CommunicationService }, { type: i1.MainStateService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: MrLayoutStateService }, { type: MrResourceModalService }, { type: MrLocaleService }] });
5973
6341
 
5974
6342
  class SearchFacetsLayoutDS extends LayoutDataSource {
@@ -8360,5 +8728,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
8360
8728
  * Generated bundle index. Do not edit.
8361
8729
  */
8362
8730
 
8363
- export { DynamicPathGuard, FACETS_REQUEST_STATE_CONTEXT, FACET_STATE_CONTEXT, INPUT_STATE_CONTEXT, LayoutState, LocaleDependenciesGuard, MrAdvancedResultComponent, MrAdvancedResultsLayoutComponent, MrAdvancedResultsLayoutConfig, MrAdvancedResultsLayoutDS, MrAdvancedResultsLayoutEH, MrAdvancedSearchLayoutComponent, MrAdvancedSearchLayoutConfig, MrAdvancedSearchLayoutDS, MrAdvancedSearchLayoutEH, MrAdvancedSearchTagsDS, MrBreadcrumbsDS, MrButtonDS, MrButtonEH, MrCollectionDS, MrCollectionEH, MrContentDS, MrDummyEH, MrFiltersDS, MrFiltersEH, MrFooterService, MrFormComponent, MrFormWrapperAccordionComponent, MrFormWrapperAccordionDS, MrFormWrapperAccordionEH, MrGalleryComponent, MrGalleryDS, MrGalleryEH, MrHeroDS, MrHomeLayoutComponent, MrHomeLayoutConfig, MrHomeLayoutDS, MrHomeLayoutEH, MrImageViewerDS, MrImageViewerIiifDS, MrImageViewerOverlayDetailsDS, MrImageViewerToolsDS, MrInfoBoxDS, MrInnerTitleDS, MrItemPreviewDS, MrItemPreviewsDS, MrItineraryLayoutComponent, MrItineraryLayoutConfig, MrItineraryLayoutDS, MrItineraryLayoutEH, MrLayoutStateService, MrLocaleService, MrMapDS, MrMapEH, MrMapLayoutComponent, MrMapLayoutConfig, MrMapLayoutDS, MrMapLayoutEH, MrMenuService, MrMetadataDS, MrMetadataDynamicComponent, MrMetadataDynamicDS, MrMetadataDynamicEH, MrMetadataReadmoreComponent, MrNavDS, MrNavEH, MrNetworkDS, MrNetworkEH, MrNetworkLayoutComponent, MrNetworkLayoutConfig, MrNetworkLayoutDS, MrNetworkLayoutEH, MrPostsLayoutComponent, MrPostsLayoutConfig, MrPostsLayoutDS, MrPostsLayoutEH, MrResourceLayoutComponent, MrResourceLayoutConfig, MrResourceLayoutDS, MrResourceLayoutEH, MrResourceModalComponent, MrResourceModalService, MrResourceTabsDS, MrSearchFacetsLayoutComponent, MrSearchLayoutComponent, MrSearchLayoutConfig, MrSearchLayoutDS, MrSearchLayoutEH, MrSearchPageDescriptionComponent, MrSearchPageDescriptionDS, MrSearchPageDescriptionEH, MrSearchPageTitleDS, MrSearchPageTitleEH, MrSearchResultsDS, MrSearchResultsEH, MrSearchResultsTitleDS, MrSearchResultsTitleEH, MrSearchService, MrSearchTagsDS, MrSearchTagsEH, MrStaticLayoutComponent, MrStaticLayoutConfig, MrStaticLayoutDS, MrStaticLayoutEH, MrStaticMetadataDS, MrTextViewerDS, MrTextViewerEH, MrTimelineDS, MrTimelineEH, MrTimelineLayoutComponent, MrTimelineLayoutConfig, MrTimelineLayoutDS, MrTimelineLayoutEH, MrTranslationsLoaderService, MrYearHeaderDS, MrYearHeaderEH, N7BoilerplateMurucaModule, RESULTS_REQUEST_STATE_CONTEXT, ReadMoreComponent, SECTION_STATE_CONTEXT, SearchFacetsLayoutConfig, SearchFacetsLayoutDS, SearchFacetsLayoutEH };
8731
+ export { DynamicPathGuard, FACETS_REQUEST_STATE_CONTEXT, FACET_STATE_CONTEXT, INPUT_STATE_CONTEXT, LayoutState, LocaleDependenciesGuard, MrAdvancedResultComponent, MrAdvancedResultsLayoutComponent, MrAdvancedResultsLayoutConfig, MrAdvancedResultsLayoutDS, MrAdvancedResultsLayoutEH, MrAdvancedSearchLayoutComponent, MrAdvancedSearchLayoutConfig, MrAdvancedSearchLayoutDS, MrAdvancedSearchLayoutEH, MrAdvancedSearchTagsDS, MrBreadcrumbsDS, MrButtonDS, MrButtonEH, MrCollectionDS, MrCollectionEH, MrContentDS, MrDummyEH, MrFiltersDS, MrFiltersEH, MrFooterService, MrFormComponent, MrFormWrapperAccordionComponent, MrFormWrapperAccordionDS, MrFormWrapperAccordionEH, MrGalleryComponent, MrGalleryDS, MrGalleryEH, MrHeroDS, MrHomeLayoutComponent, MrHomeLayoutConfig, MrHomeLayoutDS, MrHomeLayoutEH, MrImageViewerDS, MrImageViewerIiifDS, MrImageViewerOverlayDetailsDS, MrImageViewerToolsDS, MrInfoBoxDS, MrInnerTitleDS, MrItemPreviewDS, MrItemPreviewsDS, MrItineraryLayoutComponent, MrItineraryLayoutConfig, MrItineraryLayoutDS, MrItineraryLayoutEH, MrLayoutStateService, MrLocaleService, MrMapDS, MrMapEH, MrMapLayoutComponent, MrMapLayoutConfig, MrMapLayoutDS, MrMapLayoutEH, MrMenuService, MrMetadataDS, MrMetadataDynamicComponent, MrMetadataDynamicDS, MrMetadataDynamicEH, MrMetadataReadmoreComponent, MrNavDS, MrNavEH, MrNetworkDS, MrNetworkEH, MrNetworkLayoutComponent, MrNetworkLayoutConfig, MrNetworkLayoutDS, MrNetworkLayoutEH, MrParallelTextViewerDS, MrParallelTextViewerEH, MrPostsLayoutComponent, MrPostsLayoutConfig, MrPostsLayoutDS, MrPostsLayoutEH, MrResourceLayoutComponent, MrResourceLayoutConfig, MrResourceLayoutDS, MrResourceLayoutEH, MrResourceModalComponent, MrResourceModalService, MrResourceTabsDS, MrSearchFacetsLayoutComponent, MrSearchLayoutComponent, MrSearchLayoutConfig, MrSearchLayoutDS, MrSearchLayoutEH, MrSearchPageDescriptionComponent, MrSearchPageDescriptionDS, MrSearchPageDescriptionEH, MrSearchPageTitleDS, MrSearchPageTitleEH, MrSearchResultsDS, MrSearchResultsEH, MrSearchResultsTitleDS, MrSearchResultsTitleEH, MrSearchService, MrSearchTagsDS, MrSearchTagsEH, MrStaticLayoutComponent, MrStaticLayoutConfig, MrStaticLayoutDS, MrStaticLayoutEH, MrStaticMetadataDS, MrTextViewerDS, MrTextViewerEH, MrTimelineDS, MrTimelineEH, MrTimelineLayoutComponent, MrTimelineLayoutConfig, MrTimelineLayoutDS, MrTimelineLayoutEH, MrTranslationsLoaderService, MrYearHeaderDS, MrYearHeaderEH, N7BoilerplateMurucaModule, RESULTS_REQUEST_STATE_CONTEXT, ReadMoreComponent, SECTION_STATE_CONTEXT, SearchFacetsLayoutConfig, SearchFacetsLayoutDS, SearchFacetsLayoutEH };
8364
8732
  //# sourceMappingURL=net7-boilerplate-muruca.mjs.map