@maro-tech/card 0.1.14 → 0.1.16
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
|
@@ -23,6 +23,8 @@ interface UiEntityCardAction {
|
|
|
23
23
|
label: string;
|
|
24
24
|
type: string;
|
|
25
25
|
icon?: string;
|
|
26
|
+
iconOnly?: boolean;
|
|
27
|
+
ariaLabel?: string;
|
|
26
28
|
hidden?: boolean;
|
|
27
29
|
html?: string;
|
|
28
30
|
component?: string;
|
|
@@ -379,13 +381,41 @@ interface AuditFieldChange {
|
|
|
379
381
|
value: unknown;
|
|
380
382
|
display: string;
|
|
381
383
|
url?: string;
|
|
384
|
+
structured?: StructuredItem[];
|
|
382
385
|
};
|
|
383
386
|
to: {
|
|
384
387
|
value: unknown;
|
|
385
388
|
display: string;
|
|
386
389
|
url?: string;
|
|
390
|
+
structured?: StructuredItem[];
|
|
387
391
|
};
|
|
388
392
|
}
|
|
393
|
+
interface StructuredField {
|
|
394
|
+
key: string;
|
|
395
|
+
label: string;
|
|
396
|
+
value: unknown;
|
|
397
|
+
display: string;
|
|
398
|
+
}
|
|
399
|
+
interface StructuredItem {
|
|
400
|
+
key: string;
|
|
401
|
+
fields: StructuredField[];
|
|
402
|
+
}
|
|
403
|
+
interface HistoryFieldConfig {
|
|
404
|
+
label?: string;
|
|
405
|
+
type?: string;
|
|
406
|
+
data?: string;
|
|
407
|
+
link?: string;
|
|
408
|
+
displayMode?: 'text' | 'structured';
|
|
409
|
+
itemFields?: Record<string, {
|
|
410
|
+
label?: string;
|
|
411
|
+
data?: string;
|
|
412
|
+
}>;
|
|
413
|
+
}
|
|
414
|
+
interface HistoryConfig {
|
|
415
|
+
primaryEntity?: string;
|
|
416
|
+
entities?: Record<string, string>;
|
|
417
|
+
fields?: Record<string, HistoryFieldConfig>;
|
|
418
|
+
}
|
|
389
419
|
interface AuditChange {
|
|
390
420
|
action: string;
|
|
391
421
|
entityId: string;
|
|
@@ -402,9 +432,8 @@ interface AuditOperation {
|
|
|
402
432
|
}
|
|
403
433
|
declare class HistoryTabComponent {
|
|
404
434
|
readonly entity: _angular_core.InputSignal<string>;
|
|
405
|
-
readonly primaryEntity: _angular_core.InputSignal<string>;
|
|
406
435
|
readonly id: _angular_core.InputSignal<string>;
|
|
407
|
-
readonly
|
|
436
|
+
readonly config: _angular_core.InputSignal<HistoryConfig>;
|
|
408
437
|
readonly operations: _angular_core.WritableSignal<AuditOperation[]>;
|
|
409
438
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
410
439
|
readonly hasError: _angular_core.WritableSignal<boolean>;
|
|
@@ -418,13 +447,25 @@ declare class HistoryTabComponent {
|
|
|
418
447
|
private readonly destroyRef;
|
|
419
448
|
private readonly refreshSequence;
|
|
420
449
|
private lastRequestKey;
|
|
450
|
+
private readonly dictionaryCache;
|
|
421
451
|
constructor();
|
|
422
452
|
private readonly loadEffect;
|
|
453
|
+
private prepareOperations;
|
|
454
|
+
private extractRawFields;
|
|
455
|
+
private getFieldConfig;
|
|
456
|
+
private toDisplayValue;
|
|
457
|
+
private resolveDisplay;
|
|
458
|
+
private resolveDictionary;
|
|
459
|
+
private toStructuredItems;
|
|
423
460
|
toggleOperation(id: string): void;
|
|
424
461
|
isExpanded(id: string): boolean;
|
|
425
462
|
getEntityLabel(entityType: string): string;
|
|
426
463
|
getActionLabel(action: string): string;
|
|
427
464
|
isImageField(field: AuditFieldChange): boolean;
|
|
465
|
+
isStructuredField(field: AuditFieldChange): boolean;
|
|
466
|
+
getStructuredItems(value: {
|
|
467
|
+
structured?: StructuredItem[];
|
|
468
|
+
}): StructuredItem[];
|
|
428
469
|
isHtmlField(field: AuditFieldChange): boolean;
|
|
429
470
|
isFileField(field: AuditFieldChange): boolean;
|
|
430
471
|
getImageUrls(value: unknown): string[];
|
|
@@ -434,7 +475,7 @@ declare class HistoryTabComponent {
|
|
|
434
475
|
getPrimaryChanges(operation: AuditOperation): AuditChange[];
|
|
435
476
|
getRelatedChanges(operation: AuditOperation): AuditChange[];
|
|
436
477
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HistoryTabComponent, never>;
|
|
437
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HistoryTabComponent, "app-history-tab", never, { "entity": { "alias": "entity"; "required": false; "isSignal": true; }; "
|
|
478
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HistoryTabComponent, "app-history-tab", never, { "entity": { "alias": "entity"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
438
479
|
}
|
|
439
480
|
|
|
440
481
|
declare class TableComponent implements OnChanges {
|
|
@@ -491,4 +532,4 @@ declare class TableComponent implements OnChanges {
|
|
|
491
532
|
}
|
|
492
533
|
|
|
493
534
|
export { CARD_ACTION_COMPLETED, CARD_ACTION_FINISHED, CARD_ACTION_REQUESTED, CARD_ACTION_STARTED, CardComponent, CardCurrentUserService, CardDictionaryService, CardImageService, CardSectionHeaderComponent, DocumentsComponent, ENTITY_UPDATED, HistoryTabComponent, ImagesViewerComponent, TableComponent, UI_CARD_API_BASE_URL, UI_CARD_TAB_REGISTRY, UI_ENTITY_CARD_HOST, UiEntityDocumentsService, cardApiParams, cardApiResourceUrl, normalizeCardConfig, resolveCardConfig };
|
|
494
|
-
export type { ApiPluginConfig, ApiPluginMethod, CardAction, CardActionContext, CardActionLifecycleEvent, CardActionRequestedEvent, CardConfig, CardData, CardDictionarySuggestItem, CardField, CardPanelInput, CardSection, CardTab, EntityUpdatedEvent, UiCardLayout, UiCardLayoutInput, UiCardTabComponent, UiCardTabConfig, UiCardTabField, UiCardTabRegistration, UiEntityCardAction, UiEntityCardHost, UiEntityCardResponse, UiEntityCardTab, UiEntityDocumentFile, UiEntityDocumentRecognitionStatus };
|
|
535
|
+
export type { ApiPluginConfig, ApiPluginMethod, CardAction, CardActionContext, CardActionLifecycleEvent, CardActionRequestedEvent, CardConfig, CardData, CardDictionarySuggestItem, CardField, CardPanelInput, CardSection, CardTab, EntityUpdatedEvent, HistoryConfig, HistoryFieldConfig, UiCardLayout, UiCardLayoutInput, UiCardTabComponent, UiCardTabConfig, UiCardTabField, UiCardTabRegistration, UiEntityCardAction, UiEntityCardHost, UiEntityCardResponse, UiEntityCardTab, UiEntityDocumentFile, UiEntityDocumentRecognitionStatus };
|