@praxisui/page-builder 10.0.0-rc.17 → 10.0.0-rc.18

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-10-14T22:05:37.957Z",
3
+ "generatedAt": "2026-10-14T22:59:57.823Z",
4
4
  "packageName": "@praxisui/page-builder",
5
- "packageVersion": "10.0.0-rc.17",
5
+ "packageVersion": "10.0.0-rc.18",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 1,
@@ -7,7 +7,7 @@ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
7
7
  import * as i2$1 from '@angular/material/icon';
8
8
  import { MatIconModule } from '@angular/material/icon';
9
9
  import * as i2$2 from '@praxisui/core';
10
- import { PraxisIconDirective, providePraxisI18n, BUILTIN_WIDGET_SHELL_PRESETS, SETTINGS_EDITOR_SECTIONS_HOSTED, PraxisI18nService, getWidgetShellActionIdError, WidgetShellComponent, SettingsSectionTabsComponent, PraxisIconButtonComponent, GLOBAL_ACTION_CATALOG, ComponentMetadataRegistry, CompositionValidatorService, getGlobalActionCatalog, PRAXIS_GLOBAL_ACTION_CATALOG, SurfaceOpenActionEditorComponent, BUILTIN_PAGE_LAYOUT_PRESETS, resolveWidgetPageLayoutPreset, BUILTIN_PAGE_THEME_PRESETS, prepareCanvasArrangement, SETTINGS_PANEL_DATA as SETTINGS_PANEL_DATA$1, validateCanvasArrangement, PraxisJsonLogicService, NestedWidgetConfigAccessor, canonicalJsonSha256, ResourceDiscoveryService, ComponentRuntimeProfileService, buildApiUrl, deepMerge, generateId, ObservabilityDashboardService, PraxisRuntimeComponentObservationRegistryService, domainKnowledgeTimelineToRichContentDocument, DomainRuleService, DomainKnowledgeService, SETTINGS_PANEL_BRIDGE, DynamicWidgetPageComponent, DYNAMIC_PAGE_SHELL_EDITOR } from '@praxisui/core';
10
+ import { PraxisIconDirective, providePraxisI18n, BUILTIN_WIDGET_SHELL_PRESETS, SETTINGS_EDITOR_SECTIONS_HOSTED, PraxisI18nService, getWidgetShellActionIdError, WidgetShellComponent, SettingsSectionTabsComponent, PraxisIconButtonComponent, GLOBAL_ACTION_CATALOG, ComponentMetadataRegistry, CompositionValidatorService, getGlobalActionCatalog, PRAXIS_GLOBAL_ACTION_CATALOG, SurfaceOpenActionEditorComponent, BUILTIN_PAGE_LAYOUT_PRESETS, resolveWidgetPageLayoutPreset, BUILTIN_PAGE_THEME_PRESETS, prepareCanvasArrangement, SETTINGS_PANEL_DATA as SETTINGS_PANEL_DATA$1, validateCanvasArrangement, PraxisJsonLogicService, NestedWidgetConfigAccessor, canonicalJsonSha256, ResourceDiscoveryService, ComponentRuntimeProfileService, buildApiUrl, deepMerge, generateId, ObservabilityDashboardService, PraxisRuntimeComponentObservationRegistryService, PraxisCustomizationModeService, domainKnowledgeTimelineToRichContentDocument, DomainRuleService, DomainKnowledgeService, SETTINGS_PANEL_BRIDGE, DynamicWidgetPageComponent, DYNAMIC_PAGE_SHELL_EDITOR } from '@praxisui/core';
11
11
  import * as i3 from '@angular/material/tooltip';
12
12
  import { MatTooltipModule } from '@angular/material/tooltip';
13
13
  import * as i4 from '@angular/material/form-field';
