@esfaenza/core 15.2.252 → 15.2.253

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.
Files changed (30) hide show
  1. package/domain/tokens.d.ts +2 -0
  2. package/esm2020/components/es-image-cropper/es-image-cropper.component.mjs +1 -1
  3. package/esm2020/components/user_infos/user_infos.component.mjs +6 -4
  4. package/esm2020/domain/tokens.mjs +3 -1
  5. package/esm2020/lib/app.component.mjs +2 -2
  6. package/esm2020/lib/core.module.mjs +6 -4
  7. package/esm2020/services/classes/app.routeguard.mjs +4 -3
  8. package/esm2020/services/classes/app.session.mjs +13 -5
  9. package/esm2020/services/classes/app.state.mjs +17 -7
  10. package/esm2020/services/classes/preferences/user/app.userpreferences.base.mjs +6 -3
  11. package/fesm2015/esfaenza-core-components.mjs +6 -4
  12. package/fesm2015/esfaenza-core-components.mjs.map +1 -1
  13. package/fesm2015/esfaenza-core-domain.mjs +3 -1
  14. package/fesm2015/esfaenza-core-domain.mjs.map +1 -1
  15. package/fesm2015/esfaenza-core-services.mjs +35 -13
  16. package/fesm2015/esfaenza-core-services.mjs.map +1 -1
  17. package/fesm2015/esfaenza-core.mjs +7 -5
  18. package/fesm2015/esfaenza-core.mjs.map +1 -1
  19. package/fesm2020/esfaenza-core-components.mjs +6 -4
  20. package/fesm2020/esfaenza-core-components.mjs.map +1 -1
  21. package/fesm2020/esfaenza-core-domain.mjs +3 -1
  22. package/fesm2020/esfaenza-core-domain.mjs.map +1 -1
  23. package/fesm2020/esfaenza-core-services.mjs +31 -13
  24. package/fesm2020/esfaenza-core-services.mjs.map +1 -1
  25. package/fesm2020/esfaenza-core.mjs +7 -5
  26. package/fesm2020/esfaenza-core.mjs.map +1 -1
  27. package/lib/core.module.d.ts +1 -0
  28. package/package.json +12 -12
  29. package/services/classes/app.session.d.ts +2 -1
  30. package/services/classes/app.state.d.ts +2 -1
@@ -186,6 +186,8 @@ const MENU_LOCALIZATION = new InjectionToken('MENU_LOCALIZATION');
186
186
  const MENU = new InjectionToken('MENU');
187
187
  /** Token che indica se il servizio di autenticazione deve utilizzare un token finto */
188
188
  const USE_FAKE_ACCESS_TOKEN = new InjectionToken('USE_FAKE_ACCESS_TOKEN');
189
+ /** Token che indica se il servizio di autenticazione deve funzionare in anonimo lato Frontend. Dev'essere utilizzato insieme al tag "Auth" in code behind */
190
+ const ALLOW_ANONYMOUS = new InjectionToken('USE_FAKE_ACCESS_TOKEN');
189
191
  /** Token che indica i componenti di estensione da aggiungere alla navbar. Verranno bootstrappati in maniera dinamica */
190
192
  const NAVBAR_EXTENSIONS = new InjectionToken('NAVBAR_EXTENSIONS');
191
193
  /** Token che identifica se utilizzare la versione vecchia dell'url di auth (${myconfig.AUTH_URL}/login/form?client=${myconfig.CLIENT_NAME}) invece che la nuova (${myconfig.AUTH_URL}/login;client=${myconfig.CLIENT_NAME}) */
@@ -195,5 +197,5 @@ const LOGIN_URL_LEGACY = new InjectionToken('LOGIN_URL_LEGACY');
195
197
  * Generated bundle index. Do not edit.
196
198
  */
197
199
 
