@esfaenza/core 19.2.45 → 19.2.46

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.
@@ -6,6 +6,7 @@ import 'jquery-slimscroll';
6
6
  import * as i2 from '@angular/router';
7
7
  import { RouterLinkWithHref } from '@angular/router';
8
8
  import { EMBEDDED_ROUTE, ROUTE } from '@esfaenza/core/domain';
9
+ import { take } from 'rxjs';
9
10
  import * as i3 from '@angular/common';
10
11
  import { ModalDirective } from 'ngx-bootstrap/modal';
11
12
 
@@ -98,24 +99,29 @@ class esRouterLinkWithHref extends RouterLinkWithHref {
98
99
  this.emb = emb;
99
100
  }
100
101
  set esRouterLink(commandsOrUrlTree) {
101
- let BasePath = "/" + (this.emb.Embedded ? EMBEDDED_ROUTE : ROUTE);
102
102
  // UrlTree non è supportato because fuck you
103
- if (commandsOrUrlTree != null) {
104
- this.routerLinkInput = Array.isArray(commandsOrUrlTree) ? commandsOrUrlTree : [commandsOrUrlTree];
105
- let route = this.routerLinkInput[0];
106
- if (!route.startsWith("/" + EMBEDDED_ROUTE) && !route.startsWith("/" + ROUTE))
107
- this.routerLinkInput[0] = BasePath + this.routerLinkInput[0];
108
- this.setTabIndexIfNotOnNativeEl('0');
109
- }
110
- else {
111
- this.routerLinkInput = null;
112
- this.setTabIndexIfNotOnNativeEl(null);
113
- }
103
+ this.emb.EmbeddingSource.pipe(take(1)).subscribe(s => {
104
+ this.EmbeddingSource = s;
105
+ if (this.emb.Embedded && !s)
106
+ console.error("Link creato in contesto di embedding ma senza embedding source!!");
107
+ let BasePath = "/" + (this.emb.Embedded ? EMBEDDED_ROUTE + (!!s ? "/" + s : "") : ROUTE);
108
+ if (commandsOrUrlTree != null) {
109
+ this.routerLinkInput = Array.isArray(commandsOrUrlTree) ? commandsOrUrlTree : [commandsOrUrlTree];
110
+ let route = this.routerLinkInput[0];
111
+ if (!route.startsWith("/" + EMBEDDED_ROUTE) && !route.startsWith("/" + ROUTE))
112
+ this.routerLinkInput[0] = BasePath + this.routerLinkInput[0];
113
+ this.setTabIndexIfNotOnNativeEl('0');
114
+ }
115
+ else {
116
+ this.routerLinkInput = null;
117
+ this.setTabIndexIfNotOnNativeEl(null);
118
+ }
119
+ });
114
120
  }
115
121
  onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
