@praxisui/core 9.0.8 → 9.0.10

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, InjectionToken, Injectable, inject, Inject, Optional, makeEnvironmentProviders, APP_INITIALIZER, signal, computed, DestroyRef, ENVIRONMENT_INITIALIZER, ErrorHandler, Input, Directive, input, booleanAttribute, ChangeDetectionStrategy, EventEmitter, Output, SecurityContext, ViewContainerRef, SimpleChange, ContentChild, HostBinding, HostListener, ViewChildren, ViewChild, Injector, output, effect } from '@angular/core';
2
+ import { Component, InjectionToken, Injectable, inject, Inject, Optional, makeEnvironmentProviders, APP_INITIALIZER, signal, computed, DestroyRef, ENVIRONMENT_INITIALIZER, ErrorHandler, Input, Directive, input, booleanAttribute, ChangeDetectionStrategy, EventEmitter, Output, SecurityContext, ViewContainerRef, SimpleChange, ContentChild, HostBinding, Injector, HostListener, ViewChildren, ViewChild, output, effect } from '@angular/core';
3
3
  import * as i1 from '@angular/common/http';
4
4
  import { HttpHeaders, HttpClient, HttpParams, HttpResponse, HttpContextToken, HTTP_INTERCEPTORS, withInterceptors } from '@angular/common/http';
5
5
  import { of, defer, throwError, from, EMPTY, BehaviorSubject, firstValueFrom, Subject, finalize as finalize$1, shareReplay as shareReplay$1, map as map$1, switchMap as switchMap$1, catchError as catchError$1, forkJoin } from 'rxjs';