@@ -26669,6 +26669,7 @@ class DynamicPageBuilderComponent {
26669
26669
  observabilityDashboard = inject(ObservabilityDashboardService);
26670
26670
  runtimeObservationRegistry = inject(PraxisRuntimeComponentObservationRegistryService, { optional: true });
26671
26671
  agenticAuthoringOptions = inject(PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS, { optional: true });
26672
+ customizationMode = inject(PraxisCustomizationModeService, { optional: true });
26672
26673
  runtime;
26673
26674
  page;
26674
26675
  context = null;
@@ -26823,6 +26824,27 @@ class DynamicPageBuilderComponent {
26823
26824
  this.agenticAuthoringError.set('');
26824
26825
  }
26825
26826
  }, { injector: this.injector });
26827
+ effect(() => {
26828
+ if (!this.customizationMode)
26829
+ return;
26830
+ const shellCustomizing = this.customizationMode.isCustomizing();
26831
+ if (shellCustomizing !== this.isCustomizing()) {
26832
+ this.isCustomizing.set(shellCustomizing);
26833
+ if (!shellCustomizing) {
26834
+ if (this.previewMode()) {
26835
+ this.previewMode.set(false);
26836
+ }
26837
+ if (this.agenticAuthoringOpen()) {
26838
+ this.agenticAuthoringOpen.set(false);
26839
+ }
26840
+ this.connectionsViewerOpen.set(false);
26841
+ }
26842
+ this.customizationChange.emit(shellCustomizing);
26843
+ }
26844
+ }, { injector: this.injector });
26845
+ effect(() => {
26846
+ this.syncShellPageGovernance();
26847
+ }, { injector: this.injector });
26826
26848
  }
