@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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-settings-management-client-setting-page.component-eAaMh3-8.mjs","sources":["../../../../libs/modules/settings-management/client/src/lib/features/settings/setting-page/setting-page.component.ts","../../../../libs/modules/settings-management/client/src/lib/features/settings/setting-page/setting-page.component.html"],"sourcesContent":["\nimport { AXPActionMenuItem, AXPBackButton, AXPExecuteCommand, AXPKeyboardShortcutBinding, AXPKeyboardShortcutPriority, resolvePlatformScopeKey, resolvePlatformScopeName } from '@acorex-platform/framework-shared/core';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXSearchBoxModule } from '@acorex/components/search-box';\nimport { AXTabsComponent, AXTabsModule, AXTabStripChangedEvent } from '@acorex/components/tabs';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport { AXPSettingDefinitionGroup, AXPUnsavedChangesPopstateService, traceSettingsPageRouteLoad } from '@acorex-platform/framework-client/common';\n\nimport { AXHighlightService, AXPDeviceService, AXPHookService, AXPKeyboardShortcutRegistry } from '@acorex-platform/framework-client/core';\nimport {\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutHeaderComponent,\n AXPThemeLayoutListComponent,\n AXPThemeLayoutListItemComponent,\n AXPThemeLayoutStartSideComponent,\n AXPThemeLayoutToolbarComponent,\n} from '@acorex-platform/framework-client/layout/components';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n AXPPageLayoutComponent,\n resolveDetailsViewFooterCommandShortcuts,\n} from '@acorex-platform/framework-client/layout/views';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n untracked,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, ActivatedRouteSnapshot, NavigationEnd, RouterModule } from '@angular/router';\nimport { filter } from 'rxjs';\nimport { AXPSettingsViewModel } from '../settings.viewmodel';\n\n@Component({\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n RouterModule,\n //\n AXSearchBoxModule,\n AXDecoratorModule,\n AXBreadcrumbsModule,\n AXTranslationModule,\n AXButtonModule,\n AXTabsModule,\n AXBadgeModule,\n AXLoadingModule,\n AXDropdownButtonModule,\n //\n AXPPageLayoutComponent,\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutListComponent,\n AXPThemeLayoutListItemComponent,\n AXPThemeLayoutToolbarComponent,\n AXPThemeLayoutHeaderComponent,\n AXPThemeLayoutStartSideComponent,\n ],\n templateUrl: './setting-page.component.html',\n styleUrl: './setting-page.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n AXUnsubscriber,\n AXPSettingsViewModel,\n {\n provide: AXPPageLayoutBase,\n useExisting: AXPSettingPageComponent,\n },\n ],\n host: { class: 'axp-setting-page' },\n})\nexport class AXPSettingPageComponent extends AXPPageLayoutBaseComponent {\n protected vm = inject(AXPSettingsViewModel);\n protected readonly deviceService = inject(AXPDeviceService);\n private activatedRoute = inject(ActivatedRoute);\n private unsubscribe = inject(AXUnsubscriber);\n private readonly highlightService = inject(AXHighlightService);\n private readonly hooks = inject(AXPHookService);\n\n private readonly unsavedChangesPopstate = inject(AXPUnsavedChangesPopstateService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly elementRef = inject(ElementRef);\n private readonly shortcutRegistry = inject(AXPKeyboardShortcutRegistry);\n private readonly sidebarTabs = viewChild<AXTabsComponent>('sidebarTabs');\n private sidebarTabChangeSuppressed = false;\n /** Prevents VM→URL sync from stripping the route group during refresh hydration. */\n private loadingFromRoute = false;\n /** Serializes overlapping route loads (e.g. init + NavigationEnd) so `loadingFromRoute` cannot clear early. */\n private routeLoadChain: Promise<void> = Promise.resolve();\n\n /** Syncs the line indicator when the active group changes programmatically (route load / navigation). */\n #sidebarTabsIndicatorEffect = effect(() => {\n const groups = this.vm.groups();\n const activeName = this.vm.activateGroup()?.name;\n if (!groups.length || !activeName || this.vm.isSearching()) {\n return;\n }\n\n const index = groups.findIndex((group) => group.name === activeName);\n if (index < 0) {\n return;\n }\n\n untracked(() =>\n queueMicrotask(() => {\n this.sidebarTabChangeSuppressed = true;\n try {\n this.sidebarTabs()?.select(index);\n } finally {\n this.sidebarTabChangeSuppressed = false;\n }\n }),\n );\n });\n\n #effect = effect(() => {\n if (!this.vm.isLoaded() || this.loadingFromRoute) {\n return;\n }\n const expression = this.vm.searchExpression();\n const app = this.sessionService.application?.name;\n const scope = resolvePlatformScopeName(this.vm.scope());\n const group = this.vm.activateGroup()?.name;\n //\n if (this.vm.isSearching()) {\n this.router.navigate([app, 'settings', scope, group ?? ''], {\n queryParams: { q: expression },\n });\n setTimeout(() => {\n this.highlightService.highlight('#ax-settings', expression!);\n }, 100);\n return;\n }\n // On desktop, scope-only URLs are redirected to the first group in loadFromRoute.\n // Do not sync back to a group-less URL while that redirect is pending.\n if (!group && this.deviceService.isLarge()) {\n return;\n }\n this.router.navigate([app, 'settings', scope, group ?? '']);\n this.highlightService.clear();\n });\n\n override async ngOnInit(): Promise<void> {\n await super.ngOnInit();\n\n this.registerKeyboardShortcuts();\n\n this.unsavedChangesPopstate.registerSource({\n id: 'axp-setting-page',\n isDirty: () => this.vm.isDirty(),\n });\n this.destroyRef.onDestroy(() => this.unsavedChangesPopstate.unregisterSource('axp-setting-page'));\n //\n this.router.events\n .pipe(\n this.unsubscribe.takeUntilDestroy,\n filter((event) => event instanceof NavigationEnd),\n )\n .subscribe(() => {\n void this.enqueueLoadFromRoute();\n });\n\n await this.enqueueLoadFromRoute();\n }\n\n private enqueueLoadFromRoute(): Promise<void> {\n const load = this.routeLoadChain.then(() => this.loadFromRoute());\n this.routeLoadChain = load.catch(() => undefined);\n return load;\n }\n\n private async loadFromRoute(): Promise<void> {\n if (this.unsavedChangesPopstate.isHandlingPopstate()) {\n return;\n }\n\n this.loadingFromRoute = true;\n try {\n const snapshot = this.activatedRoute.snapshot;\n const routerScope = resolvePlatformScopeKey(snapshot.paramMap.get('scope')?.trim().toLowerCase()!);\n const vmScope = this.vm.scope();\n const query = snapshot.queryParamMap.get('q');\n const groupFromRoute = this.getGroupFromRouteSync();\n //\n if (vmScope != routerScope || !this.vm.isLoaded()) {\n traceSettingsPageRouteLoad(\n routerScope,\n vmScope !== routerScope ? 'scope-changed' : 'not-loaded-yet',\n );\n await this.vm.load(routerScope);\n }\n\n const activeGroup = this.vm.activateGroup()?.name;\n if (groupFromRoute === activeGroup && this.vm.isDirty() && !this.unsavedChangesConfirm.hasLeaveConfirmed()) {\n return;\n }\n\n const hasQuery = !!query?.trim();\n if (groupFromRoute && groupFromRoute === activeGroup && !hasQuery && !this.vm.isSearching()) {\n return;\n }\n\n if (groupFromRoute !== activeGroup) {\n this.vm.unloadActivateGroup();\n }\n if (!hasQuery) {\n this.vm.clearSearch();\n }\n\n let group = groupFromRoute;\n if (!group && this.deviceService.isLarge() && !this.vm.isSearching()) {\n group = this.vm.groups()?.[0]?.name;\n if (group) {\n this.vm.setActivateGroupByName(group);\n this.recompute();\n await this.router.navigate([group], { relativeTo: this.activatedRoute, replaceUrl: true });\n return;\n }\n } else if (group) {\n this.vm.setActivateGroupByName(group);\n this.recompute();\n }\n if (hasQuery) {\n await this.vm.search(query!);\n this.recompute();\n }\n } finally {\n this.loadingFromRoute = false;\n }\n }\n\n private getGroupFromRouteSync(): string | undefined {\n let route: ActivatedRouteSnapshot | null = this.activatedRoute.snapshot;\n while (route) {\n const group = route.paramMap.get('group');\n if (group) {\n return group;\n }\n route = route.firstChild ?? null;\n }\n return undefined;\n }\n\n /**\n * `ax-tabs` selects on click before we can confirm. Revert synchronously, then confirm + navigate.\n */\n protected handleSidebarTabChanged(event: AXTabStripChangedEvent): void {\n if (this.sidebarTabChangeSuppressed) {\n return;\n }\n\n const groups = this.vm.groups();\n const target = groups[event.index];\n const activeName = this.vm.activateGroup()?.name;\n\n if (!target || target.name === activeName || this.vm.isSearching()) {\n return;\n }\n\n const activeIndex = groups.findIndex((group) => group.name === activeName);\n if (activeIndex >= 0) {\n this.sidebarTabChangeSuppressed = true;\n try {\n this.sidebarTabs()?.select(activeIndex);\n } finally {\n this.sidebarTabChangeSuppressed = false;\n }\n }\n\n void this.completeGroupSwitch(target.name);\n }\n\n protected async handleSelectGroup(item: AXPSettingDefinitionGroup) {\n if (item.name === this.vm.activateGroup()?.name) {\n return;\n }\n\n if (!(await this.confirmLeaveIfDirty())) {\n return;\n }\n\n await this.router.navigate([`${item.name}`], { relativeTo: this.activatedRoute });\n }\n\n private async completeGroupSwitch(groupName: string): Promise<void> {\n if (!(await this.confirmLeaveIfDirty())) {\n return;\n }\n\n await this.router.navigate([groupName], { relativeTo: this.activatedRoute });\n }\n\n //#region ---- Keyboard Shortcuts ----\n\n private registerKeyboardShortcuts(): void {\n const saveKeys = resolveDetailsViewFooterCommandShortcuts('update-entity');\n const discardKeys = resolveDetailsViewFooterCommandShortcuts('discard');\n const group = '@general:keyboard-shortcuts.groups.settings';\n const shortcuts: AXPKeyboardShortcutBinding[] = [];\n\n if (saveKeys?.length) {\n shortcuts.push({\n keys: saveKeys,\n title: '@general:actions.apply.title',\n group,\n allowInEditableFields: true,\n when: () => this.canExecuteSaveShortcut(),\n handler: () => {\n void this.vm.apply();\n },\n });\n }\n\n if (discardKeys?.length) {\n shortcuts.push({\n keys: discardKeys,\n title: '@general:actions.discard.title',\n group,\n allowInEditableFields: true,\n when: () => this.canExecuteDiscardShortcut(),\n handler: () => {\n void this.executeDiscardViaShortcut();\n },\n });\n }\n\n if (shortcuts.length === 0) {\n return;\n }\n\n this.shortcutRegistry.register({\n owner: this.destroyRef,\n elementRef: this.elementRef,\n id: 'settings-page-core',\n priority: AXPKeyboardShortcutPriority.Page,\n scope: group,\n shortcuts,\n });\n }\n\n private canExecuteSaveShortcut(): boolean {\n if (this.vm.isSaving() || this.vm.isBusy()) {\n return false;\n }\n return this.vm.isDirty();\n }\n\n private canExecuteDiscardShortcut(): boolean {\n if (this.vm.isSaving() || this.vm.isBusy()) {\n return false;\n }\n if (this.unsavedChangesConfirm.isConfirmPending()) {\n return false;\n }\n return this.vm.isDirty();\n }\n\n private async executeDiscardViaShortcut(): Promise<void> {\n if (!this.canExecuteDiscardShortcut()) {\n return;\n }\n\n const confirmed = await this.unsavedChangesConfirm.confirmIfDirty(true, {\n title: '@general:messages.unsaved-changes.title',\n message: '@general:messages.discard-changes.message',\n approveLeaveOnConfirm: false,\n });\n if (!confirmed) {\n return;\n }\n\n await this.vm.discard();\n }\n\n //#endregion\n\n //#region ---- Leave Page Gate ----\n\n async canDeactivate(): Promise<boolean> {\n if (this.unsavedChangesConfirm.hasLeaveConfirmed()) {\n return true;\n }\n\n return this.confirmLeaveIfDirty();\n }\n\n override onBeforeTabClose(): Promise<boolean> {\n return this.unsavedChangesConfirm.confirmIfDirty(this.shouldPromptLeave(), {\n approveLeaveOnConfirm: false,\n });\n }\n\n private shouldPromptLeave(): boolean {\n return this.vm.isDirty();\n }\n\n private async confirmLeaveIfDirty(): Promise<boolean> {\n const wasDirty = this.shouldPromptLeave();\n const confirmed = await this.unsavedChangesConfirm.confirmIfDirty(wasDirty);\n if (confirmed && wasDirty) {\n await this.vm.discard();\n }\n return confirmed;\n }\n\n //#endregion\n\n //#region ---------------- Page Configuration Overrides ----------------\n\n override async getSecondaryMenuItems(): Promise<AXPActionMenuItem[]> {\n if (!this.vm.activateGroup()) {\n return [];\n }\n\n const items: AXPActionMenuItem[] = [\n {\n title: await this.translateService.translateAsync(\n '@settings-management:settings.actions.restore-defaults.title',\n ),\n icon: 'fa-light fa-rotate-left',\n color: 'danger',\n command: { name: 'restore-defaults' },\n },\n ];\n\n const payload = await this.hooks.runAsync('settings-page.secondary-actions', { items });\n return payload.items ?? items;\n }\n\n override async getPageTitle(): Promise<string> {\n const group = this.vm.activateGroup();\n const groupHeadingKey = group?.pageTitle ?? group?.title;\n const scopeTitle = await this.translateService.translateAsync(\n '@settings-management:module.terms.scopes.' + this.vm.scopeTitle(),\n );\n if (!this.vm.isSearching()) {\n return groupHeadingKey ?? scopeTitle;\n } else {\n return this.translateService.translateAsync('@settings-management:settings.components.search.title', {\n params: { q: this.vm.searchExpression() },\n });\n }\n }\n\n override async getPageDescription(): Promise<string | null> {\n const groupDescription = this.vm.activateGroup()?.description;\n const scopeDescription = await this.translateService.translateAsync(\n '@settings-management:module.terms.scopes.' + this.vm.scopeDescription(),\n );\n if (!this.vm.isSearching()) {\n return groupDescription ?? scopeDescription;\n } else {\n return this.translateService.translateAsync('@settings-management:settings.components.search.description');\n }\n }\n\n override hasUnsavedChanges(): boolean {\n return this.vm.isDirty();\n }\n\n override async getBackButton(): Promise<AXPBackButton | null> {\n if (this.vm.activateGroup()) {\n return {\n title: await this.translateService.translateAsync(\n '@settings-management:module.terms.scopes.' + this.vm.scopeTitle(),\n ),\n };\n }\n return null;\n }\n\n override async onBackButtonClick(): Promise<void> {\n if (!(await this.confirmLeaveIfDirty())) {\n return;\n }\n\n const app = this.sessionService.application?.name;\n const scope = resolvePlatformScopeName(this.vm.scope());\n this.router.navigate([app, 'settings', scope]);\n }\n\n override async execute(command: AXPExecuteCommand): Promise<void> {\n switch (command.name) {\n case 'restore-defaults':\n await this.vm.resetToDefault();\n break;\n }\n }\n\n //#endregion\n}\n","<axp-page-layout *translate=\"let t\">\n @if (vm.showGroups()) {\n <axp-layout-start-side>\n <axp-layout-header>\n <axp-layout-title>{{\n '@settings-management:module.terms.scopes.' + vm.scopeTitle() | translate | async\n }}</axp-layout-title>\n <axp-layout-toolbar>\n <ax-search-box [delayTime]=\"300\" [ngModel]=\"vm.searchExpression()\" (onValueChanged)=\"vm.search($event.value)\"\n [placeholder]=\"'@settings-management:settings.components.search.placeholder' | translate | async\">\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </axp-layout-toolbar>\n </axp-layout-header>\n <axp-layout-content>\n <ax-tabs #sidebarTabs [look]=\"'with-line-color'\" [location]=\"'end'\" [fitParent]=\"true\"\n (onActiveTabChanged)=\"handleSidebarTabChanged($event)\">\n @for (item of vm.groups(); track item.name) {\n <ax-tab-item [key]=\"item.name\" [text]=\"(item.title | translate | async)!\"\n [active]=\"vm.activateGroup()?.name === item.name && !vm.isSearching()\">\n <ax-prefix>\n <ax-icon icon=\"{{ item.icon }} fa-fw fa-regular\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n }\n </ax-tabs>\n </axp-layout-content>\n </axp-layout-start-side>\n }\n\n <axp-page-content id=\"ax-settings\">\n @if (vm.hasActivateGroup() || vm.isSearching()) {\n <router-outlet></router-outlet>\n } @else {\n <axp-layout-list>\n @for (item of vm.groups(); track $index) {\n <axp-layout-list-item (click)=\"handleSelectGroup(item)\">\n <axp-layout-prefix>\n <ax-icon icon=\"far ${{ item.icon }}\" class=\"text-gray-500\"></ax-icon>\n </axp-layout-prefix>\n <axp-layout-content>\n <a class=\"font-semibold\">{{ item.title | translate | async }}</a>\n </axp-layout-content>\n <axp-layout-suffix>\n <ax-icon icon=\" far fa-chevron-right\" class=\"text-gray-400\"></ax-icon>\n </axp-layout-suffix>\n </axp-layout-list-item>\n }\n </axp-layout-list>\n }\n </axp-page-content>\n\n @if (vm.isDirty()) {\n <axp-page-footer class=\"--animated\">\n <axp-layout-suffix>\n <ax-button [class.ax-sm]=\"deviceService.isSmall()\" [disabled]=\"vm.isBusy() || vm.isSaving()\"\n [text]=\"'@general:actions.discard.title' | translate | async\" (onClick)=\"vm.discard()\">\n </ax-button>\n <ax-button [class.ax-sm]=\"deviceService.isSmall()\" [disabled]=\"vm.isBusy() || vm.isSaving()\"\n [text]=\"'@general:actions.apply.title' | translate | async\" (onClick)=\"vm.apply()\" [color]=\"'secondary'\">\n @if (vm.isSaving()) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n </axp-layout-suffix>\n </axp-page-footer>\n }\n</axp-page-layout>"],"names":["i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFM,MAAO,uBAAwB,SAAQ,0BAA0B,CAAA;AAvCvE,IAAA,WAAA,GAAA;;AAwCY,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACxB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACnD,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC;AAC3B,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC7C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAE9B,QAAA,IAAA,CAAA,sBAAsB,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjE,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,2BAA2B,CAAC;QACtD,IAAA,CAAA,WAAW,GAAG,SAAS,CAAkB,aAAa;wFAAC;QAChE,IAAA,CAAA,0BAA0B,GAAG,KAAK;;QAElC,IAAA,CAAA,gBAAgB,GAAG,KAAK;;AAExB,QAAA,IAAA,CAAA,cAAc,GAAkB,OAAO,CAAC,OAAO,EAAE;;AAGzD,QAAA,IAAA,CAAA,2BAA2B,GAAG,MAAM,CAAC,MAAK;YACxC,MAAM,MAAM,GAAG,I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AA,CAAA,EAAA;yEAcuB,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -0,0 +1,306 @@
1
+ import { getSmart } from '@acorex-platform/framework-shared/core';
2
+ import { AXBadgeModule } from '@acorex/components/badge';
3
+ import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
4
+ import * as i6 from '@acorex/components/button';
5
+ import { AXButtonModule } from '@acorex/components/button';
6
+ import * as i4 from '@acorex/components/decorators';
7
+ import { AXDecoratorModule } from '@acorex/components/decorators';
8
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
9
+ import * as i5$1 from '@acorex/components/form';
10
+ import { AXFormComponent, AXFormModule } from '@acorex/components/form';
11
+ import { AXLoadingModule } from '@acorex/components/loading';
12
+ import { AXSearchBoxModule } from '@acorex/components/search-box';
13
+ import * as i5 from '@acorex/core/translation';
14
+ import { AXTranslationModule } from '@acorex/core/translation';
15
+ import { AXValidationModule } from '@acorex/core/validation';
16
+ import { AXPExpressionEvaluatorService } from '@acorex-platform/framework-client/core';
17
+ import { AXPCommandService } from '@acorex-platform/framework-client/runtime';
18
+ import * as i6$1 from '@acorex-platform/framework-client/layout/widget-core';
19
+ import { AXPWidgetContainerComponent, AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';
20
+ import { AXPThemeLayoutBlockComponent, AXPThemeLayoutFooterComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutSectionComponent } from '@acorex-platform/framework-client/layout/components';
21
+ import * as i1 from '@angular/common';
22
+ import { CommonModule } from '@angular/common';
23
+ import * as i0 from '@angular/core';
24
+ import { inject, viewChild, signal, effect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
25
+ import { FormsModule } from '@angular/forms';
26
+ import { AXPSettingsViewModel } from './acorex-platform-module-settings-management-client.mjs';
27
+
28
+ class AXPSettingsViewComponent {
29
+ constructor() {
30
+ //#region ---- Services & Dependencies ----
31
+ this.vm = inject(AXPSettingsViewModel);
32
+ this.commandService = inject(AXPCommandService);
33
+ this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
34
+ this.form = viewChild(AXFormComponent, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
36
+ this.container = viewChild(AXPWidgetContainerComponent, /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
38
+ //#endregion
39
+ //#region ---- State ----
40
+ /** Cached row visibility keyed by setting name (from `widget.options.visibility`). */
41
+ this.rowVisibility = signal({}, /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "rowVisibility" }] : /* istanbul ignore next */ []));
43
+ this.visibilityRefreshGeneration = 0;
44
+ //#endregion
45
+ //#region ---- Lifecycle Effects ----
46
+ this.#registerFormEffect = effect(() => {
47
+ const formRef = this.form();
48
+ if (formRef) {
49
+ this.vm.registerForm(formRef);
50
+ }
51
+ }, /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "#registerFormEffect" }] : /* istanbul ignore next */ []));
53
+ this.#statusEffect = effect(() => {
54
+ this.container()?.builderService.setStatus(this.vm.status());
55
+ }, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "#statusEffect" }] : /* istanbul ignore next */ []));
57
+ this.#formDirtyEffect = effect(() => {
58
+ if (this.vm.syncingBaseline()) {
59
+ return;
60
+ }
61
+ const container = this.container();
62
+ const isDirty = container?.isFormDirty() ?? false;
63
+ if (this.vm.formDirty() === isDirty) {
64
+ return;
65
+ }
66
+ untracked(() => this.vm.setFormDirty(isDirty));
67
+ }, /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "#formDirtyEffect" }] : /* istanbul ignore next */ []));
69
+ this.#applySyncEffect = effect(() => {
70
+ const nonce = this.vm.applySyncNonce();
71
+ if (nonce === 0) {
72
+ return;
73
+ }
74
+ const container = this.container();
75
+ untracked(async () => {
76
+ this.vm.setSyncingBaseline(true);
77
+ try {
78
+ if (container) {
79
+ await container.replaceContext(this.vm.context());
80
+ this.vm.applySavedState(container.contextService.data());
81
+ }
82
+ else {
83
+ this.vm.setFormDirty(false);
84
+ }
85
+ }
86
+ finally {
87
+ this.vm.setSyncingBaseline(false);
88
+ }
89
+ });
90
+ }, /* @ts-ignore */
91
+ ...(ngDevMode ? [{ debugName: "#applySyncEffect" }] : /* istanbul ignore next */ []));
92
+ this.#discardSyncEffect = effect(() => {
93
+ const nonce = this.vm.discardSyncNonce();
94
+ if (nonce === 0) {
95
+ return;
96
+ }
97
+ const container = this.container();
98
+ untracked(() => {
99
+ try {
100
+ if (container) {
101
+ container.revertAndSettle();
102
+ this.vm.applySavedState(container.contextService.data());
103
+ }
104
+ }
105
+ finally {
106
+ this.vm.setSyncingBaseline(false);
107
+ }
108
+ });
109
+ }, /* @ts-ignore */
110
+ ...(ngDevMode ? [{ debugName: "#discardSyncEffect" }] : /* istanbul ignore next */ []));
111
+ this.#rowVisibilityEffect = effect(() => {
112
+ const context = this.vm.context();
113
+ this.vm.activateGroup();
114
+ this.vm.searchResults();
115
+ this.vm.isSearching();
116
+ const container = this.container();
117
+ untracked(() => {
118
+ void this.refreshRowVisibility(context, container);
119
+ });
120
+ }, /* @ts-ignore */
121
+ ...(ngDevMode ? [{ debugName: "#rowVisibilityEffect" }] : /* istanbul ignore next */ []));
122
+ }
123
+ //#endregion
124
+ //#region ---- Lifecycle Effects ----
125
+ #registerFormEffect;
126
+ #statusEffect;
127
+ #formDirtyEffect;
128
+ #applySyncEffect;
129
+ #discardSyncEffect;
130
+ #rowVisibilityEffect;
131
+ //#endregion
132
+ //#region ---- UI Handlers ----
133
+ handleContextChanged(e) {
134
+ this.vm.updateContext(e.data);
135
+ }
136
+ isSectionActionDisabled(action) {
137
+ if (!action.command?.name || !this.commandService.exists(action.command.name)) {
138
+ return true;
139
+ }
140
+ if (action.disabledWhenDirty && this.vm.isDirty()) {
141
+ return true;
142
+ }
143
+ if (action.requiredSettingKeys?.length) {
144
+ const context = this.vm.context();
145
+ if (!action.requiredSettingKeys.every((key) => hasSettingContextValue(context, key))) {
146
+ return true;
147
+ }
148
+ }
149
+ return false;
150
+ }
151
+ runSectionAction(action) {
152
+ if (this.isSectionActionDisabled(action) || !action.command?.name) {
153
+ return;
154
+ }
155
+ void this.commandService.execute(action.command.name, action.command.options ?? {});
156
+ }
157
+ //#endregion
158
+ //#region ---- Layout Helpers ----
159
+ /** Side-by-side settings row with wider control column (`layout.positions` without `stacked`). */
160
+ hasWideControlLayout(layout) {
161
+ return !!layout?.positions && layout.stacked !== true;
162
+ }
163
+ //#endregion
164
+ //#region ---- Row Visibility ----
165
+ /** Whether a setting row should be rendered (supports `widget.options.visibility` expressions). */
166
+ isSettingRowVisible(setting) {
167
+ const visibility = setting.widget.options?.['visibility'];
168
+ if (visibility == null) {
169
+ return true;
170
+ }
171
+ if (typeof visibility === 'boolean') {
172
+ return visibility;
173
+ }
174
+ return this.rowVisibility()[setting.name] ?? true;
175
+ }
176
+ async refreshRowVisibility(context, container) {
177
+ const generation = ++this.visibilityRefreshGeneration;
178
+ const settings = this.collectVisibleSettings();
179
+ const scope = this.buildExpressionScope(context, container);
180
+ const next = {};
181
+ await Promise.all(settings.map(async (setting) => {
182
+ next[setting.name] = await this.resolveRowVisibility(setting.widget.options?.['visibility'], scope);
183
+ }));
184
+ if (generation !== this.visibilityRefreshGeneration) {
185
+ return;
186
+ }
187
+ this.rowVisibility.set(next);
188
+ }
189
+ collectVisibleSettings() {
190
+ if (this.vm.isSearching()) {
191
+ const results = this.vm.searchResults();
192
+ if (!results?.length) {
193
+ return [];
194
+ }
195
+ return results.flatMap((group) => group.sections.flatMap((section) => section.settings));
196
+ }
197
+ const group = this.vm.activateGroup();
198
+ if (!group?.sections.length) {
199
+ return [];
200
+ }
201
+ return group.sections.flatMap((section) => section.settings);
202
+ }
203
+ async resolveRowVisibility(visibility, scope) {
204
+ if (visibility == null) {
205
+ return true;
206
+ }
207
+ if (typeof visibility === 'boolean') {
208
+ return visibility;
209
+ }
210
+ if (typeof visibility === 'string') {
211
+ if (this.expressionEvaluator.isExpression(visibility)) {
212
+ return Boolean(await this.expressionEvaluator.evaluate(visibility, scope));
213
+ }
214
+ return Boolean(visibility);
215
+ }
216
+ return true;
217
+ }
218
+ buildExpressionScope(context, container) {
219
+ return {
220
+ context: {
221
+ eval: (path) => {
222
+ if (container) {
223
+ const fromContainer = container.contextService.getValue(path);
224
+ if (fromContainer !== undefined) {
225
+ return fromContainer;
226
+ }
227
+ }
228
+ return this.readSettingContextValue(context, path);
229
+ },
230
+ set: (path, value) => {
231
+ container?.contextService.update(path, value, { origin: 'user' });
232
+ },
233
+ data: () => container?.contextService.data() ?? context,
234
+ isDirty: () => container?.contextService.isDirty() ?? false,
235
+ options: (path) => {
236
+ if (!container) {
237
+ return undefined;
238
+ }
239
+ if (path == null || path === '') {
240
+ return container.contextService.getValue('options');
241
+ }
242
+ return container.contextService.getValue(`options.${path}`);
243
+ },
244
+ },
245
+ events: {},
246
+ widget: {},
247
+ methods: {},
248
+ vars: {},
249
+ };
250
+ }
251
+ /** Flat persisted setting keys may contain dots (e.g. `Common:Setting:Navigation.Mode`). */
252
+ readSettingContextValue(context, key) {
253
+ if (Object.prototype.hasOwnProperty.call(context, key)) {
254
+ return context[key];
255
+ }
256
+ return getSmart(context, key);
257
+ }
258
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPSettingsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
259
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPSettingsViewComponent, isStandalone: true, selector: "ng-component", host: { classAttribute: "w-full" }, viewQueries: [{ propertyName: "form", first: true, predicate: AXFormComponent, descendants: true, isSignal: true }, { propertyName: "container", first: true, predicate: AXPWidgetContainerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-form>\n <axp-widgets-container [context]=\"vm.context()\" (onContextChanged)=\"handleContextChanged($event)\" *translate=\"let t\">\n @if (vm.isSearching() && vm.searchResults()!.length > 0) {\n <!-- Search Result -->\n @for (group of vm.searchResults(); track group.name; let first = $first) {\n <p class=\"text-lg md:text-xl font-semibold py-3 text-neutral-500\" [class.pt-0]=\"first\">\n {{ group.title | translate | async }}\n </p>\n <axp-layout-sections>\n @for (section of group.sections; track section.name) {\n <ng-container [ngTemplateOutlet]=\"sectionTpl\" [ngTemplateOutletContext]=\"{ section }\"></ng-container>\n }\n </axp-layout-sections>\n }\n }\n <!-- Not Found -->\n @else if (vm.isSearching() && vm.searchResults()!.length === 0) {\n <div class=\"p-2\">\n <div class=\"mt-3 flex flex-col justify-center h-[calc(100vh-236px)] items-center p-10 gap-10\">\n <p class=\"text-xl md:text-2xl font-bold\">\n {{ '@settings-management:settings.components.search.empty-states.not-found.title' | translate | async }}\n </p>\n </div>\n </div>\n }\n <!-- Group -->\n @else if (vm.activateGroup()?.sections) {\n <axp-layout-sections>\n @for (section of vm.activateGroup()?.sections; track section.name) {\n <ng-container [ngTemplateOutlet]=\"sectionTpl\" [ngTemplateOutletContext]=\"{ section }\"></ng-container>\n }\n </axp-layout-sections>\n }\n <ng-template #sectionTpl let-section=\"section\">\n <axp-layout-section>\n <axp-layout-header>\n <axp-layout-title>\n {{ section.title | translate | async }}\n </axp-layout-title>\n @if (section.description) {\n <axp-layout-description>\n {{ section.description | translate | async }}\n </axp-layout-description>\n }\n </axp-layout-header>\n <axp-layout-content>\n <!-- Settings Item -->\n @for (j of section.settings; track j.name) {\n @if (isSettingRowVisible(j)) {\n <div class=\"--item-container\" [class.--wide-control]=\"hasWideControlLayout(j.layout)\"\n [class.--stacked-control]=\"j.layout?.stacked === true\">\n <div class=\"--item-label\">\n @if (j.title) {\n <axp-layout-title>{{ j.title | translate | async }}</axp-layout-title>\n }\n @if (j.description) {\n <axp-layout-description>{{ j.description | translate | async }}</axp-layout-description>\n }\n </div>\n <ax-form-field class=\"--item-control\">\n <ng-container axp-widget-renderer [node]=\"j.widget\" [mode]=\"'edit'\">\n </ng-container>\n </ax-form-field>\n </div>\n }\n }\n </axp-layout-content>\n @if (section.actions?.length) {\n <axp-layout-footer class=\"--section-footer\">\n <axp-layout-suffix>\n @for (action of section.actions; track action.command.name) {\n <ax-button [class.ax-sm]=\"true\" [text]=\"action.title | translate | async\"\n [color]=\"action.color ?? 'primary'\" [look]=\"action.look ?? 'outline'\"\n [disabled]=\"isSectionActionDisabled(action)\" (onClick)=\"runSectionAction(action)\">\n @if (action.icon) {\n <ax-prefix><ax-icon><i [class]=\"action.icon\"></i></ax-icon></ax-prefix>\n }\n </ax-button>\n }\n </axp-layout-suffix>\n </axp-layout-footer>\n }\n </axp-layout-section>\n </ng-template>\n </axp-widgets-container>\n</ax-form>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type:
260
+ //
261
+ AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i6.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i5$1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i5$1.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type:
262
+ //
263
+ AXPWidgetCoreModule }, { kind: "component", type: i6$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutFooterComponent, selector: "axp-layout-footer, axp-layout-page-footer" }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutSectionComponent, selector: "axp-layout-section" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
264
+ }
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPSettingsViewComponent, decorators: [{
266
+ type: Component,
267
+ args: [{ imports: [
268
+ CommonModule,
269
+ FormsModule,
270
+ //
271
+ AXDecoratorModule,
272
+ AXBreadcrumbsModule,
273
+ AXButtonModule,
274
+ AXBadgeModule,
275
+ AXTranslationModule,
276
+ AXSearchBoxModule,
277
+ AXDropdownButtonModule,
278
+ AXLoadingModule,
279
+ AXFormModule,
280
+ AXValidationModule,
281
+ //
282
+ AXPWidgetCoreModule,
283
+ AXPThemeLayoutBlockComponent,
284
+ AXPThemeLayoutFooterComponent,
285
+ AXPThemeLayoutHeaderComponent,
286
+ AXPThemeLayoutSectionComponent,
287
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
288
+ class: 'w-full',
289
+ }, template: "<ax-form>\n <axp-widgets-container [context]=\"vm.context()\" (onContextChanged)=\"handleContextChanged($event)\" *translate=\"let t\">\n @if (vm.isSearching() && vm.searchResults()!.length > 0) {\n <!-- Search Result -->\n @for (group of vm.searchResults(); track group.name; let first = $first) {\n <p class=\"text-lg md:text-xl font-semibold py-3 text-neutral-500\" [class.pt-0]=\"first\">\n {{ group.title | translate | async }}\n </p>\n <axp-layout-sections>\n @for (section of group.sections; track section.name) {\n <ng-container [ngTemplateOutlet]=\"sectionTpl\" [ngTemplateOutletContext]=\"{ section }\"></ng-container>\n }\n </axp-layout-sections>\n }\n }\n <!-- Not Found -->\n @else if (vm.isSearching() && vm.searchResults()!.length === 0) {\n <div class=\"p-2\">\n <div class=\"mt-3 flex flex-col justify-center h-[calc(100vh-236px)] items-center p-10 gap-10\">\n <p class=\"text-xl md:text-2xl font-bold\">\n {{ '@settings-management:settings.components.search.empty-states.not-found.title' | translate | async }}\n </p>\n </div>\n </div>\n }\n <!-- Group -->\n @else if (vm.activateGroup()?.sections) {\n <axp-layout-sections>\n @for (section of vm.activateGroup()?.sections; track section.name) {\n <ng-container [ngTemplateOutlet]=\"sectionTpl\" [ngTemplateOutletContext]=\"{ section }\"></ng-container>\n }\n </axp-layout-sections>\n }\n <ng-template #sectionTpl let-section=\"section\">\n <axp-layout-section>\n <axp-layout-header>\n <axp-layout-title>\n {{ section.title | translate | async }}\n </axp-layout-title>\n @if (section.description) {\n <axp-layout-description>\n {{ section.description | translate | async }}\n </axp-layout-description>\n }\n </axp-layout-header>\n <axp-layout-content>\n <!-- Settings Item -->\n @for (j of section.settings; track j.name) {\n @if (isSettingRowVisible(j)) {\n <div class=\"--item-container\" [class.--wide-control]=\"hasWideControlLayout(j.layout)\"\n [class.--stacked-control]=\"j.layout?.stacked === true\">\n <div class=\"--item-label\">\n @if (j.title) {\n <axp-layout-title>{{ j.title | translate | async }}</axp-layout-title>\n }\n @if (j.description) {\n <axp-layout-description>{{ j.description | translate | async }}</axp-layout-description>\n }\n </div>\n <ax-form-field class=\"--item-control\">\n <ng-container axp-widget-renderer [node]=\"j.widget\" [mode]=\"'edit'\">\n </ng-container>\n </ax-form-field>\n </div>\n }\n }\n </axp-layout-content>\n @if (section.actions?.length) {\n <axp-layout-footer class=\"--section-footer\">\n <axp-layout-suffix>\n @for (action of section.actions; track action.command.name) {\n <ax-button [class.ax-sm]=\"true\" [text]=\"action.title | translate | async\"\n [color]=\"action.color ?? 'primary'\" [look]=\"action.look ?? 'outline'\"\n [disabled]=\"isSectionActionDisabled(action)\" (onClick)=\"runSectionAction(action)\">\n @if (action.icon) {\n <ax-prefix><ax-icon><i [class]=\"action.icon\"></i></ax-icon></ax-prefix>\n }\n </ax-button>\n }\n </axp-layout-suffix>\n </axp-layout-footer>\n }\n </axp-layout-section>\n </ng-template>\n </axp-widgets-container>\n</ax-form>" }]
290
+ }], propDecorators: { form: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXFormComponent), { isSignal: true }] }], container: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPWidgetContainerComponent), { isSignal: true }] }] } });
291
+ function hasSettingContextValue(context, key) {
292
+ const value = Object.prototype.hasOwnProperty.call(context, key) ? context[key] : getSmart(context, key);
293
+ if (value == null) {
294
+ return false;
295
+ }
296
+ if (typeof value === 'string') {
297
+ return value.trim().length > 0;
298
+ }
299
+ if (typeof value === 'number') {
300
+ return Number.isFinite(value) && value > 0;
301
+ }
302
+ return true;
303
+ }
304
+
305
+ export { AXPSettingsViewComponent };
306
+ //# sourceMappingURL=acorex-platform-module-settings-management-client-setting-view.component-CSJ-1pfO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-settings-management-client-setting-view.component-CSJ-1pfO.mjs","sources":["../../../../libs/modules/settings-management/client/src/lib/features/settings/setting-view/setting-view.component.ts","../../../../libs/modules/settings-management/client/src/lib/features/settings/setting-view/setting-view.component.html"],"sourcesContent":["import { AXPContextChangeEvent, getSmart } from '@acorex-platform/framework-shared/core';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXSearchBoxModule } from '@acorex/components/search-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\n\nimport { AXPExpressionEvaluatorService } from '@acorex-platform/framework-client/core';\nimport { AXPExpressionEvaluatorScope } from '@acorex-platform/framework-shared/core';\nimport {\n AXPSettingDefinition,\n AXPSettingDefinitionGroup,\n AXPSettingLayoutOptions,\n AXPSettingSectionAction,\n} from '@acorex-platform/framework-client/common';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXPWidgetCoreModule, AXPWidgetContainerComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport {\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutFooterComponent,\n AXPThemeLayoutHeaderComponent,\n AXPThemeLayoutSectionComponent,\n} from '@acorex-platform/framework-client/layout/components';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n signal,\n untracked,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPSettingsViewModel } from '../settings.viewmodel';\n\n@Component({\n templateUrl: 'setting-view.component.html',\n imports: [\n CommonModule,\n FormsModule,\n //\n AXDecoratorModule,\n AXBreadcrumbsModule,\n AXButtonModule,\n AXBadgeModule,\n AXTranslationModule,\n AXSearchBoxModule,\n AXDropdownButtonModule,\n AXLoadingModule,\n AXFormModule,\n AXValidationModule,\n //\n AXPWidgetCoreModule,\n AXPThemeLayoutBlockComponent,\n AXPThemeLayoutFooterComponent,\n AXPThemeLayoutHeaderComponent,\n AXPThemeLayoutSectionComponent,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'w-full',\n },\n})\nexport class AXPSettingsViewComponent {\n //#region ---- Services & Dependencies ----\n\n protected readonly vm = inject(AXPSettingsViewModel);\n private readonly commandService = inject(AXPCommandService);\n private readonly expressionEvaluator = inject(AXPExpressionEvaluatorService);\n private readonly form = viewChild(AXFormComponent);\n private readonly container = viewChild(AXPWidgetContainerComponent);\n\n //#endregion\n\n //#region ---- State ----\n\n /** Cached row visibility keyed by setting name (from `widget.options.visibility`). */\n protected readonly rowVisibility = signal<Record<string, boolean>>({});\n\n private visibilityRefreshGeneration = 0;\n\n //#endregion\n\n //#region ---- Lifecycle Effects ----\n\n #registerFormEffect = effect(() => {\n const formRef = this.form();\n if (formRef) {\n this.vm.registerForm(formRef);\n }\n });\n\n #statusEffect = effect(() => {\n this.container()?.builderService.setStatus(this.vm.status());\n });\n\n #formDirtyEffect = effect(() => {\n if (this.vm.syncingBaseline()) {\n return;\n }\n\n const container = this.container();\n const isDirty = container?.isFormDirty() ?? false;\n if (this.vm.formDirty() === isDirty) {\n return;\n }\n untracked(() => this.vm.setFormDirty(isDirty));\n });\n\n #applySyncEffect = effect(() => {\n const nonce = this.vm.applySyncNonce();\n if (nonce === 0) {\n return;\n }\n\n const container = this.container();\n\n untracked(async () => {\n this.vm.setSyncingBaseline(true);\n try {\n if (container) {\n await container.replaceContext(this.vm.context());\n this.vm.applySavedState(container.contextService.data() as Record<string, unknown>);\n } else {\n this.vm.setFormDirty(false);\n }\n } finally {\n this.vm.setSyncingBaseline(false);\n }\n });\n });\n\n #discardSyncEffect = effect(() => {\n const nonce = this.vm.discardSyncNonce();\n if (nonce === 0) {\n return;\n }\n\n const container = this.container();\n\n untracked(() => {\n try {\n if (container) {\n container.revertAndSettle();\n this.vm.applySavedState(container.contextService.data() as Record<string, unknown>);\n }\n } finally {\n this.vm.setSyncingBaseline(false);\n }\n });\n });\n\n #rowVisibilityEffect = effect(() => {\n const context = this.vm.context();\n this.vm.activateGroup();\n this.vm.searchResults();\n this.vm.isSearching();\n const container = this.container();\n\n untracked(() => {\n void this.refreshRowVisibility(context, container);\n });\n });\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n protected handleContextChanged(e: AXPContextChangeEvent): void {\n this.vm.updateContext(e.data);\n }\n\n protected isSectionActionDisabled(action: AXPSettingSectionAction): boolean {\n if (!action.command?.name || !this.commandService.exists(action.command.name)) {\n return true;\n }\n\n if (action.disabledWhenDirty && this.vm.isDirty()) {\n return true;\n }\n\n if (action.requiredSettingKeys?.length) {\n const context = this.vm.context();\n if (!action.requiredSettingKeys.every((key) => hasSettingContextValue(context, key))) {\n return true;\n }\n }\n\n return false;\n }\n\n protected runSectionAction(action: AXPSettingSectionAction): void {\n if (this.isSectionActionDisabled(action) || !action.command?.name) {\n return;\n }\n void this.commandService.execute(action.command.name, action.command.options ?? {});\n }\n\n //#endregion\n\n //#region ---- Layout Helpers ----\n\n /** Side-by-side settings row with wider control column (`layout.positions` without `stacked`). */\n protected hasWideControlLayout(layout?: AXPSettingLayoutOptions): boolean {\n return !!layout?.positions && layout.stacked !== true;\n }\n\n //#endregion\n\n //#region ---- Row Visibility ----\n\n /** Whether a setting row should be rendered (supports `widget.options.visibility` expressions). */\n protected isSettingRowVisible(setting: AXPSettingDefinition): boolean {\n const visibility = setting.widget.options?.['visibility'];\n if (visibility == null) {\n return true;\n }\n if (typeof visibility === 'boolean') {\n return visibility;\n }\n return this.rowVisibility()[setting.name] ?? true;\n }\n\n private async refreshRowVisibility(\n context: Record<string, unknown>,\n container: AXPWidgetContainerComponent | undefined,\n ): Promise<void> {\n const generation = ++this.visibilityRefreshGeneration;\n const settings = this.collectVisibleSettings();\n const scope = this.buildExpressionScope(context, container);\n const next: Record<string, boolean> = {};\n\n await Promise.all(\n settings.map(async (setting) => {\n next[setting.name] = await this.resolveRowVisibility(setting.widget.options?.['visibility'], scope);\n }),\n );\n\n if (generation !== this.visibilityRefreshGeneration) {\n return;\n }\n\n this.rowVisibility.set(next);\n }\n\n private collectVisibleSettings(): AXPSettingDefinition[] {\n if (this.vm.isSearching()) {\n const results = this.vm.searchResults();\n if (!results?.length) {\n return [];\n }\n return results.flatMap((group) => group.sections.flatMap((section) => section.settings));\n }\n\n const group = this.vm.activateGroup();\n if (!group?.sections.length) {\n return [];\n }\n\n return group.sections.flatMap((section) => section.settings);\n }\n\n private async resolveRowVisibility(\n visibility: unknown,\n scope: AXPExpressionEvaluatorScope,\n ): Promise<boolean> {\n if (visibility == null) {\n return true;\n }\n if (typeof visibility === 'boolean') {\n return visibility;\n }\n if (typeof visibility === 'string') {\n if (this.expressionEvaluator.isExpression(visibility)) {\n return Boolean(await this.expressionEvaluator.evaluate(visibility, scope));\n }\n return Boolean(visibility);\n }\n return true;\n }\n\n private buildExpressionScope(\n context: Record<string, unknown>,\n container: AXPWidgetContainerComponent | undefined,\n ): AXPExpressionEvaluatorScope {\n return {\n context: {\n eval: (path: string) => {\n if (container) {\n const fromContainer = container.contextService.getValue(path);\n if (fromContainer !== undefined) {\n return fromContainer;\n }\n }\n return this.readSettingContextValue(context, path);\n },\n set: (path: string, value: unknown) => {\n container?.contextService.update(path, value, { origin: 'user' });\n },\n data: () => (container?.contextService.data() as Record<string, unknown>) ?? context,\n isDirty: () => container?.contextService.isDirty() ?? false,\n options: (path?: string) => {\n if (!container) {\n return undefined;\n }\n if (path == null || path === '') {\n return container.contextService.getValue('options');\n }\n return container.contextService.getValue(`options.${path}`);\n },\n },\n events: {},\n widget: {},\n methods: {},\n vars: {},\n };\n }\n\n /** Flat persisted setting keys may contain dots (e.g. `Common:Setting:Navigation.Mode`). */\n private readSettingContextValue(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}\n\nfunction hasSettingContextValue(context: Record<string, unknown>, key: string): boolean {\n const value = Object.prototype.hasOwnProperty.call(context, key) ? context[key] : getSmart(context, key);\n\n if (value == null) {\n return false;\n }\n\n if (typeof value === 'string') {\n return value.trim().length > 0;\n }\n\n if (typeof value === 'number') {\n return Number.isFinite(value) && value > 0;\n }\n\n return true;\n}\n","<ax-form>\n <axp-widgets-container [context]=\"vm.context()\" (onContextChanged)=\"handleContextChanged($event)\" *translate=\"let t\">\n @if (vm.isSearching() && vm.searchResults()!.length > 0) {\n <!-- Search Result -->\n @for (group of vm.searchResults(); track group.name; let first = $first) {\n <p class=\"text-lg md:text-xl font-semibold py-3 text-neutral-500\" [class.pt-0]=\"first\">\n {{ group.title | translate | async }}\n </p>\n <axp-layout-sections>\n @for (section of group.sections; track section.name) {\n <ng-container [ngTemplateOutlet]=\"sectionTpl\" [ngTemplateOutletContext]=\"{ section }\"></ng-container>\n }\n </axp-layout-sections>\n }\n }\n <!-- Not Found -->\n @else if (vm.isSearching() && vm.searchResults()!.length === 0) {\n <div class=\"p-2\">\n <div class=\"mt-3 flex flex-col justify-center h-[calc(100vh-236px)] items-center p-10 gap-10\">\n <p class=\"text-xl md:text-2xl font-bold\">\n {{ '@settings-management:settings.components.search.empty-states.not-found.title' | translate | async }}\n </p>\n </div>\n </div>\n }\n <!-- Group -->\n @else if (vm.activateGroup()?.sections) {\n <axp-layout-sections>\n @for (section of vm.activateGroup()?.sections; track section.name) {\n <ng-container [ngTemplateOutlet]=\"sectionTpl\" [ngTemplateOutletContext]=\"{ section }\"></ng-container>\n }\n </axp-layout-sections>\n }\n <ng-template #sectionTpl let-section=\"section\">\n <axp-layout-section>\n <axp-layout-header>\n <axp-layout-title>\n {{ section.title | translate | async }}\n </axp-layout-title>\n @if (section.description) {\n <axp-layout-description>\n {{ section.description | translate | async }}\n </axp-layout-description>\n }\n </axp-layout-header>\n <axp-layout-content>\n <!-- Settings Item -->\n @for (j of section.settings; track j.name) {\n @if (isSettingRowVisible(j)) {\n <div class=\"--item-container\" [class.--wide-control]=\"hasWideControlLayout(j.layout)\"\n [class.--stacked-control]=\"j.layout?.stacked === true\">\n <div class=\"--item-label\">\n @if (j.title) {\n <axp-layout-title>{{ j.title | translate | async }}</axp-layout-title>\n }\n @if (j.description) {\n <axp-layout-description>{{ j.description | translate | async }}</axp-layout-description>\n }\n </div>\n <ax-form-field class=\"--item-control\">\n <ng-container axp-widget-renderer [node]=\"j.widget\" [mode]=\"'edit'\">\n </ng-container>\n </ax-form-field>\n </div>\n }\n }\n </axp-layout-content>\n @if (section.actions?.length) {\n <axp-layout-footer class=\"--section-footer\">\n <axp-layout-suffix>\n @for (action of section.actions; track action.command.name) {\n <ax-button [class.ax-sm]=\"true\" [text]=\"action.title | translate | async\"\n [color]=\"action.color ?? 'primary'\" [look]=\"action.look ?? 'outline'\"\n [disabled]=\"isSectionActionDisabled(action)\" (onClick)=\"runSectionAction(action)\">\n @if (action.icon) {\n <ax-prefix><ax-icon><i [class]=\"action.icon\"></i></ax-icon></ax-prefix>\n }\n </ax-button>\n }\n </axp-layout-suffix>\n </axp-layout-footer>\n }\n </axp-layout-section>\n </ng-template>\n </axp-widgets-container>\n</ax-form>"],"names":["i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;M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