@memberjunction/ng-base-forms 6.1.0-edge.5 → 6.1.0-edge.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/base-form-component.d.ts +23 -0
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +56 -13
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/chrome/form-chrome-rail-pref.d.ts +22 -0
- package/dist/lib/chrome/form-chrome-rail-pref.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome-rail-pref.js +29 -0
- package/dist/lib/chrome/form-chrome-rail-pref.js.map +1 -1
- package/dist/lib/chrome/form-chrome.d.ts +19 -0
- package/dist/lib/chrome/form-chrome.d.ts.map +1 -1
- package/dist/lib/chrome/form-chrome.js +26 -0
- package/dist/lib/chrome/form-chrome.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +52 -2
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
- package/dist/lib/container/record-form-container.component.js +485 -161
- package/dist/lib/container/record-form-container.component.js.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.d.ts +36 -0
- package/dist/lib/explorer-entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.js +112 -3
- package/dist/lib/explorer-entity-data-grid.component.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +128 -0
- package/dist/lib/field/form-field.component.d.ts.map +1 -1
- package/dist/lib/field/form-field.component.js +871 -306
- package/dist/lib/field/form-field.component.js.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-card.component.d.ts.map +1 -1
- package/dist/lib/isa-related-panel/isa-related-card.component.js +7 -1
- package/dist/lib/isa-related-panel/isa-related-card.component.js.map +1 -1
- package/dist/lib/overlays/base-form-overlay.d.ts.map +1 -1
- package/dist/lib/overlays/base-form-overlay.js +3 -1
- package/dist/lib/overlays/base-form-overlay.js.map +1 -1
- package/dist/lib/overlays/form-slide-in.component.js +10 -11
- package/dist/lib/overlays/form-slide-in.component.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +94 -3
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.js +278 -37
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.d.ts +12 -0
- package/dist/lib/panel-slot/base-form-panel.d.ts.map +1 -1
- package/dist/lib/panel-slot/base-form-panel.js.map +1 -1
- package/dist/lib/related-grid-height.d.ts +48 -11
- package/dist/lib/related-grid-height.d.ts.map +1 -1
- package/dist/lib/related-grid-height.js +53 -12
- package/dist/lib/related-grid-height.js.map +1 -1
- package/dist/lib/section-indicators/form-section-indicator-coordinator.service.d.ts +80 -0
- package/dist/lib/section-indicators/form-section-indicator-coordinator.service.d.ts.map +1 -0
- package/dist/lib/section-indicators/form-section-indicator-coordinator.service.js +99 -0
- package/dist/lib/section-indicators/form-section-indicator-coordinator.service.js.map +1 -0
- package/dist/lib/section-indicators/form-section-indicators.d.ts +97 -0
- package/dist/lib/section-indicators/form-section-indicators.d.ts.map +1 -0
- package/dist/lib/section-indicators/form-section-indicators.js +132 -0
- package/dist/lib/section-indicators/form-section-indicators.js.map +1 -0
- package/dist/lib/section-manager/section-manager.component.js +2 -2
- package/dist/lib/section-manager/section-manager.component.js.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts +9 -1
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
- package/dist/lib/toolbar/form-toolbar.component.js +14 -6
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
- package/dist/lib/types/form-types.d.ts +8 -0
- package/dist/lib/types/form-types.d.ts.map +1 -1
- package/dist/lib/types/form-types.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +25 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isa-related-card.component.d.ts","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,MAAM,EAAE,SAAS,EAAE,aAAa,EACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,EAAE,UAAU,EAA6B,YAAY,EAChE,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;;AAEvD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,qBAQa,yBAA0B,SAAQ,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAC9F,OAAO,CAAC,GAAG,CAA6B;IAExC,2EAA2E;IAClE,UAAU,SAAM;IAEzB,oDAAoD;IAC3C,UAAU,EAAE,YAAY,GAAG,IAAI,CAAQ;IAEhD,yEAAyE;IAChE,iBAAiB,SAAM;IAEhC,kCAAkC;IACzB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAa;IAEvD,mFAAmF;IAC1E,KAAK,SAAK;IAEnB,oFAAoF;IAC3E,QAAQ,EAAE,cAAc,EAAE,CAAM;IAEzC,yEAAyE;IAC/D,QAAQ,+CAAsD;IAGxE,aAAa,EAAE,UAAU,GAAG,IAAI,CAAQ;IACxC,aAAa,EAAE,UAAU,GAAG,IAAI,CAAQ;IACxC,SAAS,UAAQ;IACjB,SAAS,UAAS;IAClB,QAAQ,UAAS;IAEjB,aAAa,EAAE,mBAAmB,EAAE,CAAM;IAC1C,WAAW,EAAE,mBAAmB,EAAE,CAAM;IAExC,kCAAkC;IAClC,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,sCAAsC;IACtC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,wEAAwE;IACxE,IAAI,UAAU,IAAI,MAAM,CAQvB;IAED,QAAQ,IAAI,IAAI;IAIhB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC,4DAA4D;IACtD,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAgCxC,4EAA4E;IAC5E,OAAO,CAAC,sBAAsB;
|
|
1
|
+
{"version":3,"file":"isa-related-card.component.d.ts","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,MAAM,EAAE,SAAS,EAAE,aAAa,EACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,EAAE,UAAU,EAA6B,YAAY,EAChE,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;;AAEvD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,qBAQa,yBAA0B,SAAQ,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAC9F,OAAO,CAAC,GAAG,CAA6B;IAExC,2EAA2E;IAClE,UAAU,SAAM;IAEzB,oDAAoD;IAC3C,UAAU,EAAE,YAAY,GAAG,IAAI,CAAQ;IAEhD,yEAAyE;IAChE,iBAAiB,SAAM;IAEhC,kCAAkC;IACzB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAa;IAEvD,mFAAmF;IAC1E,KAAK,SAAK;IAEnB,oFAAoF;IAC3E,QAAQ,EAAE,cAAc,EAAE,CAAM;IAEzC,yEAAyE;IAC/D,QAAQ,+CAAsD;IAGxE,aAAa,EAAE,UAAU,GAAG,IAAI,CAAQ;IACxC,aAAa,EAAE,UAAU,GAAG,IAAI,CAAQ;IACxC,SAAS,UAAQ;IACjB,SAAS,UAAS;IAClB,QAAQ,UAAS;IAEjB,aAAa,EAAE,mBAAmB,EAAE,CAAM;IAC1C,WAAW,EAAE,mBAAmB,EAAE,CAAM;IAExC,kCAAkC;IAClC,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,sCAAsC;IACtC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,wEAAwE;IACxE,IAAI,UAAU,IAAI,MAAM,CAQvB;IAED,QAAQ,IAAI,IAAI;IAIhB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC,4DAA4D;IACtD,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAgCxC,4EAA4E;IAC5E,OAAO,CAAC,sBAAsB;IAmC9B,8DAA8D;IAC9D,OAAO,CAAC,iBAAiB;IAqBzB,+CAA+C;IAC/C,OAAO,CAAC,gBAAgB;IAmBxB,sDAAsD;IACtD,YAAY,IAAI,IAAI;IAKpB,uDAAuD;IACvD,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;yCAvLzB,yBAAyB;2CAAzB,yBAAyB;CAkMrC"}
|
|
@@ -216,12 +216,18 @@ export class MjIsaRelatedCardComponent extends BaseAngularComponent {
|
|
|
216
216
|
if (!this.RelatedRecord || !this.EntityInfoRef)
|
|
217
217
|
return;
|
|
218
218
|
const parentFieldNames = this.EntityInfoRef.ParentEntityFieldNames;
|
|
219
|
+
// Field-level security is filtered here rather than at render time because BuildFieldDisplay
|
|
220
|
+
// calls Get(), which THROWS on a denied field — one denied column would take out the whole
|
|
221
|
+
// card instead of omitting a row. This is the IS-A sibling's entity, not the host form's, so
|
|
222
|
+
// its permissions are independent of anything the form has already checked.
|
|
223
|
+
const user = this.ProviderToUse?.CurrentUser;
|
|
219
224
|
const ownFields = this.EntityInfoRef.Fields.filter(f => !f.IsPrimaryKey &&
|
|
220
225
|
!f.IsVirtual &&
|
|
221
226
|
!parentFieldNames.has(f.Name) &&
|
|
222
227
|
f.Name !== '__mj_CreatedAt' &&
|
|
223
228
|
f.Name !== '__mj_UpdatedAt' &&
|
|
224
|
-
f.IncludeInGeneratedForm
|
|
229
|
+
f.IncludeInGeneratedForm &&
|
|
230
|
+
this.EntityInfoRef.IsFieldReadableByUser(f.Name, user));
|
|
225
231
|
const defaultFields = [];
|
|
226
232
|
const extraFields = [];
|
|
227
233
|
for (const field of ownFields) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isa-related-card.component.js","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-card.component.ts","../../../src/lib/isa-related-panel/isa-related-card.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EAChB,iBAAiB,EACpD,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;ICG7D,+BAAuC;IAAA,YAAgB;IAAA,iBAAO;;;IAAvB,cAAgB;IAAhB,uCAAgB;;;IAQ3D,8BAA0D;IAExD,AADA,0BAA4C,cACgC;IAC9E,iBAAM;;;IAMJ,AADF,8BAAwD,eAChB;IAAA,qCAAqB;IAC7D,AAD6D,iBAAO,EAC9D;;;IAQA,AADF,+BAAgC,eACS;IAAA,YAAiB;IAAA,iBAAO;IAC/D,gCAEuE;IACrE,YACF;IACF,AADE,iBAAO,EACH;;;IANmC,eAAiB;IAAjB,oCAAiB;IAElD,cAAgE;IAChE,AADA,4EAAgE,8DACA;IACpE,cACF;IADE,+CACF;;;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B,IAAI,EAAE,kBAAkB;YACxB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,IAAI,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;SAC/D,CAAC,CAAC;IACL,CAAC;iRA3LU,yBAAyB,yBAAzB,yBAAyB;6DAAzB,yBAAyB;YC9BlC,AADF,AANF,8BAG6C,aAGV,aACO;YACpC,uBAAqD;YACrD,+BAAuC;YAAA,YAAiB;YAAA,iBAAO;YAC/D,4FAAkB;YAGpB,iBAAM;YACN,4BAAyE;YAA9B,uGAAS,uBAAmB,IAAC;YAAC,2BAAW;YACtF,AADsF,iBAAI,EACpF;YAGN,2FAAiB;YAQjB,6FAA+B;YAO/B,mFAAiD;YA8CjD,6FAAyC;YAe3C,iBAAM;;YA3FD,AADA,AADA,qDAAwC,qCACF,sCACC;YAKnC,eAAmB;YAAnB,4BAAmB;YACiB,eAAiB;YAAjB,qCAAiB;YACxD,cAEC;YAFD,yCAEC;YAML,eAKC;YALD,wCAKC;YAGD,cAIC;YAJD,2DAIC;YAGD,cA2CC;YA3CD,iFA2CC;YAGD,cAcC;YAdD,qEAcC;4BDxDU,yBAAyB;;iFAAzB,yBAAyB;cARrC,SAAS;6BACI,KAAK,YACP,qBAAqB,mBACd,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;kBAQpC,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,MAAM;;kFAtBI,yBAAyB","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject,\n OnInit, OnChanges, SimpleChanges, ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseEntity, EntityInfo, EntityFieldInfo, Metadata, CompositeKey\n} from '@memberjunction/core';\nimport { EntityHierarchyNavigationEvent } from '../types/navigation-events';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { IsaRelatedItem } from './isa-hierarchy-utils';\n\n/**\n * Represents a single field value displayed in the ISA related card.\n */\nexport interface IsaCardFieldDisplay {\n Label: string;\n Value: string;\n IsBooleanTrue?: boolean;\n IsBooleanFalse?: boolean;\n}\n\n/**\n * Compact card showing summary fields for one IS-A related entity record\n * (sibling or child). Displays DefaultInView fields by default with\n * expand/collapse for remaining fields.\n *\n * Used inside `<mj-isa-related-panel>` to show related IS-A records\n * alongside the main form.\n */\n@Component({\n standalone: false,\n selector: 'mj-isa-related-card',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n templateUrl: './isa-related-card.component.html',\n styleUrls: ['./isa-related-card.component.css']\n})\nexport class MjIsaRelatedCardComponent extends BaseAngularComponent implements OnInit, OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n /** The entity name for the related record (e.g., \"Members\", \"Speakers\") */\n @Input() EntityName = '';\n\n /** The primary key shared with the parent record */\n @Input() PrimaryKey: CompositeKey | null = null;\n\n /** The record name of the current form's entity (to suppress if same) */\n @Input() CurrentRecordName = '';\n\n /** The relationship type label */\n @Input() Relationship: 'sibling' | 'child' = 'sibling';\n\n /** Depth in the IS-A hierarchy (0 = direct child/sibling, 1 = grandchild, etc.) */\n @Input() Depth = 0;\n\n /** Child items nested under this entity (rendered as sub-cards within this card) */\n @Input() Children: IsaRelatedItem[] = [];\n\n /** Emitted when user clicks \"Open\" to navigate to this related record */\n @Output() Navigate = new EventEmitter<EntityHierarchyNavigationEvent>();\n\n // Internal state\n EntityInfoRef: EntityInfo | null = null;\n RelatedRecord: BaseEntity | null = null;\n IsLoading = true;\n LoadError = false;\n Expanded = false;\n\n DefaultFields: IsaCardFieldDisplay[] = [];\n ExtraFields: IsaCardFieldDisplay[] = [];\n\n /** Display name for the entity */\n get DisplayName(): string {\n return this.EntityInfoRef?.DisplayNameOrName ?? this.EntityName;\n }\n\n /** Icon class from entity metadata */\n get IconClass(): string {\n return this.EntityInfoRef?.Icon ?? 'fa-solid fa-link';\n }\n\n /** Record name of the related record (suppressed if same as current) */\n get RecordName(): string {\n if (!this.RelatedRecord) return '';\n const name = this.RelatedRecord.GetRecordName();\n if (!name) return '';\n const nameStr = String(name);\n // Suppress if same as the current form's record name\n if (nameStr === this.CurrentRecordName) return '';\n return nameStr;\n }\n\n ngOnInit(): void {\n this.LoadRelatedRecord();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes['EntityName'] || changes['PrimaryKey']) && !changes['EntityName']?.firstChange) {\n this.LoadRelatedRecord();\n }\n }\n\n /** Load the related entity record and extract field data */\n async LoadRelatedRecord(): Promise<void> {\n if (!this.EntityName || !this.PrimaryKey) return;\n\n this.IsLoading = true;\n this.LoadError = false;\n this.cdr.markForCheck();\n\n try {\n const md = this.ProviderToUse;\n this.EntityInfoRef = md.EntityByName(this.EntityName) ?? null;\n if (!this.EntityInfoRef) {\n this.LoadError = true;\n return;\n }\n\n const entity = await md.GetEntityObject<BaseEntity>(this.EntityName);\n const loaded = await entity.InnerLoad(this.PrimaryKey);\n if (!loaded) {\n this.LoadError = true;\n return;\n }\n\n this.RelatedRecord = entity;\n this.BuildFieldDisplayLists();\n } catch {\n this.LoadError = true;\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n }\n\n /** Split fields into DefaultInView (shown by default) and extra (hidden) */\n private BuildFieldDisplayLists(): void {\n if (!this.RelatedRecord || !this.EntityInfoRef) return;\n\n const parentFieldNames = this.EntityInfoRef.ParentEntityFieldNames;\n const ownFields = this.EntityInfoRef.Fields.filter(f =>\n !f.IsPrimaryKey &&\n !f.IsVirtual &&\n !parentFieldNames.has(f.Name) &&\n f.Name !== '__mj_CreatedAt' &&\n f.Name !== '__mj_UpdatedAt' &&\n f.IncludeInGeneratedForm\n );\n\n const defaultFields: IsaCardFieldDisplay[] = [];\n const extraFields: IsaCardFieldDisplay[] = [];\n\n for (const field of ownFields) {\n const display = this.BuildFieldDisplay(field);\n if (field.DefaultInView) {\n defaultFields.push(display);\n } else {\n extraFields.push(display);\n }\n }\n\n this.DefaultFields = defaultFields;\n this.ExtraFields = extraFields;\n }\n\n /** Create a display representation of a single field value */\n private BuildFieldDisplay(field: EntityFieldInfo): IsaCardFieldDisplay {\n const rawValue = this.RelatedRecord!.Get(field.Name);\n const label = field.DisplayNameOrName;\n\n // Handle boolean fields\n if (field.TSType === 'boolean') {\n return {\n Label: label,\n Value: rawValue ? 'Yes' : 'No',\n IsBooleanTrue: !!rawValue,\n IsBooleanFalse: !rawValue\n };\n }\n\n // Format the value for display\n return {\n Label: label,\n Value: this.FormatFieldValue(rawValue, field)\n };\n }\n\n /** Format a field value for compact display */\n private FormatFieldValue(value: unknown, field: EntityFieldInfo): string {\n if (value == null) return '';\n\n // Date formatting\n if (value instanceof Date) {\n return value.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });\n }\n\n // Number formatting\n if (typeof value === 'number') {\n if (field.Type?.toLowerCase().includes('money')) {\n return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(value);\n }\n return value.toLocaleString();\n }\n\n return String(value);\n }\n\n /** Toggle expanded state to show/hide extra fields */\n ToggleExpand(): void {\n this.Expanded = !this.Expanded;\n this.cdr.markForCheck();\n }\n\n /** Handle \"Open\" link click — emit navigation event */\n OnOpenClick(event: MouseEvent): void {\n event.preventDefault();\n if (!this.PrimaryKey) return;\n\n this.Navigate.emit({\n Kind: 'entity-hierarchy',\n EntityName: this.EntityName,\n PrimaryKey: this.PrimaryKey,\n Direction: this.Relationship === 'sibling' ? 'child' : 'child'\n });\n }\n}\n","<!-- ISA Related Card: compact summary of one sibling/child entity record -->\n<div class=\"mj-isa-card\"\n [class.mj-isa-card--loading]=\"IsLoading\"\n [class.mj-isa-card--error]=\"LoadError\"\n [class.mj-isa-card--nested]=\"Depth > 0\">\n\n <!-- Card Header -->\n <div class=\"mj-isa-card__header\">\n <div class=\"mj-isa-card__header-left\">\n <i [class]=\"IconClass\" class=\"mj-isa-card__icon\"></i>\n <span class=\"mj-isa-card__entity-name\">{{ DisplayName }}</span>\n @if (RecordName) {\n <span class=\"mj-isa-card__record-name\">{{ RecordName }}</span>\n }\n </div>\n <a href=\"#\" class=\"mj-isa-card__open-link\" (click)=\"OnOpenClick($event)\">Open →</a>\n </div>\n\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"mj-isa-card__body mj-isa-card__body--loading\">\n <div class=\"mj-isa-card__loading-bar\"></div>\n <div class=\"mj-isa-card__loading-bar mj-isa-card__loading-bar--short\"></div>\n </div>\n }\n\n <!-- Error State -->\n @if (LoadError && !IsLoading) {\n <div class=\"mj-isa-card__body mj-isa-card__body--error\">\n <span class=\"mj-isa-card__error-text\">Unable to load record</span>\n </div>\n }\n\n <!-- Field Values -->\n @if (!IsLoading && !LoadError && RelatedRecord) {\n <div class=\"mj-isa-card__body\">\n @for (field of DefaultFields; track field.Label) {\n <div class=\"mj-isa-card__field\">\n <span class=\"mj-isa-card__field-label\">{{ field.Label }}</span>\n <span class=\"mj-isa-card__field-value\"\n [class.mj-isa-card__field-value--bool-yes]=\"field.IsBooleanTrue\"\n [class.mj-isa-card__field-value--bool-no]=\"field.IsBooleanFalse\">\n {{ field.Value }}\n </span>\n </div>\n }\n </div>\n\n <!-- Expand/Collapse for extra fields -->\n @if (ExtraFields.length > 0) {\n <div class=\"mj-isa-card__expand-row\">\n <button class=\"mj-isa-card__expand-btn\" (click)=\"ToggleExpand()\">\n @if (!Expanded) {\n Show {{ ExtraFields.length }} more field{{ ExtraFields.length > 1 ? 's' : '' }}\n <i class=\"fa-solid fa-chevron-down mj-isa-card__expand-chevron\"></i>\n } @else {\n Show fewer fields\n <i class=\"fa-solid fa-chevron-up mj-isa-card__expand-chevron\"></i>\n }\n </button>\n </div>\n\n @if (Expanded) {\n <div class=\"mj-isa-card__extra-fields\">\n @for (field of ExtraFields; track field.Label) {\n <div class=\"mj-isa-card__field\">\n <span class=\"mj-isa-card__field-label\">{{ field.Label }}</span>\n <span class=\"mj-isa-card__field-value\"\n [class.mj-isa-card__field-value--bool-yes]=\"field.IsBooleanTrue\"\n [class.mj-isa-card__field-value--bool-no]=\"field.IsBooleanFalse\">\n {{ field.Value }}\n </span>\n </div>\n }\n </div>\n }\n }\n }\n\n <!-- Nested sub-cards for IS-A children (e.g., Gold Members inside Members) -->\n @if (Children.length > 0 && !IsLoading) {\n <div class=\"mj-isa-card__children\">\n @for (child of Children; track child.EntityName) {\n <mj-isa-related-card\n [EntityName]=\"child.EntityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [CurrentRecordName]=\"CurrentRecordName\"\n [Relationship]=\"'child'\"\n [Depth]=\"Depth + 1\"\n [Children]=\"child.Children\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-isa-related-card>\n }\n </div>\n }\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"isa-related-card.component.js","sourceRoot":"","sources":["../../../src/lib/isa-related-panel/isa-related-card.component.ts","../../../src/lib/isa-related-panel/isa-related-card.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,EAChB,iBAAiB,EACpD,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;ICG7D,+BAAuC;IAAA,YAAgB;IAAA,iBAAO;;;IAAvB,cAAgB;IAAhB,uCAAgB;;;IAQ3D,8BAA0D;IAExD,AADA,0BAA4C,cACgC;IAC9E,iBAAM;;;IAMJ,AADF,8BAAwD,eAChB;IAAA,qCAAqB;IAC7D,AAD6D,iBAAO,EAC9D;;;IAQA,AADF,+BAAgC,eACS;IAAA,YAAiB;IAAA,iBAAO;IAC/D,gCAEuE;IACrE,YACF;IACF,AADE,iBAAO,EACH;;;IANmC,eAAiB;IAAjB,oCAAiB;IAElD,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L,KAAK;;kBAGL,KAAK;;kBAGL,MAAM;;kFAtBI,yBAAyB","sourcesContent":["import {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject,\n OnInit, OnChanges, SimpleChanges, ViewEncapsulation\n} from '@angular/core';\nimport {\n BaseEntity, EntityInfo, EntityFieldInfo, Metadata, CompositeKey\n} from '@memberjunction/core';\nimport { EntityHierarchyNavigationEvent } from '../types/navigation-events';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { IsaRelatedItem } from './isa-hierarchy-utils';\n\n/**\n * Represents a single field value displayed in the ISA related card.\n */\nexport interface IsaCardFieldDisplay {\n Label: string;\n Value: string;\n IsBooleanTrue?: boolean;\n IsBooleanFalse?: boolean;\n}\n\n/**\n * Compact card showing summary fields for one IS-A related entity record\n * (sibling or child). Displays DefaultInView fields by default with\n * expand/collapse for remaining fields.\n *\n * Used inside `<mj-isa-related-panel>` to show related IS-A records\n * alongside the main form.\n */\n@Component({\n standalone: false,\n selector: 'mj-isa-related-card',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n templateUrl: './isa-related-card.component.html',\n styleUrls: ['./isa-related-card.component.css']\n})\nexport class MjIsaRelatedCardComponent extends BaseAngularComponent implements OnInit, OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n /** The entity name for the related record (e.g., \"Members\", \"Speakers\") */\n @Input() EntityName = '';\n\n /** The primary key shared with the parent record */\n @Input() PrimaryKey: CompositeKey | null = null;\n\n /** The record name of the current form's entity (to suppress if same) */\n @Input() CurrentRecordName = '';\n\n /** The relationship type label */\n @Input() Relationship: 'sibling' | 'child' = 'sibling';\n\n /** Depth in the IS-A hierarchy (0 = direct child/sibling, 1 = grandchild, etc.) */\n @Input() Depth = 0;\n\n /** Child items nested under this entity (rendered as sub-cards within this card) */\n @Input() Children: IsaRelatedItem[] = [];\n\n /** Emitted when user clicks \"Open\" to navigate to this related record */\n @Output() Navigate = new EventEmitter<EntityHierarchyNavigationEvent>();\n\n // Internal state\n EntityInfoRef: EntityInfo | null = null;\n RelatedRecord: BaseEntity | null = null;\n IsLoading = true;\n LoadError = false;\n Expanded = false;\n\n DefaultFields: IsaCardFieldDisplay[] = [];\n ExtraFields: IsaCardFieldDisplay[] = [];\n\n /** Display name for the entity */\n get DisplayName(): string {\n return this.EntityInfoRef?.DisplayNameOrName ?? this.EntityName;\n }\n\n /** Icon class from entity metadata */\n get IconClass(): string {\n return this.EntityInfoRef?.Icon ?? 'fa-solid fa-link';\n }\n\n /** Record name of the related record (suppressed if same as current) */\n get RecordName(): string {\n if (!this.RelatedRecord) return '';\n const name = this.RelatedRecord.GetRecordName();\n if (!name) return '';\n const nameStr = String(name);\n // Suppress if same as the current form's record name\n if (nameStr === this.CurrentRecordName) return '';\n return nameStr;\n }\n\n ngOnInit(): void {\n this.LoadRelatedRecord();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes['EntityName'] || changes['PrimaryKey']) && !changes['EntityName']?.firstChange) {\n this.LoadRelatedRecord();\n }\n }\n\n /** Load the related entity record and extract field data */\n async LoadRelatedRecord(): Promise<void> {\n if (!this.EntityName || !this.PrimaryKey) return;\n\n this.IsLoading = true;\n this.LoadError = false;\n this.cdr.markForCheck();\n\n try {\n const md = this.ProviderToUse;\n this.EntityInfoRef = md.EntityByName(this.EntityName) ?? null;\n if (!this.EntityInfoRef) {\n this.LoadError = true;\n return;\n }\n\n const entity = await md.GetEntityObject<BaseEntity>(this.EntityName);\n const loaded = await entity.InnerLoad(this.PrimaryKey);\n if (!loaded) {\n this.LoadError = true;\n return;\n }\n\n this.RelatedRecord = entity;\n this.BuildFieldDisplayLists();\n } catch {\n this.LoadError = true;\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n }\n\n /** Split fields into DefaultInView (shown by default) and extra (hidden) */\n private BuildFieldDisplayLists(): void {\n if (!this.RelatedRecord || !this.EntityInfoRef) return;\n\n const parentFieldNames = this.EntityInfoRef.ParentEntityFieldNames;\n // Field-level security is filtered here rather than at render time because BuildFieldDisplay\n // calls Get(), which THROWS on a denied field — one denied column would take out the whole\n // card instead of omitting a row. This is the IS-A sibling's entity, not the host form's, so\n // its permissions are independent of anything the form has already checked.\n const user = this.ProviderToUse?.CurrentUser;\n const ownFields = this.EntityInfoRef.Fields.filter(f =>\n !f.IsPrimaryKey &&\n !f.IsVirtual &&\n !parentFieldNames.has(f.Name) &&\n f.Name !== '__mj_CreatedAt' &&\n f.Name !== '__mj_UpdatedAt' &&\n f.IncludeInGeneratedForm &&\n this.EntityInfoRef!.IsFieldReadableByUser(f.Name, user)\n );\n\n const defaultFields: IsaCardFieldDisplay[] = [];\n const extraFields: IsaCardFieldDisplay[] = [];\n\n for (const field of ownFields) {\n const display = this.BuildFieldDisplay(field);\n if (field.DefaultInView) {\n defaultFields.push(display);\n } else {\n extraFields.push(display);\n }\n }\n\n this.DefaultFields = defaultFields;\n this.ExtraFields = extraFields;\n }\n\n /** Create a display representation of a single field value */\n private BuildFieldDisplay(field: EntityFieldInfo): IsaCardFieldDisplay {\n const rawValue = this.RelatedRecord!.Get(field.Name);\n const label = field.DisplayNameOrName;\n\n // Handle boolean fields\n if (field.TSType === 'boolean') {\n return {\n Label: label,\n Value: rawValue ? 'Yes' : 'No',\n IsBooleanTrue: !!rawValue,\n IsBooleanFalse: !rawValue\n };\n }\n\n // Format the value for display\n return {\n Label: label,\n Value: this.FormatFieldValue(rawValue, field)\n };\n }\n\n /** Format a field value for compact display */\n private FormatFieldValue(value: unknown, field: EntityFieldInfo): string {\n if (value == null) return '';\n\n // Date formatting\n if (value instanceof Date) {\n return value.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });\n }\n\n // Number formatting\n if (typeof value === 'number') {\n if (field.Type?.toLowerCase().includes('money')) {\n return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(value);\n }\n return value.toLocaleString();\n }\n\n return String(value);\n }\n\n /** Toggle expanded state to show/hide extra fields */\n ToggleExpand(): void {\n this.Expanded = !this.Expanded;\n this.cdr.markForCheck();\n }\n\n /** Handle \"Open\" link click — emit navigation event */\n OnOpenClick(event: MouseEvent): void {\n event.preventDefault();\n if (!this.PrimaryKey) return;\n\n this.Navigate.emit({\n Kind: 'entity-hierarchy',\n EntityName: this.EntityName,\n PrimaryKey: this.PrimaryKey,\n Direction: this.Relationship === 'sibling' ? 'child' : 'child'\n });\n }\n}\n","<!-- ISA Related Card: compact summary of one sibling/child entity record -->\n<div class=\"mj-isa-card\"\n [class.mj-isa-card--loading]=\"IsLoading\"\n [class.mj-isa-card--error]=\"LoadError\"\n [class.mj-isa-card--nested]=\"Depth > 0\">\n\n <!-- Card Header -->\n <div class=\"mj-isa-card__header\">\n <div class=\"mj-isa-card__header-left\">\n <i [class]=\"IconClass\" class=\"mj-isa-card__icon\"></i>\n <span class=\"mj-isa-card__entity-name\">{{ DisplayName }}</span>\n @if (RecordName) {\n <span class=\"mj-isa-card__record-name\">{{ RecordName }}</span>\n }\n </div>\n <a href=\"#\" class=\"mj-isa-card__open-link\" (click)=\"OnOpenClick($event)\">Open →</a>\n </div>\n\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"mj-isa-card__body mj-isa-card__body--loading\">\n <div class=\"mj-isa-card__loading-bar\"></div>\n <div class=\"mj-isa-card__loading-bar mj-isa-card__loading-bar--short\"></div>\n </div>\n }\n\n <!-- Error State -->\n @if (LoadError && !IsLoading) {\n <div class=\"mj-isa-card__body mj-isa-card__body--error\">\n <span class=\"mj-isa-card__error-text\">Unable to load record</span>\n </div>\n }\n\n <!-- Field Values -->\n @if (!IsLoading && !LoadError && RelatedRecord) {\n <div class=\"mj-isa-card__body\">\n @for (field of DefaultFields; track field.Label) {\n <div class=\"mj-isa-card__field\">\n <span class=\"mj-isa-card__field-label\">{{ field.Label }}</span>\n <span class=\"mj-isa-card__field-value\"\n [class.mj-isa-card__field-value--bool-yes]=\"field.IsBooleanTrue\"\n [class.mj-isa-card__field-value--bool-no]=\"field.IsBooleanFalse\">\n {{ field.Value }}\n </span>\n </div>\n }\n </div>\n\n <!-- Expand/Collapse for extra fields -->\n @if (ExtraFields.length > 0) {\n <div class=\"mj-isa-card__expand-row\">\n <button class=\"mj-isa-card__expand-btn\" (click)=\"ToggleExpand()\">\n @if (!Expanded) {\n Show {{ ExtraFields.length }} more field{{ ExtraFields.length > 1 ? 's' : '' }}\n <i class=\"fa-solid fa-chevron-down mj-isa-card__expand-chevron\"></i>\n } @else {\n Show fewer fields\n <i class=\"fa-solid fa-chevron-up mj-isa-card__expand-chevron\"></i>\n }\n </button>\n </div>\n\n @if (Expanded) {\n <div class=\"mj-isa-card__extra-fields\">\n @for (field of ExtraFields; track field.Label) {\n <div class=\"mj-isa-card__field\">\n <span class=\"mj-isa-card__field-label\">{{ field.Label }}</span>\n <span class=\"mj-isa-card__field-value\"\n [class.mj-isa-card__field-value--bool-yes]=\"field.IsBooleanTrue\"\n [class.mj-isa-card__field-value--bool-no]=\"field.IsBooleanFalse\">\n {{ field.Value }}\n </span>\n </div>\n }\n </div>\n }\n }\n }\n\n <!-- Nested sub-cards for IS-A children (e.g., Gold Members inside Members) -->\n @if (Children.length > 0 && !IsLoading) {\n <div class=\"mj-isa-card__children\">\n @for (child of Children; track child.EntityName) {\n <mj-isa-related-card\n [EntityName]=\"child.EntityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [CurrentRecordName]=\"CurrentRecordName\"\n [Relationship]=\"'child'\"\n [Depth]=\"Depth + 1\"\n [Children]=\"child.Children\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-isa-related-card>\n }\n </div>\n }\n</div>\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-overlay.d.ts","sourceRoot":"","sources":["../../../src/lib/overlays/base-form-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAa,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,YAAY,EA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C,KAAK,EAAE,OAAO,EASzB;IACD,IAAI,OAAO,IAAI,OAAO,CAA0B;IAItC,aAAa,wBAA+B;IACtD,kEAAkE;IACxD,KAAK,oCAAkC;IACjD,wDAAwD;IAC9C,MAAM,uCAA8C;IAC9D,mFAAmF;IACzE,QAAQ,oCAA2C;IAC7D,qCAAqC;IAC3B,YAAY,sCAA6C;IACnE,sCAAsC;IAC5B,aAAa,mCAA0C;IACjE,mCAAmC;IACzB,gBAAgB,sCAA6C;IACvE,yCAAyC;IAC/B,gBAAgB,sCAA6C;IACvE,kCAAkC;IACxB,SAAS;eAA6B,MAAM;gBAAU,MAAM;OAAM;IAC5E,qDAAqD;IAC3C,WAAW,kCAAyC;IAI9D,iEAAiE;IAC1D,MAAM,UAAS;IACtB,yEAAyE;IAClE,cAAc,SAAM;IAE3B,8EAA8E;IAC9E,IAAI,YAAY,IAAI,iBAAiB,GAAG,IAAI,CAE3C;IAED,gFAAgF;IAChF,SAAS,KAAK,mBAAmB,IAAI,YAAY,GAAG,SAAS,CAM5D;IAID,gFAAgF;IAC1E,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAUlC,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAKrC,QAAQ,IAAI,IAAI;IAMhB,uEAAuE;IACvE,eAAe,IAAI,IAAI;IAIvB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI;IAa5C,0EAA0E;IAC1E,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI;yCAhKjC,eAAe;2CAAf,eAAe;CAyKpC"}
|
|
@@ -109,8 +109,10 @@ export class BaseFormOverlay extends BaseAngularComponent {
|
|
|
109
109
|
get effectivePrimaryKey() {
|
|
110
110
|
if (this.PrimaryKey)
|
|
111
111
|
return this.PrimaryKey;
|
|
112
|
+
// The overlay hosts any entity's form — resolve the key column(s) from EntityName's metadata
|
|
113
|
+
// rather than assuming `ID`. RecordID may be a bare value or a composite segment.
|
|
112
114
|
if (this.RecordID)
|
|
113
|
-
return CompositeKey.
|
|
115
|
+
return CompositeKey.FromURLSegment(this.EntityName ? this.ProviderToUse.EntityByName(this.EntityName) : undefined, this.RecordID);
|
|
114
116
|
return undefined;
|
|
115
117
|
}
|
|
116
118
|
// ── Host event handlers (wired in subclass templates) ─────────────────────
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-form-overlay.js","sourceRoot":"","sources":["../../../src/lib/overlays/base-form-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAc,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;AAarE;;;;;;;GAOG;AAEH,MAAM,OAAgB,eAAgB,SAAQ,oBAAoB;IAChE,0EAA0E;IAC7C,IAAI,CAA6B;IAE9D,4EAA4E;IAE5E,oEAAoE;IAC3D,UAAU,GAAkB,IAAI,CAAC;IAC1C,oEAAoE;IAC3D,UAAU,CAAgB;IACnC,oFAAoF;IAC3E,QAAQ,CAAU;IAC3B,uDAAuD;IAC9C,MAAM,GAAsB,IAAI,CAAC;IAC1C,qEAAqE;IAC5D,eAAe,GAA4C,IAAI,CAAC;IACzE;;;;OAIG;IACM,WAAW,GAAkB,IAAI,CAAC;IAC3C,8DAA8D;IACrD,QAAQ,GAAmB,IAAI,CAAC;IACzC;;;;;OAKG;IACM,MAAM,GAA4B,IAAI,CAAC;IAEhD;;;OAGG;IACH,IAAc,YAAY,KAAuB,OAAO,EAAE,CAAC,CAAC,CAAC;IAE7D;;;;OAIG;IACH,IAAI,eAAe;QACjB,OAAO,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;IAC1D,CAAC;IAED,6EAA6E;IAE7E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;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM","sourcesContent":["import { Directive, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { BaseEntity, CompositeKey } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\nimport { MjEntityFormHostComponent } from '../host/entity-form-host.component';\nimport { EntityFormConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport {\n FormNotificationEvent, RecordDeletedEvent, RecordSaveFailedEvent, ValidationFailedEvent\n} from '../types/form-types';\nimport { BaseFormComponent } from '../base-form-component';\n\n/** How an overlay closed. */\nexport type FormOverlayCloseReason = 'save' | 'cancel';\n\n/**\n * Shared logic for the form overlay shells ({@link MjFormDialogComponent} and\n * {@link MjFormSlideInComponent}). Both wrap an {@link MjEntityFormHostComponent}\n * in chrome that owns the title + Save/Cancel, bubble the host's events upward,\n * and proxy the form inputs downward.\n *\n * Subclasses provide only the template; all input/output plumbing lives here.\n */\n@Directive()\nexport abstract class BaseFormOverlay extends BaseAngularComponent {\n /** Reference to the hosted form (template must name the host `#host`). */\n @ViewChild('host') protected host?: MjEntityFormHostComponent;\n\n // ── Record selection (mirror MjEntityFormHostComponent) ──────────────────\n\n /** Entity name to load. Ignored when {@link Record} is supplied. */\n @Input() EntityName: string | null = null;\n /** Primary key of the record to edit. Empty/absent → new record. */\n @Input() PrimaryKey?: CompositeKey;\n /** Convenience single-column ('ID') key; used when {@link PrimaryKey} is absent. */\n @Input() RecordID?: string;\n /** Pre-loaded record to bind directly (skips load). */\n @Input() Record: BaseEntity | null = null;\n /** New-record default values: URL-segment string or plain object. */\n @Input() NewRecordValues: string | Record<string, unknown> | null = null;\n /**\n * Render a single registered form section (`BaseFormSectionComponent`\n * registered as `'<EntityName>.<SectionName>'`) instead of the full form.\n * See {@link MjEntityFormHostComponent.SectionName}.\n */\n @Input() SectionName: string | null = null;\n /** Force edit mode (default: new → edit, existing → read). */\n @Input() EditMode: boolean | null = null;\n /**\n * Per-instance config OVERRIDE. Treated as a partial set of overrides that is\n * merged **over** the surface's {@link PresetConfig} — so passing\n * `{ StartInEditMode: true }` keeps the preset's `Toolbar: null` etc. instead\n * of replacing the whole preset. Bind the merged result via {@link EffectiveConfig}.\n */\n @Input() Config: EntityFormConfig | null = null;\n\n /**\n * The surface's default config preset (TAB/DIALOG/SLIDEIN). Subclasses override\n * this getter; the base returns an empty object (no defaults).\n */\n protected get PresetConfig(): EntityFormConfig { return {}; }\n\n /**\n * The config actually handed to the form host: the surface {@link PresetConfig}\n * with any consumer {@link Config} overrides merged on top. This is what makes\n * partial configs work — you only specify what differs from the preset.\n */\n get EffectiveConfig(): EntityFormConfig {\n return { ...this.PresetConfig, ...(this.Config ?? {}) };\n }\n\n // ── Chrome ────────────────────────────────────────────────────────────────\n\n /** Title shown in the chrome. When empty, derived from the record on load. */\n @Input() Title = '';\n /** Whether to show the Save/Cancel footer. Default: true. */\n @Input() ShowFooter = true;\n /** Save button label. */\n @Input() SaveButtonText = 'Save';\n /** Cancel button label. */\n @Input() CancelButtonText = 'Cancel';\n\n private _visible = false;\n private _closed = false;\n /** Two-way: whether the overlay is shown. */\n @Input()\n set Visible(value: boolean) {\n if (value !== this._visible) {\n this._visible = value;\n if (value) {\n this._closed = false; // re-arm for the next close\n this.effectiveTitle = this.Title; // section mode has no FormCreated; full mode refines this\n }\n this.VisibleChange.emit(value);\n }\n }\n get Visible(): boolean { return this._visible; }\n\n // ── Outputs ─────────────────────────────────────────────────────────────\n\n @Output() VisibleChange = new EventEmitter<boolean>();\n /** Emitted after a successful save (carries the saved entity). */\n @Output() Saved = new EventEmitter<BaseEntity>();\n /** Emitted when the overlay closes (save or cancel). */\n @Output() Closed = new EventEmitter<FormOverlayCloseReason>();\n /** Re-emitted host navigation requests (consumer decides; chrome never routes). */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n /** Re-emitted host notifications. */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n /** Re-emitted host record-deleted. */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n /** Re-emitted host save-failed. */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n /** Re-emitted host validation-failed. */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n /** Re-emitted host load error. */\n @Output() LoadError = new EventEmitter<{ title: string; detail: string }>();\n /** The live form instance, for power-user wiring. */\n @Output() FormCreated = new EventEmitter<BaseFormComponent>();\n\n // ── State ─────────────────────────────────────────────────────────────────\n\n /** True while a save is in flight (disables the Save button). */\n public saving = false;\n /** Title actually rendered (Title input, or derived from the record). */\n public effectiveTitle = '';\n\n /** The live form component instance (for power-user wiring via MJFormRef). */\n get formInstance(): BaseFormComponent | null {\n return this.host?.Form ?? null;\n }\n\n /** Resolves the primary key to pass to the host (PrimaryKey beats RecordID). */\n protected get effectivePrimaryKey(): CompositeKey | undefined {\n if (this.PrimaryKey) return this.PrimaryKey;\n if (this.RecordID) return CompositeKey.FromID(this.RecordID);\n return undefined;\n }\n\n // ── Host event handlers (wired in subclass templates) ─────────────────────\n\n /** Save via the hosted form. Closing happens on the resulting `Saved` event. */\n async onSaveClick(): Promise<void> {\n if (!this.host) return;\n this.saving = true;\n try {\n await this.host.Save();\n } finally {\n this.saving = false;\n }\n }\n\n onHostSaved(record: BaseEntity): void {\n this.Saved.emit(record);\n this.close('save');\n }\n\n onCancel(): void {\n if (this._closed) return;\n this.host?.Cancel();\n this.close('cancel');\n }\n\n /** Host asked to be dismissed (e.g. Discard on a brand-new record). */\n onHostDismissed(): void {\n this.close('cancel');\n }\n\n onFormCreated(form: BaseFormComponent): void {\n this.FormCreated.emit(form);\n if (!this.Title) {\n const rec = form.record;\n const entityLabel = rec?.EntityInfo?.DisplayName ?? rec?.EntityInfo?.Name ?? '';\n this.effectiveTitle = rec?.IsSaved\n ? `${entityLabel}`\n : `New ${entityLabel}`;\n } else {\n this.effectiveTitle = this.Title;\n }\n }\n\n /** Hide the overlay and emit Closed exactly once per open. Idempotent. */\n protected close(reason: FormOverlayCloseReason): void {\n if (this._closed) return;\n this._closed = true;\n if (this._visible) {\n this._visible = false;\n this.VisibleChange.emit(false);\n }\n this.Closed.emit(reason);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"base-form-overlay.js","sourceRoot":"","sources":["../../../src/lib/overlays/base-form-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAc,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;AAarE;;;;;;;GAOG;AAEH,MAAM,OAAgB,eAAgB,SAAQ,oBAAoB;IAChE,0EAA0E;IAC7C,IAAI,CAA6B;IAE9D,4EAA4E;IAE5E,oEAAoE;IAC3D,UAAU,GAAkB,IAAI,CAAC;IAC1C,oEAAoE;IAC3D,UAAU,CAAgB;IACnC,oFAAoF;IAC3E,QAAQ,CAAU;IAC3B,uDAAuD;IAC9C,MAAM,GAAsB,IAAI,CAAC;IAC1C,qEAAqE;IAC5D,eAAe,GAA4C,IAAI,CAAC;IACzE;;;;OAIG;IACM,WAAW,GAAkB,IAAI,CAAC;IAC3C,8DAA8D;IACrD,QAAQ,GAAmB,IAAI,CAAC;IACzC;;;;;OAKG;IACM,MAAM,GAA4B,IAAI,CAAC;IAEhD;;;OAGG;IACH,IAAc,YAAY,KAAuB,OAAO,EAAE,CAAC,CAAC,CAAC;IAE7D;;;;OAIG;IACH,IAAI,eAAe;QACjB,OAAO,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;IAC1D,CAAC;IAED,6EAA6E;IAE7E,8EAA8E;IACrE,KAAK,GAAG,EAAE,CAAC;IACpB,6DAA6D;IACpD,UAA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KAAK;;kBAeL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM","sourcesContent":["import { Directive, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { BaseEntity, CompositeKey } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\nimport { MjEntityFormHostComponent } from '../host/entity-form-host.component';\nimport { EntityFormConfig } from '../types/entity-form-config';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport {\n FormNotificationEvent, RecordDeletedEvent, RecordSaveFailedEvent, ValidationFailedEvent\n} from '../types/form-types';\nimport { BaseFormComponent } from '../base-form-component';\n\n/** How an overlay closed. */\nexport type FormOverlayCloseReason = 'save' | 'cancel';\n\n/**\n * Shared logic for the form overlay shells ({@link MjFormDialogComponent} and\n * {@link MjFormSlideInComponent}). Both wrap an {@link MjEntityFormHostComponent}\n * in chrome that owns the title + Save/Cancel, bubble the host's events upward,\n * and proxy the form inputs downward.\n *\n * Subclasses provide only the template; all input/output plumbing lives here.\n */\n@Directive()\nexport abstract class BaseFormOverlay extends BaseAngularComponent {\n /** Reference to the hosted form (template must name the host `#host`). */\n @ViewChild('host') protected host?: MjEntityFormHostComponent;\n\n // ── Record selection (mirror MjEntityFormHostComponent) ──────────────────\n\n /** Entity name to load. Ignored when {@link Record} is supplied. */\n @Input() EntityName: string | null = null;\n /** Primary key of the record to edit. Empty/absent → new record. */\n @Input() PrimaryKey?: CompositeKey;\n /** Convenience single-column ('ID') key; used when {@link PrimaryKey} is absent. */\n @Input() RecordID?: string;\n /** Pre-loaded record to bind directly (skips load). */\n @Input() Record: BaseEntity | null = null;\n /** New-record default values: URL-segment string or plain object. */\n @Input() NewRecordValues: string | Record<string, unknown> | null = null;\n /**\n * Render a single registered form section (`BaseFormSectionComponent`\n * registered as `'<EntityName>.<SectionName>'`) instead of the full form.\n * See {@link MjEntityFormHostComponent.SectionName}.\n */\n @Input() SectionName: string | null = null;\n /** Force edit mode (default: new → edit, existing → read). */\n @Input() EditMode: boolean | null = null;\n /**\n * Per-instance config OVERRIDE. Treated as a partial set of overrides that is\n * merged **over** the surface's {@link PresetConfig} — so passing\n * `{ StartInEditMode: true }` keeps the preset's `Toolbar: null` etc. instead\n * of replacing the whole preset. Bind the merged result via {@link EffectiveConfig}.\n */\n @Input() Config: EntityFormConfig | null = null;\n\n /**\n * The surface's default config preset (TAB/DIALOG/SLIDEIN). Subclasses override\n * this getter; the base returns an empty object (no defaults).\n */\n protected get PresetConfig(): EntityFormConfig { return {}; }\n\n /**\n * The config actually handed to the form host: the surface {@link PresetConfig}\n * with any consumer {@link Config} overrides merged on top. This is what makes\n * partial configs work — you only specify what differs from the preset.\n */\n get EffectiveConfig(): EntityFormConfig {\n return { ...this.PresetConfig, ...(this.Config ?? {}) };\n }\n\n // ── Chrome ────────────────────────────────────────────────────────────────\n\n /** Title shown in the chrome. When empty, derived from the record on load. */\n @Input() Title = '';\n /** Whether to show the Save/Cancel footer. Default: true. */\n @Input() ShowFooter = true;\n /** Save button label. */\n @Input() SaveButtonText = 'Save';\n /** Cancel button label. */\n @Input() CancelButtonText = 'Cancel';\n\n private _visible = false;\n private _closed = false;\n /** Two-way: whether the overlay is shown. */\n @Input()\n set Visible(value: boolean) {\n if (value !== this._visible) {\n this._visible = value;\n if (value) {\n this._closed = false; // re-arm for the next close\n this.effectiveTitle = this.Title; // section mode has no FormCreated; full mode refines this\n }\n this.VisibleChange.emit(value);\n }\n }\n get Visible(): boolean { return this._visible; }\n\n // ── Outputs ─────────────────────────────────────────────────────────────\n\n @Output() VisibleChange = new EventEmitter<boolean>();\n /** Emitted after a successful save (carries the saved entity). */\n @Output() Saved = new EventEmitter<BaseEntity>();\n /** Emitted when the overlay closes (save or cancel). */\n @Output() Closed = new EventEmitter<FormOverlayCloseReason>();\n /** Re-emitted host navigation requests (consumer decides; chrome never routes). */\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n /** Re-emitted host notifications. */\n @Output() Notification = new EventEmitter<FormNotificationEvent>();\n /** Re-emitted host record-deleted. */\n @Output() RecordDeleted = new EventEmitter<RecordDeletedEvent>();\n /** Re-emitted host save-failed. */\n @Output() RecordSaveFailed = new EventEmitter<RecordSaveFailedEvent>();\n /** Re-emitted host validation-failed. */\n @Output() ValidationFailed = new EventEmitter<ValidationFailedEvent>();\n /** Re-emitted host load error. */\n @Output() LoadError = new EventEmitter<{ title: string; detail: string }>();\n /** The live form instance, for power-user wiring. */\n @Output() FormCreated = new EventEmitter<BaseFormComponent>();\n\n // ── State ─────────────────────────────────────────────────────────────────\n\n /** True while a save is in flight (disables the Save button). */\n public saving = false;\n /** Title actually rendered (Title input, or derived from the record). */\n public effectiveTitle = '';\n\n /** The live form component instance (for power-user wiring via MJFormRef). */\n get formInstance(): BaseFormComponent | null {\n return this.host?.Form ?? null;\n }\n\n /** Resolves the primary key to pass to the host (PrimaryKey beats RecordID). */\n protected get effectivePrimaryKey(): CompositeKey | undefined {\n if (this.PrimaryKey) return this.PrimaryKey;\n // The overlay hosts any entity's form — resolve the key column(s) from EntityName's metadata\n // rather than assuming `ID`. RecordID may be a bare value or a composite segment.\n if (this.RecordID) return CompositeKey.FromURLSegment(this.EntityName ? this.ProviderToUse.EntityByName(this.EntityName) : undefined, this.RecordID);\n return undefined;\n }\n\n // ── Host event handlers (wired in subclass templates) ─────────────────────\n\n /** Save via the hosted form. Closing happens on the resulting `Saved` event. */\n async onSaveClick(): Promise<void> {\n if (!this.host) return;\n this.saving = true;\n try {\n await this.host.Save();\n } finally {\n this.saving = false;\n }\n }\n\n onHostSaved(record: BaseEntity): void {\n this.Saved.emit(record);\n this.close('save');\n }\n\n onCancel(): void {\n if (this._closed) return;\n this.host?.Cancel();\n this.close('cancel');\n }\n\n /** Host asked to be dismissed (e.g. Discard on a brand-new record). */\n onHostDismissed(): void {\n this.close('cancel');\n }\n\n onFormCreated(form: BaseFormComponent): void {\n this.FormCreated.emit(form);\n if (!this.Title) {\n const rec = form.record;\n const entityLabel = rec?.EntityInfo?.DisplayName ?? rec?.EntityInfo?.Name ?? '';\n this.effectiveTitle = rec?.IsSaved\n ? `${entityLabel}`\n : `New ${entityLabel}`;\n } else {\n this.effectiveTitle = this.Title;\n }\n }\n\n /** Hide the overlay and emit Closed exactly once per open. Idempotent. */\n protected close(reason: FormOverlayCloseReason): void {\n if (this._closed) return;\n this._closed = true;\n if (this._visible) {\n this._visible = false;\n this.VisibleChange.emit(false);\n }\n this.Closed.emit(reason);\n }\n}\n"]}
|
|
@@ -8,25 +8,25 @@ import { SLIDEIN_FORM_CONFIG } from '../types/entity-form-config';
|
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "../host/entity-form-host.component";
|
|
10
10
|
function MjFormSlideInComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
-
const
|
|
11
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
12
12
|
i0.ɵɵelementStart(0, "div", 5)(1, "button", 6);
|
|
13
|
-
i0.ɵɵlistener("click", function MjFormSlideInComponent_Conditional_5_Template_button_click_1_listener() { i0.ɵɵrestoreView(
|
|
13
|
+
i0.ɵɵlistener("click", function MjFormSlideInComponent_Conditional_5_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSaveClick()); });
|
|
14
14
|
i0.ɵɵtext(2);
|
|
15
15
|
i0.ɵɵelementEnd();
|
|
16
16
|
i0.ɵɵelementStart(3, "button", 7);
|
|
17
|
-
i0.ɵɵlistener("click", function MjFormSlideInComponent_Conditional_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(
|
|
17
|
+
i0.ɵɵlistener("click", function MjFormSlideInComponent_Conditional_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
18
18
|
i0.ɵɵtext(4);
|
|
19
19
|
i0.ɵɵelementEnd()();
|
|
20
20
|
} if (rf & 2) {
|
|
21
|
-
const
|
|
21
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
22
22
|
i0.ɵɵadvance();
|
|
23
|
-
i0.ɵɵproperty("disabled",
|
|
23
|
+
i0.ɵɵproperty("disabled", ctx_r1.saving);
|
|
24
24
|
i0.ɵɵadvance();
|
|
25
|
-
i0.ɵɵtextInterpolate(
|
|
25
|
+
i0.ɵɵtextInterpolate(ctx_r1.SaveButtonText);
|
|
26
26
|
i0.ɵɵadvance();
|
|
27
|
-
i0.ɵɵproperty("disabled",
|
|
27
|
+
i0.ɵɵproperty("disabled", ctx_r1.saving);
|
|
28
28
|
i0.ɵɵadvance();
|
|
29
|
-
i0.ɵɵtextInterpolate(
|
|
29
|
+
i0.ɵɵtextInterpolate(ctx_r1.CancelButtonText);
|
|
30
30
|
} }
|
|
31
31
|
/**
|
|
32
32
|
* Opens any MemberJunction entity form inside a right-edge slide-in panel.
|
|
@@ -78,11 +78,10 @@ export class MjFormSlideInComponent extends BaseFormOverlay {
|
|
|
78
78
|
}
|
|
79
79
|
static ɵfac = /*@__PURE__*/ (() => { let ɵMjFormSlideInComponent_BaseFactory; return function MjFormSlideInComponent_Factory(__ngFactoryType__) { return (ɵMjFormSlideInComponent_BaseFactory || (ɵMjFormSlideInComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MjFormSlideInComponent)))(__ngFactoryType__ || MjFormSlideInComponent); }; })();
|
|
80
80
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjFormSlideInComponent, selectors: [["mj-form-slide-in"]], inputs: { WidthPx: "WidthPx", Resizable: "Resizable" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 13, consts: [["host", ""], ["Mode", "slide", 3, "WidthChanged", "Closed", "Visible", "Title", "Resizable", "WidthPx"], [1, "mj-form-slide-in-layout"], [1, "mj-form-slide-in-body"], [3, "Saved", "Dismissed", "FormCreated", "Navigate", "Notification", "RecordDeleted", "RecordSaveFailed", "ValidationFailed", "LoadError", "EntityName", "PrimaryKey", "Record", "NewRecordValues", "SectionName", "EditMode", "Config", "Provider"], [1, "mj-form-slide-in-footer"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], ["mjButton", "", 3, "click", "disabled"]], template: function MjFormSlideInComponent_Template(rf, ctx) { if (rf & 1) {
|
|
81
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
82
81
|
i0.ɵɵelementStart(0, "mj-slide-panel", 1);
|
|
83
|
-
i0.ɵɵlistener("WidthChanged", function MjFormSlideInComponent_Template_mj_slide_panel_WidthChanged_0_listener($event) {
|
|
82
|
+
i0.ɵɵlistener("WidthChanged", function MjFormSlideInComponent_Template_mj_slide_panel_WidthChanged_0_listener($event) { return ctx.onWidthChanged($event); })("Closed", function MjFormSlideInComponent_Template_mj_slide_panel_Closed_0_listener() { return ctx.onCancel(); });
|
|
84
83
|
i0.ɵɵelementStart(1, "div", 2)(2, "div", 3)(3, "mj-entity-form-host", 4, 0);
|
|
85
|
-
i0.ɵɵlistener("Saved", function MjFormSlideInComponent_Template_mj_entity_form_host_Saved_3_listener($event) {
|
|
84
|
+
i0.ɵɵlistener("Saved", function MjFormSlideInComponent_Template_mj_entity_form_host_Saved_3_listener($event) { return ctx.onHostSaved($event); })("Dismissed", function MjFormSlideInComponent_Template_mj_entity_form_host_Dismissed_3_listener() { return ctx.onHostDismissed(); })("FormCreated", function MjFormSlideInComponent_Template_mj_entity_form_host_FormCreated_3_listener($event) { return ctx.onFormCreated($event); })("Navigate", function MjFormSlideInComponent_Template_mj_entity_form_host_Navigate_3_listener($event) { return ctx.Navigate.emit($event); })("Notification", function MjFormSlideInComponent_Template_mj_entity_form_host_Notification_3_listener($event) { return ctx.Notification.emit($event); })("RecordDeleted", function MjFormSlideInComponent_Template_mj_entity_form_host_RecordDeleted_3_listener($event) { return ctx.RecordDeleted.emit($event); })("RecordSaveFailed", function MjFormSlideInComponent_Template_mj_entity_form_host_RecordSaveFailed_3_listener($event) { return ctx.RecordSaveFailed.emit($event); })("ValidationFailed", function MjFormSlideInComponent_Template_mj_entity_form_host_ValidationFailed_3_listener($event) { return ctx.ValidationFailed.emit($event); })("LoadError", function MjFormSlideInComponent_Template_mj_entity_form_host_LoadError_3_listener($event) { return ctx.LoadError.emit($event); });
|
|
86
85
|
i0.ɵɵelementEnd()();
|
|
87
86
|
i0.ɵɵconditionalCreate(5, MjFormSlideInComponent_Conditional_5_Template, 5, 4, "div", 5);
|
|
88
87
|
i0.ɵɵelementEnd()();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-slide-in.component.js","sourceRoot":"","sources":["../../../src/lib/overlays/form-slide-in.component.ts","../../../src/lib/overlays/form-slide-in.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;;;;;IC2B1D,AADF,8BAAqC,gBAC4C;IAAxB,0LAAS,oBAAa,KAAC;IAAC,YAAoB;IAAA,iBAAS;IAC5G,iCAA0D;IAArB,0LAAS,iBAAU,KAAC;IAAC,YAAsB;IAClF,AADkF,iBAAS,EACrF;;;IAF+B,cAAmB;IAAnB,wCAAmB;IAAyB,cAAoB;IAApB,2CAAoB;IAClF,cAAmB;IAAnB,wCAAmB;IAAsB,cAAsB;IAAtB,6CAAsB;;AD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6DAAtB,sBAAsB
|
|
1
|
+
{"version":3,"file":"form-slide-in.component.js","sourceRoot":"","sources":["../../../src/lib/overlays/form-slide-in.component.ts","../../../src/lib/overlays/form-slide-in.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;;;;;IC2B1D,AADF,8BAAqC,gBAC4C;IAAxB,0LAAS,oBAAa,KAAC;IAAC,YAAoB;IAAA,iBAAS;IAC5G,iCAA0D;IAArB,0LAAS,iBAAU,KAAC;IAAC,YAAsB;IAClF,AADkF,iBAAS,EACrF;;;IAF+B,cAAmB;IAAnB,wCAAmB;IAAyB,cAAoB;IAApB,2CAAoB;IAClF,cAAmB;IAAnB,wCAAmB;IAAsB,cAAsB;IAAtB,6CAAsB;;AD1BxF;;;;;;;;;;;;;;;;;GAiBG;AAQH,MAAM,OAAO,sBAAuB,SAAQ,eAAe;IACzD,+EAA+E;IACtE,OAAO,GAAG,GAAG,CAAC;IACvB,2CAA2C;IAClC,SAAS,GAAG,IAAI,CAAC;IAE1B,4EAA4E;IAC5E,IAAuB,YAAY,KAAK,OAAO,mBAAmB,CAAC,CAAC,CAAC;IAErE,mEAAmE;IAC3D,WAAW,GAAkB,IAAI,CAAC;IAE1C,QAAQ;QACN,uEAAuE;QACvE,6DAA6D;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,EA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,AADE,iBAAM,EACS;;YAlCf,AADA,AADA,AADA,qCAAmB,6BACK,4BACD,wBACJ;YAOb,eAAyB;YAOzB,AADA,AADA,AADA,AADA,AADA,AADA,AADA,2CAAyB,uCACU,sBAClB,wCACkB,gCACR,0BACN,+BACK,0BACL;YAazB,eAKC;YALD,yCAKC;4BDPO,YAAY,EAAE,eAAe,gCAAE,qBAAqB,EAAE,iBAAiB;;iFAItE,sBAAsB;cAPlC,SAAS;6BACI,IAAI,YACN,kBAAkB,WACnB,CAAC,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,CAAC;;kBAMjF,KAAK;;kBAEL,KAAK;;kFAJK,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MjSlidePanelComponent, MJButtonDirective } from '@memberjunction/ng-ui-components';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\n\nimport { BaseFormsModule } from '../../module';\nimport { BaseFormOverlay } from './base-form-overlay';\nimport { SLIDEIN_FORM_CONFIG } from '../types/entity-form-config';\n\n/**\n * Opens any MemberJunction entity form inside a right-edge slide-in panel.\n *\n * Wraps {@link MjEntityFormHostComponent} in `<mj-slide-panel>` (resizable) with\n * a sticky Save/Cancel footer. Defaults to {@link SLIDEIN_FORM_CONFIG} (no in-form\n * toolbar, related grids hidden, full-width body, in-form links inert).\n *\n * Standalone — import it directly:\n * ```typescript\n * import { MjFormSlideInComponent } from '@memberjunction/ng-base-forms';\n * ```\n *\n * @example Declarative\n * ```html\n * <mj-form-slide-in [EntityName]=\"'MJ: Credentials'\" [Record]=\"cred\"\n * [(Visible)]=\"open\" (Saved)=\"refresh()\"></mj-form-slide-in>\n * ```\n */\n@Component({\n standalone: true,\n selector: 'mj-form-slide-in',\n imports: [CommonModule, BaseFormsModule, MjSlidePanelComponent, MJButtonDirective],\n templateUrl: './form-slide-in.component.html',\n styleUrls: ['./form-slide-in.component.css'],\n})\nexport class MjFormSlideInComponent extends BaseFormOverlay implements OnInit {\n /** Initial panel width in px (resizable by the user; persisted per-entity). */\n @Input() WidthPx = 720;\n /** Whether the panel is user-resizable. */\n @Input() Resizable = true;\n\n /** Form config. Defaults to the slide-in preset; consumers can override. */\n protected override get PresetConfig() { return SLIDEIN_FORM_CONFIG; }\n\n /** Entity used to scope the persisted width (resolved on init). */\n private widthEntity: string | null = null;\n\n ngOnInit(): void {\n // Resolve the entity up-front so we can restore the user's saved width\n // before the panel animates in (avoids a mid-render resize).\n this.widthEntity = this.EntityName ?? this.Record?.EntityInfo?.Name ?? null;\n if (this.widthEntity) {\n const saved = UserInfoEngine.Instance.GetSetting(this.widthKey(this.widthEntity));\n const px = saved ? parseInt(saved, 10) : 0;\n if (px > 0) this.WidthPx = px;\n }\n }\n\n /** Persist the user's resize, scoped per-entity (cross-device via User Settings). */\n onWidthChanged(width: number): void {\n this.WidthPx = width;\n if (this.widthEntity) {\n UserInfoEngine.Instance.SetSettingDebounced(this.widthKey(this.widthEntity), String(width));\n }\n }\n\n private widthKey(entity: string): string {\n return `mj.formSlideIn.width.${entity.toLowerCase()}`;\n }\n}\n","<mj-slide-panel\n Mode=\"slide\"\n [Visible]=\"Visible\"\n [Title]=\"effectiveTitle\"\n [Resizable]=\"Resizable\"\n [WidthPx]=\"WidthPx\"\n (WidthChanged)=\"onWidthChanged($event)\"\n (Closed)=\"onCancel()\">\n\n <div class=\"mj-form-slide-in-layout\">\n <div class=\"mj-form-slide-in-body\">\n <mj-entity-form-host #host\n [EntityName]=\"EntityName\"\n [PrimaryKey]=\"effectivePrimaryKey!\"\n [Record]=\"Record\"\n [NewRecordValues]=\"NewRecordValues\"\n [SectionName]=\"SectionName\"\n [EditMode]=\"EditMode\"\n [Config]=\"EffectiveConfig\"\n [Provider]=\"Provider\"\n (Saved)=\"onHostSaved($event)\"\n (Dismissed)=\"onHostDismissed()\"\n (FormCreated)=\"onFormCreated($event)\"\n (Navigate)=\"Navigate.emit($event)\"\n (Notification)=\"Notification.emit($event)\"\n (RecordDeleted)=\"RecordDeleted.emit($event)\"\n (RecordSaveFailed)=\"RecordSaveFailed.emit($event)\"\n (ValidationFailed)=\"ValidationFailed.emit($event)\"\n (LoadError)=\"LoadError.emit($event)\">\n </mj-entity-form-host>\n </div>\n\n @if (ShowFooter) {\n <div class=\"mj-form-slide-in-footer\">\n <button mjButton variant=\"primary\" [disabled]=\"saving\" (click)=\"onSaveClick()\">{{ SaveButtonText }}</button>\n <button mjButton [disabled]=\"saving\" (click)=\"onCancel()\">{{ CancelButtonText }}</button>\n </div>\n }\n </div>\n</mj-slide-panel>\n"]}
|
|
@@ -3,6 +3,8 @@ import { FormContext, PanelVariant, PanelDragStartEvent, PanelDropEvent } from '
|
|
|
3
3
|
import { FormNavigationEvent } from '../types/navigation-events';
|
|
4
4
|
import { MjFormFieldComponent } from '../field/form-field.component';
|
|
5
5
|
import { CompositeKey } from '@memberjunction/core';
|
|
6
|
+
import { type FormSectionIndicatorSource } from '../section-indicators/form-section-indicator-coordinator.service';
|
|
7
|
+
import { type FormSectionIndicators, type ParsedValidationSource } from '../section-indicators/form-section-indicators';
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
9
|
/**
|
|
8
10
|
* Reusable collapsible panel for form sections.
|
|
@@ -18,6 +20,10 @@ import * as i0 from "@angular/core";
|
|
|
18
20
|
* - Drag-to-reorder sections
|
|
19
21
|
* - Inheritable "Inherited from X" badge with navigation event
|
|
20
22
|
* - Row count badge for related entity sections
|
|
23
|
+
* - Section indicators: an unsaved-changes dot and an invalid-field count derived
|
|
24
|
+
* live from the projected `mj-form-field`s (plus anything a custom section
|
|
25
|
+
* supplies through `[Indicators]`), published to the form's chrome rail
|
|
26
|
+
* through {@link FormSectionIndicatorCoordinator}
|
|
21
27
|
*
|
|
22
28
|
* @example
|
|
23
29
|
* ```html
|
|
@@ -34,13 +40,38 @@ import * as i0 from "@angular/core";
|
|
|
34
40
|
* </mj-collapsible-panel>
|
|
35
41
|
* ```
|
|
36
42
|
*/
|
|
37
|
-
export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy {
|
|
43
|
+
export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, AfterContentInit, AfterViewInit, OnDestroy, FormSectionIndicatorSource {
|
|
38
44
|
private cdr;
|
|
39
45
|
private elementRef;
|
|
40
46
|
private ngZone;
|
|
41
47
|
private chrome;
|
|
48
|
+
private indicators;
|
|
42
49
|
/** Unique key for state persistence */
|
|
43
50
|
SectionKey: string;
|
|
51
|
+
/**
|
|
52
|
+
* Indicator counts a custom section supplies for content that is NOT rendered by
|
|
53
|
+
* `mj-form-field` — a designer, an inline grid, a hand-built editor. Added to the
|
|
54
|
+
* counts this panel derives from its own fields, so a section that mixes both
|
|
55
|
+
* reports the union. Omit for ordinary field panels: their state is derived.
|
|
56
|
+
*
|
|
57
|
+
* ```html
|
|
58
|
+
* <mj-collapsible-panel SectionKey="lines" [Indicators]="{ DirtyCount: LineEditor.EditedRows, ErrorCount: LineEditor.InvalidRows }">
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
Indicators?: Partial<FormSectionIndicators> | null;
|
|
62
|
+
/**
|
|
63
|
+
* Graph-path collection names whose validation failures belong to THIS panel —
|
|
64
|
+
* `ValidationSources="Modifications"` claims `Modifications[2].ProvisionID`.
|
|
65
|
+
*
|
|
66
|
+
* Only needed when a panel hosts a child collection whose path name differs from
|
|
67
|
+
* its `SectionKey`: plain field failures are joined automatically from the panel's
|
|
68
|
+
* `mj-form-field` children, and a graph path whose leading segment already matches
|
|
69
|
+
* the `SectionKey` is claimed without any declaration. Declared HERE, on the panel
|
|
70
|
+
* that owns the collection, rather than in an app-side `fieldName -> sectionKey`
|
|
71
|
+
* map that duplicates a fact the panel owns and drifts silently when a
|
|
72
|
+
* `SectionKey` is renamed. Accepts a single name or a list.
|
|
73
|
+
*/
|
|
74
|
+
ValidationSources?: string | readonly string[] | null;
|
|
44
75
|
/** Display name shown in the panel header */
|
|
45
76
|
SectionName: string;
|
|
46
77
|
/** Font Awesome icon class for the panel header */
|
|
@@ -99,6 +130,12 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
99
130
|
get HostSectionKey(): string;
|
|
100
131
|
get HostVariant(): string;
|
|
101
132
|
get HostIcon(): string;
|
|
133
|
+
/**
|
|
134
|
+
* Indicator counts mirrored onto the host element, so CSS and any DOM sweep can
|
|
135
|
+
* read a section's state without a component reference.
|
|
136
|
+
*/
|
|
137
|
+
get HostDirtyCount(): number;
|
|
138
|
+
get HostErrorCount(): number;
|
|
102
139
|
get HostClass(): string;
|
|
103
140
|
get CssOrder(): number;
|
|
104
141
|
IsDragging: boolean;
|
|
@@ -131,6 +168,48 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
131
168
|
get Collapsible(): boolean;
|
|
132
169
|
/** Whether the panel is expanded (delegates to form state; always true when not collapsible) */
|
|
133
170
|
get Expanded(): boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Live state of this section: fields edited since the last save, fields that are
|
|
173
|
+
* invalid or required-and-empty, and fields carrying warnings. Derived from the
|
|
174
|
+
* projected `mj-form-field`s on every read — the same state those fields use for
|
|
175
|
+
* their own amber dot and red underline, so the section can never disagree with
|
|
176
|
+
* its fields — plus graph-path validation failures this section claims, plus
|
|
177
|
+
* whatever a custom section supplies through `[Indicators]`.
|
|
178
|
+
*
|
|
179
|
+
* Read during change detection (host bindings, the header template, the rail via
|
|
180
|
+
* the coordinator). Pure and cheap: one pass over the field list.
|
|
181
|
+
*/
|
|
182
|
+
get SectionIndicators(): FormSectionIndicators;
|
|
183
|
+
get SectionDirtyCount(): number;
|
|
184
|
+
get SectionErrorCount(): number;
|
|
185
|
+
get SectionWarningCount(): number;
|
|
186
|
+
get SectionDirtyTitle(): string;
|
|
187
|
+
get SectionErrorTitle(): string;
|
|
188
|
+
get SectionWarningTitle(): string;
|
|
189
|
+
/** {@link FormSectionIndicatorSource} — the rail reads this through the coordinator. */
|
|
190
|
+
GetSectionIndicators(): FormSectionIndicators;
|
|
191
|
+
/** {@link FormSectionIndicatorSource} — whether a form-level error belongs to this section. */
|
|
192
|
+
OwnsValidationSource(source: ParsedValidationSource): boolean;
|
|
193
|
+
/** Normalized {@link ValidationSources}. */
|
|
194
|
+
get ValidationCollectionNames(): string[];
|
|
195
|
+
/** Field names this panel renders — the join between a plain-field error and this section. */
|
|
196
|
+
private renderedFieldNames;
|
|
197
|
+
private validationScope;
|
|
198
|
+
/**
|
|
199
|
+
* Counts of FIELDS (not messages) in each state. A field is invalid when it shows a
|
|
200
|
+
* failure OR is required and empty in edit mode — exactly the two conditions that
|
|
201
|
+
* paint its underline red. Warnings count only on fields with no failure, mirroring
|
|
202
|
+
* `MjFormFieldComponent.ShowWarnings`.
|
|
203
|
+
*/
|
|
204
|
+
private fieldIndicators;
|
|
205
|
+
/**
|
|
206
|
+
* Graph-path failures (`Lines[2].Amount`) this section owns, once the form has asked
|
|
207
|
+
* for validation to show. Plain field-name failures are NOT counted here — the field
|
|
208
|
+
* that renders them already reports through {@link fieldIndicators}.
|
|
209
|
+
*/
|
|
210
|
+
private claimedGraphErrors;
|
|
211
|
+
/** (Re)declare this section with the container-scoped registry the rail reads. */
|
|
212
|
+
private registerIndicatorSource;
|
|
134
213
|
ngOnInit(): void;
|
|
135
214
|
ngAfterContentInit(): void;
|
|
136
215
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -165,7 +244,9 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
165
244
|
private UpdateFieldNames;
|
|
166
245
|
/**
|
|
167
246
|
* Subscribes to Navigate events from all child form-field components
|
|
168
|
-
* and relays them through this panel's Navigate output.
|
|
247
|
+
* and relays them through this panel's Navigate output. Also listens for
|
|
248
|
+
* value edits so the section indicators (and the rail reading them) refresh
|
|
249
|
+
* on the same tick as the keystroke rather than on the container's next poll.
|
|
169
250
|
*/
|
|
170
251
|
private SubscribeToFieldNavigateEvents;
|
|
171
252
|
/**
|
|
@@ -177,8 +258,18 @@ export declare class MjCollapsiblePanelComponent implements OnInit, OnChanges, A
|
|
|
177
258
|
* Debounces height persistence so we don't write to DB on every resize frame.
|
|
178
259
|
*/
|
|
179
260
|
private DebouncePersistHeight;
|
|
261
|
+
/**
|
|
262
|
+
* True when this panel projects form fields and field-level security denies the user EVERY one
|
|
263
|
+
* of them.
|
|
264
|
+
*
|
|
265
|
+
* Deliberately false when the panel projects no `mj-form-field` at all — related-entity grids,
|
|
266
|
+
* IS-A cards and slot-injected panels all legitimately have none, and hiding those would remove
|
|
267
|
+
* sections field security has nothing to say about. "No fields" and "no readable fields" are
|
|
268
|
+
* different states and only the second one should hide the section.
|
|
269
|
+
*/
|
|
270
|
+
private get AllProjectedFieldsDenied();
|
|
180
271
|
private UpdateVisibilityAndHighlighting;
|
|
181
272
|
static ɵfac: i0.ɵɵFactoryDeclaration<MjCollapsiblePanelComponent, never>;
|
|
182
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MjCollapsiblePanelComponent, "mj-collapsible-panel", never, { "SectionKey": { "alias": "SectionKey"; "required": false; }; "SectionName": { "alias": "SectionName"; "required": false; }; "Icon": { "alias": "Icon"; "required": false; }; "Form": { "alias": "Form"; "required": false; }; "FormContext": { "alias": "FormContext"; "required": false; }; "Variant": { "alias": "Variant"; "required": false; }; "BadgeCount": { "alias": "BadgeCount"; "required": false; }; "DefaultExpanded": { "alias": "DefaultExpanded"; "required": false; }; "InheritedFromEntity": { "alias": "InheritedFromEntity"; "required": false; }; "InheritedRecordPrimaryKey": { "alias": "InheritedRecordPrimaryKey"; "required": false; }; "Hidden": { "alias": "Hidden"; "required": false; }; "_deprecatedSectionKey": { "alias": "sectionKey"; "required": false; }; "_deprecatedSectionName": { "alias": "sectionName"; "required": false; }; "_deprecatedIcon": { "alias": "icon"; "required": false; }; "_deprecatedForm": { "alias": "form"; "required": false; }; "_deprecatedFormContext": { "alias": "formContext"; "required": false; }; }, { "DragStarted": "DragStarted"; "DragEnded": "DragEnded"; "PanelDrop": "PanelDrop"; "Navigate": "Navigate"; }, ["FieldComponents"], ["*"], false, never>;
|
|
273
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MjCollapsiblePanelComponent, "mj-collapsible-panel", never, { "SectionKey": { "alias": "SectionKey"; "required": false; }; "Indicators": { "alias": "Indicators"; "required": false; }; "ValidationSources": { "alias": "ValidationSources"; "required": false; }; "SectionName": { "alias": "SectionName"; "required": false; }; "Icon": { "alias": "Icon"; "required": false; }; "Form": { "alias": "Form"; "required": false; }; "FormContext": { "alias": "FormContext"; "required": false; }; "Variant": { "alias": "Variant"; "required": false; }; "BadgeCount": { "alias": "BadgeCount"; "required": false; }; "DefaultExpanded": { "alias": "DefaultExpanded"; "required": false; }; "InheritedFromEntity": { "alias": "InheritedFromEntity"; "required": false; }; "InheritedRecordPrimaryKey": { "alias": "InheritedRecordPrimaryKey"; "required": false; }; "Hidden": { "alias": "Hidden"; "required": false; }; "_deprecatedSectionKey": { "alias": "sectionKey"; "required": false; }; "_deprecatedSectionName": { "alias": "sectionName"; "required": false; }; "_deprecatedIcon": { "alias": "icon"; "required": false; }; "_deprecatedForm": { "alias": "form"; "required": false; }; "_deprecatedFormContext": { "alias": "formContext"; "required": false; }; }, { "DragStarted": "DragStarted"; "DragEnded": "DragEnded"; "PanelDrop": "PanelDrop"; "Navigate": "Navigate"; }, ["FieldComponents"], ["*"], false, never>;
|
|
183
274
|
}
|
|
184
275
|
//# sourceMappingURL=collapsible-panel.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/panel/collapsible-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAEtC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAC3D,SAAS,EAE3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE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