26827
26849
  ngOnChanges(changes) {
26828
26850
  const authoringDocumentChange = changes['authoringDocument'];
@@ -26881,8 +26903,9 @@ class DynamicPageBuilderComponent {
26881
26903
  && !agenticScopeChange.isFirstChange()
26882
26904
  && agenticScopeChange.previousValue !== agenticScopeChange.currentValue);
26883
26905
  if (authoringOwnerChanged) {
26884
- if (this.isCustomizing()) {
26906
+ if (this.isCustomizing() || this.customizationMode?.isCustomizing()) {
26885
26907
  this.isCustomizing.set(false);
26908
+ this.customizationMode?.setCustomizing(false);
26886
26909
  this.customizationChange.emit(false);
26887
26910
  }
26888
26911
  this.governancePersistence.set({ status: 'idle', customized: false });
@@ -26900,8 +26923,10 @@ class DynamicPageBuilderComponent {
26900
26923
  this.agenticAuthoringLastEtag.set(null);
26901
26924
  this.invalidateAgenticTerminalAuthorization();
26902
26925
  }
26926
+ this.syncShellPageGovernance();
26903
26927
  }
26904
26928
  ngOnDestroy() {
26929
+ this.customizationMode?.setPageGovernance(null);
26905
26930
  this.cancelActiveAgenticTurn();
26906
26931
  this.agenticTurnCancel$.complete();
26907
26932
  this.observabilityMetricsSubscription.unsubscribe();
@@ -26910,6 +26935,7 @@ class DynamicPageBuilderComponent {
26910
26935
  if (!this.isGovernanceBusy()) {
26911
26936
  const next = !this.isCustomizing();
26912
26937
  this.isCustomizing.set(next);
26938
+ this.customizationMode?.setCustomizing(next);
26913
26939
  if (!next) {
26914
26940
  if (this.previewMode()) {
26915
26941
  this.previewMode.set(false);
@@ -26920,9 +26946,10 @@ class DynamicPageBuilderComponent {
26920
26946
  }
26921
26947
  }
26922
26948
  isCustomizationEnabled() {
26923
- return this.showGovernanceToolbar
26924
- ? this.isCustomizing() && this.governancePersistence().status !== 'error' && this.governancePersistence().status !== 'loading'
26925
- : !!this.enableCustomization;
26949
+ if (this.showGovernanceToolbar || this.customizationMode?.isCustomizing()) {
26950
+ return this.isCustomizing() && this.governancePersistence().status !== 'error' && this.governancePersistence().status !== 'loading';
26951
+ }
26952
+ return !!this.enableCustomization;
26926
26953
  }
26927
26954
  showSettings() {
26928
26955
  return this.isCustomizationEnabled() && !this.previewMode();
@@ -27002,8 +27029,10 @@ class DynamicPageBuilderComponent {
27002
27029
  }
27003
27030
  /** Explicitly discard the local draft and reload the current identity's saved page. */
27004
27031
  reloadPersistedPage(defaultPage) {
27005
- if (this.runtimeAutoPersist())
27006
- this.runtime?.reloadPersistedPage(defaultPage);
27032
+ if (!this.runtimeAutoPersist())
27033
+ return;
27034
+ const fallback = defaultPage || this.parsePage(this.page) || { widgets: [] };
27035
+ this.runtime?.reloadPersistedPage(fallback);
27007
27036
  }
27008
27037
  /** Clear the current identity's saved document after storage acknowledgement. */
27009
27038
  resetPersistedPage(defaultPage) {
@@ -27015,8 +27044,33 @@ class DynamicPageBuilderComponent {
27015
27044
  onRuntimePersistenceChange(state) {
27016
27045
  this.runtimePersistenceStatus = state.status;
27017
27046
  this.governancePersistence.set(state);
27047
+ this.syncShellPageGovernance();
27018
27048
  this.persistenceChange.emit(state);
27019
27049
  }
27050
+ syncShellPageGovernance() {
27051
+ if (!this.customizationMode)
27052
+ return;
27053
+ if (this.showGovernanceToolbar || !this.runtimeAutoPersist()) {
27054
+ this.customizationMode.setPageGovernance(null);
27055
+ return;
27056
+ }
27057
+ const persistence = this.governancePersistence();
27058
+ const savedTime = persistence.status === 'saved' ? this.governanceLastSavedAt() : null;
27059
+ const baseLabel = this.governancePersistenceLabel();
27060
+ const statusLabel = savedTime
27061
+ ? `${baseLabel} · ${this.tx('governance.savedAt', 'salvo às')} ${savedTime}`
27062
+ : baseLabel;
27063
+ this.customizationMode.setPageGovernance({
27064
+ status: persistence.status,
27065
+ operation: persistence.operation ?? null,
27066
+ errorKind: persistence.errorKind ?? null,
27067
+ statusLabel,
27068
+ isCustomized: this.isLayoutCustomized(),
27069
+ onRetry: () => this.retryPersistedPage(),
27070
+ onReload: () => this.reloadPersistedPage(),
27071
+ onReset: () => this.resetPersistedPage(),
27072
+ });
27073
+ }
27020
27074
  onRuntimePageChange(next) {
27021
27075
  // Core load/reset emits an authoritative persisted document, not our edit-mode projection.
27022
27076
  const hydrating = this.runtimeAutoPersist()
@@ -30765,16 +30819,17 @@ class DynamicPageBuilderComponent {
30765
30819
  <div class="builder-governance-actions">
30766
30820
  @if (governancePersistence().status === 'error' && governancePersistence().operation === 'save' && governancePersistence().errorKind !== 'conflict') {
30767
30821
  <button type="button" class="builder-governance-btn" data-testid="retry-layout-btn"
30768
- (click)="saveCurrentPage()">
30822
+ (click)="retryPersistedPage()">
30769
30823
  {{ tx('governance.retry', 'Tentar salvar novamente') }}
30770
30824
  </button>
30771
30825
  }
30772
30826
  @if (governancePersistence().status === 'error') {
30773
30827
  <button type="button" class="builder-governance-btn" data-testid="reload-layout-btn"
30774
- (click)="reloadPersistedPage(currentPage())">
30828
+ (click)="reloadPersistedPage()">
30775
30829
  {{ tx('governance.reload', 'Descartar alterações e recarregar') }}
30776
30830
  </button>
30777
30831
  }
30832
+
30778
30833
  @if (isCustomizing() && isLayoutCustomized()) {
30779
30834
  <button type="button" class="builder-governance-btn builder-governance-btn--reset" data-testid="reset-layout-btn"
30780
30835
  (click)="resetPersistedPage()"
@@ -31414,16 +31469,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
31414
31469
  <div class="builder-governance-actions">
31415
31470
  @if (governancePersistence().status === 'error' && governancePersistence().operation === 'save' && governancePersistence().errorKind !== 'conflict') {
31416
31471
  <button type="button" class="builder-governance-btn" data-testid="retry-layout-btn"
31417
- (click)="saveCurrentPage()">
31472
+ (click)="retryPersistedPage()">
31418
31473
  {{ tx('governance.retry', 'Tentar salvar novamente') }}
31419
31474
  </button>
31420
31475
  }
31421
31476
  @if (governancePersistence().status === 'error') {
31422
31477
  <button type="button" class="builder-governance-btn" data-testid="reload-layout-btn"
31423
- (click)="reloadPersistedPage(currentPage())">
31478
+ (click)="reloadPersistedPage()">
31424
31479
  {{ tx('governance.reload', 'Descartar alterações e recarregar') }}
31425
31480
  </button>
31426
31481
  }
31482
+
31427
31483
  @if (isCustomizing() && isLayoutCustomized()) {
31428
31484
  <button type="button" class="builder-governance-btn builder-governance-btn--reset" data-testid="reset-layout-btn"
31429
31485
  (click)="resetPersistedPage()"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/page-builder",
3
- "version": "10.0.0-rc.17",
3
+ "version": "10.0.0-rc.18",
4
4
  "description": "Page and widget builder utilities for Praxis UI (grid, dynamic widgets, editors).",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -8,9 +8,9 @@
8
8
  "@angular/forms": "^21.0.0",
9
9
  "@angular/cdk": "^21.0.0",
10
10
  "@angular/material": "^21.0.0",
11
- "@praxisui/ai": "^10.0.0-rc.17",
12
- "@praxisui/core": "^10.0.0-rc.17",
13
- "@praxisui/settings-panel": "^10.0.0-rc.17",
11
+ "@praxisui/ai": "^10.0.0-rc.18",
12
+ "@praxisui/core": "^10.0.0-rc.18",
13
+ "@praxisui/settings-panel": "^10.0.0-rc.18",
14
14
  "rxjs": "~7.8.0"
15
15
  },
16
16
  "dependencies": {
@@ -2371,6 +2371,7 @@ declare class DynamicPageBuilderComponent implements OnChanges, OnDestroy {
2371
2371
  private readonly observabilityDashboard;
2372
2372
  private readonly runtimeObservationRegistry;
2373
2373
  private readonly agenticAuthoringOptions;
2374
+ private readonly customizationMode;
2374
2375
  runtime?: DynamicWidgetPageComponent;
2375
2376
  page?: WidgetPageDefinition | string;
2376
2377
  context?: Record<string, unknown> | null;
@@ -2507,10 +2508,11 @@ declare class DynamicPageBuilderComponent implements OnChanges, OnDestroy {
2507
2508
  /** Governed documents and agentic previews retain their explicit host/apply lifecycle. */
2508
2509
  runtimeAutoPersist(): boolean;
2509
2510
  /** Explicitly discard the local draft and reload the current identity's saved page. */
2510
- reloadPersistedPage(defaultPage: WidgetPageDefinition): void;
2511
+ reloadPersistedPage(defaultPage?: WidgetPageDefinition): void;
2511
2512
  /** Clear the current identity's saved document after storage acknowledgement. */
2512
2513
  resetPersistedPage(defaultPage?: WidgetPageDefinition): void;
2513
2514
  onRuntimePersistenceChange(state: WidgetPagePersistenceState): void;
2515
+ private syncShellPageGovernance;
2514
2516
  onRuntimePageChange(next: WidgetPageDefinition): void;
2515
2517
  onRuntimePageAuthoringChange(next: WidgetPageDefinition): void;
2516
2518
  onRuntimeWidgetEvent(event: WidgetEventEnvelope): void;