116
122
  if (this.emb.Embedded) {
117
- let url = this.urlTree.toString().replace(EMBEDDED_ROUTE, ROUTE + "/embed/" + myconfig.AppData.ModuleId);
118
- this.emb.MainWindow.postMessage({ type: "navigate", url, newTab: ctrlKey, replaceState: !ctrlKey }, "*");
123
+ let url = this.urlTree.toString().replace(EMBEDDED_ROUTE + (!!this.EmbeddingSource ? "/" + this.EmbeddingSource : ""), ROUTE + "/embed/" + myconfig.AppData.ModuleId);
124
+ this.emb.MainWindow.postMessage({ type: "navigate", url, newTab: ctrlKey, replaceState: !ctrlKey, current: this.router.url }, "*");
119
125
  if (!ctrlKey)
120
126
  return super.onClick(button, ctrlKey, shiftKey, altKey, metaKey);
121
127
  else
@@ -1 +1 @@
1
- {"version":3,"file":"esfaenza-core-directives.mjs","sources":["../../../projects/core/directives/src/draggable/draggable.directive.ts","../../../projects/core/directives/src/slim-scroll/slim-scroll.directive.ts","../../../projects/core/directives/src/es-routerLink/es-routerLink.directive.ts","../../../projects/core/directives/src/widget/widget.directive.ts","../../../projects/core/directives/src/componentHost/componentHost.directive.ts","../../../projects/core/directives/src/es-modal/es-modal.directive.ts","../../../projects/core/directives/src/directives.module.ts","../../../projects/core/directives/src/esfaenza-core-directives.ts"],"sourcesContent":["// Angular\r\nimport { Directive, ElementRef, Input, NgZone } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { AppEmbeddingExtensions } from \"@esfaenza/extensions\";\r\n\r\ndeclare var jQuery;\r\n\r\n@Directive({\r\n selector: \"[emaDraggable]\",\r\n standalone: true\r\n})\r\nexport class Draggable {\r\n @Input('emaDraggable') handlerSelector: string;\r\n\r\n constructor(private _elementRef: ElementRef, private zone: NgZone, private emb: AppEmbeddingExtensions) { }\r\n\r\n ngOnInit() {\r\n this.zone.runOutsideAngular(() => {\r\n var handle = this.handlerSelector || '.modal-header';\r\n jQuery(this._elementRef.nativeElement).children(':first-child').draggable({\r\n handle,\r\n helper: function (_, __) {\r\n var oBody = jQuery(document).find('body');\r\n var containmentDiv = jQuery('<div id=\"div_containment\"></div>');\r\n containmentDiv\r\n .css('z-index', \"-99999\")\r\n .css('top', \"0\")\r\n .css('left', \"0\")\r\n .css('width', \"100%\")\r\n .css('height', \"100%\")\r\n .css('position', 'absolute');\r\n containmentDiv.appendTo(oBody);\r\n return this;\r\n },\r\n stop: function (_, __) {\r\n jQuery(document).filter('body').find('#div_containment').remove();\r\n },\r\n containment: this.emb.Embedded ? \"#div_containment\" : null\r\n });\r\n });\r\n }\r\n}","// Angular\r\nimport { Directive, ElementRef, Input, NgZone } from \"@angular/core\";\r\n\r\n// Direttive, Componenti, Librerie\r\nimport \"jquery-slimscroll\";\r\n\r\ndeclare var jQuery;\r\n\r\n@Directive({\r\n selector: \"[slim-scroll]\",\r\n standalone: true\r\n})\r\nexport class SlimScroll {\r\n @Input() public slimScrollOptions: Object;\r\n\r\n constructor(private _elementRef: ElementRef, private zone: NgZone) {\r\n }\r\n\r\n ngOnChanges(changes) {\r\n this._scroll();\r\n }\r\n\r\n private _scroll() {\r\n this._destroy();\r\n this._init();\r\n }\r\n\r\n //Stacco slimscroll da Angular dato che registra dei listener sull'oggetto in cui viene creato che spammerebbero la change detection\r\n private _init() {\r\n this.zone.runOutsideAngular(() => {\r\n jQuery(this._elementRef.nativeElement).slimScroll(this.slimScrollOptions);\r\n });\r\n }\r\n\r\n private _destroy() {\r\n this.zone.runOutsideAngular(() => {\r\n jQuery(this._elementRef.nativeElement).slimScroll({ destroy: true });\r\n });\r\n }\r\n}","// Angular\r\nimport { LocationStrategy } from \"@angular/common\";\r\nimport { Attribute, Directive, ElementRef, HostListener, Input, Renderer2 } from \"@angular/core\";\r\nimport { ActivatedRoute, Router, RouterLinkWithHref, UrlTree } from \"@angular/router\";\r\nimport { EMBEDDED_ROUTE, EnvOptions, ROUTE } from \"@esfaenza/core/domain\";\r\nimport { AppEmbeddingExtensions } from \"@esfaenza/extensions\";\r\n\r\ndeclare var myconfig: EnvOptions;\r\n\r\n@Directive({\r\n selector: 'a[esRouterLink],area[esRouterLink]',\r\n standalone: true\r\n})\r\nexport class esRouterLinkWithHref extends RouterLinkWithHref {\r\n\r\n constructor(\r\n private emb: AppEmbeddingExtensions,\r\n router: Router, route: ActivatedRoute,\r\n @Attribute('tabindex') tabIndexAttribute: string | null | undefined,\r\n renderer: Renderer2, el: ElementRef,\r\n locationStrategy?: LocationStrategy) {\r\n\r\n super(router, route, tabIndexAttribute, renderer, el, locationStrategy)\r\n }\r\n\r\n @Input()\r\n set esRouterLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined) {\r\n let BasePath = \"/\" + (this.emb.Embedded ? EMBEDDED_ROUTE : ROUTE);\r\n\r\n // UrlTree non è supportato because fuck you\r\n\r\n if (commandsOrUrlTree != null) {\r\n (this as any).routerLinkInput = Array.isArray(commandsOrUrlTree) ? commandsOrUrlTree : [commandsOrUrlTree];\r\n let route = ((this as any).routerLinkInput[0] as string);\r\n if (!route.startsWith(\"/\" + EMBEDDED_ROUTE) && !route.startsWith(\"/\" + ROUTE))\r\n (this as any).routerLinkInput[0] = BasePath + (this as any).routerLinkInput[0];\r\n\r\n (this as any).setTabIndexIfNotOnNativeEl('0');\r\n } else {\r\n (this as any).routerLinkInput = null;\r\n (this as any).setTabIndexIfNotOnNativeEl(null);\r\n }\r\n }\r\n\r\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\r\n override onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean {\r\n if (this.emb.Embedded) {\r\n let url = this.urlTree.toString().replace(EMBEDDED_ROUTE, ROUTE + \"/embed/\" + myconfig.AppData.ModuleId);\r\n this.emb.MainWindow.postMessage({ type: \"navigate\", url, newTab: ctrlKey, replaceState: !ctrlKey }, \"*\");\r\n\r\n if (!ctrlKey)\r\n return super.onClick(button, ctrlKey, shiftKey, altKey, metaKey);\r\n else\r\n return false;\r\n }\r\n else\r\n return super.onClick(button, ctrlKey, shiftKey, altKey, metaKey);\r\n }\r\n}","// Angular\r\nimport { Directive, ElementRef, OnInit } from \"@angular/core\";\r\n\r\ndeclare var jQuery;\r\n\r\n@Directive({\r\n selector: \"[widget]\",\r\n standalone: true\r\n})\r\nexport class Widget implements OnInit {\r\n $el: any;\r\n\r\n constructor(el: ElementRef) {\r\n this.$el = jQuery(el.nativeElement);\r\n jQuery.fn.widgster.Constructor.DEFAULTS.bodySelector = \".widget-body\";\r\n\r\n /*\r\n When widget is closed remove its parent if it is .col-*\r\n */\r\n jQuery(document).on(\"close.widgster\", (e) => {\r\n let $colWrap = jQuery(e.target).closest(' [class*=\"col-\"]:not(.widget-container)');\r\n\r\n // remove colWrap only if there are no more widgets inside\r\n if (!$colWrap.find(\".widget\").not(e.target).length) {\r\n $colWrap.remove();\r\n }\r\n });\r\n\r\n jQuery(document).on(\"fullscreened.widgster\", (e) => {\r\n jQuery(e.target).find(\"div.widget-body\").addClass(\"scrolling\");\r\n }).on(\"restored.widgster\", (e) => {\r\n jQuery(e.target).find(\"div.widget-body\").removeClass(\"scrolling\");\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.$el.widgster();\r\n }\r\n}","import { Directive, Input, Type, ViewContainerRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[componentHost]',\r\n standalone: true\r\n})\r\nexport class ComponentHostDirective {\r\n\r\n @Input() componentHost: Type<any>;\r\n @Input() Inputs: Record<string, any> = null;\r\n\r\n // Eventuali accessi esterni... non si sa mai\r\n public CreatedComponent: any;\r\n\r\n constructor(public viewContainerRef: ViewContainerRef) { }\r\n\r\n ngOnInit(){\r\n this.CreatedComponent = this.viewContainerRef.createComponent<any>(this.componentHost);\r\n\r\n if (!this.Inputs)\r\n return;\r\n\r\n for (const key in this.Inputs)\r\n this.CreatedComponent.instance[key] = this.Inputs[key];\r\n }\r\n}","// Angular\r\nimport { Directive, ElementRef, inject, Renderer2 } from \"@angular/core\";\r\n\r\n// Core\r\nimport { AppEmbeddingExtensions } from \"@esfaenza/extensions\";\r\n\r\n// Bootrstrap\r\nimport { ModalDirective } from \"ngx-bootstrap/modal\";\r\n\r\n// Rxjs\r\nimport { Subscription } from \"rxjs\";\r\n\r\n@Directive({\r\n selector: '[esModal]',\r\n exportAs: 'es-modal',\r\n standalone: true\r\n})\r\nexport class EsModalDirective extends ModalDirective {\r\n\r\n elementRef: ElementRef;\r\n rendererRef: Renderer2;\r\n\r\n HideSubscription: Subscription;\r\n\r\n private emb: AppEmbeddingExtensions = inject(AppEmbeddingExtensions);\r\n\r\n override ngOnInit(){\r\n this.elementRef = (this as any)._element;\r\n this.rendererRef = (this as any)._renderer;\r\n\r\n if (this.emb.Embedded) {\r\n this.HideSubscription = this.onHidden.subscribe(() => {\r\n document.body.style.setProperty(\"overflow-y\", \"auto\", \"important\");\r\n });\r\n }\r\n\r\n super.ngOnInit();\r\n }\r\n\r\n override ngOnDestroy() {\r\n if (this.HideSubscription)\r\n this.HideSubscription.unsubscribe();\r\n\r\n super.ngOnDestroy();\r\n }\r\n\r\n override show(): void {\r\n\r\n super.show();\r\n\r\n if (this.emb.Embedded) {\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"padding-top\", \"5%\");\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"margin-left\", \"-110px\");\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"width\", \"calc(100% + 110px)\");\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"overflow\", \"hidden\");\r\n\r\n if (this._config.animated)\r\n setTimeout(() => { this.doFixBody(); }, 300);\r\n else\r\n this.doFixBody();\r\n\r\n let backdropHeight = this.backdrop.instance.element.nativeElement.clientHeight;\r\n this.emb.MainWindow.postMessage({ type: \"modal-open\", backdropHeight: backdropHeight }, \"*\");\r\n }\r\n }\r\n\r\n doFixBody() {\r\n let body = (<HTMLElement>this.elementRef.nativeElement).getElementsByClassName(\"modal-body\")[0] as HTMLElement;\r\n // Ci prova finch� non trova il body dato che potrebbe essere creato in qualsiasi momento\r\n if (!body) {\r\n setTimeout(() => this.doFixBody(), 250);\r\n return;\r\n }\r\n body.style.setProperty(\"max-height\", \"600px\", \"important\");\r\n body.style.setProperty(\"overflow-x\", \"hidden\");\r\n body.style.setProperty(\"overflow-y\", \"auto\");\r\n }\r\n\r\n override hide(): void {\r\n super.hide();\r\n\r\n if (!this.emb.Embedded)\r\n return;\r\n\r\n if (this._config.animated)\r\n setTimeout(() => { this.doHide(); }, 300);\r\n else\r\n this.doHide();\r\n }\r\n\r\n doHide() {\r\n this.emb.MainWindow.postMessage({ type: \"modal-close\" }, \"*\");\r\n }\r\n}","// Angular\r\nimport { NgModule } from \"@angular/core\";\r\n\r\n// Direttive\r\nimport { Draggable } from \"./draggable/draggable.directive\";\r\nimport { SlimScroll } from \"./slim-scroll/slim-scroll.directive\";\r\nimport { Widget } from \"./widget/widget.directive\";\r\nimport { esRouterLinkWithHref } from \"./es-routerLink/es-routerLink.directive\";\r\nimport { ComponentHostDirective } from \"./componentHost/componentHost.directive\";\r\nimport { EsModalDirective } from \"./es-modal/es-modal.directive\";\r\n\r\nconst DIRECTIVES = [Draggable, SlimScroll, Widget, esRouterLinkWithHref, ComponentHostDirective, EsModalDirective];\r\n\r\n@NgModule({ imports: [...DIRECTIVES], exports: [...DIRECTIVES] })\r\nexport class DirectivesModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;MAYa,SAAS,CAAA;AAGlB,IAAA,WAAA,CAAoB,WAAuB,EAAU,IAAY,EAAU,GAA2B,EAAA;QAAlF,IAAW,CAAA,WAAA,GAAX,WAAW;QAAsB,IA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,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,UAAU,EAAE;AACf,iBAAA;;;AChBD;AAWA,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,CAAC;MAGrG,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAhB,gBAAgB,EAAA,OAAA,EAAA,CAHT,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,CAA7F,EAAA,OAAA,EAAA,CAAA,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;gHAGpG,gBAAgB,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE;;;ACbhE;;AAEG;;;;"}
1
+ {"version":3,"file":"esfaenza-core-directives.mjs","sources":["../../../projects/core/directives/src/draggable/draggable.directive.ts","../../../projects/core/directives/src/slim-scroll/slim-scroll.directive.ts","../../../projects/core/directives/src/es-routerLink/es-routerLink.directive.ts","../../../projects/core/directives/src/widget/widget.directive.ts","../../../projects/core/directives/src/componentHost/componentHost.directive.ts","../../../projects/core/directives/src/es-modal/es-modal.directive.ts","../../../projects/core/directives/src/directives.module.ts","../../../projects/core/directives/src/esfaenza-core-directives.ts"],"sourcesContent":["// Angular\r\nimport { Directive, ElementRef, Input, NgZone } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { AppEmbeddingExtensions } from \"@esfaenza/extensions\";\r\n\r\ndeclare var jQuery;\r\n\r\n@Directive({\r\n selector: \"[emaDraggable]\",\r\n standalone: true\r\n})\r\nexport class Draggable {\r\n @Input('emaDraggable') handlerSelector: string;\r\n\r\n constructor(private _elementRef: ElementRef, private zone: NgZone, private emb: AppEmbeddingExtensions) { }\r\n\r\n ngOnInit() {\r\n this.zone.runOutsideAngular(() => {\r\n var handle = this.handlerSelector || '.modal-header';\r\n jQuery(this._elementRef.nativeElement).children(':first-child').draggable({\r\n handle,\r\n helper: function (_, __) {\r\n var oBody = jQuery(document).find('body');\r\n var containmentDiv = jQuery('<div id=\"div_containment\"></div>');\r\n containmentDiv\r\n .css('z-index', \"-99999\")\r\n .css('top', \"0\")\r\n .css('left', \"0\")\r\n .css('width', \"100%\")\r\n .css('height', \"100%\")\r\n .css('position', 'absolute');\r\n containmentDiv.appendTo(oBody);\r\n return this;\r\n },\r\n stop: function (_, __) {\r\n jQuery(document).filter('body').find('#div_containment').remove();\r\n },\r\n containment: this.emb.Embedded ? \"#div_containment\" : null\r\n });\r\n });\r\n }\r\n}","// Angular\r\nimport { Directive, ElementRef, Input, NgZone } from \"@angular/core\";\r\n\r\n// Direttive, Componenti, Librerie\r\nimport \"jquery-slimscroll\";\r\n\r\ndeclare var jQuery;\r\n\r\n@Directive({\r\n selector: \"[slim-scroll]\",\r\n standalone: true\r\n})\r\nexport class SlimScroll {\r\n @Input() public slimScrollOptions: Object;\r\n\r\n constructor(private _elementRef: ElementRef, private zone: NgZone) {\r\n }\r\n\r\n ngOnChanges(changes) {\r\n this._scroll();\r\n }\r\n\r\n private _scroll() {\r\n this._destroy();\r\n this._init();\r\n }\r\n\r\n //Stacco slimscroll da Angular dato che registra dei listener sull'oggetto in cui viene creato che spammerebbero la change detection\r\n private _init() {\r\n this.zone.runOutsideAngular(() => {\r\n jQuery(this._elementRef.nativeElement).slimScroll(this.slimScrollOptions);\r\n });\r\n }\r\n\r\n private _destroy() {\r\n this.zone.runOutsideAngular(() => {\r\n jQuery(this._elementRef.nativeElement).slimScroll({ destroy: true });\r\n });\r\n }\r\n}","// Angular\r\nimport { LocationStrategy } from \"@angular/common\";\r\nimport { Attribute, Directive, ElementRef, HostListener, Input, Renderer2 } from \"@angular/core\";\r\nimport { ActivatedRoute, Router, RouterLinkWithHref, UrlTree } from \"@angular/router\";\r\nimport { EMBEDDED_ROUTE, EnvOptions, ROUTE } from \"@esfaenza/core/domain\";\r\nimport { AppEmbeddingExtensions } from \"@esfaenza/extensions\";\r\nimport { take } from \"rxjs\";\r\n\r\ndeclare var myconfig: EnvOptions;\r\n\r\n@Directive({\r\n selector: 'a[esRouterLink],area[esRouterLink]',\r\n standalone: true\r\n})\r\nexport class esRouterLinkWithHref extends RouterLinkWithHref {\r\n\r\n private EmbeddingSource: string;\r\n\r\n constructor(\r\n private emb: AppEmbeddingExtensions,\r\n router: Router, route: ActivatedRoute,\r\n @Attribute('tabindex') tabIndexAttribute: string | null | undefined,\r\n renderer: Renderer2, el: ElementRef,\r\n locationStrategy?: LocationStrategy) {\r\n\r\n super(router, route, tabIndexAttribute, renderer, el, locationStrategy)\r\n }\r\n\r\n @Input()\r\n set esRouterLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined) {\r\n // UrlTree non è supportato because fuck you\r\n this.emb.EmbeddingSource.pipe(take(1)).subscribe(s => {\r\n this.EmbeddingSource = s;\r\n\r\n if(this.emb.Embedded && !s)\r\n console.error(\"Link creato in contesto di embedding ma senza embedding source!!\");\r\n\r\n let BasePath = \"/\" + (this.emb.Embedded ? EMBEDDED_ROUTE + (!!s? \"/\" + s : \"\") : ROUTE);\r\n\r\n if (commandsOrUrlTree != null) {\r\n (this as any).routerLinkInput = Array.isArray(commandsOrUrlTree) ? commandsOrUrlTree : [commandsOrUrlTree];\r\n let route = ((this as any).routerLinkInput[0] as string);\r\n if (!route.startsWith(\"/\" + EMBEDDED_ROUTE) && !route.startsWith(\"/\" + ROUTE))\r\n (this as any).routerLinkInput[0] = BasePath + (this as any).routerLinkInput[0];\r\n\r\n (this as any).setTabIndexIfNotOnNativeEl('0');\r\n } else {\r\n (this as any).routerLinkInput = null;\r\n (this as any).setTabIndexIfNotOnNativeEl(null);\r\n }\r\n });\r\n }\r\n\r\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\r\n override onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean {\r\n \r\n if (this.emb.Embedded) {\r\n let url = this.urlTree.toString().replace(EMBEDDED_ROUTE + (!!this.EmbeddingSource? \"/\" + this.EmbeddingSource : \"\"), ROUTE + \"/embed/\" + myconfig.AppData.ModuleId);\r\n this.emb.MainWindow.postMessage({ type: \"navigate\", url, newTab: ctrlKey, replaceState: !ctrlKey, current: (this as any as { router: Router }).router.url }, \"*\");\r\n\r\n if (!ctrlKey)\r\n return super.onClick(button, ctrlKey, shiftKey, altKey, metaKey);\r\n else\r\n return false;\r\n }\r\n else\r\n return super.onClick(button, ctrlKey, shiftKey, altKey, metaKey);\r\n }\r\n}","// Angular\r\nimport { Directive, ElementRef, OnInit } from \"@angular/core\";\r\n\r\ndeclare var jQuery;\r\n\r\n@Directive({\r\n selector: \"[widget]\",\r\n standalone: true\r\n})\r\nexport class Widget implements OnInit {\r\n $el: any;\r\n\r\n constructor(el: ElementRef) {\r\n this.$el = jQuery(el.nativeElement);\r\n jQuery.fn.widgster.Constructor.DEFAULTS.bodySelector = \".widget-body\";\r\n\r\n /*\r\n When widget is closed remove its parent if it is .col-*\r\n */\r\n jQuery(document).on(\"close.widgster\", (e) => {\r\n let $colWrap = jQuery(e.target).closest(' [class*=\"col-\"]:not(.widget-container)');\r\n\r\n // remove colWrap only if there are no more widgets inside\r\n if (!$colWrap.find(\".widget\").not(e.target).length) {\r\n $colWrap.remove();\r\n }\r\n });\r\n\r\n jQuery(document).on(\"fullscreened.widgster\", (e) => {\r\n jQuery(e.target).find(\"div.widget-body\").addClass(\"scrolling\");\r\n }).on(\"restored.widgster\", (e) => {\r\n jQuery(e.target).find(\"div.widget-body\").removeClass(\"scrolling\");\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.$el.widgster();\r\n }\r\n}","import { Directive, Input, Type, ViewContainerRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[componentHost]',\r\n standalone: true\r\n})\r\nexport class ComponentHostDirective {\r\n\r\n @Input() componentHost: Type<any>;\r\n @Input() Inputs: Record<string, any> = null;\r\n\r\n // Eventuali accessi esterni... non si sa mai\r\n public CreatedComponent: any;\r\n\r\n constructor(public viewContainerRef: ViewContainerRef) { }\r\n\r\n ngOnInit(){\r\n this.CreatedComponent = this.viewContainerRef.createComponent<any>(this.componentHost);\r\n\r\n if (!this.Inputs)\r\n return;\r\n\r\n for (const key in this.Inputs)\r\n this.CreatedComponent.instance[key] = this.Inputs[key];\r\n }\r\n}","// Angular\r\nimport { Directive, ElementRef, inject, Renderer2 } from \"@angular/core\";\r\n\r\n// Core\r\nimport { AppEmbeddingExtensions } from \"@esfaenza/extensions\";\r\n\r\n// Bootrstrap\r\nimport { ModalDirective } from \"ngx-bootstrap/modal\";\r\n\r\n// Rxjs\r\nimport { Subscription } from \"rxjs\";\r\n\r\n@Directive({\r\n selector: '[esModal]',\r\n exportAs: 'es-modal',\r\n standalone: true\r\n})\r\nexport class EsModalDirective extends ModalDirective {\r\n\r\n elementRef: ElementRef;\r\n rendererRef: Renderer2;\r\n\r\n HideSubscription: Subscription;\r\n\r\n private emb: AppEmbeddingExtensions = inject(AppEmbeddingExtensions);\r\n\r\n override ngOnInit(){\r\n this.elementRef = (this as any)._element;\r\n this.rendererRef = (this as any)._renderer;\r\n\r\n if (this.emb.Embedded) {\r\n this.HideSubscription = this.onHidden.subscribe(() => {\r\n document.body.style.setProperty(\"overflow-y\", \"auto\", \"important\");\r\n });\r\n }\r\n\r\n super.ngOnInit();\r\n }\r\n\r\n override ngOnDestroy() {\r\n if (this.HideSubscription)\r\n this.HideSubscription.unsubscribe();\r\n\r\n super.ngOnDestroy();\r\n }\r\n\r\n override show(): void {\r\n\r\n super.show();\r\n\r\n if (this.emb.Embedded) {\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"padding-top\", \"5%\");\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"margin-left\", \"-110px\");\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"width\", \"calc(100% + 110px)\");\r\n this.rendererRef.setStyle(this.elementRef.nativeElement, \"overflow\", \"hidden\");\r\n\r\n if (this._config.animated)\r\n setTimeout(() => { this.doFixBody(); }, 300);\r\n else\r\n this.doFixBody();\r\n\r\n let backdropHeight = this.backdrop.instance.element.nativeElement.clientHeight;\r\n this.emb.MainWindow.postMessage({ type: \"modal-open\", backdropHeight: backdropHeight }, \"*\");\r\n }\r\n }\r\n\r\n doFixBody() {\r\n let body = (<HTMLElement>this.elementRef.nativeElement).getElementsByClassName(\"modal-body\")[0] as HTMLElement;\r\n // Ci prova finch� non trova il body dato che potrebbe essere creato in qualsiasi momento\r\n if (!body) {\r\n setTimeout(() => this.doFixBody(), 250);\r\n return;\r\n }\r\n body.style.setProperty(\"max-height\", \"600px\", \"important\");\r\n body.style.setProperty(\"overflow-x\", \"hidden\");\r\n body.style.setProperty(\"overflow-y\", \"auto\");\r\n }\r\n\r\n override hide(): void {\r\n super.hide();\r\n\r\n if (!this.emb.Embedded)\r\n return;\r\n\r\n if (this._config.animated)\r\n setTimeout(() => { this.doHide(); }, 300);\r\n else\r\n this.doHide();\r\n }\r\n\r\n doHide() {\r\n this.emb.MainWindow.postMessage({ type: \"modal-close\" }, \"*\");\r\n }\r\n}","// Angular\r\nimport { NgModule } from \"@angular/core\";\r\n\r\n// Direttive\r\nimport { Draggable } from \"./draggable/draggable.directive\";\r\nimport { SlimScroll } from \"./slim-scroll/slim-scroll.directive\";\r\nimport { Widget } from \"./widget/widget.directive\";\r\nimport { esRouterLinkWithHref } from \"./es-routerLink/es-routerLink.directive\";\r\nimport { ComponentHostDirective } from \"./componentHost/componentHost.directive\";\r\nimport { EsModalDirective } from \"./es-modal/es-modal.directive\";\r\n\r\nconst DIRECTIVES = [Draggable, SlimScroll, Widget, esRouterLinkWithHref, ComponentHostDirective, EsModalDirective];\r\n\r\n@NgModule({ imports: [...DIRECTIVES], exports: [...DIRECTIVES] })\r\nexport class DirectivesModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;MAYa,SAAS,CAAA;AAGlB,IAAA,WAAA,CAAoB,WAAuB,EAAU,IAAY,EAAU,GAA2B,EAAA;QAAlF,IAAW,CAAA,WAAA,GAAX,WAAW;QAAsB,IAAI,CAAA,IAAA,GAAJ,IAAI;QAAkB,IAAG,CAAA,GAAA,GAAH,GAAG;;IAE9E,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAK;AAC7B,YAAA,IAAI,MAAM,GAAG,IAAI,CAAC,eAAe,IAAI,eAAe;AACpD,YAAA,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC;gBACtE,MAAM;AACN,gBAAA,MAAM,EAAE,UAAU,CAAC,EAAE,EAAE,EAAA;oBACnB,IAAI,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;AACzC,oBAAA,IAAI,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;oBAC/D;AACK,yBAAA,GAAG,CAAC,SAAS,EAAE,QAAQ;AACvB,yBAAA,GAAG,C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AAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,UAAU,EAAE;AACf,iBAAA;;;AChBD;AAWA,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,CAAC;MAGrG,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAhB,gBAAgB,EAAA,OAAA,EAAA,CAHT,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,CAA7F,EAAA,OAAA,EAAA,CAAA,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;gHAGpG,gBAAgB,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE;;;ACbhE;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Optional, Inject, Injectable } from '@angular/core';
3
- import { JaceIdentity, USE_FAKE_ACCESS_TOKEN, ANONYMOUS_MODE, UpdateProfilePictureDto, UpdateAccountRecoverySettingsDto, UpdatePasswordDto } from '@esfaenza/core/domain';
3
+ import { JaceIdentity, USE_FAKE_ACCESS_TOKEN, ANONYMOUS_MODE, ActiveModuleView, UpdateProfilePictureDto, UpdateAccountRecoverySettingsDto, UpdatePasswordDto } from '@esfaenza/core/domain';
4
4
  import * as i1 from 'ngx-cookie-service';
5
5
  import { of, Subject, filter, firstValueFrom } from 'rxjs';
6
6
  import * as i2 from '@angular/common/http';
@@ -11,6 +11,7 @@ import * as i1$2 from '@esfaenza/localizations';
11
11
  import { LocalizationService } from '@esfaenza/localizations';
12
12
  import * as i5 from '@esfaenza/extensions';
13
13
  import { InboundMessageTypes, MessageService, CallResult } from '@esfaenza/extensions';
14
+ import { HTTPService } from '@esfaenza/httpservice';
14
15
  import * as i4 from '@esfaenza/signalr-notifications';
15
16
  import * as i5$1 from '@esfaenza/access-control';
16
17
  import { AccessControlRouteGuard } from '@esfaenza/access-control';
@@ -18,7 +19,6 @@ import * as i4$1 from '@esfaenza/preferences';
18
19
  import { CachePersistor, PreferencesPersistor } from '@esfaenza/preferences';
19
20
  import { catchError, map } from 'rxjs/operators';
20
21
  import { DomSanitizer } from '@angular/platform-browser';
21
- import { HTTPService } from '@esfaenza/httpservice';
22
22
 
23
23
  // Angular
24
24
  class TokenService {
@@ -1161,20 +1161,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1161
1161
  type: Injectable
1162
1162
  }], ctorParameters: () => [{ type: i0.Injector }] });
1163
1163
 
1164
+ // Chiamate ai Repository
1165
+ const GET_Jace_GetActiveJaceModules = "/api/Jace/GetActiveJaceModules";
1164
1166
  class AppState {
1165
1167
  set Modules(modules) {
1166
1168
  this._modules = modules;
1167
1169
  this.notifyDataChanged("modules.Retrieved", this._modules);
1168
1170
  }
1169
1171
  get Modules() { return this._modules; }
1170
- constructor(router, lc, bts, notifications, MessageDef, intercom, emb, anonymousMode) {
1172
+ constructor(router, lc, inj, bts, notifications, MessageDef, intercom, emb, fakeToken, anonymousMode) {
1171
1173
  this.router = router;
1172
1174
  this.lc = lc;
1175
+ this.inj = inj;
1173
1176
  this.bts = bts;
1174
1177
  this.notifications = notifications;
1175
1178
  this.MessageDef = MessageDef;
1176
1179
  this.intercom = intercom;
1177
1180
  this.emb = emb;
1181
+ this.fakeToken = fakeToken;
1178
1182
  this.anonymousMode = anonymousMode;
1179
1183
  this.redirectingToLogin = false;
1180
1184
  this.handlingError = false;
@@ -1189,6 +1193,7 @@ class AppState {
1189
1193
  this.ModulesLocalizations = {};
1190
1194
  this.hookEmbedding();
1191
1195
  this.setupSignalRJobListening();
1196
+ this.getActiveJaceModules();
1192
1197
  this.JaceIdentity = null;
1193
1198
  this._data.subscribe((data) => this._onEvent(data));
1194
1199
  //Decide se siamo attorno a natale
@@ -1203,6 +1208,23 @@ class AppState {
1203
1208
  this.halloweenTime = today > lowerBound && today < upperBound;
1204
1209
  this.intercom.inbounds.subscribe((t) => { this.handleInboundMessage(t); });
1205
1210
  }
1211
+ getActiveJaceModules() {
1212
+ // Recupero i moduli dopo un frame. mi assicuro che l'injection tree sia stabile.
1213
+ // Altrimenti l'httpservice che prende l'httpserviceextensions providato da core quando anche l'appstate è providedin root
1214
+ // si incasina e va in loop
1215
+ requestAnimationFrame(() => {
1216
+ let http = this.inj.get(HTTPService);
1217
+ if (this.fakeToken) {
1218
+ this.Modules = [new ActiveModuleView("Modulo Esempio 1"), new ActiveModuleView("Modulo Esempio 2"), new ActiveModuleView("Modulo Esempio 3")];
1219
+ this.Modules = this.Modules;
1220
+ return;
1221
+ }
1222
+ http.get(GET_Jace_GetActiveJaceModules).subscribe(res => {
1223
+ this.Modules = res;
1224
+ this.Modules = this.Modules;
1225
+ });
1226
+ });
1227
+ }
1206
1228
  // Collego le informazioni dell'embedding che devono appoggiarsi all'app state in modo che possano comunicare col resto dell'applicazione
1207
1229
  hookEmbedding() {
1208
1230
  this.emb.MessageObserver.pipe(filter(ev => ev.event == "navigation")).subscribe(event => {
@@ -1348,13 +1370,16 @@ class AppState {
1348
1370
  setHeaderHeight(height) {
1349
1371
  this.headerHeight = height;
1350
1372
  }
1351
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppState, deps: [{ token: i1$1.Router }, { token: i1$2.LocalizationService }, { token: TokenService }, { token: i4.NotificationsService }, { token: i4.BaseMessageService }, { token: i5.InterComService }, { token: i5.AppEmbeddingExtensions }, { token: ANONYMOUS_MODE }], target: i0.ɵɵFactoryTarget.Injectable }); }
1373
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppState, deps: [{ token: i1$1.Router }, { token: i1$2.LocalizationService }, { token: i0.Injector }, { token: TokenService }, { token: i4.NotificationsService }, { token: i4.BaseMessageService }, { token: i5.InterComService }, { token: i5.AppEmbeddingExtensions }, { token: USE_FAKE_ACCESS_TOKEN }, { token: ANONYMOUS_MODE }], target: i0.ɵɵFactoryTarget.Injectable }); }
1352
1374
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppState, providedIn: "root" }); }
1353
1375
  }
1354
1376
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppState, decorators: [{
1355
1377
  type: Injectable,
1356
1378
  args: [{ providedIn: "root" }]
1357
- }], ctorParameters: () => [{ type: i1$1.Router }, { type: i1$2.LocalizationService }, { type: TokenService }, { type: i4.NotificationsService }, { type: i4.BaseMessageService }, { type: i5.InterComService }, { type: i5.AppEmbeddingExtensions }, { type: undefined, decorators: [{
1379
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: i1$2.LocalizationService }, { type: i0.Injector }, { type: TokenService }, { type: i4.NotificationsService }, { type: i4.BaseMessageService }, { type: i5.InterComService }, { type: i5.AppEmbeddingExtensions }, { type: undefined, decorators: [{
1380
+ type: Inject,
1381
+ args: [USE_FAKE_ACCESS_TOKEN]
1382
+ }] }, { type: undefined, decorators: [{
1358
1383
  type: Inject,
1359
1384
  args: [ANONYMOUS_MODE]
1360
1385
  }] }] });