@memberjunction/ng-base-forms 6.2.0-edge.3 → 6.2.0-edge.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"form-contribution.d.ts","sourceRoot":"","sources":["../../../src/lib/panel-slot/form-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAOH,KAAK,oBAAoB,EAC5B,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAA4B,KAAK,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC9G,OAAO,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjF,0FAA0F;AAC1F,MAAM,WAAW,4BAA4B;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,qEAAqE;AACrE,MAAM,MAAM,kCAAkC,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,4BAA4B;IACzC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,6BAA6B,CAAC;IAExC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAE5C,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC,KAAK,CAAC,EAAE,MAAM,CAAC;I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EACrB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC/B,CAAC,EAAE,CAEL"}
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_FORM_CONTRIBUTION_SLOT, FormSectionCamelCase as SharedFormSectionCamelCase, RelatedContributionKey as SharedRelatedContributionKey, RelatedGridSectionKey, ResolveContributionWriteKey, StripJoinFieldBrackets as SharedStripJoinFieldBrackets, } from '@memberjunction/interactive-component-types/forms';
2
- import { NormalizeUUID, UUIDsEqual } from '@memberjunction/global';
2
+ import { CountByUUID, NormalizeUUID, UUIDsEqual } from '@memberjunction/global';
3
3
  import { FormContributionOutranks } from '@memberjunction/core-entities';
4
4
  /** Strip wrapping [] from a join field. Uses the shared `StripJoinFieldBrackets`. */