198
- export { AccountScope, ActiveModuleView, ApplicationJob, ApplicationMenu, CategoriesWithModules, EMBEDDED_ROUTE, EnvOptions, GenericItem, JaceAccount, JaceIdentity, JaceModule, JacePermission, JaceRole, JaceUser, KeyValue, LOGIN_URL_LEGACY, MENU, MENU_LOCALIZATION, NAVBAR_EXTENSIONS, REDIRECT_MAP, ROUTE, SearchResult, SearchResultContainer, USE_FAKE_ACCESS_TOKEN, UpdateAccountRecoverySettingsDto, UpdatePasswordDto, UpdateProfilePictureDto, UserAccount };
200
+ export { ALLOW_ANONYMOUS, AccountScope, ActiveModuleView, ApplicationJob, ApplicationMenu, CategoriesWithModules, EMBEDDED_ROUTE, EnvOptions, GenericItem, JaceAccount, JaceIdentity, JaceModule, JacePermission, JaceRole, JaceUser, KeyValue, LOGIN_URL_LEGACY, MENU, MENU_LOCALIZATION, NAVBAR_EXTENSIONS, REDIRECT_MAP, ROUTE, SearchResult, SearchResultContainer, USE_FAKE_ACCESS_TOKEN, UpdateAccountRecoverySettingsDto, UpdatePasswordDto, UpdateProfilePictureDto, UserAccount };
199
201
  //# sourceMappingURL=esfaenza-core-domain.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"esfaenza-core-domain.mjs","sources":["../../../projects/core/domain/src/models/core/ApplicationMenu.ts","../../../projects/core/domain/src/models/core/ApplicationJob.ts","../../../projects/core/domain/src/models/core/EnvOptions.ts","../../../projects/core/domain/src/models/core/KeyValue.ts","../../../projects/core/domain/src/models/core/GenericItem.ts","../../../projects/core/domain/src/models/core/ApplicationRoutes.ts","../../../projects/core/domain/src/models/jace/CategoriesWithModules.ts","../../../projects/core/domain/src/models/jace/AccountScope.ts","../../../projects/core/domain/src/models/jace/ActiveModuleView.ts","../../../projects/core/domain/src/models/jace/JaceAccount.ts","../../../projects/core/domain/src/models/jace/JaceIdentity.ts","../../../projects/core/domain/src/models/jace/JaceModule.ts","../../../projects/core/domain/src/models/jace/JacePermission.ts","../../../projects/core/domain/src/models/jace/JaceRole.ts","../../../projects/core/domain/src/models/jace/JaceUser.ts","../../../projects/core/domain/src/models/global_search/SaerchResultContainer.ts","../../../projects/core/domain/src/models/global_search/SearchResult.ts","../../../projects/core/domain/src/models/user/UpdateAccountRecoverySettingsDto.ts","../../../projects/core/domain/src/models/user/UpdatePasswordDto.ts","../../../projects/core/domain/src/models/user/UpdateProfilePictureDto.ts","../../../projects/core/domain/src/models/user/UserAccount.ts","../../../projects/core/domain/src/tokens.ts","../../../projects/core/domain/src/esfaenza-core-domain.ts"],"sourcesContent":["export class ApplicationMenu {\r\n constructor(\r\n public title: string,\r\n public link?: string,\r\n public routerLink?: string,\r\n public icon?: string,\r\n public ac?: string,\r\n public wip?: boolean,\r\n public subMenu?: ApplicationMenu[],\r\n public queryParams?: {}) { }\r\n\r\n static Group(title: string, icon: string, ac: string, wip: boolean, subMenu: ApplicationMenu[], queryParams?: any): ApplicationMenu {\r\n return new ApplicationMenu(title, null, null, icon, ac, wip, subMenu, queryParams);\r\n }\r\n\r\n static TopItem(title: string, icon: string, routerLink?: string, ac?: string, queryParams?: any, wip?: boolean): ApplicationMenu {\r\n return new ApplicationMenu(title, null, routerLink, icon, ac, wip, null, queryParams);\r\n }\r\n\r\n static Item(title: string, routerLink?: string, ac?: string, queryParams?: any, wip?: boolean): ApplicationMenu {\r\n return new ApplicationMenu(title, null, routerLink, null, ac, !routerLink && !ac && !queryParams ? true : wip, null, queryParams);\r\n }\r\n\r\n static Link(title: string, link?: string) {\r\n return new ApplicationMenu(title, link);\r\n }\r\n\r\n static ignoreStorage: any = { ignoreStorage: true };\r\n}\r\n","import { ReportParam } from \"@esfaenza/es-table\";\r\n\r\nexport class ApplicationJob {\r\n id: string;\r\n description: string;\r\n smalldescription: string;\r\n percentage: number;\r\n completed: boolean;\r\n fileid: string;\r\n reportid: string;\r\n complexreportid: string;\r\n reportpars: ReportParam[];\r\n}","export class EnvOptions {\r\n constructor(moduleId: string, moduleDef: number, env: string, varsion: string, description: string) {\r\n this.AppData = {\r\n ModuleDefId: moduleDef,\r\n ModuleId: moduleId,\r\n ComponentEnvironment: env,\r\n ComponentVersion: varsion,\r\n ModuleDescription: description\r\n }\r\n }\r\n\r\n //Proprietà di configurazione\r\n AppData: { ModuleId: string, ModuleDefId: number, ComponentEnvironment: string, ComponentVersion: string, ModuleDescription: string };\r\n AuthUrl?: string;\r\n Client?: string;\r\n JaceDashboardUrl?: string;\r\n TransactionTimeoutSeconds: number;\r\n\r\n //Proprietà di sistema\r\n redirectInProgress?: boolean;\r\n};","import { Export } from \"@esfaenza/extensions\";\r\n\r\nexport class KeyValue {\r\n constructor(id: string, description: string) {\r\n this.id = id;\r\n this.description = description;\r\n }\r\n @Export(10, \"Cod.\") id: string;\r\n @Export(20, \"Descrizione\") description: string;\r\n}","/** Rappresentazione di un oggetto generico */\r\nexport class GenericItem {\r\n /**\r\n * Costruttore \r\n * \r\n * @param properties Dizionario Chiave - Valore delle proprietà di questo oggetto generico\r\n */\r\n constructor(public properties: Record<string, string>) { }\r\n}\r\n","export const EMBEDDED_ROUTE: string = \"pages_ext\";\r\nexport const ROUTE: string = \"pages\";","import { ActiveModuleView } from \"./ActiveModuleView\";\r\n\r\n\r\nexport class CategoriesWithModules {\r\n constructor(module: ActiveModuleView) {\r\n this.category = module?.category?.toUpperCase();\r\n this.module_rows = [[module]];\r\n }\r\n category: string;\r\n module_rows: ActiveModuleView[][];\r\n}\r\n","import { JaceModule } from \"./JaceModule\";\r\nimport { JacePermission } from \"./JacePermission\";\r\nimport { JaceRole } from \"./JaceRole\";\r\n\r\nexport class AccountScope {\r\n constructor(public modules: JaceModule[] = [], public roles: JaceRole[] = [], public permissions: JacePermission[] = []) { }\r\n}","export class ActiveModuleView {\r\n constructor(public name: string) { }\r\n idmodule: number;\r\n altname: string;\r\n category: string;\r\n tenant: string;\r\n uiurl: string;\r\n environment: string;\r\n href: string;\r\n}","export class JaceAccount {\r\n idaccount: number;\r\n iduser: number;\r\n idtenant: string;\r\n dsusername: string;\r\n dspassword: string;\r\n dtvalidfrom: Date;\r\n dtvalidto: Date;\r\n sydatains: Date;\r\n sydataupd: Date;\r\n dtlockdown: Date;\r\n syuserupd: string;\r\n syuserins: string;\r\n dsreasonlockdown: string;\r\n cnattempts: number;\r\n\r\n //Solo UI\r\n description: string;\r\n}","import { AccountScope } from \"./AccountScope\";\r\n\r\nexport class JaceIdentity {\r\n Expired: boolean;\r\n IdAccount: number;\r\n IdUser: number;\r\n DsUser: string;\r\n FullName: string;\r\n Idtenant: string;\r\n TenantName: string;\r\n IdActor: number;\r\n IdActorRole: number;\r\n ExpirationTime: Date;\r\n\r\n constructor(scope: AccountScope = null) {\r\n this.Roles = [];\r\n this.Modules = [];\r\n this.Permissions = [];\r\n if (scope) {\r\n // Doppio parametro per gestione del nuovo AUTH.\r\n // TODO: Rimuovere quando non serve\r\n this.Roles = scope.roles.map(x=> x.idrolealt || x.roleidalt);\r\n this.Permissions = scope.permissions.map(x=> x.idpermissionalt || x.permissionidalt);\r\n this.Modules = scope.modules.map(x=> x.idmodule || x.moduleid);\r\n }\r\n }\r\n Roles: string[];\r\n Modules: number[];\r\n Permissions: string[];\r\n}\r\n","export class JaceModule {\r\n constructor(\r\n public idmodule: number,\r\n public dsname?: string,\r\n public dscategory?: string,\r\n public idmodulealt?: string\r\n ) {\r\n this.moduleid = idmodule;\r\n }\r\n\r\n // Nouvo Auth\r\n moduleid?: number;\r\n}\r\n","export class JacePermission {\r\n idpermission: number;\r\n dspermission?: string;\r\n idpermissionalt?: string;\r\n sydatains?: Date;\r\n syuserins?: string;\r\n sydataupd?: Date;\r\n syuserupd?: string;\r\n\r\n // Nuovo Auth\r\n permissionidalt?: string;\r\n}\r\n","export class JaceRole\r\n{\r\n constructor(public idrole: number, public idrolealt: string, public dsrole: string) {\r\n this.roleidalt = idrolealt;\r\n }\r\n\r\n dsnote?: string;\r\n idparent?: number;\r\n sydatains?: Date;\r\n syuserins?: string;\r\n sydataupd?: Date;\r\n syuserupd?: string;\r\n\r\n // Nuovo AUTH\r\n roleidalt?: string;\r\n}","\r\nexport class JaceUser {\r\n iduser: number;\r\n dsnome: string;\r\n dscognome: string;\r\n sydatains: Date;\r\n syuserins: string;\r\n sydataupd: Date;\r\n syuserupd: string;\r\n}\r\n","import { SearchResult } from \"./SearchResult\";\r\n\r\nexport class SearchResultContainer {\r\n constructor(public results: SearchResult[]) { }\r\n}","import { GenericItem } from \"../core/GenericItem\";\r\nimport { KeyValue } from \"../core/KeyValue\";\r\nimport { EsTableColumnsDefinition } from \"@esfaenza/es-table\";\r\n\r\nexport class SearchResult {\r\n\r\n constructor(\r\n public description: string,\r\n public columns: KeyValue[],\r\n public items: GenericItem[]\r\n ) { }\r\n\r\n // Solo UI per la visualizzazione dei risultati\r\n est_cols: EsTableColumnsDefinition[];\r\n}\r\n","export class UpdateAccountRecoverySettingsDto {\r\n constructor(public accountid?: string, public email?: string) { }\r\n}","export class UpdatePasswordDto {\r\n constructor(\r\n public accountid?: string,\r\n public oldpwd?: string,\r\n public newpwd?: string,\r\n public confirmpwd?: string,\r\n public changeall: boolean = true,\r\n public changeforexternals: boolean = true) { }\r\n}","export class UpdateProfilePictureDto {\r\n constructor(public accountid?: string) { }\r\n}","export class UserAccount {\r\n id: string;\r\n tenantid: string;\r\n username: string;\r\n typeid: string;\r\n type: string;\r\n dtvalidfrom: Date;\r\n dtvalidto: Date;\r\n dtlock: Date;\r\n lockreason: string;\r\n userid: string;\r\n userdescription: string;\r\n uuid: string;\r\n firstname: string;\r\n lastname: string;\r\n recoveryemail: string;\r\n recoveryphone: string;\r\n dtottexpiration: Date;\r\n dtlastlogin: Date;\r\n lastloginattempts: number;\r\n islocked: boolean;\r\n isvalid: boolean;\r\n}","// Angular\r\nimport { InjectionToken, Type } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\n\r\n// Applicazione\r\nimport { ApplicationMenu } from \"./models/core/ApplicationMenu\";\r\n\r\n/** Token che indica i default da assegnare agli Input */\r\nexport const REDIRECT_MAP: InjectionToken<{ [index: string]: { url: string, params: string[] } }> = new InjectionToken<{ [index: string]: { url: string, params: string[] } }>('REDIRECT_MAP');\r\n\r\n/** Token che indica il servizio di localizzazione utilizzato per i menù */\r\nexport const MENU_LOCALIZATION: InjectionToken<Type<LocalizationService>> = new InjectionToken<Type<LocalizationService>>('MENU_LOCALIZATION');\r\n\r\n/** Token che indica i menù dell'applicazione, da quello vegano fino a quello celiaco */\r\nexport const MENU: InjectionToken<ApplicationMenu[]> = new InjectionToken<ApplicationMenu[]>('MENU');\r\n\r\n/** Token che indica se il servizio di autenticazione deve utilizzare un token finto */\r\nexport const USE_FAKE_ACCESS_TOKEN: InjectionToken<boolean> = new InjectionToken<boolean>('USE_FAKE_ACCESS_TOKEN');\r\n\r\n/** Token che indica i componenti di estensione da aggiungere alla navbar. Verranno bootstrappati in maniera dinamica */\r\nexport const NAVBAR_EXTENSIONS: InjectionToken<Type<any>[]> = new InjectionToken<Type<any>[]>('NAVBAR_EXTENSIONS');\r\n\r\n/** Token che identifica se utilizzare la versione vecchia dell'url di auth (${myconfig.AUTH_URL}/login/form?client=${myconfig.CLIENT_NAME}) invece che la nuova (${myconfig.AUTH_URL}/login;client=${myconfig.CLIENT_NAME}) */\r\nexport const LOGIN_URL_LEGACY: InjectionToken<boolean> = new InjectionToken<boolean>('LOGIN_URL_LEGACY');","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAAa,eAAe,CAAA;AACxB,IAAA,WAAA,CACW,KAAa,EACb,IAAa,EACb,UAAmB,EACnB,IAAa,EACb,EAAW,EACX,GAAa,EACb,OAA2B,EAC3B,WAAgB,EAAA;QAPhB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QACb,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAS;QACb,IAAU,CAAA,UAAA,GAAV,UAAU,CAAS;QACnB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAS;QACb,IAAE,CAAA,EAAA,GAAF,EAAE,CAAS;QACX,IAAG,CAAA,GAAA,GAAH,GAAG,CAAU;QACb,IAAO,CAAA,OAAA,GAAP,OAAO,CAAoB;QAC3B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAK;KAAK;AAEhC,IAAA,OAAO,KAAK,CAAC,KAAa,EAAE,IAAY,EAAE,EAAU,EAAE,GAAY,EAAE,OAA0B,EAAE,WAAiB,EAAA;AAC7G,QAAA,OAAO,IAAI,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;KACtF;AAED,IAAA,OAAO,OAAO,CAAC,KAAa,EAAE,IAAY,EAAE,UAAmB,EAAE,EAAW,EAAE,WAAiB,EAAE,GAAa,EAAA;AAC1G,QAAA,OAAO,IAAI,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU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BAAkB;;ACzBvG;;AAEG;;;;"}
