@mintplayer/ng-spark 0.0.4 → 0.0.6
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,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
2
|
+
import { 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';
|
|
@@ -54,6 +54,10 @@ interface PersistentObjectAttribute {
|
|
|
54
54
|
isValueChanged?: boolean;
|
|
55
55
|
rules: ValidationRule[];
|
|
56
56
|
group?: string;
|
|
57
|
+
/** Renderer component name for custom display in detail/list views */
|
|
58
|
+
renderer?: string;
|
|
59
|
+
/** Options passed to the renderer component */
|
|
60
|
+
rendererOptions?: Record<string, any>;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
interface PersistentObject {
|
|
@@ -95,6 +99,10 @@ interface EntityAttributeDefinition {
|
|
|
95
99
|
group?: string;
|
|
96
100
|
/** Number of grid columns this attribute spans within a tab's column layout */
|
|
97
101
|
columnSpan?: number;
|
|
102
|
+
/** Renderer component name for custom display in detail/list views */
|
|
103
|
+
renderer?: string;
|
|
104
|
+
/** Options passed to the renderer component */
|
|
105
|
+
rendererOptions?: Record<string, any>;
|
|
98
106
|
}
|
|
99
107
|
interface AttributeTab {
|
|
100
108
|
id: string;
|
|
@@ -130,6 +138,8 @@ interface EntityType {
|
|
|
130
138
|
tabs?: AttributeTab[];
|
|
131
139
|
groups?: AttributeGroup[];
|
|
132
140
|
attributes: EntityAttributeDefinition[];
|
|
141
|
+
/** Query aliases or IDs to display as related query tables on the detail page. */
|
|
142
|
+
queries?: string[];
|
|
133
143
|
}
|
|
134
144
|
|
|
135
145
|
interface ValidationError {
|
|
@@ -142,7 +152,7 @@ interface SparkQuery {
|
|
|
142
152
|
id: string;
|
|
143
153
|
name: string;
|
|
144
154
|
description?: TranslatedString;
|
|
145
|
-
|
|
155
|
+
source: string;
|
|
146
156
|
alias?: string;
|
|
147
157
|
sortBy?: string;
|
|
148
158
|
sortDirection: string;
|
|
@@ -150,6 +160,8 @@ interface SparkQuery {
|
|
|
150
160
|
indexName?: string;
|
|
151
161
|
/** When true, uses the projection type from [QueryType] attribute */
|
|
152
162
|
useProjection?: boolean;
|
|
163
|
+
/** Optional entity type name (e.g., "Person"). When set, used for entity type resolution. */
|
|
164
|
+
entityType?: string;
|
|
153
165
|
}
|
|
154
166
|
|
|
155
167
|
interface ProgramUnit {
|
|
@@ -247,7 +259,7 @@ declare class SparkService {
|
|
|
247
259
|
getQueries(): Promise<SparkQuery[]>;
|
|
248
260
|
getQuery(id: string): Promise<SparkQuery>;
|
|
249
261
|
getQueryByName(name: string): Promise<SparkQuery | undefined>;
|
|
250
|
-
executeQuery(queryId: string, sortBy?: string, sortDirection?: string): Promise<PersistentObject[]>;
|
|
262
|
+
executeQuery(queryId: string, sortBy?: string, sortDirection?: string, parentId?: string, parentType?: string): Promise<PersistentObject[]>;
|
|
251
263
|
executeQueryByName(queryName: string): Promise<PersistentObject[]>;
|
|
252
264
|
getProgramUnits(): Promise<ProgramUnitsConfiguration>;
|
|
253
265
|
list(type: string): Promise<PersistentObject[]>;
|
|
@@ -297,31 +309,15 @@ declare class RetryActionService {
|
|
|
297
309
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<RetryActionService>;
|
|
298
310
|
}
|
|
299
311
|
|
|
300
|
-
interface SparkFieldTemplateContext {
|
|
301
|
-
$implicit: EntityAttributeDefinition;
|
|
302
|
-
formData: Record<string, any>;
|
|
303
|
-
value: any;
|
|
304
|
-
hasError: boolean;
|
|
305
|
-
errorMessage: TranslatedString | null;
|
|
306
|
-
}
|
|
307
|
-
declare class SparkFieldTemplateDirective {
|
|
308
|
-
template: TemplateRef<SparkFieldTemplateContext>;
|
|
309
|
-
name: _angular_core.InputSignal<string>;
|
|
310
|
-
constructor(template: TemplateRef<SparkFieldTemplateContext>);
|
|
311
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkFieldTemplateDirective, never>;
|
|
312
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkFieldTemplateDirective, "[sparkFieldTemplate]", never, { "name": { "alias": "sparkFieldTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
312
|
declare class SparkPoFormComponent {
|
|
316
313
|
private readonly sparkService;
|
|
317
314
|
private readonly translations;
|
|
318
|
-
|
|
315
|
+
private readonly rendererRegistry;
|
|
319
316
|
entityType: _angular_core.InputSignal<EntityType>;
|
|
320
317
|
formData: _angular_core.ModelSignal<Record<string, any>>;
|
|
321
318
|
validationErrors: _angular_core.InputSignal<ValidationError[]>;
|
|
322
319
|
showButtons: _angular_core.InputSignal<boolean>;
|
|
323
320
|
isSaving: _angular_core.InputSignal<boolean>;
|
|
324
|
-
externalFieldTemplates: _angular_core.InputSignal<SparkFieldTemplateDirective[]>;
|
|
325
321
|
save: _angular_core.OutputEmitterRef<void>;
|
|
326
322
|
cancel: _angular_core.OutputEmitterRef<void>;
|
|
327
323
|
colors: typeof Color;
|
|
@@ -354,8 +350,6 @@ declare class SparkPoFormComponent {
|
|
|
354
350
|
attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[];
|
|
355
351
|
referenceVisibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
356
352
|
filteredLookupItems: _angular_core.Signal<LookupReferenceValue[]>;
|
|
357
|
-
getFieldTemplate(attr: EntityAttributeDefinition): TemplateRef<SparkFieldTemplateContext> | null;
|
|
358
|
-
getFieldTemplateContext(attr: EntityAttributeDefinition): SparkFieldTemplateContext;
|
|
359
353
|
constructor();
|
|
360
354
|
private toRecord;
|
|
361
355
|
loadReferenceOptions(): Promise<void>;
|
|
@@ -366,6 +360,8 @@ declare class SparkPoFormComponent {
|
|
|
366
360
|
openLookupSelector(attr: EntityAttributeDefinition): void;
|
|
367
361
|
selectLookupItem(item: LookupReferenceValue): void;
|
|
368
362
|
closeLookupModal(): void;
|
|
363
|
+
getEditRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
364
|
+
getEditRendererInputs(attr: EntityAttributeDefinition): Record<string, any>;
|
|
369
365
|
hasError(attrName: string): boolean;
|
|
370
366
|
onFieldChange(): void;
|
|
371
367
|
onSave(): void;
|
|
@@ -384,14 +380,13 @@ declare class SparkPoFormComponent {
|
|
|
384
380
|
selectReferenceItem(item: PersistentObject): void;
|
|
385
381
|
closeReferenceModal(): void;
|
|
386
382
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoFormComponent, never>;
|
|
387
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoFormComponent, "spark-po-form", never, { "entityType": { "alias": "entityType"; "required": false; "isSignal": true; }; "formData": { "alias": "formData"; "required": false; "isSignal": true; }; "validationErrors": { "alias": "validationErrors"; "required": false; "isSignal": true; }; "showButtons": { "alias": "showButtons"; "required": false; "isSignal": true; }; "isSaving": { "alias": "isSaving"; "required": false; "isSignal": true; };
|
|
383
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoFormComponent, "spark-po-form", never, { "entityType": { "alias": "entityType"; "required": false; "isSignal": true; }; "formData": { "alias": "formData"; "required": false; "isSignal": true; }; "validationErrors": { "alias": "validationErrors"; "required": false; "isSignal": true; }; "showButtons": { "alias": "showButtons"; "required": false; "isSignal": true; }; "isSaving": { "alias": "isSaving"; "required": false; "isSignal": true; }; }, { "formData": "formDataChange"; "save": "save"; "cancel": "cancel"; }, never, never, true, never>;
|
|
388
384
|
}
|
|
389
385
|
|
|
390
386
|
declare class SparkPoCreateComponent {
|
|
391
387
|
private readonly route;
|
|
392
388
|
private readonly router;
|
|
393
389
|
private readonly sparkService;
|
|
394
|
-
fieldTemplates: QueryList<SparkFieldTemplateDirective>;
|
|
395
390
|
saved: _angular_core.OutputEmitterRef<PersistentObject>;
|
|
396
391
|
cancelled: _angular_core.OutputEmitterRef<void>;
|
|
397
392
|
colors: typeof Color;
|
|
@@ -408,14 +403,13 @@ declare class SparkPoCreateComponent {
|
|
|
408
403
|
onSave(): Promise<void>;
|
|
409
404
|
onCancel(): void;
|
|
410
405
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoCreateComponent, never>;
|
|
411
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoCreateComponent, "spark-po-create", never, {}, { "saved": "saved"; "cancelled": "cancelled"; },
|
|
406
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoCreateComponent, "spark-po-create", never, {}, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
412
407
|
}
|
|
413
408
|
|
|
414
409
|
declare class SparkPoEditComponent {
|
|
415
410
|
private readonly route;
|
|
416
411
|
private readonly router;
|
|
417
412
|
private readonly sparkService;
|
|
418
|
-
fieldTemplates: QueryList<SparkFieldTemplateDirective>;
|
|
419
413
|
saved: _angular_core.OutputEmitterRef<PersistentObject>;
|
|
420
414
|
cancelled: _angular_core.OutputEmitterRef<void>;
|
|
421
415
|
colors: typeof Color;
|
|
@@ -434,20 +428,7 @@ declare class SparkPoEditComponent {
|
|
|
434
428
|
onSave(): Promise<void>;
|
|
435
429
|
onCancel(): void;
|
|
436
430
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoEditComponent, never>;
|
|
437
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoEditComponent, "spark-po-edit", never, {}, { "saved": "saved"; "cancelled": "cancelled"; },
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
interface SparkDetailFieldTemplateContext {
|
|
441
|
-
$implicit: EntityAttributeDefinition;
|
|
442
|
-
item: PersistentObject;
|
|
443
|
-
value: any;
|
|
444
|
-
}
|
|
445
|
-
declare class SparkDetailFieldTemplateDirective {
|
|
446
|
-
template: TemplateRef<SparkDetailFieldTemplateContext>;
|
|
447
|
-
name: _angular_core.InputSignal<string>;
|
|
448
|
-
constructor(template: TemplateRef<SparkDetailFieldTemplateContext>);
|
|
449
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkDetailFieldTemplateDirective, never>;
|
|
450
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkDetailFieldTemplateDirective, "[sparkDetailFieldTemplate]", never, { "name": { "alias": "sparkDetailFieldTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
431
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoEditComponent, "spark-po-edit", never, {}, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
451
432
|
}
|
|
452
433
|
|
|
453
434
|
declare class SparkPoDetailComponent {
|
|
@@ -455,7 +436,7 @@ declare class SparkPoDetailComponent {
|
|
|
455
436
|
private readonly router;
|
|
456
437
|
private readonly sparkService;
|
|
457
438
|
private readonly lang;
|
|
458
|
-
|
|
439
|
+
private readonly rendererRegistry;
|
|
459
440
|
showCustomActions: _angular_core.InputSignal<boolean>;
|
|
460
441
|
extraActionsTemplate: _angular_core.InputSignal<TemplateRef<void>>;
|
|
461
442
|
extraContentTemplate: _angular_core.InputSignal<TemplateRef<{
|
|
@@ -489,8 +470,8 @@ declare class SparkPoDetailComponent {
|
|
|
489
470
|
resolvedTabs: _angular_core.Signal<AttributeTab[]>;
|
|
490
471
|
groupsForTab(tab: AttributeTab): AttributeGroup[];
|
|
491
472
|
attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[];
|
|
492
|
-
|
|
493
|
-
|
|
473
|
+
getDetailRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
474
|
+
getDetailRendererInputs(attr: EntityAttributeDefinition, item: PersistentObject): Record<string, any>;
|
|
494
475
|
private loadLookupReferenceOptions;
|
|
495
476
|
private loadAsDetailTypes;
|
|
496
477
|
onCustomAction(action: CustomActionDefinition): Promise<void>;
|
|
@@ -498,27 +479,14 @@ declare class SparkPoDetailComponent {
|
|
|
498
479
|
onDelete(): Promise<void>;
|
|
499
480
|
onBack(): void;
|
|
500
481
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoDetailComponent, never>;
|
|
501
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoDetailComponent, "spark-po-detail", never, { "showCustomActions": { "alias": "showCustomActions"; "required": false; "isSignal": true; }; "extraActionsTemplate": { "alias": "extraActionsTemplate"; "required": false; "isSignal": true; }; "extraContentTemplate": { "alias": "extraContentTemplate"; "required": false; "isSignal": true; }; }, { "edited": "edited"; "deleted": "deleted"; "customActionExecuted": "customActionExecuted"; },
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
interface SparkColumnTemplateContext {
|
|
505
|
-
$implicit: PersistentObject;
|
|
506
|
-
attr: EntityAttributeDefinition;
|
|
507
|
-
value: any;
|
|
508
|
-
}
|
|
509
|
-
declare class SparkColumnTemplateDirective {
|
|
510
|
-
template: TemplateRef<SparkColumnTemplateContext>;
|
|
511
|
-
name: _angular_core.InputSignal<string>;
|
|
512
|
-
constructor(template: TemplateRef<SparkColumnTemplateContext>);
|
|
513
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkColumnTemplateDirective, never>;
|
|
514
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SparkColumnTemplateDirective, "[sparkColumnTemplate]", never, { "name": { "alias": "sparkColumnTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
482
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoDetailComponent, "spark-po-detail", never, { "showCustomActions": { "alias": "showCustomActions"; "required": false; "isSignal": true; }; "extraActionsTemplate": { "alias": "extraActionsTemplate"; "required": false; "isSignal": true; }; "extraContentTemplate": { "alias": "extraContentTemplate"; "required": false; "isSignal": true; }; }, { "edited": "edited"; "deleted": "deleted"; "customActionExecuted": "customActionExecuted"; }, never, never, true, never>;
|
|
515
483
|
}
|
|
516
484
|
|
|
517
485
|
declare class SparkQueryListComponent {
|
|
518
486
|
private readonly route;
|
|
519
487
|
private readonly router;
|
|
520
488
|
private readonly sparkService;
|
|
521
|
-
|
|
489
|
+
private readonly rendererRegistry;
|
|
522
490
|
extraActionsTemplate: _angular_core.InputSignal<TemplateRef<void>>;
|
|
523
491
|
rowClicked: _angular_core.OutputEmitterRef<PersistentObject>;
|
|
524
492
|
createClicked: _angular_core.OutputEmitterRef<void>;
|
|
@@ -538,6 +506,7 @@ declare class SparkQueryListComponent {
|
|
|
538
506
|
constructor();
|
|
539
507
|
private onParamsChange;
|
|
540
508
|
private resolveEntityTypeForQuery;
|
|
509
|
+
private extractSourceName;
|
|
541
510
|
private singularize;
|
|
542
511
|
loadItems(): Promise<void>;
|
|
543
512
|
onSettingsChange(): void;
|
|
@@ -545,13 +514,37 @@ declare class SparkQueryListComponent {
|
|
|
545
514
|
applyFilter(): void;
|
|
546
515
|
clearSearch(): void;
|
|
547
516
|
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
548
|
-
|
|
549
|
-
|
|
517
|
+
getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
518
|
+
getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
|
|
550
519
|
private loadLookupReferenceOptions;
|
|
551
520
|
onRowClick(item: PersistentObject): void;
|
|
552
521
|
onCreate(): void;
|
|
553
522
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkQueryListComponent, never>;
|
|
554
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkQueryListComponent, "spark-query-list", never, { "extraActionsTemplate": { "alias": "extraActionsTemplate"; "required": false; "isSignal": true; }; }, { "rowClicked": "rowClicked"; "createClicked": "createClicked"; },
|
|
523
|
+
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>;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
declare class SparkSubQueryComponent {
|
|
527
|
+
private readonly router;
|
|
528
|
+
private readonly sparkService;
|
|
529
|
+
private readonly rendererRegistry;
|
|
530
|
+
queryId: _angular_core.InputSignal<string>;
|
|
531
|
+
parentId: _angular_core.InputSignal<string>;
|
|
532
|
+
parentType: _angular_core.InputSignal<string>;
|
|
533
|
+
query: _angular_core.WritableSignal<SparkQuery>;
|
|
534
|
+
entityType: _angular_core.WritableSignal<EntityType>;
|
|
535
|
+
allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
|
|
536
|
+
items: _angular_core.WritableSignal<PersistentObject[]>;
|
|
537
|
+
lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
|
|
538
|
+
loading: _angular_core.WritableSignal<boolean>;
|
|
539
|
+
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
540
|
+
constructor();
|
|
541
|
+
private loadData;
|
|
542
|
+
private loadLookupReferenceOptions;
|
|
543
|
+
getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
544
|
+
getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
|
|
545
|
+
onRowClick(item: PersistentObject): void;
|
|
546
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkSubQueryComponent, never>;
|
|
547
|
+
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>;
|
|
555
548
|
}
|
|
556
549
|
|
|
557
550
|
declare class SparkRetryActionModalComponent {
|
|
@@ -721,6 +714,69 @@ declare class ArrayValuePipe implements PipeTransform {
|
|
|
721
714
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<ArrayValuePipe, "arrayValue", true>;
|
|
722
715
|
}
|
|
723
716
|
|
|
717
|
+
/**
|
|
718
|
+
* Contract for detail-page renderers (spark-po-detail).
|
|
719
|
+
* Displays a single attribute value in the PO detail view.
|
|
720
|
+
*/
|
|
721
|
+
interface SparkAttributeDetailRenderer {
|
|
722
|
+
/** The current attribute value */
|
|
723
|
+
value: InputSignal<any>;
|
|
724
|
+
/** The attribute definition metadata */
|
|
725
|
+
attribute: InputSignal<EntityAttributeDefinition | undefined>;
|
|
726
|
+
/** Renderer-specific options from rendererOptions */
|
|
727
|
+
options: InputSignal<Record<string, any> | undefined>;
|
|
728
|
+
/** The full form data (for cross-field dependencies) */
|
|
729
|
+
formData: InputSignal<Record<string, any>>;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Contract for query-list column renderers (spark-query-list).
|
|
733
|
+
* Displays a compact cell value in the list/grid view.
|
|
734
|
+
*/
|
|
735
|
+
interface SparkAttributeColumnRenderer {
|
|
736
|
+
/** The current attribute value */
|
|
737
|
+
value: InputSignal<any>;
|
|
738
|
+
/** The attribute definition metadata */
|
|
739
|
+
attribute: InputSignal<EntityAttributeDefinition | undefined>;
|
|
740
|
+
/** Renderer-specific options from rendererOptions */
|
|
741
|
+
options: InputSignal<Record<string, any> | undefined>;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Contract for edit-form renderers (spark-po-form on create/edit pages).
|
|
745
|
+
* Replaces the default <input> for this attribute.
|
|
746
|
+
*/
|
|
747
|
+
interface SparkAttributeEditRenderer {
|
|
748
|
+
/** The current attribute value */
|
|
749
|
+
value: InputSignal<any>;
|
|
750
|
+
/** The attribute definition metadata */
|
|
751
|
+
attribute: InputSignal<EntityAttributeDefinition | undefined>;
|
|
752
|
+
/** Renderer-specific options from rendererOptions */
|
|
753
|
+
options: InputSignal<Record<string, any> | undefined>;
|
|
754
|
+
/** Callback to notify parent form of value changes (since NgComponentOutlet doesn't support outputs) */
|
|
755
|
+
valueChange: InputSignal<(value: any) => void>;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
interface SparkAttributeRendererRegistration {
|
|
759
|
+
/** The renderer name (must match attr.renderer in model JSON) */
|
|
760
|
+
name: string;
|
|
761
|
+
/** Component for the PO detail page. Must implement SparkAttributeDetailRenderer. */
|
|
762
|
+
detailComponent: Type<any>;
|
|
763
|
+
/** Component for query-list column cells. Must implement SparkAttributeColumnRenderer. */
|
|
764
|
+
columnComponent: Type<any>;
|
|
765
|
+
/** Optional component for create/edit forms. Must implement SparkAttributeEditRenderer. When omitted, the default input is used. */
|
|
766
|
+
editComponent?: Type<any>;
|
|
767
|
+
}
|
|
768
|
+
declare const SPARK_ATTRIBUTE_RENDERERS: InjectionToken<SparkAttributeRendererRegistration[]>;
|
|
769
|
+
/**
|
|
770
|
+
* Register custom attribute renderers globally.
|
|
771
|
+
*
|
|
772
|
+
* @example
|
|
773
|
+
* provideSparkAttributeRenderers([
|
|
774
|
+
* { name: 'video-player', detailComponent: VideoDetailComponent, columnComponent: VideoColumnComponent },
|
|
775
|
+
* { name: 'color-swatch', detailComponent: ColorDetailComponent, columnComponent: ColorColumnComponent },
|
|
776
|
+
* ])
|
|
777
|
+
*/
|
|
778
|
+
declare function provideSparkAttributeRenderers(renderers: SparkAttributeRendererRegistration[]): Provider;
|
|
779
|
+
|
|
724
780
|
interface SparkRouteConfig {
|
|
725
781
|
queryList?: Route['loadComponent'];
|
|
726
782
|
poCreate?: Route['loadComponent'];
|
|
@@ -731,5 +787,5 @@ declare function sparkRoutes(config?: SparkRouteConfig): Routes;
|
|
|
731
787
|
|
|
732
788
|
declare function provideSpark(config?: Partial<SparkConfig>): Provider[];
|
|
733
789
|
|
|
734
|
-
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_CONFIG, ShowedOn,
|
|
735
|
-
export type { AttributeGroup, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, LookupReferenceListItem, LookupReferenceValue, PersistentObject, PersistentObjectAttribute, ProgramUnit, ProgramUnitGroup, ProgramUnitsConfiguration, RetryActionPayload, RetryActionResult,
|
|
790
|
+
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, defaultSparkConfig, hasShowedOnFlag, provideSpark, provideSparkAttributeRenderers, resolveTranslation, sparkRoutes };
|
|
791
|
+
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 };
|