@memberjunction/ng-artifacts 5.40.1 → 5.41.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/lib/__tests__/interactive-form-apply.service.test.js +6 -1
- package/dist/lib/__tests__/interactive-form-apply.service.test.js.map +1 -1
- package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts +14 -2
- package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/plugins/component-artifact-viewer.component.js +165 -62
- package/dist/lib/components/plugins/component-artifact-viewer.component.js.map +1 -1
- package/dist/lib/components/plugins/component-permission-evaluation.d.ts +19 -0
- package/dist/lib/components/plugins/component-permission-evaluation.d.ts.map +1 -0
- package/dist/lib/components/plugins/component-permission-evaluation.js +64 -0
- package/dist/lib/components/plugins/component-permission-evaluation.js.map +1 -0
- package/dist/lib/services/interactive-form-apply.service.d.ts +15 -0
- package/dist/lib/services/interactive-form-apply.service.d.ts.map +1 -1
- package/dist/lib/services/interactive-form-apply.service.js +91 -18
- package/dist/lib/services/interactive-form-apply.service.js.map +1 -1
- package/package.json +19 -19
|
@@ -36,9 +36,14 @@ vi.mock('@angular/core', () => ({
|
|
|
36
36
|
}));
|
|
37
37
|
const mockDialog = {
|
|
38
38
|
Open: () => ({
|
|
39
|
+
// The real MJDialogRef.Result emits the clicked MJDialogAction object
|
|
40
|
+
// ({ text, primary }) — the service detects intent via `action.primary`.
|
|
41
|
+
// Map the test's 'apply'/'cancel' intent onto that shape.
|
|
39
42
|
Result: {
|
|
40
43
|
subscribe: (cb) => {
|
|
41
|
-
cb(
|
|
44
|
+
cb(hoisted.dialogResult === 'apply'
|
|
45
|
+
? { text: 'Apply', primary: true }
|
|
46
|
+
: { text: 'Cancel' });
|
|
42
47
|
},
|
|
43
48
|
},
|
|
44
49
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-form-apply.service.test.js","sourceRoot":"","sources":["../../../src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;SAC1D,CAAC,CAAC;QACH,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,YAAY,EAAE;YACtC,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,aAAa;YACzB,OAAO,EAAE,sBAAsB;SAClC,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,IAAI,2BAA2B,EAAE,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;QAC7E,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/**\n * End-to-end-ish coverage for the Apply-to-my-form flow.\n *\n * The service is the join point that closes the chat-artifact → action loop:\n * form-aware artifact viewer → applyFormRequested →\n * conversation-chat-area / artifact-resource → ConfirmAndApply →\n * Get Active Form For Entity (action) → Create or Modify (action)\n *\n * These tests mock the dialog, notifications, and the GraphQL action\n * client so we can drive both branches (no-existing → Create; existing →\n * Modify) and the cancellation path, plus the failure surfaces. Without\n * this suite the original \"Apply button is wired to nothing\" bug would\n * regress silently — the unit tests on the actions wouldn't notice.\n */\nimport { describe, it, expect, vi, beforeEach } from 'vitest';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\n\n// ─── Hoisted state buckets the mocks read/write ──────────────────────────\n\nconst hoisted = vi.hoisted(() => ({\n dialogResult: 'apply' as 'apply' | 'cancel',\n actionResponses: new Map<string, { Success: boolean; Message?: string; ResultCode?: string }>(),\n actionCalls: [] as Array<{ id: string; params: unknown }>,\n runViewResponses: [] as Array<{ Success: boolean; Results: Array<{ ID: string }>; ErrorMessage?: string }>,\n notifications: [] as Array<{ message: string; type: string }>,\n}));\n\n// ─── Module mocks ────────────────────────────────────────────────────────\n\nvi.mock('@angular/core', () => ({\n Injectable: () => (target: Function) => target,\n inject: (token: { Instance?: unknown } | typeof Object) => {\n // Return the mock singletons by class identity.\n const name = (token as { name?: string }).name ?? '';\n if (name === 'MJDialogService') return mockDialog;\n if (name === 'MJNotificationService') return mockNotifications;\n return {};\n },\n}));\n\nconst mockDialog = {\n Open: () => ({\n Result: {\n subscribe: (cb: (r: { result: string }) => void) => {\n cb({ result: hoisted.dialogResult });\n },\n },\n }),\n};\n\nconst mockNotifications = {\n CreateSimpleNotification: (message: string, type: string) => {\n hoisted.notifications.push({ message, type });\n },\n};\n\nvi.mock('@memberjunction/ng-ui-components', () => ({ MJDialogService: class MJDialogService {} }));\nvi.mock('@memberjunction/ng-notifications', () => ({ MJNotificationService: class MJNotificationService {} }));\n\nvi.mock('@memberjunction/graphql-dataprovider', () => ({\n GraphQLActionClient: class {\n async RunAction(actionId: string, params: unknown) {\n hoisted.actionCalls.push({ id: actionId, params });\n return hoisted.actionResponses.get(actionId) ?? { Success: false, Message: 'mock: no response set' };\n }\n },\n GraphQLDataProvider: class {},\n}));\n\nvi.mock('@memberjunction/core', async () => {\n const actual = await vi.importActual<Record<string, unknown>>('@memberjunction/core');\n return {\n ...actual,\n Metadata: { Provider: null },\n LogError: vi.fn(),\n RunView: class {\n async RunView() {\n return hoisted.runViewResponses.shift() ?? { Success: true, Results: [] };\n }\n },\n };\n});\n\n// ─── Test setup ──────────────────────────────────────────────────────────\n\nimport { InteractiveFormApplyService } from '../services/interactive-form-apply.service';\n\nfunction mockProvider(overrides: Partial<{ EntityByName: () => unknown; CurrentUser: unknown }> = {}) {\n return {\n EntityByName: () => ({ ID: 'ENT-1', Name: 'MJ: Apps' }),\n CurrentUser: { ID: 'U1', Name: 'Test' },\n ExecuteGQL: () => Promise.resolve({}), // marks it as a GraphQL provider\n ...overrides,\n } as unknown as Parameters<InteractiveFormApplyService['ConfirmAndApply']>[2];\n}\n\nfunction spec(over: Partial<ComponentSpec> = {}): ComponentSpec {\n return { name: 'Form', componentRole: 'form', location: 'embedded', code: '() => null', ...over } as ComponentSpec;\n}\n\nbeforeEach(() => {\n hoisted.dialogResult = 'apply';\n hoisted.actionResponses.clear();\n hoisted.actionCalls.length = 0;\n hoisted.runViewResponses.length = 0;\n hoisted.notifications.length = 0;\n});\n\ndescribe('InteractiveFormApplyService', () => {\n\n it('returns failure when no metadata provider is available', async () => {\n const svc = new InteractiveFormApplyService();\n // No provider — neither passed nor on Metadata.Provider.\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps');\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/No metadata provider/);\n });\n\n it('returns failure when the declared entity is not registered', async () => {\n const svc = new InteractiveFormApplyService();\n const provider = mockProvider({ EntityByName: () => undefined });\n const result = await svc.ConfirmAndApply(spec(), 'MJ: NotAnEntity', provider);\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/not registered/);\n });\n\n it('cancellation by user yields a friendly failure result, no action invoked', async () => {\n hoisted.dialogResult = 'cancel';\n // Seed action-id lookup so the path past dialog is reachable in case the\n // implementation order changes; with dialog returning 'cancel' the\n // Create action should never be called.\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({ Active: null, Variants: [] }),\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/Cancelled/);\n // Only Get Active Form should have been called (to populate dialog text);\n // Create / Modify should NOT have been called.\n const calls = hoisted.actionCalls.map(c => c.id);\n expect(calls.filter(id => id !== 'ACT-GET-ACTIVE')).toEqual([]);\n });\n\n it('no existing override → calls Create Interactive Form', async () => {\n // RunView lookups: each call resolves the next action ID.\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-CREATE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({ Active: null, Variants: [] }),\n });\n hoisted.actionResponses.set('ACT-CREATE', {\n Success: true,\n Message: JSON.stringify({ ComponentID: 'NEW-COMP', OverrideID: 'NEW-OVER', Version: '1.0.0' }),\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec({ name: 'CompactForm' }), 'MJ: Apps', mockProvider());\n\n expect(result.Success).toBe(true);\n expect(result.Mode).toBe('create');\n expect(result.OverrideID).toBe('NEW-OVER');\n expect(result.Version).toBe('1.0.0');\n const calls = hoisted.actionCalls.map(c => c.id);\n expect(calls).toEqual(['ACT-GET-ACTIVE', 'ACT-CREATE']);\n // Success notification surfaced.\n expect(hoisted.notifications.some(n => n.type === 'success')).toBe(true);\n });\n\n it('existing Active override → calls Modify Interactive Form (Pending sibling produced)', async () => {\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-MODIFY' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({\n Active: { OverrideID: 'OVER-EXISTING', ComponentID: 'COMP-EXISTING', ComponentVersion: '1.0.0' },\n Variants: [],\n }),\n });\n hoisted.actionResponses.set('ACT-MODIFY', {\n Success: true,\n Message: JSON.stringify({ Mode: 'new-version', ComponentID: 'NEW-COMP', OverrideID: 'NEW-OVER', Version: '1.1.0' }),\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n\n expect(result.Success).toBe(true);\n expect(result.Mode).toBe('modify-new-version');\n expect(result.Version).toBe('1.1.0');\n const calls = hoisted.actionCalls.map(c => c.id);\n expect(calls).toEqual(['ACT-GET-ACTIVE', 'ACT-MODIFY']);\n });\n\n it('Get Active failure short-circuits with an error', async () => {\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: false,\n Message: 'DB unavailable',\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/Could not check for existing override/);\n });\n\n it('failure on the Create action surfaces the error notification', async () => {\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-CREATE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({ Active: null, Variants: [] }),\n });\n hoisted.actionResponses.set('ACT-CREATE', {\n Success: false,\n ResultCode: 'LINT_FAILED',\n Message: 'Spec failed linting.',\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n expect(result.Success).toBe(false);\n expect(hoisted.notifications.some(n => n.type === 'error')).toBe(true);\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-form-apply.service.test.js","sourceRoot":"","sources":["../../../src/lib/__tests__/interactive-form-apply.service.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAG9D,4EAA4E;AAE5E,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9B,YAAY,EAAE,OAA6B;IAC3C,eAAe,EAAE,IAAI,GAAG,EAAuE;IAC/F,WAAW,EAAE,EAA4C;IACzD,gBAAgB,EAAE,EAAw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9C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;QAC7E,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/**\n * End-to-end-ish coverage for the Apply-to-my-form flow.\n *\n * The service is the join point that closes the chat-artifact → action loop:\n * form-aware artifact viewer → applyFormRequested →\n * conversation-chat-area / artifact-resource → ConfirmAndApply →\n * Get Active Form For Entity (action) → Create or Modify (action)\n *\n * These tests mock the dialog, notifications, and the GraphQL action\n * client so we can drive both branches (no-existing → Create; existing →\n * Modify) and the cancellation path, plus the failure surfaces. Without\n * this suite the original \"Apply button is wired to nothing\" bug would\n * regress silently — the unit tests on the actions wouldn't notice.\n */\nimport { describe, it, expect, vi, beforeEach } from 'vitest';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\n\n// ─── Hoisted state buckets the mocks read/write ──────────────────────────\n\nconst hoisted = vi.hoisted(() => ({\n dialogResult: 'apply' as 'apply' | 'cancel',\n actionResponses: new Map<string, { Success: boolean; Message?: string; ResultCode?: string }>(),\n actionCalls: [] as Array<{ id: string; params: unknown }>,\n runViewResponses: [] as Array<{ Success: boolean; Results: Array<{ ID: string }>; ErrorMessage?: string }>,\n notifications: [] as Array<{ message: string; type: string }>,\n}));\n\n// ─── Module mocks ────────────────────────────────────────────────────────\n\nvi.mock('@angular/core', () => ({\n Injectable: () => (target: Function) => target,\n inject: (token: { Instance?: unknown } | typeof Object) => {\n // Return the mock singletons by class identity.\n const name = (token as { name?: string }).name ?? '';\n if (name === 'MJDialogService') return mockDialog;\n if (name === 'MJNotificationService') return mockNotifications;\n return {};\n },\n}));\n\nconst mockDialog = {\n Open: () => ({\n // The real MJDialogRef.Result emits the clicked MJDialogAction object\n // ({ text, primary }) — the service detects intent via `action.primary`.\n // Map the test's 'apply'/'cancel' intent onto that shape.\n Result: {\n subscribe: (cb: (r: { text: string; primary?: boolean }) => void) => {\n cb(\n hoisted.dialogResult === 'apply'\n ? { text: 'Apply', primary: true }\n : { text: 'Cancel' },\n );\n },\n },\n }),\n};\n\nconst mockNotifications = {\n CreateSimpleNotification: (message: string, type: string) => {\n hoisted.notifications.push({ message, type });\n },\n};\n\nvi.mock('@memberjunction/ng-ui-components', () => ({ MJDialogService: class MJDialogService {} }));\nvi.mock('@memberjunction/ng-notifications', () => ({ MJNotificationService: class MJNotificationService {} }));\n\nvi.mock('@memberjunction/graphql-dataprovider', () => ({\n GraphQLActionClient: class {\n async RunAction(actionId: string, params: unknown) {\n hoisted.actionCalls.push({ id: actionId, params });\n return hoisted.actionResponses.get(actionId) ?? { Success: false, Message: 'mock: no response set' };\n }\n },\n GraphQLDataProvider: class {},\n}));\n\nvi.mock('@memberjunction/core', async () => {\n const actual = await vi.importActual<Record<string, unknown>>('@memberjunction/core');\n return {\n ...actual,\n Metadata: { Provider: null },\n LogError: vi.fn(),\n RunView: class {\n async RunView() {\n return hoisted.runViewResponses.shift() ?? { Success: true, Results: [] };\n }\n },\n };\n});\n\n// ─── Test setup ──────────────────────────────────────────────────────────\n\nimport { InteractiveFormApplyService } from '../services/interactive-form-apply.service';\n\nfunction mockProvider(overrides: Partial<{ EntityByName: () => unknown; CurrentUser: unknown }> = {}) {\n return {\n EntityByName: () => ({ ID: 'ENT-1', Name: 'MJ: Apps' }),\n CurrentUser: { ID: 'U1', Name: 'Test' },\n ExecuteGQL: () => Promise.resolve({}), // marks it as a GraphQL provider\n ...overrides,\n } as unknown as Parameters<InteractiveFormApplyService['ConfirmAndApply']>[2];\n}\n\nfunction spec(over: Partial<ComponentSpec> = {}): ComponentSpec {\n return { name: 'Form', componentRole: 'form', location: 'embedded', code: '() => null', ...over } as ComponentSpec;\n}\n\nbeforeEach(() => {\n hoisted.dialogResult = 'apply';\n hoisted.actionResponses.clear();\n hoisted.actionCalls.length = 0;\n hoisted.runViewResponses.length = 0;\n hoisted.notifications.length = 0;\n});\n\ndescribe('InteractiveFormApplyService', () => {\n\n it('returns failure when no metadata provider is available', async () => {\n const svc = new InteractiveFormApplyService();\n // No provider — neither passed nor on Metadata.Provider.\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps');\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/No metadata provider/);\n });\n\n it('returns failure when the declared entity is not registered', async () => {\n const svc = new InteractiveFormApplyService();\n const provider = mockProvider({ EntityByName: () => undefined });\n const result = await svc.ConfirmAndApply(spec(), 'MJ: NotAnEntity', provider);\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/not registered/);\n });\n\n it('cancellation by user yields a friendly failure result, no action invoked', async () => {\n hoisted.dialogResult = 'cancel';\n // Seed action-id lookup so the path past dialog is reachable in case the\n // implementation order changes; with dialog returning 'cancel' the\n // Create action should never be called.\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({ Active: null, Variants: [] }),\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/Cancelled/);\n // Only Get Active Form should have been called (to populate dialog text);\n // Create / Modify should NOT have been called.\n const calls = hoisted.actionCalls.map(c => c.id);\n expect(calls.filter(id => id !== 'ACT-GET-ACTIVE')).toEqual([]);\n });\n\n it('no existing override → calls Create Interactive Form', async () => {\n // RunView lookups: each call resolves the next action ID.\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-CREATE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({ Active: null, Variants: [] }),\n });\n hoisted.actionResponses.set('ACT-CREATE', {\n Success: true,\n Message: JSON.stringify({ ComponentID: 'NEW-COMP', OverrideID: 'NEW-OVER', Version: '1.0.0' }),\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec({ name: 'CompactForm' }), 'MJ: Apps', mockProvider());\n\n expect(result.Success).toBe(true);\n expect(result.Mode).toBe('create');\n expect(result.OverrideID).toBe('NEW-OVER');\n expect(result.Version).toBe('1.0.0');\n const calls = hoisted.actionCalls.map(c => c.id);\n expect(calls).toEqual(['ACT-GET-ACTIVE', 'ACT-CREATE']);\n // Success notification surfaced.\n expect(hoisted.notifications.some(n => n.type === 'success')).toBe(true);\n });\n\n it('existing Active override → calls Modify Interactive Form (Pending sibling produced)', async () => {\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-MODIFY' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({\n Active: { OverrideID: 'OVER-EXISTING', ComponentID: 'COMP-EXISTING', ComponentVersion: '1.0.0' },\n Variants: [],\n }),\n });\n hoisted.actionResponses.set('ACT-MODIFY', {\n Success: true,\n Message: JSON.stringify({ Mode: 'new-version', ComponentID: 'NEW-COMP', OverrideID: 'NEW-OVER', Version: '1.1.0' }),\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n\n expect(result.Success).toBe(true);\n expect(result.Mode).toBe('modify-new-version');\n expect(result.Version).toBe('1.1.0');\n const calls = hoisted.actionCalls.map(c => c.id);\n expect(calls).toEqual(['ACT-GET-ACTIVE', 'ACT-MODIFY']);\n });\n\n it('Get Active failure short-circuits with an error', async () => {\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: false,\n Message: 'DB unavailable',\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n expect(result.Success).toBe(false);\n expect(result.Message).toMatch(/Could not check for existing override/);\n });\n\n it('failure on the Create action surfaces the error notification', async () => {\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-GET-ACTIVE' }] });\n hoisted.runViewResponses.push({ Success: true, Results: [{ ID: 'ACT-CREATE' }] });\n hoisted.actionResponses.set('ACT-GET-ACTIVE', {\n Success: true,\n Message: JSON.stringify({ Active: null, Variants: [] }),\n });\n hoisted.actionResponses.set('ACT-CREATE', {\n Success: false,\n ResultCode: 'LINT_FAILED',\n Message: 'Spec failed linting.',\n });\n\n const svc = new InteractiveFormApplyService();\n const result = await svc.ConfirmAndApply(spec(), 'MJ: Apps', mockProvider());\n expect(result.Success).toBe(false);\n expect(hoisted.notifications.some(n => n.type === 'error')).toBe(true);\n });\n});\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AfterViewInit, OnInit, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, OnInit, OnChanges, SimpleChanges, EventEmitter, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { BaseArtifactViewerPluginComponent, ArtifactViewerTab } from '../base-artifact-viewer.component';
|
|
3
3
|
import { MJReactComponent, AngularAdapterService } from '@memberjunction/ng-react';
|
|
4
4
|
import { ComponentSpec } from '@memberjunction/interactive-component-types';
|
|
5
5
|
import { BaseEntity, CompositeKey, DataSnapshot, EntityInfo } from '@memberjunction/core';
|
|
6
|
+
import { PermissionEvaluationResult } from './component-permission-evaluation';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* Viewer component for interactive Component artifacts (React-based UI components)
|
|
@@ -14,6 +15,7 @@ import * as i0 from "@angular/core";
|
|
|
14
15
|
*/
|
|
15
16
|
export declare class ComponentArtifactViewerComponent extends BaseArtifactViewerPluginComponent implements OnInit, AfterViewInit, OnChanges {
|
|
16
17
|
private adapter;
|
|
18
|
+
private cdr;
|
|
17
19
|
reactComponent?: MJReactComponent;
|
|
18
20
|
tabsChanged: EventEmitter<void>;
|
|
19
21
|
openEntityRecord: EventEmitter<{
|
|
@@ -61,6 +63,7 @@ export declare class ComponentArtifactViewerComponent extends BaseArtifactViewer
|
|
|
61
63
|
hasError: boolean;
|
|
62
64
|
errorMessage: string;
|
|
63
65
|
errorDetails: string;
|
|
66
|
+
permissionResult: PermissionEvaluationResult | null;
|
|
64
67
|
/**
|
|
65
68
|
* Whether this plugin has content to display in the Display tab.
|
|
66
69
|
* Returns true only if the component has code that can be rendered.
|
|
@@ -71,7 +74,7 @@ export declare class ComponentArtifactViewerComponent extends BaseArtifactViewer
|
|
|
71
74
|
* pluginLoaded fires, before React component finishes loading.
|
|
72
75
|
*/
|
|
73
76
|
get hasDisplayContent(): boolean;
|
|
74
|
-
constructor(adapter: AngularAdapterService);
|
|
77
|
+
constructor(adapter: AngularAdapterService, cdr: ChangeDetectorRef);
|
|
75
78
|
ngOnChanges(changes: SimpleChanges): Promise<void>;
|
|
76
79
|
/**
|
|
77
80
|
* Synchronously load the component spec from artifact content.
|
|
@@ -84,6 +87,15 @@ export declare class ComponentArtifactViewerComponent extends BaseArtifactViewer
|
|
|
84
87
|
* fires for the first time.
|
|
85
88
|
*/
|
|
86
89
|
private loadComponentSpec;
|
|
90
|
+
/**
|
|
91
|
+
* Evaluate whether the current user has sufficient permissions for
|
|
92
|
+
* all entities and queries referenced in the component's dataRequirements.
|
|
93
|
+
* Uses the best available spec: resolved (from registry) > cached > stripped artifact.
|
|
94
|
+
* Runs synchronously against already-loaded client-side metadata.
|
|
95
|
+
*/
|
|
96
|
+
private evaluatePermissions;
|
|
97
|
+
/** Whether the component should be blocked from rendering due to missing permissions. */
|
|
98
|
+
get isPermissionBlocked(): boolean;
|
|
87
99
|
/**
|
|
88
100
|
* Component initialization.
|
|
89
101
|
* Note: loadComponentSpec() is called in ngOnChanges which runs before ngOnInit,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-artifact-viewer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/plugins/component-artifact-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAU,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"component-artifact-viewer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/plugins/component-artifact-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAU,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE/I,OAAO,EAAE,iCAAiC,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAA8B,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAExG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAqB,MAAM,sBAAsB,CAAC;AAE7G,OAAO,EAAgC,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;;AAE7G;;;;;;;GAOG;AACH,qBAOa,gCAAiC,SAAQ,iCAAkC,YAAW,MAAM,EAAE,aAAa,EAAE,SAAS;IA+ErH,OAAO,CAAC,OAAO;IAAyB,OAAO,CAAC,GAAG;IA9ElC,cAAc,CAAC,EAAE,gBAAgB,CAAC;IACrD,WAAW,qBAA4B;IACvC,gBAAgB;oBAAiC,MAAM;sBAAgB,YAAY;OAAK;IAElG;;;;;OA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