1
+ {"version":3,"file":"esfaenza-core-domain.mjs","sources":["../../../projects/core/domain/src/models/core/ApplicationMenu.ts","../../../projects/core/domain/src/models/core/ApplicationJob.ts","../../../projects/core/domain/src/models/core/EnvOptions.ts","../../../projects/core/domain/src/models/core/KeyValue.ts","../../../projects/core/domain/src/models/core/GenericItem.ts","../../../projects/core/domain/src/models/core/ApplicationRoutes.ts","../../../projects/core/domain/src/models/jace/CategoriesWithModules.ts","../../../projects/core/domain/src/models/jace/AccountScope.ts","../../../projects/core/domain/src/models/jace/ActiveModuleView.ts","../../../projects/core/domain/src/models/jace/JaceAccount.ts","../../../projects/core/domain/src/models/jace/JaceIdentity.ts","../../../projects/core/domain/src/models/jace/JaceModule.ts","../../../projects/core/domain/src/models/jace/JacePermission.ts","../../../projects/core/domain/src/models/jace/JaceRole.ts","../../../projects/core/domain/src/models/jace/JaceUser.ts","../../../projects/core/domain/src/models/global_search/SaerchResultContainer.ts","../../../projects/core/domain/src/models/global_search/SearchResult.ts","../../../projects/core/domain/src/models/user/UpdateAccountRecoverySettingsDto.ts","../../../projects/core/domain/src/models/user/UpdatePasswordDto.ts","../../../projects/core/domain/src/models/user/UpdateProfilePictureDto.ts","../../../projects/core/domain/src/models/user/UserAccount.ts","../../../projects/core/domain/src/tokens.ts","../../../projects/core/domain/src/esfaenza-core-domain.ts"],"sourcesContent":["export class ApplicationMenu {\r\n constructor(\r\n public title: string,\r\n public link?: string,\r\n public routerLink?: string,\r\n public icon?: string,\r\n public ac?: string,\r\n public wip?: boolean,\r\n public subMenu?: ApplicationMenu[],\r\n public queryParams?: {}) { }\r\n\r\n static Group(title: string, icon: string, ac: string, wip: boolean, subMenu: ApplicationMenu[], queryParams?: any): ApplicationMenu {\r\n return new ApplicationMenu(title, null, null, icon, ac, wip, subMenu, queryParams);\r\n }\r\n\r\n static TopItem(title: string, icon: string, routerLink?: string, ac?: string, queryParams?: any, wip?: boolean): ApplicationMenu {\r\n return new ApplicationMenu(title, null, routerLink, icon, ac, wip, null, queryParams);\r\n }\r\n\r\n static Item(title: string, routerLink?: string, ac?: string, queryParams?: any, wip?: boolean): ApplicationMenu {\r\n return new ApplicationMenu(title, null, routerLink, null, ac, !routerLink && !ac && !queryParams ? true : wip, null, queryParams);\r\n }\r\n\r\n static Link(title: string, link?: string) {\r\n return new ApplicationMenu(title, link);\r\n }\r\n\r\n static ignoreStorage: any = { ignoreStorage: true };\r\n}\r\n","import { ReportParam } from \"@esfaenza/es-table\";\r\n\r\nexport class ApplicationJob {\r\n id: string;\r\n description: string;\r\n smalldescription: string;\r\n percentage: number;\r\n completed: boolean;\r\n fileid: string;\r\n reportid: string;\r\n complexreportid: string;\r\n reportpars: ReportParam[];\r\n}","export class EnvOptions {\r\n constructor(moduleId: string, moduleDef: number, env: string, varsion: string, description: string) {\r\n this.AppData = {\r\n ModuleDefId: moduleDef,\r\n ModuleId: moduleId,\r\n ComponentEnvironment: env,\r\n ComponentVersion: varsion,\r\n ModuleDescription: description\r\n }\r\n }\r\n\r\n //Proprietà di configurazione\r\n AppData: { ModuleId: string, ModuleDefId: number, ComponentEnvironment: string, ComponentVersion: string, ModuleDescription: string };\r\n AuthUrl?: string;\r\n Client?: string;\r\n JaceDashboardUrl?: string;\r\n TransactionTimeoutSeconds: number;\r\n\r\n //Proprietà di sistema\r\n redirectInProgress?: boolean;\r\n};","import { Export } from \"@esfaenza/extensions\";\r\n\r\nexport class KeyValue {\r\n constructor(id: string, description: string) {\r\n this.id = id;\r\n this.description = description;\r\n }\r\n @Export(10, \"Cod.\") id: string;\r\n @Export(20, \"Descrizione\") description: string;\r\n}","/** Rappresentazione di un oggetto generico */\r\nexport class GenericItem {\r\n /**\r\n * Costruttore \r\n * \r\n * @param properties Dizionario Chiave - Valore delle proprietà di questo oggetto generico\r\n */\r\n constructor(public properties: Record<string, string>) { }\r\n}\r\n","export const EMBEDDED_ROUTE: string = \"pages_ext\";\r\nexport const ROUTE: string = \"pages\";","import { ActiveModuleView } from \"./ActiveModuleView\";\r\n\r\n\r\nexport class CategoriesWithModules {\r\n constructor(module: ActiveModuleView) {\r\n this.category = module?.category?.toUpperCase();\r\n this.module_rows = [[module]];\r\n }\r\n category: string;\r\n module_rows: ActiveModuleView[][];\r\n}\r\n","import { JaceModule } from \"./JaceModule\";\r\nimport { JacePermission } from \"./JacePermission\";\r\nimport { JaceRole } from \"./JaceRole\";\r\n\r\nexport class AccountScope {\r\n constructor(public modules: JaceModule[] = [], public roles: JaceRole[] = [], public permissions: JacePermission[] = []) { }\r\n}","export class ActiveModuleView {\r\n constructor(public name: string) { }\r\n idmodule: number;\r\n altname: string;\r\n category: string;\r\n tenant: string;\r\n uiurl: string;\r\n environment: string;\r\n href: string;\r\n}","export class JaceAccount {\r\n idaccount: number;\r\n iduser: number;\r\n idtenant: string;\r\n dsusername: string;\r\n dspassword: string;\r\n dtvalidfrom: Date;\r\n dtvalidto: Date;\r\n sydatains: Date;\r\n sydataupd: Date;\r\n dtlockdown: Date;\r\n syuserupd: string;\r\n syuserins: string;\r\n dsreasonlockdown: string;\r\n cnattempts: number;\r\n\r\n //Solo UI\r\n description: string;\r\n}","import { AccountScope } from \"./AccountScope\";\r\n\r\nexport class JaceIdentity {\r\n Expired: boolean;\r\n IdAccount: number;\r\n IdUser: number;\r\n DsUser: string;\r\n FullName: string;\r\n Idtenant: string;\r\n TenantName: string;\r\n IdActor: number;\r\n IdActorRole: number;\r\n ExpirationTime: Date;\r\n\r\n constructor(scope: AccountScope = null) {\r\n this.Roles = [];\r\n this.Modules = [];\r\n this.Permissions = [];\r\n if (scope) {\r\n // Doppio parametro per gestione del nuovo AUTH.\r\n // TODO: Rimuovere quando non serve\r\n this.Roles = scope.roles.map(x=> x.idrolealt || x.roleidalt);\r\n this.Permissions = scope.permissions.map(x=> x.idpermissionalt || x.permissionidalt);\r\n this.Modules = scope.modules.map(x=> x.idmodule || x.moduleid);\r\n }\r\n }\r\n Roles: string[];\r\n Modules: number[];\r\n Permissions: string[];\r\n}\r\n","export class JaceModule {\r\n constructor(\r\n public idmodule: number,\r\n public dsname?: string,\r\n public dscategory?: string,\r\n public idmodulealt?: string\r\n ) {\r\n this.moduleid = idmodule;\r\n }\r\n\r\n // Nouvo Auth\r\n moduleid?: number;\r\n}\r\n","export class JacePermission {\r\n idpermission: number;\r\n dspermission?: string;\r\n idpermissionalt?: string;\r\n sydatains?: Date;\r\n syuserins?: string;\r\n sydataupd?: Date;\r\n syuserupd?: string;\r\n\r\n // Nuovo Auth\r\n permissionidalt?: string;\r\n}\r\n","export class JaceRole\r\n{\r\n constructor(public idrole: number, public idrolealt: string, public dsrole: string) {\r\n this.roleidalt = idrolealt;\r\n }\r\n\r\n dsnote?: string;\r\n idparent?: number;\r\n sydatains?: Date;\r\n syuserins?: string;\r\n sydataupd?: Date;\r\n syuserupd?: string;\r\n\r\n // Nuovo AUTH\r\n roleidalt?: string;\r\n}","\r\nexport class JaceUser {\r\n iduser: number;\r\n dsnome: string;\r\n dscognome: string;\r\n sydatains: Date;\r\n syuserins: string;\r\n sydataupd: Date;\r\n syuserupd: string;\r\n}\r\n","import { SearchResult } from \"./SearchResult\";\r\n\r\nexport class SearchResultContainer {\r\n constructor(public results: SearchResult[]) { }\r\n}","import { GenericItem } from \"../core/GenericItem\";\r\nimport { KeyValue } from \"../core/KeyValue\";\r\nimport { EsTableColumnsDefinition } from \"@esfaenza/es-table\";\r\n\r\nexport class SearchResult {\r\n\r\n constructor(\r\n public description: string,\r\n public columns: KeyValue[],\r\n public items: GenericItem[]\r\n ) { }\r\n\r\n // Solo UI per la visualizzazione dei risultati\r\n est_cols: EsTableColumnsDefinition[];\r\n}\r\n","export class UpdateAccountRecoverySettingsDto {\r\n constructor(public accountid?: string, public email?: string) { }\r\n}","export class UpdatePasswordDto {\r\n constructor(\r\n public accountid?: string,\r\n public oldpwd?: string,\r\n public newpwd?: string,\r\n public confirmpwd?: string,\r\n public changeall: boolean = true,\r\n public changeforexternals: boolean = true) { }\r\n}","export class UpdateProfilePictureDto {\r\n constructor(public accountid?: string) { }\r\n}","export class UserAccount {\r\n id: string;\r\n tenantid: string;\r\n username: string;\r\n typeid: string;\r\n type: string;\r\n dtvalidfrom: Date;\r\n dtvalidto: Date;\r\n dtlock: Date;\r\n lockreason: string;\r\n userid: string;\r\n userdescription: string;\r\n uuid: string;\r\n firstname: string;\r\n lastname: string;\r\n recoveryemail: string;\r\n recoveryphone: string;\r\n dtottexpiration: Date;\r\n dtlastlogin: Date;\r\n lastloginattempts: number;\r\n islocked: boolean;\r\n isvalid: boolean;\r\n}","// Angular\r\nimport { InjectionToken, Type } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { LocalizationService } from \"@esfaenza/localizations\";\r\n\r\n// Applicazione\r\nimport { ApplicationMenu } from \"./models/core/ApplicationMenu\";\r\n\r\n/** Token che indica i default da assegnare agli Input */\r\nexport const REDIRECT_MAP: InjectionToken<{ [index: string]: { url: string, params: string[] } }> = new InjectionToken<{ [index: string]: { url: string, params: string[] } }>('REDIRECT_MAP');\r\n\r\n/** Token che indica il servizio di localizzazione utilizzato per i menù */\r\nexport const MENU_LOCALIZATION: InjectionToken<Type<LocalizationService>> = new InjectionToken<Type<LocalizationService>>('MENU_LOCALIZATION');\r\n\r\n/** Token che indica i menù dell'applicazione, da quello vegano fino a quello celiaco */\r\nexport const MENU: InjectionToken<ApplicationMenu[]> = new InjectionToken<ApplicationMenu[]>('MENU');\r\n\r\n/** Token che indica se il servizio di autenticazione deve utilizzare un token finto */\r\nexport const USE_FAKE_ACCESS_TOKEN: InjectionToken<boolean> = new InjectionToken<boolean>('USE_FAKE_ACCESS_TOKEN');\r\n\r\n/** Token che indica se il servizio di autenticazione deve funzionare in anonimo lato Frontend. Dev'essere utilizzato insieme al tag \"Auth\" in code behind */\r\nexport const ALLOW_ANONYMOUS: InjectionToken<boolean> = new InjectionToken<boolean>('USE_FAKE_ACCESS_TOKEN');\r\n\r\n/** Token che indica i componenti di estensione da aggiungere alla navbar. Verranno bootstrappati in maniera dinamica */\r\nexport const NAVBAR_EXTENSIONS: InjectionToken<Type<any>[]> = new InjectionToken<Type<any>[]>('NAVBAR_EXTENSIONS');\r\n\r\n/** Token che identifica se utilizzare la versione vecchia dell'url di auth (${myconfig.AUTH_URL}/login/form?client=${myconfig.CLIENT_NAME}) invece che la nuova (${myconfig.AUTH_URL}/login;client=${myconfig.CLIENT_NAME}) */\r\nexport const LOGIN_URL_LEGACY: InjectionToken<boolean> = new InjectionToken<boolean>('LOGIN_URL_LEGACY');","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAAa,eAAe,CAAA;AACxB,IAAA,WAAA,CACW,KAAa,EACb,IAAa,EACb,UAAmB,EACnB,IAAa,EACb,EAAW,EACX,GAAa,EACb,OAA2B,EAC3B,WAAgB,EAAA;QAPhB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QACb,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAS;QACb,IAAU,CAAA,UAAA,GAAV,UAAU,CAAS;QACnB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAS;QACb,IAAE,CAAA,EAAA,GAAF,EAAE,CAAS;QACX,IAAG,CAAA,GAAA,GAAH,GAAG,CAAU;QACb,IAAO,CAAA,OAAA,GAAP,OAAO,CAAoB;QAC3B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAK;KAAK;AAEhC,IAAA,OAAO,KAAK,CAAC,KAAa,EAAE,IAAY,EAAE,EAAU,EAAE,GAAY,EAAE,OAA0B,EAAE,WAAiB,EAAA;AAC7G,QAAA,OAAO,IAAI,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;KACtF;AAED,IAAA,OAAO,OAAO,CAAC,KAAa,EAAE,IAAY,EAAE,UAAmB,EAAE,EAAW,EAAE,WAAiB,EAAE,GAAa,EAAA;AAC1G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AuB,EAAE;AAE7G;MACa,iBAAiB,GAAgC,IAAI,cAAc,CAAc,mBAAmB,EAAE;AAEnH;MACa,gBAAgB,GAA4B,IAAI,cAAc,CAAU,kBAAkB;;AC5BvG;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Optional, Inject } from '@angular/core';
3
- import { JaceIdentity, USE_FAKE_ACCESS_TOKEN, UpdateProfilePictureDto, UpdateAccountRecoverySettingsDto, UpdatePasswordDto } from '@esfaenza/core/domain';
3
+ import { JaceIdentity, USE_FAKE_ACCESS_TOKEN, ALLOW_ANONYMOUS, UpdateProfilePictureDto, UpdateAccountRecoverySettingsDto, UpdatePasswordDto } from '@esfaenza/core/domain';
4
4
  import * as i1 from 'ngx-cookie-service';
5
5
  import { of, Subject, filter, firstValueFrom } from 'rxjs';
6
6
  import * as i2 from '@angular/common/http';
@@ -1165,7 +1165,7 @@ class AppState {
1165
1165
  this.notifyDataChanged("modules.Retrieved", this._modules);
1166
1166
  }
1167
1167
  get Modules() { return this._modules; }
1168
- constructor(router, lc, bts, notifications, MessageDef, intercom, emb) {
1168
+ constructor(router, lc, bts, notifications, MessageDef, intercom, emb, allowAnonymous) {
1169
1169
  this.router = router;
1170
1170
  this.lc = lc;
1171
1171
  this.bts = bts;
@@ -1173,6 +1173,7 @@ class AppState {
1173
1173
  this.MessageDef = MessageDef;
1174
1174
  this.intercom = intercom;
1175
1175
  this.emb = emb;
1176
+ this.allowAnonymous = allowAnonymous;
1176
1177
  this.redirectingToLogin = false;
1177
1178
  this.handlingError = false;
1178
1179
  this.christmasTime = false;
@@ -1221,7 +1222,8 @@ class AppState {
1221
1222
  // Se non ho un id mi manca il login, quindi via di qua
1222
1223
  var id = this.getJaceIDentity();
1223
1224
  if (!id) {
1224
- //TODO: Commentare per la modalità IFRAME
1225
+ if (this.allowAnonymous)
1226
+ return "";
1225
1227
  this.router.navigate(["login"]);
1226
1228
  return "";
1227
1229
  }
@@ -1266,7 +1268,10 @@ class AppState {
1266
1268
  }
1267
1269
  setupSignalRJobListening() {
1268
1270
  this.notifications.observe(this.MessageDef.IN_JobProgressNotification).subscribe((ev) => {
1269
- var desc = (ev.description || ev.actionid) + " (" + (ev.user || this.getJaceIDentity().DsUser) + ")";
1271
+ var identity = this.getJaceIDentity();
1272
+ if (!identity)
1273
+ return;
1274
+ var desc = (ev.description || ev.actionid) + " (" + (ev.user || identity.DsUser) + ")";
1270
1275
  let job = {
1271
1276
  id: ev.instance,
1272
1277
  description: desc,
@@ -1350,12 +1355,15 @@ class AppState {
1350
1355
  this.headerHeight = height;
1351
1356
  }
1352
1357
  }
1353
- AppState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppState, deps: [{ token: i1$1.Router }, { token: i1$2.LocalizationService }, { token: TokenService }, { token: i4.NotificationsService }, { token: i4.BaseMessageService }, { token: i5.InterComService }, { token: i5.AppEmbeddingExtensions }], target: i0.ɵɵFactoryTarget.Injectable });
1358
+ AppState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppState, deps: [{ token: i1$1.Router }, { token: i1$2.LocalizationService }, { token: TokenService }, { token: i4.NotificationsService }, { token: i4.BaseMessageService }, { token: i5.InterComService }, { token: i5.AppEmbeddingExtensions }, { token: ALLOW_ANONYMOUS }], target: i0.ɵɵFactoryTarget.Injectable });
1354
1359
  AppState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppState, providedIn: "root" });
1355
1360
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AppState, decorators: [{
1356
1361
  type: Injectable,
1357
1362
  args: [{ providedIn: "root" }]
1358
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$2.LocalizationService }, { type: TokenService }, { type: i4.NotificationsService }, { type: i4.BaseMessageService }, { type: i5.InterComService }, { type: i5.AppEmbeddingExtensions }]; } });
1363
+ }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$2.LocalizationService }, { type: TokenService }, { type: i4.NotificationsService }, { type: i4.BaseMessageService }, { type: i5.InterComService }, { type: i5.AppEmbeddingExtensions }, { type: undefined, decorators: [{
1364
+ type: Inject,
1365
+ args: [ALLOW_ANONYMOUS]
1366
+ }] }]; } });
1359
1367
 
