@memberjunction/ng-entity-action-ux 0.0.1 → 5.44.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/README.md +175 -43
- package/dist/lib/ai-prompt-selector/ai-prompt-selector.component.d.ts +41 -0
- package/dist/lib/ai-prompt-selector/ai-prompt-selector.component.d.ts.map +1 -0
- package/dist/lib/ai-prompt-selector/ai-prompt-selector.component.js +231 -0
- package/dist/lib/ai-prompt-selector/ai-prompt-selector.component.js.map +1 -0
- package/dist/lib/base-entity-action-runtime-ux.d.ts +31 -0
- package/dist/lib/base-entity-action-runtime-ux.d.ts.map +1 -0
- package/dist/lib/base-entity-action-runtime-ux.js +34 -0
- package/dist/lib/base-entity-action-runtime-ux.js.map +1 -0
- package/dist/lib/entity-action-ux-host.component.d.ts +32 -0
- package/dist/lib/entity-action-ux-host.component.d.ts.map +1 -0
- package/dist/lib/entity-action-ux-host.component.js +89 -0
- package/dist/lib/entity-action-ux-host.component.js.map +1 -0
- package/dist/lib/field-rules-builder/field-rules-builder.component.d.ts +62 -0
- package/dist/lib/field-rules-builder/field-rules-builder.component.d.ts.map +1 -0
- package/dist/lib/field-rules-builder/field-rules-builder.component.js +406 -0
- package/dist/lib/field-rules-builder/field-rules-builder.component.js.map +1 -0
- package/dist/lib/field-rules-model.d.ts +32 -0
- package/dist/lib/field-rules-model.d.ts.map +1 -0
- package/dist/lib/field-rules-model.js +76 -0
- package/dist/lib/field-rules-model.js.map +1 -0
- package/dist/lib/prompt-grouping.d.ts +20 -0
- package/dist/lib/prompt-grouping.d.ts.map +1 -0
- package/dist/lib/prompt-grouping.js +30 -0
- package/dist/lib/prompt-grouping.js.map +1 -0
- package/dist/lib/record-process-runner/record-process-runner-ux.component.d.ts +76 -0
- package/dist/lib/record-process-runner/record-process-runner-ux.component.d.ts.map +1 -0
- package/dist/lib/record-process-runner/record-process-runner-ux.component.js +506 -0
- package/dist/lib/record-process-runner/record-process-runner-ux.component.js.map +1 -0
- package/dist/lib/runtime-ux-context.d.ts +52 -0
- package/dist/lib/runtime-ux-context.d.ts.map +1 -0
- package/dist/lib/runtime-ux-context.js +2 -0
- package/dist/lib/runtime-ux-context.js.map +1 -0
- package/dist/lib/scope.d.ts +12 -0
- package/dist/lib/scope.d.ts.map +1 -0
- package/dist/lib/scope.js +25 -0
- package/dist/lib/scope.js.map +1 -0
- package/dist/public-api.d.ts +15 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +27 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +47 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-ux-context.js","sourceRoot":"","sources":["../../src/lib/runtime-ux-context.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @fileoverview The contract a host passes to a runtime-UX driver. Framework-agnostic data only — the\n * entity being acted on, the scope of rows, and a driver-specific config bag — so a driver never needs to\n * know how the grid/list above it works.\n * @module @memberjunction/ng-entity-action-ux\n */\nimport type { EntityInfo, IMetadataProvider, UserInfo } from '@memberjunction/core';\n\n/** How a driver's work is scoped — mirrors the engine's `RecordProcessScopeOverride`. */\nexport type EntityActionUXScopeKind = 'records' | 'view' | 'list' | 'filter';\n\n/**\n * Everything a runtime-UX driver needs to do its job, assembled by the host from the grid/list state and\n * the entity action's configured params.\n */\nexport interface EntityActionUXContext {\n /** The entity being acted on. */\n EntityInfo: EntityInfo;\n /** How the target rows are scoped. */\n ScopeKind: EntityActionUXScopeKind;\n /** Selected row primary-key values (when `ScopeKind === 'records'`). */\n SelectedRecordIDs?: string[];\n /** Source view ID (when `ScopeKind === 'view'`). */\n ViewID?: string;\n /** Source list ID (when `ScopeKind === 'list'`). */\n ListID?: string;\n /** Filter expression (when `ScopeKind === 'filter'`). */\n Filter?: string;\n /**\n * Driver-specific configuration resolved from the entity action's params — e.g. the `RecordProcessID`\n * the {@link RecordProcessRunnerUXComponent} should run. Opaque to the framework.\n */\n Config?: Record<string, unknown>;\n /** Acting user (server-side calls; client-side may omit). */\n ContextUser?: UserInfo;\n /**\n * The metadata provider this work runs under (multi-provider support). When the host omits it, drivers\n * fall back to the global default provider. Drivers that issue a `RunView` / GraphQL call should scope\n * to this provider when present.\n */\n Provider?: IMetadataProvider;\n /** Display label for the action (used in driver headers when present). */\n ActionLabel?: string;\n}\n\n/** A driver's terminal outcome, emitted to the host. */\nexport interface EntityActionUXResult {\n /** True when the driver applied work; false when the user backed out without applying. */\n Completed: boolean;\n /** When true, the host should refresh the underlying grid/list (data changed). */\n RefreshData?: boolean;\n /** Optional human-readable summary (e.g. \"Updated 42 records\"). */\n Message?: string;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Pure mapping from a host-supplied {@link EntityActionUXContext} to the engine/transport
|
|
3
|
+
* {@link RecordProcessScope}. Extracted so it's unit-testable without instantiating a component.
|
|
4
|
+
* @module @memberjunction/ng-entity-action-ux
|
|
5
|
+
*/
|
|
6
|
+
import type { RecordProcessScopeOverride } from '@memberjunction/core-entities';
|
|
7
|
+
import type { EntityActionUXContext } from './runtime-ux-context';
|
|
8
|
+
/** Builds the run scope from the grid/list context the host assembled. */
|
|
9
|
+
export declare function buildRecordProcessScope(context: EntityActionUXContext): RecordProcessScopeOverride;
|
|
10
|
+
/** Renders an arbitrary value for the diff/preview table. */
|
|
11
|
+
export declare function displayValue(value: unknown): string;
|
|
12
|
+
//# sourceMappingURL=scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/lib/scope.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,GAAG,0BAA0B,CAYlG;AAED,6DAA6D;AAC7D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKnD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Builds the run scope from the grid/list context the host assembled. */
|
|
2
|
+
export function buildRecordProcessScope(context) {
|
|
3
|
+
switch (context.ScopeKind) {
|
|
4
|
+
case 'view':
|
|
5
|
+
return { Kind: 'view', ViewID: context.ViewID ?? '' };
|
|
6
|
+
case 'list':
|
|
7
|
+
return { Kind: 'list', ListID: context.ListID ?? '' };
|
|
8
|
+
case 'filter':
|
|
9
|
+
return { Kind: 'filter', Filter: context.Filter };
|
|
10
|
+
case 'records':
|
|
11
|
+
default:
|
|
12
|
+
return { Kind: 'records', RecordIDs: context.SelectedRecordIDs ?? [] };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/** Renders an arbitrary value for the diff/preview table. */
|
|
16
|
+
export function displayValue(value) {
|
|
17
|
+
if (value === null || value === undefined || value === '')
|
|
18
|
+
return '(empty)';
|
|
19
|
+
if (value instanceof Date)
|
|
20
|
+
return value.toLocaleString();
|
|
21
|
+
if (typeof value === 'object')
|
|
22
|
+
return JSON.stringify(value);
|
|
23
|
+
return String(value);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/lib/scope.ts"],"names":[],"mappings":"AAQA,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB,CAAC,OAA8B;IAClE,QAAQ,OAAO,CAAC,SAAS,EAAE,CAAC;QACxB,KAAK,MAAM;YACP,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAC1D,KAAK,MAAM;YACP,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAC1D,KAAK,QAAQ;YACT,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;QACtD,KAAK,SAAS,CAAC;QACf;YACI,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,EAAE,CAAC;IAC/E,CAAC;AACL,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5E,IAAI,KAAK,YAAY,IAAI;QAAE,OAAO,KAAK,CAAC,cAAc,EAAE,CAAC;IACzD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5D,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC","sourcesContent":["/**\n * @fileoverview Pure mapping from a host-supplied {@link EntityActionUXContext} to the engine/transport\n * {@link RecordProcessScope}. Extracted so it's unit-testable without instantiating a component.\n * @module @memberjunction/ng-entity-action-ux\n */\nimport type { RecordProcessScopeOverride } from '@memberjunction/core-entities';\nimport type { EntityActionUXContext } from './runtime-ux-context';\n\n/** Builds the run scope from the grid/list context the host assembled. */\nexport function buildRecordProcessScope(context: EntityActionUXContext): RecordProcessScopeOverride {\n switch (context.ScopeKind) {\n case 'view':\n return { Kind: 'view', ViewID: context.ViewID ?? '' };\n case 'list':\n return { Kind: 'list', ListID: context.ListID ?? '' };\n case 'filter':\n return { Kind: 'filter', Filter: context.Filter };\n case 'records':\n default:\n return { Kind: 'records', RecordIDs: context.SelectedRecordIDs ?? [] };\n }\n}\n\n/** Renders an arbitrary value for the diff/preview table. */\nexport function displayValue(value: unknown): string {\n if (value === null || value === undefined || value === '') return '(empty)';\n if (value instanceof Date) return value.toLocaleString();\n if (typeof value === 'object') return JSON.stringify(value);\n return String(value);\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './lib/runtime-ux-context';
|
|
2
|
+
export * from './lib/base-entity-action-runtime-ux';
|
|
3
|
+
export * from './lib/entity-action-ux-host.component';
|
|
4
|
+
export * from './lib/field-rules-model';
|
|
5
|
+
export * from './lib/prompt-grouping';
|
|
6
|
+
export * from './lib/scope';
|
|
7
|
+
export * from './lib/record-process-runner/record-process-runner-ux.component';
|
|
8
|
+
export * from './lib/ai-prompt-selector/ai-prompt-selector.component';
|
|
9
|
+
export * from './lib/field-rules-builder/field-rules-builder.component';
|
|
10
|
+
/**
|
|
11
|
+
* Tree-shaking guard: references the driver classes so bundlers keep their `@RegisterClass` side effects.
|
|
12
|
+
* Call once from a consumer's bootstrap (the way other MJ packages keep dynamically-resolved classes alive).
|
|
13
|
+
*/
|
|
14
|
+
export declare function LoadEntityActionUX(): void;
|
|
15
|
+
//# sourceMappingURL=public-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AAGtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAG5B,cAAc,gEAAgE,CAAC;AAG/E,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AAIxE;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// @memberjunction/ng-entity-action-ux
|
|
2
|
+
// Pluggable runtime-UX framework for entity actions.
|
|
3
|
+
// Framework
|
|
4
|
+
export * from './lib/runtime-ux-context';
|
|
5
|
+
export * from './lib/base-entity-action-runtime-ux';
|
|
6
|
+
export * from './lib/entity-action-ux-host.component';
|
|
7
|
+
// Pure model + helpers (Angular-free, unit-testable)
|
|
8
|
+
export * from './lib/field-rules-model';
|
|
9
|
+
export * from './lib/prompt-grouping';
|
|
10
|
+
export * from './lib/scope';
|
|
11
|
+
// Drivers
|
|
12
|
+
export * from './lib/record-process-runner/record-process-runner-ux.component';
|
|
13
|
+
// Authoring components
|
|
14
|
+
export * from './lib/ai-prompt-selector/ai-prompt-selector.component';
|
|
15
|
+
export * from './lib/field-rules-builder/field-rules-builder.component';
|
|
16
|
+
import { RecordProcessRunnerUXComponent } from './lib/record-process-runner/record-process-runner-ux.component';
|
|
17
|
+
/**
|
|
18
|
+
* Tree-shaking guard: references the driver classes so bundlers keep their `@RegisterClass` side effects.
|
|
19
|
+
* Call once from a consumer's bootstrap (the way other MJ packages keep dynamically-resolved classes alive).
|
|
20
|
+
*/
|
|
21
|
+
export function LoadEntityActionUX() {
|
|
22
|
+
const _keep = [RecordProcessRunnerUXComponent];
|
|
23
|
+
if (_keep.length === 0) {
|
|
24
|
+
throw new Error('unreachable');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=public-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qDAAqD;AAErD,YAAY;AACZ,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AAEtD,qDAAqD;AACrD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAE5B,UAAU;AACV,cAAc,gEAAgE,CAAC;AAE/E,uBAAuB;AACvB,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AAExE,OAAO,EAAE,8BAA8B,EAAE,MAAM,gEAAgE,CAAC;AAEhH;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAC9B,MAAM,KAAK,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAC/C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IACnC,CAAC;AACL,CAAC","sourcesContent":["// @memberjunction/ng-entity-action-ux\n// Pluggable runtime-UX framework for entity actions.\n\n// Framework\nexport * from './lib/runtime-ux-context';\nexport * from './lib/base-entity-action-runtime-ux';\nexport * from './lib/entity-action-ux-host.component';\n\n// Pure model + helpers (Angular-free, unit-testable)\nexport * from './lib/field-rules-model';\nexport * from './lib/prompt-grouping';\nexport * from './lib/scope';\n\n// Drivers\nexport * from './lib/record-process-runner/record-process-runner-ux.component';\n\n// Authoring components\nexport * from './lib/ai-prompt-selector/ai-prompt-selector.component';\nexport * from './lib/field-rules-builder/field-rules-builder.component';\n\nimport { RecordProcessRunnerUXComponent } from './lib/record-process-runner/record-process-runner-ux.component';\n\n/**\n * Tree-shaking guard: references the driver classes so bundlers keep their `@RegisterClass` side effects.\n * Call once from a consumer's bootstrap (the way other MJ packages keep dynamically-resolved classes alive).\n */\nexport function LoadEntityActionUX(): void {\n const _keep = [RecordProcessRunnerUXComponent];\n if (_keep.length === 0) {\n throw new Error('unreachable');\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-entity-action-ux",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.44.0",
|
|
4
|
+
"description": "MemberJunction: Pluggable runtime-UX framework for entity actions — a registry-resolved component seam that lets an entity action mount a rich, interactive UI (e.g. the Record Process bulk-update runner) instead of firing blind.",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "npm run clean && ngc",
|
|
12
|
+
"clean": "rimraf dist",
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"test:watch": "vitest"
|
|
15
|
+
},
|
|
5
16
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
17
|
+
"MemberJunction",
|
|
18
|
+
"Angular",
|
|
19
|
+
"Entity Actions",
|
|
20
|
+
"Runtime UX",
|
|
21
|
+
"Record Process"
|
|
22
|
+
],
|
|
23
|
+
"author": "MemberJunction.com",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@angular/compiler": "21.1.3",
|
|
27
|
+
"@angular/compiler-cli": "21.1.3",
|
|
28
|
+
"rimraf": "^5.0.0",
|
|
29
|
+
"vitest": "^4.0.18"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@angular/common": "21.1.3",
|
|
33
|
+
"@angular/core": "21.1.3",
|
|
34
|
+
"@angular/forms": "21.1.3",
|
|
35
|
+
"rxjs": "^7.8.2"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@memberjunction/core": "5.44.0",
|
|
39
|
+
"@memberjunction/core-entities": "5.44.0",
|
|
40
|
+
"@memberjunction/global": "5.44.0",
|
|
41
|
+
"@memberjunction/graphql-dataprovider": "5.44.0",
|
|
42
|
+
"@memberjunction/ng-ui-components": "5.44.0",
|
|
43
|
+
"@memberjunction/record-set-processor-base": "5.44.0",
|
|
44
|
+
"tslib": "^2.8.1"
|
|
45
|
+
},
|
|
46
|
+
"sideEffects": false,
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/MemberJunction/MJ"
|
|
50
|
+
}
|
|
10
51
|
}
|