@net7/boilerplate-muruca 5.2.22 → 5.3.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.
- package/esm2022/lib/config-types/muruca/layouts.mjs +1 -1
- package/esm2022/lib/config-types/muruca/sections.mjs +1 -1
- package/esm2022/lib/data-sources/index.mjs +2 -1
- package/esm2022/lib/data-sources/network.ds.mjs +7 -0
- package/esm2022/lib/event-handlers/index.mjs +2 -1
- package/esm2022/lib/event-handlers/network.eh.mjs +6 -0
- package/esm2022/lib/layouts/index.mjs +6 -1
- package/esm2022/lib/layouts/network-layout/network-layout.config.mjs +14 -0
- package/esm2022/lib/layouts/network-layout/network-layout.ds.mjs +87 -0
- package/esm2022/lib/layouts/network-layout/network-layout.eh.mjs +98 -0
- package/esm2022/lib/layouts/network-layout/network-layout.mjs +56 -0
- package/esm2022/lib/layouts/network-layout/network-layouts.types.mjs +2 -0
- package/esm2022/lib/n7-boilerplate-muruca.module.mjs +5 -1
- package/fesm2022/net7-boilerplate-muruca.mjs +253 -1
- package/fesm2022/net7-boilerplate-muruca.mjs.map +1 -1
- package/lib/config-types/muruca/layouts.d.ts +7 -1
- package/lib/config-types/muruca/sections.d.ts +1 -1
- package/lib/data-sources/index.d.ts +1 -0
- package/lib/data-sources/network.ds.d.ts +6 -0
- package/lib/event-handlers/index.d.ts +1 -0
- package/lib/event-handlers/network.eh.d.ts +4 -0
- package/lib/layouts/index.d.ts +4 -0
- package/lib/layouts/network-layout/network-layout.config.d.ts +13 -0
- package/lib/layouts/network-layout/network-layout.d.ts +38 -0
- package/lib/layouts/network-layout/network-layout.ds.d.ts +29 -0
- package/lib/layouts/network-layout/network-layout.eh.d.ts +10 -0
- package/lib/layouts/network-layout/network-layouts.types.d.ts +89 -0
- package/lib/n7-boilerplate-muruca.module.d.ts +20 -19
- package/package.json +1 -1
- package/src/lib/styles/muruca/layouts/_network.scss +107 -0
|
@@ -18,6 +18,7 @@ import * as L from 'leaflet';
|
|
|
18
18
|
import 'leaflet.markercluster';
|
|
19
19
|
import * as dayjs from 'dayjs';
|
|
20
20
|
import tippy from 'tippy.js';
|
|
21
|
+
import { Network } from 'vis-network';
|
|
21
22
|
import * as i1$3 from '@angular/common/http';
|
|
22
23
|
|
|
23
24
|
const hasValue = (value) => {
|
|
@@ -2491,6 +2492,12 @@ class MrGalleryDS extends DataSource {
|
|
|
2491
2492
|
}
|
|
2492
2493
|
}
|
|
2493
2494
|
|
|
2495
|
+
class MrNetworkDS extends DataSource {
|
|
2496
|
+
transform(data) {
|
|
2497
|
+
return data;
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2494
2501
|
class MrSearchPageTitleDS extends DataSource {
|
|
2495
2502
|
transform() {
|
|
2496
2503
|
const { title, description, searchId } = this.options.config;
|
|
@@ -2944,6 +2951,7 @@ var DS = /*#__PURE__*/Object.freeze({
|
|
|
2944
2951
|
MrMetadataDS: MrMetadataDS,
|
|
2945
2952
|
MrMetadataDynamicDS: MrMetadataDynamicDS,
|
|
2946
2953
|
MrNavDS: MrNavDS,
|
|
2954
|
+
MrNetworkDS: MrNetworkDS,
|
|
2947
2955
|
MrResourceTabsDS: MrResourceTabsDS,
|
|
2948
2956
|
MrSearchPageDescriptionDS: MrSearchPageDescriptionDS,
|
|
2949
2957
|
MrSearchPageTitleDS: MrSearchPageTitleDS,
|
|
@@ -3085,6 +3093,11 @@ class MrButtonEH extends EventHandler {
|
|
|
3085
3093
|
}
|
|
3086
3094
|
}
|
|
3087
3095
|
|
|
3096
|
+
class MrNetworkEH extends EventHandler {
|
|
3097
|
+
listen() {
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3088
3101
|
class MrSearchTagsEH extends EventHandler {
|
|
3089
3102
|
listen() {
|
|
3090
3103
|
this.innerEvents$.subscribe(({ type, payload }) => {
|
|
@@ -3257,6 +3270,7 @@ var EH = /*#__PURE__*/Object.freeze({
|
|
|
3257
3270
|
MrMapEH: MrMapEH,
|
|
3258
3271
|
MrMetadataDynamicEH: MrMetadataDynamicEH,
|
|
3259
3272
|
MrNavEH: MrNavEH,
|
|
3273
|
+
MrNetworkEH: MrNetworkEH,
|
|
3260
3274
|
MrSearchPageDescriptionEH: MrSearchPageDescriptionEH,
|
|
3261
3275
|
MrSearchPageTitleEH: MrSearchPageTitleEH,
|
|
3262
3276
|
MrSearchResultsEH: MrSearchResultsEH,
|
|
@@ -4794,6 +4808,241 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
4794
4808
|
args: [{ selector: 'mr-map-layout', template: "<div class=\"mr-map-layout mr-layout\"\n *ngIf=\"lb.dataSource\">\n <div class=\"mr-map-layout__map\">\n <div class=\"mr-map-layout__map-loading\"\n *ngIf=\"lb.dataSource.loading.timeline\">\n </div>\n <n7-map [data]=\"lb.widgets['mr-map'].ds.out$ | async\"></n7-map>\n <!-- <n7-timeline [data]=\"lb.widgets['mr-timeline'].ds.out$ | async\"\n *ngIf=\"!lb.dataSource.loading.timeline\">\n </n7-timeline> -->\n </div>\n\n <div class=\"mr-map-layout__page mr-side-margin\">\n <div class=\"mr-map-layout__date\">\n <n7-inner-title [data]=\"lb.widgets['mr-year-header'].ds.out$ | async\"\n [emit]=\"lb.widgets['mr-year-header'].emit\">\n </n7-inner-title>\n </div>\n <!--\n <h1 class=\"mr-map-layout__title\"\n *ngIf=\"!lb.dataSource.loading.resourceDetails\">\n {{lb.dataSource.eventHeader}}\n </h1>\n -->\n <div class=\"mr-map-layout__content\">\n <!-- DESCRIZIONE -->\n <div class=\"mr-content-block mr-content-block-description\" *ngIf=\"lb.dataSource.eventDescription\">\n <p [innerHTML]=\"lb.dataSource.eventDescription\">\n <p>\n </div>\n <ng-container *ngIf=\"!lb.dataSource.loading.resourceDetails\">\n\n <!-- GALLERIA -->\n <div class=\"mr-content-block n7-grid-6\">\n <ng-container *ngFor=\"let image of lb.dataSource.collectionGalleryData\">\n <a [href]=\"image.image\" class=\"mr-gallery__image\">\n <img [src]=\"image.thumbnail\" alt=\"image.title\">\n </a>\n </ng-container>\n </div>\n\n <!-- BIBLIOGRAFIA -->\n <ng-container *ngIf=\"lb.dataSource.bibliographyData as biblio\">\n <ng-container *ngIf=\"biblio.items && biblio.items.length > 0\">\n <div class=\"mr-content-block mr-content-block-collection\">\n <h3 class=\"mr-content-block__title\">{{ biblio.header.title }}</h3>\n <div class=\"mr-content-block__content n7-grid-1\">\n <ng-container *ngFor=\"let item of biblio.items\">\n <div class=\"mr-map-layout__collection-content\">\n <n7-item-preview [data]=\"item\"></n7-item-preview>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <!-- TESTIMONI -->\n <ng-container *ngIf=\"lb.dataSource.collectionWitnessData as wit\">\n <ng-container *ngIf=\"wit.items && wit.items.length > 0\">\n <div class=\"mr-content-block-collection mr-content-block\">\n <h3 class=\"mr-content-block__title\">{{ wit.header.title }}</h3>\n <div class=\"mr-content-block__content n7-grid-3\">\n <n7-item-preview *ngFor=\"let item of wit.items\"\n [data]=\"item\">\n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <!-- OPERE -->\n <ng-container *ngIf=\"lb.dataSource.collectionWorksData as works\">\n <ng-container *ngIf=\"works.items && works.items.length > 0\">\n <div class=\"mr-content-block-collection mr-content-block\">\n <h3 class=\"mr-content-block__title\">{{ works.header.title }}</h3>\n <div class=\"mr-content-block__content n7-grid-3\">\n <n7-item-preview *ngFor=\"let item of works.items\"\n [data]=\"item\">\n </n7-item-preview>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n </ng-container>\n </div>\n </div>\n</div>\n" }]
|
|
4795
4809
|
}], ctorParameters: () => [{ type: i1.LayoutsConfigurationService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i1$2.Location }, { type: i1.ConfigurationService }, { type: i1.CommunicationService }, { type: i1.MainStateService }, { type: MrLayoutStateService }, { type: MrLocaleService }] });
|
|
4796
4810
|
|
|
4811
|
+
// import { NETWORK_MOCK } from './network-layout-mock';
|
|
4812
|
+
class MrNetworkLayoutDS extends LayoutDataSource {
|
|
4813
|
+
constructor() {
|
|
4814
|
+
super(...arguments);
|
|
4815
|
+
this.loading = {
|
|
4816
|
+
network: false,
|
|
4817
|
+
};
|
|
4818
|
+
this.legend = [];
|
|
4819
|
+
this.showLegend = true;
|
|
4820
|
+
this.networkListener$ = new Subject();
|
|
4821
|
+
}
|
|
4822
|
+
toggleLegend() {
|
|
4823
|
+
this.showLegend = !this.showLegend;
|
|
4824
|
+
}
|
|
4825
|
+
onInit(payload) {
|
|
4826
|
+
this.configuration = payload.configuration;
|
|
4827
|
+
this.communication = payload.communication;
|
|
4828
|
+
this.route = payload.route;
|
|
4829
|
+
this.router = payload.router;
|
|
4830
|
+
this.localeService = payload.localeService;
|
|
4831
|
+
this.location = payload.location;
|
|
4832
|
+
this.configId = payload.configId;
|
|
4833
|
+
this.pageConfig = this.configuration.get(this.configId);
|
|
4834
|
+
const locale = this.localeService.getLocale();
|
|
4835
|
+
// update the network
|
|
4836
|
+
this.loading.network = true;
|
|
4837
|
+
this.communication
|
|
4838
|
+
.request$('network', {
|
|
4839
|
+
method: 'GET',
|
|
4840
|
+
urlParams: locale ? `?locale=${locale}` : '',
|
|
4841
|
+
onError: (e) => console.error(e),
|
|
4842
|
+
})
|
|
4843
|
+
.subscribe((d) => {
|
|
4844
|
+
this.networkData = d;
|
|
4845
|
+
this.loading.network = false;
|
|
4846
|
+
this.one('mr-network').updateOptions({
|
|
4847
|
+
libOptions: this.pageConfig.libOptions,
|
|
4848
|
+
});
|
|
4849
|
+
this.one('mr-network').update(d);
|
|
4850
|
+
this.loading.network = false;
|
|
4851
|
+
this.initializeNetwork();
|
|
4852
|
+
});
|
|
4853
|
+
}
|
|
4854
|
+
initializeNetwork() {
|
|
4855
|
+
setTimeout(() => {
|
|
4856
|
+
const container = document.getElementById('demo-network');
|
|
4857
|
+
if (!container) {
|
|
4858
|
+
console.error('Container non trovato');
|
|
4859
|
+
return;
|
|
4860
|
+
}
|
|
4861
|
+
try {
|
|
4862
|
+
const { nodes } = this.networkData;
|
|
4863
|
+
const { edges } = this.networkData;
|
|
4864
|
+
const networkGroups = this.networkData?.groups || {};
|
|
4865
|
+
const options = this.pageConfig.libOptions;
|
|
4866
|
+
const mergedGroups = {
|
|
4867
|
+
...networkGroups,
|
|
4868
|
+
...(options?.groups || {})
|
|
4869
|
+
};
|
|
4870
|
+
// legenda
|
|
4871
|
+
this.legend = [];
|
|
4872
|
+
Object.keys(mergedGroups).forEach((key) => {
|
|
4873
|
+
const group = mergedGroups[key];
|
|
4874
|
+
this.legend.push({
|
|
4875
|
+
key,
|
|
4876
|
+
label: group.label || key,
|
|
4877
|
+
color: group.color || '#cccccc'
|
|
4878
|
+
});
|
|
4879
|
+
});
|
|
4880
|
+
const libOptions = {
|
|
4881
|
+
...options,
|
|
4882
|
+
groups: mergedGroups
|
|
4883
|
+
};
|
|
4884
|
+
const network = new Network(container, { nodes, edges }, libOptions);
|
|
4885
|
+
this.networkListener$.next(network);
|
|
4886
|
+
}
|
|
4887
|
+
catch (error) {
|
|
4888
|
+
console.error('Errore inizializzazione', error);
|
|
4889
|
+
}
|
|
4890
|
+
}, 100);
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4893
|
+
|
|
4894
|
+
class MrNetworkLayoutEH extends EventHandler {
|
|
4895
|
+
constructor() {
|
|
4896
|
+
super(...arguments);
|
|
4897
|
+
this.itemPreviewEmit = (type, payload) => {
|
|
4898
|
+
if (type === 'click' && payload?.action === 'resource-modal') {
|
|
4899
|
+
const { id, type: resourceType } = payload;
|
|
4900
|
+
this.modalService.open(id, resourceType);
|
|
4901
|
+
}
|
|
4902
|
+
};
|
|
4903
|
+
}
|
|
4904
|
+
listen() {
|
|
4905
|
+
this.innerEvents$.subscribe(({ type, payload }) => {
|
|
4906
|
+
switch (type) {
|
|
4907
|
+
case 'mr-network-layout.init':
|
|
4908
|
+
this.dataSource.onInit(payload);
|
|
4909
|
+
this.modalService = payload.modalService;
|
|
4910
|
+
this.route = payload.route;
|
|
4911
|
+
this.router = payload.router;
|
|
4912
|
+
this.localeService = payload.localeService;
|
|
4913
|
+
this.location = payload.location;
|
|
4914
|
+
// scroll top
|
|
4915
|
+
window.scrollTo(0, 0);
|
|
4916
|
+
this.dataSource.networkListener$.subscribe((network) => {
|
|
4917
|
+
network.on('click', (props) => {
|
|
4918
|
+
if (props.nodes && props.nodes.length > 0) {
|
|
4919
|
+
const nodeId = props.nodes[0];
|
|
4920
|
+
const node = this.dataSource.networkData.nodes.find((n) => n.id === nodeId);
|
|
4921
|
+
// gestione payload
|
|
4922
|
+
if (node?.payload) {
|
|
4923
|
+
let anchor = null;
|
|
4924
|
+
// Navigazione interna
|
|
4925
|
+
if (node?.payload?.link?.routeId) {
|
|
4926
|
+
const routeLink = this.localeService.getLinkByRouteId((node.payload.link.routeId).replace(/^mrc_/, ''), node.payload.link.id, node.payload.link.slug);
|
|
4927
|
+
anchor = {
|
|
4928
|
+
href: routeLink,
|
|
4929
|
+
queryParams: node.payload.link.params || null,
|
|
4930
|
+
};
|
|
4931
|
+
// link semplice
|
|
4932
|
+
}
|
|
4933
|
+
else if (node?.payload?.link && typeof node?.payload?.link === 'string') {
|
|
4934
|
+
anchor = {
|
|
4935
|
+
href: linksHelper.getRouterLink(node.payload.link),
|
|
4936
|
+
queryParams: linksHelper.getQueryParams(node.payload.link),
|
|
4937
|
+
};
|
|
4938
|
+
// link complesso
|
|
4939
|
+
}
|
|
4940
|
+
else if (node?.payload?.link && typeof node?.payload?.link === 'object') {
|
|
4941
|
+
let href = '';
|
|
4942
|
+
if (node.payload.link.absolute) {
|
|
4943
|
+
href = `${node.payload.link.absolute}`;
|
|
4944
|
+
}
|
|
4945
|
+
else if (node.payload.link.relative) {
|
|
4946
|
+
href = node.payload.link.relative;
|
|
4947
|
+
}
|
|
4948
|
+
if (href && node.payload.link.params) {
|
|
4949
|
+
href = linksHelper.joinQueryParams(href, [node.payload.link.params]);
|
|
4950
|
+
}
|
|
4951
|
+
if (href && node.payload.link.query_string) {
|
|
4952
|
+
href = linksHelper.joinQueryParams(href, [document.location.search]);
|
|
4953
|
+
}
|
|
4954
|
+
anchor = {
|
|
4955
|
+
href,
|
|
4956
|
+
queryParams: null,
|
|
4957
|
+
};
|
|
4958
|
+
// altro
|
|
4959
|
+
}
|
|
4960
|
+
else if (node.payload.payload) {
|
|
4961
|
+
anchor = {
|
|
4962
|
+
payload: {
|
|
4963
|
+
...node.payload.payload
|
|
4964
|
+
}
|
|
4965
|
+
};
|
|
4966
|
+
}
|
|
4967
|
+
if (anchor) {
|
|
4968
|
+
if (anchor.href) {
|
|
4969
|
+
window.open(anchor.href, '_blank');
|
|
4970
|
+
}
|
|
4971
|
+
else if (anchor.payload) {
|
|
4972
|
+
this.itemPreviewEmit('click', anchor.payload);
|
|
4973
|
+
}
|
|
4974
|
+
}
|
|
4975
|
+
}
|
|
4976
|
+
}
|
|
4977
|
+
});
|
|
4978
|
+
});
|
|
4979
|
+
break;
|
|
4980
|
+
case 'mr-network-layout.destroy':
|
|
4981
|
+
break;
|
|
4982
|
+
default:
|
|
4983
|
+
console.warn('unhandled inner event of type', type);
|
|
4984
|
+
break;
|
|
4985
|
+
}
|
|
4986
|
+
});
|
|
4987
|
+
}
|
|
4988
|
+
}
|
|
4989
|
+
|
|
4990
|
+
const MrNetworkLayoutConfig = {
|
|
4991
|
+
layoutId: 'mr-network-layout',
|
|
4992
|
+
widgets: [],
|
|
4993
|
+
layoutDS: MrNetworkLayoutDS,
|
|
4994
|
+
layoutEH: MrNetworkLayoutEH,
|
|
4995
|
+
widgetsDataSources: DS,
|
|
4996
|
+
widgetsEventHandlers: EH,
|
|
4997
|
+
options: {},
|
|
4998
|
+
};
|
|
4999
|
+
|
|
5000
|
+
class MrNetworkLayoutComponent extends AbstractLayout {
|
|
5001
|
+
constructor(layoutsConfiguration, route, router, configuration, communication, mainState, layoutState, modalService, localeService, location) {
|
|
5002
|
+
super(layoutsConfiguration.get('MrNetworkLayoutConfig') || MrNetworkLayoutConfig);
|
|
5003
|
+
this.route = route;
|
|
5004
|
+
this.router = router;
|
|
5005
|
+
this.configuration = configuration;
|
|
5006
|
+
this.communication = communication;
|
|
5007
|
+
this.mainState = mainState;
|
|
5008
|
+
this.layoutState = layoutState;
|
|
5009
|
+
this.modalService = modalService;
|
|
5010
|
+
this.localeService = localeService;
|
|
5011
|
+
this.location = location;
|
|
5012
|
+
}
|
|
5013
|
+
initPayload() {
|
|
5014
|
+
return {
|
|
5015
|
+
configId: this.configId,
|
|
5016
|
+
mainState: this.mainState,
|
|
5017
|
+
configuration: this.configuration,
|
|
5018
|
+
communication: this.communication,
|
|
5019
|
+
layoutState: this.layoutState,
|
|
5020
|
+
modalService: this.modalService,
|
|
5021
|
+
route: this.route,
|
|
5022
|
+
router: this.router,
|
|
5023
|
+
localeService: this.localeService,
|
|
5024
|
+
location: this.location,
|
|
5025
|
+
options: this.config.options || {}
|
|
5026
|
+
};
|
|
5027
|
+
}
|
|
5028
|
+
ngOnInit() {
|
|
5029
|
+
this.route.data.subscribe((data) => {
|
|
5030
|
+
this.layoutState.add('content');
|
|
5031
|
+
this.configId = data.configId;
|
|
5032
|
+
this.onInit();
|
|
5033
|
+
});
|
|
5034
|
+
}
|
|
5035
|
+
ngOnDestroy() {
|
|
5036
|
+
this.onDestroy();
|
|
5037
|
+
}
|
|
5038
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MrNetworkLayoutComponent, deps: [{ token: i1.LayoutsConfigurationService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1.ConfigurationService }, { token: i1.CommunicationService }, { token: i1.MainStateService }, { token: MrLayoutStateService }, { token: MrResourceModalService }, { token: MrLocaleService }, { token: i1$2.Location }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5039
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MrNetworkLayoutComponent, selector: "mr-network-layout", usesInheritance: true, ngImport: i0, template: "<div class=\"network-layout-container\" *ngIf=\"lb.dataSource\">\n <div class=\"network-header\">\n <h2>{{ lb.dataSource.pageConfig?.title}}</h2>\n <p>{{ lb.dataSource.pageConfig?.mapHeader }}</p>\n </div>\n \n <div class=\"network-legend-section\" *ngIf=\"lb.dataSource.legend?.length\">\n <div class=\"legend-toggle\">\n <button \n class=\"legend-toggle-btn\" \n (click)=\"lb.dataSource.toggleLegend()\"\n [class.active]=\"lb.dataSource.showLegend\">\n <span class=\"toggle-icon\">{{ lb.dataSource.showLegend ? '\u2212' : '+' }}</span>\n Legenda\n </button>\n </div>\n \n <div class=\"network-legend\" *ngIf=\"lb.dataSource.showLegend\">\n <div class=\"legend-item\" *ngFor=\"let item of lb.dataSource.legend\">\n <span class=\"legend-color\" [style.background-color]=\"item.color\"></span>\n <span>{{ item.label }}</span>\n </div>\n </div>\n </div>\n \n <div id=\"demo-network\" class=\"network-visualization\"></div>\n</div>", styles: [".network-layout-container{padding:20px;font-family:Arial,sans-serif;max-width:1200px;margin:0 auto}.network-header{text-align:center;margin-bottom:30px}.network-header h2{color:#333;margin-bottom:10px;font-size:2rem}.network-header p{color:#666;font-size:1.1rem}.network-legend-section{margin-bottom:25px}.network-legend-section .legend-toggle{display:flex;justify-content:center;margin-bottom:15px}.network-legend-section .legend-toggle .legend-toggle-btn{display:flex;align-items:center;gap:8px;padding:8px 16px;background-color:#f8f9fa;border:1px solid #dee2e6;border-radius:20px;cursor:pointer;font-size:14px;color:#333;transition:all .2s ease}.network-legend-section .legend-toggle .legend-toggle-btn:hover{background-color:#e9ecef;border-color:#adb5bd}.network-legend-section .legend-toggle .legend-toggle-btn.active{background-color:#007bff;color:#fff;border-color:#007bff}.network-legend-section .legend-toggle .legend-toggle-btn .toggle-icon{font-weight:700;font-size:16px;line-height:1}.network-legend{display:flex;justify-content:center;margin-bottom:25px;gap:30px;flex-wrap:wrap}.network-legend .legend-item{display:flex;align-items:center;gap:10px;padding:8px 12px;background-color:#f8f9fa;border-radius:20px;border:1px solid #dee2e6}.network-legend .legend-item .legend-color{width:24px;height:24px;border-radius:50%;display:inline-block;border:2px solid #ffffff;box-shadow:0 2px 4px #0000001a}.network-legend .legend-item span:last-child{font-weight:500;color:#333}.network-visualization{width:100%;height:700px;border:2px solid #e9ecef;border-radius:12px;margin-bottom:30px;background-color:#fff;box-shadow:0 4px 12px #0000001a;overflow:hidden}\n"], dependencies: [{ 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"] }] }); }
|
|
5040
|
+
}
|
|
5041
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MrNetworkLayoutComponent, decorators: [{
|
|
5042
|
+
type: Component,
|
|
5043
|
+
args: [{ selector: 'mr-network-layout', template: "<div class=\"network-layout-container\" *ngIf=\"lb.dataSource\">\n <div class=\"network-header\">\n <h2>{{ lb.dataSource.pageConfig?.title}}</h2>\n <p>{{ lb.dataSource.pageConfig?.mapHeader }}</p>\n </div>\n \n <div class=\"network-legend-section\" *ngIf=\"lb.dataSource.legend?.length\">\n <div class=\"legend-toggle\">\n <button \n class=\"legend-toggle-btn\" \n (click)=\"lb.dataSource.toggleLegend()\"\n [class.active]=\"lb.dataSource.showLegend\">\n <span class=\"toggle-icon\">{{ lb.dataSource.showLegend ? '\u2212' : '+' }}</span>\n Legenda\n </button>\n </div>\n \n <div class=\"network-legend\" *ngIf=\"lb.dataSource.showLegend\">\n <div class=\"legend-item\" *ngFor=\"let item of lb.dataSource.legend\">\n <span class=\"legend-color\" [style.background-color]=\"item.color\"></span>\n <span>{{ item.label }}</span>\n </div>\n </div>\n </div>\n \n <div id=\"demo-network\" class=\"network-visualization\"></div>\n</div>", styles: [".network-layout-container{padding:20px;font-family:Arial,sans-serif;max-width:1200px;margin:0 auto}.network-header{text-align:center;margin-bottom:30px}.network-header h2{color:#333;margin-bottom:10px;font-size:2rem}.network-header p{color:#666;font-size:1.1rem}.network-legend-section{margin-bottom:25px}.network-legend-section .legend-toggle{display:flex;justify-content:center;margin-bottom:15px}.network-legend-section .legend-toggle .legend-toggle-btn{display:flex;align-items:center;gap:8px;padding:8px 16px;background-color:#f8f9fa;border:1px solid #dee2e6;border-radius:20px;cursor:pointer;font-size:14px;color:#333;transition:all .2s ease}.network-legend-section .legend-toggle .legend-toggle-btn:hover{background-color:#e9ecef;border-color:#adb5bd}.network-legend-section .legend-toggle .legend-toggle-btn.active{background-color:#007bff;color:#fff;border-color:#007bff}.network-legend-section .legend-toggle .legend-toggle-btn .toggle-icon{font-weight:700;font-size:16px;line-height:1}.network-legend{display:flex;justify-content:center;margin-bottom:25px;gap:30px;flex-wrap:wrap}.network-legend .legend-item{display:flex;align-items:center;gap:10px;padding:8px 12px;background-color:#f8f9fa;border-radius:20px;border:1px solid #dee2e6}.network-legend .legend-item .legend-color{width:24px;height:24px;border-radius:50%;display:inline-block;border:2px solid #ffffff;box-shadow:0 2px 4px #0000001a}.network-legend .legend-item span:last-child{font-weight:500;color:#333}.network-visualization{width:100%;height:700px;border:2px solid #e9ecef;border-radius:12px;margin-bottom:30px;background-color:#fff;box-shadow:0 4px 12px #0000001a;overflow:hidden}\n"] }]
|
|
5044
|
+
}], ctorParameters: () => [{ type: i1.LayoutsConfigurationService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i1.ConfigurationService }, { type: i1.CommunicationService }, { type: i1.MainStateService }, { type: MrLayoutStateService }, { type: MrResourceModalService }, { type: MrLocaleService }, { type: i1$2.Location }] });
|
|
5045
|
+
|
|
4797
5046
|
class MrPostsLayoutDS extends LayoutDataSource {
|
|
4798
5047
|
onInit(payload) {
|
|
4799
5048
|
this.configuration = payload.configuration;
|
|
@@ -7672,6 +7921,7 @@ const COMPONENTS = [
|
|
|
7672
7921
|
MrHomeLayoutComponent,
|
|
7673
7922
|
MrItineraryLayoutComponent,
|
|
7674
7923
|
MrMapLayoutComponent,
|
|
7924
|
+
MrNetworkLayoutComponent,
|
|
7675
7925
|
MrMetadataReadmoreComponent,
|
|
7676
7926
|
MrPostsLayoutComponent,
|
|
7677
7927
|
MrResourceLayoutComponent,
|
|
@@ -7716,6 +7966,7 @@ class N7BoilerplateMurucaModule {
|
|
|
7716
7966
|
MrHomeLayoutComponent,
|
|
7717
7967
|
MrItineraryLayoutComponent,
|
|
7718
7968
|
MrMapLayoutComponent,
|
|
7969
|
+
MrNetworkLayoutComponent,
|
|
7719
7970
|
MrMetadataReadmoreComponent,
|
|
7720
7971
|
MrPostsLayoutComponent,
|
|
7721
7972
|
MrResourceLayoutComponent,
|
|
@@ -7740,6 +7991,7 @@ class N7BoilerplateMurucaModule {
|
|
|
7740
7991
|
MrHomeLayoutComponent,
|
|
7741
7992
|
MrItineraryLayoutComponent,
|
|
7742
7993
|
MrMapLayoutComponent,
|
|
7994
|
+
MrNetworkLayoutComponent,
|
|
7743
7995
|
MrMetadataReadmoreComponent,
|
|
7744
7996
|
MrPostsLayoutComponent,
|
|
7745
7997
|
MrResourceLayoutComponent,
|
|
@@ -8051,5 +8303,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
8051
8303
|
* Generated bundle index. Do not edit.
|
|
8052
8304
|
*/
|
|
8053
8305
|
|
|
8054
|
-
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, 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 };
|
|
8306
|
+
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 };
|
|
8055
8307
|
//# sourceMappingURL=net7-boilerplate-muruca.mjs.map
|