@memberjunction/interactive-component-types 6.2.0-edge.1 → 6.2.0-edge.3
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/component-spec.d.ts +18 -1
- package/dist/component-spec.d.ts.map +1 -1
- package/dist/component-spec.js.map +1 -1
- package/dist/forms/form-contribution-key.d.ts +50 -0
- package/dist/forms/form-contribution-key.d.ts.map +1 -0
- package/dist/forms/form-contribution-key.js +86 -0
- package/dist/forms/form-contribution-key.js.map +1 -0
- package/dist/forms/form-contribution-spec.d.ts +85 -0
- package/dist/forms/form-contribution-spec.d.ts.map +1 -0
- package/dist/forms/form-contribution-spec.js +92 -0
- package/dist/forms/form-contribution-spec.js.map +1 -0
- package/dist/forms/form-panel-events.d.ts +36 -0
- package/dist/forms/form-panel-events.d.ts.map +1 -0
- package/dist/forms/form-panel-events.js +20 -0
- package/dist/forms/form-panel-events.js.map +1 -0
- package/dist/forms/form-panel-host-props.d.ts +36 -0
- package/dist/forms/form-panel-host-props.d.ts.map +1 -0
- package/dist/forms/form-panel-host-props.js +2 -0
- package/dist/forms/form-panel-host-props.js.map +1 -0
- package/dist/forms/form-variant-preference.d.ts +24 -0
- package/dist/forms/form-variant-preference.d.ts.map +1 -0
- package/dist/forms/form-variant-preference.js +26 -0
- package/dist/forms/form-variant-preference.js.map +1 -0
- package/dist/forms/index.d.ts +5 -0
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +5 -0
- package/dist/forms/index.js.map +1 -1
- package/package.json +3 -3
package/dist/component-spec.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import { ComponentEvent, ComponentProperty } from "./component-props-events.js";
|
|
|
2
2
|
import { ComponentDataRequirements } from "./data-requirements.js";
|
|
3
3
|
import { ComponentLibraryDependency } from "./library-dependency.js";
|
|
4
4
|
import { ComponentTypeDefinition } from "./component-constraints.js";
|
|
5
|
+
import type { FormContributionSpec } from "./forms/form-contribution-spec.js";
|
|
5
6
|
/**
|
|
6
7
|
* Contract a component commits to implementing. Hosts use this to decide how
|
|
7
8
|
* to mount the component and what props/events to wire up. Authoring agents
|
|
8
9
|
* use it to target a known shape.
|
|
9
10
|
*/
|
|
10
|
-
export type ComponentRole = 'form' | 'dashboard' | 'widget' | 'report' | 'detail-pane';
|
|
11
|
+
export type ComponentRole = 'form' | 'form-panel' | 'dashboard' | 'widget' | 'report' | 'detail-pane';
|
|
11
12
|
/**
|
|
12
13
|
* Tracks the current change being applied to this component.
|
|
13
14
|
* Populated by Impact Assessor at the start of a modification flow,
|
|
@@ -204,11 +205,27 @@ export declare class ComponentSpec {
|
|
|
204
205
|
*
|
|
205
206
|
* - `form`: implements `FormHostProps` + standard form events/methods (see `@memberjunction/interactivecomponents/forms`).
|
|
206
207
|
* Hosted by `InteractiveFormComponent` against a `BaseEntity` record.
|
|
208
|
+
* - `form-panel`: one contribution on an entity form (hero, pane, related-grid claim). Implements
|
|
209
|
+
* `FormPanelHostProps` + `FormPanelEventNames` / `FormPanelMethodNames`; hosted by
|
|
210
|
+
* `InteractiveFormPanelComponent` inside `<mj-form-panel-slot>`.
|
|
207
211
|
* - `dashboard` | `widget` | `report` | `detail-pane`: reserved for future role contracts.
|
|
208
212
|
*
|
|
209
213
|
* Unset = a generic component, mounted directly. No behavior change for existing components.
|
|
210
214
|
*/
|
|
211
215
|
componentRole?: ComponentRole;
|
|
216
|
+
/**
|
|
217
|
+
* Canonical entity name a `form` or `form-panel` component binds to. For a `form`, hosts
|
|
218
|
+
* resolve the entity from this first, then `dataRequirements.entities[0].name`. A
|
|
219
|
+
* `form-panel` must set it: a related-grid panel usually lists the child entity first, so
|
|
220
|
+
* the fallback would name the wrong form.
|
|
221
|
+
*/
|
|
222
|
+
entityName?: string;
|
|
223
|
+
/**
|
|
224
|
+
* Registration intent for `componentRole: 'form-panel'` — where the panel mounts and
|
|
225
|
+
* what it claims. Consumers (Skip apply flow, Form Builder, `mj sync`) turn this into a
|
|
226
|
+
* `MJ: Entity Form Contributions` row. Never carries precedence; that is a host decision.
|
|
227
|
+
*/
|
|
228
|
+
formContribution?: FormContributionSpec;
|
|
212
229
|
/**
|
|
213
230
|
* JavaScript code
|
|
214
231
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-spec.d.ts","sourceRoot":"","sources":["../src/component-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"component-spec.d.ts","sourceRoot":"","sources":["../src/component-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEtG;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC;IAEzE;;;;OAIG;IACH,aAAa,EAAE;QACX,GAAG,EAAE,OAAO,CAAC;QACb,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,OA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M,CAAA;KAAE,CAAC,CAAC;IACvE,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;OAEG;IACH,4BAA4B,CAAC,EAAE,MAAM,EAAE,CAAC;IACxC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;CACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-spec.js","sourceRoot":"","sources":["../src/component-spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component-spec.js","sourceRoot":"","sources":["../src/component-spec.ts"],"names":[],"mappings":"AA2JA;;GAEG;AACH,MAAM,OAAO,aAAa;CA4NzB;AAAA,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { FormContributionSpec } from './form-contribution-spec.js';
|
|
2
|
+
/**
|
|
3
|
+
* Keys a form contribution is identified by, and the section keys it is matched against.
|
|
4
|
+
*
|
|
5
|
+
* The server actions, the apply flow and the renderer all derive keys here, so a key written
|
|
6
|
+
* on one side is the key the other side computes.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Characters a contribution key may contain.
|
|
10
|
+
*
|
|
11
|
+
* Keys are compared in SQL filters and matched by `MJ: Form Chrome Rules`, and they can arrive
|
|
12
|
+
* from an LLM. A key that cannot contain a quote cannot break a filter. The space is permitted
|
|
13
|
+
* because a related-grid key embeds an entity name, and MJ entity names contain spaces.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CONTRIBUTION_KEY_PATTERN: RegExp;
|
|
16
|
+
/** Trims a join field and removes one wrapping `[...]` pair. */
|
|
17
|
+
export declare function StripJoinFieldBrackets(join: string | null | undefined): string;
|
|
18
|
+
/** `related:<entity>:<join>` — the key of a contribution that stands in for a related-entity grid. */
|
|
19
|
+
export declare function RelatedContributionKey(relatedEntityName: string, joinField: string | null | undefined): string;
|
|
20
|
+
/** True for a key {@link PanelContributionKey} derives. */
|
|
21
|
+
export declare function IsPanelContributionKey(key: string | null | undefined): key is string;
|
|
22
|
+
/**
|
|
23
|
+
* `panel:<component name>`, with characters {@link CONTRIBUTION_KEY_PATTERN} rejects folded
|
|
24
|
+
* to `-`. Null when the name carries nothing usable.
|
|
25
|
+
*/
|
|
26
|
+
export declare function PanelContributionKey(componentName: string | null | undefined): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* The key a contribution row carries. The key is the contribution's identity: the duplicate
|
|
29
|
+
* check, the rail and "replace an installed panel" all find a contribution by it.
|
|
30
|
+
*
|
|
31
|
+
* The author's key wins. A related-grid claim derives {@link RelatedContributionKey}. Anything
|
|
32
|
+
* else derives {@link PanelContributionKey} from the component name, which is stable across
|
|
33
|
+
* re-applies of the same panel and distinct between different ones. Null when none applies.
|
|
34
|
+
*
|
|
35
|
+
* @param relatedEntityName The registered name of the related entity the spec claims, or null.
|
|
36
|
+
* @param componentName The component name that seeds a panel key. Omit it to get no panel key.
|
|
37
|
+
*/
|
|
38
|
+
export declare function ResolveContributionWriteKey(spec: Pick<FormContributionSpec, 'contributionKey' | 'relatedJoinField'>, relatedEntityName: string | null, componentName?: string | null): string | null;
|
|
39
|
+
/**
|
|
40
|
+
* camelCase with every character that is not a letter or digit removed. Matches `camelCase` in
|
|
41
|
+
* CodeGenLib `angular-codegen.ts`, which names the sections a generated form emits; any other
|
|
42
|
+
* result stops matching the section keys of forms already generated.
|
|
43
|
+
*/
|
|
44
|
+
export declare function FormSectionCamelCase(str: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* The section key a generated form gives a related-entity grid. When another grid on the form
|
|
47
|
+
* shows the same entity, the join field is appended so the two keys differ.
|
|
48
|
+
*/
|
|
49
|
+
export declare function RelatedGridSectionKey(relatedEntity: string, joinField: string | null | undefined, sharesRelatedEntity: boolean): string;
|
|
50
|
+
//# sourceMappingURL=form-contribution-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-contribution-key.d.ts","sourceRoot":"","sources":["../../src/forms/form-contribution-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE;;;;;GAKG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,QAA8B,CAAC;AAEpE,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE9E;AAED,sGAAsG;AACtG,wBAAgB,sBAAsB,CAAC,iBAAiB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE9G;AAID,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,GAAG,IAAI,MAAM,CAEpF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAS5F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACvC,IAAI,EAAE,IAAI,CAAC,oBAAoB,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,EACxE,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAC9B,MAAM,GAAG,IAAI,CAKf;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAUxD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACjC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,mBAAmB,EAAE,OAAO,GAC7B,MAAM,CAIR"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keys a form contribution is identified by, and the section keys it is matched against.
|
|
3
|
+
*
|
|
4
|
+
* The server actions, the apply flow and the renderer all derive keys here, so a key written
|
|
5
|
+
* on one side is the key the other side computes.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Characters a contribution key may contain.
|
|
9
|
+
*
|
|
10
|
+
* Keys are compared in SQL filters and matched by `MJ: Form Chrome Rules`, and they can arrive
|
|
11
|
+
* from an LLM. A key that cannot contain a quote cannot break a filter. The space is permitted
|
|
12
|
+
* because a related-grid key embeds an entity name, and MJ entity names contain spaces.
|
|
13
|
+
*/
|
|
14
|
+
export const CONTRIBUTION_KEY_PATTERN = /^[A-Za-z0-9:._ -]{1,256}$/;
|
|
15
|
+
/** Trims a join field and removes one wrapping `[...]` pair. */
|
|
16
|
+
export function StripJoinFieldBrackets(join) {
|
|
17
|
+
return (join ?? '').trim().replace(/^\[/, '').replace(/\]$/, '');
|
|
18
|
+
}
|
|
19
|
+
/** `related:<entity>:<join>` — the key of a contribution that stands in for a related-entity grid. */
|
|
20
|
+
export function RelatedContributionKey(relatedEntityName, joinField) {
|
|
21
|
+
return `related:${relatedEntityName.trim()}:${StripJoinFieldBrackets(joinField)}`;
|
|
22
|
+
}
|
|
23
|
+
const PANEL_KEY_PREFIX = 'panel:';
|
|
24
|
+
/** True for a key {@link PanelContributionKey} derives. */
|
|
25
|
+
export function IsPanelContributionKey(key) {
|
|
26
|
+
return !!key && key.startsWith(PANEL_KEY_PREFIX);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* `panel:<component name>`, with characters {@link CONTRIBUTION_KEY_PATTERN} rejects folded
|
|
30
|
+
* to `-`. Null when the name carries nothing usable.
|
|
31
|
+
*/
|
|
32
|
+
export function PanelContributionKey(componentName) {
|
|
33
|
+
const slug = (componentName ?? '')
|
|
34
|
+
.trim()
|
|
35
|
+
.replace(/[^A-Za-z0-9._ -]+/g, '-')
|
|
36
|
+
.replace(/-{2,}/g, '-')
|
|
37
|
+
.replace(/^-|-$/g, '')
|
|
38
|
+
.slice(0, 240)
|
|
39
|
+
.trim();
|
|
40
|
+
return slug ? `${PANEL_KEY_PREFIX}${slug}` : null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The key a contribution row carries. The key is the contribution's identity: the duplicate
|
|
44
|
+
* check, the rail and "replace an installed panel" all find a contribution by it.
|
|
45
|
+
*
|
|
46
|
+
* The author's key wins. A related-grid claim derives {@link RelatedContributionKey}. Anything
|
|
47
|
+
* else derives {@link PanelContributionKey} from the component name, which is stable across
|
|
48
|
+
* re-applies of the same panel and distinct between different ones. Null when none applies.
|
|
49
|
+
*
|
|
50
|
+
* @param relatedEntityName The registered name of the related entity the spec claims, or null.
|
|
51
|
+
* @param componentName The component name that seeds a panel key. Omit it to get no panel key.
|
|
52
|
+
*/
|
|
53
|
+
export function ResolveContributionWriteKey(spec, relatedEntityName, componentName) {
|
|
54
|
+
const authored = spec.contributionKey?.trim();
|
|
55
|
+
if (authored)
|
|
56
|
+
return authored;
|
|
57
|
+
if (relatedEntityName?.trim())
|
|
58
|
+
return RelatedContributionKey(relatedEntityName, spec.relatedJoinField);
|
|
59
|
+
return PanelContributionKey(componentName);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* camelCase with every character that is not a letter or digit removed. Matches `camelCase` in
|
|
63
|
+
* CodeGenLib `angular-codegen.ts`, which names the sections a generated form emits; any other
|
|
64
|
+
* result stops matching the section keys of forms already generated.
|
|
65
|
+
*/
|
|
66
|
+
export function FormSectionCamelCase(str) {
|
|
67
|
+
const sanitized = str.replace(/[^a-zA-Z0-9\s]/g, ' ');
|
|
68
|
+
let result = sanitized
|
|
69
|
+
.replace(/\s(.)/g, (_match, char) => char.toUpperCase())
|
|
70
|
+
.replace(/\s/g, '')
|
|
71
|
+
.replace(/^(.)/, (_match, char) => char.toLowerCase());
|
|
72
|
+
if (/^\d/.test(result)) {
|
|
73
|
+
result = '_' + result;
|
|
74
|
+
}
|
|
75
|
+
return result.length === 0 ? 'section' : result;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The section key a generated form gives a related-entity grid. When another grid on the form
|
|
79
|
+
* shows the same entity, the join field is appended so the two keys differ.
|
|
80
|
+
*/
|
|
81
|
+
export function RelatedGridSectionKey(relatedEntity, joinField, sharesRelatedEntity) {
|
|
82
|
+
return sharesRelatedEntity
|
|
83
|
+
? FormSectionCamelCase(`${relatedEntity} ${StripJoinFieldBrackets(joinField)}`)
|
|
84
|
+
: FormSectionCamelCase(relatedEntity);
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=form-contribution-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-contribution-key.js","sourceRoot":"","sources":["../../src/forms/form-contribution-key.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAEpE,gEAAgE;AAChE,MAAM,UAAU,sBAAsB,CAAC,IAA+B;IAClE,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACrE,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,sBAAsB,CAAC,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G,CAAC,CAAC;IACtD,IAAI,MAAM,GAAG,SAAS;SACjB,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;SAC/D,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACnE,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;IAC1B,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACjC,aAAqB,EACrB,SAAoC,EACpC,mBAA4B;IAE5B,OAAO,mBAAmB;QACtB,CAAC,CAAC,oBAAoB,CAAC,GAAG,aAAa,IAAI,sBAAsB,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/E,CAAC,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ComponentSpec } from '../component-spec.js';
|
|
2
|
+
/** Slot names — byte-identical to `FormPanelSlot` in @memberjunction/ng-base-forms. */
|
|
3
|
+
export type FormContributionSlot = 'top-area' | 'before-fields' | 'after-fields' | 'after-related' | 'after-everything';
|
|
4
|
+
export type FormContributionPresentation = 'panel' | 'bare';
|
|
5
|
+
export type FormContributionInclusion = 'Primary' | 'More' | 'None';
|
|
6
|
+
export type FormContributionChromeGroup = 'details' | 'more';
|
|
7
|
+
export declare const DEFAULT_FORM_CONTRIBUTION_SLOT: FormContributionSlot;
|
|
8
|
+
export declare const FORM_CONTRIBUTION_SLOTS: readonly FormContributionSlot[];
|
|
9
|
+
/**
|
|
10
|
+
* The slots a generated form actually emits.
|
|
11
|
+
*
|
|
12
|
+
* CodeGen writes `before-fields`, `after-fields` and `after-related` into every form it
|
|
13
|
+
* produces, and the record container always terminates the fallback chain with
|
|
14
|
+
* `after-everything`. `top-area` is absent: no form emits it, so a panel aimed there
|
|
15
|
+
* falls through to the bottom.
|
|
16
|
+
*
|
|
17
|
+
* Used wherever a form's real slot set is not yet known, so a position nothing renders is
|
|
18
|
+
* never offered as a choice. A hand-written template can differ, which is why a form that
|
|
19
|
+
* can be read is read instead of assumed.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GENERATED_FORM_CONTRIBUTION_SLOTS: readonly FormContributionSlot[];
|
|
22
|
+
/**
|
|
23
|
+
* Registration intent carried on `ComponentSpec.formContribution`. Mirrors
|
|
24
|
+
* `MJ: Entity Form Contributions` columns one-to-one, minus scope and precedence
|
|
25
|
+
* (host decisions) and minus identity (`Name` / `ComponentID`).
|
|
26
|
+
*/
|
|
27
|
+
export interface FormContributionSpec {
|
|
28
|
+
/**
|
|
29
|
+
* Where on the form the panel sits.
|
|
30
|
+
*
|
|
31
|
+
* Optional because placement is the user's choice, made in the apply dialog. A slot named
|
|
32
|
+
* here is a proposal: the dialog starts on it when the form draws it, and on its default
|
|
33
|
+
* otherwise. {@link GetDeclaredFormContribution} fills the default, so everything
|
|
34
|
+
* downstream of normalization still sees a concrete slot.
|
|
35
|
+
*/
|
|
36
|
+
slot?: FormContributionSlot;
|
|
37
|
+
sortKey?: number;
|
|
38
|
+
contributionKey?: string;
|
|
39
|
+
relatedEntity?: string;
|
|
40
|
+
relatedJoinField?: string;
|
|
41
|
+
replacesSectionKey?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Fields the panel stands in for, all within one section. The panel renders at the top
|
|
44
|
+
* of that section and the named fields are not drawn. Set instead of
|
|
45
|
+
* `replacesSectionKey` or `relatedEntity`, never alongside either.
|
|
46
|
+
*
|
|
47
|
+
* One section, because the panel has one place to draw: a claim spread over two
|
|
48
|
+
* sections has no single top to sit at.
|
|
49
|
+
*/
|
|
50
|
+
replacesFieldNames?: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Sections the panel stands in for, all within one tab. It draws in the place of the first
|
|
53
|
+
* of them and the others are not drawn. A single section uses `replacesSectionKey` instead.
|
|
54
|
+
*/
|
|
55
|
+
replacesSectionKeys?: string[];
|
|
56
|
+
/** A section the panel draws inside, replacing nothing. `sectionPosition` says where. */
|
|
57
|
+
inSectionKey?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Where inside its section the panel draws, for `inSectionKey` and for a field claim.
|
|
60
|
+
* Absent means the start.
|
|
61
|
+
*/
|
|
62
|
+
sectionPosition?: FormContributionSectionPosition;
|
|
63
|
+
inclusion?: FormContributionInclusion;
|
|
64
|
+
chromeGroup?: FormContributionChromeGroup;
|
|
65
|
+
presentation: FormContributionPresentation;
|
|
66
|
+
title: string;
|
|
67
|
+
icon?: string;
|
|
68
|
+
configuration?: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
/** Where inside a section a panel draws. */
|
|
71
|
+
export type FormContributionSectionPosition = 'start' | 'end';
|
|
72
|
+
/** A contribution block after normalization, where the slot has been resolved. */
|
|
73
|
+
export type NormalizedFormContributionSpec = FormContributionSpec & {
|
|
74
|
+
slot: FormContributionSlot;
|
|
75
|
+
};
|
|
76
|
+
/** True iff the spec commits to the form-panel contract. */
|
|
77
|
+
export declare function IsFormPanelRole(spec: Pick<ComponentSpec, 'componentRole'>): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Normalized registration intent for a form-panel spec, or `null` when the spec
|
|
80
|
+
* is not a form panel. Fills defaults (`slot`, `presentation`, `configuration`),
|
|
81
|
+
* trims strings, drops unknown slot / inclusion / chromeGroup values, and falls
|
|
82
|
+
* back to `spec.title` when the block has no title.
|
|
83
|
+
*/
|
|
84
|
+
export declare function GetDeclaredFormContribution(spec: Pick<ComponentSpec, 'componentRole' | 'title' | 'formContribution'> | null | undefined): NormalizedFormContributionSpec | null;
|
|
85
|
+
//# sourceMappingURL=form-contribution-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-contribution-spec.d.ts","sourceRoot":"","sources":["../../src/forms/form-contribution-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,uFAAuF;AACvF,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,eAAe,GAAG,kBAAkB,CAAC;AACxH,MAAM,MAAM,4BAA4B,GAAG,OAAO,GAAG,MAAM,CAAC;AAC5D,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AACpE,MAAM,MAAM,2BAA2B,GAAG,SAAS,GAAG,MAAM,CAAC;AAE7D,eAAO,MAAM,8BAA8B,EAAE,oBAAqC,CAAC;AACnF,eAAO,MAAM,uBAAuB,EAAE,SAAS,oBAAoB,EACmB,CAAC;AAEvF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iCAAiC,EAAE,SAAS,oBAAoB,EACH,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,CAAC,EAAE,+BAA+B,CAAC;IAClD,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,YAAY,EAAE,4BAA4B,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,4CAA4C;AAC5C,MAAM,MAAM,+BAA+B,GAAG,OAAO,GAAG,KAAK,CAAC;AAE9D,kFAAkF;AAClF,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,GAAG;IAAE,IAAI,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAEnG,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,GAAG,OAAO,CAEnF;AAuBD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,eAAe,GAAG,OAAO,GAAG,kBAAkB,CAAC,GAAG,IAAI,GAAG,SAAS,GAC7F,8BAA8B,GAAG,IAAI,CA+BvC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const DEFAULT_FORM_CONTRIBUTION_SLOT = 'after-fields';
|
|
2
|
+
export const FORM_CONTRIBUTION_SLOTS = ['top-area', 'before-fields', 'after-fields', 'after-related', 'after-everything'];
|
|
3
|
+
/**
|
|
4
|
+
* The slots a generated form actually emits.
|
|
5
|
+
*
|
|
6
|
+
* CodeGen writes `before-fields`, `after-fields` and `after-related` into every form it
|
|
7
|
+
* produces, and the record container always terminates the fallback chain with
|
|
8
|
+
* `after-everything`. `top-area` is absent: no form emits it, so a panel aimed there
|
|
9
|
+
* falls through to the bottom.
|
|
10
|
+
*
|
|
11
|
+
* Used wherever a form's real slot set is not yet known, so a position nothing renders is
|
|
12
|
+
* never offered as a choice. A hand-written template can differ, which is why a form that
|
|
13
|
+
* can be read is read instead of assumed.
|
|
14
|
+
*/
|
|
15
|
+
export const GENERATED_FORM_CONTRIBUTION_SLOTS = ['before-fields', 'after-fields', 'after-related', 'after-everything'];
|
|
16
|
+
/** True iff the spec commits to the form-panel contract. */
|
|
17
|
+
export function IsFormPanelRole(spec) {
|
|
18
|
+
return spec.componentRole === 'form-panel';
|
|
19
|
+
}
|
|
20
|
+
function isSlot(value) {
|
|
21
|
+
return typeof value === 'string' && FORM_CONTRIBUTION_SLOTS.includes(value);
|
|
22
|
+
}
|
|
23
|
+
/** A list of non-empty trimmed strings, de-duplicated, or undefined when there are none. */
|
|
24
|
+
function cleanStringList(value) {
|
|
25
|
+
if (!Array.isArray(value))
|
|
26
|
+
return undefined;
|
|
27
|
+
const out = [];
|
|
28
|
+
for (const item of value) {
|
|
29
|
+
const name = cleanString(item);
|
|
30
|
+
if (name && !out.includes(name))
|
|
31
|
+
out.push(name);
|
|
32
|
+
}
|
|
33
|
+
return out.length > 0 ? out : undefined;
|
|
34
|
+
}
|
|
35
|
+
function cleanString(value) {
|
|
36
|
+
if (typeof value !== 'string')
|
|
37
|
+
return undefined;
|
|
38
|
+
const trimmed = value.trim();
|
|
39
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Normalized registration intent for a form-panel spec, or `null` when the spec
|
|
43
|
+
* is not a form panel. Fills defaults (`slot`, `presentation`, `configuration`),
|
|
44
|
+
* trims strings, drops unknown slot / inclusion / chromeGroup values, and falls
|
|
45
|
+
* back to `spec.title` when the block has no title.
|
|
46
|
+
*/
|
|
47
|
+
export function GetDeclaredFormContribution(spec) {
|
|
48
|
+
if (!spec || !IsFormPanelRole(spec))
|
|
49
|
+
return null;
|
|
50
|
+
const raw = spec.formContribution ?? {};
|
|
51
|
+
const title = cleanString(raw.title) ?? cleanString(spec.title) ?? 'Panel';
|
|
52
|
+
const out = {
|
|
53
|
+
slot: isSlot(raw.slot) ? raw.slot : DEFAULT_FORM_CONTRIBUTION_SLOT,
|
|
54
|
+
presentation: raw.presentation === 'bare' ? 'bare' : 'panel',
|
|
55
|
+
title,
|
|
56
|
+
configuration: raw.configuration && typeof raw.configuration === 'object' ? { ...raw.configuration } : {},
|
|
57
|
+
};
|
|
58
|
+
if (typeof raw.sortKey === 'number' && Number.isFinite(raw.sortKey))
|
|
59
|
+
out.sortKey = raw.sortKey;
|
|
60
|
+
const key = cleanString(raw.contributionKey);
|
|
61
|
+
if (key)
|
|
62
|
+
out.contributionKey = key;
|
|
63
|
+
const related = cleanString(raw.relatedEntity);
|
|
64
|
+
if (related)
|
|
65
|
+
out.relatedEntity = related;
|
|
66
|
+
const join = cleanString(raw.relatedJoinField);
|
|
67
|
+
if (join)
|
|
68
|
+
out.relatedJoinField = join;
|
|
69
|
+
const replaces = cleanString(raw.replacesSectionKey);
|
|
70
|
+
if (replaces)
|
|
71
|
+
out.replacesSectionKey = replaces;
|
|
72
|
+
const replacedFields = cleanStringList(raw.replacesFieldNames);
|
|
73
|
+
if (replacedFields)
|
|
74
|
+
out.replacesFieldNames = replacedFields;
|
|
75
|
+
const replacedSections = cleanStringList(raw.replacesSectionKeys);
|
|
76
|
+
if (replacedSections)
|
|
77
|
+
out.replacesSectionKeys = replacedSections;
|
|
78
|
+
const inSection = cleanString(raw.inSectionKey);
|
|
79
|
+
if (inSection)
|
|
80
|
+
out.inSectionKey = inSection;
|
|
81
|
+
if (raw.sectionPosition === 'start' || raw.sectionPosition === 'end')
|
|
82
|
+
out.sectionPosition = raw.sectionPosition;
|
|
83
|
+
if (raw.inclusion === 'Primary' || raw.inclusion === 'More' || raw.inclusion === 'None')
|
|
84
|
+
out.inclusion = raw.inclusion;
|
|
85
|
+
if (raw.chromeGroup === 'details' || raw.chromeGroup === 'more')
|
|
86
|
+
out.chromeGroup = raw.chromeGroup;
|
|
87
|
+
const icon = cleanString(raw.icon);
|
|
88
|
+
if (icon)
|
|
89
|
+
out.icon = icon;
|
|
90
|
+
return out;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=form-contribution-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-contribution-spec.js","sourceRoot":"","sources":["../../src/forms/form-contribution-spec.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,8BAA8B,GAAyB,cAAc,CAAC;AACnF,MAAM,CAAC,MAAM,uBAAuB,GAChC,CAAC,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,CAAC,CAAC;AAEvF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAC1C,CAAC,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,CAAC,CAAC;AAyD3E,4DAA4D;AAC5D,MAAM,UAAU,eAAe,CAAC,IAA0C;IACtE,OAAO,IAAI,CAAC,aAAa,KAAK,YAAY,CAAC;AAC/C,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC1B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,uBAA6C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvG,CAAC;AAED,4FAA4F;AAC5F,SAAS,eAAe,CAAC,KAAc;IACnC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC5C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5C,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IAC/B,IAAI,OAAO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AC;IACnG,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,IAAI;QAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { BaseEventArgs } from '../component-events.js';
|
|
2
|
+
/** Events a form-panel component emits via `callbacks.NotifyEvent`. */
|
|
3
|
+
export declare const FormPanelEventNames: {
|
|
4
|
+
/** Related-row count for the rail badge. */
|
|
5
|
+
readonly RowCountChanged: "RowCountChanged";
|
|
6
|
+
/** Reused from the whole-form contract: proposes one field value on the PARENT record. */
|
|
7
|
+
readonly FieldChanged: "FieldChanged";
|
|
8
|
+
/** Reused from the whole-form contract. */
|
|
9
|
+
readonly ValidationChanged: "ValidationChanged";
|
|
10
|
+
};
|
|
11
|
+
export type FormPanelEventName = typeof FormPanelEventNames[keyof typeof FormPanelEventNames];
|
|
12
|
+
export interface FormPanelRowCountChangedArgs extends BaseEventArgs {
|
|
13
|
+
count: number;
|
|
14
|
+
}
|
|
15
|
+
/** Methods a form-panel component may register via `callbacks.RegisterMethod`. All optional. */
|
|
16
|
+
export declare const FormPanelMethodNames: {
|
|
17
|
+
/** Parent record was reloaded from the database. */
|
|
18
|
+
readonly OnRecordRefreshed: "OnRecordRefreshed";
|
|
19
|
+
/** Host toolbar entered or left edit mode. */
|
|
20
|
+
readonly SetEditMode: "SetEditMode";
|
|
21
|
+
/** Host is about to save the parent record; return validity. May be async. */
|
|
22
|
+
readonly Validate: "Validate";
|
|
23
|
+
};
|
|
24
|
+
export type FormPanelMethodName = typeof FormPanelMethodNames[keyof typeof FormPanelMethodNames];
|
|
25
|
+
export type FormPanelSetEditModeArgs = {
|
|
26
|
+
mode: 'view' | 'edit';
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Shape a registered `Validate` method returns. The host awaits the value before
|
|
30
|
+
* reading it, so a panel that validates against the server may return a Promise.
|
|
31
|
+
*/
|
|
32
|
+
export interface FormPanelValidateResult {
|
|
33
|
+
isValid: boolean;
|
|
34
|
+
errors: string[];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=form-panel-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-panel-events.d.ts","sourceRoot":"","sources":["../../src/forms/form-panel-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,uEAAuE;AACvE,eAAO,MAAM,mBAAmB;IAC5B,4CAA4C;;IAE5C,0FAA0F;;IAE1F,2CAA2C;;CAErC,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE9F,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IAC/D,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,gGAAgG;AAChG,eAAO,MAAM,oBAAoB;IAC7B,oDAAoD;;IAEpD,8CAA8C;;IAE9C,8EAA8E;;CAExE,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEjG,MAAM,MAAM,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IAAG,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormEventNames } from './form-event-names.js';
|
|
2
|
+
/** Events a form-panel component emits via `callbacks.NotifyEvent`. */
|
|
3
|
+
export const FormPanelEventNames = {
|
|
4
|
+
/** Related-row count for the rail badge. */
|
|
5
|
+
RowCountChanged: 'RowCountChanged',
|
|
6
|
+
/** Reused from the whole-form contract: proposes one field value on the PARENT record. */
|
|
7
|
+
FieldChanged: FormEventNames.FieldChanged,
|
|
8
|
+
/** Reused from the whole-form contract. */
|
|
9
|
+
ValidationChanged: FormEventNames.ValidationChanged,
|
|
10
|
+
};
|
|
11
|
+
/** Methods a form-panel component may register via `callbacks.RegisterMethod`. All optional. */
|
|
12
|
+
export const FormPanelMethodNames = {
|
|
13
|
+
/** Parent record was reloaded from the database. */
|
|
14
|
+
OnRecordRefreshed: 'OnRecordRefreshed',
|
|
15
|
+
/** Host toolbar entered or left edit mode. */
|
|
16
|
+
SetEditMode: 'SetEditMode',
|
|
17
|
+
/** Host is about to save the parent record; return validity. May be async. */
|
|
18
|
+
Validate: 'Validate',
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=form-panel-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-panel-events.js","sourceRoot":"","sources":["../../src/forms/form-panel-events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,uEAAuE;AACvE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,4CAA4C;IAC5C,eAAe,EAAE,iBAAiB;IAClC,0FAA0F;IAC1F,YAAY,EAAE,cAAc,CAAC,YAAY;IACzC,2CAA2C;IAC3C,iBAAiB,EAAE,cAAc,CAAC,iBAAiB;CAC7C,CAAC;AAOX,gGAAgG;AAChG,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,oDAAoD;IACpD,iBAAiB,EAAE,mBAAmB;IACtC,8CAA8C;IAC9C,WAAW,EAAE,aAAa;IAC1B,8EAA8E;IAC9E,QAAQ,EAAE,UAAU;CACd,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { FormHostProps } from './form-host-props.js';
|
|
2
|
+
import type { FormContributionPresentation, FormContributionSlot } from './form-contribution-spec.js';
|
|
3
|
+
/** Identity + configuration of the contribution this panel instance renders. */
|
|
4
|
+
export interface FormPanelContributionContext {
|
|
5
|
+
key: string;
|
|
6
|
+
slot: FormContributionSlot;
|
|
7
|
+
title: string;
|
|
8
|
+
presentation: FormContributionPresentation;
|
|
9
|
+
configuration: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/** Present only when the panel claims a related-entity grid. */
|
|
12
|
+
export interface FormPanelRelatedContext {
|
|
13
|
+
entityName: string;
|
|
14
|
+
joinField?: string;
|
|
15
|
+
/** Prebuilt by the host from BaseFormComponent.BuildRelationshipViewParamsByEntityName — includes join.any OR filters. */
|
|
16
|
+
viewParams: {
|
|
17
|
+
EntityName: string;
|
|
18
|
+
ExtraFilter: string;
|
|
19
|
+
OrderBy?: string;
|
|
20
|
+
};
|
|
21
|
+
/** From BaseFormComponent.NewRecordValues so a "New" action pre-links the child to this record. */
|
|
22
|
+
newRecordValues: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Props the host (`InteractiveFormPanelComponent`) passes to a `componentRole: 'form-panel'`
|
|
26
|
+
* component. Extends the whole-form props: the panel sees the same record snapshot,
|
|
27
|
+
* metadata, mode and permissions, plus its own registration context.
|
|
28
|
+
*/
|
|
29
|
+
export interface FormPanelHostProps extends FormHostProps {
|
|
30
|
+
contribution: FormPanelContributionContext;
|
|
31
|
+
related?: FormPanelRelatedContext;
|
|
32
|
+
/** Section expanded state (accordion) or "is the active rail group" (left-nav). Defer loads while false. */
|
|
33
|
+
isExpanded: boolean;
|
|
34
|
+
layout: 'accordion' | 'left-nav';
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=form-panel-host-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-panel-host-props.d.ts","sourceRoot":"","sources":["../../src/forms/form-panel-host-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnG,gFAAgF;AAChF,MAAM,WAAW,4BAA4B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,4BAA4B,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0HAA0H;IAC1H,UAAU,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,mGAAmG;IACnG,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACrD,YAAY,EAAE,4BAA4B,CAAC;IAC3C,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,4GAA4G;IAC5G,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,WAAW,GAAG,UAAU,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-panel-host-props.js","sourceRoot":"","sources":["../../src/forms/form-panel-host-props.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a user's choice of form for an entity is stored.
|
|
3
|
+
*
|
|
4
|
+
* A single Active `MJ: Entity Form Overrides` row does not mean the user sees that form.
|
|
5
|
+
* They can pick any of the forms on offer, including the generated one, and that choice is
|
|
6
|
+
* a per-user setting. Anything deciding "is a full custom form rendering here" has to read
|
|
7
|
+
* it, or it answers for the wrong form.
|
|
8
|
+
*
|
|
9
|
+
* Lives here rather than in the Angular resolver so the browser and the server read the
|
|
10
|
+
* same key: they disagreed once, and the server told an agent a form was unreachable while
|
|
11
|
+
* the user was looking at it.
|
|
12
|
+
*/
|
|
13
|
+
/** `MJ: User Settings` key prefix for the per-entity form choice. */
|
|
14
|
+
export declare const FORM_VARIANT_SETTING_PREFIX = "mj.formVariant.";
|
|
15
|
+
/**
|
|
16
|
+
* Stored when the user explicitly picks the generated form.
|
|
17
|
+
*
|
|
18
|
+
* Distinct from a missing setting, which means "no preference, apply the auto-pick rules".
|
|
19
|
+
* The leading `__` keeps it apart from the override UUIDs stored under the same key.
|
|
20
|
+
*/
|
|
21
|
+
export declare const FORM_VARIANT_EXPLICIT_DEFAULT = "__codegen-default__";
|
|
22
|
+
/** The settings key for one entity. Lowercased, so case variants collapse onto one row. */
|
|
23
|
+
export declare function FormVariantSettingKey(entityName: string): string;
|
|
24
|
+
//# sourceMappingURL=form-variant-preference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-variant-preference.d.ts","sourceRoot":"","sources":["../../src/forms/form-variant-preference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,qEAAqE;AACrE,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AAEnE,2FAA2F;AAC3F,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEhE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a user's choice of form for an entity is stored.
|
|
3
|
+
*
|
|
4
|
+
* A single Active `MJ: Entity Form Overrides` row does not mean the user sees that form.
|
|
5
|
+
* They can pick any of the forms on offer, including the generated one, and that choice is
|
|
6
|
+
* a per-user setting. Anything deciding "is a full custom form rendering here" has to read
|
|
7
|
+
* it, or it answers for the wrong form.
|
|
8
|
+
*
|
|
9
|
+
* Lives here rather than in the Angular resolver so the browser and the server read the
|
|
10
|
+
* same key: they disagreed once, and the server told an agent a form was unreachable while
|
|
11
|
+
* the user was looking at it.
|
|
12
|
+
*/
|
|
13
|
+
/** `MJ: User Settings` key prefix for the per-entity form choice. */
|
|
14
|
+
export const FORM_VARIANT_SETTING_PREFIX = 'mj.formVariant.';
|
|
15
|
+
/**
|
|
16
|
+
* Stored when the user explicitly picks the generated form.
|
|
17
|
+
*
|
|
18
|
+
* Distinct from a missing setting, which means "no preference, apply the auto-pick rules".
|
|
19
|
+
* The leading `__` keeps it apart from the override UUIDs stored under the same key.
|
|
20
|
+
*/
|
|
21
|
+
export const FORM_VARIANT_EXPLICIT_DEFAULT = '__codegen-default__';
|
|
22
|
+
/** The settings key for one entity. Lowercased, so case variants collapse onto one row. */
|
|
23
|
+
export function FormVariantSettingKey(entityName) {
|
|
24
|
+
return FORM_VARIANT_SETTING_PREFIX + (entityName ?? '').toLowerCase();
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=form-variant-preference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-variant-preference.js","sourceRoot":"","sources":["../../src/forms/form-variant-preference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,qEAAqE;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAEnE,2FAA2F;AAC3F,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACpD,OAAO,2BAA2B,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAC1E,CAAC"}
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -22,7 +22,12 @@ export * from './form-method-names.js';
|
|
|
22
22
|
export * from './curated-form-schema.js';
|
|
23
23
|
export * from './default-form-scaffold.js';
|
|
24
24
|
export * from './form-host-props-fixture.js';
|
|
25
|
+
export * from './form-variant-preference.js';
|
|
25
26
|
export * from './form-spec-info.js';
|
|
27
|
+
export * from './form-contribution-spec.js';
|
|
28
|
+
export * from './form-contribution-key.js';
|
|
29
|
+
export * from './form-panel-host-props.js';
|
|
30
|
+
export * from './form-panel-events.js';
|
|
26
31
|
import type { ComponentSpec } from '../component-spec.js';
|
|
27
32
|
/** True iff the spec commits to the form-role contract. */
|
|
28
33
|
export declare function IsFormRole(spec: Pick<ComponentSpec, 'componentRole'>): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,GAAG,OAAO,CAE9E;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,GAAG,OAAO,CAE9E"}
|
package/dist/forms/index.js
CHANGED
|
@@ -22,7 +22,12 @@ export * from './form-method-names.js';
|
|
|
22
22
|
export * from './curated-form-schema.js';
|
|
23
23
|
export * from './default-form-scaffold.js';
|
|
24
24
|
export * from './form-host-props-fixture.js';
|
|
25
|
+
export * from './form-variant-preference.js';
|
|
25
26
|
export * from './form-spec-info.js';
|
|
27
|
+
export * from './form-contribution-spec.js';
|
|
28
|
+
export * from './form-contribution-key.js';
|
|
29
|
+
export * from './form-panel-host-props.js';
|
|
30
|
+
export * from './form-panel-events.js';
|
|
26
31
|
/** True iff the spec commits to the form-role contract. */
|
|
27
32
|
export function IsFormRole(spec) {
|
|
28
33
|
return spec.componentRole === 'form';
|
package/dist/forms/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AAIpC,2DAA2D;AAC3D,MAAM,UAAU,UAAU,CAAC,IAA0C;IACjE,OAAO,IAAI,CAAC,aAAa,KAAK,MAAM,CAAC;AACzC,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,UAAU,CAAC,IAA0C;IACjE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/interactive-component-types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.2.0-edge.
|
|
4
|
+
"version": "6.2.0-edge.3",
|
|
5
5
|
"description": "MemberJunction: Interactive Component - Type specifications for MJ Interactive UI Componentry",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"typescript": "^5.9.3"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@memberjunction/core": "6.2.0-edge.
|
|
31
|
-
"@memberjunction/ai-vectors-memory": "6.2.0-edge.
|
|
30
|
+
"@memberjunction/core": "6.2.0-edge.3",
|
|
31
|
+
"@memberjunction/ai-vectors-memory": "6.2.0-edge.3"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|