@praxisui/list 3.0.0-beta.6 → 3.0.0-beta.7

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/index.d.ts CHANGED
@@ -4,9 +4,9 @@ import * as i0 from '@angular/core';
4
4
  import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, ChangeDetectorRef, DoCheck, Provider } from '@angular/core';
5
5
  import { MatSelectionListChange } from '@angular/material/list';
6
6
  import { FormGroup, FormControl } from '@angular/forms';
7
+ import { LocalizationConfig, GlobalActionCatalogEntry, SurfaceOpenPayload, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
7
8
  import { BaseAiAdapter, Capability as Capability$1, PatchResult } from '@praxisui/ai';
8
9
  import { SettingsValueProvider } from '@praxisui/settings-panel';
9
- import { GlobalActionCatalogEntry, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
10
10
 
11
11
  type TemplateType = 'text' | 'icon' | 'image' | 'chip' | 'rating' | 'currency' | 'date' | 'html' | 'slot' | 'metric' | 'compose' | 'component';
12
12
  interface TemplateDef {
@@ -287,7 +287,7 @@ interface PraxisListConfig {
287
287
  type?: 'danger' | 'warning' | 'info';
288
288
  };
289
289
  }>;
290
- i18n?: Record<string, string>;
290
+ i18n?: PraxisListI18nConfig;
291
291
  ui?: {
292
292
  showSearch?: boolean;
293
293
  searchField?: string;
@@ -328,6 +328,11 @@ interface ListSelectionEvent {
328
328
  items: any[];
329
329
  ids?: any[];
330
330
  }
331
+ interface PraxisListI18nConfig {
332
+ locale?: string;
333
+ currency?: string;
334
+ localization?: LocalizationConfig;
335
+ }
331
336
 
332
337
  interface ListSection<T = any> {
333
338
  key: string | undefined;
@@ -401,6 +406,7 @@ interface ListRowLayoutColumnViewModel {
401
406
  declare class PraxisList implements OnInit, OnChanges, OnDestroy {
402
407
  private static nextSkinScopeId;
403
408
  private customizationEnabled;
409
+ private readonly hostLocale;
404
410
  config: PraxisListConfig;
405
411
  listId: string;
406
412
  componentInstanceId?: string;
@@ -623,6 +629,7 @@ declare class PraxisList implements OnInit, OnChanges, OnDestroy {
623
629
  private splitPipe;
624
630
  private splitPipeName;
625
631
  private evalString;
632
+ private templateEvaluatorOptions;
626
633
  private parseTwoParams;
627
634
  private toBoolean;
628
635
  private prettyLabel;
@@ -1170,6 +1177,7 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
1170
1177
  queryJson: string;
1171
1178
  queryError: string;
1172
1179
  private crud;
1180
+ private readonly i18n;
1173
1181
  private resourcePathChanges;
1174
1182
  constructor(injected?: any);
1175
1183
  private ip;
@@ -1268,6 +1276,14 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
1268
1276
  applyGlobalPayloadExample(action: any): void;
1269
1277
  globalPayloadExampleHint(action: any): string;
1270
1278
  globalPayloadSchemaTooltip(action: any): string;
1279
+ isSurfaceOpenCommand(action: {
1280
+ command?: string;
1281
+ }): boolean;
1282
+ getSurfaceOpenGlobalPayload(action: {
1283
+ command?: string;
1284
+ globalPayload?: string;
1285
+ }): SurfaceOpenPayload;
1286
+ onSurfaceOpenGlobalPayloadChange(action: any, payload: SurfaceOpenPayload): void;
1271
1287
  onGlobalActionSelected(id?: string): void;
1272
1288
  private addGlobalActionFromCatalog;
1273
1289
  metaTypeConfig(type?: string): {
@@ -1324,6 +1340,10 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
1324
1340
  private getMappingSnapshot;
1325
1341
  private updateMappingDirty;
1326
1342
  private resolveGlobalActionCatalog;
1343
+ private getGlobalActionEntryLabel;
1344
+ private getGlobalActionEntryDescription;
1345
+ private getGlobalActionSchema;
1346
+ private normalizeSurfaceOpenPayload;
1327
1347
  verify(): void;
1328
1348
  inferFromFields(): void;
1329
1349
  generateFeaturesFromMetaComposition(): void;
@@ -1371,17 +1391,21 @@ declare class ListSkinService {
1371
1391
  static ɵprov: i0.ɵɵInjectableDeclaration<ListSkinService>;
1372
1392
  }
1373
1393
 
1394
+ interface TemplateEvaluatorOptions {
1395
+ i18n?: PraxisListI18nConfig | null;
1396
+ appLocale?: string | null;
1397
+ }
1374
1398
  /**
1375
1399
  * Very small template evaluator that supports `${item.foo}` expressions.
1376
1400
  * For security, only string concatenation is supported; no arbitrary code.
1377
1401
  */
1378
- declare function evalExpr(expr: string, ctx: any): string;
1402
+ declare function evalExpr(expr: string, ctx: any, options?: TemplateEvaluatorOptions): string;
1379
1403
  /**
1380
1404
  * Evaluate a template definition with basic pipe support.
1381
1405
  * Supported pipes:
1382
1406
  * - bool:TrueLabel:FalseLabel (maps truthy/falsey values to provided labels)
1383
1407
  */
1384
- declare function evaluateTemplate(def: TemplateDef | undefined, item: any): {
1408
+ declare function evaluateTemplate(def: TemplateDef | undefined, item: any, options?: TemplateEvaluatorOptions): {
1385
1409
  type: string;
1386
1410
  value: string;
1387
1411
  class?: string;
@@ -1705,7 +1729,7 @@ declare class PraxisListDocPageComponent {
1705
1729
  type?: "danger" | "warning" | "info";
1706
1730
  };
1707
1731
  }>;
1708
- i18n?: Record<string, string>;
1732
+ i18n?: PraxisListI18nConfig;
1709
1733
  ui?: {
1710
1734
  showSearch?: boolean;
1711
1735
  searchField?: string;
@@ -1777,4 +1801,4 @@ declare const PRAXIS_LIST_PT_BR: {
1777
1801
  };
1778
1802
 
1779
1803
  export { ExecutiveAlertsComponent, ExecutiveBadgeComponent, ExecutiveOwnerComponent, LIST_AI_CAPABILITIES, ListDataService, ListSkinService, PRAXIS_LIST_COMPONENT_METADATA, PRAXIS_LIST_EN_US, PRAXIS_LIST_I18N_NAMESPACE, PRAXIS_LIST_PT_BR, PraxisList, PraxisListConfigEditor, PraxisListDocPageComponent, PraxisListJsonConfigEditorComponent, adaptSelection, buildListApplyPlan, createListAuthoringDocument, evalExpr, evaluateTemplate, inferListAuthoringDocument, inferTemplatingFromSchema, normalizeListActionPayloads, normalizeListAuthoringDocument, normalizeListConfig, parseLegacyOrListDocument, projectListAuthoringDocument, providePraxisListI18n, providePraxisListMetadata, serializeListAuthoringDocument, toCanonicalListConfig, validateListAuthoringDocument };
1780
- export type { Capability, CapabilityCatalog, CapabilityCategory, EditorDiagnostic, EditorDocument, ExecutiveAlert, JsonEditorEvent, JsonValidationResult, ListActionEvent, ListApplyPlan, ListAuthoringDocument, ListExpansionSectionDef, ListExpansionSectionType, ListFeatureDef, ListItemEvent, ListProjectionContext, ListRowLayoutSlot, ListRuntimeContext, ListSchemaInferencePlan, ListSection, ListSelectionEvent, ListTemplatingSlot, ListValidationContext, PraxisListConfig, TemplateDef, TemplateFeatureDef, TemplateType, TemplatingFeatureDef, ValueKind };
1804
+ export type { Capability, CapabilityCatalog, CapabilityCategory, EditorDiagnostic, EditorDocument, ExecutiveAlert, JsonEditorEvent, JsonValidationResult, ListActionEvent, ListApplyPlan, ListAuthoringDocument, ListExpansionSectionDef, ListExpansionSectionType, ListFeatureDef, ListItemEvent, ListProjectionContext, ListRowLayoutSlot, ListRuntimeContext, ListSchemaInferencePlan, ListSection, ListSelectionEvent, ListTemplatingSlot, ListValidationContext, PraxisListConfig, PraxisListI18nConfig, TemplateDef, TemplateEvaluatorOptions, TemplateFeatureDef, TemplateType, TemplatingFeatureDef, ValueKind };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@praxisui/list",
3
- "version": "3.0.0-beta.6",
3
+ "version": "3.0.0-beta.7",
4
4
  "description": "List components and helpers for Praxis UI.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=16 <21",
7
7
  "@angular/core": ">=16 <21",
8
8
  "@angular/material": ">=16 <21",
9
- "@praxisui/dynamic-fields": "^3.0.0-beta.6",
9
+ "@praxisui/dynamic-fields": "^3.0.0-beta.7",
10
10
  "rxjs": ">=7 <9"
11
11
  },
12
12
  "dependencies": {