{ "version": 3, "sources": ["libs/mediio-plattform/kernel/core/settings/organization/data-access/src/lib/services/available-organization-settings.service.ts", "libs/mediio-plattform/kernel/feature/src/lib/providers/provide-kernel-feature.ts", "libs/mediio-plattform/kernel/feature/src/lib/util/has-any-enabled-organization-setting.ts"], "sourcesContent": ["import { Injectable, inject } from '@angular/core';\r\n\r\nimport { type RegisteredSettings } from '@mp/kernel/settings/data-access';\r\n\r\nimport { ORGANIZATION_SETTINGS_TOKEN } from '../injection-tokens';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AvailableOrganizationSettingsService {\r\n private readonly registeredSettings: readonly RegisteredSettings[] =\r\n inject(ORGANIZATION_SETTINGS_TOKEN, {\r\n optional: true,\r\n }) ?? [];\r\n\r\n public hasEnabledOrganizationSettings(): boolean {\r\n return this.registeredSettings.some(({ settings }) => settings.isEnabled?.() !== false);\r\n }\r\n}\r\n", "import { EnvironmentProviders } from '@angular/core';\r\n\r\nimport { ApiKeysPermissions } from '@mp/kernel/api-keys/feature';\r\nimport { OrganizationsPermissions } from '@mp/kernel/organizations/feature';\r\nimport { provideModulePermissions } from '@mp/kernel/permissions/data-access';\r\nimport { IdentityUsersPermissions } from '@mp/kernel/users/feature';\r\nimport { provideModuleInfo } from '@mp/shared/util';\r\n\r\nconst moduleName = 'Kernel';\r\n\r\nexport function provideKernelFeature(): EnvironmentProviders[] {\r\n return [\r\n provideModuleInfo(moduleName, {\r\n displayName: 'System',\r\n }),\r\n provideModulePermissions(moduleName, IdentityUsersPermissions, OrganizationsPermissions, ApiKeysPermissions),\r\n ];\r\n}\r\n", "import { inject } from '@angular/core';\r\n\r\nimport { AvailableOrganizationSettingsService } from '@mp/kernel/settings/organization/data-access';\r\n\r\n/**\r\n * A function that checks for any enabled organization setting.\r\n *\r\n * The function must be used within an injection context.\r\n */\r\nexport function hasAnyEnabledOrganizationSetting(): boolean {\r\n const availableOrganizationSettingsService = inject(AvailableOrganizationSettingsService);\r\n return availableOrganizationSettingsService.hasEnabledOrganizationSettings();\r\n}\r\n"], "mappings": "4RAOA,IAAaA,GAAoC,IAAA,CAA3C,MAAOA,CAAoC,CADjDC,aAAA,CAEmB,KAAAC,mBACfC,EAAOC,EAA6B,CAClCC,SAAU,GACX,GAAK,CAAA,EAEDC,gCAA8B,CACnC,OAAO,KAAKJ,mBAAmBK,KAAK,CAAC,CAAEC,SAAAA,CAAQ,IAAOA,EAASC,YAAW,IAAO,EAAK,CACxF,iDARWT,EAAoC,CAAA,iCAApCA,EAAoCU,QAApCV,EAAoCW,UAAAC,WADvB,MAAM,CAAA,CAAA,SACnBZ,CAAoC,GAAA,ECCjD,IAAMa,EAAa,SAEb,SAAUC,GAAoB,CAClC,MAAO,CACLC,EAAkBF,EAAY,CAC5BG,YAAa,SACd,EACDC,EAAyBJ,EAAYK,EAA0BC,EAA0BC,CAAkB,CAAC,CAEhH,CCRM,SAAUC,GAAgC,CAE9C,OAD6CC,EAAOC,CAAoC,EAC5CC,+BAA8B,CAC5E", "names": ["AvailableOrganizationSettingsService", "constructor", "registeredSettings", "inject", "ORGANIZATION_SETTINGS_TOKEN", "optional", "hasEnabledOrganizationSettings", "some", "settings", "isEnabled", "factory", "\u0275fac", "providedIn", "moduleName", "provideKernelFeature", "provideModuleInfo", "displayName", "provideModulePermissions", "IdentityUsersPermissions", "OrganizationsPermissions", "ApiKeysPermissions", "hasAnyEnabledOrganizationSetting", "inject", "AvailableOrganizationSettingsService", "hasEnabledOrganizationSettings"] }