@net7/boilerplate-muruca 5.3.5 → 5.4.1

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,358 @@ 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
+ const insideTeiApp = clickPath.find((el) => el.className
2699
+ && typeof el.className === 'string'
2700
+ && el.className.includes('tei-app'));
2701
+ if (insideTeiApp && insideTeiApp.style.display === 'block') {
2702
+ return;
2703
+ }
2704
+ // Chiusura note con tasto
2705
+ const closeNoteButton = clickPath.find((el) => el.className
2706
+ && typeof el.className === 'string'
2707
+ && el.className.includes('close_note'));
2708
+ if (closeNoteButton) {
2709
+ // console.log('Click rilevato sul bottone di chiusura nota:', closeNoteButton);
2710
+ const parentNoteItem = closeNoteButton.closest('.note-item');
2711
+ if (parentNoteItem && parentNoteItem.style) {
2712
+ // console.log('Chiusura dell\'elemento note-item');
2713
+ parentNoteItem.style.display = 'none';
2714
+ parentNoteItem.style.transform = '';
2715
+ payload.stopPropagation();
2716
+ return;
2717
+ }
2718
+ }
2719
+ if (payload.path) {
2720
+ target = payload.path.find(({ tagName }) => tagName === 'PB-HIGHLIGHT');
2721
+ }
2722
+ else {
2723
+ target = payload.composedPath().find(({ tagName }) => tagName === 'PB-HIGHLIGHT');
2724
+ }
2725
+ if (target && target.getAttribute('type') === 'app_lem') {
2726
+ const appId = target.getAttribute('key');
2727
+ // console.log('appId:', appId);
2728
+ // Posizione elemento cliccato
2729
+ const clickedElementPosition = target.getBoundingClientRect().top;
2730
+ const apparatusView = document.querySelectorAll('.n7-parallel-text-viewer [id$="-view"]');
2731
+ // console.log('Numero di view trovate:', apparatusView.length);
2732
+ let anchorElement = null;
2733
+ let teiAppElement = null;
2734
+ apparatusView.forEach((view) => {
2735
+ if (view.shadowRoot) {
2736
+ const found = view.shadowRoot.querySelector(`[id="${appId}"]`);
2737
+ if (found) {
2738
+ if (!anchorElement) {
2739
+ anchorElement = found;
2740
+ }
2741
+ const appElement = found.closest('.tei-app');
2742
+ if (appElement && !teiAppElement) {
2743
+ teiAppElement = appElement;
2744
+ }
2745
+ }
2746
+ }
2747
+ });
2748
+ if (teiAppElement) {
2749
+ const isVisible = teiAppElement.style.display === 'block';
2750
+ if (isVisible) {
2751
+ teiAppElement.style.display = 'none';
2752
+ teiAppElement.style.transform = '';
2753
+ }
2754
+ else {
2755
+ teiAppElement.style.display = 'block';
2756
+ // posizione attuale
2757
+ const elementPosition = teiAppElement.getBoundingClientRect().top;
2758
+ // differenza
2759
+ const positionDifference = clickedElementPosition - elementPosition;
2760
+ // spostamento
2761
+ teiAppElement.style.transform = `translateY(${positionDifference}px)`;
2762
+ }
2763
+ }
2764
+ else {
2765
+ console.warn('teiAppElement non trovato!');
2766
+ }
2767
+ }
2768
+ else if (target && target.getAttribute('type') === 'note_line') {
2769
+ const noteId = target.getAttribute('key');
2770
+ // console.log('noteId', noteId);
2771
+ const clickedElementPosition = target.getBoundingClientRect().top;
2772
+ const apparatusView = document.querySelector('.n7-text-viewer #apparato-view');
2773
+ const anchorElement = apparatusView
2774
+ ?.shadowRoot
2775
+ ?.querySelector(`#${noteId}`);
2776
+ const teiNoteElement = anchorElement
2777
+ ? anchorElement.closest('.note-item')
2778
+ : null;
2779
+ if (teiNoteElement) {
2780
+ // Verifica se è visibile
2781
+ const isVisible = teiNoteElement.style.display === 'block';
2782
+ if (isVisible) {
2783
+ teiNoteElement.style.display = 'none';
2784
+ teiNoteElement.style.transform = '';
2785
+ }
2786
+ else {
2787
+ teiNoteElement.style.display = 'block';
2788
+ // posizione attuale
2789
+ const elementPosition = teiNoteElement.getBoundingClientRect().top;
2790
+ // differenza
2791
+ const positionDifference = clickedElementPosition - elementPosition;
2792
+ // spostamento
2793
+ teiNoteElement.style.transform = `translateY(${positionDifference}px)`;
2794
+ }
2795
+ }
2796
+ }
2797
+ else if (target && this.output.toggleColumn === false) {
2798
+ if (target.__key
2799
+ && (target.className.includes('person')
2800
+ || target.className.includes('place'))) {
2801
+ this.output.toggleColumn = true;
2802
+ this.scrollElementsIntoView(target, 'entity', '#text-viewer-index');
2803
+ }
2804
+ }
2805
+ else
2806
+ this.output.toggleColumn = false;
2807
+ }
2808
+ viewListenerUpdate() {
2809
+ document.addEventListener('pb-start-update', function _listener() {
2810
+ document.removeEventListener('pb-start-update', _listener, true);
2811
+ }, true);
2812
+ }
2813
+ changeView(view, refresh) {
2814
+ setTimeout((v, r) => {
2815
+ // console.log(`TEST CHANGE VIEW: ${view}`);
2816
+ document.dispatchEvent(new CustomEvent('pb-toggle', {
2817
+ detail: {
2818
+ properties: {
2819
+ view: v,
2820
+ },
2821
+ action: r ? 'refresh' : '',
2822
+ key: 'transcription',
2823
+ },
2824
+ }));
2825
+ }, 600, view, refresh);
2826
+ }
2827
+ scrollElementsIntoView(target, type, view) {
2828
+ setTimeout(() => {
2829
+ let element;
2830
+ if (type === 'chapter') {
2831
+ if (document
2832
+ .querySelector('.n7-text-viewer #view0')
2833
+ .shadowRoot.querySelector('pb-highlight')) {
2834
+ const highlight = document
2835
+ .querySelector('.n7-text-viewer #view0')
2836
+ .shadowRoot.querySelectorAll('pb-highlight');
2837
+ const highlightId = highlight[highlight.length - 1].id; // s.x
2838
+ const fragmentNumber = highlightId.replace('.', '\\.');
2839
+ element = document
2840
+ .querySelector(view)
2841
+ .shadowRoot.querySelector(`#${fragmentNumber}`);
2842
+ }
2843
+ }
2844
+ else if (type === 'entity') {
2845
+ const key = target.__key;
2846
+ element = document
2847
+ .querySelector(`.n7-text-viewer ${view}`)
2848
+ .shadowRoot.querySelector(`#${key}`);
2849
+ }
2850
+ else if (type === 'hq') {
2851
+ element = document
2852
+ .querySelector(`.n7-text-viewer ${view}`)
2853
+ .shadowRoot.querySelector('.tei-em');
2854
+ }
2855
+ const container = document.querySelector(`.n7-text-viewer ${view}`);
2856
+ if (element) {
2857
+ container.scrollTop = element.offsetTop;
2858
+ }
2859
+ }, 600);
2860
+ }
2861
+ }
2862
+
2511
2863
  class MrSearchPageTitleDS extends DataSource {
2512
2864
  transform() {
2513
2865
  const { title, description, searchId } = this.options.config;
@@ -2963,6 +3315,7 @@ var DS = /*#__PURE__*/Object.freeze({
2963
3315
  MrMetadataDynamicDS: MrMetadataDynamicDS,
2964
3316
  MrNavDS: MrNavDS,
2965
3317
  MrNetworkDS: MrNetworkDS,
3318
+ MrParallelTextViewerDS: MrParallelTextViewerDS,
2966
3319
  MrResourceTabsDS: MrResourceTabsDS,
2967
3320
  MrSearchPageDescriptionDS: MrSearchPageDescriptionDS,
2968
3321
  MrSearchPageTitleDS: MrSearchPageTitleDS,
@@ -3109,6 +3462,24 @@ class MrNetworkEH extends EventHandler {
3109
3462
  }
3110
3463
  }
3111
3464
 
3465
+ class MrParallelTextViewerEH extends EventHandler {
3466
+ listen() {
3467
+ this.innerEvents$.subscribe(({ type, payload }) => {
3468
+ switch (type) {
3469
+ case `${this.hostId}.click`:
3470
+ this.dataSource.onClick(payload);
3471
+ break;
3472
+ case `${this.hostId}.togglecolumn`:
3473
+ this.dataSource.displayIndex();
3474
+ break;
3475
+ default:
3476
+ // console.warn('unhandled event of type', type);
3477
+ break;
3478
+ }
3479
+ });
3480
+ }
3481
+ }
3482
+
3112
3483
  class MrSearchTagsEH extends EventHandler {
3113
3484
  listen() {
3114
3485
  this.innerEvents$.subscribe(({ type, payload }) => {
@@ -3282,6 +3653,7 @@ var EH = /*#__PURE__*/Object.freeze({
3282
3653
  MrMetadataDynamicEH: MrMetadataDynamicEH,
3283
3654
  MrNavEH: MrNavEH,
3284
3655
  MrNetworkEH: MrNetworkEH,
3656
+ MrParallelTextViewerEH: MrParallelTextViewerEH,
3285
3657
  MrSearchPageDescriptionEH: MrSearchPageDescriptionEH,
3286
3658
  MrSearchPageTitleEH: MrSearchPageTitleEH,
3287
3659
  MrSearchResultsEH: MrSearchResultsEH,
@@ -5857,6 +6229,7 @@ const DATASOURCE_MAP$3 = {
5857
6229
  'viewer-tools': MrImageViewerToolsDS,
5858
6230
  'viewer-overlay-details': MrImageViewerOverlayDetailsDS,
5859
6231
  'text-viewer': MrTextViewerDS,
6232
+ 'parallel-text-viewer': MrParallelTextViewerDS,
5860
6233
  'metadata-dynamic': MrMetadataDynamicDS,
5861
6234
  'viewer-iiif': MrImageViewerIiifDS,
5862
6235
  };
@@ -5865,6 +6238,7 @@ const EVENTHANDLER_MAP$2 = {
5865
6238
  'viewer-tools': MrImageViewerToolsEH,
5866
6239
  'viewer-overlay-details': MrImageViewerOverlayDetailsEH,
5867
6240
  'text-viewer': MrTextViewerEH,
6241
+ 'parallel-text-viewer': MrParallelTextViewerEH,
5868
6242
  collection: MrCollectionEH,
5869
6243
  'metadata-dynamic': MrMetadataDynamicEH,
5870
6244
  button: MrButtonEH,
@@ -5964,11 +6338,11 @@ class MrResourceLayoutComponent extends AbstractLayout {
5964
6338
  }
5965
6339
  }
5966
6340
  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" }] }); }
6341
+ 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
6342
  }
5969
6343
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MrResourceLayoutComponent, decorators: [{
5970
6344
  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" }]
6345
+ 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
6346
  }], 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
6347
 
5974
6348
  class SearchFacetsLayoutDS extends LayoutDataSource {
@@ -8360,5 +8734,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
8360
8734
  * Generated bundle index. Do not edit.
8361
8735
  */
8362
8736
 
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 };
8737
+ 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
8738
  //# sourceMappingURL=net7-boilerplate-muruca.mjs.map