@arsedizioni/ars-utils 20.3.25 → 20.3.27
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/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +1 -0
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1 -2
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +45 -2
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/package.json +5 -5
- package/ui.application/index.d.ts +20 -2
|
@@ -819,12 +819,11 @@ class EvolutionService {
|
|
|
819
819
|
*/
|
|
820
820
|
loginSwitch(id) {
|
|
821
821
|
return this.httpClient
|
|
822
|
-
.post(this._serviceUri + '/login/switch
|
|
822
|
+
.post(this._serviceUri + '/login/switch', {
|
|
823
823
|
clientId: localStorage.getItem("evolution_client_id"),
|
|
824
824
|
userId: id,
|
|
825
825
|
})
|
|
826
826
|
.pipe(catchError((err) => {
|
|
827
|
-
this.loggingIn.set(false);
|
|
828
827
|
return throwError(() => err);
|
|
829
828
|
}), map((r) => {
|
|
830
829
|
if (r.success) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils-evolution.common.mjs","sources":["../../../projects/ars-utils/evolution.common/common/messages.ts","../../../projects/ars-utils/evolution.common/common/definitions.ts","../../../projects/ars-utils/evolution.common/common/services/evolution.service.ts","../../../projects/ars-utils/evolution.common/common/interceptors/auth.interceptor.ts","../../../projects/ars-utils/evolution.common/common/common.module.ts","../../../projects/ars-utils/evolution.common/public_api.ts","../../../projects/ars-utils/evolution.common/arsedizioni-ars-utils-evolution.common.ts"],"sourcesContent":["export const EvolutionMessages = {\r\n // Error\r\n ERROR: '§evo-error',\r\n\r\n // Login\r\n LOGIN_CHANGED: '§evo-login-changed',\r\n LOGIN_COMPLETED: '§evo-login-completed',\r\n LOGOUT_COMPLETED: '§evo-logout-completed',\r\n LOGIN_PENDING: '§evo-login-pending',\r\n LOGOUT: '§evo-logout'\r\n};\r\n","import { LoginResult, QueryModel, SendToModel } from '@arsedizioni/ars-utils/core';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\n\r\n\r\nexport enum EvolutionLoginFlags {\r\n None = 0,\r\n RememberCredentials = 1,\r\n DisableMfa = 1 << 1,\r\n ExtendMfaValidity = 1 << 2,\r\n ExtendRememberCredentialsValidity = 1 << 3,\r\n}\r\n\r\nexport interface EvolutionLoginResult extends LoginResult<EvolutionUserInfo> {\r\n // Compatibility\r\n token?: string;\r\n}\r\n\r\nexport interface EvolutionLoginInfo {\r\n context: EvolutionUserInfo;\r\n oauth?: LoginOAuthType ;\r\n remember?: boolean;\r\n}\r\n\r\nexport interface EvolutionUserLink {\r\n id?: number ;\r\n userId: number;\r\n userName?: string ;\r\n key: string;\r\n}\r\n\r\nexport interface EvolutionUserModuleInfo {\r\n name: string;\r\n module: number;\r\n level: number;\r\n hidden: boolean;\r\n}\r\n\r\n\r\nexport interface EvolutionLicenceModuleInfo {\r\n module: ERPModule;\r\n name: string;\r\n availableUsers: number;\r\n usedUsers: number;\r\n availableOption1?: number ;\r\n usedOption1?: number ;\r\n availableOption2?: number ;\r\n usedOption2?: number ;\r\n availableOption3?: number ;\r\n usedOption3?: number ;\r\n}\r\n\r\nexport interface EvolutionUserInfo {\r\n licenceId: number;\r\n userId: number;\r\n companyName: string;\r\n firstName: string;\r\n fullName: string;\r\n flags?: number ;\r\n email: string;\r\n sessionId?: string ;\r\n isTemporary?: boolean ;\r\n role: number;\r\n scope: number;\r\n roleName: string;\r\n roleLevel: number;\r\n allowedModules: EvolutionUserModuleInfo[];\r\n dashboard?: number ;\r\n dashboard2?: string ;\r\n code?: string ;\r\n subjectId?: number ;\r\n subjectName?: string ;\r\n siteId?: number ;\r\n siteName?: string ;\r\n siteCostCenter?: string ;\r\n departmentId?: number ;\r\n departmentName?: string ;\r\n expiryDate?: string ;\r\n isExpired?: boolean ;\r\n isAdministrator?: boolean ;\r\n isPowerUser?: boolean ;\r\n isObserver?: boolean ;\r\n isUser?: boolean ;\r\n isSupportUser?: boolean ;\r\n isGod?: boolean ;\r\n administrators: string;\r\n availableModules: EvolutionLicenceModuleInfo[];\r\n availableEmployees: number;\r\n usedEmployees: number;\r\n availableStorage: number;\r\n usedStorage: number;\r\n}\r\n\r\n\r\n\r\nexport enum EvolutionServiceFlags {\r\n None = 0,\r\n NotifySystemErrors = 1,\r\n DisplayConnectionStateMessages = 1 << 1\r\n\r\n}\r\n\r\nexport enum ERPModule {\r\n Formazione = 1,\r\n DPI = 1 << 1,\r\n SorveglianzaSanitaria = 1 << 2,\r\n RegistroEScadenzario = 1 << 3,\r\n AttrezzatureEImpianti = 1 << 4,\r\n Monitoraggio = 1 << 5,\r\n Bollettino = 1 << 6,\r\n Documenti = 1 << 7\r\n\r\n}\r\n\r\nexport interface EvolutionPlaceable {\r\n licenceId?: number ;\r\n companyName?: string ;\r\n subjectId?: number ;\r\n subjectName?: string ;\r\n siteId?: number ;\r\n siteName?: string ;\r\n departmentId?: number ;\r\n departmentName?: string ;\r\n placeId?: number ;\r\n}\r\n\r\nexport enum ERPExportType\r\n{\r\n Basic = 1,\r\n Detailed = 8,\r\n Complete = 9,\r\n Labels = 10,\r\n EmployeesCoursesMatrix = 21,\r\n EmployeesCoursesHoursMatrix = 22,\r\n EmployeesPPEsMatrix = 23,\r\n EmployeesHealthChecksMatrix = 24,\r\n TasksCoursesMatrix = 31,\r\n Training = 101,\r\n TrainingExpired = 102,\r\n TrainingExpiring = 103,\r\n TrainingAbsents = 104,\r\n TrainingClosed = 105,\r\n TrainingCurrentYear = 108,\r\n TrainingNextYear = 109,\r\n TrainingAnnualPlannng = 110,\r\n EquipmentsActivitiesCompleted = 201,\r\n EquipmentsChecksMatrix = 202,\r\n RSNormsUsage = 301,\r\n RSNormsSitesMatrix = 302,\r\n RSNormsSummary = 303,\r\n MonitoringLaws = 401,\r\n MonitoringActivities = 402,\r\n MonitoringSummary = 403,\r\n PPEs = 501,\r\n ComplianceStatistics = 601,\r\n HealthChecks = 701,\r\n}\r\n\r\nexport enum ERPExportFormat\r\n{\r\n Csv = 1,\r\n Word = 2,\r\n Pdf = 3\r\n}\r\n\r\nexport enum ERPExportSource\r\n{\r\n All = 1,\r\n Query = 2,\r\n Selection = 3\r\n}\r\n\r\nexport enum ERPExportPart\r\n{\r\n IncludeRisks = 101,\r\n IncludeTasks = 102,\r\n IncludeTaskHistory = 103,\r\n IncludeTrainingRequired = 111,\r\n IncludeTrainingDone = 112,\r\n SelectedEmployeeCourses = 121,\r\n IncludeDisabledEmployees = 131,\r\n IncludeDismissedEmployees = 132,\r\n IncludeDocumentUpdates = 201,\r\n ExcludeNonApplicableOrAcknowledged = 202,\r\n ExcluteAbblicabilityTable = 203,\r\n IncludeActivities = 204,\r\n GroupLaws = 205,\r\n IncludeApplicableOrAcknowledgedOnly = 4301,\r\n IncludePPEs = 501,\r\n IncludeHealthChecks = 601\r\n}\r\n\r\nexport interface EvolutionExportModel<T> extends SendToModel {\r\n searchParams: T;\r\n selection?: number[] ;\r\n type: ERPExportType;\r\n sort?: number ;\r\n source: ERPExportSource;\r\n format: ERPExportFormat;\r\n parts?: ERPExportPart[] ;\r\n automateReport?: boolean ;\r\n automatedReportId?: number ;\r\n automatedReportSheetName?: string;\r\n formatExtension?: string ; \r\n}\r\n\r\nexport enum ERPComplianceLawsSelectionType {\r\n Analysis = 1,\r\n Activity = 2,\r\n}\r\n\r\nexport enum ERPComplianceProfileRole {\r\n None = 0,\r\n Analyst = 1,\r\n Planner = 1 << 1,\r\n Validator = 1 << 2,\r\n Executor = 1 << 3,\r\n Observer = 1 << 4,\r\n}\r\n\r\nexport enum ERPComplianceProfileFlags {\r\n\r\n OverrideNotificationRegisterSettings = 1 << 4,\r\n}\r\n\r\nexport enum ERPComplianceScope {\r\n None = 0,\r\n Environment = 1,\r\n Safety = 1 << 1,\r\n FoodSafety = 1 << 2,\r\n Energy = 1 << 3,\r\n Health = 1 << 4,\r\n Maintenance = 1 << 5,\r\n Quality = 1 << 6,\r\n Organization = 1 << 7,\r\n Logistics = 1 << 8,\r\n Facility = 1 << 9,\r\n Security = 1 << 10,\r\n GenderEquality = 1 << 11,\r\n AntiCorruption = 1 << 12,\r\n Sustainability = 1 << 13,\r\n InformationSecurity = 1 << 14\r\n}\r\n\r\nexport enum ERPComplianceNotificationLimit {\r\n None = 0,\r\n PlannerOnly = 1,\r\n ExecutorOnly = 2,\r\n Both = 3,\r\n}\r\n\r\nexport enum ERPComplianceRegisterNotificationType {\r\n None = 0,\r\n NewAnalysis = 1,\r\n AnalysisCompleted = 1 << 1,\r\n AnalysisNoticePeriodStarted = 1 << 2,\r\n AnalysisPeriodExpired = 1 << 3,\r\n AnalysisLawChanged = 1 << 14,\r\n NewPlanning = 1 << 13,\r\n PlanningCompleted = 1 << 4,\r\n PlanningNoticePeriodStarted = 1 << 5,\r\n PlanningPeriodExpired = 1 << 6,\r\n NewValidation = 1 << 15,\r\n ValidationCompleted = 1 << 7,\r\n ValidationNoticePeriodStarted = 1 << 8,\r\n ValidationPeriodExpired = 1 << 9,\r\n NewDeadline = 1 << 16,\r\n DeadlineNoticePeriodStarted = 1 << 10,\r\n DeadlineExpired = 1 << 11,\r\n ActivityCompleted = 1 << 12,\r\n //NewNoncompliance = 1 << 17,\r\n //NonComplianceNoticePeriodStarted = 1 << 18,\r\n //NonCompliancePeriodExpired = 1 << 19,\r\n //NonComplianceCompleted = 1 << 20,\r\n LawChanged = 1 << 21,\r\n}\r\n\r\nexport enum ERPComplianceRegisterSiteImportOptions {\r\n CopyAttachments = 1,\r\n KeepOriginalDates = 1 << 1,\r\n DuplicateLaws = 1 << 2,\r\n DiscardNotApplicables = 1 << 3\r\n}\r\n\r\nexport const EvolutionComplianceProfileRoles = [\r\n { name: 'Analista', value: ERPComplianceProfileRole.Analyst },\r\n { name: 'Gestore', value: ERPComplianceProfileRole.Planner },\r\n //{ name: 'Validatore', value: ERPComplianceProfileRole.Validator },\r\n { name: 'Esecutore', value: ERPComplianceProfileRole.Executor },\r\n { name: 'Osservatore', value: ERPComplianceProfileRole.Observer },\r\n];\r\n\r\nexport const EvolutionComplianceProfileFlags = [\r\n { name: 'Deroghe e limitazioni', divider: true },\r\n {\r\n name:\r\n 'Questo profilo riceve regolarmente le notifiche indipendentemente dalla configurazione generale del registro',\r\n value: ERPComplianceProfileFlags.OverrideNotificationRegisterSettings,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceScopes = [\r\n { name: 'Ambiente', value: ERPComplianceScope.Environment },\r\n { name: 'Salute e sicurezza', value: ERPComplianceScope.Safety },\r\n {\r\n name: 'Sicurezza alimentare',\r\n value: ERPComplianceScope.FoodSafety,\r\n },\r\n { name: 'Energia', value: ERPComplianceScope.Energy },\r\n { name: 'Servizi generali', value: ERPComplianceScope.Facility },\r\n { name: 'Manutenzione', value: ERPComplianceScope.Maintenance },\r\n { name: 'Qualità', value: ERPComplianceScope.Quality },\r\n { name: 'Organizzazione', value: ERPComplianceScope.Organization },\r\n { name: 'Logistica', value: ERPComplianceScope.Logistics },\r\n { name: 'Security', value: ERPComplianceScope.Security },\r\n { name: \"Anticorruzione\", value: ERPComplianceScope.AntiCorruption },\r\n { name: \"Sostenibilità\", value: ERPComplianceScope.Sustainability },\r\n { name: \"Parità di genere\", value: ERPComplianceScope.GenderEquality },\r\n { name: \"Sicurezza dell'informazione\", value: ERPComplianceScope.InformationSecurity },\r\n\r\n];\r\n\r\nexport const EvolutionComplianceNotificationLimits = [\r\n { name: 'Nessuna limitazione', value: ERPComplianceNotificationLimit.None },\r\n {\r\n name: 'Solo gestore che ha pianificato',\r\n value: ERPComplianceNotificationLimit.PlannerOnly,\r\n },\r\n {\r\n name: \"Solo all'incaricato designato\",\r\n value: ERPComplianceNotificationLimit.ExecutorOnly,\r\n },\r\n {\r\n name: 'Solo a gestore e incaricato designato',\r\n value: ERPComplianceNotificationLimit.Both,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceNotifications = [\r\n { name: 'Verifica applicabilità e analisi', divider: true },\r\n {\r\n name: 'Richiesta analisi',\r\n value: ERPComplianceRegisterNotificationType.NewAnalysis,\r\n },\r\n {\r\n name: \"Preavviso: sta per scadere il termine fissato per l'analisi\",\r\n value: ERPComplianceRegisterNotificationType.AnalysisNoticePeriodStarted,\r\n },\r\n {\r\n name: \"Allarme: è scaduto il termine fissato per l'analisi\",\r\n value: ERPComplianceRegisterNotificationType.AnalysisPeriodExpired,\r\n },\r\n {\r\n name: 'Analisi completata',\r\n value: ERPComplianceRegisterNotificationType.AnalysisCompleted,\r\n },\r\n {\r\n name: 'Avviso norma modificata dal legislatore',\r\n value: ERPComplianceRegisterNotificationType.AnalysisLawChanged,\r\n },\r\n { name: 'Pianificazioni', divider: true },\r\n {\r\n name: 'Richiesta gestione',\r\n value: ERPComplianceRegisterNotificationType.NewPlanning,\r\n },\r\n {\r\n name: 'Preavviso: sta per scadere il termine fissato per la gestione',\r\n value: ERPComplianceRegisterNotificationType.PlanningNoticePeriodStarted,\r\n },\r\n {\r\n name: 'Allarme: è scaduto il termine fissato per la gestione',\r\n value: ERPComplianceRegisterNotificationType.PlanningPeriodExpired,\r\n },\r\n {\r\n name: 'Gestione completata',\r\n value: ERPComplianceRegisterNotificationType.PlanningCompleted,\r\n },\r\n {\r\n name: 'Attività completata',\r\n value: ERPComplianceRegisterNotificationType.ActivityCompleted,\r\n },\r\n /*{ name: 'Gestione non conformità', divider: true },\r\n {\r\n name: 'Apertura non comformità',\r\n value: ERPComplianceRegisterNotificationType.NewNoncompliance,\r\n },\r\n {\r\n name:\r\n \"Preavviso: sta per scadere il termine fissato per l'azione correttiva\",\r\n value:\r\n ERPComplianceRegisterNotificationType.NonComplianceNoticePeriodStarted,\r\n },\r\n {\r\n name: \"Allarme: è scaduto il termine fissato per l'azione correttiva\",\r\n value: ERPComplianceRegisterNotificationType.NonCompliancePeriodExpired,\r\n },\r\n {\r\n name: 'Chiusura non conformità',\r\n value: ERPComplianceRegisterNotificationType.NonComplianceCompleted,\r\n },*/\r\n /*{ name: 'Approvazioni', divider: true },\r\n { name: 'Richiesta approvazione', value: 1 << 14 },\r\n {\r\n name: \"Preavviso: sta per scadere il termine fissato per l'approvazione\",\r\n value: ERPComplianceRegisterNotificationType.ValidationNoticePeriodStarted,\r\n },\r\n {\r\n name: \"Allarme: è scaduto il termine fissato per l'approvazione\",\r\n value: ERPComplianceRegisterNotificationType.ValidationPeriodExpired,\r\n },\r\n {\r\n name: 'Approvazione concessa o negata',\r\n value: ERPComplianceRegisterNotificationType.ValidationCompleted,\r\n },*/\r\n { name: 'Scadenze', divider: true },\r\n {\r\n name: 'Preavviso: 1° promemoria sulla data di scadenza',\r\n value: ERPComplianceRegisterNotificationType.NewValidation,\r\n },\r\n {\r\n name: 'Avviso: 2° promemoria sulla data di scadenza',\r\n value: ERPComplianceRegisterNotificationType.DeadlineNoticePeriodStarted,\r\n },\r\n {\r\n name: 'Allarme: è scaduto il termine',\r\n value: ERPComplianceRegisterNotificationType.DeadlineExpired,\r\n },\r\n { name: 'Norme collegate', divider: true },\r\n {\r\n name: 'Modifica o abrogazione',\r\n value: ERPComplianceRegisterNotificationType.LawChanged,\r\n },\r\n\r\n];\r\n\r\nexport enum ERPComplianceLawState {\r\n ApplicableOrAknowledged = 1,\r\n NotApplicable = 2,\r\n NotAnalyzed = 3,\r\n ExpiredAnalysis = 4,\r\n UpdatedLaws = 5,\r\n Analyzed = 6,\r\n Abrogated = 7,\r\n Applicable = 8,\r\n Aknowledged = 9\r\n}\r\n\r\nexport enum ERPComplianceLawOrigin {\r\n National = 1,\r\n EU = 2,\r\n Regional = 3,\r\n Local = 4,\r\n Technical = 5,\r\n Voulontary = 6,\r\n Internal = 7,\r\n Other = 8,\r\n}\r\n\r\nexport const EvolutionComplianceLawStates = [\r\n { name: 'Applicabile', value: ERPComplianceLawState.Applicable },\r\n { name: 'Da conoscere', value: ERPComplianceLawState.Aknowledged },\r\n {\r\n name: 'Applicabile / da conoscere',\r\n value: ERPComplianceLawState.ApplicableOrAknowledged,\r\n },\r\n { name: 'Non applicabile', value: ERPComplianceLawState.NotApplicable },\r\n { name: 'Abrogata', value: ERPComplianceLawState.Abrogated },\r\n { name: 'Analizzata', value: ERPComplianceLawState.Analyzed },\r\n { name: 'Da definire', value: ERPComplianceLawState.NotAnalyzed },\r\n { name: 'In ritardo', value: ERPComplianceLawState.ExpiredAnalysis },\r\n {\r\n name: 'Con aggiornamenti pendenti',\r\n value: ERPComplianceLawState.UpdatedLaws,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceLawOrigins = [\r\n { name: 'Nazionale', value: ERPComplianceLawOrigin.National },\r\n { name: 'Comunitaria', value: ERPComplianceLawOrigin.EU },\r\n { name: 'Regionale', value: ERPComplianceLawOrigin.Regional },\r\n { name: 'Locale', value: ERPComplianceLawOrigin.Local },\r\n { name: 'Tecnica', value: ERPComplianceLawOrigin.Technical },\r\n { name: 'Interna', value: ERPComplianceLawOrigin.Internal },\r\n { name: 'Volontaria', value: ERPComplianceLawOrigin.Voulontary },\r\n { name: 'Altro', value: ERPComplianceLawOrigin.Other },\r\n];\r\n\r\nexport const EvolutionComplianceLawChangeStates = [\r\n { name: 'Aperto', value: 1 },\r\n { name: 'Chiuso', value: 2 },\r\n];\r\n\r\nexport enum ERPComplianceActivityState {\r\n NotPlanned = 1 << 7,\r\n Closed = 1 << 2,\r\n Expired = 1 << 3,\r\n Planned = 1 << 8,\r\n Cancelled = 1 << 9,\r\n UpdatedLaws = 1 << 10,\r\n AlreadyManaged = 1 << 11\r\n}\r\n\r\nexport const EvolutionComplianceActivityStates = [\r\n {\r\n name: 'Da definire',\r\n value: ERPComplianceActivityState.NotPlanned,\r\n },\r\n {\r\n name: 'Pianificata',\r\n value: ERPComplianceActivityState.Planned,\r\n },\r\n {\r\n name: 'Chiusa',\r\n value: ERPComplianceActivityState.Closed,\r\n },\r\n {\r\n name: 'In ritardo',\r\n value: ERPComplianceActivityState.Expired,\r\n },\r\n {\r\n name: 'Annullata',\r\n value: ERPComplianceActivityState.Cancelled,\r\n },\r\n {\r\n name: 'Gestita separatamente',\r\n value: ERPComplianceActivityState.AlreadyManaged,\r\n },\r\n {\r\n name: 'Con aggiornamenti pendenti',\r\n value: ERPComplianceActivityState.UpdatedLaws,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceObligationTypes = [\r\n { name: 'Autorizzazione', value: 1 },\r\n { name: 'Verifiche periodiche manutentive', value: 2 },\r\n { name: 'Misure organizzative', value: 3 },\r\n { name: 'Controlli e misurazioni', value: 4 },\r\n { name: 'Entrata in vigore', value: 5 },\r\n { name: 'Documenti aziendali obbligatori', value: 6 },\r\n {\r\n name: 'Altri adempimenti formali (comunicazioni, dichiarazioni, ecc...)',\r\n value: 7,\r\n },\r\n { name: 'Altro', value: 99 },\r\n];\r\n\r\nexport const EvolutionComplianceObligationAuthorities = [\r\n { name: 'Agenzia ECHA', value: 1 },\r\n { name: 'Albo Nazionale dei Gestori Ambientali', value: 2 },\r\n { name: 'ARPA', value: 4 },\r\n { name: 'ASL', value: 5 },\r\n { name: 'Camera di Commercio', value: 8 },\r\n { name: 'Comando provinciale dei Vigili del Fuoco', value: 10 },\r\n { name: 'Comune', value: 13 },\r\n { name: 'Consorzi gestione rifiuti particolari', value: 14 },\r\n { name: 'Gestore del servizio', value: 21 },\r\n { name: 'Gestore della rete di trasmissione nazionale', value: 22 },\r\n { name: 'INAIL - IPSEMA - ISPESL', value: 23 },\r\n { name: 'ISPRA', value: 26 },\r\n { name: 'Ministero', value: 27 },\r\n { name: 'Genio civile', value: 30 },\r\n { name: 'Organo di vigilanza competente', value: 31 },\r\n { name: 'Provincia', value: 33 },\r\n { name: 'Regione', value: 35 },\r\n { name: 'Uffici tecnici di finanza', value: 36 },\r\n { name: 'Ispettorato del lavoro', value: 37 },\r\n { name: 'Comitato Regionale Tecnico VF', value: 38 },\r\n { name: 'Prefetto', value: 39 },\r\n { name: 'Organismo notificato', value: 40 },\r\n { name: 'Città Metropolitana', value: 41 },\r\n { name: 'Nessuna', value: 28 },\r\n { name: 'Altro', value: 3 }\r\n];\r\n\r\nexport enum ERPRecurrenceFrequencyType {\r\n Day = 1,\r\n Month = 2,\r\n Year = 3,\r\n}\r\nexport const EvolutionRecurrenceFrequencyTypes = [\r\n { name: 'Anni', value: ERPRecurrenceFrequencyType.Year },\r\n { name: 'Mesi', value: ERPRecurrenceFrequencyType.Month },\r\n { name: 'Giorni', value: ERPRecurrenceFrequencyType.Day },\r\n];\r\n\r\nexport enum ERPPlacePermission {\r\n None = 0,\r\n Denied = 1,\r\n Read = 2,\r\n Write = 3\r\n}\r\n\r\nexport enum ERPPlace {\r\n Subject = 1,\r\n Site = 2,\r\n Department = 3,\r\n Area = 4,\r\n Line = 5\r\n}\r\nexport interface EvolutionPermission {\r\n placeId: number;\r\n userId: number;\r\n allowRead: number;\r\n allowWrite: number;\r\n allowNone: number;\r\n}\r\n\r\nexport interface EvolutionPlacePermission extends EvolutionPermission {\r\n id: number;\r\n subjectId?: number;\r\n siteId?: number;\r\n departmentId?: number;\r\n mode: number;\r\n}\r\n\r\nexport interface EvolutionContextInfo {\r\n id: number;\r\n userId?: number;\r\n name: string;\r\n permission: EvolutionPermission;\r\n placePermission: ERPPlacePermission;\r\n costCenter: string;\r\n selected?: boolean;\r\n level?: number;\r\n levelTitle?: string;\r\n}\r\n\r\nexport class EvolutionComplianceContextInfo {\r\n licenceId?: number;\r\n licencedCompany?: string;\r\n registerTitle?: string;\r\n registerId?: number;\r\n siteName?: string;\r\n siteId?: number;\r\n userId?: number;\r\n items?: EvolutionContextInfo[];\r\n}\r\n\r\nexport interface EvolutionChangeContextModel {\r\n userId?: number ;\r\n licenceId?: number ;\r\n subjectId?: number ;\r\n siteId?: number ;\r\n registerId?: number ;\r\n role?: ERPComplianceProfileRole ;\r\n permission?: ERPPlacePermission ;\r\n option1Value?: number ;\r\n option2Value?: number ;\r\n option3Value?: number ;\r\n allowObservers?: boolean ;\r\n allowDisabled?: boolean ;\r\n}\r\n\r\nexport interface EvolutionChangeContextResultModel {\r\n items: EvolutionContextInfo[];\r\n}\r\n\r\nexport interface EvolutionComplianceRegister extends EvolutionPlaceable {\r\n id: number;\r\n title?: string;\r\n enableNotifications?: boolean;\r\n enableNotification1?: boolean;\r\n enableNotification2?: boolean;\r\n enableNotification3?: boolean;\r\n enableNotification4?: boolean;\r\n enableNotification5?: boolean;\r\n enableNotification7?: boolean;\r\n enableNotification8?: boolean;\r\n enableNotification9?: boolean;\r\n notification1NoticeDays?: number;\r\n notification2NoticeDays?: number;\r\n notification2Limit?: number;\r\n notification3NoticeDays?: number;\r\n notification4NoticeDays?: number;\r\n notification4Limit?: number;\r\n notification5NoticeDays?: number;\r\n notification5Limit?: number;\r\n notification6Limit?: number;\r\n notification8NoticeDays?: number;\r\n notification8Limit?: number;\r\n enableActivityLawsPopulation?: boolean;\r\n enableLawChangesTracking?: boolean;\r\n automationMode?: number;\r\n automationScope?: number;\r\n disabled?: boolean;\r\n created?: Date;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n totalSites?: number;\r\n totalProfiles?: number;\r\n sites?: EvolutionComplianceRegisterSite[];\r\n oldId?: string;\r\n isAutomationEnabled?: boolean;\r\n automationModeDescription?: string;\r\n automationScopeDescription?: string;\r\n context?: EvolutionComplianceContextInfo;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n}\r\n\r\nexport interface EvolutionRegisterProfileSiteInfo extends EvolutionContextInfo {\r\n\r\n}\r\n\r\nexport interface EvolutionRegisterProfileUserInfo {\r\n userId: number;\r\n name: string;\r\n sites: EvolutionRegisterProfileSiteInfo[];\r\n}\r\n\r\nexport interface ComplianceRegisterUsersResultModel {\r\n users: EvolutionRegisterProfileUserInfo[];\r\n sites: EvolutionRegisterProfileSiteInfo[];\r\n}\r\n\r\nexport interface EvolutionComplianceRegisterSite {\r\n id: number;\r\n complianceRegisterId?: number;\r\n complianceSiteId?: number;\r\n disabled?: boolean;\r\n created?: Date;\r\n licenceId?: number;\r\n subjectId?: number;\r\n subjectName: string;\r\n siteId?: number;\r\n siteName?: string;\r\n departmentId?: number;\r\n departmentName?: string;\r\n registerTitle?: string;\r\n placeId?: number;\r\n oldSiteId?: string;\r\n}\r\n\r\nexport interface EvolutionComplianceLaw extends EvolutionPlaceable {\r\n id?: number;\r\n state?: number;\r\n complianceRegisterId?: number;\r\n lot?: number;\r\n topicId?: string;\r\n topicPath?: string;\r\n topicName?: string;\r\n summary?: string;\r\n scope?: number;\r\n source?: string;\r\n references?: EvolutionComplianceLawReference[];\r\n originalLawId?: number ;\r\n originRegion?: string ;\r\n origin?: number ;\r\n originAlternativeDescription?: string ;\r\n description?: string ;\r\n documentShortTitle?: string ;\r\n documentTitle?: string ;\r\n documentNumber?: string ;\r\n documentDate?: Date ;\r\n documentLastUpdate?: string ;\r\n documentLastUpdateShortTitle?: string ;\r\n documentUpdateNotes?: string ;\r\n documentValidated?: boolean ;\r\n documentId?: string ;\r\n documentModel?: number ;\r\n documentReferences?: string ;\r\n documentNotes?: string ;\r\n documentForceGlobalCheckForUpdates?: boolean;\r\n complianceCheckItem1?: boolean ;\r\n complianceCheckItem2?: boolean ;\r\n complianceCheckItem3?: boolean ;\r\n complianceCheckItem4?: boolean ;\r\n complianceCheckItem5?: boolean ;\r\n complianceCheckItem6?: boolean ;\r\n complianceCheckItem7?: boolean ;\r\n complianceCheckItem8?: boolean ;\r\n complianceCheckItem9?: boolean ;\r\n complianceCheckItem10?: boolean ;\r\n complianceCheckItem11?: boolean ;\r\n complianceCheckItem12?: boolean ;\r\n alternativeComplianceCheckItem?: boolean ;\r\n alternativeComplianceDescription?: string ;\r\n applicability?: number ;\r\n analyzedBy?: string ;\r\n analystOperatorId?: number ;\r\n analysisExpiringDate?: Date ;\r\n analysisDate?: Date ;\r\n analysisNotes?: string ;\r\n analysisNoticeDate?: string ;\r\n group1?: string ;\r\n group2?: string ;\r\n count?: number ;\r\n created?: Date ;\r\n createdBy?: string ;\r\n lastUpdated?: Date ;\r\n lastUpdatedBy?: string ;\r\n}\r\n\r\nexport interface EvolutionQueryRegisterProfilesModel extends QueryModel {\r\n complianceRegisterId?: number;\r\n siteId?: number;\r\n userId?: number;\r\n licenceId?: number;\r\n name?: string;\r\n role?: number;\r\n allowObservers?: boolean;\r\n allowDisabled?: boolean;\r\n state?: number;\r\n}\r\n\r\nexport interface EvolutionComplianceRegisterProfile {\r\n id: number;\r\n licenceId?: number;\r\n userId?: number;\r\n passiveUserName?: string;\r\n passiveUserOperatorId?: number;\r\n complianceRegisterId?: number;\r\n complianceSiteId?: number;\r\n scopes?: number;\r\n selectedScopes?: number[];\r\n roles?: number;\r\n selectedRoles?: number[];\r\n notifications?: number;\r\n flags?: number;\r\n disabled?: boolean;\r\n created?: Date;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n subjectId?: number;\r\n subjectName?: string;\r\n siteId?: number;\r\n siteName?: string;\r\n siteDisabled?: boolean;\r\n departmentId?: number;\r\n departmentName?: string;\r\n passiveUserEmail?: string;\r\n placeId?: number;\r\n userEmail?: string;\r\n userOperatorId?: number;\r\n userDisabled?: boolean;\r\n registerDisabled?: boolean;\r\n registerTitle?: string;\r\n name?: string;\r\n scopeNames?: string;\r\n isAdministrator?: boolean;\r\n isObserver?: boolean;\r\n denied?: boolean;\r\n oldId?: string;\r\n operatorId?: number;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n context?: EvolutionComplianceContextInfo;\r\n}\r\nexport interface EvolutionComplianceLawDocumentInfo {\r\n documentId?: string;\r\n documentId2?: string;\r\n title2?: string;\r\n title1?: string;\r\n number?: string;\r\n date?: Date;\r\n origin?: number;\r\n originDescription?: string;\r\n originAlternativeDescription?: string;\r\n originRegion?: string;\r\n notes?: string;\r\n references?: EvolutionComplianceLawReference[];\r\n forceGlobalCheckForUpdates?: boolean;\r\n validated?: boolean;\r\n description?: string;\r\n}\r\n\r\nexport interface EvolutionComplianceLawsAddParams extends EvolutionComplianceLaw {\r\n context?: EvolutionComplianceContextInfo;\r\n documents?: EvolutionComplianceLawDocumentInfo[];\r\n shouldNotifyAnalysisCompletionAgain?: boolean;\r\n scopes?: number[];\r\n sites?: number[];\r\n registers?: number[];\r\n}\r\n\r\nexport interface EvolutionComplianceLaswExportParams extends EvolutionExportModel<any> {}\r\n\r\nexport interface EvolutionComplianceLawReference {\r\n id?: number ;\r\n complianceLawId?: number ;\r\n text: string;\r\n description?: string ;\r\n anchor: string;\r\n}\r\n\r\nexport interface EvolutionComplianceActivity extends EvolutionPlaceable {\r\n id: number;\r\n state: number;\r\n monitoringActivityId?: number;\r\n monitoringActivityTaskId?: number;\r\n complianceRegisterId?: number;\r\n childId?: number ;\r\n parentId?: number ;\r\n lot?: number ; \r\n summary?: string;\r\n scope?: number;\r\n topicId?: string ;\r\n topicPath?: string;\r\n topicName?: string;\r\n mandatory?: boolean ;\r\n obligationType?: number ;\r\n obligationAuthorityId?: number ;\r\n obligationNotes?: string;\r\n obligationCheckPoint?: boolean ;\r\n description?: string;\r\n deadlineRecurrent?: boolean ;\r\n deadlineFrequency?: number ;\r\n deadlineFrequencyType?: number ;\r\n deadlineFrequencyEndOfMonth?: boolean ;\r\n deadlineFirstNoticeDays?: number ;\r\n deadlineLastNoticeDays?: number ;\r\n deadlineFirstNoticeDate?: Date ;\r\n deadlineLastNoticeDate?: Date ;\r\n deadlineExpiringDate?: Date ;\r\n planningNoticeDate?: Date ;\r\n planningExpiringDate?: Date ;\r\n planningDate?: Date ;\r\n plannedBy?: string;\r\n plannerOperatorId?: number ;\r\n planningApplicability?: number ;\r\n planningNotificationAdditionalEmailHeader?: string;\r\n planningNotificationAdditionalEmails?: string;\r\n planningNotificationAdditionalEmailsForAlertsOnly?: string;\r\n planningNamedExecutorOperatorId?: number ;\r\n planningNamedExecutorName?: string;\r\n planningNamedExecutorManagerOperatorId?: number ;\r\n planningNamedExecutorManagerName?: string;\r\n planningScheduleNextFromExecutionDate?: boolean ;\r\n planningNotes?: string;\r\n executorOperatorId?: number ;\r\n executed?: boolean;\r\n executedBy?: string;\r\n executionDate?: Date;\r\n externalReference?: string;\r\n externalDescription?: string;\r\n group1?: string;\r\n group2?: string;\r\n notes?: string;\r\n created?: Date;\r\n createdBy?: string;\r\n lastUpdated?: Date ;\r\n lastUpdatedBy?: string;\r\n\r\n}\r\n\r\nexport interface EvolutionComplianceActivitiesAddParams extends EvolutionComplianceActivity {\r\n context?: EvolutionComplianceContextInfo;\r\n complianceLawId?: number;\r\n monitoringLawId?: number;\r\n enableLawChangesTracking?: boolean;\r\n enableActivityLawsPopulation?: boolean;\r\n shouldNotifyPlanningCompletionAgain?: boolean;\r\n scopes?: number[];\r\n sites?: number[];\r\n registers?: number[];\r\n document?: EvolutionComplianceLawDocumentInfo;\r\n}","import { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { inject, Injectable, OnDestroy, signal } from '@angular/core';\r\nimport { ApiResult, BroadcastMessageInfo, BroadcastService, FolderTree, INode, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { EMPTY, of, Subscription, throwError } from 'rxjs';\r\nimport { catchError, finalize, map } from 'rxjs/operators';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\nimport { EvolutionChangeContextModel, EvolutionChangeContextResultModel, EvolutionComplianceActivitiesAddParams, EvolutionComplianceActivity, EvolutionComplianceLaw, EvolutionComplianceLawsAddParams, EvolutionComplianceRegister, EvolutionComplianceRegisterProfile, EvolutionLoginFlags, EvolutionLoginInfo, EvolutionLoginResult, EvolutionQueryRegisterProfilesModel, EvolutionServiceFlags, EvolutionUserLink } from './../definitions';\r\nimport { EvolutionMessages } from '../messages';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class EvolutionService implements OnDestroy {\r\n\r\n\r\n private httpClient = inject(HttpClient);\r\n private broadcastService = inject(BroadcastService);\r\n private broadcastServiceSubscription?: Subscription;\r\n private dialogService = inject(DialogService);\r\n\r\n private _serviceUri: string = undefined;\r\n get serviceUri(): string {\r\n return this._serviceUri;\r\n }\r\n private _flags: EvolutionServiceFlags = EvolutionServiceFlags.None;\r\n get flags(): EvolutionServiceFlags {\r\n return this._flags;\r\n }\r\n private _loginInfo?: EvolutionLoginInfo;\r\n get loginInfo(): EvolutionLoginInfo | undefined {\r\n if (!this._loginInfo) {\r\n const loginInfo = localStorage.getItem('evolution_context');\r\n if (loginInfo) {\r\n try {\r\n this._loginInfo = JSON.parse(loginInfo) as EvolutionLoginInfo;\r\n } catch { }\r\n }\r\n }\r\n return this._loginInfo;\r\n }\r\n public readonly loggedIn = signal<boolean>(false);\r\n public readonly loggingIn = signal<boolean>(false);\r\n private keepAlive = 0;\r\n\r\n\r\n\r\n ngOnDestroy() {\r\n if (this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription.unsubscribe();\r\n }\r\n this.removeKeepAlive();\r\n }\r\n\r\n /**\r\n * Initialize service\r\n * @param serviceUri : the service uri\r\n * @param flags: the service flags. Default is none.\r\n */\r\n initialize(\r\n serviceUri: string,\r\n flags: EvolutionServiceFlags = EvolutionServiceFlags.None) {\r\n // Create unique client id\r\n if (!localStorage.getItem('evolution_client_id')) {\r\n localStorage.setItem('evolution_client_id', SystemUtils.generateUUID());\r\n }\r\n\r\n // Initialize\r\n this._serviceUri = serviceUri;\r\n this._flags = flags;\r\n\r\n // React to message broadcasting\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message: BroadcastMessageInfo) => {\r\n if (message.id === EvolutionMessages.LOGIN_CHANGED) {\r\n this.login(\r\n null,\r\n null,\r\n true).subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n if (r.message) {\r\n this.dialogService.error(r.message, null, \"Errore di Evolution\");\r\n }\r\n } else {\r\n if ((this.flags & EvolutionServiceFlags.DisplayConnectionStateMessages) > 0) {\r\n this.dialogService.toast('Connesso a Evolution', 1500, 'power');\r\n }\r\n }\r\n },\r\n error: () => { console.error(\"Evolution non disponibile.\") } // Avoid unwanted errors on client\r\n });\r\n } else if (message.id === EvolutionMessages.LOGOUT) {\r\n if (this.loggedIn()) {\r\n this.logout().subscribe(r => {\r\n if (!r.success) {\r\n if (r.message) {\r\n this.dialogService.error(\"<p>\" + r.message + \"</p><br><br><hr><p class='small'><i>Per eliminare la configurazione di Evolution accedere a:<br><b>menu > personalizza > collegamenti</b></i></p>\", null, \"Errore di Evolution\");\r\n }\r\n } else {\r\n if ((this.flags & EvolutionServiceFlags.DisplayConnectionStateMessages) > 0) {\r\n this.dialogService.toast('Disconnesso da Evolution', 1500, 'power_off');\r\n }\r\n }\r\n });\r\n } else {\r\n this.clear();\r\n }\r\n }\r\n });\r\n }\r\n\r\n // Eveluate current session storage in case of page refresh (F5)\r\n const tokenExpirationDate = this.getTokenExpirationDate();\r\n const tokenExpired = !tokenExpirationDate || tokenExpirationDate.getTime() < Date.now();\r\n if (!tokenExpired || this.loggedIn()) {\r\n // Auto login\r\n this.loggedIn.set(true);\r\n // Keep alive\r\n this.setKeepAlive();\r\n // Notify \r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_COMPLETED);\r\n }\r\n }\r\n\r\n /**\r\n * Get access token expiration date\r\n */\r\n private getTokenExpirationDate(): Date | undefined {\r\n const token = this.getAuthToken();\r\n if (!token) return undefined;\r\n // Parse json object from base64 encoded jwt token\r\n const jwtToken = JSON.parse(atob(token.split('.')[1]));\r\n // Set a timeout to refresh the token a minute before it expires\r\n return new Date(jwtToken.exp * 1000);\r\n }\r\n\r\n\r\n /**\r\n * Set keep alive\r\n */\r\n private setKeepAlive() {\r\n // Keep alive every 1 min\r\n if (this.keepAlive === 0) {\r\n this.keepAlive = window.setInterval(\r\n () => {\r\n this.ping();\r\n }, 1000 * 60 * 5);\r\n }\r\n }\r\n\r\n /**\r\n * Remove keep alive\r\n */\r\n private removeKeepAlive() {\r\n if (this.keepAlive > 0) {\r\n window.clearInterval(this.keepAlive);\r\n this.keepAlive = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Ping\r\n */\r\n ping() {\r\n this.httpClient.get<ApiResult<number>>(\r\n this._serviceUri + '/ping?nocache=' + SystemUtils.generateUUID()\r\n )\r\n .pipe(catchError(() => { return EMPTY }))\r\n .subscribe();\r\n }\r\n\r\n\r\n /**\r\n* Set auth token\r\n* @param value : the login result\r\n*/\r\n private setToken(value: EvolutionLoginResult) {\r\n if (value.authToken ?? value.token) {\r\n sessionStorage.setItem('evolution_auth', value.authToken ?? value.token);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Return current auth token\r\n */\r\n getAuthToken(): string | undefined {\r\n let token = sessionStorage.getItem('evolution_auth');\r\n if (token && token[0] === '\"') {\r\n return token.substring(1, token.length - 1);\r\n }\r\n return token;\r\n }\r\n\r\n /**\r\n * Store login info\r\n */\r\n storeContext() {\r\n localStorage.setItem('evolution_context', JSON.stringify(this._loginInfo));\r\n }\r\n\r\n\r\n /**\r\n * Update context\r\n * @param result: the new context\r\n */\r\n updateContext(result: EvolutionLoginResult) {\r\n if (!this._loginInfo) {\r\n this._loginInfo = { context: undefined };\r\n }\r\n this._loginInfo.context = result.context\r\n this.setToken(result);\r\n this.storeContext();\r\n }\r\n\r\n /**\r\n * Perform auto login using current link data\r\n * @param onSuccess: function to execute on seccess\r\n */\r\n autoLogin(onSuccess?: Function) {\r\n this.login(null, null, true)\r\n .pipe(finalize(() => this.dialogService.clearBusy()))\r\n .subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n this.dialogService.error(r.message, null, \"Errore in Evolution\");\r\n } else {\r\n if (!r.value.requiresMfa) {\r\n this.dialogService.toast('Connesso ad Evolution', 1500, 'power');\r\n }\r\n if (onSuccess) {\r\n onSuccess();\r\n }\r\n }\r\n },\r\n error: () => { this.dialogService.error(\"Evolution non disponibile.\") }\r\n });\r\n return true;\r\n }\r\n\r\n /**\r\n * Perform auto logout\r\n * @param onSuccess: function to execute on seccess\r\n */\r\n autoLogout(onSuccess?: Function) {\r\n if (!this.loggedIn()) return;\r\n this.logout()\r\n .pipe(\r\n finalize(() => this.dialogService.clearBusy()),\r\n map(r => { this.clear(); return r }))\r\n .subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_CHANGED);\r\n this.dialogService.error(r.message, null, \"Errore in Evolution\");\r\n } else {\r\n this.dialogService.toast('Disconnesso da Evolution', 1500, 'power_off');\r\n }\r\n },\r\n complete: () => {\r\n this.clear()\r\n if (onSuccess) {\r\n onSuccess();\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Perform login \r\n * @param email: the optional email if using OAuth2\r\n * @parma password: the optional password if using OAuth2\r\n * @param remember: remember credentials \r\n * @param oauth: the optional open authentication supported\r\n * @param oauthAccessToken: the optional OAuth2 access token\r\n * @param flags: the optional login flags\r\n * @returns: the login result\r\n */\r\n login(email?: string,\r\n password?: string,\r\n remember?: boolean,\r\n oauth?: LoginOAuthType,\r\n oauthAccessToken: string | undefined = sessionStorage.getItem(\"evolution_oauth_token\") ?? undefined,\r\n flags: EvolutionLoginFlags | undefined = EvolutionLoginFlags.None) {\r\n if (remember) {\r\n flags |= EvolutionLoginFlags.RememberCredentials;\r\n }\r\n return this.httpClient\r\n .post<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/login2',\r\n {\r\n clientId: localStorage.getItem(\"evolution_client_id\"),\r\n user: oauth ? null : email,\r\n password: oauth ? null : password,\r\n remember: remember,\r\n oauth: oauth,\r\n flags: flags\r\n },\r\n {\r\n headers:\r\n !oauth || !oauthAccessToken\r\n ? new HttpHeaders()\r\n : new HttpHeaders()\r\n .set(\"Authorization\", oauthAccessToken ?? '')\r\n })\r\n .pipe(\r\n catchError(err => {\r\n this.loggingIn.set(false);\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<EvolutionLoginResult>) => {\r\n if (r.success) {\r\n if (!this._loginInfo) {\r\n this._loginInfo = { context: undefined }\r\n }\r\n this._loginInfo.oauth = oauth;\r\n this._loginInfo.remember = (flags & EvolutionLoginFlags.RememberCredentials) > 0;\r\n if (!oauth && r.value.requiresMfa) {\r\n // Notify login is pending\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_PENDING, { flags: flags });\r\n } else {\r\n // Complete login\r\n this.completeLogin(r.value);\r\n }\r\n }\r\n return r;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Complete login\r\n * @param result : the login result\r\n */\r\n private completeLogin(\r\n result: EvolutionLoginResult) {\r\n // Update context info \r\n this.updateContext(result);\r\n this.loggedIn.set(!result.context?.isTemporary);\r\n this.loggingIn.set(false);\r\n // Keep alive\r\n this.setKeepAlive();\r\n // Notify\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_COMPLETED);\r\n }\r\n\r\n\r\n /**\r\n * Confirm MFA procedure\r\n * @param code: the confirm code\r\n * @param flags: the login flags\r\n */\r\n confirmIdentity(code: string, flags: number = EvolutionLoginFlags.None) {\r\n return this.httpClient\r\n .post<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/login/confirm/' + code + '/?flags=' + flags,\r\n {},\r\n )\r\n .pipe(\r\n catchError((err) => {\r\n this.loggingIn.set(false);\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<EvolutionLoginResult>) => {\r\n if (r.success) {\r\n // Complete login\r\n this.completeLogin(r.value);\r\n }\r\n return r;\r\n }),\r\n );\r\n }\r\n\r\n /**\r\n * Perform logout\r\n */\r\n logout() {\r\n return this.httpClient.post<any>(this._serviceUri + '/logout', {}).pipe(\r\n finalize(() => {\r\n this.removeKeepAlive();\r\n this.clear();\r\n // Clean up\r\n localStorage.removeItem('evolution_context');\r\n }),\r\n catchError((_e) => {\r\n return of([]);\r\n }));\r\n }\r\n\r\n\r\n /**\r\n * Switch the current login to a new one with the same credentials except role possibly (context change)\r\n * @param id : new user id\r\n */\r\n loginSwitch(id: number) {\r\n return this.httpClient\r\n .post<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/login/switch/',\r\n {\r\n clientId: localStorage.getItem(\"evolution_client_id\"),\r\n userId: id,\r\n }\r\n )\r\n .pipe(\r\n catchError((err) => {\r\n this.loggingIn.set(false);\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<EvolutionLoginResult>) => {\r\n if (r.success) {\r\n // Update login\r\n this.completeLogin(r.value);\r\n }\r\n return r;\r\n })\r\n );\r\n }\r\n\r\n\r\n /**\r\n * Reset login refresh timer and login state\r\n */\r\n reset() {\r\n // Clear login info\r\n this._loginInfo = undefined;\r\n // Logged out\r\n this.loggedIn.set(false);\r\n // Notify\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGOUT_COMPLETED);\r\n }\r\n\r\n /**\r\n * Clear login data\r\n * @param clearOAuthToken: true to clear oauth token also\r\n */\r\n clear(clearOAuthToken: boolean = false) {\r\n // Clear local storage\r\n sessionStorage.removeItem('evolution_auth');\r\n sessionStorage.removeItem('evolution_refresh');\r\n sessionStorage.removeItem('evolution_oauth');\r\n if (clearOAuthToken) {\r\n sessionStorage.removeItem('evolution_oauth_token');\r\n }\r\n\r\n // Reset login\r\n this.reset();\r\n }\r\n\r\n /**\r\n * Perform token refresh\r\n */\r\n refresh() {\r\n return this.httpClient.get<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/refresh2'\r\n ).pipe(map((r: ApiResult<EvolutionLoginResult>) => {\r\n // Update token\r\n this.setToken(r.value);\r\n return r;\r\n }));\r\n }\r\n\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the subfolders group or null to root\r\n */\r\n toNodes(folders: INode[]): INode[] {\r\n return this._toNodes(folders, null);\r\n }\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the children group or null to root\r\n */\r\n private _toNodes(folders: INode[], parent?: INode): INode[] {\r\n let nodes: INode[] = [];\r\n folders.forEach(n => {\r\n let node: INode = {\r\n id: n.id,\r\n name: n.name,\r\n count: n.count,\r\n parent: parent,\r\n children: null,\r\n bag: n,\r\n };\r\n node.children =\r\n n.children && n.children.length > 0\r\n ? this._toNodes(n.children, node)\r\n : [];\r\n nodes.push(node);\r\n });\r\n return nodes;\r\n }\r\n\r\n /**\r\n * Retrieve the taxonomy\r\n */\r\n getTaxonomy() {\r\n return this.httpClient.get<ApiResult<FolderTree>>(\r\n this._serviceUri + '/taxonomy'\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve groups\r\n * @param group: the group number\r\n * @param register: the optional register id. Default is null.\r\n */\r\n getGroups(group: number = 1, register?: number) {\r\n return this.httpClient.get<ApiResult<string[]>>(\r\n this._serviceUri +\r\n (register\r\n ? '/compliance/groups/?group=' +\r\n group +\r\n '®ister=' +\r\n register\r\n : '/compliance/groups/?group=' + group)\r\n );\r\n }\r\n\r\n ////\r\n // CONTEXT\r\n ////\r\n /**\r\n * Change context\r\n */\r\n changeContext(params: EvolutionChangeContextModel) {\r\n return this.httpClient.post<ApiResult<EvolutionChangeContextResultModel>>(\r\n this._serviceUri + '/compliance/context',\r\n params\r\n );\r\n }\r\n\r\n ////\r\n // REGISTERS\r\n ////\r\n\r\n\r\n /**\r\n * Retrieve a register\r\n * @param id the register id\r\n */\r\n getRegister(id: number) {\r\n return this.httpClient.get<ApiResult<EvolutionComplianceRegister>>(\r\n this._serviceUri +\r\n '/compliance/registers/' + id\r\n );\r\n }\r\n\r\n\r\n /**\r\n * Collect register profiles\r\n * @param params parameters\r\n */\r\n collectRegisterProfiles(params: EvolutionQueryRegisterProfilesModel) {\r\n return this.httpClient.post<ApiResult<EvolutionComplianceRegisterProfile[]>>(\r\n this._serviceUri +\r\n '/compliance/registers/profiles/collect',\r\n params\r\n );\r\n }\r\n\r\n\r\n ////\r\n // LAWS\r\n ////\r\n\r\n /**\r\n * Add one or more laws\r\n * @param params parameters\r\n */\r\n addLaws(params: EvolutionComplianceLawsAddParams) {\r\n return this.httpClient.post<ApiResult<EvolutionComplianceLaw[]>>(\r\n this._serviceUri + '/compliance/laws/add',\r\n params\r\n );\r\n }\r\n\r\n ////\r\n // ACTIVITIES\r\n ////\r\n\r\n\r\n\r\n /**\r\n * Add one or more activities\r\n * @param params parameters\r\n */\r\n addActivities(params: EvolutionComplianceActivitiesAddParams) {\r\n return this.httpClient.post<ApiResult<EvolutionComplianceActivity>>(\r\n this._serviceUri + '/compliance/activities/add',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Export laws\r\n * @param params parameters\r\n */\r\n exportLaws(params: any) {\r\n return this.httpClient.post(\r\n this._serviceUri + '/compliance/laws/export',\r\n params,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n\r\n ///\r\n // LINKS\r\n ///\r\n\r\n /**\r\n * Save a user link\r\n * @param item: the user link\r\n */\r\n saveLink(item: EvolutionUserLink) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/account/links/save',\r\n item\r\n );\r\n }\r\n\r\n /**\r\n * Delete a user link\r\n * @param item: the user link\r\n */\r\n deleteLink(item: EvolutionUserLink) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/account/links/delete',\r\n item\r\n );\r\n }\r\n}\r\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { BroadcastService, ErrorInfo } from '@arsedizioni/ars-utils/core';\r\nimport { Observable, catchError, switchMap, throwError } from 'rxjs';\r\nimport { EvolutionService } from '../services/evolution.service';\r\nimport { EvolutionServiceFlags } from '../definitions';\r\nimport { EvolutionMessages } from '../messages';\r\n\r\n\r\n@Injectable()\r\nexport class EvolutionAuthInterceptor implements HttpInterceptor {\r\n private evolutionService = inject(EvolutionService);\r\n private broadcastService = inject(BroadcastService);\r\n private lastErrorTime: number = -1;\r\n\r\n intercept(\r\n request: HttpRequest<any>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<any>> {\r\n if (request.url.startsWith(this.evolutionService.serviceUri ?? '')) {\r\n request = request.clone({ withCredentials: true });\r\n return next.handle(this.addTokenToRequest(request))\r\n .pipe(\r\n catchError(error => {\r\n if (error.url.startsWith(this.evolutionService.serviceUri)) {\r\n if (\r\n error instanceof HttpErrorResponse &&\r\n !request.url.includes(\"/login\") &&\r\n error.status === 401\r\n ) {\r\n return this.handle401Error(request, next);\r\n }\r\n const errorStatus = parseInt(error.status ?? \"0\");\r\n if ((errorStatus > 0 && errorStatus < 500) || (this.evolutionService.flags & EvolutionServiceFlags.NotifySystemErrors) > 0) {\r\n const errorTime = new Date().getTime();\r\n if (errorTime - this.lastErrorTime > 5000) {\r\n this.lastErrorTime = errorTime;\r\n let message = \"\"\r\n switch (errorStatus) {\r\n case 0:\r\n message = \"In questo momento Evolution non è disponibile. Riprova tra qualche minuto.\";\r\n break;\r\n case 403:\r\n message = \"Non hai i permessi necessari per eseguire l'operazione richiesta.\";\r\n break;\r\n default:\r\n message = (error.error?.message ?? error.message ?? \"Impossibile eseguire l'operazione richiesta.\").replaceAll(\"\\r\\n\", \"</p><p>\");\r\n break;\r\n }\r\n this.broadcastService.sendMessage(\r\n EvolutionMessages.ERROR,\r\n {\r\n invalidateSession: errorStatus === 405 || errorStatus === 410,\r\n message: message,\r\n title: \"Errore in Clipper\",\r\n errorStatus: errorStatus,\r\n service: this.evolutionService.serviceUri\r\n } as ErrorInfo);\r\n }\r\n }\r\n }\r\n return throwError(() => error);\r\n }));\r\n }\r\n return next.handle(request);\r\n }\r\n\r\n /**\r\n * Handle 401 error\r\n * @param request : the request\r\n * @param next : the http handler\r\n */\r\n private handle401Error(request: HttpRequest<any>, next: HttpHandler) {\r\n if (this.evolutionService.loggedIn()) {\r\n return this.evolutionService.refresh().pipe(\r\n switchMap(() => {\r\n return next.handle(this.addTokenToRequest(request));\r\n }),\r\n catchError(error => {\r\n return throwError(() => error);\r\n })\r\n );\r\n }\r\n return next.handle(request);\r\n }\r\n\r\n /**\r\n * Add token to request\r\n * @param request : the request\r\n * @param token: the token or null to use curre3nt\r\n */\r\n private addTokenToRequest(\r\n request: HttpRequest<any>,\r\n token?: string\r\n ): HttpRequest<any> {\r\n if (request.url.startsWith(this.evolutionService.serviceUri ?? '')) {\r\n if (this.evolutionService.loggedIn()) {\r\n if (!token) token = this.evolutionService.getAuthToken();\r\n if (token) {\r\n return request.clone({\r\n setHeaders: {\r\n Authorization: 'Bearer ' + token,\r\n 'ngsw-bypass': 'ngsw-bypass'\r\n },\r\n });\r\n }\r\n }\r\n }\r\n return request;\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class EvolutionCommonModule {}\r\n\r\n// Other exports\r\nexport * from './messages';\r\nexport * from './definitions';\r\nexport * from './interceptors/auth.interceptor';\r\nexport * from './services/evolution.service';\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\n\r\nexport * from './common/common.module';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["catchError"],"mappings":";;;;;;;;AAAO,MAAM,iBAAiB,GAAG;;AAE/B,IAAA,KAAK,EAAE,YAAY;;AAGnB,IAAA,aAAa,EAAE,oBAAoB;AACnC,IAAA,eAAe,EAAE,sBAAsB;AACvC,IAAA,gBAAgB,EAAE,uBAAuB;AACzC,IAAA,aAAa,EAAE,oBAAoB;AACnC,IAAA,MAAM,EAAE;;;ICLE;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,mBAAA,CAAA,mBAAA,CAAA,qBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,qBAAuB;AACvB,IAAA,mBAAA,CAAA,mBAAA,CAAA,YAAA,CAAA,GAA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C,OAAO,CAAC;;AAG7B;;;;AAIG;IACK,iBAAiB,CACvB,OAAyB,EACzB,KAAc,EAAA;AAEd,QAAA,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE;AAClE,YAAA,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,EAAE;AACpC,gBAAA,IAAI,CAAC,KAAK;AAAE,oBAAA,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;gBACxD,IAAI,KAAK,EAAE;oBACT,OAAO,OAAO,CAAC,KAAK,CAAC;AACnB,wBAAA,UAAU,EAAE;4BACV,aAAa,EAAE,SAAS,GAAG,KAAK;AAChC,4BAAA,aAAa,EAAE;AAChB,yBAAA;AACF,qBAAA,CAAC;;;;AAIR,QAAA,OAAO,OAAO;;8GAlGL,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAxB,wBAAwB,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC;;;MCNY,qBAAqB,CAAA;8GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAArB,qBAAqB,EAAA,CAAA,CAAA;+GAArB,qBAAqB,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC;;;ACFD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils-evolution.common.mjs","sources":["../../../projects/ars-utils/evolution.common/common/messages.ts","../../../projects/ars-utils/evolution.common/common/definitions.ts","../../../projects/ars-utils/evolution.common/common/services/evolution.service.ts","../../../projects/ars-utils/evolution.common/common/interceptors/auth.interceptor.ts","../../../projects/ars-utils/evolution.common/common/common.module.ts","../../../projects/ars-utils/evolution.common/public_api.ts","../../../projects/ars-utils/evolution.common/arsedizioni-ars-utils-evolution.common.ts"],"sourcesContent":["export const EvolutionMessages = {\r\n // Error\r\n ERROR: '§evo-error',\r\n\r\n // Login\r\n LOGIN_CHANGED: '§evo-login-changed',\r\n LOGIN_COMPLETED: '§evo-login-completed',\r\n LOGOUT_COMPLETED: '§evo-logout-completed',\r\n LOGIN_PENDING: '§evo-login-pending',\r\n LOGOUT: '§evo-logout'\r\n};\r\n","import { LoginResult, QueryModel, SendToModel } from '@arsedizioni/ars-utils/core';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\n\r\n\r\nexport enum EvolutionLoginFlags {\r\n None = 0,\r\n RememberCredentials = 1,\r\n DisableMfa = 1 << 1,\r\n ExtendMfaValidity = 1 << 2,\r\n ExtendRememberCredentialsValidity = 1 << 3,\r\n}\r\n\r\nexport interface EvolutionLoginResult extends LoginResult<EvolutionUserInfo> {\r\n // Compatibility\r\n token?: string;\r\n}\r\n\r\nexport interface EvolutionLoginInfo {\r\n context: EvolutionUserInfo;\r\n oauth?: LoginOAuthType ;\r\n remember?: boolean;\r\n}\r\n\r\nexport interface EvolutionUserLink {\r\n id?: number ;\r\n userId: number;\r\n userName?: string ;\r\n key: string;\r\n}\r\n\r\nexport interface EvolutionUserModuleInfo {\r\n name: string;\r\n module: number;\r\n level: number;\r\n hidden: boolean;\r\n}\r\n\r\n\r\nexport interface EvolutionLicenceModuleInfo {\r\n module: ERPModule;\r\n name: string;\r\n availableUsers: number;\r\n usedUsers: number;\r\n availableOption1?: number ;\r\n usedOption1?: number ;\r\n availableOption2?: number ;\r\n usedOption2?: number ;\r\n availableOption3?: number ;\r\n usedOption3?: number ;\r\n}\r\n\r\nexport interface EvolutionUserInfo {\r\n licenceId: number;\r\n userId: number;\r\n companyName: string;\r\n firstName: string;\r\n fullName: string;\r\n flags?: number ;\r\n email: string;\r\n sessionId?: string ;\r\n isTemporary?: boolean ;\r\n role: number;\r\n scope: number;\r\n roleName: string;\r\n roleLevel: number;\r\n allowedModules: EvolutionUserModuleInfo[];\r\n dashboard?: number ;\r\n dashboard2?: string ;\r\n code?: string ;\r\n subjectId?: number ;\r\n subjectName?: string ;\r\n siteId?: number ;\r\n siteName?: string ;\r\n siteCostCenter?: string ;\r\n departmentId?: number ;\r\n departmentName?: string ;\r\n expiryDate?: string ;\r\n isExpired?: boolean ;\r\n isAdministrator?: boolean ;\r\n isPowerUser?: boolean ;\r\n isObserver?: boolean ;\r\n isUser?: boolean ;\r\n isSupportUser?: boolean ;\r\n isGod?: boolean ;\r\n administrators: string;\r\n availableModules: EvolutionLicenceModuleInfo[];\r\n availableEmployees: number;\r\n usedEmployees: number;\r\n availableStorage: number;\r\n usedStorage: number;\r\n}\r\n\r\n\r\n\r\nexport enum EvolutionServiceFlags {\r\n None = 0,\r\n NotifySystemErrors = 1,\r\n DisplayConnectionStateMessages = 1 << 1\r\n\r\n}\r\n\r\nexport enum ERPModule {\r\n Formazione = 1,\r\n DPI = 1 << 1,\r\n SorveglianzaSanitaria = 1 << 2,\r\n RegistroEScadenzario = 1 << 3,\r\n AttrezzatureEImpianti = 1 << 4,\r\n Monitoraggio = 1 << 5,\r\n Bollettino = 1 << 6,\r\n Documenti = 1 << 7\r\n\r\n}\r\n\r\nexport interface EvolutionPlaceable {\r\n licenceId?: number ;\r\n companyName?: string ;\r\n subjectId?: number ;\r\n subjectName?: string ;\r\n siteId?: number ;\r\n siteName?: string ;\r\n departmentId?: number ;\r\n departmentName?: string ;\r\n placeId?: number ;\r\n}\r\n\r\nexport enum ERPExportType\r\n{\r\n Basic = 1,\r\n Detailed = 8,\r\n Complete = 9,\r\n Labels = 10,\r\n EmployeesCoursesMatrix = 21,\r\n EmployeesCoursesHoursMatrix = 22,\r\n EmployeesPPEsMatrix = 23,\r\n EmployeesHealthChecksMatrix = 24,\r\n TasksCoursesMatrix = 31,\r\n Training = 101,\r\n TrainingExpired = 102,\r\n TrainingExpiring = 103,\r\n TrainingAbsents = 104,\r\n TrainingClosed = 105,\r\n TrainingCurrentYear = 108,\r\n TrainingNextYear = 109,\r\n TrainingAnnualPlannng = 110,\r\n EquipmentsActivitiesCompleted = 201,\r\n EquipmentsChecksMatrix = 202,\r\n RSNormsUsage = 301,\r\n RSNormsSitesMatrix = 302,\r\n RSNormsSummary = 303,\r\n MonitoringLaws = 401,\r\n MonitoringActivities = 402,\r\n MonitoringSummary = 403,\r\n PPEs = 501,\r\n ComplianceStatistics = 601,\r\n HealthChecks = 701,\r\n}\r\n\r\nexport enum ERPExportFormat\r\n{\r\n Csv = 1,\r\n Word = 2,\r\n Pdf = 3\r\n}\r\n\r\nexport enum ERPExportSource\r\n{\r\n All = 1,\r\n Query = 2,\r\n Selection = 3\r\n}\r\n\r\nexport enum ERPExportPart\r\n{\r\n IncludeRisks = 101,\r\n IncludeTasks = 102,\r\n IncludeTaskHistory = 103,\r\n IncludeTrainingRequired = 111,\r\n IncludeTrainingDone = 112,\r\n SelectedEmployeeCourses = 121,\r\n IncludeDisabledEmployees = 131,\r\n IncludeDismissedEmployees = 132,\r\n IncludeDocumentUpdates = 201,\r\n ExcludeNonApplicableOrAcknowledged = 202,\r\n ExcluteAbblicabilityTable = 203,\r\n IncludeActivities = 204,\r\n GroupLaws = 205,\r\n IncludeApplicableOrAcknowledgedOnly = 4301,\r\n IncludePPEs = 501,\r\n IncludeHealthChecks = 601\r\n}\r\n\r\nexport interface EvolutionExportModel<T> extends SendToModel {\r\n searchParams: T;\r\n selection?: number[] ;\r\n type: ERPExportType;\r\n sort?: number ;\r\n source: ERPExportSource;\r\n format: ERPExportFormat;\r\n parts?: ERPExportPart[] ;\r\n automateReport?: boolean ;\r\n automatedReportId?: number ;\r\n automatedReportSheetName?: string;\r\n formatExtension?: string ; \r\n}\r\n\r\nexport enum ERPComplianceLawsSelectionType {\r\n Analysis = 1,\r\n Activity = 2,\r\n}\r\n\r\nexport enum ERPComplianceProfileRole {\r\n None = 0,\r\n Analyst = 1,\r\n Planner = 1 << 1,\r\n Validator = 1 << 2,\r\n Executor = 1 << 3,\r\n Observer = 1 << 4,\r\n}\r\n\r\nexport enum ERPComplianceProfileFlags {\r\n\r\n OverrideNotificationRegisterSettings = 1 << 4,\r\n}\r\n\r\nexport enum ERPComplianceScope {\r\n None = 0,\r\n Environment = 1,\r\n Safety = 1 << 1,\r\n FoodSafety = 1 << 2,\r\n Energy = 1 << 3,\r\n Health = 1 << 4,\r\n Maintenance = 1 << 5,\r\n Quality = 1 << 6,\r\n Organization = 1 << 7,\r\n Logistics = 1 << 8,\r\n Facility = 1 << 9,\r\n Security = 1 << 10,\r\n GenderEquality = 1 << 11,\r\n AntiCorruption = 1 << 12,\r\n Sustainability = 1 << 13,\r\n InformationSecurity = 1 << 14\r\n}\r\n\r\nexport enum ERPComplianceNotificationLimit {\r\n None = 0,\r\n PlannerOnly = 1,\r\n ExecutorOnly = 2,\r\n Both = 3,\r\n}\r\n\r\nexport enum ERPComplianceRegisterNotificationType {\r\n None = 0,\r\n NewAnalysis = 1,\r\n AnalysisCompleted = 1 << 1,\r\n AnalysisNoticePeriodStarted = 1 << 2,\r\n AnalysisPeriodExpired = 1 << 3,\r\n AnalysisLawChanged = 1 << 14,\r\n NewPlanning = 1 << 13,\r\n PlanningCompleted = 1 << 4,\r\n PlanningNoticePeriodStarted = 1 << 5,\r\n PlanningPeriodExpired = 1 << 6,\r\n NewValidation = 1 << 15,\r\n ValidationCompleted = 1 << 7,\r\n ValidationNoticePeriodStarted = 1 << 8,\r\n ValidationPeriodExpired = 1 << 9,\r\n NewDeadline = 1 << 16,\r\n DeadlineNoticePeriodStarted = 1 << 10,\r\n DeadlineExpired = 1 << 11,\r\n ActivityCompleted = 1 << 12,\r\n //NewNoncompliance = 1 << 17,\r\n //NonComplianceNoticePeriodStarted = 1 << 18,\r\n //NonCompliancePeriodExpired = 1 << 19,\r\n //NonComplianceCompleted = 1 << 20,\r\n LawChanged = 1 << 21,\r\n}\r\n\r\nexport enum ERPComplianceRegisterSiteImportOptions {\r\n CopyAttachments = 1,\r\n KeepOriginalDates = 1 << 1,\r\n DuplicateLaws = 1 << 2,\r\n DiscardNotApplicables = 1 << 3\r\n}\r\n\r\nexport const EvolutionComplianceProfileRoles = [\r\n { name: 'Analista', value: ERPComplianceProfileRole.Analyst },\r\n { name: 'Gestore', value: ERPComplianceProfileRole.Planner },\r\n //{ name: 'Validatore', value: ERPComplianceProfileRole.Validator },\r\n { name: 'Esecutore', value: ERPComplianceProfileRole.Executor },\r\n { name: 'Osservatore', value: ERPComplianceProfileRole.Observer },\r\n];\r\n\r\nexport const EvolutionComplianceProfileFlags = [\r\n { name: 'Deroghe e limitazioni', divider: true },\r\n {\r\n name:\r\n 'Questo profilo riceve regolarmente le notifiche indipendentemente dalla configurazione generale del registro',\r\n value: ERPComplianceProfileFlags.OverrideNotificationRegisterSettings,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceScopes = [\r\n { name: 'Ambiente', value: ERPComplianceScope.Environment },\r\n { name: 'Salute e sicurezza', value: ERPComplianceScope.Safety },\r\n {\r\n name: 'Sicurezza alimentare',\r\n value: ERPComplianceScope.FoodSafety,\r\n },\r\n { name: 'Energia', value: ERPComplianceScope.Energy },\r\n { name: 'Servizi generali', value: ERPComplianceScope.Facility },\r\n { name: 'Manutenzione', value: ERPComplianceScope.Maintenance },\r\n { name: 'Qualità', value: ERPComplianceScope.Quality },\r\n { name: 'Organizzazione', value: ERPComplianceScope.Organization },\r\n { name: 'Logistica', value: ERPComplianceScope.Logistics },\r\n { name: 'Security', value: ERPComplianceScope.Security },\r\n { name: \"Anticorruzione\", value: ERPComplianceScope.AntiCorruption },\r\n { name: \"Sostenibilità\", value: ERPComplianceScope.Sustainability },\r\n { name: \"Parità di genere\", value: ERPComplianceScope.GenderEquality },\r\n { name: \"Sicurezza dell'informazione\", value: ERPComplianceScope.InformationSecurity },\r\n\r\n];\r\n\r\nexport const EvolutionComplianceNotificationLimits = [\r\n { name: 'Nessuna limitazione', value: ERPComplianceNotificationLimit.None },\r\n {\r\n name: 'Solo gestore che ha pianificato',\r\n value: ERPComplianceNotificationLimit.PlannerOnly,\r\n },\r\n {\r\n name: \"Solo all'incaricato designato\",\r\n value: ERPComplianceNotificationLimit.ExecutorOnly,\r\n },\r\n {\r\n name: 'Solo a gestore e incaricato designato',\r\n value: ERPComplianceNotificationLimit.Both,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceNotifications = [\r\n { name: 'Verifica applicabilità e analisi', divider: true },\r\n {\r\n name: 'Richiesta analisi',\r\n value: ERPComplianceRegisterNotificationType.NewAnalysis,\r\n },\r\n {\r\n name: \"Preavviso: sta per scadere il termine fissato per l'analisi\",\r\n value: ERPComplianceRegisterNotificationType.AnalysisNoticePeriodStarted,\r\n },\r\n {\r\n name: \"Allarme: è scaduto il termine fissato per l'analisi\",\r\n value: ERPComplianceRegisterNotificationType.AnalysisPeriodExpired,\r\n },\r\n {\r\n name: 'Analisi completata',\r\n value: ERPComplianceRegisterNotificationType.AnalysisCompleted,\r\n },\r\n {\r\n name: 'Avviso norma modificata dal legislatore',\r\n value: ERPComplianceRegisterNotificationType.AnalysisLawChanged,\r\n },\r\n { name: 'Pianificazioni', divider: true },\r\n {\r\n name: 'Richiesta gestione',\r\n value: ERPComplianceRegisterNotificationType.NewPlanning,\r\n },\r\n {\r\n name: 'Preavviso: sta per scadere il termine fissato per la gestione',\r\n value: ERPComplianceRegisterNotificationType.PlanningNoticePeriodStarted,\r\n },\r\n {\r\n name: 'Allarme: è scaduto il termine fissato per la gestione',\r\n value: ERPComplianceRegisterNotificationType.PlanningPeriodExpired,\r\n },\r\n {\r\n name: 'Gestione completata',\r\n value: ERPComplianceRegisterNotificationType.PlanningCompleted,\r\n },\r\n {\r\n name: 'Attività completata',\r\n value: ERPComplianceRegisterNotificationType.ActivityCompleted,\r\n },\r\n /*{ name: 'Gestione non conformità', divider: true },\r\n {\r\n name: 'Apertura non comformità',\r\n value: ERPComplianceRegisterNotificationType.NewNoncompliance,\r\n },\r\n {\r\n name:\r\n \"Preavviso: sta per scadere il termine fissato per l'azione correttiva\",\r\n value:\r\n ERPComplianceRegisterNotificationType.NonComplianceNoticePeriodStarted,\r\n },\r\n {\r\n name: \"Allarme: è scaduto il termine fissato per l'azione correttiva\",\r\n value: ERPComplianceRegisterNotificationType.NonCompliancePeriodExpired,\r\n },\r\n {\r\n name: 'Chiusura non conformità',\r\n value: ERPComplianceRegisterNotificationType.NonComplianceCompleted,\r\n },*/\r\n /*{ name: 'Approvazioni', divider: true },\r\n { name: 'Richiesta approvazione', value: 1 << 14 },\r\n {\r\n name: \"Preavviso: sta per scadere il termine fissato per l'approvazione\",\r\n value: ERPComplianceRegisterNotificationType.ValidationNoticePeriodStarted,\r\n },\r\n {\r\n name: \"Allarme: è scaduto il termine fissato per l'approvazione\",\r\n value: ERPComplianceRegisterNotificationType.ValidationPeriodExpired,\r\n },\r\n {\r\n name: 'Approvazione concessa o negata',\r\n value: ERPComplianceRegisterNotificationType.ValidationCompleted,\r\n },*/\r\n { name: 'Scadenze', divider: true },\r\n {\r\n name: 'Preavviso: 1° promemoria sulla data di scadenza',\r\n value: ERPComplianceRegisterNotificationType.NewValidation,\r\n },\r\n {\r\n name: 'Avviso: 2° promemoria sulla data di scadenza',\r\n value: ERPComplianceRegisterNotificationType.DeadlineNoticePeriodStarted,\r\n },\r\n {\r\n name: 'Allarme: è scaduto il termine',\r\n value: ERPComplianceRegisterNotificationType.DeadlineExpired,\r\n },\r\n { name: 'Norme collegate', divider: true },\r\n {\r\n name: 'Modifica o abrogazione',\r\n value: ERPComplianceRegisterNotificationType.LawChanged,\r\n },\r\n\r\n];\r\n\r\nexport enum ERPComplianceLawState {\r\n ApplicableOrAknowledged = 1,\r\n NotApplicable = 2,\r\n NotAnalyzed = 3,\r\n ExpiredAnalysis = 4,\r\n UpdatedLaws = 5,\r\n Analyzed = 6,\r\n Abrogated = 7,\r\n Applicable = 8,\r\n Aknowledged = 9\r\n}\r\n\r\nexport enum ERPComplianceLawOrigin {\r\n National = 1,\r\n EU = 2,\r\n Regional = 3,\r\n Local = 4,\r\n Technical = 5,\r\n Voulontary = 6,\r\n Internal = 7,\r\n Other = 8,\r\n}\r\n\r\nexport const EvolutionComplianceLawStates = [\r\n { name: 'Applicabile', value: ERPComplianceLawState.Applicable },\r\n { name: 'Da conoscere', value: ERPComplianceLawState.Aknowledged },\r\n {\r\n name: 'Applicabile / da conoscere',\r\n value: ERPComplianceLawState.ApplicableOrAknowledged,\r\n },\r\n { name: 'Non applicabile', value: ERPComplianceLawState.NotApplicable },\r\n { name: 'Abrogata', value: ERPComplianceLawState.Abrogated },\r\n { name: 'Analizzata', value: ERPComplianceLawState.Analyzed },\r\n { name: 'Da definire', value: ERPComplianceLawState.NotAnalyzed },\r\n { name: 'In ritardo', value: ERPComplianceLawState.ExpiredAnalysis },\r\n {\r\n name: 'Con aggiornamenti pendenti',\r\n value: ERPComplianceLawState.UpdatedLaws,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceLawOrigins = [\r\n { name: 'Nazionale', value: ERPComplianceLawOrigin.National },\r\n { name: 'Comunitaria', value: ERPComplianceLawOrigin.EU },\r\n { name: 'Regionale', value: ERPComplianceLawOrigin.Regional },\r\n { name: 'Locale', value: ERPComplianceLawOrigin.Local },\r\n { name: 'Tecnica', value: ERPComplianceLawOrigin.Technical },\r\n { name: 'Interna', value: ERPComplianceLawOrigin.Internal },\r\n { name: 'Volontaria', value: ERPComplianceLawOrigin.Voulontary },\r\n { name: 'Altro', value: ERPComplianceLawOrigin.Other },\r\n];\r\n\r\nexport const EvolutionComplianceLawChangeStates = [\r\n { name: 'Aperto', value: 1 },\r\n { name: 'Chiuso', value: 2 },\r\n];\r\n\r\nexport enum ERPComplianceActivityState {\r\n NotPlanned = 1 << 7,\r\n Closed = 1 << 2,\r\n Expired = 1 << 3,\r\n Planned = 1 << 8,\r\n Cancelled = 1 << 9,\r\n UpdatedLaws = 1 << 10,\r\n AlreadyManaged = 1 << 11\r\n}\r\n\r\nexport const EvolutionComplianceActivityStates = [\r\n {\r\n name: 'Da definire',\r\n value: ERPComplianceActivityState.NotPlanned,\r\n },\r\n {\r\n name: 'Pianificata',\r\n value: ERPComplianceActivityState.Planned,\r\n },\r\n {\r\n name: 'Chiusa',\r\n value: ERPComplianceActivityState.Closed,\r\n },\r\n {\r\n name: 'In ritardo',\r\n value: ERPComplianceActivityState.Expired,\r\n },\r\n {\r\n name: 'Annullata',\r\n value: ERPComplianceActivityState.Cancelled,\r\n },\r\n {\r\n name: 'Gestita separatamente',\r\n value: ERPComplianceActivityState.AlreadyManaged,\r\n },\r\n {\r\n name: 'Con aggiornamenti pendenti',\r\n value: ERPComplianceActivityState.UpdatedLaws,\r\n },\r\n];\r\n\r\nexport const EvolutionComplianceObligationTypes = [\r\n { name: 'Autorizzazione', value: 1 },\r\n { name: 'Verifiche periodiche manutentive', value: 2 },\r\n { name: 'Misure organizzative', value: 3 },\r\n { name: 'Controlli e misurazioni', value: 4 },\r\n { name: 'Entrata in vigore', value: 5 },\r\n { name: 'Documenti aziendali obbligatori', value: 6 },\r\n {\r\n name: 'Altri adempimenti formali (comunicazioni, dichiarazioni, ecc...)',\r\n value: 7,\r\n },\r\n { name: 'Altro', value: 99 },\r\n];\r\n\r\nexport const EvolutionComplianceObligationAuthorities = [\r\n { name: 'Agenzia ECHA', value: 1 },\r\n { name: 'Albo Nazionale dei Gestori Ambientali', value: 2 },\r\n { name: 'ARPA', value: 4 },\r\n { name: 'ASL', value: 5 },\r\n { name: 'Camera di Commercio', value: 8 },\r\n { name: 'Comando provinciale dei Vigili del Fuoco', value: 10 },\r\n { name: 'Comune', value: 13 },\r\n { name: 'Consorzi gestione rifiuti particolari', value: 14 },\r\n { name: 'Gestore del servizio', value: 21 },\r\n { name: 'Gestore della rete di trasmissione nazionale', value: 22 },\r\n { name: 'INAIL - IPSEMA - ISPESL', value: 23 },\r\n { name: 'ISPRA', value: 26 },\r\n { name: 'Ministero', value: 27 },\r\n { name: 'Genio civile', value: 30 },\r\n { name: 'Organo di vigilanza competente', value: 31 },\r\n { name: 'Provincia', value: 33 },\r\n { name: 'Regione', value: 35 },\r\n { name: 'Uffici tecnici di finanza', value: 36 },\r\n { name: 'Ispettorato del lavoro', value: 37 },\r\n { name: 'Comitato Regionale Tecnico VF', value: 38 },\r\n { name: 'Prefetto', value: 39 },\r\n { name: 'Organismo notificato', value: 40 },\r\n { name: 'Città Metropolitana', value: 41 },\r\n { name: 'Nessuna', value: 28 },\r\n { name: 'Altro', value: 3 }\r\n];\r\n\r\nexport enum ERPRecurrenceFrequencyType {\r\n Day = 1,\r\n Month = 2,\r\n Year = 3,\r\n}\r\nexport const EvolutionRecurrenceFrequencyTypes = [\r\n { name: 'Anni', value: ERPRecurrenceFrequencyType.Year },\r\n { name: 'Mesi', value: ERPRecurrenceFrequencyType.Month },\r\n { name: 'Giorni', value: ERPRecurrenceFrequencyType.Day },\r\n];\r\n\r\nexport enum ERPPlacePermission {\r\n None = 0,\r\n Denied = 1,\r\n Read = 2,\r\n Write = 3\r\n}\r\n\r\nexport enum ERPPlace {\r\n Subject = 1,\r\n Site = 2,\r\n Department = 3,\r\n Area = 4,\r\n Line = 5\r\n}\r\nexport interface EvolutionPermission {\r\n placeId: number;\r\n userId: number;\r\n allowRead: number;\r\n allowWrite: number;\r\n allowNone: number;\r\n}\r\n\r\nexport interface EvolutionPlacePermission extends EvolutionPermission {\r\n id: number;\r\n subjectId?: number;\r\n siteId?: number;\r\n departmentId?: number;\r\n mode: number;\r\n}\r\n\r\nexport interface EvolutionContextInfo {\r\n id: number;\r\n userId?: number;\r\n name: string;\r\n permission: EvolutionPermission;\r\n placePermission: ERPPlacePermission;\r\n costCenter: string;\r\n selected?: boolean;\r\n level?: number;\r\n levelTitle?: string;\r\n}\r\n\r\nexport class EvolutionComplianceContextInfo {\r\n licenceId?: number;\r\n licencedCompany?: string;\r\n registerTitle?: string;\r\n registerId?: number;\r\n siteName?: string;\r\n siteId?: number;\r\n userId?: number;\r\n items?: EvolutionContextInfo[];\r\n}\r\n\r\nexport interface EvolutionChangeContextModel {\r\n userId?: number ;\r\n licenceId?: number ;\r\n subjectId?: number ;\r\n siteId?: number ;\r\n registerId?: number ;\r\n role?: ERPComplianceProfileRole ;\r\n permission?: ERPPlacePermission ;\r\n option1Value?: number ;\r\n option2Value?: number ;\r\n option3Value?: number ;\r\n allowObservers?: boolean ;\r\n allowDisabled?: boolean ;\r\n}\r\n\r\nexport interface EvolutionChangeContextResultModel {\r\n items: EvolutionContextInfo[];\r\n}\r\n\r\nexport interface EvolutionComplianceRegister extends EvolutionPlaceable {\r\n id: number;\r\n title?: string;\r\n enableNotifications?: boolean;\r\n enableNotification1?: boolean;\r\n enableNotification2?: boolean;\r\n enableNotification3?: boolean;\r\n enableNotification4?: boolean;\r\n enableNotification5?: boolean;\r\n enableNotification7?: boolean;\r\n enableNotification8?: boolean;\r\n enableNotification9?: boolean;\r\n notification1NoticeDays?: number;\r\n notification2NoticeDays?: number;\r\n notification2Limit?: number;\r\n notification3NoticeDays?: number;\r\n notification4NoticeDays?: number;\r\n notification4Limit?: number;\r\n notification5NoticeDays?: number;\r\n notification5Limit?: number;\r\n notification6Limit?: number;\r\n notification8NoticeDays?: number;\r\n notification8Limit?: number;\r\n enableActivityLawsPopulation?: boolean;\r\n enableLawChangesTracking?: boolean;\r\n automationMode?: number;\r\n automationScope?: number;\r\n disabled?: boolean;\r\n created?: Date;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n totalSites?: number;\r\n totalProfiles?: number;\r\n sites?: EvolutionComplianceRegisterSite[];\r\n oldId?: string;\r\n isAutomationEnabled?: boolean;\r\n automationModeDescription?: string;\r\n automationScopeDescription?: string;\r\n context?: EvolutionComplianceContextInfo;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n}\r\n\r\nexport interface EvolutionRegisterProfileSiteInfo extends EvolutionContextInfo {\r\n\r\n}\r\n\r\nexport interface EvolutionRegisterProfileUserInfo {\r\n userId: number;\r\n name: string;\r\n sites: EvolutionRegisterProfileSiteInfo[];\r\n}\r\n\r\nexport interface ComplianceRegisterUsersResultModel {\r\n users: EvolutionRegisterProfileUserInfo[];\r\n sites: EvolutionRegisterProfileSiteInfo[];\r\n}\r\n\r\nexport interface EvolutionComplianceRegisterSite {\r\n id: number;\r\n complianceRegisterId?: number;\r\n complianceSiteId?: number;\r\n disabled?: boolean;\r\n created?: Date;\r\n licenceId?: number;\r\n subjectId?: number;\r\n subjectName: string;\r\n siteId?: number;\r\n siteName?: string;\r\n departmentId?: number;\r\n departmentName?: string;\r\n registerTitle?: string;\r\n placeId?: number;\r\n oldSiteId?: string;\r\n}\r\n\r\nexport interface EvolutionComplianceLaw extends EvolutionPlaceable {\r\n id?: number;\r\n state?: number;\r\n complianceRegisterId?: number;\r\n lot?: number;\r\n topicId?: string;\r\n topicPath?: string;\r\n topicName?: string;\r\n summary?: string;\r\n scope?: number;\r\n source?: string;\r\n references?: EvolutionComplianceLawReference[];\r\n originalLawId?: number ;\r\n originRegion?: string ;\r\n origin?: number ;\r\n originAlternativeDescription?: string ;\r\n description?: string ;\r\n documentShortTitle?: string ;\r\n documentTitle?: string ;\r\n documentNumber?: string ;\r\n documentDate?: Date ;\r\n documentLastUpdate?: string ;\r\n documentLastUpdateShortTitle?: string ;\r\n documentUpdateNotes?: string ;\r\n documentValidated?: boolean ;\r\n documentId?: string ;\r\n documentModel?: number ;\r\n documentReferences?: string ;\r\n documentNotes?: string ;\r\n documentForceGlobalCheckForUpdates?: boolean;\r\n complianceCheckItem1?: boolean ;\r\n complianceCheckItem2?: boolean ;\r\n complianceCheckItem3?: boolean ;\r\n complianceCheckItem4?: boolean ;\r\n complianceCheckItem5?: boolean ;\r\n complianceCheckItem6?: boolean ;\r\n complianceCheckItem7?: boolean ;\r\n complianceCheckItem8?: boolean ;\r\n complianceCheckItem9?: boolean ;\r\n complianceCheckItem10?: boolean ;\r\n complianceCheckItem11?: boolean ;\r\n complianceCheckItem12?: boolean ;\r\n alternativeComplianceCheckItem?: boolean ;\r\n alternativeComplianceDescription?: string ;\r\n applicability?: number ;\r\n analyzedBy?: string ;\r\n analystOperatorId?: number ;\r\n analysisExpiringDate?: Date ;\r\n analysisDate?: Date ;\r\n analysisNotes?: string ;\r\n analysisNoticeDate?: string ;\r\n group1?: string ;\r\n group2?: string ;\r\n count?: number ;\r\n created?: Date ;\r\n createdBy?: string ;\r\n lastUpdated?: Date ;\r\n lastUpdatedBy?: string ;\r\n}\r\n\r\nexport interface EvolutionQueryRegisterProfilesModel extends QueryModel {\r\n complianceRegisterId?: number;\r\n siteId?: number;\r\n userId?: number;\r\n licenceId?: number;\r\n name?: string;\r\n role?: number;\r\n allowObservers?: boolean;\r\n allowDisabled?: boolean;\r\n state?: number;\r\n}\r\n\r\nexport interface EvolutionComplianceRegisterProfile {\r\n id: number;\r\n licenceId?: number;\r\n userId?: number;\r\n passiveUserName?: string;\r\n passiveUserOperatorId?: number;\r\n complianceRegisterId?: number;\r\n complianceSiteId?: number;\r\n scopes?: number;\r\n selectedScopes?: number[];\r\n roles?: number;\r\n selectedRoles?: number[];\r\n notifications?: number;\r\n flags?: number;\r\n disabled?: boolean;\r\n created?: Date;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n subjectId?: number;\r\n subjectName?: string;\r\n siteId?: number;\r\n siteName?: string;\r\n siteDisabled?: boolean;\r\n departmentId?: number;\r\n departmentName?: string;\r\n passiveUserEmail?: string;\r\n placeId?: number;\r\n userEmail?: string;\r\n userOperatorId?: number;\r\n userDisabled?: boolean;\r\n registerDisabled?: boolean;\r\n registerTitle?: string;\r\n name?: string;\r\n scopeNames?: string;\r\n isAdministrator?: boolean;\r\n isObserver?: boolean;\r\n denied?: boolean;\r\n oldId?: string;\r\n operatorId?: number;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n context?: EvolutionComplianceContextInfo;\r\n}\r\nexport interface EvolutionComplianceLawDocumentInfo {\r\n documentId?: string;\r\n documentId2?: string;\r\n title2?: string;\r\n title1?: string;\r\n number?: string;\r\n date?: Date;\r\n origin?: number;\r\n originDescription?: string;\r\n originAlternativeDescription?: string;\r\n originRegion?: string;\r\n notes?: string;\r\n references?: EvolutionComplianceLawReference[];\r\n forceGlobalCheckForUpdates?: boolean;\r\n validated?: boolean;\r\n description?: string;\r\n}\r\n\r\nexport interface EvolutionComplianceLawsAddParams extends EvolutionComplianceLaw {\r\n context?: EvolutionComplianceContextInfo;\r\n documents?: EvolutionComplianceLawDocumentInfo[];\r\n shouldNotifyAnalysisCompletionAgain?: boolean;\r\n scopes?: number[];\r\n sites?: number[];\r\n registers?: number[];\r\n}\r\n\r\nexport interface EvolutionComplianceLaswExportParams extends EvolutionExportModel<any> {}\r\n\r\nexport interface EvolutionComplianceLawReference {\r\n id?: number ;\r\n complianceLawId?: number ;\r\n text: string;\r\n description?: string ;\r\n anchor: string;\r\n}\r\n\r\nexport interface EvolutionComplianceActivity extends EvolutionPlaceable {\r\n id: number;\r\n state: number;\r\n monitoringActivityId?: number;\r\n monitoringActivityTaskId?: number;\r\n complianceRegisterId?: number;\r\n childId?: number ;\r\n parentId?: number ;\r\n lot?: number ; \r\n summary?: string;\r\n scope?: number;\r\n topicId?: string ;\r\n topicPath?: string;\r\n topicName?: string;\r\n mandatory?: boolean ;\r\n obligationType?: number ;\r\n obligationAuthorityId?: number ;\r\n obligationNotes?: string;\r\n obligationCheckPoint?: boolean ;\r\n description?: string;\r\n deadlineRecurrent?: boolean ;\r\n deadlineFrequency?: number ;\r\n deadlineFrequencyType?: number ;\r\n deadlineFrequencyEndOfMonth?: boolean ;\r\n deadlineFirstNoticeDays?: number ;\r\n deadlineLastNoticeDays?: number ;\r\n deadlineFirstNoticeDate?: Date ;\r\n deadlineLastNoticeDate?: Date ;\r\n deadlineExpiringDate?: Date ;\r\n planningNoticeDate?: Date ;\r\n planningExpiringDate?: Date ;\r\n planningDate?: Date ;\r\n plannedBy?: string;\r\n plannerOperatorId?: number ;\r\n planningApplicability?: number ;\r\n planningNotificationAdditionalEmailHeader?: string;\r\n planningNotificationAdditionalEmails?: string;\r\n planningNotificationAdditionalEmailsForAlertsOnly?: string;\r\n planningNamedExecutorOperatorId?: number ;\r\n planningNamedExecutorName?: string;\r\n planningNamedExecutorManagerOperatorId?: number ;\r\n planningNamedExecutorManagerName?: string;\r\n planningScheduleNextFromExecutionDate?: boolean ;\r\n planningNotes?: string;\r\n executorOperatorId?: number ;\r\n executed?: boolean;\r\n executedBy?: string;\r\n executionDate?: Date;\r\n externalReference?: string;\r\n externalDescription?: string;\r\n group1?: string;\r\n group2?: string;\r\n notes?: string;\r\n created?: Date;\r\n createdBy?: string;\r\n lastUpdated?: Date ;\r\n lastUpdatedBy?: string;\r\n\r\n}\r\n\r\nexport interface EvolutionComplianceActivitiesAddParams extends EvolutionComplianceActivity {\r\n context?: EvolutionComplianceContextInfo;\r\n complianceLawId?: number;\r\n monitoringLawId?: number;\r\n enableLawChangesTracking?: boolean;\r\n enableActivityLawsPopulation?: boolean;\r\n shouldNotifyPlanningCompletionAgain?: boolean;\r\n scopes?: number[];\r\n sites?: number[];\r\n registers?: number[];\r\n document?: EvolutionComplianceLawDocumentInfo;\r\n}","import { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { inject, Injectable, OnDestroy, signal } from '@angular/core';\r\nimport { ApiResult, BroadcastMessageInfo, BroadcastService, FolderTree, INode, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { EMPTY, of, Subscription, throwError } from 'rxjs';\r\nimport { catchError, finalize, map } from 'rxjs/operators';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\nimport { EvolutionChangeContextModel, EvolutionChangeContextResultModel, EvolutionComplianceActivitiesAddParams, EvolutionComplianceActivity, EvolutionComplianceLaw, EvolutionComplianceLawsAddParams, EvolutionComplianceRegister, EvolutionComplianceRegisterProfile, EvolutionLoginFlags, EvolutionLoginInfo, EvolutionLoginResult, EvolutionQueryRegisterProfilesModel, EvolutionServiceFlags, EvolutionUserLink } from './../definitions';\r\nimport { EvolutionMessages } from '../messages';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class EvolutionService implements OnDestroy {\r\n\r\n\r\n private httpClient = inject(HttpClient);\r\n private broadcastService = inject(BroadcastService);\r\n private broadcastServiceSubscription?: Subscription;\r\n private dialogService = inject(DialogService);\r\n\r\n private _serviceUri: string = undefined;\r\n get serviceUri(): string {\r\n return this._serviceUri;\r\n }\r\n private _flags: EvolutionServiceFlags = EvolutionServiceFlags.None;\r\n get flags(): EvolutionServiceFlags {\r\n return this._flags;\r\n }\r\n private _loginInfo?: EvolutionLoginInfo;\r\n get loginInfo(): EvolutionLoginInfo | undefined {\r\n if (!this._loginInfo) {\r\n const loginInfo = localStorage.getItem('evolution_context');\r\n if (loginInfo) {\r\n try {\r\n this._loginInfo = JSON.parse(loginInfo) as EvolutionLoginInfo;\r\n } catch { }\r\n }\r\n }\r\n return this._loginInfo;\r\n }\r\n public readonly loggedIn = signal<boolean>(false);\r\n public readonly loggingIn = signal<boolean>(false);\r\n private keepAlive = 0;\r\n\r\n\r\n\r\n ngOnDestroy() {\r\n if (this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription.unsubscribe();\r\n }\r\n this.removeKeepAlive();\r\n }\r\n\r\n /**\r\n * Initialize service\r\n * @param serviceUri : the service uri\r\n * @param flags: the service flags. Default is none.\r\n */\r\n initialize(\r\n serviceUri: string,\r\n flags: EvolutionServiceFlags = EvolutionServiceFlags.None) {\r\n // Create unique client id\r\n if (!localStorage.getItem('evolution_client_id')) {\r\n localStorage.setItem('evolution_client_id', SystemUtils.generateUUID());\r\n }\r\n\r\n // Initialize\r\n this._serviceUri = serviceUri;\r\n this._flags = flags;\r\n\r\n // React to message broadcasting\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message: BroadcastMessageInfo) => {\r\n if (message.id === EvolutionMessages.LOGIN_CHANGED) {\r\n this.login(\r\n null,\r\n null,\r\n true).subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n if (r.message) {\r\n this.dialogService.error(r.message, null, \"Errore di Evolution\");\r\n }\r\n } else {\r\n if ((this.flags & EvolutionServiceFlags.DisplayConnectionStateMessages) > 0) {\r\n this.dialogService.toast('Connesso a Evolution', 1500, 'power');\r\n }\r\n }\r\n },\r\n error: () => { console.error(\"Evolution non disponibile.\") } // Avoid unwanted errors on client\r\n });\r\n } else if (message.id === EvolutionMessages.LOGOUT) {\r\n if (this.loggedIn()) {\r\n this.logout().subscribe(r => {\r\n if (!r.success) {\r\n if (r.message) {\r\n this.dialogService.error(\"<p>\" + r.message + \"</p><br><br><hr><p class='small'><i>Per eliminare la configurazione di Evolution accedere a:<br><b>menu > personalizza > collegamenti</b></i></p>\", null, \"Errore di Evolution\");\r\n }\r\n } else {\r\n if ((this.flags & EvolutionServiceFlags.DisplayConnectionStateMessages) > 0) {\r\n this.dialogService.toast('Disconnesso da Evolution', 1500, 'power_off');\r\n }\r\n }\r\n });\r\n } else {\r\n this.clear();\r\n }\r\n }\r\n });\r\n }\r\n\r\n // Eveluate current session storage in case of page refresh (F5)\r\n const tokenExpirationDate = this.getTokenExpirationDate();\r\n const tokenExpired = !tokenExpirationDate || tokenExpirationDate.getTime() < Date.now();\r\n if (!tokenExpired || this.loggedIn()) {\r\n // Auto login\r\n this.loggedIn.set(true);\r\n // Keep alive\r\n this.setKeepAlive();\r\n // Notify \r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_COMPLETED);\r\n }\r\n }\r\n\r\n /**\r\n * Get access token expiration date\r\n */\r\n private getTokenExpirationDate(): Date | undefined {\r\n const token = this.getAuthToken();\r\n if (!token) return undefined;\r\n // Parse json object from base64 encoded jwt token\r\n const jwtToken = JSON.parse(atob(token.split('.')[1]));\r\n // Set a timeout to refresh the token a minute before it expires\r\n return new Date(jwtToken.exp * 1000);\r\n }\r\n\r\n\r\n /**\r\n * Set keep alive\r\n */\r\n private setKeepAlive() {\r\n // Keep alive every 1 min\r\n if (this.keepAlive === 0) {\r\n this.keepAlive = window.setInterval(\r\n () => {\r\n this.ping();\r\n }, 1000 * 60 * 5);\r\n }\r\n }\r\n\r\n /**\r\n * Remove keep alive\r\n */\r\n private removeKeepAlive() {\r\n if (this.keepAlive > 0) {\r\n window.clearInterval(this.keepAlive);\r\n this.keepAlive = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Ping\r\n */\r\n ping() {\r\n this.httpClient.get<ApiResult<number>>(\r\n this._serviceUri + '/ping?nocache=' + SystemUtils.generateUUID()\r\n )\r\n .pipe(catchError(() => { return EMPTY }))\r\n .subscribe();\r\n }\r\n\r\n\r\n /**\r\n* Set auth token\r\n* @param value : the login result\r\n*/\r\n private setToken(value: EvolutionLoginResult) {\r\n if (value.authToken ?? value.token) {\r\n sessionStorage.setItem('evolution_auth', value.authToken ?? value.token);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Return current auth token\r\n */\r\n getAuthToken(): string | undefined {\r\n let token = sessionStorage.getItem('evolution_auth');\r\n if (token && token[0] === '\"') {\r\n return token.substring(1, token.length - 1);\r\n }\r\n return token;\r\n }\r\n\r\n /**\r\n * Store login info\r\n */\r\n storeContext() {\r\n localStorage.setItem('evolution_context', JSON.stringify(this._loginInfo));\r\n }\r\n\r\n\r\n /**\r\n * Update context\r\n * @param result: the new context\r\n */\r\n updateContext(result: EvolutionLoginResult) {\r\n if (!this._loginInfo) {\r\n this._loginInfo = { context: undefined };\r\n }\r\n this._loginInfo.context = result.context\r\n this.setToken(result);\r\n this.storeContext();\r\n }\r\n\r\n /**\r\n * Perform auto login using current link data\r\n * @param onSuccess: function to execute on seccess\r\n */\r\n autoLogin(onSuccess?: Function) {\r\n this.login(null, null, true)\r\n .pipe(finalize(() => this.dialogService.clearBusy()))\r\n .subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n this.dialogService.error(r.message, null, \"Errore in Evolution\");\r\n } else {\r\n if (!r.value.requiresMfa) {\r\n this.dialogService.toast('Connesso ad Evolution', 1500, 'power');\r\n }\r\n if (onSuccess) {\r\n onSuccess();\r\n }\r\n }\r\n },\r\n error: () => { this.dialogService.error(\"Evolution non disponibile.\") }\r\n });\r\n return true;\r\n }\r\n\r\n /**\r\n * Perform auto logout\r\n * @param onSuccess: function to execute on seccess\r\n */\r\n autoLogout(onSuccess?: Function) {\r\n if (!this.loggedIn()) return;\r\n this.logout()\r\n .pipe(\r\n finalize(() => this.dialogService.clearBusy()),\r\n map(r => { this.clear(); return r }))\r\n .subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_CHANGED);\r\n this.dialogService.error(r.message, null, \"Errore in Evolution\");\r\n } else {\r\n this.dialogService.toast('Disconnesso da Evolution', 1500, 'power_off');\r\n }\r\n },\r\n complete: () => {\r\n this.clear()\r\n if (onSuccess) {\r\n onSuccess();\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Perform login \r\n * @param email: the optional email if using OAuth2\r\n * @parma password: the optional password if using OAuth2\r\n * @param remember: remember credentials \r\n * @param oauth: the optional open authentication supported\r\n * @param oauthAccessToken: the optional OAuth2 access token\r\n * @param flags: the optional login flags\r\n * @returns: the login result\r\n */\r\n login(email?: string,\r\n password?: string,\r\n remember?: boolean,\r\n oauth?: LoginOAuthType,\r\n oauthAccessToken: string | undefined = sessionStorage.getItem(\"evolution_oauth_token\") ?? undefined,\r\n flags: EvolutionLoginFlags | undefined = EvolutionLoginFlags.None) {\r\n if (remember) {\r\n flags |= EvolutionLoginFlags.RememberCredentials;\r\n }\r\n return this.httpClient\r\n .post<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/login2',\r\n {\r\n clientId: localStorage.getItem(\"evolution_client_id\"),\r\n user: oauth ? null : email,\r\n password: oauth ? null : password,\r\n remember: remember,\r\n oauth: oauth,\r\n flags: flags\r\n },\r\n {\r\n headers:\r\n !oauth || !oauthAccessToken\r\n ? new HttpHeaders()\r\n : new HttpHeaders()\r\n .set(\"Authorization\", oauthAccessToken ?? '')\r\n })\r\n .pipe(\r\n catchError(err => {\r\n this.loggingIn.set(false);\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<EvolutionLoginResult>) => {\r\n if (r.success) {\r\n if (!this._loginInfo) {\r\n this._loginInfo = { context: undefined }\r\n }\r\n this._loginInfo.oauth = oauth;\r\n this._loginInfo.remember = (flags & EvolutionLoginFlags.RememberCredentials) > 0;\r\n if (!oauth && r.value.requiresMfa) {\r\n // Notify login is pending\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_PENDING, { flags: flags });\r\n } else {\r\n // Complete login\r\n this.completeLogin(r.value);\r\n }\r\n }\r\n return r;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Complete login\r\n * @param result : the login result\r\n */\r\n private completeLogin(\r\n result: EvolutionLoginResult) {\r\n // Update context info \r\n this.updateContext(result);\r\n this.loggedIn.set(!result.context?.isTemporary);\r\n this.loggingIn.set(false);\r\n // Keep alive\r\n this.setKeepAlive();\r\n // Notify\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGIN_COMPLETED);\r\n }\r\n\r\n\r\n /**\r\n * Confirm MFA procedure\r\n * @param code: the confirm code\r\n * @param flags: the login flags\r\n */\r\n confirmIdentity(code: string, flags: number = EvolutionLoginFlags.None) {\r\n return this.httpClient\r\n .post<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/login/confirm/' + code + '/?flags=' + flags,\r\n {},\r\n )\r\n .pipe(\r\n catchError((err) => {\r\n this.loggingIn.set(false);\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<EvolutionLoginResult>) => {\r\n if (r.success) {\r\n // Complete login\r\n this.completeLogin(r.value);\r\n }\r\n return r;\r\n }),\r\n );\r\n }\r\n\r\n /**\r\n * Perform logout\r\n */\r\n logout() {\r\n return this.httpClient.post<any>(this._serviceUri + '/logout', {}).pipe(\r\n finalize(() => {\r\n this.removeKeepAlive();\r\n this.clear();\r\n // Clean up\r\n localStorage.removeItem('evolution_context');\r\n }),\r\n catchError((_e) => {\r\n return of([]);\r\n }));\r\n }\r\n\r\n\r\n /**\r\n * Switch the current login to a new one with the same credentials except role possibly (context change)\r\n * @param id : new user id\r\n */\r\n loginSwitch(id: number) {\r\n return this.httpClient\r\n .post<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/login/switch',\r\n {\r\n clientId: localStorage.getItem(\"evolution_client_id\"),\r\n userId: id,\r\n }\r\n )\r\n .pipe(\r\n catchError((err) => {\r\n return throwError(() => err);\r\n }),\r\n map((r: ApiResult<EvolutionLoginResult>) => {\r\n if (r.success) {\r\n // Update login\r\n this.completeLogin(r.value);\r\n }\r\n return r;\r\n })\r\n );\r\n }\r\n\r\n\r\n /**\r\n * Reset login refresh timer and login state\r\n */\r\n reset() {\r\n // Clear login info\r\n this._loginInfo = undefined;\r\n // Logged out\r\n this.loggedIn.set(false);\r\n // Notify\r\n this.broadcastService.sendMessage(EvolutionMessages.LOGOUT_COMPLETED);\r\n }\r\n\r\n /**\r\n * Clear login data\r\n * @param clearOAuthToken: true to clear oauth token also\r\n */\r\n clear(clearOAuthToken: boolean = false) {\r\n // Clear local storage\r\n sessionStorage.removeItem('evolution_auth');\r\n sessionStorage.removeItem('evolution_refresh');\r\n sessionStorage.removeItem('evolution_oauth');\r\n if (clearOAuthToken) {\r\n sessionStorage.removeItem('evolution_oauth_token');\r\n }\r\n\r\n // Reset login\r\n this.reset();\r\n }\r\n\r\n /**\r\n * Perform token refresh\r\n */\r\n refresh() {\r\n return this.httpClient.get<ApiResult<EvolutionLoginResult>>(\r\n this._serviceUri + '/refresh2'\r\n ).pipe(map((r: ApiResult<EvolutionLoginResult>) => {\r\n // Update token\r\n this.setToken(r.value);\r\n return r;\r\n }));\r\n }\r\n\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the subfolders group or null to root\r\n */\r\n toNodes(folders: INode[]): INode[] {\r\n return this._toNodes(folders, null);\r\n }\r\n\r\n /**\r\n * Convert folders in a tree of Node object.\r\n * @param folders : the children group or null to root\r\n */\r\n private _toNodes(folders: INode[], parent?: INode): INode[] {\r\n let nodes: INode[] = [];\r\n folders.forEach(n => {\r\n let node: INode = {\r\n id: n.id,\r\n name: n.name,\r\n count: n.count,\r\n parent: parent,\r\n children: null,\r\n bag: n,\r\n };\r\n node.children =\r\n n.children && n.children.length > 0\r\n ? this._toNodes(n.children, node)\r\n : [];\r\n nodes.push(node);\r\n });\r\n return nodes;\r\n }\r\n\r\n /**\r\n * Retrieve the taxonomy\r\n */\r\n getTaxonomy() {\r\n return this.httpClient.get<ApiResult<FolderTree>>(\r\n this._serviceUri + '/taxonomy'\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve groups\r\n * @param group: the group number\r\n * @param register: the optional register id. Default is null.\r\n */\r\n getGroups(group: number = 1, register?: number) {\r\n return this.httpClient.get<ApiResult<string[]>>(\r\n this._serviceUri +\r\n (register\r\n ? '/compliance/groups/?group=' +\r\n group +\r\n '®ister=' +\r\n register\r\n : '/compliance/groups/?group=' + group)\r\n );\r\n }\r\n\r\n ////\r\n // CONTEXT\r\n ////\r\n /**\r\n * Change context\r\n */\r\n changeContext(params: EvolutionChangeContextModel) {\r\n return this.httpClient.post<ApiResult<EvolutionChangeContextResultModel>>(\r\n this._serviceUri + '/compliance/context',\r\n params\r\n );\r\n }\r\n\r\n ////\r\n // REGISTERS\r\n ////\r\n\r\n\r\n /**\r\n * Retrieve a register\r\n * @param id the register id\r\n */\r\n getRegister(id: number) {\r\n return this.httpClient.get<ApiResult<EvolutionComplianceRegister>>(\r\n this._serviceUri +\r\n '/compliance/registers/' + id\r\n );\r\n }\r\n\r\n\r\n /**\r\n * Collect register profiles\r\n * @param params parameters\r\n */\r\n collectRegisterProfiles(params: EvolutionQueryRegisterProfilesModel) {\r\n return this.httpClient.post<ApiResult<EvolutionComplianceRegisterProfile[]>>(\r\n this._serviceUri +\r\n '/compliance/registers/profiles/collect',\r\n params\r\n );\r\n }\r\n\r\n\r\n ////\r\n // LAWS\r\n ////\r\n\r\n /**\r\n * Add one or more laws\r\n * @param params parameters\r\n */\r\n addLaws(params: EvolutionComplianceLawsAddParams) {\r\n return this.httpClient.post<ApiResult<EvolutionComplianceLaw[]>>(\r\n this._serviceUri + '/compliance/laws/add',\r\n params\r\n );\r\n }\r\n\r\n ////\r\n // ACTIVITIES\r\n ////\r\n\r\n\r\n\r\n /**\r\n * Add one or more activities\r\n * @param params parameters\r\n */\r\n addActivities(params: EvolutionComplianceActivitiesAddParams) {\r\n return this.httpClient.post<ApiResult<EvolutionComplianceActivity>>(\r\n this._serviceUri + '/compliance/activities/add',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Export laws\r\n * @param params parameters\r\n */\r\n exportLaws(params: any) {\r\n return this.httpClient.post(\r\n this._serviceUri + '/compliance/laws/export',\r\n params,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n\r\n ///\r\n // LINKS\r\n ///\r\n\r\n /**\r\n * Save a user link\r\n * @param item: the user link\r\n */\r\n saveLink(item: EvolutionUserLink) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/account/links/save',\r\n item\r\n );\r\n }\r\n\r\n /**\r\n * Delete a user link\r\n * @param item: the user link\r\n */\r\n deleteLink(item: EvolutionUserLink) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/account/links/delete',\r\n item\r\n );\r\n }\r\n}\r\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { BroadcastService, ErrorInfo } from '@arsedizioni/ars-utils/core';\r\nimport { Observable, catchError, switchMap, throwError } from 'rxjs';\r\nimport { EvolutionService } from '../services/evolution.service';\r\nimport { EvolutionServiceFlags } from '../definitions';\r\nimport { EvolutionMessages } from '../messages';\r\n\r\n\r\n@Injectable()\r\nexport class EvolutionAuthInterceptor implements HttpInterceptor {\r\n private evolutionService = inject(EvolutionService);\r\n private broadcastService = inject(BroadcastService);\r\n private lastErrorTime: number = -1;\r\n\r\n intercept(\r\n request: HttpRequest<any>,\r\n next: HttpHandler\r\n ): Observable<HttpEvent<any>> {\r\n if (request.url.startsWith(this.evolutionService.serviceUri ?? '')) {\r\n request = request.clone({ withCredentials: true });\r\n return next.handle(this.addTokenToRequest(request))\r\n .pipe(\r\n catchError(error => {\r\n if (error.url.startsWith(this.evolutionService.serviceUri)) {\r\n if (\r\n error instanceof HttpErrorResponse &&\r\n !request.url.includes(\"/login\") &&\r\n error.status === 401\r\n ) {\r\n return this.handle401Error(request, next);\r\n }\r\n const errorStatus = parseInt(error.status ?? \"0\");\r\n if ((errorStatus > 0 && errorStatus < 500) || (this.evolutionService.flags & EvolutionServiceFlags.NotifySystemErrors) > 0) {\r\n const errorTime = new Date().getTime();\r\n if (errorTime - this.lastErrorTime > 5000) {\r\n this.lastErrorTime = errorTime;\r\n let message = \"\"\r\n switch (errorStatus) {\r\n case 0:\r\n message = \"In questo momento Evolution non è disponibile. Riprova tra qualche minuto.\";\r\n break;\r\n case 403:\r\n message = \"Non hai i permessi necessari per eseguire l'operazione richiesta.\";\r\n break;\r\n default:\r\n message = (error.error?.message ?? error.message ?? \"Impossibile eseguire l'operazione richiesta.\").replaceAll(\"\\r\\n\", \"</p><p>\");\r\n break;\r\n }\r\n this.broadcastService.sendMessage(\r\n EvolutionMessages.ERROR,\r\n {\r\n invalidateSession: errorStatus === 405 || errorStatus === 410,\r\n message: message,\r\n title: \"Errore in Clipper\",\r\n errorStatus: errorStatus,\r\n service: this.evolutionService.serviceUri\r\n } as ErrorInfo);\r\n }\r\n }\r\n }\r\n return throwError(() => error);\r\n }));\r\n }\r\n return next.handle(request);\r\n }\r\n\r\n /**\r\n * Handle 401 error\r\n * @param request : the request\r\n * @param next : the http handler\r\n */\r\n private handle401Error(request: HttpRequest<any>, next: HttpHandler) {\r\n if (this.evolutionService.loggedIn()) {\r\n return this.evolutionService.refresh().pipe(\r\n switchMap(() => {\r\n return next.handle(this.addTokenToRequest(request));\r\n }),\r\n catchError(error => {\r\n return throwError(() => error);\r\n })\r\n );\r\n }\r\n return next.handle(request);\r\n }\r\n\r\n /**\r\n * Add token to request\r\n * @param request : the request\r\n * @param token: the token or null to use curre3nt\r\n */\r\n private addTokenToRequest(\r\n request: HttpRequest<any>,\r\n token?: string\r\n ): HttpRequest<any> {\r\n if (request.url.startsWith(this.evolutionService.serviceUri ?? '')) {\r\n if (this.evolutionService.loggedIn()) {\r\n if (!token) token = this.evolutionService.getAuthToken();\r\n if (token) {\r\n return request.clone({\r\n setHeaders: {\r\n Authorization: 'Bearer ' + token,\r\n 'ngsw-bypass': 'ngsw-bypass'\r\n },\r\n });\r\n }\r\n }\r\n }\r\n return request;\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class EvolutionCommonModule {}\r\n\r\n// Other exports\r\nexport * from './messages';\r\nexport * from './definitions';\r\nexport * from './interceptors/auth.interceptor';\r\nexport * from './services/evolution.service';\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\n\r\nexport * from './common/common.module';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["catchError"],"mappings":";;;;;;;;AAAO,MAAM,iBAAiB,GAAG;;AAE/B,IAAA,KAAK,EAAE,YAAY;;AAGnB,IAAA,aAAa,EAAE,oBAAoB;AACnC,IAAA,eAAe,EAAE,sBAAsB;AACvC,IAAA,gBAAgB,EAAE,uBAAuB;AACzC,IAAA,aAAa,EAAE,oBAAoB;AACnC,IAAA,MAAM,EAAE;;;ICLE;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,M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AC,MAAM,KAAK,CAAC;aAC/B,CAAC,CACH;;AAEH,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;;AAG7B;;;;AAIG;IACK,iBAAiB,CACvB,OAAyB,EACzB,KAAc,EAAA;AAEd,QAAA,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE;AAClE,YAAA,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,EAAE;AACpC,gBAAA,IAAI,CAAC,KAAK;AAAE,oBAAA,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;gBACxD,IAAI,KAAK,EAAE;oBACT,OAAO,OAAO,CAAC,KAAK,CAAC;AACnB,wBAAA,UAAU,EAAE;4BACV,aAAa,EAAE,SAAS,GAAG,KAAK;AAChC,4BAAA,aAAa,EAAE;AAChB,yBAAA;AACF,qBAAA,CAAC;;;;AAIR,QAAA,OAAO,OAAO;;8GAlGL,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAxB,wBAAwB,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC;;;MCNY,qBAAqB,CAAA;8GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAArB,qBAAqB,EAAA,CAAA,CAAA;+GAArB,qBAAqB,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC;;;ACFD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, inject, Renderer2, ElementRef, Directive, output, ChangeDetectionStrategy, Component, Injectable, ChangeDetectorRef, signal, viewChild, NgModule, HostBinding, Input, ViewChild, Optional, Self, effect, computed } from '@angular/core';
|
|
3
3
|
import * as i13 from '@angular/material/paginator';
|
|
4
4
|
import { MatPaginatorModule, MatPaginatorIntl } from '@angular/material/paginator';
|
|
5
|
-
import { DialogService, PaginatorIntl, UIService } from '@arsedizioni/ars-utils/ui';
|
|
5
|
+
import { DialogService, PaginatorIntl, OtpInputComponent, UIService } from '@arsedizioni/ars-utils/ui';
|
|
6
6
|
import * as i5 from '@angular/cdk/text-field';
|
|
7
7
|
import { TextFieldModule } from '@angular/cdk/text-field';
|
|
8
8
|
import * as i1 from '@angular/forms';
|
|
@@ -1599,6 +1599,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
1599
1599
|
MatDialogActions, MatDialogClose, TimeValidatorDirective, SafeHtmlPipe], template: "<h2 mat-dialog-title [innerHTML]=\"dialogData.title | safeHtml\"></h2>\r\n<mat-dialog-content>\r\n <form name=\"form\" #f=\"ngForm\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"32px\" fxFill>\r\n <div fxFlex=\"*\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\" fxFill>\r\n <div fxFlex=\"45\" fxFlex.xs=\"100\" fxFlexAlign=\"start\">\r\n <div>\r\n <mat-form-field [appearance]=\"dialogData.appearance\" style=\"width: 100%;\">\r\n <mat-label>{{dialogData.description}}</mat-label>\r\n <input type=\"time\" matInput [(ngModel)]=\"value\" name=\"_value\" #_value=\"ngModel\" [required]=\"dialogData.required\"\r\n time [slots]=\"dialogData.slots\">\r\n @if (_value.invalid) {\r\n <mat-error>Ora non valida.</mat-error>\r\n }\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div fxFlex=\"45\" fxFlex.xs=\"100\" fxFlexAlign=\"start\">\r\n @if(this.dialogData.slots) {\r\n <div class=\"small bold uppercase\">Orari disponibili:</div>\r\n <ul class=\"small\">\r\n @for (s of this.dialogData.slots.replaceAll('-', ' - ').split('|'); track s) {\r\n <li>{{s}}</li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n </div>\r\n @if (dialogData.options) {\r\n <div>\r\n @for (o of dialogData.options; track $index; let i = $index) {\r\n <div>\r\n <mat-checkbox [(ngModel)]=\"o.value\" name=\"opt_{{i}}\">\r\n {{o.description}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <br>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n <button mat-flat-button color=\"primary\" [disabled]=\"f.form.invalid\" \r\n (click)=\"ok()\">{{dialogData.okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" color=\"primary\"\r\n >{{dialogData.cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width: 0px) and (max-width: 430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width: 431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}\n"] }]
|
|
1600
1600
|
}] });
|
|
1601
1601
|
|
|
1602
|
+
class PromptOtpDialogComponent {
|
|
1603
|
+
constructor() {
|
|
1604
|
+
this.f = viewChild.required('f');
|
|
1605
|
+
this.done = output();
|
|
1606
|
+
this.dialogService = inject(DialogService);
|
|
1607
|
+
this.dialogData = inject(MAT_DIALOG_DATA) ?? { appearance: 'fill', title: 'Conferma la tua identità', type: PromptDialogType.Default };
|
|
1608
|
+
}
|
|
1609
|
+
ngOnInit() {
|
|
1610
|
+
if (!this.dialogData.appearance) {
|
|
1611
|
+
this.dialogData.appearance = 'fill';
|
|
1612
|
+
}
|
|
1613
|
+
if (!this.dialogData.title) {
|
|
1614
|
+
this.dialogData.title = 'Conferma la tua identità';
|
|
1615
|
+
}
|
|
1616
|
+
if (!this.dialogData.type) {
|
|
1617
|
+
this.dialogData.type = PromptDialogType.Default;
|
|
1618
|
+
}
|
|
1619
|
+
if (!this.dialogData.okCaption) {
|
|
1620
|
+
this.dialogData.okCaption = 'Ok';
|
|
1621
|
+
}
|
|
1622
|
+
if (!this.dialogData.cancelCaption) {
|
|
1623
|
+
this.dialogData.cancelCaption = 'Annulla';
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* Done
|
|
1628
|
+
*/
|
|
1629
|
+
ok() {
|
|
1630
|
+
if (this.f().form.invalid) {
|
|
1631
|
+
this.dialogService.error("Ci sono degli errori da correggere.");
|
|
1632
|
+
return;
|
|
1633
|
+
}
|
|
1634
|
+
this.done.emit({ value: this.value });
|
|
1635
|
+
}
|
|
1636
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: PromptOtpDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1637
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: PromptOtpDialogComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done" }, host: { attributes: { "Bind": SystemUtils.generateUUID() } }, viewQueries: [{ propertyName: "f", first: true, predicate: ["f"], descendants: true, isSignal: true }], ngImport: i0, template: "<h2 mat-dialog-title [innerHTML]=\"dialogData.title | safeHtml\"></h2>\r\n<mat-dialog-content>\r\n @if (dialogData.description) {\r\n <div [innerHtml]=\"dialogData.description | safeHtml\" style=\"padding-bottom: 20px;\"></div>\r\n }\r\n <form name=\"form\" #f=\"ngForm\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"32px\" fxFill>\r\n <div fxFlex=\"*\" fxLayout=\"column\" fxFill>\r\n <otp-input name=\"otp\" [(ngModel)]=\"value\" required></otp-input> \r\n </div>\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n <button mat-flat-button color=\"primary\" [disabled]=\"f.form.invalid\" (click)=\"ok()\">{{dialogData.okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" color=\"primary\">{{dialogData.cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width: 0px) and (max-width: 430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width: 431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i1$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: OtpInputComponent, selector: "otp-input" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1638
|
+
}
|
|
1639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: PromptOtpDialogComponent, decorators: [{
|
|
1640
|
+
type: Component,
|
|
1641
|
+
args: [{ host: { 'Bind': SystemUtils.generateUUID() }, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogTitle, MatDialogContent, FormsModule, FlexModule, MatButtonModule, MatIconModule,
|
|
1642
|
+
MatDialogActions, MatDialogClose, SafeHtmlPipe, OtpInputComponent], template: "<h2 mat-dialog-title [innerHTML]=\"dialogData.title | safeHtml\"></h2>\r\n<mat-dialog-content>\r\n @if (dialogData.description) {\r\n <div [innerHtml]=\"dialogData.description | safeHtml\" style=\"padding-bottom: 20px;\"></div>\r\n }\r\n <form name=\"form\" #f=\"ngForm\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"32px\" fxFill>\r\n <div fxFlex=\"*\" fxLayout=\"column\" fxFill>\r\n <otp-input name=\"otp\" [(ngModel)]=\"value\" required></otp-input> \r\n </div>\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n <button mat-flat-button color=\"primary\" [disabled]=\"f.form.invalid\" (click)=\"ok()\">{{dialogData.okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" color=\"primary\">{{dialogData.cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width: 0px) and (max-width: 430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width: 431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}\n"] }]
|
|
1643
|
+
}] });
|
|
1644
|
+
|
|
1602
1645
|
class FileInputComponent {
|
|
1603
1646
|
// Initialize
|
|
1604
1647
|
static { this.nextId = 0; }
|
|
@@ -2693,5 +2736,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
2693
2736
|
* Generated bundle index. Do not edit.
|
|
2694
2737
|
*/
|
|
2695
2738
|
|
|
2696
|
-
export { ApplicationDialogService, ArsUIApplicationModule, ButtonSelectorComponent, ButtonToggleComponent, CalendarEmptyHeader, ChipsSelectorComponent, CurrentFilter, CurrentFilterChanged, CurrentFilterItem, FileInputComponent, FilePreviewComponent, FilterBarComponent, Filters, ItemNode, PromptDateDialogComponent, PromptDialogComponent, PromptDialogType, PromptTimeDialogComponent, ResizeTableColumnDirective, SelectDialogComponent, SelectFileDialogComponent, SelectPictureDialogComponent, SelectTreeDialogComponent, SelectableItem, SelectableNode, SendToDialogComponent, TreeDataSource };
|
|
2739
|
+
export { ApplicationDialogService, ArsUIApplicationModule, ButtonSelectorComponent, ButtonToggleComponent, CalendarEmptyHeader, ChipsSelectorComponent, CurrentFilter, CurrentFilterChanged, CurrentFilterItem, FileInputComponent, FilePreviewComponent, FilterBarComponent, Filters, ItemNode, PromptDateDialogComponent, PromptDialogComponent, PromptDialogType, PromptOtpDialogComponent, PromptTimeDialogComponent, ResizeTableColumnDirective, SelectDialogComponent, SelectFileDialogComponent, SelectPictureDialogComponent, SelectTreeDialogComponent, SelectableItem, SelectableNode, SendToDialogComponent, TreeDataSource };
|
|
2697
2740
|
//# sourceMappingURL=arsedizioni-ars-utils-ui.application.mjs.map
|