@mintplayer/ng-spark 0.0.5 → 0.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-spark",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "description": "Angular component library for MintPlayer.Spark CRUD applications",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken, Type, TemplateRef, PipeTransform, InputSignal, Provider } from '@angular/core';
2
+ import { WritableSignal, InjectionToken, Type, TemplateRef, PipeTransform, InputSignal, Provider } from '@angular/core';
3
3
  import { Color } from '@mintplayer/ng-bootstrap';
4
4
  import { DatatableSettings } from '@mintplayer/ng-bootstrap/datatable';
5
5
  import { PaginationResponse } from '@mintplayer/pagination';
@@ -22,6 +22,8 @@ declare enum ShowedOn {
22
22
  declare function hasShowedOnFlag(value: ShowedOn | string | undefined, flag: ShowedOn): boolean;
23
23
 
24
24
  type TranslatedString = Record<string, string>;
25
+ /** Global reactive language state — shared across library boundaries via globalThis */
26
+ declare const currentLanguage: WritableSignal<string>;
25
27
  declare function resolveTranslation(ts: TranslatedString | undefined, lang?: string): string;
26
28
 
27
29
  interface ValidationRule {
@@ -138,6 +140,8 @@ interface EntityType {
138
140
  tabs?: AttributeTab[];
139
141
  groups?: AttributeGroup[];
140
142
  attributes: EntityAttributeDefinition[];
143
+ /** Query aliases or IDs to display as related query tables on the detail page. */
144
+ queries?: string[];
141
145
  }
142
146
 
143
147
  interface ValidationError {
@@ -150,7 +154,7 @@ interface SparkQuery {
150
154
  id: string;
151
155
  name: string;
152
156
  description?: TranslatedString;
153
- contextProperty: string;
157
+ source: string;
154
158
  alias?: string;
155
159
  sortBy?: string;
156
160
  sortDirection: string;
@@ -158,6 +162,8 @@ interface SparkQuery {
158
162
  indexName?: string;
159
163
  /** When true, uses the projection type from [QueryType] attribute */
160
164
  useProjection?: boolean;
165
+ /** Optional entity type name (e.g., "Person"). When set, used for entity type resolution. */
166
+ entityType?: string;
161
167
  }
162
168
 
163
169
  interface ProgramUnit {
@@ -255,7 +261,7 @@ declare class SparkService {
255
261
  getQueries(): Promise<SparkQuery[]>;
256
262
  getQuery(id: string): Promise<SparkQuery>;
257
263
  getQueryByName(name: string): Promise<SparkQuery | undefined>;
258
- executeQuery(queryId: string, sortBy?: string, sortDirection?: string): Promise<PersistentObject[]>;
264
+ executeQuery(queryId: string, sortBy?: string, sortDirection?: string, parentId?: string, parentType?: string): Promise<PersistentObject[]>;
259
265
  executeQueryByName(queryName: string): Promise<PersistentObject[]>;
260
266
  getProgramUnits(): Promise<ProgramUnitsConfiguration>;
261
267
  list(type: string): Promise<PersistentObject[]>;
@@ -502,6 +508,7 @@ declare class SparkQueryListComponent {
502
508
  constructor();
503
509
  private onParamsChange;
504
510
  private resolveEntityTypeForQuery;
511
+ private extractSourceName;
505
512
  private singularize;
506
513
  loadItems(): Promise<void>;
507
514
  onSettingsChange(): void;
@@ -518,6 +525,30 @@ declare class SparkQueryListComponent {
518
525
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkQueryListComponent, "spark-query-list", never, { "extraActionsTemplate": { "alias": "extraActionsTemplate"; "required": false; "isSignal": true; }; }, { "rowClicked": "rowClicked"; "createClicked": "createClicked"; }, never, never, true, never>;
519
526
  }
520
527
 
528
+ declare class SparkSubQueryComponent {
529
+ private readonly router;
530
+ private readonly sparkService;
531
+ private readonly rendererRegistry;
532
+ queryId: _angular_core.InputSignal<string>;
533
+ parentId: _angular_core.InputSignal<string>;
534
+ parentType: _angular_core.InputSignal<string>;
535
+ query: _angular_core.WritableSignal<SparkQuery>;
536
+ entityType: _angular_core.WritableSignal<EntityType>;
537
+ allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
538
+ items: _angular_core.WritableSignal<PersistentObject[]>;
539
+ lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
540
+ loading: _angular_core.WritableSignal<boolean>;
541
+ visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
542
+ constructor();
543
+ private loadData;
544
+ private loadLookupReferenceOptions;
545
+ getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
546
+ getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
547
+ onRowClick(item: PersistentObject): void;
548
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkSubQueryComponent, never>;
549
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkSubQueryComponent, "spark-sub-query", never, { "queryId": { "alias": "queryId"; "required": true; "isSignal": true; }; "parentId": { "alias": "parentId"; "required": true; "isSignal": true; }; "parentType": { "alias": "parentType"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
550
+ }
551
+
521
552
  declare class SparkRetryActionModalComponent {
522
553
  protected readonly retryActionService: RetryActionService;
523
554
  colors: typeof Color;
@@ -758,5 +789,5 @@ declare function sparkRoutes(config?: SparkRouteConfig): Routes;
758
789
 
759
790
  declare function provideSpark(config?: Partial<SparkConfig>): Provider[];
760
791
 
761
- export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, ELookupDisplayType, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RetryActionService, RouterLinkPipe, SPARK_ATTRIBUTE_RENDERERS, SPARK_CONFIG, ShowedOn, SparkIconComponent, SparkIconRegistry, SparkLanguageService, SparkPoCreateComponent, SparkPoDetailComponent, SparkPoEditComponent, SparkPoFormComponent, SparkQueryListComponent, SparkRetryActionModalComponent, SparkService, TranslateKeyPipe, defaultSparkConfig, hasShowedOnFlag, provideSpark, provideSparkAttributeRenderers, resolveTranslation, sparkRoutes };
792
+ export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, ELookupDisplayType, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RetryActionService, RouterLinkPipe, SPARK_ATTRIBUTE_RENDERERS, SPARK_CONFIG, ShowedOn, SparkIconComponent, SparkIconRegistry, SparkLanguageService, SparkPoCreateComponent, SparkPoDetailComponent, SparkPoEditComponent, SparkPoFormComponent, SparkQueryListComponent, SparkRetryActionModalComponent, SparkService, SparkSubQueryComponent, TranslateKeyPipe, currentLanguage, defaultSparkConfig, hasShowedOnFlag, provideSpark, provideSparkAttributeRenderers, resolveTranslation, sparkRoutes };
762
793
  export type { AttributeGroup, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, LookupReferenceListItem, LookupReferenceValue, PersistentObject, PersistentObjectAttribute, ProgramUnit, ProgramUnitGroup, ProgramUnitsConfiguration, RetryActionPayload, RetryActionResult, SparkAttributeColumnRenderer, SparkAttributeDetailRenderer, SparkAttributeEditRenderer, SparkAttributeRendererRegistration, SparkConfig, SparkQuery, SparkRouteConfig, TranslatedString, ValidationError, ValidationRule };