1360
1368
  // Angular
1361
1369
  class HTTPServiceExtensions {
@@ -1473,9 +1481,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1473
1481
 
1474
1482
  // Angular
1475
1483
  class SessionRetriever {
1476
- constructor(bts, router) {
1484
+ constructor(bts, router, allowAnonymous) {
1477
1485
  this.bts = bts;
1478
1486
  this.router = router;
1487
+ this.allowAnonymous = allowAnonymous;
1479
1488
  }
1480
1489
  /** Tenant§Account§User§ModuleId */
1481
1490
  getSessionKey() {
@@ -1484,6 +1493,8 @@ class SessionRetriever {
1484
1493
  // Se non ho un id mi manca il login, quindi via di qua
1485
1494
  var id = this.bts.getJaceIdentity();
1486
1495
  if (!id) {
1496
+ if (this.allowAnonymous)
1497
+ return "";
1487
1498
  console.log("SessionRetriever - no identity, redirecting to login");
1488
1499
  this.router.navigate(["login"]);
1489
1500
  return "";
@@ -1492,12 +1503,15 @@ class SessionRetriever {
1492
1503
  return this.SessionIdentity;
1493
1504
  }
1494
1505
  }
1495
- SessionRetriever.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionRetriever, deps: [{ token: TokenService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1506
+ SessionRetriever.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionRetriever, deps: [{ token: TokenService }, { token: i1$1.Router }, { token: ALLOW_ANONYMOUS }], target: i0.ɵɵFactoryTarget.Injectable });
1496
1507
  SessionRetriever.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionRetriever, providedIn: "root" });
1497
1508
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionRetriever, decorators: [{
1498
1509
  type: Injectable,
1499
1510
  args: [{ providedIn: "root" }]
1500
- }], ctorParameters: function () { return [{ type: TokenService }, { type: i1$1.Router }]; } });
1511
+ }], ctorParameters: function () { return [{ type: TokenService }, { type: i1$1.Router }, { type: undefined, decorators: [{
1512
+ type: Inject,
1513
+ args: [ALLOW_ANONYMOUS]
1514
+ }] }]; } });
1501
1515
 
