@memberjunction/ng-explorer-core 5.38.0 → 5.40.0
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/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +13 -13
- package/dist/app-routing.module.js.map +1 -1
- package/dist/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +3 -2
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/guards/app-lock-guard.service.d.ts +26 -0
- package/dist/lib/guards/app-lock-guard.service.d.ts.map +1 -0
- package/dist/lib/guards/app-lock-guard.service.js +55 -0
- package/dist/lib/guards/app-lock-guard.service.js.map +1 -0
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +40 -27
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +6 -5
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +19 -24
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +9 -0
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +24 -6
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +360 -191
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/single-record/single-record.component.d.ts +31 -75
- package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
- package/dist/lib/single-record/single-record.component.js +60 -471
- package/dist/lib/single-record/single-record.component.js.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.d.ts +3 -8
- package/dist/lib/single-search-result/single-search-result.component.d.ts.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.js +19 -68
- package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +46 -46
- package/dist/lib/__tests__/form-resolver.service.test.d.ts +0 -2
- package/dist/lib/__tests__/form-resolver.service.test.d.ts.map +0 -1
- package/dist/lib/__tests__/form-resolver.service.test.js +0 -258
- package/dist/lib/__tests__/form-resolver.service.test.js.map +0 -1
- package/dist/lib/services/form-resolver.service.d.ts +0 -139
- package/dist/lib/services/form-resolver.service.d.ts.map +0 -1
- package/dist/lib/services/form-resolver.service.js +0 -235
- package/dist/lib/services/form-resolver.service.js.map +0 -1
|
@@ -1,86 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ActivatedRoute } from '@angular/router';
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
3
2
|
import { CompositeKey, BaseEntity } from '@memberjunction/core';
|
|
4
|
-
import {
|
|
3
|
+
import { FormNavigationEvent, FormNotificationEvent } from '@memberjunction/ng-base-forms';
|
|
5
4
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Explorer-side host for a single entity record in the main tab area.
|
|
8
|
+
*
|
|
9
|
+
* This is now a **thin wrapper** around the Generic `<mj-entity-form-host>`
|
|
10
|
+
* (in `@memberjunction/ng-base-forms`), which owns all the mechanics: resolving
|
|
11
|
+
* the form (class / custom / interactive override + variants), loading the
|
|
12
|
+
* record, dynamically creating the form, binding it, and tearing it down.
|
|
13
|
+
*
|
|
14
|
+
* SingleRecordComponent's only remaining job is the **Explorer mapping**:
|
|
15
|
+
* translating the host's framework-agnostic events into Explorer services —
|
|
16
|
+
* `Navigate` → {@link NavigationService}, `Notification` → {@link SharedService},
|
|
17
|
+
* record loads → {@link RecentAccessService} — none of which belong in a Generic
|
|
18
|
+
* component.
|
|
19
|
+
*/
|
|
20
|
+
export declare class SingleRecordComponent extends BaseAngularComponent {
|
|
21
|
+
PrimaryKey: CompositeKey;
|
|
22
|
+
entityName: string | null;
|
|
16
23
|
newRecordValues: string | Record<string, unknown> | null;
|
|
17
|
-
loadComplete: EventEmitter<
|
|
24
|
+
loadComplete: EventEmitter<void>;
|
|
18
25
|
recordSaved: EventEmitter<BaseEntity>;
|
|
19
|
-
/**
|
|
20
|
-
* Emitted when the hosted form asks to be dismissed (e.g., user clicked Discard on
|
|
21
|
-
* a brand-new record). Parent components should close the tab / route the user back.
|
|
22
|
-
*/
|
|
26
|
+
/** Emitted when the hosted form asks to be dismissed (e.g. Discard on a new record). */
|
|
23
27
|
recordDismissed: EventEmitter<void>;
|
|
24
|
-
private recentAccessService;
|
|
25
28
|
private navigationService;
|
|
26
29
|
private sharedService;
|
|
27
|
-
private
|
|
28
|
-
private
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
private _eventHandlerSubscription;
|
|
38
|
-
private _formEventSubscriptions;
|
|
39
|
-
private _viewInitialized;
|
|
40
|
-
ngOnInit(): void;
|
|
41
|
-
ngAfterViewInit(): void;
|
|
42
|
-
/**
|
|
43
|
-
* Re-run LoadForm when an @Input changes after initial view init.
|
|
44
|
-
*
|
|
45
|
-
* Defense-in-depth: the tab/cache rekey on save (in TabContainerComponent) is the
|
|
46
|
-
* primary fix that prevents stale-form bugs after creating a new record. This setter
|
|
47
|
-
* path ensures we self-heal if a host ever swaps the bound inputs without recreating
|
|
48
|
-
* the component — without it, LoadForm only ever runs once per component instance.
|
|
49
|
-
*
|
|
50
|
-
* Tears down the previous form (component, record, event handlers) before loading the
|
|
51
|
-
* new one so we don't leak references or stack multiple forms in the container.
|
|
52
|
-
*/
|
|
53
|
-
private reloadCurrentForm;
|
|
54
|
-
/**
|
|
55
|
-
* Compare two CompositeKey instances by their key/value contents.
|
|
56
|
-
* Two different instances representing the same key should NOT count as a change.
|
|
57
|
-
*
|
|
58
|
-
* Filters out KVPs with empty Values before comparing. Different callers represent
|
|
59
|
-
* "no key" differently — some use an empty KeyValuePairs list, others use a single
|
|
60
|
-
* KVP with an empty Value (e.g. `LoadFromURLSegment(entity, '')`). Both mean the
|
|
61
|
-
* same thing semantically and must not trigger a change.
|
|
62
|
-
*/
|
|
63
|
-
private compositeKeysEqual;
|
|
64
|
-
/**
|
|
65
|
-
* Tear down the currently rendered form so a new one can be loaded in its place.
|
|
66
|
-
* Mirrors the cleanup done in ngOnDestroy, minus the final state reset.
|
|
67
|
-
*/
|
|
68
|
-
private teardownActiveForm;
|
|
69
|
-
LoadForm(primaryKey: CompositeKey, entityName: string): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Render a user-visible error state inside the record pane AND log a structured
|
|
72
|
-
* console.error for developers. Always emits `loadComplete` so the Explorer shell
|
|
73
|
-
* does not hang on its first-resource-load gate.
|
|
74
|
-
*/
|
|
75
|
-
private failWithUserError;
|
|
76
|
-
protected SetNewRecordValues(record: BaseEntity): void;
|
|
77
|
-
/**
|
|
78
|
-
* Subscribe to BaseFormComponent @Output events and map them to Explorer services.
|
|
79
|
-
*/
|
|
80
|
-
private subscribeToFormEvents;
|
|
81
|
-
private handleNavigation;
|
|
82
|
-
private cleanupFormSubscriptions;
|
|
83
|
-
ngOnDestroy(): void;
|
|
30
|
+
private formPresenter;
|
|
31
|
+
private recentAccessService;
|
|
32
|
+
/** Unblock the shell's first-resource-load gate (success or error). */
|
|
33
|
+
onLoadComplete(): void;
|
|
34
|
+
/** Log access for existing records once the form's record is ready. */
|
|
35
|
+
onRecordReady(record: BaseEntity): void;
|
|
36
|
+
onSaved(record: BaseEntity): void;
|
|
37
|
+
onNotification(event: FormNotificationEvent): void;
|
|
38
|
+
/** Map the form's navigation requests onto Explorer's NavigationService. */
|
|
39
|
+
handleNavigation(event: FormNavigationEvent): void;
|
|
84
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<SingleRecordComponent, never>;
|
|
85
41
|
static ɵcmp: i0.ɵɵComponentDeclaration<SingleRecordComponent, "mj-single-record", never, { "PrimaryKey": { "alias": "PrimaryKey"; "required": false; }; "entityName": { "alias": "entityName"; "required": false; }; "newRecordValues": { "alias": "newRecordValues"; "required": false; }; }, { "loadComplete": "loadComplete"; "recordSaved": "recordSaved"; "recordDismissed": "recordDismissed"; }, never, never, false, never>;
|
|
86
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-record.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"single-record.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAyB,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAA0B,MAAM,+BAA+B,CAAC;AAEnH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AAErE;;;;;;;;;;;;;GAaG;AACH,qBAMa,qBAAsB,SAAQ,oBAAoB;IAC7C,UAAU,EAAE,YAAY,CAAsB;IAC9C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAM;IAC/B,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAM;IAE7D,YAAY,EAAE,YAAY,CAAC,IAAI,CAAC,CAA4B;IAC5D,WAAW,EAAE,YAAY,CAAC,UAAU,CAAC,CAAkC;IACxF,wFAAwF;IACvE,eAAe,EAAE,YAAY,CAAC,IAAI,CAAC,CAA4B;IAEhF,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,mBAAmB,CAA6B;IAExD,uEAAuE;IACvE,cAAc,IAAI,IAAI;IAItB,uEAAuE;IACvE,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAMvC,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAIjC,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,IAAI;IAIlD,4EAA4E;IAC5E,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;yCApCvC,qBAAqB;2CAArB,qBAAqB;CA4EjC"}
|