@@ -7954,6 +7954,8 @@ class SurfaceBindingRuntimeService {
7954
7954
  isDeferredTemplateExpressionKey(key, path = []) {
7955
7955
  if (key && (key === 'expr' || key.endsWith('Expr')))
7956
7956
  return true;
7957
+ if (this.isCompositionLinkTransformPath(path))
7958
+ return true;
7957
7959
  for (let index = 0; index < path.length - 1; index++) {
7958
7960
  if (path[index] === 'globalAction' && path[index + 1] === 'payload') {
7959
7961
  return true;
@@ -7961,6 +7963,15 @@ class SurfaceBindingRuntimeService {
7961
7963
  }
7962
7964
  return false;
7963
7965
  }
7966
+ isCompositionLinkTransformPath(path) {
7967
+ const compositionIndex = path.lastIndexOf('composition');
7968
+ if (compositionIndex < 0)
7969
+ return false;
7970
+ const linksIndex = path.indexOf('links', compositionIndex + 1);
7971
+ if (linksIndex < 0)
7972
+ return false;
7973
+ return path.indexOf('transform', linksIndex + 1) >= 0;
7974
+ }
7964
7975
  tryParseStructuredTemplate(value) {
7965
7976
  const trimmed = value.trim();
7966
7977
  if (!trimmed || (trimmed[0] !== '{' && trimmed[0] !== '[')) {
@@ -8620,18 +8631,22 @@ class GlobalActionService {
8620
8631
  const path = String(expression || '').trim();
8621
8632
  if (!path)
8622
8633
  return undefined;
8634
+ const { injector: _runtimeInjector, ...expressionRuntime } = context?.runtime || {};
8635
+ const expressionContext = context
8636
+ ? { ...context, runtime: expressionRuntime }
8637
+ : context;
8623
8638
  const root = {
8624
- context,
8639
+ context: expressionContext,
8625
8640
  payload: context?.payload,
8626
- runtime: context?.runtime,
8641
+ runtime: expressionRuntime,
8627
8642
  meta: context?.meta,
8628
8643
  pageContext: context?.pageContext,
8629
- row: context?.runtime?.row,
8630
- item: context?.runtime?.item,
8631
- selection: context?.runtime?.selection,
8632
- formData: context?.runtime?.formData,
8633
- value: context?.runtime?.value,
8634
- state: context?.runtime?.state,
8644
+ row: expressionRuntime.row,
8645
+ item: expressionRuntime.item,
8646
+ selection: expressionRuntime.selection,
8647
+ formData: expressionRuntime.formData,
8648
+ value: expressionRuntime.value,
8649
+ state: expressionRuntime.state,
8635
8650
  };
8636
8651
  const normalizedPath = path
8637
8652
  .replace(/^\$context\.?/, 'context.')
@@ -37377,6 +37392,7 @@ class DynamicWidgetPageComponent {
37377
37392
  compositionRuntime = new CompositionRuntimeFacade();
37378
37393
  compositionDefinition;
37379
37394
  globalActions = inject(GlobalActionService);
37395
+ injector = inject(Injector);
37380
37396
  storage = inject(ASYNC_CONFIG_STORAGE);
37381
37397
  componentKeys = inject(ComponentKeyService);
37382
37398
  componentMetadata = inject(ComponentMetadataRegistry, {
@@ -39000,9 +39016,12 @@ class DynamicWidgetPageComponent {
39000
39016
  if (focusOrigin
39001
39017
  && typeof focusOrigin.focus === 'function'
39002
39018
  && focusOrigin.isConnected) {
39003
- return { focusOrigin: focusOrigin };
39019
+ return {
39020
+ focusOrigin: focusOrigin,
39021
+ injector: this.injector,
39022
+ };
39004
39023
  }
39005
- return undefined;
39024
+ return { injector: this.injector };
39006
39025
  }
39007
39026
  resolveActionPayload(params, evt, fromKey) {
39008
39027
  if (!params)
@@ -41723,6 +41742,7 @@ const SURFACE_HOST_I18N_CONFIG = {
41723
41742
 
41724
41743
  class PraxisSurfaceHostComponent {
41725
41744
  globalActions = inject(GlobalActionService);
41745
+ injector = inject(Injector);
41726
41746
  i18n = inject(PraxisI18nService);
41727
41747
  title;
41728
41748
  subtitle;
@@ -41838,6 +41858,7 @@ class PraxisSurfaceHostComponent {
41838
41858
  richContentContext: widgetContext,
41839
41859
  },
41840
41860
  runtime: {
41861
+ injector: this.injector,
41841
41862
  widgetContext,
41842
41863
  state: this.context,
41843
41864
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/core",
3
- "version": "9.0.8",
3
+ "version": "9.0.10",
4
4
  "description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Type, Provider, DestroyRef, ErrorHandler, EnvironmentProviders, OnChanges, EventEmitter, SimpleChanges, OnInit, OnDestroy, ElementRef, AfterViewInit, Renderer2 } from '@angular/core';
2
+ import { Injector, InjectionToken, Type, Provider, DestroyRef, ErrorHandler, EnvironmentProviders, OnChanges, EventEmitter, SimpleChanges, OnInit, OnDestroy, ElementRef, AfterViewInit, Renderer2 } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable, BehaviorSubject } from 'rxjs';
5
5
  import { HttpHeaders, HttpContext, HttpClient, HttpParams, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpInterceptorFn, HttpFeature, HttpFeatureKind, HttpContextToken } from '@angular/common/http';
@@ -1020,6 +1020,13 @@ type GlobalActionContext = {
1020
1020
  * authored GlobalActionRef, a surface payload, telemetry, or persistence.
1021
1021
  */
1022
1022
  focusOrigin?: HTMLElement;
1023
+ /**
1024
+ * Ephemeral Angular injector owned by the action origin. Overlay bridges
1025
+ * use it to retain lazy-feature providers without promoting the complete
1026
+ * component runtime to the application injector. It must never be
1027
+ * persisted, serialized, logged, or authored as action metadata.
1028
+ */
1029
+ injector?: Injector;
1023
1030
  widgetContext?: any;
1024
1031
  pageState?: Record<string, any>;
1025
1032
  composition?: {
@@ -6336,6 +6343,7 @@ declare class SurfaceBindingRuntimeService {
6336
6343
  extractByPath(obj: any, path?: string): any;
6337
6344
  resolveTemplate(node: any, context: any, key?: string, path?: string[]): any;
6338
6345
  private isDeferredTemplateExpressionKey;
6346
+ private isCompositionLinkTransformPath;
6339
6347
  private tryParseStructuredTemplate;
6340
6348
  setValueAtPath<T extends object>(obj: T, rawPath: string, value: any): T;
6341
6349
  private buildContext;
@@ -16315,6 +16323,7 @@ declare class DynamicWidgetPageComponent implements OnChanges, OnDestroy {
16315
16323
  private readonly compositionRuntime;
16316
16324
  private compositionDefinition?;
16317
16325
  private readonly globalActions;
16326
+ private readonly injector;
16318
16327
  private readonly storage;
16319
16328
  private readonly componentKeys;
16320
16329
  private readonly componentMetadata;
@@ -16570,6 +16579,7 @@ declare function providePraxisDynamicPageMetadata(): Provider;
16570
16579
 
16571
16580
  declare class PraxisSurfaceHostComponent implements AfterViewInit, OnChanges {
16572
16581
  private readonly globalActions;
16582
+ private readonly injector;
16573
16583
  private readonly i18n;
16574
16584
  title?: string;
16575
16585
  subtitle?: string;