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function() {\r\n\t\treturn this.get(0).scrollHeight > this.height();\r\n\t}\r\n})(jQuery);\r\n\r\nnamespace Seac.Components {\r\n\texport class TutorialViewer {\r\n\t\t// Proprietà che deve essere valorizzata dalla pagina in cui il tutorial si trova\r\n\t\tpublic tutorialPage : PaginaVisibilitaTutorial;\r\n\r\n\t\tprivate _driverJs: any;\r\n\r\n\t\tprivate _tutorialViewerContainerInstance\t: JQuery;\r\n\t\tprivate _appContainerInstance\t\t\t\t: JQuery;\r\n\t\tprivate _tutorialTreeListInstance\t\t\t: DevExpress.ui.dxTreeList;\r\n\t\tprivate _tutorialViewerService\t\t\t\t: TutorialViewerService;\r\n\t\tprivate _pageTutorialNodeList\t\t\t\t: Array;\r\n\t\tprivate _localStorageKey\t\t\t\t\t: string = 'letturaTutorial';\r\n\t\tprivate _modalVideoGuidaInstance\t\t\t: JQuery;\r\n\t\tprivate _modalVideoGuidaTitoloInstance\t\t: JQuery;\r\n\t\tprivate _modalVideoGuidaContentInstance\t\t: JQuery;\r\n\r\n\t\tconstructor() {\r\n\t\t\tthis._tutorialViewerService\t\t\t = new TutorialViewerService();\r\n\t\t}\r\n\r\n\t\tpublic init(tutorialViewerContainerId: string, appContainerId: string, tutorialTreeListId: string, tutorialItemClass: string, modalVideoGuidaId: string, modalVideoGuidaTitoloId: string, modalVideoGuidaContentId: string): void {\r\n\t\t\tthis._tutorialViewerContainerInstance\t= $(`#${tutorialViewerContainerId}`);\r\n\t\t\tthis._appContainerInstance\t\t\t\t= $(`#${appContainerId}`);\r\n\t\t\tthis._tutorialTreeListInstance\t\t\t= $(`#${tutorialTreeListId}`).dxTreeList(Seac.Commons.Constants.DevExpress.dxInstance);\r\n\t\t\tthis._modalVideoGuidaInstance\t\t\t= $(`#${modalVideoGuidaId}`);\r\n\t\t\tthis._modalVideoGuidaTitoloInstance\t\t= $(`#${modalVideoGuidaTitoloId}`);\r\n\t\t\tthis._modalVideoGuidaContentInstance\t= $(`#${modalVideoGuidaContentId}`);\r\n\r\n\t\t\tthis._driverJs = new (window).Driver({\r\n\t\t\t\tallowClose\t\t\t: false,\r\n\t\t\t\tdoneBtnText\t\t\t: Seac.Resources.Common.fine,\r\n\t\t\t\tcloseBtnText\t\t: Seac.Resources.Common.chiudi,\r\n\t\t\t\tnextBtnText\t\t\t: Seac.Resources.Common.avanti,\r\n\t\t\t\tprevBtnText\t\t\t: Seac.Resources.Common.indietro,\r\n\t\t\t\tonHighlightStarted\t: (element) => {\r\n\t\t\t\t\tif ((element.options).onSelectFunction) {\r\n\t\t\t\t\t\t// Nel caso in cui sia definita una azione da eseguire durante la selezione del tutorial la eseguo\r\n\t\t\t\t\t\tthis.executeFunctionByName((element.options).onSelectFunction, window);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$((element.options).element).get(0).scrollIntoView();\r\n\t\t\t\t},\r\n\t\t\t\tonDeselected\t\t: (element) => {\r\n\t\t\t\t\tif ((element.options).onDeselectFunction) {\r\n\t\t\t\t\t\t// Nel caso in cui sia definita una azione da eseguire durante la deselezione del tutorial la eseguo\r\n\t\t\t\t\t\tthis.executeFunctionByName((element.options).onDeselectFunction, window);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t});\r\n\r\n\t\t\t$(document).delegate(`.${tutorialItemClass}`, Commons.Constants.mouseDownEvent, (event: JQuery.MouseDownEvent) => {\r\n\t\t\t\tlet tdContainer: JQuery;\r\n\r\n\t\t\t\t// Se il target è l'icona di avvio del tutorial, ricavo gli step e avvio il tutorial\r\n\t\t\t\tif ($(event.target).hasClass('btn-start-tutorial')) {\r\n\t\t\t\t\tconst tutorialItemId: number = $(event.target).data('tutorial-button-item-id');\r\n\r\n\t\t\t\t\tconst tutorialChidren: Array = this._pageTutorialNodeList.filter(t => t.PadreId == tutorialItemId).map(s => s.TutorialData);\r\n\t\t\t\t\tthis._driverJs.defineSteps(tutorialChidren);\r\n\t\t\t\t\tthis._driverJs.start();\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (event.target.tagName === Seac.Commons.Constants.tdElement.toUpperCase()) {\r\n\t\t\t\t\ttdContainer = $(event.target);\r\n\t\t\t\t}else {\r\n\t\t\t\t\ttdContainer = $(event.target).parents(Seac.Commons.Constants.tdElement);\r\n\t\t\t\t}\r\n\t\t\t\t// Ricerco l'elemento contenente l'id del menu clikkato negli elementi figli\r\n\t\t\t\tlet tutorialItemIdContainer: JQuery = tdContainer.find('[data-tutorial-item-id]');\r\n\r\n\t\t\t\t// Ricavo l'id dell'elemento\r\n\t\t\t\tconst tutorialItemId: number = tutorialItemIdContainer.data('tutorial-item-id');\r\n\r\n\t\t\t\t// Ricavo l'indice DevExpress dell'elemento \r\n\t\t\t\tconst selectedRowIndex: number = this._tutorialTreeListInstance.getRowIndexByKey(tutorialItemId);\r\n\t\t\t\t// Seleziono l'elemento clikkato\r\n\t\t\t\tthis._tutorialTreeListInstance.selectRowsByIndexes([selectedRowIndex]);\r\n\r\n\t\t\t\t// Qui ho l'elemento con i dati\r\n\t\t\t\tconst selectedNode\t: DevExpress.ui.dxTreeListNode\t= this._tutorialTreeListInstance.getNodeByKey(tutorialItemId);\r\n\t\t\t\tconst nodoTutorial\t: NodoTutorialDto\t\t\t\t= selectedNode.data;\r\n\r\n\t\t\t\t// Se l'elemento ha dei figli espando o comprimo la riga in base allo stato attuale\r\n\t\t\t\tif (selectedNode.hasChildren) {\r\n\t\t\t\t\tif (this._tutorialTreeListInstance.isRowExpanded(tutorialItemId)) {\r\n\t\t\t\t\t\tthis._tutorialTreeListInstance.collapseRow(tutorialItemId);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tthis._tutorialTreeListInstance.expandRow(tutorialItemId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if (nodoTutorial.TipoNodo == TutorialTipoNodo.VideoGuida) {\r\n\t\t\t\t\tthis._modalVideoGuidaTitoloInstance.html(nodoTutorial.TutorialData.popover.title);\r\n\t\t\t\t\tthis._modalVideoGuidaContentInstance.html(nodoTutorial.TutorialData.popover.description);\r\n\t\t\t\t\tthis._modalVideoGuidaInstance.modal(Seac.Commons.Constants.Bootstrap.modalShow);\r\n\t\t\t\t}else if (nodoTutorial.TipoNodo == TutorialTipoNodo.TeamViewer) {\r\n\t\t\t\t\twindow.open('/public/AssistenzaSeac.exe');\r\n\t\t\t\t}else if (nodoTutorial.TipoNodo == TutorialTipoNodo.Manuale) {\r\n\t\t\t\t\twindow.open('/public/Guida_Portale_Azienda_Vers_2.00.pdf');\r\n\t\t\t\t}else if (nodoTutorial.TipoNodo == TutorialTipoNodo.ManualeForfetari) {\r\n\t\t\t\t\twindow.open('/public/Manuale_FORFETARI.pdf');\r\n\t\t\t\t}else {\r\n\t\t\t\t\t// Se arrivo fino a qui, significa che ho selezionato uno step di un tutorial. Quindi mostro il singolo step\r\n\t\t\t\t\tconst tutorialNode: NodoTutorialDto = selectedNode.data;\r\n\t\t\t\t\tthis._driverJs.highlight(tutorialNode.TutorialData);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Alla chiusura della modale, rimuovo il contenuto\t\t\t\r\n\t\t\tthis._modalVideoGuidaInstance.on(Seac.Commons.Constants.Bootstrap.modalHiddenEvent, () => {\r\n\t\t\t\tthis._modalVideoGuidaContentInstance.html('');\r\n\t\t\t});\r\n\r\n\t\t\tif (this.tutorialPage) {\r\n\t\t\t\t// Verifico se il tutorial è stato letto in base ai dati salvati nel localStorage\r\n\t\t\t\t// Lo salvo nel localStorage per evitare di fare molte chiamate inutili\r\n\t\t\t\tif (this.tutorialIsLettoLocalStorage() == false) {\r\n\t\t\t\t\t// Se è definito un tutorial per la pagina, verifico se l'utente lo ha visto, altrimenti lo avvio\r\n\t\t\t\t\tthis._tutorialViewerService.tutorialLettoPagina(this.tutorialPage)\r\n\t\t\t\t\t\t.then((tutorialLetto: boolean) => {\r\n\t\t\t\t\t\t\tif (!tutorialLetto) {\r\n\t\t\t\t\t\t\t\t// Se ci sono dei tutorial letti carico la lista e li avvio automaticamente\r\n\t\t\t\t\t\t\t\tthis.loadTutorial()\r\n\t\t\t\t\t\t\t\t\t.then((nodoTutorialList: Array) => {\r\n\t\t\t\t\t\t\t\t\t\tthis.setTutorialLettoLocalStorage();\r\n\t\t\t\t\t\t\t\t\t\t// Filtro la lista dei tutorial in base alla loro lettura\r\n\t\t\t\t\t\t\t\t\t\tconst tutorialNonLetti: Array = nodoTutorialList.filter(t => t.DataLettura == null);\r\n\t\t\t\t\t\t\t\t\t\t// Estraggo gli oggetti e configuro il tutorial\r\n\t\t\t\t\t\t\t\t\t\tconst tutorialChidren: Array = tutorialNonLetti.filter(t => t.PadreId != null).map(s => s.TutorialData);\r\n\t\t\t\t\t\t\t\t\t\tthis._driverJs.defineSteps(tutorialChidren);\r\n\t\t\t\t\t\t\t\t\t\tthis._driverJs.start();\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\tthis.setTutorialLettoLocalStorage();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** Verifico se il tutorial è stato letto, leggendo i dati salvati nel localStorage */\r\n\t\tprivate tutorialIsLettoLocalStorage(): boolean {\r\n\t\t\tconst letturaTutorial: Array = JSON.parse(localStorage.getItem(this._localStorageKey));\r\n\t\t\tif (letturaTutorial == null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tconst filteredTutorial = letturaTutorial.filter(l => l.paginaVisibilita == this.tutorialPage);\r\n\r\n\t\t\tif (filteredTutorial.length == 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}else {\r\n\t\t\t\treturn filteredTutorial[0].isLetto;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** Aggiorna il valore della lettura del tutorial per la pagina corrente */\r\n\t\tprivate setTutorialLettoLocalStorage(): void {\r\n\t\t\tlet letturaTutorial: Array = JSON.parse(localStorage.getItem(this._localStorageKey));\r\n\t\t\tif (!letturaTutorial) {\r\n\t\t\t\tletturaTutorial = [];\r\n\t\t\t}\r\n\t\t\tconst filteredTutorial = letturaTutorial.filter(l => l.paginaVisibilita != this.tutorialPage);\r\n\r\n\t\t\tfilteredTutorial.push({ \r\n\t\t\t\tpaginaVisibilita\t: this.tutorialPage,\r\n\t\t\t\tisLetto\t\t\t\t: true\r\n\t\t\t});\r\n\r\n\t\t\tlocalStorage.setItem(this._localStorageKey, JSON.stringify(filteredTutorial));\r\n\t\t}\r\n\r\n\t\t/** Esegue una funzione dato il suo nome in stringa */\r\n\t\tprivate executeFunctionByName(functionName, context): void {\r\n\t\t\tconst namespaces = functionName.split(\".\");\r\n\t\t\tconst func = namespaces.pop();\r\n\t\t\tfor (let i = 0; i < namespaces.length; i++) {\r\n\t\t\t\tcontext = context[namespaces[i]];\r\n\t\t\t}\r\n\t\t\treturn context[func].apply(context);\r\n\t\t}\r\n\r\n\t\t/** Gestisce la visualizzazione della barra laterale, caricando dal server la configurazione dei tutorial se non è mai stata caricata */\r\n\t\tpublic toggleTutorial(): void {\r\n\t\t\t// Controllo se è presente la ScrollBar e in caso aggiungo del margine\r\n\t\t\tif ($('.app-container-wrapper').height() > $(window).height() && !Seac.Pages.PageUtility.isMobileDevice) { \r\n\t\t\t\tthis._tutorialViewerContainerInstance.addClass('has-scroll');\r\n\t\t\t}else {\r\n\t\t\t\tthis._tutorialViewerContainerInstance.removeClass('has-scroll');\r\n\t\t\t}\r\n\t\t\t// Se la pagina prevede un tutorial procedo con le operazioni\r\n\t\t\tconst isVisible: boolean = this._tutorialViewerContainerInstance.hasClass('tutorial-visible');\r\n\t\t\t// Nascondo la scrollbar per la durata dell'animazione, per evitare un fastidioso effetto\r\n\t\t\tthis._appContainerInstance.css('overflow-x', 'hidden');\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._appContainerInstance.css('overflow-x', 'auto');\r\n\t\t\t}, 500);\r\n\r\n\t\t\tif (isVisible) {\r\n\t\t\t\tthis._tutorialViewerContainerInstance.removeClass('tutorial-visible');\r\n\t\t\t\tthis._appContainerInstance.removeClass('tutorial-visible');\r\n\t\t\t}else {\r\n\t\t\t\tthis._tutorialViewerContainerInstance.addClass('tutorial-visible');\r\n\t\t\t\tthis._appContainerInstance.addClass('tutorial-visible');\r\n\r\n\t\t\t\tif (!this._pageTutorialNodeList) {\r\n\t\t\t\t\t// Se non è già stata caricata la configurazione del tutorial la carico\r\n\t\t\t\t\tthis.loadTutorial();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/** Restituisce il nodo per il Download di TeamViewer */\r\n\t\tpublic get tutorialNodoAssistenza(): NodoTutorialDto {\r\n\t\t\treturn {\r\n\t\t\t\tId\t\t\t: -1,\r\n\t\t\t\tPadreId\t\t: null,\r\n\t\t\t\tDescrizione\t: Seac.Resources.Common.download_teamviwer,\r\n\t\t\t\tTipoNodo\t: TutorialTipoNodo.TeamViewer\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t/** Restituisce il nodo per il download del manuale */\r\n\t\tpublic get tutorialNodoManuale(): NodoTutorialDto {\r\n\t\t\treturn {\r\n\t\t\t\tId\t\t\t: -2,\r\n\t\t\t\tPadreId\t\t: null,\r\n\t\t\t\tDescrizione\t: Seac.Resources.Common.manuale,\r\n\t\t\t\tTipoNodo\t: TutorialTipoNodo.Manuale\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t/** Restituisce il nodo per il download del manuale dei Forfetari */\r\n\t\tpublic get tutorialNodoManualeForfetari(): NodoTutorialDto {\r\n\t\t\treturn {\r\n\t\t\t\tId\t\t\t: -2,\r\n\t\t\t\tPadreId\t\t: null,\r\n\t\t\t\tDescrizione\t: Seac.Resources.Common.manuale,\r\n\t\t\t\tTipoNodo\t: TutorialTipoNodo.ManualeForfetari\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t/** Carica la configurazione del tutorial per la pagina e la visualizza nella TreeList */\r\n\t\tprivate loadTutorial(): JQuery.Promise> {\r\n\t\t\tthis._tutorialTreeListInstance.beginCustomLoading(null);\r\n\t\t\t// Se c'è carico il tutorial della pagina altrimenti carico la sola voce del manuale PDF\r\n\t\t\tif (this.tutorialPage) {\r\n\t\t\t\treturn this._tutorialViewerService.tutorialPaginaList(this.tutorialPage)\r\n\t\t\t\t\t.then((tutorialNodes: Array) => {\r\n\t\t\t\t\t\t// Aggiungo sempre il nodo per il download di TeamViewer\r\n\t\t\t\t\t\ttutorialNodes.push(this.tutorialNodoAssistenza);\r\n\r\n\t\t\t\t\t\t// Compongo i dati per l'albero della guida\r\n\t\t\t\t\t\tconst arrayStore = new DevExpress.data.ArrayStore({ data: tutorialNodes, key: Seac.Commons.nameof(() => (null).Id) });\r\n\t\t\t\t\t\tthis._tutorialTreeListInstance.option(Seac.Commons.Constants.DevExpress.dxDataSource, arrayStore);\r\n\t\t\t\t\t\tthis._tutorialTreeListInstance.endCustomLoading();\r\n\t\t\t\t\t\tthis._pageTutorialNodeList = tutorialNodes;\r\n\r\n\t\t\t\t\t\treturn tutorialNodes;\r\n\t\t\t\t\t});\r\n\t\t\t}else {\r\n\t\t\t\t// Se non devo caicare nulla dal server, preparo il Treeview con il limk per la teleassistenza e per il manuale\r\n\t\t\t\tconst tutorialNodesDeferred\t: JQuery.Deferred> = $.Deferred>();\r\n\r\n\t\t\t\tconst tutorialNodes: Array = [];\r\n\t\t\t\ttutorialNodes.push(this.tutorialNodoManuale);\r\n\t\t\t\ttutorialNodes.push(this.tutorialNodoAssistenza);\r\n\r\n\t\t\t\t// Compongo i dati per l'albero della guida\r\n\t\t\t\tconst arrayStore = new DevExpress.data.ArrayStore({ data: tutorialNodes, key: Seac.Commons.nameof(() => (null).Id) });\r\n\t\t\t\tthis._tutorialTreeListInstance.option(Seac.Commons.Constants.DevExpress.dxDataSource, arrayStore);\r\n\t\t\t\tthis._tutorialTreeListInstance.endCustomLoading();\r\n\t\t\t\tthis._pageTutorialNodeList = tutorialNodes;\r\n\r\n\t\t\t\treturn tutorialNodesDeferred.resolve(tutorialNodes);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclass TutorialViewerService extends Seac.Commons.BaseService {\r\n\t\t/** Chiamata al server per caricare i nodi del tutorial della pagina corrente */\r\n\t\tpublic tutorialPaginaList(paginaVisibilita: PaginaVisibilitaTutorial): JQuery.jqXHR> {\r\n\t\t\tconst queryParams: Seac.Commons.QueryParams = {\r\n\t\t\t\tpaginaVisibilita: paginaVisibilita\r\n\t\t\t};\r\n\t\t\treturn this.getWithQueryParams(queryParams, Seac.Commons.EndPoints.TUTORIAL.ROOT, Seac.Commons.EndPoints.TUTORIAL.ROUTE_TUTORIAL_BY_PAGINA);\r\n\t\t}\r\n\r\n\t\t/** Verifica se l'utente ha dei tutorial non ancora letti */\r\n\t\tpublic tutorialLettoPagina(paginaVisibilita: PaginaVisibilitaTutorial): JQuery.jqXHR {\r\n\t\t\tconst queryParams: Seac.Commons.QueryParams = {\r\n\t\t\t\tpaginaVisibilita: paginaVisibilita\r\n\t\t\t};\r\n\t\t\treturn this.getWithQueryParams(queryParams, Seac.Commons.EndPoints.TUTORIAL.ROOT, Seac.Commons.EndPoints.TUTORIAL.ROUTE_TUTORIAL_LETTO_BY_PAGINA);\r\n\t\t}\r\n\t}\r\n\r\n\tinterface NodoTutorialDto {\r\n\t\tId\t\t\t\t: number;\r\n\t\tPadreId?\t\t: number;\r\n\t\tDescrizione\t\t: string;\r\n\t\tTipoNodo\t\t: TutorialTipoNodo;\r\n\t\tGruppoInPagina\t: number;\r\n\t\tOrdine\t\t\t: number;\r\n\t\tOrdineGruppo\t: number;\r\n\t\tDataLettura?\t: Date;\r\n\t\tTutorialData\t: TutorialDataDto;\r\n\t}\r\n\r\n\tinterface TutorialDataDto {\r\n\t\telement\t\t\t\t: string;\r\n\t\tstageBackground\t\t: string;\r\n\t\tonSelectFunction\t: string;\r\n\t\tonDeselectFunction\t: string;\r\n\t\tpopover\t\t\t\t: TutorialPopoverDto;\r\n\t}\r\n\r\n\tinterface TutorialPopoverDto {\r\n\t\tclassName\t: string;\r\n\t\ttitle\t\t: string;\r\n\t\tdescription\t: string;\r\n\t\tshowButtons\t: boolean;\r\n\t\tdoneBtnText\t: string;\r\n\t\tcloseBtnText: string;\r\n\t\tnextBtnText\t: string;\r\n\t\tprevBtnText\t: string;\r\n\t\tposition\t: 'top' | 'left' | 'right' | 'bottom';\r\n\t}\r\n\r\n\tinterface TutorialPaginaLettura {\r\n\t\tpaginaVisibilita\t: PaginaVisibilitaTutorial;\r\n\t\tisLetto\t\t\t\t: boolean;\r\n\t}\r\n\r\n\tenum TutorialTipoNodo {\r\n\t\tCompleto\t\t\t= 1,\r\n\t\tSingolo\t\t\t\t= 2,\r\n\t\tVideoGuida\t\t\t= 3,\r\n\t\tTeamViewer\t\t\t= 4,\r\n\t\tManuale\t\t\t\t= 5,\r\n\t\tManualeForfetari\t= 6\r\n\t}\r\n\r\n\texport enum PaginaVisibilitaTutorial {\r\n\t\tElencoImpresa\t\t\t\t\t= 1,\r\n\t\tElencoDocumentiVendita\t\t\t= 2,\r\n\t\tNuovoDocumentoVendita\t\t\t= 3,\r\n\t\tSettingsFatturazioneElettronica = 4,\r\n\t\tCodificaAutomatismo\t\t\t\t= 5,\r\n\t\tCliforNuovo\t\t\t\t\t\t= 6,\r\n\t\tCategoriaArticoloNuova\t\t\t= 7,\r\n\t\tArticoloNuovo\t\t\t\t\t= 8,\r\n\t\tForfetari\t\t\t\t\t\t= 101\r\n\t}\r\n\texport const tutorialViewer: TutorialViewer = new TutorialViewer();\r\n}\r\n"]}