@acorex-platform/module-settings-management-client 0.0.21
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/acorex-platform-module-settings-management-client-contracts.mjs +146 -0
- package/fesm2022/acorex-platform-module-settings-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-settings-management-client-setting-page.component-eAaMh3-8.mjs +441 -0
- package/fesm2022/acorex-platform-module-settings-management-client-setting-page.component-eAaMh3-8.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-settings-management-client-setting-view.component-CSJ-1pfO.mjs +306 -0
- package/fesm2022/acorex-platform-module-settings-management-client-setting-view.component-CSJ-1pfO.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-settings-management-client.mjs +1028 -0
- package/fesm2022/acorex-platform-module-settings-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-settings-management-client-contracts.d.ts +166 -0
- package/types/acorex-platform-module-settings-management-client.d.ts +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-settings-management-client.mjs","sources":["../../../../libs/modules/settings-management/client/src/lib/features/settings/convert-setting-data.ts","../../../../libs/modules/settings-management/client/src/lib/features/settings/settings.viewmodel.ts","../../../../libs/modules/settings-management/client/src/lib/manifest.ts","../../../../libs/modules/settings-management/client/src/lib/features/settings/search-definition.provider.ts","../../../../libs/modules/settings-management/client/src/lib/features/settings/search.provider.ts","../../../../libs/modules/settings-management/client/src/lib/features/settings/settings-page-can-deactivate.guard.ts","../../../../libs/modules/settings-management/client/src/lib/features/settings/settings-scope.guard.ts","../../../../libs/modules/settings-management/client/src/lib/menu.provider.ts","../../../../libs/modules/settings-management/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/settings-management/client/src/lib/features/profile-page/settings-management-profile-sections.hook.ts","../../../../libs/modules/settings-management/client/src/lib/profile-slot-settings-menu.hook.ts","../../../../libs/modules/settings-management/client/src/lib/settings-management.module.ts","../../../../libs/modules/settings-management/client/src/acorex-platform-module-settings-management-client.ts"],"sourcesContent":["import { AXPSettingDefinition, AXPSettingDefinitionGroup, AXPSettingDefinitionSection } from '@acorex-platform/framework-client/common';\n\n/**\n * Filters setting groups for in-page search. When `settingSearchTextByKey` is provided (lowercased\n * translated blobs keyed by setting name), setting matches use it; otherwise a raw key fallback is used.\n */\nexport function searchSettings(\n groups: AXPSettingDefinitionGroup[],\n search: string,\n settingSearchTextByKey?: Record<string, string>,\n): AXPSettingDefinitionGroup[] {\n const trimmed = search?.trim() ?? '';\n if (!trimmed) {\n return [];\n }\n\n const normalizedSearch = trimmed.toLowerCase();\n const sectionMatchResult: AXPSettingDefinitionGroup[] = [];\n const settingMatchResult: AXPSettingDefinitionGroup[] = [];\n const processedGroups = new Set<string>();\n\n const createGroupIdentifier = (group: AXPSettingDefinitionGroup): string => `${group.name}-${group.title}`;\n\n const addGroupToResult = (\n group: AXPSettingDefinitionGroup,\n sections: AXPSettingDefinitionSection[],\n resultArray: AXPSettingDefinitionGroup[]\n ) => {\n const groupId = createGroupIdentifier(group);\n if (!processedGroups.has(groupId)) {\n resultArray.push({\n ...group,\n sections,\n groups: [], // Exclude nested groups\n });\n processedGroups.add(groupId);\n }\n };\n\n const processSections = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => boolean\n ) => {\n const matchedSections = group.sections.filter(filterFn);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, sectionMatchResult);\n }\n };\n\n const processSettings = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => AXPSettingDefinitionSection | null\n ) => {\n const matchedSections = group.sections\n .map(filterFn)\n .filter((section): section is AXPSettingDefinitionSection => section !== null);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, settingMatchResult);\n }\n };\n\n const sectionMatches = (section: AXPSettingDefinitionSection): boolean =>\n section.name.toLowerCase().includes(normalizedSearch) ||\n section.title.toLowerCase().includes(normalizedSearch);\n\n const settingSearchBlob = (setting: AXPSettingDefinition): string => {\n const fromIndex = settingSearchTextByKey?.[setting.name];\n if (fromIndex) {\n return fromIndex;\n }\n return [setting.name, setting.title, setting.description ?? '', ...(setting.searchTagKeys ?? [])]\n .join(' ')\n .toLowerCase();\n };\n\n const filterSettings = (section: AXPSettingDefinitionSection): AXPSettingDefinitionSection | null => {\n const matchedSettings = section.settings.filter((setting) => {\n const blob = settingSearchBlob(setting);\n return (\n setting.name.toLowerCase().includes(normalizedSearch) ||\n blob.includes(normalizedSearch)\n );\n });\n return matchedSettings.length > 0 ? { ...section, settings: matchedSettings } : null;\n };\n\n const processGroupRecursively = (group: AXPSettingDefinitionGroup) => {\n processSections(group, sectionMatches); // Match sections with all settings\n processSettings(group, filterSettings); // Match settings within sections\n group.groups.forEach(processGroupRecursively); // Recurse into nested groups\n };\n\n groups.forEach(processGroupRecursively);\n\n return [...sectionMatchResult, ...settingMatchResult];\n}\n","import { AXPPageStatus } from '@acorex-platform/framework-shared/widget-core';\nimport { AXFormComponent } from '@acorex/components/form';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXLocaleService } from '@acorex/core/locale';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPSettingDefinitionGroup,\n AXPSettingDefinitionProviderService,\n AXPSettingDefinitionSection,\n AXPSettingsService,\n traceSettingsPageLoadComplete,\n traceSettingsPageLoadStarted,\n} from '@acorex-platform/framework-client/common';\nimport {\n AXPPlatformScope,\n AXPPlatformScopeKey,\n getSmart,\n resolvePlatformScopeName,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPDeviceService } from '@acorex-platform/framework-client/core';\n\nimport { computed, inject } from '@angular/core';\nimport { patchState, signalStore, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';\nimport { cloneDeep, get, isEmpty, isEqual, isNil } from 'lodash';\nimport { filter, merge } from 'rxjs';\nimport { searchSettings } from './convert-setting-data';\n\n/** Delay before reload so the success toast is visible. */\nconst PAGE_REFRESH_DELAY_MS = 500;\n\n/** Setting keys are flat (may contain dots). Prefer own-property, then smart path. */\nfunction readFlatSettingValue(context: Record<string, unknown>, key: string): unknown {\n if (Object.prototype.hasOwnProperty.call(context, key)) {\n return context[key];\n }\n return getSmart(context, key);\n}\n\nfunction collectSettingKeys(groups: AXPSettingDefinitionGroup[]): string[] {\n const keys: string[] = [];\n const walkSections = (sections: AXPSettingDefinitionSection[]) => {\n for (const section of sections) {\n for (const setting of section.settings) {\n keys.push(setting.name);\n }\n }\n };\n const walkGroups = (gs: AXPSettingDefinitionGroup[]) => {\n for (const group of gs) {\n walkSections(group.sections);\n walkGroups(group.groups);\n }\n };\n walkGroups(groups);\n return keys;\n}\n\nexport const AXPSettingsViewModel = signalStore(\n withState(() => ({\n groups: [] as AXPSettingDefinitionGroup[],\n activateGroup: undefined as AXPSettingDefinitionGroup | undefined,\n scope: 'U' as AXPPlatformScopeKey,\n //\n searchExpression: null as string | null,\n settingSearchTextByKey: {} as Record<string, string>,\n //\n previousContext: {} as Record<string, any>,\n context: {} as Record<string, any>,\n /** Synced from {@link AXPWidgetContainerComponent.isFormDirty}. */\n formDirty: false,\n /** Bumped after apply so the settings view can commit the container saved baseline. */\n applySyncNonce: 0,\n /** Suppresses container→VM dirty echo while post-save baseline sync runs. */\n syncingBaseline: false,\n /** Bumped after discard so the settings view can revert the container to saved. */\n discardSyncNonce: 0,\n //\n status: AXPPageStatus.Processing,\n form: null as AXFormComponent | null,\n })),\n withComputed((store, deviceService = inject(AXPDeviceService)) => ({\n searchResults: computed(() => {\n const q = store.searchExpression();\n if (q == null || !q.trim()) {\n return [];\n }\n return searchSettings(store.groups(), q, store.settingSearchTextByKey());\n }),\n hasActivateGroup: computed(() => store.activateGroup() != null),\n showGroups: computed(() => store.activateGroup() != null && deviceService.isLarge()),\n scopeTitle: computed(() => {\n return `${resolvePlatformScopeName(store.scope())}.title`;\n }),\n scopeDescription: computed(() => {\n return `${resolvePlatformScopeName(store.scope())}.description`;\n }),\n isSearching: computed(() => store.searchExpression() != null),\n isBusy: computed(() => store.status() == AXPPageStatus.Processing),\n isSaving: computed(() => store.status() == AXPPageStatus.Submitting),\n isLoaded: computed(() => store.groups().length > 0),\n isDirty: computed(() => store.formDirty()),\n })),\n withMethods(\n (\n store,\n settingDefinitionService = inject(AXPSettingDefinitionProviderService),\n settingValueService = inject(AXPSettingsService),\n toastService = inject(AXToastService),\n translateService = inject(AXTranslationService),\n ) => ({\n registerForm(form: AXFormComponent) {\n patchState(store, {\n form: form,\n });\n },\n async load(scope: AXPPlatformScopeKey) {\n traceSettingsPageLoadStarted(scope, 'settings-page-vm-load');\n const startedAt = Date.now();\n patchState(store, {\n scope: scope,\n status: AXPPageStatus.Processing,\n });\n try {\n const groups = await settingDefinitionService.getListAsync(scope);\n patchState(store, {\n groups: groups,\n });\n await this.rebuildSettingSearchIndex();\n // Settings admin must bind server partition values. `all()` alone can reuse a warm\n // IndexedDB/memory snapshot that omits non-cacheable keys (e.g. SMTP).\n await settingValueService.reload(scope as AXPPlatformScope, 'settings-page-open');\n const currentContext = await settingValueService.scope(scope as AXPPlatformScope).all();\n const defaults = await settingValueService.scope(scope as AXPPlatformScope).defaultValues();\n const context = { ...defaults, ...currentContext };\n patchState(store, {\n context,\n previousContext: cloneDeep(context),\n formDirty: false,\n });\n traceSettingsPageLoadComplete({\n scope,\n groupCount: groups.length,\n valueKeyCount: Object.keys(store.context()).length,\n durationMs: Date.now() - startedAt,\n });\n } catch (error) {\n console.error('Settings page load failed', error);\n } finally {\n // Always leave Processing so Apply/Discard are not stuck disabled after a partial load.\n patchState(store, {\n status: AXPPageStatus.Rendered,\n });\n }\n },\n async reload() {\n await settingDefinitionService.reload();\n const groups = await settingDefinitionService.getListAsync(store.scope());\n const oldActivateGroupName = store.activateGroup()?.name;\n patchState(store, {\n groups: groups,\n activateGroup: undefined,\n });\n if (oldActivateGroupName) {\n this.setActivateGroupByName(oldActivateGroupName);\n }\n await this.rebuildSettingSearchIndex();\n },\n async rebuildSettingSearchIndex() {\n const groups = store.groups();\n const map: Record<string, string> = {};\n const walkSections = async (sections: AXPSettingDefinitionSection[]) => {\n for (const section of sections) {\n for (const setting of section.settings) {\n const parts: string[] = [await translateService.translateAsync(setting.title)];\n if (setting.description) {\n parts.push(await translateService.translateAsync(setting.description));\n }\n if (setting.searchTagKeys?.length) {\n for (const key of setting.searchTagKeys) {\n parts.push(await translateService.translateAsync(key));\n }\n }\n map[setting.name] = parts.join(' ').toLowerCase();\n }\n }\n };\n const walkGroups = async (gs: AXPSettingDefinitionGroup[]) => {\n for (const g of gs) {\n await walkSections(g.sections);\n await walkGroups(g.groups);\n }\n };\n await walkGroups(groups);\n patchState(store, { settingSearchTextByKey: map });\n },\n updateContext(context: Record<string, any>) {\n patchState(store, {\n context,\n });\n },\n setFormDirty(dirty: boolean) {\n if (store.syncingBaseline() || store.formDirty() === dirty) {\n return;\n }\n patchState(store, {\n formDirty: dirty,\n });\n },\n setSyncingBaseline(syncing: boolean) {\n if (store.syncingBaseline() === syncing) {\n return;\n }\n patchState(store, {\n syncingBaseline: syncing,\n });\n },\n setActivateGroup(group: AXPSettingDefinitionGroup) {\n patchState(store, {\n activateGroup: group,\n formDirty: false,\n });\n },\n unloadActivateGroup() {\n patchState(store, {\n activateGroup: undefined,\n formDirty: false,\n });\n },\n setActivateGroupByName(name: string) {\n const group = store.groups().find((g) => g.name === name);\n if (group) {\n patchState(store, {\n activateGroup: group,\n formDirty: false,\n });\n }\n },\n //\n async search(expression: string) {\n if (!isNil(expression) && !isEmpty(expression)) {\n patchState(store, {\n searchExpression: expression,\n formDirty: false,\n });\n } else {\n patchState(store, {\n searchExpression: null,\n formDirty: false,\n });\n }\n },\n clearSearch() {\n patchState(store, {\n searchExpression: null,\n formDirty: false,\n });\n },\n async apply(): Promise<boolean> {\n const form = store.form();\n if (!form || !store.isDirty()) {\n return false;\n }\n\n form.resetErrors();\n patchState(store, {\n status: AXPPageStatus.Submitting,\n });\n\n try {\n const formResult = await form.validate();\n if (!formResult.result) {\n patchState(store, {\n status: AXPPageStatus.Rendered,\n });\n toastService.show({\n color: 'danger',\n title: await translateService.translateAsync('@general:actions.apply.messages.invalid.title'),\n content: await translateService.translateAsync('@general:actions.apply.messages.invalid.message'),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n return false;\n }\n\n // Persist only known flat setting keys. Context may contain nested parent objects\n // created by path-based writes (e.g. Common:Setting:Offline → { AllowWorkingOffline }).\n const settingKeys = collectSettingKeys(store.groups());\n const context = store.context();\n const previous = store.previousContext();\n const changedValues: Record<string, unknown> = {};\n for (const key of settingKeys) {\n const value = readFlatSettingValue(context, key);\n const previousValue = readFlatSettingValue(previous, key);\n if (!isEqual(value, previousValue)) {\n changedValues[key] = value;\n }\n }\n await settingValueService.scope(store.scope() as AXPPlatformScope).set(changedValues, { flush: true });\n\n const refreshByKey = await settingDefinitionService.requiresPageRefreshByKey();\n const needsPageRefresh = Object.keys(changedValues).some((key) => refreshByKey[key]);\n\n // Keep VM context flat for the next edit session (drop accidental nested parents).\n const nextContext: Record<string, unknown> = {};\n for (const key of settingKeys) {\n const value = Object.prototype.hasOwnProperty.call(changedValues, key)\n ? changedValues[key]\n : readFlatSettingValue(context, key);\n if (value !== undefined) {\n nextContext[key] = value;\n }\n }\n\n patchState(store, {\n status: AXPPageStatus.Rendered,\n context: nextContext,\n previousContext: cloneDeep(nextContext),\n formDirty: false,\n applySyncNonce: store.applySyncNonce() + 1,\n });\n\n const successTitleKey = needsPageRefresh\n ? '@settings-management:settings.actions.apply.reload.success.title'\n : '@settings-management:settings.actions.apply.success.title';\n const successMessageKey = needsPageRefresh\n ? '@settings-management:settings.actions.apply.reload.success.message'\n : '@settings-management:settings.actions.apply.success.message';\n\n toastService.show({\n color: 'success',\n title: await translateService.translateAsync(successTitleKey),\n content: await translateService.translateAsync(successMessageKey),\n location: 'bottom-center',\n closeButton: true,\n timeOut: needsPageRefresh ? PAGE_REFRESH_DELAY_MS : 3000,\n timeOutProgress: true,\n });\n\n if (needsPageRefresh) {\n setTimeout(() => location.reload(), PAGE_REFRESH_DELAY_MS);\n }\n\n return true;\n } catch {\n patchState(store, {\n status: AXPPageStatus.Rendered,\n });\n toastService.show({\n color: 'danger',\n title: await translateService.translateAsync('@settings-management:settings.actions.apply.error.title'),\n content: await translateService.translateAsync('@settings-management:settings.actions.apply.error.message'),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n return false;\n }\n },\n applySavedState(context: Record<string, unknown>) {\n const snapshot = cloneDeep(context);\n patchState(store, {\n context: snapshot,\n previousContext: snapshot,\n formDirty: false,\n });\n },\n\n async discard() {\n const form = store.form();\n form?.resetErrors();\n\n const snapshot = cloneDeep(store.previousContext());\n patchState(store, {\n status: AXPPageStatus.Rendered,\n context: snapshot,\n previousContext: snapshot,\n formDirty: false,\n syncingBaseline: true,\n discardSyncNonce: store.discardSyncNonce() + 1,\n });\n },\n async resetToDefault() {\n const defaults = await settingValueService.scope(store.scope() as AXPPlatformScope).defaultValues();\n patchState(store, {\n context: defaults,\n });\n //\n const result = await this.apply();\n if (!result) {\n this.discard();\n }\n },\n }),\n ),\n withHooks(\n (\n store,\n settingValueService = inject(AXPSettingsService),\n translationService = inject(AXTranslationService),\n localeService = inject(AXLocaleService),\n ) => ({\n async onInit() {\n //\n settingValueService.onChanged.pipe(filter((c) => c.scope == store.scope())).subscribe((e) => {\n e.keys.forEach((k) => {\n const currentValue = e.values[k];\n const contextValue = get(store.context(), k);\n const previousValue = get(store.previousContext(), k);\n if (!isEqual(previousValue, currentValue) || !isEqual(currentValue, contextValue)) {\n patchState(store, {\n previousContext: {\n ...store.previousContext(),\n [k]: currentValue,\n },\n context: {\n ...store.context(),\n [k]: currentValue,\n },\n formDirty: false,\n });\n }\n });\n });\n //\n merge(translationService.langChanges$, localeService.profileChanged$).subscribe(async () => {\n if (store.isLoaded()) {\n await store.reload();\n }\n });\n },\n onDestroy() {},\n }),\n ),\n);\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-settings-management-client/contracts';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Settings Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const SettingsManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: true,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n","import { AXPSearchDefinitionProvider, AXPSearchDefinitionProviderContext } from '@acorex-platform/framework-client/common';\n\nexport class AXPSettingSearchDefinitionProvider implements AXPSearchDefinitionProvider {\n async provide(context: AXPSearchDefinitionProviderContext): Promise<void> {\n context.addDefinition('setting', 'Setting', 'setting', 'fa-solid fa-gear', 3, {\n format: {\n id: '{{data.name}}',\n },\n actions: [\n {\n name: 'navigate',\n type: 'view',\n priority: 'primary',\n },\n ],\n });\n }\n}\n","import { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPSearchProvider,\n AXPSearchResult,\n AXPSettingDefinition,\n AXPSettingDefinitionGroup,\n AXPSettingDefinitionProviderService,\n} from '@acorex-platform/framework-client/common';\nimport { AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport { inject } from '@angular/core';\nimport { sortBy } from 'lodash';\n\nexport interface AXPSettingDefinitionSearch extends AXPSettingDefinition {\n group: AXPSettingDefinitionGroup;\n}\n\nexport class AXPSettingSearchProvider implements AXPSearchProvider {\n private settingsService = inject(AXPSettingDefinitionProviderService);\n private sessionService = inject(AXPSessionService);\n private translateService = inject(AXTranslationService);\n\n async search(text: string): Promise<AXPSearchResult[]> {\n const groupsSetting = this.settingsService.getList(AXPPlatformScope.User);\n if (groupsSetting.length == 0) {\n groupsSetting.push(...(await this.settingsService.getListAsync(AXPPlatformScope.User)));\n }\n\n // Step 2: Flatten settings from groups\n const allSettings: AXPSettingDefinitionSearch[] = [];\n const extractSettings = (group: AXPSettingDefinitionGroup) => {\n for (const section of group.sections) {\n allSettings.push(...section.settings.map((x) => ({ ...x, group } as AXPSettingDefinitionSearch)));\n }\n for (const subGroup of group.groups) {\n extractSettings(subGroup); // Recursive extraction\n }\n };\n\n for (const group of groupsSetting) {\n extractSettings(group);\n }\n\n const needle = text.trim().toLowerCase();\n if (!needle) {\n return [];\n }\n\n const translatedBlobs = await Promise.all(\n allSettings.map(async (setting) => {\n const parts: string[] = [await this.translateService.translateAsync(setting.title)];\n if (setting.description) {\n parts.push(await this.translateService.translateAsync(setting.description));\n }\n if (setting.searchTagKeys?.length) {\n for (const key of setting.searchTagKeys) {\n parts.push(await this.translateService.translateAsync(key));\n }\n }\n return parts.join(' ').toLowerCase();\n }),\n );\n\n const searchResults = allSettings.filter(\n (setting, i) =>\n translatedBlobs[i].includes(needle) || setting.name.toLowerCase().includes(needle),\n );\n\n return sortBy(\n searchResults.map<AXPSearchResult>((setting) => ({\n title: setting.title,\n description: setting.description,\n group: 'setting',\n data: setting,\n command: {\n name: 'navigate',\n options: {\n type: 'router',\n options: {\n path: `/${this.sessionService.application?.name}/settings/user/${setting.group.name}#${setting.title}`,\n },\n }\n },\n parent: setting.group\n ? {\n title: setting.group.title,\n data: setting.group as AXPSettingDefinitionGroup,\n }\n : undefined,\n })),\n ['title']\n );\n }\n}\n","import { createUnsavedChangesCanDeactivateGuard } from '@acorex-platform/framework-client/common';\nimport { AXPSettingPageComponent } from './setting-page/setting-page.component';\n\n//#region ---- Settings Page Can Deactivate Guard ----\n\nexport const axpSettingsPageCanDeactivateGuard = createUnsavedChangesCanDeactivateGuard<AXPSettingPageComponent>();\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXP_UNAUTHORIZED_ROUTE } from '@acorex-platform/framework-client/common';\nimport { AXPApplicationsPlatformPermissionKeys } from '@acorex-platform/module-settings-management-client/contracts';\nimport { resolvePlatformScopeKey } from '@acorex-platform/framework-shared/core';\nimport { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn, Router, UrlTree } from '@angular/router';\nimport { first, map } from 'rxjs';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst SCOPE_PERMISSIONS: Record<string, string | null> = {\n P: AXPApplicationsPlatformPermissionKeys.MaintainPlatformSettings,\n T: AXPApplicationsPlatformPermissionKeys.MaintainTenantSettings,\n // Own user settings — always allowed once authenticated.\n U: null,\n};\n\n//#endregion\n\n//#region ----- Guard -----\n\n/**\n * Enforces settings-scope capabilities on direct URL navigation.\n * Menu visibility alone is not enough — hidden Platform Settings items are not\n * menu-matched, so {@link AXPMenuRouteGuard} would otherwise allow the route.\n */\nexport const axpSettingsScopeCanActivateGuard: CanActivateFn = (route: ActivatedRouteSnapshot) => {\n const sessionService = inject(AXPSessionService);\n const router = inject(Router);\n\n return sessionService.isAuthorizedWithLoading$.pipe(\n first(),\n map((): boolean | UrlTree => {\n const scopeParam = resolveScopeParam(route);\n const scopeKey = resolvePlatformScopeKey(scopeParam);\n const requiredPermission = SCOPE_PERMISSIONS[scopeKey];\n\n if (!requiredPermission) {\n return true;\n }\n\n if (sessionService.authorize(requiredPermission)) {\n return true;\n }\n\n return router.parseUrl(AXP_UNAUTHORIZED_ROUTE);\n }),\n );\n};\n\nfunction resolveScopeParam(route: ActivatedRouteSnapshot): string {\n let current: ActivatedRouteSnapshot | null = route;\n while (current) {\n const scope = current.paramMap.get('scope');\n if (scope) {\n return scope;\n }\n current = current.parent;\n }\n return '';\n}\n\n//#endregion\n","import { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';\nimport { inject } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport {\n AXPApplicationsPlatformPermissionKeys,\n AXPSettingsManagementMenuKeys,\n RootConfig,\n} from '@acorex-platform/module-settings-management-client/contracts';\n\nexport class AXMMenuProvider implements AXPMenuProvider {\n private sessionService = inject(AXPSessionService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const appName = this.sessionService.application?.name;\n\n const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);\n if (!isAuthorized) {\n return;\n }\n\n // Platform Settings — platform console only (not tenant admins).\n context.find(AXPCommonMenuKeys.Platform).addItems([\n {\n name: AXPSettingsManagementMenuKeys.PlatformSettings,\n priority: 999,\n text: '@settings-management:module.terms.scopes.platform.title',\n type: 'menu',\n icon: 'fa-light fa-gear',\n path: `/${appName}/settings/platform`,\n policy: {\n features: [RootConfig.module.name],\n permissions: [AXPApplicationsPlatformPermissionKeys.MaintainPlatformSettings],\n },\n },\n ]);\n\n // Tenant Settings — under Administration; own user settings are profile-only (no menu policy).\n context.find(AXPCommonMenuKeys.Administration).addItems([\n { name: `${AXPSettingsManagementMenuKeys.TenantApplicationSettings}:divider`, text: '', type: 'break', priority: 998 },\n {\n name: AXPSettingsManagementMenuKeys.TenantApplicationSettings,\n priority: 999,\n text: '@settings-management:module.terms.scopes.tenant.title',\n type: 'menu',\n icon: 'fa-light fa-gear',\n path: `/${appName}/settings/tenant`,\n policy: {\n features: [RootConfig.module.name],\n permissions: [AXPApplicationsPlatformPermissionKeys.MaintainTenantSettings],\n },\n },\n ]);\n }\n}\n","//#region ---- Imports ----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPApplicationsPlatformPermissionKeys\n} from '@acorex-platform/module-settings-management-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n/**\n * Registers tenant settings under Administration and platform settings under\n * Applications & Platform. Own user settings are not registered — always available\n * to the signed-in user.\n */\n@Injectable()\nexport class AXMPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPApplicationsPlatformPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:applications-platform.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.Administration.Root, `${G}.administration.title`, `${G}.administration.description`, {\n order: 120,\n });\n context.addGroup(groups.ApplicationsPlatform.Root, `${G}.applications-platform.title`, `${G}.applications-platform.description`, {\n order: 110,\n });\n\n context\n .addGroup(\n groups.Administration.Settings,\n `${G}.administration-settings.title`,\n `${G}.administration-settings.description`,\n { parent: groups.Administration.Root, order: 15 },\n )\n .addPermission(keys.MaintainTenantSettings, `${P}.maintain-tenant-settings.title`, `${P}.maintain-tenant-settings.description`, {\n modules: ['SettingsManagement'],\n })\n .endPermission()\n .endGroup();\n\n context\n .addGroup(\n groups.ApplicationsPlatform.Configuration,\n `${G}.applications-platform-configuration.title`,\n `${G}.applications-platform-configuration.description`,\n { parent: groups.ApplicationsPlatform.Root, order: 30 },\n )\n .addPermission(keys.MaintainPlatformSettings, `${P}.maintain-platform-settings.title`, `${P}.maintain-platform-settings.description`, {\n modules: ['PlatformManagement'],\n requiredFeatures: ['PlatformManagement'],\n })\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n","import { AXMSettingsManagementCommandKeys } from '@acorex-platform/module-settings-management-client/contracts';\nimport { inject } from '@angular/core';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPDistributedEventListenerProvider } from '@acorex-platform/framework-client/core';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\n\n//#region ---- Types ----\n\ntype ProfileSectionsPayload = {\n sections: Record<string, unknown>[];\n groupId?: string;\n};\n\n//#endregion\n\n//#region ---- Settings management profile sections ----\n\n/** Contributes settings-related sections to the user profile hub. */\nexport const SettingsManagementProfileSectionsHookProvider: AXPDistributedEventListenerProvider<\n ProfileSectionsPayload,\n ProfileSectionsPayload\n> = {\n key: 'profile-page.sections',\n priority: 10,\n execute: (payload) => {\n if (payload.groupId && payload.groupId !== 'account') {\n return payload;\n }\n\n const commandService = inject(AXPCommandService);\n const sessionService = inject(AXPSessionService);\n const appName = sessionService.application?.name;\n\n const sections: Record<string, unknown>[] = [];\n\n if (commandService.exists(AXMSettingsManagementCommandKeys.Client.Export)) {\n sections.push({\n id: 'export-data',\n groupId: 'account',\n title: '@settings-management:profile-page.sections.export-data.title',\n description: '@settings-management:profile-page.sections.export-data.description',\n icon: 'far fa-file-export',\n priority: 30,\n layout: { colSpan: 6 },\n actions: [\n {\n name: 'export-local-data',\n title: '@settings-management:profile-page.sections.export-data.actions.manage',\n icon: 'far fa-download',\n command: { name: AXMSettingsManagementCommandKeys.Client.Export },\n },\n ],\n });\n }\n\n if (appName) {\n sections.push({\n id: 'all-preferences',\n groupId: 'account',\n title: '@settings-management:profile-page.sections.all-preferences.title',\n description: '@settings-management:profile-page.sections.all-preferences.description',\n icon: 'far fa-sliders',\n priority: 40,\n layout: { colSpan: 6 },\n actions: [\n {\n name: 'view-all-preferences',\n title: '@settings-management:profile-page.sections.all-preferences.actions.manage',\n icon: 'far fa-arrow-right',\n command: {\n name: 'navigate',\n options: { path: `/${appName}/settings/user` },\n },\n },\n ],\n });\n }\n\n if (!sections.length) {\n return payload;\n }\n\n return {\n ...payload,\n sections: [...payload.sections, ...sections],\n };\n },\n};\n\n//#endregion\n","import { AXPActionMenuItem } from '@acorex-platform/framework-shared/core';\nimport { inject } from '@angular/core';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPDistributedEventListenerProvider } from '@acorex-platform/framework-client/core';\n\n//#region ---- Profile slot settings menu hook ----\n\n/** Registers the user settings entry in the profile dropdown (always available; no permission). */\nexport const ProfileSlotSettingsMenuHookProvider: AXPDistributedEventListenerProvider<\n { items: AXPActionMenuItem[] },\n { items: AXPActionMenuItem[] }\n> = {\n key: 'profile-slot.menu-items',\n priority: 0,\n execute: (payload) => {\n const sessionService = inject(AXPSessionService);\n const appName = sessionService.application?.name;\n\n if (!appName) {\n return payload;\n }\n\n return {\n ...payload,\n items: [\n ...payload.items,\n {\n name: 'settings',\n title: '@auth:profile.settings',\n icon: 'fa-light fa-gear',\n shortcuts: [{ keys: 'ctrl+shift+u', allowInEditableFields: true }],\n command: {\n name: 'navigate',\n options: {\n path: `/${appName}/settings/user`,\n },\n },\n } satisfies AXPActionMenuItem,\n ],\n };\n },\n};\n\n//#endregion\n","import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport {\n AXP_MENU_PROVIDER,\n AXP_PROTECTED_ROUTE_GUARDS,\n AXP_SEARCH_DEFINITION_PROVIDER,\n AXP_SEARCH_PROVIDER,\n AXP_SETTINGS_SYNC_KEYS,\n AXPPlatformSettingsLoadState,\n AXPPlatformSettingsOfflineBootstrapService,\n AXPSettingsService,\n traceSettingsAppStartupLoadComplete,\n traceSettingsAppStartupLoadStarted,\n} from '@acorex-platform/framework-client/common';\nimport {\n AXPAppStartUpService,\n AXP_APP_STARTUP_PRIORITY,\n AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER,\n AXP_MODULE_MANIFEST_PROVIDER,\n} from '@acorex-platform/framework-client/core';\nimport { SettingsManagementManifest } from './manifest';\nimport { AXPRootLayoutComponent } from '@acorex-platform/framework-client/themes/default';\nimport { NgModule } from '@angular/core';\nimport { Routes, ROUTES } from '@angular/router';\nimport { AXPSettingSearchDefinitionProvider } from './features/settings/search-definition.provider';\nimport { AXPSettingSearchProvider } from './features/settings/search.provider';\nimport { axpSettingsPageCanDeactivateGuard } from './features/settings/settings-page-can-deactivate.guard';\nimport { axpSettingsScopeCanActivateGuard } from './features/settings/settings-scope.guard';\nimport { AXMMenuProvider } from './menu.provider';\nimport { AXMPermissionDefinitionProvider } from './permission-definition.provider';\nimport { SettingsManagementProfileSectionsHookProvider } from './features/profile-page/settings-management-profile-sections.hook';\nimport { ProfileSlotSettingsMenuHookProvider } from './profile-slot-settings-menu.hook';\nimport { axmSettingsSyncKeys } from '@acorex-platform/module-settings-management-client/contracts';\n\n//#region ----- Constants -----\n\nconst PLATFORM_SETTINGS_STARTUP_MAX_ATTEMPTS = 5;\nconst PLATFORM_SETTINGS_STARTUP_RETRY_DELAY_MS = 2_000;\n\n//#endregion\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nasync function loadPlatformSettingsWithRetry(\n settingsService: AXPSettingsService,\n offlineBootstrap: AXPPlatformSettingsOfflineBootstrapService,\n): Promise<void> {\n // Device offline — skip retries and go straight to offline / unavailable handling.\n if (offlineBootstrap.isDeviceOffline()) {\n throw new Error('Device is offline');\n }\n\n let lastError: unknown;\n for (let attempt = 1; attempt <= PLATFORM_SETTINGS_STARTUP_MAX_ATTEMPTS; attempt++) {\n try {\n await settingsService.ensurePlatformSettingsLoaded();\n return;\n } catch (error) {\n lastError = error;\n console.error(\n `Platform settings bootstrap failed (attempt ${attempt}/${PLATFORM_SETTINGS_STARTUP_MAX_ATTEMPTS})`,\n error,\n );\n if (offlineBootstrap.isDeviceOffline()) {\n throw error;\n }\n if (attempt < PLATFORM_SETTINGS_STARTUP_MAX_ATTEMPTS) {\n await sleep(PLATFORM_SETTINGS_STARTUP_RETRY_DELAY_MS);\n }\n }\n }\n throw lastError;\n}\n\nfunction routesFacory() {\n let routes: Routes = [\n {\n path: ':app/settings/:scope',\n canActivate: [...AXP_PROTECTED_ROUTE_GUARDS, axpSettingsScopeCanActivateGuard],\n data: { tab: true, rootLayout: true },\n loadComponent: () => {\n return AXPRootLayoutComponent;\n },\n children: [\n {\n path: '',\n loadComponent: () =>\n import('./features/settings/setting-page/setting-page.component').then((c) => c.AXPSettingPageComponent),\n canDeactivate: [axpSettingsPageCanDeactivateGuard],\n data: { reuse: true },\n children: [\n {\n path: ':group',\n loadComponent: () =>\n import('./features/settings/setting-view/setting-view.component').then(\n (c) => c.AXPSettingsViewComponent,\n ),\n data: { reuse: false },\n },\n ],\n },\n ],\n },\n ];\n return routes;\n}\n\n@NgModule({\n imports: [],\n exports: [],\n declarations: [],\n providers: [\n {\n provide: AXP_SETTINGS_SYNC_KEYS,\n useValue: axmSettingsSyncKeys,\n },\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXPSettingSearchProvider,\n multi: true,\n },\n {\n provide: AXP_SEARCH_DEFINITION_PROVIDER,\n useClass: AXPSettingSearchDefinitionProvider,\n multi: true,\n },\n {\n provide: ROUTES,\n multi: true,\n useFactory: routesFacory,\n },\n {\n provide: AXP_MENU_PROVIDER,\n useClass: AXMMenuProvider,\n multi: true,\n },\n {\n provide: AXP_PERMISSION_DEFINITION_PROVIDER,\n useClass: AXMPermissionDefinitionProvider,\n multi: true,\n },\n // Module Manifest Provider\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: SettingsManagementManifest,\n multi: true,\n },\n {\n provide: AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER,\n useValue: ProfileSlotSettingsMenuHookProvider,\n multi: true,\n },\n {\n provide: AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER,\n useValue: SettingsManagementProfileSectionsHookProvider,\n multi: true,\n },\n ],\n})\nexport class AXMSettingsManagementModule {\n constructor(\n appInitService: AXPAppStartUpService,\n settingsService: AXPSettingsService,\n platformSettingsLoadState: AXPPlatformSettingsLoadState,\n offlineBootstrap: AXPPlatformSettingsOfflineBootstrapService,\n ) {\n appInitService.registerTask({\n name: 'platform-settings',\n priority: AXP_APP_STARTUP_PRIORITY.platformSettings,\n run: async () => {\n try {\n await loadPlatformSettingsWithRetry(settingsService, offlineBootstrap);\n platformSettingsLoadState.clear();\n } catch (error) {\n console.error('Platform settings bootstrap failed after retries', error);\n // Never open dialogs here (APP_INITIALIZER — overlay host is null).\n // Only inspect IndexedDB; confirm runs later after the app is stable.\n let canOfferOffline = false;\n try {\n canOfferOffline = await offlineBootstrap.canOfferOfflineContinue();\n } catch (offlineError) {\n console.error('Offline continue cache check failed', offlineError);\n }\n if (canOfferOffline) {\n platformSettingsLoadState.setPendingOfflineContinue(error);\n } else {\n platformSettingsLoadState.setFailure(error);\n }\n // Keep only platform-settings-failure-redirect; skip Settings/regional/theme (they hang on API).\n appInitService.abortRemainingStartupTasks();\n }\n },\n });\n\n appInitService.registerTask({\n name: 'Settings',\n statusText: '@settings-management:app-startup.loading-settings',\n priority: AXP_APP_STARTUP_PRIORITY.settings,\n run: async () => {\n if (\n platformSettingsLoadState.hasFailure() ||\n platformSettingsLoadState.hasPendingOfflineContinue() ||\n platformSettingsLoadState.isOfflineMode()\n ) {\n return;\n }\n traceSettingsAppStartupLoadStarted();\n const startedAt = Date.now();\n const settings = await settingsService.load('app-startup');\n traceSettingsAppStartupLoadComplete({\n totalKeys: settings.length,\n keysByScope: {},\n durationMs: Date.now() - startedAt,\n });\n },\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA;;;AAGG;SACa,cAAc,CAC5B,MAAmC,EACnC,MAAc,EACd,sBAA+C,EAAA;IAE/C,MAAM,OAAO,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;IACpC,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE;IAC9C,MAAM,kBAAkB,GAAgC,EAAE;IAC1D,MAAM,kBAAkB,GAAgC,EAAE;AAC1D,IAAA,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU;AAEzC,IAAA,MAAM,qBAAqB,GAAG,CAAC,KAAgC,KAAa,CAAA,EAAG,KAAK,CAAC,IAAI,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,EAAE;IAE1G,MAAM,gBAAgB,GAAG,CACvB,KAAgC,EAChC,QAAu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BAAA;AACE,4BAAA,OAAO,EAAE,uCAAuC;AAChD,4BAAA,QAAQ,EAAE,mCAAmC;AAC7C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,uCAAuC;AAChD,4BAAA,QAAQ,EAAE,6CAA6C;AACvD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC/JD;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/module-settings-management-client",
|
|
3
|
+
"version": "0.0.21",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-module-settings-management-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-module-settings-management-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-module-settings-management-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-module-settings-management-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-module-settings-management-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-module-settings-management-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { AXPSettingsSyncKeys } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
|
|
3
|
+
declare const AXMSettingsManagementCommandKeys: {
|
|
4
|
+
readonly Client: {
|
|
5
|
+
readonly Reset: "SettingsManagement.Client:Reset";
|
|
6
|
+
readonly Export: "SettingsManagement.Client:Export";
|
|
7
|
+
readonly Import: "SettingsManagement.Client:Import";
|
|
8
|
+
};
|
|
9
|
+
readonly ScopedSettings: {
|
|
10
|
+
readonly Patch: "SettingsManagement:ScopedSettings:Patch";
|
|
11
|
+
readonly Set: "SettingsManagement:ScopedSettings:Set";
|
|
12
|
+
readonly SetOne: "SettingsManagement:ScopedSettings:SetOne";
|
|
13
|
+
readonly Delete: "SettingsManagement:ScopedSettings:Delete";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare const AXMSettingsManagementQueryKeys: {
|
|
18
|
+
readonly ScopedSettings: {
|
|
19
|
+
readonly Fetch: "SettingsManagement:ScopedSettings:Fetch";
|
|
20
|
+
readonly Load: "SettingsManagement:ScopedSettings:Load";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare const axmSettingsSyncKeys: AXPSettingsSyncKeys;
|
|
25
|
+
|
|
26
|
+
/** Platform scope key aligned with server {@link SettingsPlatformScope}. */
|
|
27
|
+
type SettingsDefaultsScope = 'P' | 'T' | 'U';
|
|
28
|
+
/**
|
|
29
|
+
* Contributes default setting values for a single scope partition.
|
|
30
|
+
* Register with {@link provideSettingsDefaults} (Nest `multi: true`).
|
|
31
|
+
* Higher {@link SettingsDefaultsProvider.priority} wins on key conflicts within the same scope.
|
|
32
|
+
*/
|
|
33
|
+
interface SettingsDefaultsProvider {
|
|
34
|
+
scope: SettingsDefaultsScope;
|
|
35
|
+
/** Merge order within the same scope; higher overrides lower. Default 0. */
|
|
36
|
+
priority?: number;
|
|
37
|
+
/** Source label for diagnostics (e.g. `framework`, `locale-management`, `demo-api`). */
|
|
38
|
+
layer?: string;
|
|
39
|
+
provide(): Promise<Record<string, unknown>>;
|
|
40
|
+
}
|
|
41
|
+
declare const SETTINGS_DEFAULTS_PROVIDER: unique symbol;
|
|
42
|
+
/** Suggested priority bands per layer. */
|
|
43
|
+
declare const SETTINGS_DEFAULTS_PRIORITY: {
|
|
44
|
+
readonly framework: 0;
|
|
45
|
+
readonly module: 50;
|
|
46
|
+
readonly app: 100;
|
|
47
|
+
};
|
|
48
|
+
interface StaticSettingsDefaultsProviderOptions {
|
|
49
|
+
scope: SettingsDefaultsScope;
|
|
50
|
+
values: Record<string, unknown>;
|
|
51
|
+
priority?: number;
|
|
52
|
+
layer?: string;
|
|
53
|
+
}
|
|
54
|
+
/** Builds a {@link SettingsDefaultsProvider} from a static key-value map. */
|
|
55
|
+
declare function createStaticSettingsDefaultsProvider(options: StaticSettingsDefaultsProviderOptions): SettingsDefaultsProvider;
|
|
56
|
+
/** Nest provider registration helper (`multi: true`). */
|
|
57
|
+
declare function provideSettingsDefaults(provider: SettingsDefaultsProvider): {
|
|
58
|
+
readonly provide: typeof SETTINGS_DEFAULTS_PROVIDER;
|
|
59
|
+
readonly useValue: SettingsDefaultsProvider;
|
|
60
|
+
readonly multi: true;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Registers setting keys that must be stored encrypted in the server settings DB.
|
|
65
|
+
* Client definitions use `isEncrypted: true` for the same keys (implies `cacheable: false`).
|
|
66
|
+
*/
|
|
67
|
+
declare const SETTINGS_ENCRYPTED_KEYS_PROVIDER: unique symbol;
|
|
68
|
+
/** Nest provider registration helper (`multi: true`). */
|
|
69
|
+
declare function provideEncryptedSettingKeys(keys: readonly string[]): {
|
|
70
|
+
readonly provide: typeof SETTINGS_ENCRYPTED_KEYS_PROVIDER;
|
|
71
|
+
readonly useValue: readonly string[];
|
|
72
|
+
readonly multi: true;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** Platform scope key aligned with server {@link SettingsPlatformScope}. */
|
|
76
|
+
type SettingsEntitySyncScope = 'P' | 'T' | 'U';
|
|
77
|
+
interface SettingsEntitySyncContext {
|
|
78
|
+
scope: SettingsEntitySyncScope;
|
|
79
|
+
tenantId?: string;
|
|
80
|
+
userId?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Syncs tenant-scoped settings with canonical entity fields (read overlay + write-through).
|
|
84
|
+
* Register with Nest `multi: true` and `useExisting` on {@link SETTINGS_ENTITY_SYNC_HANDLER}.
|
|
85
|
+
*/
|
|
86
|
+
interface SettingsEntitySyncHandler {
|
|
87
|
+
scopes: SettingsEntitySyncScope[];
|
|
88
|
+
/** Overlay entity-sourced values onto effective settings before returning to clients. */
|
|
89
|
+
overlayRead?(context: SettingsEntitySyncContext, effectiveValues: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
90
|
+
/** Called after settings persist; push mapped keys to entity storage. */
|
|
91
|
+
syncWrite?(context: SettingsEntitySyncContext, changedKeys: string[], values: Record<string, unknown>): Promise<void>;
|
|
92
|
+
}
|
|
93
|
+
declare const SETTINGS_ENTITY_SYNC_HANDLER: unique symbol;
|
|
94
|
+
|
|
95
|
+
/** Platform scope key aligned with server {@link SettingsPlatformScope}. */
|
|
96
|
+
type SettingsChangeReactorScope = 'P' | 'T' | 'U';
|
|
97
|
+
interface SettingsChangeReactorContext {
|
|
98
|
+
scope: SettingsChangeReactorScope;
|
|
99
|
+
tenantId?: string;
|
|
100
|
+
userId?: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Runs operational side effects after settings persist (schedules, caches, infrastructure sync).
|
|
104
|
+
* Register with Nest `multi: true` and `useExisting` on {@link SETTINGS_CHANGE_REACTOR}.
|
|
105
|
+
*/
|
|
106
|
+
interface SettingsChangeReactor {
|
|
107
|
+
scopes: SettingsChangeReactorScope[];
|
|
108
|
+
/** Keys this reactor cares about. When omitted, all changed keys trigger {@link react}. */
|
|
109
|
+
watchedKeys?: string[];
|
|
110
|
+
react(context: SettingsChangeReactorContext, changedKeys: string[], values: Record<string, unknown>): Promise<void>;
|
|
111
|
+
}
|
|
112
|
+
declare const SETTINGS_CHANGE_REACTOR: unique symbol;
|
|
113
|
+
|
|
114
|
+
declare const AXPSettingsManagementMenuKeys: {
|
|
115
|
+
readonly TenantApplicationSettings: "Settings:Tenant:Application";
|
|
116
|
+
readonly PlatformSettings: "Settings:Platform";
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Applications & Platform capabilities used by this module.
|
|
121
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
122
|
+
*
|
|
123
|
+
* Own user settings (scope U) require no permission — always available to the signed-in user.
|
|
124
|
+
*/
|
|
125
|
+
declare const AXPApplicationsPlatformPermissionKeys: {
|
|
126
|
+
readonly Access: "ApplicationsPlatform:Permission:Access";
|
|
127
|
+
readonly MaintainApplications: "ApplicationsPlatform:Permission:MaintainApplications";
|
|
128
|
+
readonly MaintainTenants: "ApplicationsPlatform:Permission:MaintainTenants";
|
|
129
|
+
readonly MaintainPlatformShell: "ApplicationsPlatform:Permission:MaintainPlatformShell";
|
|
130
|
+
readonly MaintainLandingPages: "ApplicationsPlatform:Permission:MaintainLandingPages";
|
|
131
|
+
readonly MaintainIdentifiers: "ApplicationsPlatform:Permission:MaintainIdentifiers";
|
|
132
|
+
readonly MaintainTenantSettings: "ApplicationsPlatform:Permission:MaintainTenantSettings";
|
|
133
|
+
readonly MaintainPlatformSettings: "ApplicationsPlatform:Permission:MaintainPlatformSettings";
|
|
134
|
+
readonly MaintainLocales: "ApplicationsPlatform:Permission:MaintainLocales";
|
|
135
|
+
readonly UseDevTools: "ApplicationsPlatform:Permission:UseDevTools";
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated Prefer {@link AXPApplicationsPlatformPermissionKeys}.
|
|
139
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
140
|
+
* User settings are intentionally omitted — no capability key; always allowed for self.
|
|
141
|
+
*/
|
|
142
|
+
declare const AXMSettingsManagementPermissionKeys: {
|
|
143
|
+
readonly TenantSettings: {
|
|
144
|
+
readonly Management: "ApplicationsPlatform:Permission:MaintainTenantSettings";
|
|
145
|
+
};
|
|
146
|
+
readonly PlatformSettings: {
|
|
147
|
+
readonly Management: "ApplicationsPlatform:Permission:MaintainPlatformSettings";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
declare const RootConfig: {
|
|
152
|
+
config: {
|
|
153
|
+
i18n: string;
|
|
154
|
+
module: string;
|
|
155
|
+
};
|
|
156
|
+
module: {
|
|
157
|
+
route: string;
|
|
158
|
+
name: string;
|
|
159
|
+
title: string;
|
|
160
|
+
icon: string;
|
|
161
|
+
};
|
|
162
|
+
entities: {};
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export { AXMSettingsManagementCommandKeys, AXMSettingsManagementPermissionKeys, AXMSettingsManagementQueryKeys, AXPApplicationsPlatformPermissionKeys, AXPSettingsManagementMenuKeys, RootConfig, SETTINGS_CHANGE_REACTOR, SETTINGS_DEFAULTS_PRIORITY, SETTINGS_DEFAULTS_PROVIDER, SETTINGS_ENCRYPTED_KEYS_PROVIDER, SETTINGS_ENTITY_SYNC_HANDLER, axmSettingsSyncKeys, createStaticSettingsDefaultsProvider, provideEncryptedSettingKeys, provideSettingsDefaults };
|
|
166
|
+
export type { SettingsChangeReactor, SettingsChangeReactorContext, SettingsChangeReactorScope, SettingsDefaultsProvider, SettingsDefaultsScope, SettingsEntitySyncContext, SettingsEntitySyncHandler, SettingsEntitySyncScope, StaticSettingsDefaultsProviderOptions };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as _ngrx_signals from '@ngrx/signals';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { AXPPageStatus } from '@acorex-platform/framework-shared/widget-core';
|
|
4
|
+
import { AXFormComponent } from '@acorex/components/form';
|
|
5
|
+
import { AXPSettingDefinitionGroup, AXPSettingsService, AXPPlatformSettingsLoadState, AXPPlatformSettingsOfflineBootstrapService } from '@acorex-platform/framework-client/common';
|
|
6
|
+
import { AXPPlatformScopeKey } from '@acorex-platform/framework-shared/core';
|
|
7
|
+
import { AXPAppStartUpService } from '@acorex-platform/framework-client/core';
|
|
8
|
+
|
|
9
|
+
declare const AXPSettingsViewModel: _angular_core.Type<{
|
|
10
|
+
groups: _angular_core.Signal<AXPSettingDefinitionGroup[]>;
|
|
11
|
+
activateGroup: _angular_core.Signal<AXPSettingDefinitionGroup | undefined>;
|
|
12
|
+
scope: _angular_core.Signal<AXPPlatformScopeKey>;
|
|
13
|
+
searchExpression: _angular_core.Signal<string | null>;
|
|
14
|
+
settingSearchTextByKey: _angular_core.Signal<Record<string, string>>;
|
|
15
|
+
previousContext: _angular_core.Signal<Record<string, any>>;
|
|
16
|
+
context: _angular_core.Signal<Record<string, any>>;
|
|
17
|
+
formDirty: _angular_core.Signal<boolean>;
|
|
18
|
+
applySyncNonce: _angular_core.Signal<number>;
|
|
19
|
+
syncingBaseline: _angular_core.Signal<boolean>;
|
|
20
|
+
discardSyncNonce: _angular_core.Signal<number>;
|
|
21
|
+
status: _angular_core.Signal<AXPPageStatus>;
|
|
22
|
+
form: _angular_core.Signal<AXFormComponent | null>;
|
|
23
|
+
searchResults: _angular_core.Signal<AXPSettingDefinitionGroup[]>;
|
|
24
|
+
hasActivateGroup: _angular_core.Signal<boolean>;
|
|
25
|
+
showGroups: _angular_core.Signal<boolean>;
|
|
26
|
+
scopeTitle: _angular_core.Signal<string>;
|
|
27
|
+
scopeDescription: _angular_core.Signal<string>;
|
|
28
|
+
isSearching: _angular_core.Signal<boolean>;
|
|
29
|
+
isBusy: _angular_core.Signal<boolean>;
|
|
30
|
+
isSaving: _angular_core.Signal<boolean>;
|
|
31
|
+
isLoaded: _angular_core.Signal<boolean>;
|
|
32
|
+
isDirty: _angular_core.Signal<boolean>;
|
|
33
|
+
registerForm: (form: AXFormComponent) => void;
|
|
34
|
+
load: (scope: AXPPlatformScopeKey) => Promise<void>;
|
|
35
|
+
reload: () => Promise<void>;
|
|
36
|
+
rebuildSettingSearchIndex: () => Promise<void>;
|
|
37
|
+
updateContext: (context: Record<string, any>) => void;
|
|
38
|
+
setFormDirty: (dirty: boolean) => void;
|
|
39
|
+
setSyncingBaseline: (syncing: boolean) => void;
|
|
40
|
+
setActivateGroup: (group: AXPSettingDefinitionGroup) => void;
|
|
41
|
+
unloadActivateGroup: () => void;
|
|
42
|
+
setActivateGroupByName: (name: string) => void;
|
|
43
|
+
search: (expression: string) => Promise<void>;
|
|
44
|
+
clearSearch: () => void;
|
|
45
|
+
apply: () => Promise<boolean>;
|
|
46
|
+
applySavedState: (context: Record<string, unknown>) => void;
|
|
47
|
+
discard: () => Promise<void>;
|
|
48
|
+
resetToDefault: () => Promise<void>;
|
|
49
|
+
} & _ngrx_signals.StateSource<{
|
|
50
|
+
groups: AXPSettingDefinitionGroup[];
|
|
51
|
+
activateGroup: AXPSettingDefinitionGroup | undefined;
|
|
52
|
+
scope: AXPPlatformScopeKey;
|
|
53
|
+
searchExpression: string | null;
|
|
54
|
+
settingSearchTextByKey: Record<string, string>;
|
|
55
|
+
previousContext: Record<string, any>;
|
|
56
|
+
context: Record<string, any>;
|
|
57
|
+
formDirty: boolean;
|
|
58
|
+
applySyncNonce: number;
|
|
59
|
+
syncingBaseline: boolean;
|
|
60
|
+
discardSyncNonce: number;
|
|
61
|
+
status: AXPPageStatus;
|
|
62
|
+
form: AXFormComponent | null;
|
|
63
|
+
}>>;
|
|
64
|
+
|
|
65
|
+
declare class AXMSettingsManagementModule {
|
|
66
|
+
constructor(appInitService: AXPAppStartUpService, settingsService: AXPSettingsService, platformSettingsLoadState: AXPPlatformSettingsLoadState, offlineBootstrap: AXPPlatformSettingsOfflineBootstrapService);
|
|
67
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMSettingsManagementModule, never>;
|
|
68
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMSettingsManagementModule, never, never, never>;
|
|
69
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMSettingsManagementModule>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { AXMSettingsManagementModule, AXPSettingsViewModel };
|