5
5
  export function StripJoinFieldBrackets(joinField) {
@@ -119,12 +119,8 @@ function relatedSectionKey(relationship, sharesRelatedEntity) {
119
119
  * The returned function reflects the peers as they were when it was built.
120
120
  */
121
121
  export function CreateRelatedEntitySectionKeyResolver(displayInFormPeers) {
122
- const countByEntityID = new Map();
123
- for (const peer of displayInFormPeers) {
124
- const id = NormalizeUUID(peer.RelatedEntityID);
125
- countByEntityID.set(id, (countByEntityID.get(id) ?? 0) + 1);
126
- }
127
- return (relationship) => relatedSectionKey(relationship, (countByEntityID.get(NormalizeUUID(relationship.RelatedEntityID)) ?? 0) > 1);
122
+ const countByEntityID = CountByUUID(displayInFormPeers, (peer) => peer.RelatedEntityID);
123
+ return (relationship) => relatedSectionKey(relationship, (countByEntityID.Get(relationship.RelatedEntityID) ?? 0) > 1);
128
124
  }
129
125
  export function RelationshipDisplayName(relationship) {
130
126
  const named = relationship.DisplayName?.trim();
@@ -1 +1 @@
1
- {"version":3,"file":"form-contribution.js","sourceRoot":"","sources":["../../../src/lib/panel-slot/form-contribution.ts"],"names":[],"mappings":"AAcA,OAAO,EACH,8BAA8B,EAC9B,oBAAoB,IAAI,0BAA0B,EAClD,sBAAsB,IAAI,4BAA4B,EACtD,qBAAqB,EACrB,2BAA2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AM,GAAG,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC;QACxB,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,6BAA6B,CACzC,UAAkB,EAClB,eAAwD,EACxD,iBAAoC,EACpC,aAAsD;IAEtD,MAAM,QAAQ,GAAG,wBAAwB,CAAC;QACtC,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,eAAe;QAChC,iBAAiB,EAAE,iBAAiB;QACpC,aAAa,EAAE,aAAa;QAC5B,gBAAgB,EAAE,EAAE;QACpB,mBAAmB,EAAE,IAAI;KAC5B,CAAC,CAAC;IACH,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACpC,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY;YAAE,SAAS;QAC3C,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,kBAAkB,IAAI,EAAE,EAAE,CAAC;YACjD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACpC,OAAqB,EACrB,WAA8B;IAE9B,OAAO,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAQ,CAAC;AAC7D,CAAC","sourcesContent":["/**\n * Form contributions — pure resolve of what should appear on an entity form.\n *\n * A contribution is either a registered BaseFormPanel or the stock related-entity\n * grid. Related claims replace the stock/baked grid. No Angular, no ClassFactory\n * — the host queries registrations and feeds this.\n *\n * Contribution keys and section keys come from the shared key module in\n * `@memberjunction/interactive-component-types/forms`, which the server actions use too.\n * Section keys for related panels match CodeGen's camelCase (`angular-codegen.ts`), so\n * hide-baked and skip-baked find the grid CodeGen emitted.\n */\nimport type { ClassRegistration } from '@memberjunction/global';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport {\n DEFAULT_FORM_CONTRIBUTION_SLOT,\n FormSectionCamelCase as SharedFormSectionCamelCase,\n RelatedContributionKey as SharedRelatedContributionKey,\n RelatedGridSectionKey,\n ResolveContributionWriteKey,\n StripJoinFieldBrackets as SharedStripJoinFieldBrackets,\n type FormContributionSpec,\n} from '@memberjunction/interactive-component-types/forms';\nimport { NormalizeUUID, UUIDsEqual } from '@memberjunction/global';\nimport { FormContributionOutranks, type MJEntityFormContributionEntity } from '@memberjunction/core-entities';\nimport { FormPanelRegistrationMetadata, FormPanelSlot } from './base-form-panel';\n\n/** Minimum relationship shape the composer reads. Satisfied by EntityRelationshipInfo. */\nexport interface FormContributionRelationship {\n RelatedEntity: string;\n RelatedEntityID: string;\n RelatedEntityJoinField: string;\n DisplayInForm: boolean;\n DisplayName?: string | null;\n Sequence?: number | null;\n}\n\n/** Which of the two registration sources produced a contribution. */\nexport type FormContributionRegistrationSource = 'class' | 'metadata';\n\nexport interface FormContributionRegistration {\n /**\n * Rank within a `contributionKey` group, higher wins. For `'class'` registrations this\n * is the ClassFactory registration priority; for `'metadata'` rows it is the row's\n * `Precedence` column. Both mean the same thing here — higher wins — which is why one\n * field carries both.\n */\n Priority: number;\n Metadata: FormPanelRegistrationMetadata;\n\n /** Omitted on legacy call sites, which are all compiled registrations. */\n Source?: FormContributionRegistrationSource;\n\n /** `MJ: Components.ID` the panel renders — metadata rows only. */\n ComponentID?: string;\n\n /** Parsed `Configuration` JSON for metadata rows. */\n Configuration?: Record<string, unknown>;\n\n Title?: string;\n Icon?: string;\n Presentation?: 'panel' | 'bare';\n\n /** `MJ: Entity Form Contributions.ID` for metadata rows. */\n RowID?: string;\n\n /**\n * Who a metadata row is for. Absent on compiled registrations, which apply to everyone the\n * code puts them in front of. A `User` row a user can see is necessarily their own — the\n * collector only returns personal rows for the current user.\n */\n Scope?: MJEntityFormContributionEntity['Scope'];\n\n /** The ClassFactory registration for compiled panels — carries the component constructor. */\n Registration?: ClassRegistration;\n\n /**\n * A panel the placement dialog is showing before it is saved. It draws its component when\n * it carries one, else a placeholder. Only a form inside the dialog's preview sees one.\n */\n IsPreview?: boolean;\n\n /**\n * The component to render when it has not been saved yet, so there is no `ComponentID` to\n * load. Only the placement preview sets it.\n */\n ComponentSpec?: ComponentSpec;\n}\n\nexport interface ResolveFormContributionsInput {\n EntityName: string;\n RelatedEntities: readonly FormContributionRelationship[];\n /** IS-A child entity IDs — CodeGen skips these (shown in the ISA side panel). */\n IsaChildEntityIDs: readonly string[];\n Registrations: readonly FormContributionRegistration[];\n /** SectionKeys already projected as Variant=\"related-entity\" in the form template. */\n BakedSectionKeys: readonly string[];\n ShowRelatedEntities: boolean;\n}\n\nexport type FormContributionKind = 'registered' | 'stock-grid';\n\nexport interface FormContributionWinner {\n ContributionKey: string;\n Slot: FormPanelSlot;\n SortKey: number;\n Priority: number;\n Kind: FormContributionKind;\n RelatedEntity?: string;\n RelatedJoinField?: string;\n /** Field/other section this registered winner asked to hide. */\n ReplacesSectionKey?: string;\n /** Fields this registered winner stands in for, so they are not drawn. */\n ReplacesFieldNames?: readonly string[];\n /** Further sections this registered winner stands in for, beyond `ReplacesSectionKey`. */\n ReplacesSectionKeys?: readonly string[];\n BakedSectionKey: string;\n DisplayName: string;\n\n /** Carried through from the registration so consumers can tell the two sources apart. */\n Source?: FormContributionRegistrationSource;\n ComponentID?: string;\n Title?: string;\n Presentation?: 'panel' | 'bare';\n}\n\nexport interface ResolveFormContributionsResult {\n Winners: FormContributionWinner[];\n /** CodeGen section keys to hide because a registered panel claimed them. */\n HiddenBakedSectionKeys: string[];\n /** Stock grids the host should mount (unclaimed and not already baked). */\n StockGrids: FormContributionWinner[];\n}\n\n/** Strip wrapping [] from a join field. Uses the shared `StripJoinFieldBrackets`. */\nexport function StripJoinFieldBrackets(joinField: string | null | undefined): string {\n return SharedStripJoinFieldBrackets(joinField);\n}\n\n/** camelCase + identifier sanitize, as CodeGen names sections. Uses the shared `FormSectionCamelCase`. */\nexport function FormSectionCamelCase(str: string): string {\n return SharedFormSectionCamelCase(str);\n}\n\n/** `related:<entity>:<join>`. Uses the shared `RelatedContributionKey`. */\nexport function RelatedContributionKey(relatedEntity: string, joinField?: string | null): string {\n return SharedRelatedContributionKey(relatedEntity, joinField);\n}\n\n/**\n * The key a registration collapses by: its own key, else the derived related key. Empty for a\n * registration with neither, which never collapses. Uses the shared `ResolveContributionWriteKey`.\n */\nexport function ResolveContributionKey(meta: FormPanelRegistrationMetadata): string {\n return ResolveContributionWriteKey(meta, meta.relatedEntity ?? null) ?? '';\n}\n\n/**\n * The section key a registration's panel draws under, which the rail, the counts and the chrome\n * group file it by.\n *\n * A row's panel draws under its contribution key ({@link ResolveContributionKey}), or\n * `contribution:<row id>` when it has none. A compiled panel's template names its own section; by\n * convention that is its `contributionKey`, or for a grid claim with no key, the related entity's\n * name after its schema prefix, in camelCase. Empty for a compiled panel with neither.\n */\nexport function ContributionSectionKey(registration: FormContributionRegistration): string {\n const meta = registration.Metadata;\n if (registration.Source === 'metadata') {\n return ResolveContributionKey(meta) || `contribution:${registration.RowID ?? registration.ComponentID ?? 'unknown'}`;\n }\n const own = meta.contributionKey?.trim();\n if (own) return own;\n // The key compiled panel templates use (`contactMethods`), not the generated-form grid key.\n const entityName = meta.relatedEntity?.split(':').pop()?.trim();\n return entityName ? FormSectionCamelCase(entityName) : '';\n}\n\n/**\n * A contribution spec as a registration: the one mapping for a saved row, the placement preview\n * and the artifact viewer's preview. Ranked 0 and keyed only by the spec's own key; a caller that\n * knows more (a row's precedence, a preview's derived key) sets it on the result.\n */\nexport function ContributionSpecToRegistration(\n entityName: string,\n spec: FormContributionSpec,\n componentID?: string,\n): FormContributionRegistration {\n const metadata: FormPanelRegistrationMetadata = {\n entity: entityName,\n slot: spec.slot ?? DEFAULT_FORM_CONTRIBUTION_SLOT,\n sortKey: spec.sortKey ?? 0,\n presentation: spec.presentation,\n };\n if (spec.contributionKey) metadata.contributionKey = spec.contributionKey;\n if (spec.relatedEntity) metadata.relatedEntity = spec.relatedEntity;\n if (spec.relatedJoinField) metadata.relatedJoinField = spec.relatedJoinField;\n if (spec.replacesSectionKey) metadata.replacesSectionKey = spec.replacesSectionKey;\n if (spec.replacesFieldNames?.length) metadata.replacesFieldNames = [...spec.replacesFieldNames];\n if (spec.replacesSectionKeys?.length) metadata.replacesSectionKeys = [...spec.replacesSectionKeys];\n if (spec.inSectionKey) metadata.inSectionKey = spec.inSectionKey;\n if (spec.sectionPosition) metadata.sectionPosition = spec.sectionPosition;\n if (spec.inclusion) metadata.inclusion = spec.inclusion;\n if (spec.chromeGroup) metadata.chromeGroup = spec.chromeGroup;\n const registration: FormContributionRegistration = {\n Priority: 0,\n Metadata: metadata,\n Source: 'metadata',\n Title: spec.title,\n Icon: spec.icon,\n Presentation: spec.presentation,\n Configuration: spec.configuration ?? {},\n };\n if (componentID) registration.ComponentID = componentID;\n return registration;\n}\n\n/**\n * SectionKey CodeGen emits for a related-entity panel. When more than one\n * DisplayInForm relationship points at the same entity, the join field is\n * appended so BillTo / ShipTo do not collide.\n */\nexport function RelatedEntitySectionKey(\n relationship: FormContributionRelationship,\n displayInFormPeers: readonly FormContributionRelationship[],\n): string {\n // Normalize the target once and stop at the second match. UUIDsEqual's `===` fast path\n // misses on every peer that points elsewhere, so a filter over UUIDsEqual lowercases both\n // sides of every comparison. To key many relationships against the same peers, use\n // CreateRelatedEntitySectionKeyResolver instead.\n const target = NormalizeUUID(relationship.RelatedEntityID);\n let sameEntityCount = 0;\n for (const peer of displayInFormPeers) {\n if (NormalizeUUID(peer.RelatedEntityID) === target && ++sameEntityCount > 1) break;\n }\n return relatedSectionKey(relationship, sameEntityCount > 1);\n}\n\nfunction relatedSectionKey(relationship: FormContributionRelationship, sharesRelatedEntity: boolean): string {\n return RelatedGridSectionKey(relationship.RelatedEntity, relationship.RelatedEntityJoinField, sharesRelatedEntity);\n}\n\n/**\n * Builds a function that returns {@link RelatedEntitySectionKey}`(relationship, displayInFormPeers)`\n * for any relationship, against the ONE peer set passed here. Build it once per peer set, then\n * call it once per relationship. The relationship does not have to be in the peer set; it is keyed\n * by how many peers share its related entity.\n *\n * Building counts each related entity once, so keying all n peers is O(n). Calling\n * RelatedEntitySectionKey per peer is O(n²), which on an entity with ~150 DisplayInForm\n * relationships (MJ: Users), resolved on every change-detection pass, pegged a CPU core.\n * The returned function reflects the peers as they were when it was built.\n */\nexport function CreateRelatedEntitySectionKeyResolver(\n displayInFormPeers: readonly FormContributionRelationship[],\n): (relationship: FormContributionRelationship) => string {\n const countByEntityID = new Map<string, number>();\n for (const peer of displayInFormPeers) {\n const id = NormalizeUUID(peer.RelatedEntityID);\n countByEntityID.set(id, (countByEntityID.get(id) ?? 0) + 1);\n }\n return (relationship) =>\n relatedSectionKey(relationship, (countByEntityID.get(NormalizeUUID(relationship.RelatedEntityID)) ?? 0) > 1);\n}\n\nexport function RelationshipDisplayName(relationship: FormContributionRelationship): string {\n const named = relationship.DisplayName?.trim();\n const raw = named && named.length > 0 ? named : relationship.RelatedEntity;\n return raw.replace(/^[A-Za-z][A-Za-z0-9_]*:\\s+/, '').trim() || raw;\n}\n\nfunction isIsaChild(relationship: FormContributionRelationship, isaChildIds: readonly string[]): boolean {\n return isaChildIds.some((id) => UUIDsEqual(id, relationship.RelatedEntityID));\n}\n\nfunction visibleRelationships(\n related: readonly FormContributionRelationship[],\n isaChildIds: readonly string[],\n): FormContributionRelationship[] {\n const visible = related.filter((rel) => rel.DisplayInForm && !isIsaChild(rel, isaChildIds));\n return [...visible].sort((a, b) => {\n const aSeq = a.Sequence ?? 999999;\n const bSeq = b.Sequence ?? 999999;\n if (aSeq !== bSeq) return aSeq - bSeq;\n return a.RelatedEntity.localeCompare(b.RelatedEntity);\n });\n}\n\n/**\n * Strict entity match shared by the composer and the slot host. `'*'` matches every form.\n *\n * Exported because the slot host used to run its own prefix-insensitive variant, which\n * mounted panels the composer then ignored — the two sides disagreed about which panels\n * existed. One predicate, used by both.\n */\nexport function FormContributionEntityMatches(registeredEntity: string | null | undefined, formEntity: string): boolean {\n if (!registeredEntity) return false;\n return registeredEntity === '*' || registeredEntity === formEntity;\n}\n\n/**\n * A wildcard registration that claims a grid, a section or a rail tab, or names a section to draw\n * in. It still mounts, but its claim is ignored: it would take that place from every form.\n */\nexport function IsWildcardPlaceClaim(meta: FormPanelRegistrationMetadata): boolean {\n return meta.entity === '*'\n && (!!meta.relatedEntity || ReplacedSectionKeys(meta).length > 0 || !!meta.inSectionKey?.trim());\n}\n\n/** The fields the collapse ranks a registration by. */\ntype RankedRegistration = Pick<FormContributionRegistration, 'Priority' | 'Source' | 'Scope'>;\n\n/**\n * Whether `reg` beats `incumbent`, by the rule the server's composition answer also uses\n * ({@link FormContributionOutranks}): higher Priority; on a tie a compiled registration beats any\n * row, and between rows the narrower audience wins.\n */\nfunction outranks(reg: RankedRegistration, incumbent: RankedRegistration): boolean {\n return FormContributionOutranks(rankOf(reg), rankOf(incumbent));\n}\n\nfunction rankOf(reg: RankedRegistration) {\n return { Precedence: reg.Priority, Scope: reg.Scope, Compiled: reg.Source !== 'metadata' };\n}\n\n/**\n * Collapse by key ({@link ResolveContributionKey}, compared exactly). Highest Priority wins; on a\n * tie the compiled registration wins, and between rows the narrower scope. Registrations without\n * a key never collapse.\n *\n * The tie-break is an explicit comparator rather than input ordering, so the result does not\n * depend on which source the caller concatenated first.\n */\nexport function CollapseFormPanelRegistrations<T extends {\n Priority: number;\n Metadata: FormPanelRegistrationMetadata;\n Source?: FormContributionRegistrationSource;\n Scope?: FormContributionRegistration['Scope'];\n}>(\n registrations: readonly T[],\n): T[] {\n const winners = new Map<string, T>();\n let uniqueIndex = 0;\n for (const reg of registrations) {\n const key = ResolveContributionKey(reg.Metadata) || `__unique:${uniqueIndex++}`;\n const incumbent = winners.get(key);\n if (!incumbent || outranks(reg, incumbent)) {\n winners.set(key, reg);\n }\n }\n return [...winners.values()];\n}\n\n/** One form's contributions after the collapse. */\nexport interface ResolvedFormContributions {\n /**\n * The winners among the registrations for this entity or for every entity (`'*'`): one per\n * key, and each registration that has no key.\n */\n readonly Winners: readonly FormContributionRegistration[];\n /**\n * The winners the rail files, by {@link ContributionSectionKey}: they name the entity rather\n * than the wildcard, draw a section rather than a bare strip, and have a section key. Two\n * winners filed under one section key keep the one that ranks higher in the collapse.\n */\n readonly RailItems: ReadonlyMap<string, FormContributionRegistration>;\n}\n\nconst resolvedMemo = new WeakMap<readonly FormContributionRegistration[], Map<string, ResolvedFormContributions>>();\n\n/**\n * The winning registrations on one entity's form, resolved once for the whole form.\n *\n * Every host that draws contributions filters these winners by its own slot or section, so a row\n * that takes a key from a compiled panel draws where the row says, and the compiled panel draws\n * nowhere. Memoized per input list, which the collector returns as a stable reference until\n * something changes, so a caller must not change a list after passing it. The result is shared:\n * callers must not mutate it.\n */\nexport function ResolveFormContributionWinners(\n entityName: string,\n registrations: readonly FormContributionRegistration[],\n): ResolvedFormContributions {\n let byEntity = resolvedMemo.get(registrations);\n const hit = byEntity?.get(entityName);\n if (hit) return hit;\n const applicable = registrations.filter((reg) => FormContributionEntityMatches(reg.Metadata?.entity, entityName));\n const winners = CollapseFormPanelRegistrations(applicable);\n const railItems = new Map<string, FormContributionRegistration>();\n for (const reg of winners) {\n const meta = reg.Metadata;\n if (meta.entity !== entityName || reg.Presentation === 'bare' || meta.presentation === 'bare') continue;\n const key = ContributionSectionKey(reg);\n const filed = key ? railItems.get(key) : undefined;\n if (key && (!filed || outranks(reg, filed))) railItems.set(key, reg);\n }\n const resolved: ResolvedFormContributions = { Winners: winners, RailItems: railItems };\n if (!byEntity) {\n byEntity = new Map();\n resolvedMemo.set(registrations, byEntity);\n }\n byEntity.set(entityName, resolved);\n return resolved;\n}\n\nfunction stockWinner(relationship: FormContributionRelationship, sectionKey: string): FormContributionWinner {\n const join = StripJoinFieldBrackets(relationship.RelatedEntityJoinField);\n return {\n ContributionKey: RelatedContributionKey(relationship.RelatedEntity, join),\n Slot: 'after-related',\n SortKey: -(relationship.Sequence ?? 0),\n Priority: 0,\n Kind: 'stock-grid',\n RelatedEntity: relationship.RelatedEntity,\n RelatedJoinField: join,\n BakedSectionKey: sectionKey,\n DisplayName: RelationshipDisplayName(relationship),\n };\n}\n\nfunction registeredWinner(\n key: string,\n reg: FormContributionRegistration,\n sectionKey: string,\n displayName: string,\n): FormContributionWinner {\n const meta = reg.Metadata;\n return {\n ContributionKey: key,\n Slot: meta.slot,\n SortKey: meta.sortKey ?? 0,\n Priority: reg.Priority,\n Kind: 'registered',\n RelatedEntity: meta.relatedEntity,\n RelatedJoinField: meta.relatedJoinField ? StripJoinFieldBrackets(meta.relatedJoinField) : undefined,\n ReplacesSectionKey: meta.replacesSectionKey?.trim() || undefined,\n ReplacesFieldNames: meta.replacesFieldNames?.length ? [...meta.replacesFieldNames] : undefined,\n ReplacesSectionKeys: meta.replacesSectionKeys?.length ? [...meta.replacesSectionKeys] : undefined,\n BakedSectionKey: sectionKey,\n DisplayName: displayName,\n Source: reg.Source,\n ComponentID: reg.ComponentID,\n Title: reg.Title,\n Presentation: reg.Presentation ?? meta.presentation,\n };\n}\n\nfunction sortWinners(winners: FormContributionWinner[]): FormContributionWinner[] {\n return [...winners].sort((a, b) => {\n if (a.SortKey !== b.SortKey) return b.SortKey - a.SortKey;\n if (a.Priority !== b.Priority) return b.Priority - a.Priority;\n return a.ContributionKey.localeCompare(b.ContributionKey);\n });\n}\n\n/**\n * Resolve what belongs on the form. Stock grids are only those the template\n * did not already bake and that no panel claimed.\n */\nexport function ResolveFormContributions(input: ResolveFormContributionsInput): ResolveFormContributionsResult {\n const peers = visibleRelationships(input.RelatedEntities, input.IsaChildEntityIDs);\n const winners = ResolveFormContributionWinners(input.EntityName, input.Registrations).Winners;\n const baked = new Set(input.BakedSectionKeys);\n const sectionKeyOf = CreateRelatedEntitySectionKeyResolver(peers);\n\n const claimedKeys = new Set<string>();\n const registered: FormContributionWinner[] = [];\n for (const reg of winners) {\n // One winner per key per form: a wildcard place claim that won key K hides the entity's own K too.\n if (IsWildcardPlaceClaim(reg.Metadata)) continue;\n const key = ResolveContributionKey(reg.Metadata) || `${reg.Metadata.entity}:${reg.Metadata.slot}:${reg.Priority}`;\n const related = reg.Metadata.relatedEntity?.trim();\n const peer = related\n ? peers.find((rel) => {\n if (rel.RelatedEntity !== related) return false;\n const wantJoin = StripJoinFieldBrackets(reg.Metadata.relatedJoinField);\n if (!wantJoin) return true;\n return StripJoinFieldBrackets(rel.RelatedEntityJoinField) === wantJoin;\n })\n : undefined;\n const sectionKey = peer ? sectionKeyOf(peer) : '';\n if (related) {\n claimedKeys.add(RelatedContributionKey(related, reg.Metadata.relatedJoinField));\n // A claim that omits the join field covers every FK to that entity.\n if (!StripJoinFieldBrackets(reg.Metadata.relatedJoinField)) {\n for (const match of peers.filter((rel) => rel.RelatedEntity === related)) {\n claimedKeys.add(RelatedContributionKey(match.RelatedEntity, match.RelatedEntityJoinField));\n }\n }\n }\n registered.push(\n registeredWinner(key, reg, sectionKey, peer ? RelationshipDisplayName(peer) : related ?? key),\n );\n }\n\n const hiddenBaked: string[] = [];\n const stock: FormContributionWinner[] = [];\n if (input.ShowRelatedEntities) {\n for (const rel of peers) {\n const key = RelatedContributionKey(rel.RelatedEntity, rel.RelatedEntityJoinField);\n const sectionKey = sectionKeyOf(rel);\n if (claimedKeys.has(key)) {\n if (baked.has(sectionKey)) hiddenBaked.push(sectionKey);\n continue;\n }\n if (baked.has(sectionKey)) continue;\n stock.push(stockWinner(rel, sectionKey));\n }\n } else {\n for (const rel of peers) {\n const key = RelatedContributionKey(rel.RelatedEntity, rel.RelatedEntityJoinField);\n const sectionKey = sectionKeyOf(rel);\n if (claimedKeys.has(key) && baked.has(sectionKey)) hiddenBaked.push(sectionKey);\n }\n }\n\n return {\n Winners: sortWinners([...registered, ...stock]),\n HiddenBakedSectionKeys: hiddenBaked,\n StockGrids: sortWinners(stock),\n };\n}\n\n/** Section keys a form should hide because a winning contribution claimed them. */\nexport function ContributionHiddenSectionKeys(\n entityName: string,\n relatedEntities: readonly FormContributionRelationship[],\n isaChildEntityIDs: readonly string[],\n registrations: readonly FormContributionRegistration[],\n): string[] {\n const resolved = ResolveFormContributions({\n EntityName: entityName,\n RelatedEntities: relatedEntities,\n IsaChildEntityIDs: isaChildEntityIDs,\n Registrations: registrations,\n BakedSectionKeys: [],\n ShowRelatedEntities: true,\n });\n const peers = visibleRelationships(relatedEntities, isaChildEntityIDs);\n const sectionKeyOf = CreateRelatedEntitySectionKeyResolver(peers);\n const keys: string[] = [];\n for (const winner of resolved.Winners) {\n if (winner.Kind !== 'registered') continue;\n if (winner.ReplacesSectionKey) keys.push(winner.ReplacesSectionKey);\n for (const key of winner.ReplacesSectionKeys ?? []) if (key.trim()) keys.push(key.trim());\n if (!winner.RelatedEntity) continue;\n const peer = peers.find((rel) => {\n if (rel.RelatedEntity !== winner.RelatedEntity) return false;\n if (!winner.RelatedJoinField) return true;\n return StripJoinFieldBrackets(rel.RelatedEntityJoinField) === winner.RelatedJoinField;\n });\n if (peer) keys.push(sectionKeyOf(peer));\n }\n return keys;\n}\n\n/** @deprecated Use {@link ContributionHiddenSectionKeys}. */\nexport function ClaimedRelatedSectionKeys(\n entityName: string,\n relatedEntities: readonly FormContributionRelationship[],\n isaChildEntityIDs: readonly string[],\n registrations: readonly FormContributionRegistration[],\n): string[] {\n return ContributionHiddenSectionKeys(entityName, relatedEntities, isaChildEntityIDs, registrations);\n}\n\n/**\n * Whether this registration is hosted by a section rather than by a slot.\n *\n * A contribution that names fields renders at the top of the section drawing them, which\n * `<mj-form-field-panel-slot>` mounts. It still carries a `slot`, because every row does,\n * so a slot host that went by slot alone would mount it a second time at the bottom of the\n * form — the same panel twice, once in the group and once as a section of its own.\n */\nexport function ContributionClaimsFields(\n metadata: Pick<FormPanelRegistrationMetadata, 'replacesFieldNames'> | null | undefined,\n): boolean {\n return (metadata?.replacesFieldNames ?? []).some((name) => name.trim().length > 0);\n}\n\n/**\n * The section a registration names to draw in, or '' when it names none. A wildcard\n * (`entity: '*'`) registration's section is ignored, because it would take that place on every\n * form, so the panel draws at its slot.\n */\nexport function PlacedInSectionKey(\n metadata: Partial<Pick<FormPanelRegistrationMetadata, 'entity' | 'inSectionKey'>> | null | undefined,\n): string {\n if (!metadata || metadata.entity === '*') return '';\n return metadata.inSectionKey?.trim() ?? '';\n}\n\n/**\n * Whether this registration is drawn inside a section rather than by a slot: it stands in for\n * fields, or it names a section to draw in ({@link PlacedInSectionKey}). The section's own host\n * mounts it, so a slot host must not mount it a second time.\n */\nexport function ContributionDrawsInSection(\n metadata: Partial<Pick<FormPanelRegistrationMetadata, 'entity' | 'replacesFieldNames' | 'inSectionKey'>> | null | undefined,\n): boolean {\n return ContributionClaimsFields(metadata) || !!PlacedInSectionKey(metadata);\n}\n\n/** Where inside its section a section-hosted contribution draws. */\nexport function ContributionSectionPosition(\n metadata: Pick<FormPanelRegistrationMetadata, 'sectionPosition'> | null | undefined,\n): 'start' | 'end' {\n return metadata?.sectionPosition === 'end' ? 'end' : 'start';\n}\n\n/** Every section a contribution stands in for: the single key, then the list, without repeats. */\nexport function ReplacedSectionKeys(\n metadata: Pick<FormPanelRegistrationMetadata, 'replacesSectionKey' | 'replacesSectionKeys'> | null | undefined,\n): string[] {\n const out: string[] = [];\n for (const raw of [metadata?.replacesSectionKey, ...(metadata?.replacesSectionKeys ?? [])]) {\n const key = raw?.trim();\n if (key && !out.includes(key)) out.push(key);\n }\n return out;\n}\n\n/**\n * Field names the winning contributions stand in for, so the form stops drawing them.\n *\n * Separate from {@link ContributionHiddenSectionKeys} because the two hide different\n * things: a section key removes a whole card, a field name removes one input from inside\n * one. The panel that made the claim renders at the top of the section that held those\n * fields, which is the collapsible panel's job — this only says which fields are spoken for.\n */\nexport function ContributionClaimedFieldNames(\n entityName: string,\n relatedEntities: readonly FormContributionRelationship[],\n isaChildEntityIDs: readonly string[],\n registrations: readonly FormContributionRegistration[],\n): string[] {\n const resolved = ResolveFormContributions({\n EntityName: entityName,\n RelatedEntities: relatedEntities,\n IsaChildEntityIDs: isaChildEntityIDs,\n Registrations: registrations,\n BakedSectionKeys: [],\n ShowRelatedEntities: true,\n });\n const names: string[] = [];\n for (const winner of resolved.Winners) {\n if (winner.Kind !== 'registered') continue;\n for (const name of winner.ReplacesFieldNames ?? []) {\n if (!names.includes(name)) names.push(name);\n }\n }\n return names;\n}\n\n/**\n * `DisplayInForm` relationships that can appear on the parent form (IS-A\n * children excluded), in Sequence order — the same peer set\n * {@link ResolveFormContributions} and {@link CreateRelatedEntitySectionKeyResolver} use.\n */\nexport function VisibleFormRelationships<T extends FormContributionRelationship>(\n related: readonly T[],\n isaChildIds: readonly string[],\n): T[] {\n return visibleRelationships(related, isaChildIds) as T[];\n}\n"]}
1
+ {"version":3,"file":"form-contribution.js","sourceRoot":"","sources":["../../../src/lib/panel-slot/form-contribution.ts"],"names":[],"mappings":"AAcA,OAAO,EACH,8BAA8B,EAC9B,oBAAoB,IAAI,0BAA0B,EAClD,sBAAsB,IAAI,4BAA4B,EACtD,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,IAAI,4BAA4B,GAEzD,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAuC,MAAM,+BAA+B,CAAC;AA8G9G,qFAAqF;AACrF,MAAM,UAAU,sBAAsB,CAAC,SAAoC;IACvE,OAAO,4BAA4B,CAAC,SAAS,CAAC,CAAC;AACnD,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC5C,OAAO,0BAA0B,CAAC,GAAG,CAAC,CAAC;AAC3C,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,s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KAAK,YAAY;YAAE,SAAS;QAC3C,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,kBAAkB,IAAI,EAAE,EAAE,CAAC;YACjD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACpC,OAAqB,EACrB,WAA8B;IAE9B,OAAO,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAQ,CAAC;AAC7D,CAAC","sourcesContent":["/**\n * Form contributions — pure resolve of what should appear on an entity form.\n *\n * A contribution is either a registered BaseFormPanel or the stock related-entity\n * grid. Related claims replace the stock/baked grid. No Angular, no ClassFactory\n * — the host queries registrations and feeds this.\n *\n * Contribution keys and section keys come from the shared key module in\n * `@memberjunction/interactive-component-types/forms`, which the server actions use too.\n * Section keys for related panels match CodeGen's camelCase (`angular-codegen.ts`), so\n * hide-baked and skip-baked find the grid CodeGen emitted.\n */\nimport type { ClassRegistration } from '@memberjunction/global';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport {\n DEFAULT_FORM_CONTRIBUTION_SLOT,\n FormSectionCamelCase as SharedFormSectionCamelCase,\n RelatedContributionKey as SharedRelatedContributionKey,\n RelatedGridSectionKey,\n ResolveContributionWriteKey,\n StripJoinFieldBrackets as SharedStripJoinFieldBrackets,\n type FormContributionSpec,\n} from '@memberjunction/interactive-component-types/forms';\nimport { CountByUUID, NormalizeUUID, UUIDsEqual } from '@memberjunction/global';\nimport { FormContributionOutranks, type MJEntityFormContributionEntity } from '@memberjunction/core-entities';\nimport { FormPanelRegistrationMetadata, FormPanelSlot } from './base-form-panel';\n\n/** Minimum relationship shape the composer reads. Satisfied by EntityRelationshipInfo. */\nexport interface FormContributionRelationship {\n RelatedEntity: string;\n RelatedEntityID: string;\n RelatedEntityJoinField: string;\n DisplayInForm: boolean;\n DisplayName?: string | null;\n Sequence?: number | null;\n}\n\n/** Which of the two registration sources produced a contribution. */\nexport type FormContributionRegistrationSource = 'class' | 'metadata';\n\nexport interface FormContributionRegistration {\n /**\n * Rank within a `contributionKey` group, higher wins. For `'class'` registrations this\n * is the ClassFactory registration priority; for `'metadata'` rows it is the row's\n * `Precedence` column. Both mean the same thing here — higher wins — which is why one\n * field carries both.\n */\n Priority: number;\n Metadata: FormPanelRegistrationMetadata;\n\n /** Omitted on legacy call sites, which are all compiled registrations. */\n Source?: FormContributionRegistrationSource;\n\n /** `MJ: Components.ID` the panel renders — metadata rows only. */\n ComponentID?: string;\n\n /** Parsed `Configuration` JSON for metadata rows. */\n Configuration?: Record<string, unknown>;\n\n Title?: string;\n Icon?: string;\n Presentation?: 'panel' | 'bare';\n\n /** `MJ: Entity Form Contributions.ID` for metadata rows. */\n RowID?: string;\n\n /**\n * Who a metadata row is for. Absent on compiled registrations, which apply to everyone the\n * code puts them in front of. A `User` row a user can see is necessarily their own — the\n * collector only returns personal rows for the current user.\n */\n Scope?: MJEntityFormContributionEntity['Scope'];\n\n /** The ClassFactory registration for compiled panels — carries the component constructor. */\n Registration?: ClassRegistration;\n\n /**\n * A panel the placement dialog is showing before it is saved. It draws its component when\n * it carries one, else a placeholder. Only a form inside the dialog's preview sees one.\n */\n IsPreview?: boolean;\n\n /**\n * The component to render when it has not been saved yet, so there is no `ComponentID` to\n * load. Only the placement preview sets it.\n */\n ComponentSpec?: ComponentSpec;\n}\n\nexport interface ResolveFormContributionsInput {\n EntityName: string;\n RelatedEntities: readonly FormContributionRelationship[];\n /** IS-A child entity IDs — CodeGen skips these (shown in the ISA side panel). */\n IsaChildEntityIDs: readonly string[];\n Registrations: readonly FormContributionRegistration[];\n /** SectionKeys already projected as Variant=\"related-entity\" in the form template. */\n BakedSectionKeys: readonly string[];\n ShowRelatedEntities: boolean;\n}\n\nexport type FormContributionKind = 'registered' | 'stock-grid';\n\nexport interface FormContributionWinner {\n ContributionKey: string;\n Slot: FormPanelSlot;\n SortKey: number;\n Priority: number;\n Kind: FormContributionKind;\n RelatedEntity?: string;\n RelatedJoinField?: string;\n /** Field/other section this registered winner asked to hide. */\n ReplacesSectionKey?: string;\n /** Fields this registered winner stands in for, so they are not drawn. */\n ReplacesFieldNames?: readonly string[];\n /** Further sections this registered winner stands in for, beyond `ReplacesSectionKey`. */\n ReplacesSectionKeys?: readonly string[];\n BakedSectionKey: string;\n DisplayName: string;\n\n /** Carried through from the registration so consumers can tell the two sources apart. */\n Source?: FormContributionRegistrationSource;\n ComponentID?: string;\n Title?: string;\n Presentation?: 'panel' | 'bare';\n}\n\nexport interface ResolveFormContributionsResult {\n Winners: FormContributionWinner[];\n /** CodeGen section keys to hide because a registered panel claimed them. */\n HiddenBakedSectionKeys: string[];\n /** Stock grids the host should mount (unclaimed and not already baked). */\n StockGrids: FormContributionWinner[];\n}\n\n/** Strip wrapping [] from a join field. Uses the shared `StripJoinFieldBrackets`. */\nexport function StripJoinFieldBrackets(joinField: string | null | undefined): string {\n return SharedStripJoinFieldBrackets(joinField);\n}\n\n/** camelCase + identifier sanitize, as CodeGen names sections. Uses the shared `FormSectionCamelCase`. */\nexport function FormSectionCamelCase(str: string): string {\n return SharedFormSectionCamelCase(str);\n}\n\n/** `related:<entity>:<join>`. Uses the shared `RelatedContributionKey`. */\nexport function RelatedContributionKey(relatedEntity: string, joinField?: string | null): string {\n return SharedRelatedContributionKey(relatedEntity, joinField);\n}\n\n/**\n * The key a registration collapses by: its own key, else the derived related key. Empty for a\n * registration with neither, which never collapses. Uses the shared `ResolveContributionWriteKey`.\n */\nexport function ResolveContributionKey(meta: FormPanelRegistrationMetadata): string {\n return ResolveContributionWriteKey(meta, meta.relatedEntity ?? null) ?? '';\n}\n\n/**\n * The section key a registration's panel draws under, which the rail, the counts and the chrome\n * group file it by.\n *\n * A row's panel draws under its contribution key ({@link ResolveContributionKey}), or\n * `contribution:<row id>` when it has none. A compiled panel's template names its own section; by\n * convention that is its `contributionKey`, or for a grid claim with no key, the related entity's\n * name after its schema prefix, in camelCase. Empty for a compiled panel with neither.\n */\nexport function ContributionSectionKey(registration: FormContributionRegistration): string {\n const meta = registration.Metadata;\n if (registration.Source === 'metadata') {\n return ResolveContributionKey(meta) || `contribution:${registration.RowID ?? registration.ComponentID ?? 'unknown'}`;\n }\n const own = meta.contributionKey?.trim();\n if (own) return own;\n // The key compiled panel templates use (`contactMethods`), not the generated-form grid key.\n const entityName = meta.relatedEntity?.split(':').pop()?.trim();\n return entityName ? FormSectionCamelCase(entityName) : '';\n}\n\n/**\n * A contribution spec as a registration: the one mapping for a saved row, the placement preview\n * and the artifact viewer's preview. Ranked 0 and keyed only by the spec's own key; a caller that\n * knows more (a row's precedence, a preview's derived key) sets it on the result.\n */\nexport function ContributionSpecToRegistration(\n entityName: string,\n spec: FormContributionSpec,\n componentID?: string,\n): FormContributionRegistration {\n const metadata: FormPanelRegistrationMetadata = {\n entity: entityName,\n slot: spec.slot ?? DEFAULT_FORM_CONTRIBUTION_SLOT,\n sortKey: spec.sortKey ?? 0,\n presentation: spec.presentation,\n };\n if (spec.contributionKey) metadata.contributionKey = spec.contributionKey;\n if (spec.relatedEntity) metadata.relatedEntity = spec.relatedEntity;\n if (spec.relatedJoinField) metadata.relatedJoinField = spec.relatedJoinField;\n if (spec.replacesSectionKey) metadata.replacesSectionKey = spec.replacesSectionKey;\n if (spec.replacesFieldNames?.length) metadata.replacesFieldNames = [...spec.replacesFieldNames];\n if (spec.replacesSectionKeys?.length) metadata.replacesSectionKeys = [...spec.replacesSectionKeys];\n if (spec.inSectionKey) metadata.inSectionKey = spec.inSectionKey;\n if (spec.sectionPosition) metadata.sectionPosition = spec.sectionPosition;\n if (spec.inclusion) metadata.inclusion = spec.inclusion;\n if (spec.chromeGroup) metadata.chromeGroup = spec.chromeGroup;\n const registration: FormContributionRegistration = {\n Priority: 0,\n Metadata: metadata,\n Source: 'metadata',\n Title: spec.title,\n Icon: spec.icon,\n Presentation: spec.presentation,\n Configuration: spec.configuration ?? {},\n };\n if (componentID) registration.ComponentID = componentID;\n return registration;\n}\n\n/**\n * SectionKey CodeGen emits for a related-entity panel. When more than one\n * DisplayInForm relationship points at the same entity, the join field is\n * appended so BillTo / ShipTo do not collide.\n */\nexport function RelatedEntitySectionKey(\n relationship: FormContributionRelationship,\n displayInFormPeers: readonly FormContributionRelationship[],\n): string {\n // Normalize the target once and stop at the second match. UUIDsEqual's `===` fast path\n // misses on every peer that points elsewhere, so a filter over UUIDsEqual lowercases both\n // sides of every comparison. To key many relationships against the same peers, use\n // CreateRelatedEntitySectionKeyResolver instead.\n const target = NormalizeUUID(relationship.RelatedEntityID);\n let sameEntityCount = 0;\n for (const peer of displayInFormPeers) {\n if (NormalizeUUID(peer.RelatedEntityID) === target && ++sameEntityCount > 1) break;\n }\n return relatedSectionKey(relationship, sameEntityCount > 1);\n}\n\nfunction relatedSectionKey(relationship: FormContributionRelationship, sharesRelatedEntity: boolean): string {\n return RelatedGridSectionKey(relationship.RelatedEntity, relationship.RelatedEntityJoinField, sharesRelatedEntity);\n}\n\n/**\n * Builds a function that returns {@link RelatedEntitySectionKey}`(relationship, displayInFormPeers)`\n * for any relationship, against the ONE peer set passed here. Build it once per peer set, then\n * call it once per relationship. The relationship does not have to be in the peer set; it is keyed\n * by how many peers share its related entity.\n *\n * Building counts each related entity once, so keying all n peers is O(n). Calling\n * RelatedEntitySectionKey per peer is O(n²), which on an entity with ~150 DisplayInForm\n * relationships (MJ: Users), resolved on every change-detection pass, pegged a CPU core.\n * The returned function reflects the peers as they were when it was built.\n */\nexport function CreateRelatedEntitySectionKeyResolver(\n displayInFormPeers: readonly FormContributionRelationship[],\n): (relationship: FormContributionRelationship) => string {\n const countByEntityID = CountByUUID(displayInFormPeers, (peer) => peer.RelatedEntityID);\n return (relationship) => relatedSectionKey(relationship, (countByEntityID.Get(relationship.RelatedEntityID) ?? 0) > 1);\n}\n\nexport function RelationshipDisplayName(relationship: FormContributionRelationship): string {\n const named = relationship.DisplayName?.trim();\n const raw = named && named.length > 0 ? named : relationship.RelatedEntity;\n return raw.replace(/^[A-Za-z][A-Za-z0-9_]*:\\s+/, '').trim() || raw;\n}\n\nfunction isIsaChild(relationship: FormContributionRelationship, isaChildIds: readonly string[]): boolean {\n return isaChildIds.some((id) => UUIDsEqual(id, relationship.RelatedEntityID));\n}\n\nfunction visibleRelationships(\n related: readonly FormContributionRelationship[],\n isaChildIds: readonly string[],\n): FormContributionRelationship[] {\n const visible = related.filter((rel) => rel.DisplayInForm && !isIsaChild(rel, isaChildIds));\n return [...visible].sort((a, b) => {\n const aSeq = a.Sequence ?? 999999;\n const bSeq = b.Sequence ?? 999999;\n if (aSeq !== bSeq) return aSeq - bSeq;\n return a.RelatedEntity.localeCompare(b.RelatedEntity);\n });\n}\n\n/**\n * Strict entity match shared by the composer and the slot host. `'*'` matches every form.\n *\n * Exported because the slot host used to run its own prefix-insensitive variant, which\n * mounted panels the composer then ignored — the two sides disagreed about which panels\n * existed. One predicate, used by both.\n */\nexport function FormContributionEntityMatches(registeredEntity: string | null | undefined, formEntity: string): boolean {\n if (!registeredEntity) return false;\n return registeredEntity === '*' || registeredEntity === formEntity;\n}\n\n/**\n * A wildcard registration that claims a grid, a section or a rail tab, or names a section to draw\n * in. It still mounts, but its claim is ignored: it would take that place from every form.\n */\nexport function IsWildcardPlaceClaim(meta: FormPanelRegistrationMetadata): boolean {\n return meta.entity === '*'\n && (!!meta.relatedEntity || ReplacedSectionKeys(meta).length > 0 || !!meta.inSectionKey?.trim());\n}\n\n/** The fields the collapse ranks a registration by. */\ntype RankedRegistration = Pick<FormContributionRegistration, 'Priority' | 'Source' | 'Scope'>;\n\n/**\n * Whether `reg` beats `incumbent`, by the rule the server's composition answer also uses\n * ({@link FormContributionOutranks}): higher Priority; on a tie a compiled registration beats any\n * row, and between rows the narrower audience wins.\n */\nfunction outranks(reg: RankedRegistration, incumbent: RankedRegistration): boolean {\n return FormContributionOutranks(rankOf(reg), rankOf(incumbent));\n}\n\nfunction rankOf(reg: RankedRegistration) {\n return { Precedence: reg.Priority, Scope: reg.Scope, Compiled: reg.Source !== 'metadata' };\n}\n\n/**\n * Collapse by key ({@link ResolveContributionKey}, compared exactly). Highest Priority wins; on a\n * tie the compiled registration wins, and between rows the narrower scope. Registrations without\n * a key never collapse.\n *\n * The tie-break is an explicit comparator rather than input ordering, so the result does not\n * depend on which source the caller concatenated first.\n */\nexport function CollapseFormPanelRegistrations<T extends {\n Priority: number;\n Metadata: FormPanelRegistrationMetadata;\n Source?: FormContributionRegistrationSource;\n Scope?: FormContributionRegistration['Scope'];\n}>(\n registrations: readonly T[],\n): T[] {\n const winners = new Map<string, T>();\n let uniqueIndex = 0;\n for (const reg of registrations) {\n const key = ResolveContributionKey(reg.Metadata) || `__unique:${uniqueIndex++}`;\n const incumbent = winners.get(key);\n if (!incumbent || outranks(reg, incumbent)) {\n winners.set(key, reg);\n }\n }\n return [...winners.values()];\n}\n\n/** One form's contributions after the collapse. */\nexport interface ResolvedFormContributions {\n /**\n * The winners among the registrations for this entity or for every entity (`'*'`): one per\n * key, and each registration that has no key.\n */\n readonly Winners: readonly FormContributionRegistration[];\n /**\n * The winners the rail files, by {@link ContributionSectionKey}: they name the entity rather\n * than the wildcard, draw a section rather than a bare strip, and have a section key. Two\n * winners filed under one section key keep the one that ranks higher in the collapse.\n */\n readonly RailItems: ReadonlyMap<string, FormContributionRegistration>;\n}\n\nconst resolvedMemo = new WeakMap<readonly FormContributionRegistration[], Map<string, ResolvedFormContributions>>();\n\n/**\n * The winning registrations on one entity's form, resolved once for the whole form.\n *\n * Every host that draws contributions filters these winners by its own slot or section, so a row\n * that takes a key from a compiled panel draws where the row says, and the compiled panel draws\n * nowhere. Memoized per input list, which the collector returns as a stable reference until\n * something changes, so a caller must not change a list after passing it. The result is shared:\n * callers must not mutate it.\n */\nexport function ResolveFormContributionWinners(\n entityName: string,\n registrations: readonly FormContributionRegistration[],\n): ResolvedFormContributions {\n let byEntity = resolvedMemo.get(registrations);\n const hit = byEntity?.get(entityName);\n if (hit) return hit;\n const applicable = registrations.filter((reg) => FormContributionEntityMatches(reg.Metadata?.entity, entityName));\n const winners = CollapseFormPanelRegistrations(applicable);\n const railItems = new Map<string, FormContributionRegistration>();\n for (const reg of winners) {\n const meta = reg.Metadata;\n if (meta.entity !== entityName || reg.Presentation === 'bare' || meta.presentation === 'bare') continue;\n const key = ContributionSectionKey(reg);\n const filed = key ? railItems.get(key) : undefined;\n if (key && (!filed || outranks(reg, filed))) railItems.set(key, reg);\n }\n const resolved: ResolvedFormContributions = { Winners: winners, RailItems: railItems };\n if (!byEntity) {\n byEntity = new Map();\n resolvedMemo.set(registrations, byEntity);\n }\n byEntity.set(entityName, resolved);\n return resolved;\n}\n\nfunction stockWinner(relationship: FormContributionRelationship, sectionKey: string): FormContributionWinner {\n const join = StripJoinFieldBrackets(relationship.RelatedEntityJoinField);\n return {\n ContributionKey: RelatedContributionKey(relationship.RelatedEntity, join),\n Slot: 'after-related',\n SortKey: -(relationship.Sequence ?? 0),\n Priority: 0,\n Kind: 'stock-grid',\n RelatedEntity: relationship.RelatedEntity,\n RelatedJoinField: join,\n BakedSectionKey: sectionKey,\n DisplayName: RelationshipDisplayName(relationship),\n };\n}\n\nfunction registeredWinner(\n key: string,\n reg: FormContributionRegistration,\n sectionKey: string,\n displayName: string,\n): FormContributionWinner {\n const meta = reg.Metadata;\n return {\n ContributionKey: key,\n Slot: meta.slot,\n SortKey: meta.sortKey ?? 0,\n Priority: reg.Priority,\n Kind: 'registered',\n RelatedEntity: meta.relatedEntity,\n RelatedJoinField: meta.relatedJoinField ? StripJoinFieldBrackets(meta.relatedJoinField) : undefined,\n ReplacesSectionKey: meta.replacesSectionKey?.trim() || undefined,\n ReplacesFieldNames: meta.replacesFieldNames?.length ? [...meta.replacesFieldNames] : undefined,\n ReplacesSectionKeys: meta.replacesSectionKeys?.length ? [...meta.replacesSectionKeys] : undefined,\n BakedSectionKey: sectionKey,\n DisplayName: displayName,\n Source: reg.Source,\n ComponentID: reg.ComponentID,\n Title: reg.Title,\n Presentation: reg.Presentation ?? meta.presentation,\n };\n}\n\nfunction sortWinners(winners: FormContributionWinner[]): FormContributionWinner[] {\n return [...winners].sort((a, b) => {\n if (a.SortKey !== b.SortKey) return b.SortKey - a.SortKey;\n if (a.Priority !== b.Priority) return b.Priority - a.Priority;\n return a.ContributionKey.localeCompare(b.ContributionKey);\n });\n}\n\n/**\n * Resolve what belongs on the form. Stock grids are only those the template\n * did not already bake and that no panel claimed.\n */\nexport function ResolveFormContributions(input: ResolveFormContributionsInput): ResolveFormContributionsResult {\n const peers = visibleRelationships(input.RelatedEntities, input.IsaChildEntityIDs);\n const winners = ResolveFormContributionWinners(input.EntityName, input.Registrations).Winners;\n const baked = new Set(input.BakedSectionKeys);\n const sectionKeyOf = CreateRelatedEntitySectionKeyResolver(peers);\n\n const claimedKeys = new Set<string>();\n const registered: FormContributionWinner[] = [];\n for (const reg of winners) {\n // One winner per key per form: a wildcard place claim that won key K hides the entity's own K too.\n if (IsWildcardPlaceClaim(reg.Metadata)) continue;\n const key = ResolveContributionKey(reg.Metadata) || `${reg.Metadata.entity}:${reg.Metadata.slot}:${reg.Priority}`;\n const related = reg.Metadata.relatedEntity?.trim();\n const peer = related\n ? peers.find((rel) => {\n if (rel.RelatedEntity !== related) return false;\n const wantJoin = StripJoinFieldBrackets(reg.Metadata.relatedJoinField);\n if (!wantJoin) return true;\n return StripJoinFieldBrackets(rel.RelatedEntityJoinField) === wantJoin;\n })\n : undefined;\n const sectionKey = peer ? sectionKeyOf(peer) : '';\n if (related) {\n claimedKeys.add(RelatedContributionKey(related, reg.Metadata.relatedJoinField));\n // A claim that omits the join field covers every FK to that entity.\n if (!StripJoinFieldBrackets(reg.Metadata.relatedJoinField)) {\n for (const match of peers.filter((rel) => rel.RelatedEntity === related)) {\n claimedKeys.add(RelatedContributionKey(match.RelatedEntity, match.RelatedEntityJoinField));\n }\n }\n }\n registered.push(\n registeredWinner(key, reg, sectionKey, peer ? RelationshipDisplayName(peer) : related ?? key),\n );\n }\n\n const hiddenBaked: string[] = [];\n const stock: FormContributionWinner[] = [];\n if (input.ShowRelatedEntities) {\n for (const rel of peers) {\n const key = RelatedContributionKey(rel.RelatedEntity, rel.RelatedEntityJoinField);\n const sectionKey = sectionKeyOf(rel);\n if (claimedKeys.has(key)) {\n if (baked.has(sectionKey)) hiddenBaked.push(sectionKey);\n continue;\n }\n if (baked.has(sectionKey)) continue;\n stock.push(stockWinner(rel, sectionKey));\n }\n } else {\n for (const rel of peers) {\n const key = RelatedContributionKey(rel.RelatedEntity, rel.RelatedEntityJoinField);\n const sectionKey = sectionKeyOf(rel);\n if (claimedKeys.has(key) && baked.has(sectionKey)) hiddenBaked.push(sectionKey);\n }\n }\n\n return {\n Winners: sortWinners([...registered, ...stock]),\n HiddenBakedSectionKeys: hiddenBaked,\n StockGrids: sortWinners(stock),\n };\n}\n\n/** Section keys a form should hide because a winning contribution claimed them. */\nexport function ContributionHiddenSectionKeys(\n entityName: string,\n relatedEntities: readonly FormContributionRelationship[],\n isaChildEntityIDs: readonly string[],\n registrations: readonly FormContributionRegistration[],\n): string[] {\n const resolved = ResolveFormContributions({\n EntityName: entityName,\n RelatedEntities: relatedEntities,\n IsaChildEntityIDs: isaChildEntityIDs,\n Registrations: registrations,\n BakedSectionKeys: [],\n ShowRelatedEntities: true,\n });\n const peers = visibleRelationships(relatedEntities, isaChildEntityIDs);\n const sectionKeyOf = CreateRelatedEntitySectionKeyResolver(peers);\n const keys: string[] = [];\n for (const winner of resolved.Winners) {\n if (winner.Kind !== 'registered') continue;\n if (winner.ReplacesSectionKey) keys.push(winner.ReplacesSectionKey);\n for (const key of winner.ReplacesSectionKeys ?? []) if (key.trim()) keys.push(key.trim());\n if (!winner.RelatedEntity) continue;\n const peer = peers.find((rel) => {\n if (rel.RelatedEntity !== winner.RelatedEntity) return false;\n if (!winner.RelatedJoinField) return true;\n return StripJoinFieldBrackets(rel.RelatedEntityJoinField) === winner.RelatedJoinField;\n });\n if (peer) keys.push(sectionKeyOf(peer));\n }\n return keys;\n}\n\n/** @deprecated Use {@link ContributionHiddenSectionKeys}. */\nexport function ClaimedRelatedSectionKeys(\n entityName: string,\n relatedEntities: readonly FormContributionRelationship[],\n isaChildEntityIDs: readonly string[],\n registrations: readonly FormContributionRegistration[],\n): string[] {\n return ContributionHiddenSectionKeys(entityName, relatedEntities, isaChildEntityIDs, registrations);\n}\n\n/**\n * Whether this registration is hosted by a section rather than by a slot.\n *\n * A contribution that names fields renders at the top of the section drawing them, which\n * `<mj-form-field-panel-slot>` mounts. It still carries a `slot`, because every row does,\n * so a slot host that went by slot alone would mount it a second time at the bottom of the\n * form — the same panel twice, once in the group and once as a section of its own.\n */\nexport function ContributionClaimsFields(\n metadata: Pick<FormPanelRegistrationMetadata, 'replacesFieldNames'> | null | undefined,\n): boolean {\n return (metadata?.replacesFieldNames ?? []).some((name) => name.trim().length > 0);\n}\n\n/**\n * The section a registration names to draw in, or '' when it names none. A wildcard\n * (`entity: '*'`) registration's section is ignored, because it would take that place on every\n * form, so the panel draws at its slot.\n */\nexport function PlacedInSectionKey(\n metadata: Partial<Pick<FormPanelRegistrationMetadata, 'entity' | 'inSectionKey'>> | null | undefined,\n): string {\n if (!metadata || metadata.entity === '*') return '';\n return metadata.inSectionKey?.trim() ?? '';\n}\n\n/**\n * Whether this registration is drawn inside a section rather than by a slot: it stands in for\n * fields, or it names a section to draw in ({@link PlacedInSectionKey}). The section's own host\n * mounts it, so a slot host must not mount it a second time.\n */\nexport function ContributionDrawsInSection(\n metadata: Partial<Pick<FormPanelRegistrationMetadata, 'entity' | 'replacesFieldNames' | 'inSectionKey'>> | null | undefined,\n): boolean {\n return ContributionClaimsFields(metadata) || !!PlacedInSectionKey(metadata);\n}\n\n/** Where inside its section a section-hosted contribution draws. */\nexport function ContributionSectionPosition(\n metadata: Pick<FormPanelRegistrationMetadata, 'sectionPosition'> | null | undefined,\n): 'start' | 'end' {\n return metadata?.sectionPosition === 'end' ? 'end' : 'start';\n}\n\n/** Every section a contribution stands in for: the single key, then the list, without repeats. */\nexport function ReplacedSectionKeys(\n metadata: Pick<FormPanelRegistrationMetadata, 'replacesSectionKey' | 'replacesSectionKeys'> | null | undefined,\n): string[] {\n const out: string[] = [];\n for (const raw of [metadata?.replacesSectionKey, ...(metadata?.replacesSectionKeys ?? [])]) {\n const key = raw?.trim();\n if (key && !out.includes(key)) out.push(key);\n }\n return out;\n}\n\n/**\n * Field names the winning contributions stand in for, so the form stops drawing them.\n *\n * Separate from {@link ContributionHiddenSectionKeys} because the two hide different\n * things: a section key removes a whole card, a field name removes one input from inside\n * one. The panel that made the claim renders at the top of the section that held those\n * fields, which is the collapsible panel's job — this only says which fields are spoken for.\n */\nexport function ContributionClaimedFieldNames(\n entityName: string,\n relatedEntities: readonly FormContributionRelationship[],\n isaChildEntityIDs: readonly string[],\n registrations: readonly FormContributionRegistration[],\n): string[] {\n const resolved = ResolveFormContributions({\n EntityName: entityName,\n RelatedEntities: relatedEntities,\n IsaChildEntityIDs: isaChildEntityIDs,\n Registrations: registrations,\n BakedSectionKeys: [],\n ShowRelatedEntities: true,\n });\n const names: string[] = [];\n for (const winner of resolved.Winners) {\n if (winner.Kind !== 'registered') continue;\n for (const name of winner.ReplacesFieldNames ?? []) {\n if (!names.includes(name)) names.push(name);\n }\n }\n return names;\n}\n\n/**\n * `DisplayInForm` relationships that can appear on the parent form (IS-A\n * children excluded), in Sequence order — the same peer set\n * {@link ResolveFormContributions} and {@link CreateRelatedEntitySectionKeyResolver} use.\n */\nexport function VisibleFormRelationships<T extends FormContributionRelationship>(\n related: readonly T[],\n isaChildIds: readonly string[],\n): T[] {\n return visibleRelationships(related, isaChildIds) as T[];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-base-forms",
3
- "version": "6.2.0-edge.3",
3
+ "version": "6.2.0-edge.4",
4
4
  "description": "MemberJunction: Generic Angular form components for rendering and editing entity records. Provides configurable toolbar, modern form fields (native HTML, no PrimeNG dependency), collapsible panels with IS-A inheritance support, and event-driven navigation. Zero Explorer dependencies - usable in any Angular application.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
21
  "@angular/compiler": "21.2.22",
22
22
  "@angular/compiler-cli": "21.2.22",
23
- "@memberjunction/ng-test-utils": "6.2.0-edge.3",
23
+ "@memberjunction/ng-test-utils": "6.2.0-edge.4",
24
24
  "vitest": "^4.0.18"
25
25
  },
26
26
  "peerDependencies": {
@@ -30,24 +30,24 @@
30
30
  "@angular/forms": "^21.2.22"
31
31
  },
32
32
  "dependencies": {
33
- "@memberjunction/core": "6.2.0-edge.3",
34
- "@memberjunction/core-entities": "6.2.0-edge.3",
35
- "@memberjunction/global": "6.2.0-edge.3",
36
- "@memberjunction/graphql-dataprovider": "6.2.0-edge.3",
37
- "@memberjunction/interactive-component-types": "6.2.0-edge.3",
38
- "@memberjunction/ng-base-types": "6.2.0-edge.3",
39
- "@memberjunction/ng-code-editor": "6.2.0-edge.3",
40
- "@memberjunction/ng-entity-viewer": "6.2.0-edge.3",
41
- "@memberjunction/ng-file-storage": "6.2.0-edge.3",
42
- "@memberjunction/ng-list-management": "6.2.0-edge.3",
43
- "@memberjunction/ng-markdown": "6.2.0-edge.3",
44
- "@memberjunction/ng-notifications": "6.2.0-edge.3",
45
- "@memberjunction/ng-react": "6.2.0-edge.3",
46
- "@memberjunction/ng-record-changes": "6.2.0-edge.3",
47
- "@memberjunction/ng-record-clone": "6.2.0-edge.3",
48
- "@memberjunction/ng-record-tags": "6.2.0-edge.3",
49
- "@memberjunction/ng-shared-generic": "6.2.0-edge.3",
50
- "@memberjunction/ng-ui-components": "6.2.0-edge.3",
33
+ "@memberjunction/core": "6.2.0-edge.4",
34
+ "@memberjunction/core-entities": "6.2.0-edge.4",
35
+ "@memberjunction/global": "6.2.0-edge.4",
36
+ "@memberjunction/graphql-dataprovider": "6.2.0-edge.4",
37
+ "@memberjunction/interactive-component-types": "6.2.0-edge.4",
38
+ "@memberjunction/ng-base-types": "6.2.0-edge.4",
39
+ "@memberjunction/ng-code-editor": "6.2.0-edge.4",
40
+ "@memberjunction/ng-entity-viewer": "6.2.0-edge.4",
41
+ "@memberjunction/ng-file-storage": "6.2.0-edge.4",
42
+ "@memberjunction/ng-list-management": "6.2.0-edge.4",
43
+ "@memberjunction/ng-markdown": "6.2.0-edge.4",
44
+ "@memberjunction/ng-notifications": "6.2.0-edge.4",
45
+ "@memberjunction/ng-react": "6.2.0-edge.4",
46
+ "@memberjunction/ng-record-changes": "6.2.0-edge.4",
47
+ "@memberjunction/ng-record-clone": "6.2.0-edge.4",
48
+ "@memberjunction/ng-record-tags": "6.2.0-edge.4",
49
+ "@memberjunction/ng-shared-generic": "6.2.0-edge.4",
50
+ "@memberjunction/ng-ui-components": "6.2.0-edge.4",
51
51
  "rxjs": "^7.8.2",
52
52
  "tslib": "^2.8.1"
53
53
  },