1502
1516
  // Angular
1503
1517
  // Chiamate ai Repository
@@ -1679,8 +1693,11 @@ class UserPreferencesService {
1679
1693
  this.http = this.injector.get(HTTPService);
1680
1694
  this.msgExts = this.injector.get(MessageService);
1681
1695
  this.fakeToken = this.injector.get(USE_FAKE_ACCESS_TOKEN) || false;
1682
- this.AccountId = tks.getJaceIdentity().IdAccount.toString();
1683
- this.doReloadProfilePicture();
1696
+ var identity = tks.getJaceIdentity();
1697
+ if (identity) {
1698
+ this.AccountId = identity.IdAccount.toString();
1699
+ this.doReloadProfilePicture();
1700
+ }
1684
1701
  }
1685
1702
  async getAccountProfile() {
1686
1703
  let pars = new HttpParams().set("idAccount", this.AccountId);
@@ -1754,8 +1771,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1754
1771
  class BaseRouterGuard extends AccessControlRouteGuard {
1755
1772
  constructor(ms, acc, router, ts) {
1756
1773
  super(ms, acc, router);
1757
- if (!acc.Initialized)
1758
- acc.initializeIdentity(ts.getJaceIdentity());
1774
+ let identity = ts.getJaceIdentity();
1775
+ if (!acc.Initialized && identity)
1776
+ acc.initializeIdentity(identity);
1759
1777
  }
1760
1778
  }
1761
1779
  BaseRouterGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseRouterGuard, deps: [{ token: i5.MessageService }, { token: i5$1.AccessControlService }, { token: i1$1.Router }, { token: TokenService }], target: i0.ɵɵFactoryTarget.Injectable });