@memberjunction/ng-shared 5.51.0 → 6.1.0-edge.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/LICENSE +7 -0
- package/dist/lib/base-dashboard.d.ts +16 -0
- package/dist/lib/base-dashboard.d.ts.map +1 -1
- package/dist/lib/base-dashboard.js +36 -5
- package/dist/lib/base-dashboard.js.map +1 -1
- package/dist/lib/base-resource-component.d.ts +33 -3
- package/dist/lib/base-resource-component.d.ts.map +1 -1
- package/dist/lib/base-resource-component.js +65 -11
- package/dist/lib/base-resource-component.js.map +1 -1
- package/dist/lib/explorer-breakpoint.service.d.ts +39 -0
- package/dist/lib/explorer-breakpoint.service.d.ts.map +1 -0
- package/dist/lib/explorer-breakpoint.service.js +57 -0
- package/dist/lib/explorer-breakpoint.service.js.map +1 -0
- package/dist/lib/navigation.interfaces.d.ts +13 -0
- package/dist/lib/navigation.interfaces.d.ts.map +1 -1
- package/dist/lib/navigation.interfaces.js.map +1 -1
- package/dist/lib/navigation.service.d.ts +70 -3
- package/dist/lib/navigation.service.d.ts.map +1 -1
- package/dist/lib/navigation.service.js +356 -22
- package/dist/lib/navigation.service.js.map +1 -1
- package/dist/lib/record-open-style.d.ts +88 -0
- package/dist/lib/record-open-style.d.ts.map +1 -0
- package/dist/lib/record-open-style.js +124 -0
- package/dist/lib/record-open-style.js.map +1 -0
- package/dist/lib/record-tab-icon.d.ts +10 -0
- package/dist/lib/record-tab-icon.d.ts.map +1 -0
- package/dist/lib/record-tab-icon.js +15 -0
- package/dist/lib/record-tab-icon.js.map +1 -0
- package/dist/lib/safe-detect-changes.d.ts +18 -0
- package/dist/lib/safe-detect-changes.d.ts.map +1 -0
- package/dist/lib/safe-detect-changes.js +29 -0
- package/dist/lib/safe-detect-changes.js.map +1 -0
- package/dist/lib/shared.service.d.ts +5 -0
- package/dist/lib/shared.service.d.ts.map +1 -1
- package/dist/lib/shared.service.js +16 -10
- package/dist/lib/shared.service.js.map +1 -1
- package/dist/public-api.d.ts +4 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +4 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +19 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-open-style.js","sourceRoot":"","sources":["../../src/lib/record-open-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAE/C,iFAAiF;AACjF,MAAM,UAAU,yBAAyB,CAAC,aAAyD;IACjG,OAAO,aAAa,EAAE,CAAC,cAAc,CAAC,KAAK,qBAAqB,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AAExE,8EAA8E;AAC9E,MAAM,UAAU,yBAAyB,CAAC,aAAyD;IACjG,OAAO,aAAa,EAAE,CAAC,8BAA8B,CAAC,KAAK,IAAI,CAAC;AAClE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,aAAyD;IAC1F,OAAO,yBAAyB,CAAC,aAAa,CAAC,IAAI,CAAC,yBAAyB,CAAC,aAAa,CAAC,CAAC;AAC/F,CAAC;AA+CD,4EAA4E;AAC5E,MAAM,UAAU,2BAA2B,CAAC,MAAkC;IAC5E,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAClE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,aAAyD;IAC9F,MAAM,UAAU,GAAG,CAAC,GAAW,EAAsB,EAAE;QACrD,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC;QACnC,OAAO,OAAO,KAAK,KAAK,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QACrC,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAE7D,SAAS,UAAU;IACjB,OAAO,oBAAoB,EAAiD,CAAC;AAC/E,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,kBAAkB,CAAC,KAAsB;IACvD,UAAU,EAAE,CAAC,2BAA2B,CAAC,GAAG,KAAK,CAAC;AACpD,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,EAAE,CAAC,2BAA2B,CAAC,IAAI,SAAS,CAAC;AAChE,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,iBAAiB;IAC/B,OAAO,kBAAkB,EAAE,KAAK,SAAS,CAAC;AAC5C,CAAC","sourcesContent":["/**\n * Record-open style — how Explorer treats records opened from within apps.\n *\n * - 'records' (DEFAULT): records are a GLOBAL surface. Opening a record keeps\n * you in the app you're standing in (assigned there, no Home reassignment),\n * always opens as its own tab (re-open focuses the existing one), and the\n * shell renders a persistent count-badged \"Records\" pill in the header nav\n * plus a record-only tab strip while a record is being viewed. The\n * invariant: any open record is at most 2 clicks away from anywhere — the\n * pill resumes the last-viewed record (1 click), the strip reaches the rest.\n * - 'classic': the previous behavior — record opens are reassigned to the\n * Home app (which surfaces them as dynamic nav items) and multi-tab UI is\n * the Golden Layout header. Downstream escape hatch, not the product\n * direction.\n *\n * The value is resolved from the `Shell.RecordOpen.Style` instance config by\n * the shell (see ShellComponent.chromeFlags) and pushed here so that\n * NavigationService — which runs in this package, below the shell — forks on\n * the same value. Module-level state (not a service) because the style is a\n * per-deployment constant, not per-component state.\n */\nimport { GetGlobalObjectStore } from '@memberjunction/global';\n\nexport type RecordOpenStyle = 'records' | 'classic';\n\n/**\n * The workspace tab resourceType identifying entity-record tabs — the tabs\n * the records-style model routes into the separate records layout region.\n * ALWAYS compare through this constant: a typo'd literal would silently leak\n * record tabs into the wrong layout with no compile error.\n */\nexport const RECORDS_RESOURCE_TYPE = 'Records';\n\n/** True when a workspace tab's configuration marks it as an entity-record tab */\nexport function IsRecordsTabConfiguration(configuration: Record<string, unknown> | undefined | null): boolean {\n return configuration?.['resourceType'] === RECORDS_RESOURCE_TYPE;\n}\n\n/**\n * Tab-configuration key marking a record tab the user has promoted (\"docked\")\n * out of the records region into the MAIN workspace layout (\"Move to\n * Workspace\"). Persisted with the tab configuration. ALWAYS read through\n * IsRecordDockedToWorkspace.\n */\nexport const RECORD_DOCKED_TO_WORKSPACE_KEY = 'recordDockedToWorkspace';\n\n/** True when a record tab has been promoted into the main workspace layout */\nexport function IsRecordDockedToWorkspace(configuration: Record<string, unknown> | undefined | null): boolean {\n return configuration?.[RECORD_DOCKED_TO_WORKSPACE_KEY] === true;\n}\n\n/**\n * True when a tab LIVES in the records region: it is a record tab that has\n * NOT been docked to the workspace. This is the REGION-MEMBERSHIP predicate —\n * layout routing, region visibility, the Records pill, and the shell's\n * app-flip guard all fork on it. Record IDENTITY checks (open dedup,\n * record→record origin capture, SwitchToApp's \"never land on a record\"\n * filter) must keep using IsRecordsTabConfiguration: a docked record is\n * still a record, it just lives in the main layout.\n */\nexport function IsRecordsRegionTab(configuration: Record<string, unknown> | undefined | null): boolean {\n return IsRecordsTabConfiguration(configuration) && !IsRecordDockedToWorkspace(configuration);\n}\n\n/**\n * Where the user was standing when a record was opened — captured by\n * NavigationService.OpenEntityRecord into the record tab's configuration.\n * Powers the origin crumb in the records region (\"← App › Page\"), which takes\n * the user straight back to that page. Origin is PROVENANCE, not location:\n * records are a global surface with no canonical parent, so this trail is a\n * convenience affordance (\"return to where I came from\"), never an ancestry\n * claim. All fields optional because capture is best-effort (e.g. no active\n * app at open time, or the source tab has since been closed).\n */\nexport interface RecordSourceContext {\n sourceAppId?: string;\n sourceAppName?: string;\n /** Display title of the source tab at capture (what the user saw) */\n sourceNavLabel?: string;\n /**\n * Canonical nav-item identity of the source tab (its configuration\n * `navItemName`). Titles MUTATE — dashboards rename their tab as the user\n * drills (Data Explorer sets it to the selected entity) — so identity\n * checks and nav re-resolution use THIS; the label is display-only.\n * Absent for dynamic nav items, which never get navItemName stamped.\n */\n sourceNavItemName?: string;\n /** The exact workspace tab the user was on — highest-fidelity return target */\n sourceTabId?: string;\n /**\n * Display label for NON-TAB origins (overlays, dialogs, agent actions —\n * e.g. 'Conversation', 'Search'). When present, the crumb renders this\n * label instead of \"App › Page\". Surfaces that aren't workspace tabs MUST\n * set this (via NavigationOptions.recordSource) instead of letting\n * captureSourceContext blame whatever tab sits behind the overlay.\n */\n sourceLabel?: string;\n /** Query params to apply when returning via the app + nav-label fallback */\n sourceQueryParams?: Record<string, string>;\n /**\n * Set when the record was opened from INSIDE another record (Matt's\n * record→record call, 2026-07-28: the crumb points at the PARENT record).\n * Identity — not the tab id — is what the return path verifies and, when\n * the parent's tab has been closed, re-opens.\n */\n sourceRecordEntity?: string;\n sourceRecordId?: string;\n}\n\n/** True when the origin has somewhere to GO back to (crumb is clickable) */\nexport function RecordSourceHasReturnTarget(origin: RecordSourceContext | null): boolean {\n return !!(origin && (origin.sourceTabId || origin.sourceAppId));\n}\n\n/**\n * Extract the source context from a record tab's configuration. Returns null\n * when there is no usable origin (no sourceAppId), so callers can gate the\n * crumb UI on a single truthiness check.\n */\nexport function GetRecordSourceContext(configuration: Record<string, unknown> | undefined | null): RecordSourceContext | null {\n const readString = (key: string): string | undefined => {\n const value = configuration?.[key];\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n };\n const appId = readString('sourceAppId');\n const label = readString('sourceLabel');\n if (!appId && !label) {\n return null;\n }\n const context: RecordSourceContext = {\n sourceAppId: appId,\n sourceAppName: readString('sourceAppName'),\n sourceNavLabel: readString('sourceNavLabel'),\n sourceNavItemName: readString('sourceNavItemName'),\n sourceTabId: readString('sourceTabId'),\n sourceLabel: label,\n sourceRecordEntity: readString('sourceRecordEntity'),\n sourceRecordId: readString('sourceRecordId')\n };\n const rawParams = configuration?.['sourceQueryParams'];\n if (rawParams && typeof rawParams === 'object' && !Array.isArray(rawParams)) {\n const params: Record<string, string> = {};\n for (const [key, value] of Object.entries(rawParams as Record<string, unknown>)) {\n if (typeof value === 'string') {\n params[key] = value;\n }\n }\n if (Object.keys(params).length > 0) {\n context.sourceQueryParams = params;\n }\n }\n return context;\n}\n\n/**\n * The resolved style lives in the GLOBAL OBJECT STORE, not a module-level\n * variable: ESBuild/Vite code-splitting can duplicate this module across\n * chunks, and a lazy chunk's copy would silently keep the default while the\n * shell wrote 'classic' into another copy — the exact split-brain the\n * BaseSingleton rule exists to prevent. The store guarantees one value per\n * page regardless of how many module copies load.\n */\nconst RECORD_OPEN_STYLE_STORE_KEY = '__mj_record_open_style';\n\nfunction styleStore(): Record<string, RecordOpenStyle | undefined> {\n return GetGlobalObjectStore() as Record<string, RecordOpenStyle | undefined>;\n}\n\n/** Set by the shell once instance config resolves. Idempotent. */\nexport function SetRecordOpenStyle(style: RecordOpenStyle): void {\n styleStore()[RECORD_OPEN_STYLE_STORE_KEY] = style;\n}\n\n/** The deployment's record-open style ('records' unless configured 'classic') */\nexport function GetRecordOpenStyle(): RecordOpenStyle {\n return styleStore()[RECORD_OPEN_STYLE_STORE_KEY] ?? 'records';\n}\n\n/** True when records-as-tabs is active (the 'records' style) */\nexport function IsRecordTabsStyle(): boolean {\n return GetRecordOpenStyle() === 'records';\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IMetadataProvider } from '@memberjunction/core';
|
|
2
|
+
/**
|
|
3
|
+
* Entity TYPE icon for a record tab, resolved from the tab's configuration.
|
|
4
|
+
* Single source of truth shared by the golden-layout tab type slot, the
|
|
5
|
+
* mobile record bar, and the record switcher sheet — the fallback glyph must
|
|
6
|
+
* stay identical across all three or the same record renders different icons
|
|
7
|
+
* on different surfaces.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ResolveRecordTypeIcon(configuration: Record<string, unknown> | undefined | null, provider: IMetadataProvider | null | undefined): string;
|
|
10
|
+
//# sourceMappingURL=record-tab-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-tab-icon.d.ts","sourceRoot":"","sources":["../../src/lib/record-tab-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,EACzD,QAAQ,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,GAC7C,MAAM,CAMR"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity TYPE icon for a record tab, resolved from the tab's configuration.
|
|
3
|
+
* Single source of truth shared by the golden-layout tab type slot, the
|
|
4
|
+
* mobile record bar, and the record switcher sheet — the fallback glyph must
|
|
5
|
+
* stay identical across all three or the same record renders different icons
|
|
6
|
+
* on different surfaces.
|
|
7
|
+
*/
|
|
8
|
+
export function ResolveRecordTypeIcon(configuration, provider) {
|
|
9
|
+
const entityName = configuration?.['Entity'];
|
|
10
|
+
const entityIcon = typeof entityName === 'string'
|
|
11
|
+
? provider?.EntityByName(entityName)?.Icon
|
|
12
|
+
: undefined;
|
|
13
|
+
return entityIcon || 'fa-regular fa-file-lines';
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=record-tab-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-tab-icon.js","sourceRoot":"","sources":["../../src/lib/record-tab-icon.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,aAAyD,EACzD,QAA8C;IAE9C,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,OAAO,UAAU,KAAK,QAAQ;QAC/C,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,EAAE,IAAI;QAC1C,CAAC,CAAC,SAAS,CAAC;IACd,OAAO,UAAU,IAAI,0BAA0B,CAAC;AAClD,CAAC","sourcesContent":["import { IMetadataProvider } from '@memberjunction/core';\n\n/**\n * Entity TYPE icon for a record tab, resolved from the tab's configuration.\n * Single source of truth shared by the golden-layout tab type slot, the\n * mobile record bar, and the record switcher sheet — the fallback glyph must\n * stay identical across all three or the same record renders different icons\n * on different surfaces.\n */\nexport function ResolveRecordTypeIcon(\n configuration: Record<string, unknown> | undefined | null,\n provider: IMetadataProvider | null | undefined\n): string {\n const entityName = configuration?.['Entity'];\n const entityIcon = typeof entityName === 'string'\n ? provider?.EntityByName(entityName)?.Icon\n : undefined;\n return entityIcon || 'fa-regular fa-file-lines';\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Synchronous, exception-safe change-detection flush for zoneless Angular.
|
|
4
|
+
*
|
|
5
|
+
* RxJS-driven mutations are invisible until SOMETHING runs CD; detectChanges
|
|
6
|
+
* throws when a pass is already in flight, and an unguarded throw inside a
|
|
7
|
+
* promise or subscription callback silently kills the update (and, for
|
|
8
|
+
* subscriptions, can unsubscribe the stream). markForCheck runs first so even
|
|
9
|
+
* the re-entrant case gets picked up by the in-flight pass.
|
|
10
|
+
*
|
|
11
|
+
* Swallow-but-LOG: the catch exists to protect the CALLING stream, never to
|
|
12
|
+
* hide the error. A real template error surfacing through this path (NG0100,
|
|
13
|
+
* a throwing getter) is logged with full detail — the marked view still gets
|
|
14
|
+
* applied by the next pass, and the stream survives, but the failure is
|
|
15
|
+
* visible instead of silent.
|
|
16
|
+
*/
|
|
17
|
+
export declare function SafeDetectChanges(cdr: ChangeDetectorRef | null | undefined): void;
|
|
18
|
+
//# sourceMappingURL=safe-detect-changes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-detect-changes.d.ts","sourceRoot":"","sources":["../../src/lib/safe-detect-changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAUjF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LogError } from '@memberjunction/core';
|
|
2
|
+
/**
|
|
3
|
+
* Synchronous, exception-safe change-detection flush for zoneless Angular.
|
|
4
|
+
*
|
|
5
|
+
* RxJS-driven mutations are invisible until SOMETHING runs CD; detectChanges
|
|
6
|
+
* throws when a pass is already in flight, and an unguarded throw inside a
|
|
7
|
+
* promise or subscription callback silently kills the update (and, for
|
|
8
|
+
* subscriptions, can unsubscribe the stream). markForCheck runs first so even
|
|
9
|
+
* the re-entrant case gets picked up by the in-flight pass.
|
|
10
|
+
*
|
|
11
|
+
* Swallow-but-LOG: the catch exists to protect the CALLING stream, never to
|
|
12
|
+
* hide the error. A real template error surfacing through this path (NG0100,
|
|
13
|
+
* a throwing getter) is logged with full detail — the marked view still gets
|
|
14
|
+
* applied by the next pass, and the stream survives, but the failure is
|
|
15
|
+
* visible instead of silent.
|
|
16
|
+
*/
|
|
17
|
+
export function SafeDetectChanges(cdr) {
|
|
18
|
+
if (!cdr) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
cdr.markForCheck();
|
|
22
|
+
try {
|
|
23
|
+
cdr.detectChanges();
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
LogError(`SafeDetectChanges: detectChanges threw (view stays marked for the next pass; the calling stream is protected). Underlying error: ${err instanceof Error ? err.stack ?? err.message : String(err)}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=safe-detect-changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-detect-changes.js","sourceRoot":"","sources":["../../src/lib/safe-detect-changes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAyC;IACzE,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO;IACT,CAAC;IACD,GAAG,CAAC,YAAY,EAAE,CAAC;IACnB,IAAI,CAAC;QACH,GAAG,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,QAAQ,CAAC,oIAAoI,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChN,CAAC;AACH,CAAC","sourcesContent":["import { ChangeDetectorRef } from '@angular/core';\nimport { LogError } from '@memberjunction/core';\n\n/**\n * Synchronous, exception-safe change-detection flush for zoneless Angular.\n *\n * RxJS-driven mutations are invisible until SOMETHING runs CD; detectChanges\n * throws when a pass is already in flight, and an unguarded throw inside a\n * promise or subscription callback silently kills the update (and, for\n * subscriptions, can unsubscribe the stream). markForCheck runs first so even\n * the re-entrant case gets picked up by the in-flight pass.\n *\n * Swallow-but-LOG: the catch exists to protect the CALLING stream, never to\n * hide the error. A real template error surfacing through this path (NG0100,\n * a throwing getter) is logged with full detail — the marked view still gets\n * applied by the next pass, and the stream survives, but the failure is\n * visible instead of silent.\n */\nexport function SafeDetectChanges(cdr: ChangeDetectorRef | null | undefined): void {\n if (!cdr) {\n return;\n }\n cdr.markForCheck();\n try {\n cdr.detectChanges();\n } catch (err) {\n LogError(`SafeDetectChanges: detectChanges threw (view stays marked for the next pass; the calling stream is protected). Underlying error: ${err instanceof Error ? err.stack ?? err.message : String(err)}`);\n }\n}\n"]}
|
|
@@ -80,6 +80,11 @@ export declare class SharedService {
|
|
|
80
80
|
/**
|
|
81
81
|
* Utility method that returns true if child is a descendant of parent, false otherwise.
|
|
82
82
|
*/
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Use `IsDescendantElement` from `@memberjunction/ng-shared-generic`. This is a pure
|
|
85
|
+
* DOM predicate with no Explorer coupling; keeping it here forced widgets that wanted it to
|
|
86
|
+
* depend on Explorer. Delegates so existing callers are unaffected.
|
|
87
|
+
*/
|
|
83
88
|
static IsDescendant(parent: ElementRef, child: ElementRef): boolean;
|
|
84
89
|
/**
|
|
85
90
|
* Creates a notification in the database and refreshes the UI. Returns the notification object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.service.d.ts","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAyD,MAAM,sBAAsB,CAAC;AAC9H,OAAO,EAAqE,oBAAoB,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAKlL,OAAO,EAAW,UAAU,EAAmC,MAAM,MAAM,CAAC;AAE5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;
|
|
1
|
+
{"version":3,"file":"shared.service.d.ts","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAyD,MAAM,sBAAsB,CAAC;AAC9H,OAAO,EAAqE,oBAAoB,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAKlL,OAAO,EAAW,UAAU,EAAmC,MAAM,MAAM,CAAC;AAE5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAKzE,qBAGa,aAAa;IAUtB,O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AAM;IAQjE;;;;OAIG;IACI,iCAAiC,CAAC,oBAAoB,EAAE,MAAM;IAQrE;;;OAGG;IACI,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY;yCAtVzD,aAAa;6CAAb,aAAa;CAiWzB;AAED,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAG1E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAgBb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -7,6 +7,8 @@ import { MJEventType, MJGlobal, ConvertMarkdownStringToHtmlList, InvokeManualRes
|
|
|
7
7
|
import { Subject, BehaviorSubject, firstValueFrom } from 'rxjs';
|
|
8
8
|
import { first, tap } from 'rxjs/operators';
|
|
9
9
|
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
10
|
+
import { IsDescendantElement } from '@memberjunction/ng-shared-generic';
|
|
11
|
+
import { RecordNavigationAdapter } from '@memberjunction/ng-base-types';
|
|
10
12
|
import { NavigationService } from './navigation.service';
|
|
11
13
|
import * as i0 from "@angular/core";
|
|
12
14
|
import * as i1 from "@memberjunction/ng-notifications";
|
|
@@ -28,6 +30,14 @@ export class SharedService {
|
|
|
28
30
|
return g[SharedService._globalStoreKey];
|
|
29
31
|
}
|
|
30
32
|
g[SharedService._globalStoreKey] = this;
|
|
33
|
+
// Supply record navigation to Generic widgets that need it but must not import Explorer.
|
|
34
|
+
// The widget calls RecordNavigationAdapter.OpenEntityRecord(...); this is what makes that
|
|
35
|
+
// resolve to an Explorer tab. Registered here because SharedService is constructed once per
|
|
36
|
+
// app and is already the Explorer-side owner of OpenEntityRecord.
|
|
37
|
+
// See guides/UI_LAYERING_GUIDE.md §3 and the adapter's own docs.
|
|
38
|
+
RecordNavigationAdapter.Register({
|
|
39
|
+
OpenEntityRecord: (entityName, recordKey) => this.OpenEntityRecord(entityName, recordKey),
|
|
40
|
+
});
|
|
31
41
|
MJGlobal.Instance.GetEventListener(true).subscribe(async (event) => {
|
|
32
42
|
switch (event.event) {
|
|
33
43
|
case MJEventType.LoggedIn:
|
|
@@ -216,17 +226,13 @@ export class SharedService {
|
|
|
216
226
|
/**
|
|
217
227
|
* Utility method that returns true if child is a descendant of parent, false otherwise.
|
|
218
228
|
*/
|
|
229
|
+
/**
|
|
230
|
+
* @deprecated Use `IsDescendantElement` from `@memberjunction/ng-shared-generic`. This is a pure
|
|
231
|
+
* DOM predicate with no Explorer coupling; keeping it here forced widgets that wanted it to
|
|
232
|
+
* depend on Explorer. Delegates so existing callers are unaffected.
|
|
233
|
+
*/
|
|
219
234
|
static IsDescendant(parent, child) {
|
|
220
|
-
|
|
221
|
-
let node = child.nativeElement.parentNode;
|
|
222
|
-
while (node != null) {
|
|
223
|
-
if (node == parent.nativeElement) {
|
|
224
|
-
return true;
|
|
225
|
-
}
|
|
226
|
-
node = node.parentNode;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return false;
|
|
235
|
+
return IsDescendantElement(parent, child);
|
|
230
236
|
}
|
|
231
237
|
/**
|
|
232
238
|
* Creates a notification in the database and refreshes the UI. Returns the notification object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.service.js","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAY,MAAM,eAAe,CAAC;AACjE,OAAO,EAAsD,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC9H,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,wBAAwB,EAAkE,MAAM,+BAA+B,CAAC;AAClL,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;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AS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACV,CAAC;AAKX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,WAAW,EAAE,aAAa;IAC1B,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,wBAAwB,EAAE,0BAA0B;IACpD,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;CACtB,CAAC","sourcesContent":["import { ElementRef, Injectable, Injector } from '@angular/core';\nimport { CompositeKey, IMetadataProvider, LocalCacheManager, LogError, Metadata, StartupManager } from '@memberjunction/core';\nimport { ArtifactMetadataEngine, DashboardEngine, ResourcePermissionEngine, MJResourceTypeEntity, MJUserNotificationEntity, ViewColumnInfo } from '@memberjunction/core-entities';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { EntityCommunicationsEngineBase } from \"@memberjunction/entity-communications-base\";\nimport { MJEventType, MJGlobal, ConvertMarkdownStringToHtmlList, InvokeManualResize, UUIDsEqual, GetGlobalObjectStore } from '@memberjunction/global';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport { Subject, Observable, BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { NavigationService } from './navigation.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SharedService {\n private static readonly _globalStoreKey = '___SINGLETON__SharedService';\n private static _loaded: boolean = false;\n private static _resourceTypes: MJResourceTypeEntity[] = [];\n private static isLoading$ = new BehaviorSubject<boolean>(false);\n private tabChange = new Subject();\n tabChange$ = this.tabChange.asObservable();\n private _navigationService: NavigationService | null = null;\n\n constructor(\n private mjNotificationsService: MJNotificationService,\n private injector: Injector\n ) {\n const g = GetGlobalObjectStore()!;\n if (g[SharedService._globalStoreKey]) {\n return g[SharedService._globalStoreKey] as SharedService;\n }\n g[SharedService._globalStoreKey] = this;\n\n MJGlobal.Instance.GetEventListener(true).subscribe(async (event) => {\n switch (event.event) {\n case MJEventType.LoggedIn:\n if (SharedService._loaded === false) {\n // Pre-warm non-critical engines IMMEDIATELY on LoggedIn, before\n // StartupManager.Startup() completes. These engines only need\n // Metadata.Provider (set during setupGraphQLClient's provider.Config()).\n // Firing them here allows their RunViews calls to be coalesced with\n // the startup engines' calls into fewer mega-batched GraphQL requests.\n SharedService.preWarmEngines();\n\n // Handle app startup — joins the same Startup() promise that\n // setupGraphQLClient kicked off.\n await StartupManager.Instance.Startup();\n\n await SharedService.RefreshData(false);\n }\n break;\n }\n }); \n }\n\n public static get Instance(): SharedService {\n return GetGlobalObjectStore()![SharedService._globalStoreKey] as SharedService;\n }\n\n /**\n * Optional explicit metadata provider. Set via `setProvider()` from a caller\n * with provider context (e.g. the shell). Falls back to `Metadata.Provider`\n * when not set.\n */\n private _provider: IMetadataProvider | null = null;\n\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n /**\n * Pre-warms commonly used engines in the background after login.\n * This reduces perceived latency when users navigate to features like\n * Conversations, Dashboards, or Artifacts. Fire-and-forget pattern -\n * errors are logged but don't block the UI.\n */\n private static preWarmEngines(): void {\n // AIEngineBase is the slowest - loads agents, models, prompts, etc.\n // Critical for Conversations feature\n AIEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm AIEngineBase: ${err}`)\n );\n\n // ArtifactMetadataEngine.Config() loads only the artifact-type registry —\n // a small, fixed set. Artifacts and versions (whose Content can be huge) are\n // fetched on demand per-artifact, so this pre-warm stays cheap and bounded.\n // Used by Conversations and the Artifact viewer.\n ArtifactMetadataEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm ArtifactMetadataEngine: ${err}`)\n );\n\n // DashboardEngine loads dashboard metadata\n // Used when viewing dashboards\n DashboardEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n\n EntityCommunicationsEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n }\n\n /**\n * Get the NavigationService singleton instance\n * Lazy-loaded to avoid circular dependency issues\n */\n private get navigationService(): NavigationService {\n if (!this._navigationService) {\n this._navigationService = this.injector.get(NavigationService);\n }\n return this._navigationService;\n }\n\n /**\n * Get the neutral color used for system-wide resources\n */\n public get ExplorerAppColor(): string {\n return this.navigationService.ExplorerAppColor;\n }\n\n /**\n * Returns the current session ID, which is automatically created when the service is instantiated.\n */\n public get SessionId(): string {\n return (<GraphQLDataProvider>this.Provider).sessionId;\n }\n\n public get ResourceTypes(): MJResourceTypeEntity[] {\n return SharedService._resourceTypes;\n }\n public get ViewResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'user views')!;\n }\n public get RecordResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'records')!;\n }\n public get DashboardResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'dashboards')!;\n }\n public get ReportResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'reports')!;\n }\n public get SearchResultsResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'search results')!;\n }\n public get ListResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'lists')!;\n }\n public ResourceTypeByID(id: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => UUIDsEqual(rt.ID, id));\n }\n public ResourceTypeByName(name: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === name.trim().toLowerCase());\n }\n\n /**\n * Refreshes the data for the service. If OnlyIfNeeded is true, then the data is only refreshed if it hasn't been loaded yet.\n */\n public static async RefreshData(OnlyIfNeeded: boolean = false) {\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n const canProceed$ = SharedService.isLoading$.pipe(\n first(isLoading => !isLoading),\n tap(() => SharedService.isLoading$.next(true))\n );\n\n await firstValueFrom(canProceed$);\n\n try {\n // After waiting for the current loading operation to complete, check again\n // if _loaded is true and OnlyIfNeeded is true, return early\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n await SharedService.handleDataLoading();\n\n // Mark as loaded\n SharedService._loaded = true;\n } finally {\n // Ensure we always reset the loading flag\n SharedService.isLoading$.next(false);\n }\n }\n\n private static async handleDataLoading() {\n // make sure startup is done\n await StartupManager.Instance.Startup();\n\n this._resourceTypes = ResourcePermissionEngine.Instance.ResourceTypes;\n\n // Note: RefreshUserNotifications() removed here because MJNotificationService\n // already handles it via its own MJEventType.LoggedIn subscription. Calling it\n // from both places caused a duplicate User Notifications GraphQL request on login.\n } \n\n FormatColumnValue(col: ViewColumnInfo, value: any, maxLength: number = 0, trailingChars: string = \"...\") {\n if (value === null || value === undefined)\n return value;\n\n try {\n const retVal = col.EntityField.FormatValue(value, 0);\n if (maxLength > 0 && retVal && retVal.length > maxLength)\n return retVal.substring(0, maxLength) + trailingChars;\n else\n return retVal;\n }\n catch (e) {\n LogError(e);\n return value;\n }\n }\n\n public ConvertMarkdownStringToHtmlList(listType: HtmlListType, text: string): string {\n return ConvertMarkdownStringToHtmlList(listType, text) ?? text;\n }\n\n \n public InvokeManualResize(delay: number = 50) {\n return InvokeManualResize(delay, this);\n }\n\n public PushStatusUpdates(): Observable<string> {\n const gp: GraphQLDataProvider = <GraphQLDataProvider>this.Provider;\n return gp.PushStatusUpdates();\n }\n\n private _currentUserImage: string | Blob = '/assets/user.png';\n public get CurrentUserImage(): string | Blob {\n return this._currentUserImage;\n }\n public set CurrentUserImage(value: string | Blob) {\n this._currentUserImage = value;\n }\n\n /**\n * @deprecated Use MJNotificationService.UserNotifications instead\n */\n public static get UserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotifications instead\n */\n public static get UnreadUserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UnreadUserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotificationCount instead\n */\n public static get UnreadUserNotificationCount(): number {\n return MJNotificationService.UnreadUserNotificationCount;\n }\n\n /**\n * Utility method that returns true if child is a descendant of parent, false otherwise. \n */\n public static IsDescendant(parent: ElementRef, child: ElementRef) {\n if (parent && child && parent.nativeElement && child.nativeElement) {\n let node = child.nativeElement.parentNode;\n while (node != null) {\n if (node == parent.nativeElement) {\n return true;\n }\n node = node.parentNode;\n }\n }\n return false;\n }\n\n\n /**\n * Creates a notification in the database and refreshes the UI. Returns the notification object.\n * @param title \n * @param message \n * @param resourceTypeId \n * @param resourceRecordId \n * @param resourceConfiguration Any object, it is converted to a string by JSON.stringify and stored in the database\n * @returns \n * @deprecated Use MJNotificationService.CreateNotification instead\n */\n public async CreateNotification(title: string, message: string, resourceTypeId: string | null, resourceRecordId: string | null, resourceConfiguration: any | null, displayToUser : boolean = true): Promise<MJUserNotificationEntity> {\n return this.mjNotificationsService.CreateNotification(title, message, resourceTypeId, resourceRecordId, resourceConfiguration, displayToUser);\n }\n\n /**\n * @deprecated Use MJNotificationService.RefreshUserNotifications instead\n */\n public static async RefreshUserNotifications() {\n MJNotificationService.RefreshUserNotifications();\n }\n\n /**\n * Creates a message that is not saved to the User Notifications table, but is displayed to the user.\n * @param message - text to display\n * @param style - display styling\n * @param hideAfter - option to auto hide after the specified delay in milliseconds\n * @deprecated Use MJNotificationService.CreateSimpleNotification instead\n */\n public CreateSimpleNotification(message: string, style: \"none\" | \"success\" | \"error\" | \"warning\" | \"info\" = \"success\", hideAfter?: number) {\n return this.mjNotificationsService.CreateSimpleNotification(message, style, hideAfter);\n }\n\n\n\n private _resourceTypeMap = [\n { routeSegment: 'record', name: 'records' },\n { routeSegment: 'view', name: 'user views' },\n { routeSegment: 'search', name: 'search results' },\n { routeSegment: 'report', name: 'reports' },\n { routeSegment: 'query', name: 'queries' },\n { routeSegment: 'dashboard', name: 'dashboards' },\n { routeSegment: 'list', name: 'lists' },\n \n ]\n /**\n * Maps a Resource Type record Name column to the corresponding route segment\n * @param resourceTypeName \n * @returns \n */\n public mapResourceTypeNameToRouteSegment(resourceTypeName: string) {\n const item = this._resourceTypeMap.find(rt => rt.name.trim().toLowerCase() === resourceTypeName.trim().toLowerCase());\n if (item)\n return item.routeSegment;\n else\n return null \n }\n\n /**\n * Maps a route segment to the corresponding Resource Type record Name column\n * @param resourceRouteSegment \n * @returns \n */\n public mapResourceTypeRouteSegmentToName(resourceRouteSegment: string) {\n const item = this._resourceTypeMap.find(rt => rt.routeSegment.trim().toLowerCase() === resourceRouteSegment.trim().toLowerCase());\n if (item)\n return item.name;\n else\n return null \n }\n\n /**\n * Opens an entity record in a new or existing tab\n * Uses the modern NavigationService for tab-based navigation\n */\n public OpenEntityRecord(entityName: string, recordPkey: CompositeKey) {\n try {\n console.log('SharedService.OpenEntityRecord called:', entityName, recordPkey.ToURLSegment());\n // Use NavigationService to open in new tab-based UX\n this.navigationService.OpenEntityRecord(entityName, recordPkey);\n }\n catch (e) {\n console.error('Error in OpenEntityRecord:', e);\n LogError(e);\n }\n }\n}\n\nexport const HtmlListType = {\n Unordered: 'Unordered',\n Ordered: 'Ordered',\n} as const;\n\nexport type HtmlListType = typeof HtmlListType[keyof typeof HtmlListType];\n\n\nexport const EventCodes = {\n ViewClicked: \"ViewClicked\",\n EntityRecordClicked: \"EntityRecordClicked\",\n AddDashboard: \"AddDashboard\",\n AddReport: \"AddReport\",\n AddQuery: \"AddQuery\",\n ViewCreated: \"ViewCreated\",\n ViewUpdated: \"ViewUpdated\",\n RunSearch: \"RunSearch\",\n ViewNotifications: \"ViewNotifications\",\n PushStatusUpdates: \"PushStatusUpdates\",\n UserNotificationsUpdated: \"UserNotificationsUpdated\",\n CloseCurrentTab: \"CloseCurrentTab\",\n ListCreated: \"ListCreated\",\n ListClicked: 'ListClicked',\n AvatarUpdated: 'AvatarUpdated'\n} as const;\n\nexport type EventCodes = typeof EventCodes[keyof typeof EventCodes];"]}
|
|
1
|
+
{"version":3,"file":"shared.service.js","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAY,MAAM,eAAe,CAAC;AACjE,OAAO,EAAsD,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC9H,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,wBAAwB,EAAkE,MAAM,+BAA+B,CAAC;AAClL,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEtJ,OAAO,EAAE,OAAO,EAAc,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,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AE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;CACtB,CAAC","sourcesContent":["import { ElementRef, Injectable, Injector } from '@angular/core';\nimport { CompositeKey, IMetadataProvider, LocalCacheManager, LogError, Metadata, StartupManager } from '@memberjunction/core';\nimport { ArtifactMetadataEngine, DashboardEngine, ResourcePermissionEngine, MJResourceTypeEntity, MJUserNotificationEntity, ViewColumnInfo } from '@memberjunction/core-entities';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { EntityCommunicationsEngineBase } from \"@memberjunction/entity-communications-base\";\nimport { MJEventType, MJGlobal, ConvertMarkdownStringToHtmlList, InvokeManualResize, UUIDsEqual, GetGlobalObjectStore } from '@memberjunction/global';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport { Subject, Observable, BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { IsDescendantElement } from '@memberjunction/ng-shared-generic';\nimport { RecordNavigationAdapter } from '@memberjunction/ng-base-types';\nimport { NavigationService } from './navigation.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SharedService {\n private static readonly _globalStoreKey = '___SINGLETON__SharedService';\n private static _loaded: boolean = false;\n private static _resourceTypes: MJResourceTypeEntity[] = [];\n private static isLoading$ = new BehaviorSubject<boolean>(false);\n private tabChange = new Subject();\n tabChange$ = this.tabChange.asObservable();\n private _navigationService: NavigationService | null = null;\n\n constructor(\n private mjNotificationsService: MJNotificationService,\n private injector: Injector\n ) {\n const g = GetGlobalObjectStore()!;\n if (g[SharedService._globalStoreKey]) {\n return g[SharedService._globalStoreKey] as SharedService;\n }\n g[SharedService._globalStoreKey] = this;\n\n // Supply record navigation to Generic widgets that need it but must not import Explorer.\n // The widget calls RecordNavigationAdapter.OpenEntityRecord(...); this is what makes that\n // resolve to an Explorer tab. Registered here because SharedService is constructed once per\n // app and is already the Explorer-side owner of OpenEntityRecord.\n // See guides/UI_LAYERING_GUIDE.md §3 and the adapter's own docs.\n RecordNavigationAdapter.Register({\n OpenEntityRecord: (entityName, recordKey) => this.OpenEntityRecord(entityName, recordKey),\n });\n\n MJGlobal.Instance.GetEventListener(true).subscribe(async (event) => {\n switch (event.event) {\n case MJEventType.LoggedIn:\n if (SharedService._loaded === false) {\n // Pre-warm non-critical engines IMMEDIATELY on LoggedIn, before\n // StartupManager.Startup() completes. These engines only need\n // Metadata.Provider (set during setupGraphQLClient's provider.Config()).\n // Firing them here allows their RunViews calls to be coalesced with\n // the startup engines' calls into fewer mega-batched GraphQL requests.\n SharedService.preWarmEngines();\n\n // Handle app startup — joins the same Startup() promise that\n // setupGraphQLClient kicked off.\n await StartupManager.Instance.Startup();\n\n await SharedService.RefreshData(false);\n }\n break;\n }\n }); \n }\n\n public static get Instance(): SharedService {\n return GetGlobalObjectStore()![SharedService._globalStoreKey] as SharedService;\n }\n\n /**\n * Optional explicit metadata provider. Set via `setProvider()` from a caller\n * with provider context (e.g. the shell). Falls back to `Metadata.Provider`\n * when not set.\n */\n private _provider: IMetadataProvider | null = null;\n\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n /**\n * Pre-warms commonly used engines in the background after login.\n * This reduces perceived latency when users navigate to features like\n * Conversations, Dashboards, or Artifacts. Fire-and-forget pattern -\n * errors are logged but don't block the UI.\n */\n private static preWarmEngines(): void {\n // AIEngineBase is the slowest - loads agents, models, prompts, etc.\n // Critical for Conversations feature\n AIEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm AIEngineBase: ${err}`)\n );\n\n // ArtifactMetadataEngine.Config() loads only the artifact-type registry —\n // a small, fixed set. Artifacts and versions (whose Content can be huge) are\n // fetched on demand per-artifact, so this pre-warm stays cheap and bounded.\n // Used by Conversations and the Artifact viewer.\n ArtifactMetadataEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm ArtifactMetadataEngine: ${err}`)\n );\n\n // DashboardEngine loads dashboard metadata\n // Used when viewing dashboards\n DashboardEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n\n EntityCommunicationsEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n }\n\n /**\n * Get the NavigationService singleton instance\n * Lazy-loaded to avoid circular dependency issues\n */\n private get navigationService(): NavigationService {\n if (!this._navigationService) {\n this._navigationService = this.injector.get(NavigationService);\n }\n return this._navigationService;\n }\n\n /**\n * Get the neutral color used for system-wide resources\n */\n public get ExplorerAppColor(): string {\n return this.navigationService.ExplorerAppColor;\n }\n\n /**\n * Returns the current session ID, which is automatically created when the service is instantiated.\n */\n public get SessionId(): string {\n return (<GraphQLDataProvider>this.Provider).sessionId;\n }\n\n public get ResourceTypes(): MJResourceTypeEntity[] {\n return SharedService._resourceTypes;\n }\n public get ViewResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'user views')!;\n }\n public get RecordResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'records')!;\n }\n public get DashboardResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'dashboards')!;\n }\n public get ReportResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'reports')!;\n }\n public get SearchResultsResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'search results')!;\n }\n public get ListResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'lists')!;\n }\n public ResourceTypeByID(id: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => UUIDsEqual(rt.ID, id));\n }\n public ResourceTypeByName(name: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === name.trim().toLowerCase());\n }\n\n /**\n * Refreshes the data for the service. If OnlyIfNeeded is true, then the data is only refreshed if it hasn't been loaded yet.\n */\n public static async RefreshData(OnlyIfNeeded: boolean = false) {\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n const canProceed$ = SharedService.isLoading$.pipe(\n first(isLoading => !isLoading),\n tap(() => SharedService.isLoading$.next(true))\n );\n\n await firstValueFrom(canProceed$);\n\n try {\n // After waiting for the current loading operation to complete, check again\n // if _loaded is true and OnlyIfNeeded is true, return early\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n await SharedService.handleDataLoading();\n\n // Mark as loaded\n SharedService._loaded = true;\n } finally {\n // Ensure we always reset the loading flag\n SharedService.isLoading$.next(false);\n }\n }\n\n private static async handleDataLoading() {\n // make sure startup is done\n await StartupManager.Instance.Startup();\n\n this._resourceTypes = ResourcePermissionEngine.Instance.ResourceTypes;\n\n // Note: RefreshUserNotifications() removed here because MJNotificationService\n // already handles it via its own MJEventType.LoggedIn subscription. Calling it\n // from both places caused a duplicate User Notifications GraphQL request on login.\n } \n\n FormatColumnValue(col: ViewColumnInfo, value: any, maxLength: number = 0, trailingChars: string = \"...\") {\n if (value === null || value === undefined)\n return value;\n\n try {\n const retVal = col.EntityField.FormatValue(value, 0);\n if (maxLength > 0 && retVal && retVal.length > maxLength)\n return retVal.substring(0, maxLength) + trailingChars;\n else\n return retVal;\n }\n catch (e) {\n LogError(e);\n return value;\n }\n }\n\n public ConvertMarkdownStringToHtmlList(listType: HtmlListType, text: string): string {\n return ConvertMarkdownStringToHtmlList(listType, text) ?? text;\n }\n\n \n public InvokeManualResize(delay: number = 50) {\n return InvokeManualResize(delay, this);\n }\n\n public PushStatusUpdates(): Observable<string> {\n const gp: GraphQLDataProvider = <GraphQLDataProvider>this.Provider;\n return gp.PushStatusUpdates();\n }\n\n private _currentUserImage: string | Blob = '/assets/user.png';\n public get CurrentUserImage(): string | Blob {\n return this._currentUserImage;\n }\n public set CurrentUserImage(value: string | Blob) {\n this._currentUserImage = value;\n }\n\n /**\n * @deprecated Use MJNotificationService.UserNotifications instead\n */\n public static get UserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotifications instead\n */\n public static get UnreadUserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UnreadUserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotificationCount instead\n */\n public static get UnreadUserNotificationCount(): number {\n return MJNotificationService.UnreadUserNotificationCount;\n }\n\n /**\n * Utility method that returns true if child is a descendant of parent, false otherwise. \n */\n /**\n * @deprecated Use `IsDescendantElement` from `@memberjunction/ng-shared-generic`. This is a pure\n * DOM predicate with no Explorer coupling; keeping it here forced widgets that wanted it to\n * depend on Explorer. Delegates so existing callers are unaffected.\n */\n public static IsDescendant(parent: ElementRef, child: ElementRef) {\n return IsDescendantElement(parent, child);\n }\n\n\n /**\n * Creates a notification in the database and refreshes the UI. Returns the notification object.\n * @param title \n * @param message \n * @param resourceTypeId \n * @param resourceRecordId \n * @param resourceConfiguration Any object, it is converted to a string by JSON.stringify and stored in the database\n * @returns \n * @deprecated Use MJNotificationService.CreateNotification instead\n */\n public async CreateNotification(title: string, message: string, resourceTypeId: string | null, resourceRecordId: string | null, resourceConfiguration: any | null, displayToUser : boolean = true): Promise<MJUserNotificationEntity> {\n return this.mjNotificationsService.CreateNotification(title, message, resourceTypeId, resourceRecordId, resourceConfiguration, displayToUser);\n }\n\n /**\n * @deprecated Use MJNotificationService.RefreshUserNotifications instead\n */\n public static async RefreshUserNotifications() {\n MJNotificationService.RefreshUserNotifications();\n }\n\n /**\n * Creates a message that is not saved to the User Notifications table, but is displayed to the user.\n * @param message - text to display\n * @param style - display styling\n * @param hideAfter - option to auto hide after the specified delay in milliseconds\n * @deprecated Use MJNotificationService.CreateSimpleNotification instead\n */\n public CreateSimpleNotification(message: string, style: \"none\" | \"success\" | \"error\" | \"warning\" | \"info\" = \"success\", hideAfter?: number) {\n return this.mjNotificationsService.CreateSimpleNotification(message, style, hideAfter);\n }\n\n\n\n private _resourceTypeMap = [\n { routeSegment: 'record', name: 'records' },\n { routeSegment: 'view', name: 'user views' },\n { routeSegment: 'search', name: 'search results' },\n { routeSegment: 'report', name: 'reports' },\n { routeSegment: 'query', name: 'queries' },\n { routeSegment: 'dashboard', name: 'dashboards' },\n { routeSegment: 'list', name: 'lists' },\n \n ]\n /**\n * Maps a Resource Type record Name column to the corresponding route segment\n * @param resourceTypeName \n * @returns \n */\n public mapResourceTypeNameToRouteSegment(resourceTypeName: string) {\n const item = this._resourceTypeMap.find(rt => rt.name.trim().toLowerCase() === resourceTypeName.trim().toLowerCase());\n if (item)\n return item.routeSegment;\n else\n return null \n }\n\n /**\n * Maps a route segment to the corresponding Resource Type record Name column\n * @param resourceRouteSegment \n * @returns \n */\n public mapResourceTypeRouteSegmentToName(resourceRouteSegment: string) {\n const item = this._resourceTypeMap.find(rt => rt.routeSegment.trim().toLowerCase() === resourceRouteSegment.trim().toLowerCase());\n if (item)\n return item.name;\n else\n return null \n }\n\n /**\n * Opens an entity record in a new or existing tab\n * Uses the modern NavigationService for tab-based navigation\n */\n public OpenEntityRecord(entityName: string, recordPkey: CompositeKey) {\n try {\n console.log('SharedService.OpenEntityRecord called:', entityName, recordPkey.ToURLSegment());\n // Use NavigationService to open in new tab-based UX\n this.navigationService.OpenEntityRecord(entityName, recordPkey);\n }\n catch (e) {\n console.error('Error in OpenEntityRecord:', e);\n LogError(e);\n }\n }\n}\n\nexport const HtmlListType = {\n Unordered: 'Unordered',\n Ordered: 'Ordered',\n} as const;\n\nexport type HtmlListType = typeof HtmlListType[keyof typeof HtmlListType];\n\n\nexport const EventCodes = {\n ViewClicked: \"ViewClicked\",\n EntityRecordClicked: \"EntityRecordClicked\",\n AddDashboard: \"AddDashboard\",\n AddReport: \"AddReport\",\n AddQuery: \"AddQuery\",\n ViewCreated: \"ViewCreated\",\n ViewUpdated: \"ViewUpdated\",\n RunSearch: \"RunSearch\",\n ViewNotifications: \"ViewNotifications\",\n PushStatusUpdates: \"PushStatusUpdates\",\n UserNotificationsUpdated: \"UserNotificationsUpdated\",\n CloseCurrentTab: \"CloseCurrentTab\",\n ListCreated: \"ListCreated\",\n ListClicked: 'ListClicked',\n AvatarUpdated: 'AvatarUpdated'\n} as const;\n\nexport type EventCodes = typeof EventCodes[keyof typeof EventCodes];"]}
|
package/dist/public-api.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export * from './lib/shared.service';
|
|
|
5
5
|
export * from './lib/base-resource-component';
|
|
6
6
|
export * from './lib/base-navigation-component';
|
|
7
7
|
export * from './lib/navigation.service';
|
|
8
|
+
export * from './lib/record-open-style';
|
|
9
|
+
export * from './lib/record-tab-icon';
|
|
10
|
+
export * from './lib/explorer-breakpoint.service';
|
|
11
|
+
export * from './lib/safe-detect-changes';
|
|
8
12
|
export * from './lib/navigation.interfaces';
|
|
9
13
|
export * from './lib/activity.service';
|
|
10
14
|
export * from './lib/title.service';
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC"}
|
package/dist/public-api.js
CHANGED
|
@@ -8,6 +8,10 @@ export * from './lib/shared.service';
|
|
|
8
8
|
export * from './lib/base-resource-component';
|
|
9
9
|
export * from './lib/base-navigation-component';
|
|
10
10
|
export * from './lib/navigation.service';
|
|
11
|
+
export * from './lib/record-open-style';
|
|
12
|
+
export * from './lib/record-tab-icon';
|
|
13
|
+
export * from './lib/explorer-breakpoint.service';
|
|
14
|
+
export * from './lib/safe-detect-changes';
|
|
11
15
|
export * from './lib/navigation.interfaces';
|
|
12
16
|
export * from './lib/activity.service';
|
|
13
17
|
export * from './lib/title.service';
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,+DAA+D;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC","sourcesContent":["/*\n * Public API Surface\n */\n\nexport * from './lib/urlPipe';\nexport * from './lib/base-dashboard';\nexport * from './lib/simpleTextFormat';\nexport * from './lib/shared.service';\nexport * from './lib/base-resource-component'\nexport * from './lib/base-navigation-component';\nexport * from './lib/navigation.service';\nexport * from './lib/navigation.interfaces';\nexport * from './lib/activity.service';\nexport * from './lib/title.service';\nexport * from './lib/developer-mode.service';\nexport * from './lib/home-pin.types';\nexport * from './lib/home-pin.service';\nexport { SYSTEM_APP_ID } from './lib/navigation.service';\n// Re-export from ng-shared-generic for backwards compatibility\nexport * from '@memberjunction/ng-shared-generic';\nexport * from './module';"]}
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,+DAA+D;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,UAAU,CAAC","sourcesContent":["/*\n * Public API Surface\n */\n\nexport * from './lib/urlPipe';\nexport * from './lib/base-dashboard';\nexport * from './lib/simpleTextFormat';\nexport * from './lib/shared.service';\nexport * from './lib/base-resource-component'\nexport * from './lib/base-navigation-component';\nexport * from './lib/navigation.service';\nexport * from './lib/record-open-style';\nexport * from './lib/record-tab-icon';\nexport * from './lib/explorer-breakpoint.service';\nexport * from './lib/safe-detect-changes';\nexport * from './lib/navigation.interfaces';\nexport * from './lib/activity.service';\nexport * from './lib/title.service';\nexport * from './lib/developer-mode.service';\nexport * from './lib/home-pin.types';\nexport * from './lib/home-pin.service';\nexport { SYSTEM_APP_ID } from './lib/navigation.service';\n// Re-export from ng-shared-generic for backwards compatibility\nexport * from '@memberjunction/ng-shared-generic';\nexport * from './module';"]}
|
package/package.json
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-shared",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.0-edge.0",
|
|
4
4
|
"description": "MemberJunction: MJ Explorer Angular Shared Package - utility functions and other reusable elements used across other MJ Angular packages within the MJ Explorer App - do not use outside of MJ Explorer.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"/dist"
|
|
9
9
|
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "echo \"No tests configured yet\"",
|
|
12
|
-
"build": "ngc"
|
|
13
|
-
},
|
|
14
10
|
"keywords": [
|
|
15
11
|
"MemberJunction",
|
|
16
12
|
"Angular"
|
|
@@ -29,17 +25,17 @@
|
|
|
29
25
|
},
|
|
30
26
|
"dependencies": {
|
|
31
27
|
"@angular/platform-browser": "21.1.3",
|
|
32
|
-
"@memberjunction/ai-core-plus": "
|
|
33
|
-
"@memberjunction/ai-engine-base": "
|
|
34
|
-
"@memberjunction/core": "
|
|
35
|
-
"@memberjunction/core-entities": "
|
|
36
|
-
"@memberjunction/entity-communications-base": "
|
|
37
|
-
"@memberjunction/global": "
|
|
38
|
-
"@memberjunction/graphql-dataprovider": "
|
|
39
|
-
"@memberjunction/ng-base-application": "
|
|
40
|
-
"@memberjunction/ng-base-types": "
|
|
41
|
-
"@memberjunction/ng-notifications": "
|
|
42
|
-
"@memberjunction/ng-shared-generic": "
|
|
28
|
+
"@memberjunction/ai-core-plus": "6.1.0-edge.0",
|
|
29
|
+
"@memberjunction/ai-engine-base": "6.1.0-edge.0",
|
|
30
|
+
"@memberjunction/core": "6.1.0-edge.0",
|
|
31
|
+
"@memberjunction/core-entities": "6.1.0-edge.0",
|
|
32
|
+
"@memberjunction/entity-communications-base": "6.1.0-edge.0",
|
|
33
|
+
"@memberjunction/global": "6.1.0-edge.0",
|
|
34
|
+
"@memberjunction/graphql-dataprovider": "6.1.0-edge.0",
|
|
35
|
+
"@memberjunction/ng-base-application": "6.1.0-edge.0",
|
|
36
|
+
"@memberjunction/ng-base-types": "6.1.0-edge.0",
|
|
37
|
+
"@memberjunction/ng-notifications": "6.1.0-edge.0",
|
|
38
|
+
"@memberjunction/ng-shared-generic": "6.1.0-edge.0",
|
|
43
39
|
"html-to-image": "^1.11.11",
|
|
44
40
|
"tslib": "^2.8.1"
|
|
45
41
|
},
|
|
@@ -47,5 +43,11 @@
|
|
|
47
43
|
"repository": {
|
|
48
44
|
"type": "git",
|
|
49
45
|
"url": "https://github.com/MemberJunction/MJ"
|
|
46
|
+
},
|
|
47
|
+
"mjUILayer": "shell",
|
|
48
|
+
"scripts": {
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"test:watch": "vitest",
|
|
51
|
+
"build": "ngc"
|
|
50
52
|
}
|
|
51
|
-
}
|
|
53
|
+
}
|