@mintplayer/ng-spark 22.0.2 → 22.0.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":"mintplayer-ng-spark-po-form.mjs","sources":["../../po-form/src/spark-po-form.component.ts","../../po-form/src/spark-po-form.component.html","../../po-form/mintplayer-ng-spark-po-form.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input, model, output, signal, effect, Type } from '@angular/core';\nimport { CommonModule, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { BsCardComponent, BsCardHeaderComponent } from '@mintplayer/ng-bootstrap/card';\nimport { BsFormComponent, BsFormControlDirective } from '@mintplayer/ng-bootstrap/form';\nimport { BsGridComponent, BsGridRowDirective, BsGridColumnDirective, BsGridColDirective, BsColFormLabelDirective } from '@mintplayer/ng-bootstrap/grid';\nimport { BsInputGroupComponent } from '@mintplayer/ng-bootstrap/input-group';\nimport { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';\nimport { BsSelectComponent, BsSelectOption } from '@mintplayer/ng-bootstrap/select';\nimport { BsTreeSelectComponent, InMemoryTreeSelectProvider, TreeNode } from '@mintplayer/ng-bootstrap/tree-select';\nimport { BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective } from '@mintplayer/ng-bootstrap/modal';\nimport { BsDatatableComponent, BsDatatableColumnDirective, BsRowTemplateDirective, DatatableSettings } from '@mintplayer/ng-bootstrap/datatable';\nimport { BsCheckboxComponent } from '@mintplayer/ng-bootstrap/checkbox';\nimport { BsSpinnerComponent } from '@mintplayer/ng-bootstrap/spinner';\nimport { BsTabControlComponent, BsTabPageComponent, BsTabPageHeaderDirective } from '@mintplayer/ng-bootstrap/tab-control';\nimport { BsTableComponent } from '@mintplayer/ng-bootstrap/table';\nimport { PaginationResponse } from '@mintplayer/pagination';\nimport { SparkService, SparkLanguageService } from '@mintplayer/ng-spark/services';\nimport {\n TranslateKeyPipe,\n ResolveTranslationPipe,\n InputTypePipe,\n LookupDisplayValuePipe,\n LookupDisplayTypePipe,\n LookupOptionsPipe,\n ReferenceDisplayValuePipe,\n AsDetailDisplayValuePipe,\n AsDetailTypePipe,\n AsDetailColumnsPipe,\n AsDetailCellValuePipe,\n CanCreateDetailRowPipe,\n CanDeleteDetailRowPipe,\n InlineRefOptionsPipe,\n ReferenceAttrValuePipe,\n ErrorForAttributePipe,\n} from '@mintplayer/ng-spark/pipes';\nimport {\n ELookupDisplayType,\n EntityPermissions,\n EntityType,\n EntityAttributeDefinition,\n AttributeTab,\n AttributeGroup,\n LookupReference,\n LookupReferenceValue,\n PersistentObject,\n PersistentObjectAttribute,\n ValidationError,\n ShowedOn,\n hasShowedOnFlag,\n resolveTranslation,\n} from '@mintplayer/ng-spark/models';\nimport { SparkIconComponent } from '@mintplayer/ng-spark/icon';\nimport { SPARK_ATTRIBUTE_RENDERERS } from '@mintplayer/ng-spark/renderers';\n\n@Component({\n selector: 'spark-po-form',\n imports: [CommonModule, NgTemplateOutlet, NgComponentOutlet, FormsModule, BsCardComponent, BsCardHeaderComponent, BsFormComponent, BsFormControlDirective, BsGridComponent, BsGridRowDirective, BsGridColumnDirective, BsGridColDirective, BsColFormLabelDirective, BsButtonTypeDirective, BsInputGroupComponent, BsSelectComponent, BsSelectOption, BsTreeSelectComponent, BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective, BsDatatableComponent, BsDatatableColumnDirective, BsRowTemplateDirective, BsTableComponent, BsCheckboxComponent, BsSpinnerComponent, BsTabControlComponent, BsTabPageComponent, BsTabPageHeaderDirective, SparkIconComponent, SparkPoFormComponent, TranslateKeyPipe, ResolveTranslationPipe, InputTypePipe, LookupDisplayValuePipe, LookupDisplayTypePipe, LookupOptionsPipe, ReferenceDisplayValuePipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AsDetailColumnsPipe, AsDetailCellValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, InlineRefOptionsPipe, ReferenceAttrValuePipe, ErrorForAttributePipe],\n templateUrl: './spark-po-form.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SparkPoFormComponent {\n private readonly sparkService = inject(SparkService);\n private readonly translations = inject(SparkLanguageService);\n private readonly rendererRegistry = inject(SPARK_ATTRIBUTE_RENDERERS);\n\n entityType = input<EntityType | null>(null);\n formData = model<Record<string, any>>({});\n validationErrors = input<ValidationError[]>([]);\n showButtons = input(false);\n isSaving = input(false);\n parentId = input<string | undefined>(undefined);\n parentType = input<string | undefined>(undefined);\n\n save = output<void>();\n cancel = output<void>();\n\n colors = Color;\n referenceOptions = signal<Record<string, PersistentObject[]>>({});\n\n // Multi-reference (Reference && isArray) editor state. Built from the same query\n // results as referenceOptions: a flat TreeNode list per attribute drives an\n // InMemoryTreeSelectProvider (the <bs-tree-select> data port), and a node lookup\n // resolves selected ids back to chip labels.\n referenceProviders = signal<Record<string, InMemoryTreeSelectProvider>>({});\n referenceNodes = signal<Record<string, Record<string, TreeNode>>>({});\n asDetailTypes = signal<Record<string, EntityType>>({});\n lookupReferenceOptions = signal<Record<string, LookupReference>>({});\n\n // Modal state for AsDetail object editing\n editingAsDetailAttr = signal<EntityAttributeDefinition | null>(null);\n asDetailFormData = signal<Record<string, any>>({});\n showAsDetailModal = signal(false);\n editingArrayIndex = signal<number | null>(null);\n\n // Permissions for array AsDetail entity types\n asDetailPermissions = signal<Record<string, EntityPermissions>>({});\n\n // Reference options for columns within array AsDetail types (keyed by parent attr name, then column name)\n asDetailReferenceOptions = signal<Record<string, Record<string, PersistentObject[]>>>({});\n\n // Modal state for Reference selection\n editingReferenceAttr = signal<EntityAttributeDefinition | null>(null);\n showReferenceModal = signal(false);\n referenceModalItems = signal<PersistentObject[]>([]);\n referenceModalEntityType = signal<EntityType | null>(null);\n referenceModalPagination = signal<PaginationResponse<PersistentObject> | undefined>(undefined);\n referenceModalSettings = signal(new DatatableSettings({\n perPage: { values: [10, 25, 50], selected: 10 },\n page: { values: [1], selected: 1 },\n sortColumns: []\n }));\n referenceSearchTerm = '';\n\n // Modal state for LookupReference selection (Modal display type)\n editingLookupAttr = signal<EntityAttributeDefinition | null>(null);\n showLookupModal = signal(false);\n lookupModalItems = signal<LookupReferenceValue[]>([]);\n lookupSearchTerm = signal('');\n ELookupDisplayType = ELookupDisplayType;\n\n editableAttributes = computed(() => {\n return this.entityType()?.attributes\n .filter(a => a.isVisible && !a.isReadOnly && hasShowedOnFlag(a.showedOn, ShowedOn.PersistentObject))\n .sort((a, b) => a.order - b.order) || [];\n });\n\n private static readonly DEFAULT_TAB: AttributeTab = { id: '__default__', name: 'Algemeen', label: { nl: 'Algemeen', en: 'General' }, order: 0 };\n\n ungroupedAttributes = computed(() => {\n const attrs = this.editableAttributes();\n const groupIds = new Set((this.entityType()?.groups || []).map(g => g.id));\n return attrs.filter(a => !a.group || !groupIds.has(a.group));\n });\n\n resolvedTabs = computed((): AttributeTab[] => {\n const et = this.entityType();\n const definedTabs = et?.tabs?.length ? [...et.tabs].sort((a, b) => a.order - b.order) : [];\n const hasUngroupedAttrs = this.ungroupedAttributes().length > 0;\n const hasUntabbedGroups = (et?.groups || []).some(g => !g.tab);\n\n if (hasUngroupedAttrs || hasUntabbedGroups || definedTabs.length === 0) {\n return [SparkPoFormComponent.DEFAULT_TAB, ...definedTabs];\n }\n return definedTabs;\n });\n\n groupsForTab(tab: AttributeTab): AttributeGroup[] {\n const groups = this.entityType()?.groups || [];\n if (tab.id === '__default__') {\n return groups.filter(g => !g.tab).sort((a, b) => a.order - b.order);\n }\n return groups.filter(g => g.tab === tab.id).sort((a, b) => a.order - b.order);\n }\n\n attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[] {\n return this.editableAttributes().filter(a => a.group === group.id);\n }\n\n referenceVisibleAttributes = computed(() => {\n return this.referenceModalEntityType()?.attributes\n .filter(a => a.isVisible)\n .sort((a, b) => a.order - b.order) || [];\n });\n\n // Typed rows for the reference-modal datatable so its generic infers\n // PersistentObject (a `?? []` inline binding would degrade to `unknown`).\n referenceModalRows = computed<PersistentObject[]>(() => this.referenceModalPagination()?.data ?? []);\n\n filteredLookupItems = computed(() => {\n if (!this.lookupSearchTerm().trim()) {\n return this.lookupModalItems();\n }\n const term = this.lookupSearchTerm().toLowerCase().trim();\n return this.lookupModalItems().filter(item => {\n const translation = resolveTranslation(item.values);\n return translation.toLowerCase().includes(term) || item.key.toLowerCase().includes(term);\n });\n });\n\n constructor() {\n effect(() => {\n const et = this.entityType();\n const _pid = this.parentId();\n const _ptype = this.parentType();\n if (et) {\n this.loadReferenceOptions();\n this.loadAsDetailTypes();\n this.loadLookupReferenceOptions();\n }\n });\n }\n\n private toRecord<T>(entries: [string, T][]): Record<string, T> {\n const result: Record<string, T> = {};\n for (const [key, value] of entries) {\n result[key] = value;\n }\n return result;\n }\n\n async loadReferenceOptions(): Promise<void> {\n const refAttrs = this.editableAttributes().filter(a => a.dataType === 'Reference' && a.query);\n if (refAttrs.length === 0) return;\n\n const entries = await Promise.all(\n refAttrs.filter(a => a.query).map(async attr => {\n const result = await this.sparkService.executeQueryByName(attr.query!, {\n parentId: this.parentId(),\n parentType: this.parentType(),\n });\n return [attr.name, result.data] as [string, PersistentObject[]];\n })\n );\n const optionsByAttr = this.toRecord(entries);\n this.referenceOptions.set(optionsByAttr);\n\n // For multi-reference attributes (Reference && isArray), turn each query result\n // into a flat TreeNode list + an in-memory provider for <bs-tree-select>, and a\n // by-id node map used to render chip labels for the current selection.\n const providers: Record<string, InMemoryTreeSelectProvider> = {};\n const nodesByAttr: Record<string, Record<string, TreeNode>> = {};\n for (const attr of refAttrs) {\n if (!attr.isArray) continue;\n const pos = optionsByAttr[attr.name] || [];\n const nodes: TreeNode[] = pos\n .filter(po => !!po.id)\n .map(po => ({ id: po.id!, label: po.breadcrumb || po.name || po.id! }));\n providers[attr.name] = new InMemoryTreeSelectProvider(nodes);\n nodesByAttr[attr.name] = this.toRecord(nodes.map(n => [n.id, n] as [string, TreeNode]));\n }\n this.referenceProviders.set(providers);\n this.referenceNodes.set(nodesByAttr);\n }\n\n /**\n * Stable TreeNode[] value per multi-reference attribute, derived from the id array\n * in formData and the resolved node map. Recomputes only when formData or the node\n * map changes, so binding it into <bs-tree-select> doesn't churn on every CD pass.\n * Ids without a resolved node fall back to a label of the id itself.\n */\n referenceTreeValues = computed<Record<string, TreeNode[]>>(() => {\n const fd = this.formData();\n const nodesByAttr = this.referenceNodes();\n const result: Record<string, TreeNode[]> = {};\n for (const attr of this.editableAttributes()) {\n if (attr.dataType !== 'Reference' || !attr.isArray) continue;\n const ids: string[] = Array.isArray(fd[attr.name]) ? fd[attr.name] : [];\n const nodeMap = nodesByAttr[attr.name] || {};\n result[attr.name] = ids.map(id => nodeMap[id] ?? { id, label: id });\n }\n return result;\n });\n\n getReferenceProvider(attr: EntityAttributeDefinition): InMemoryTreeSelectProvider | undefined {\n return this.referenceProviders()[attr.name];\n }\n\n onReferenceTreeChange(attr: EntityAttributeDefinition, value: TreeNode | TreeNode[] | null): void {\n const nodes = Array.isArray(value) ? value : value ? [value] : [];\n const data = { ...this.formData() };\n data[attr.name] = nodes.map(n => n.id);\n this.formData.set(data);\n }\n\n async loadAsDetailTypes(): Promise<void> {\n const asDetailAttrs = this.editableAttributes().filter(a => a.dataType === 'AsDetail' && a.asDetailType);\n if (asDetailAttrs.length === 0) return;\n\n const types = await this.sparkService.getEntityTypes();\n const newAsDetailTypes: Record<string, EntityType> = {};\n\n for (const attr of asDetailAttrs) {\n const asDetailType = types.find(t => t.clrType === attr.asDetailType);\n if (asDetailType) {\n newAsDetailTypes[attr.name] = asDetailType;\n\n if (attr.isArray) {\n const perms = await this.sparkService.getPermissions(asDetailType.id);\n this.asDetailPermissions.update(prev => ({ ...prev, [attr.name]: perms }));\n\n const refCols = asDetailType.attributes.filter(a => a.dataType === 'Reference' && a.query);\n if (refCols.length > 0) {\n const refEntries = await Promise.all(\n refCols.filter(c => c.query).map(async col => {\n const result = await this.sparkService.executeQueryByName(col.query!, {\n parentId: this.parentId(),\n parentType: this.parentType(),\n });\n return [col.name, result.data] as [string, PersistentObject[]];\n })\n );\n this.asDetailReferenceOptions.update(prev => ({ ...prev, [attr.name]: this.toRecord(refEntries) }));\n }\n }\n }\n }\n this.asDetailTypes.set(newAsDetailTypes);\n }\n\n async loadLookupReferenceOptions(): Promise<void> {\n const lookupAttrs = this.editableAttributes().filter(a => a.lookupReferenceType);\n if (lookupAttrs.length === 0) return;\n\n const lookupNames = [...new Set(lookupAttrs.map(a => a.lookupReferenceType!))];\n const entries = await Promise.all(\n lookupNames.map(async name => {\n const ref = await this.sparkService.getLookupReference(name);\n return [name, ref] as [string, LookupReference];\n })\n );\n this.lookupReferenceOptions.set(this.toRecord(entries));\n }\n\n getReferenceOptions(attr: EntityAttributeDefinition): PersistentObject[] {\n return this.referenceOptions()[attr.name] || [];\n }\n\n getLookupOptions(attr: EntityAttributeDefinition): LookupReferenceValue[] {\n const lookupRef = attr.lookupReferenceType ? this.lookupReferenceOptions()[attr.lookupReferenceType] : null;\n return lookupRef?.values.filter(v => v.isActive) || [];\n }\n\n // LookupReference modal methods\n openLookupSelector(attr: EntityAttributeDefinition): void {\n this.editingLookupAttr.set(attr);\n this.lookupSearchTerm.set('');\n this.lookupModalItems.set(this.getLookupOptions(attr));\n this.showLookupModal.set(true);\n }\n\n selectLookupItem(item: LookupReferenceValue): void {\n const attr = this.editingLookupAttr();\n if (attr) {\n const data = { ...this.formData() };\n data[attr.name] = item.key;\n this.formData.set(data);\n }\n this.closeLookupModal();\n }\n\n closeLookupModal(): void {\n this.showLookupModal.set(false);\n this.editingLookupAttr.set(null);\n this.lookupModalItems.set([]);\n this.lookupSearchTerm.set('');\n }\n\n getEditRendererComponent(attr: EntityAttributeDefinition): Type<any> | null {\n if (!attr.renderer) return null;\n const reg = this.rendererRegistry.find(r => r.name === attr.renderer);\n return reg?.editComponent ?? null;\n }\n\n getEditRendererInputs(attr: EntityAttributeDefinition): Record<string, any> {\n return {\n value: this.formData()[attr.name],\n attribute: attr,\n options: attr.rendererOptions,\n valueChange: (newValue: any) => {\n const data = { ...this.formData() };\n data[attr.name] = newValue;\n this.formData.set(data);\n },\n };\n }\n\n hasError(attrName: string): boolean {\n return this.validationErrors().some(e => e.attributeName === attrName);\n }\n\n onFieldChange(): void {\n this.formData.set({ ...this.formData() });\n }\n\n onSave(): void {\n this.save.emit();\n }\n\n onCancel(): void {\n this.cancel.emit();\n }\n\n // AsDetail object modal methods\n openAsDetailEditor(attr: EntityAttributeDefinition): void {\n this.editingAsDetailAttr.set(attr);\n this.editingArrayIndex.set(null);\n this.asDetailFormData.set({ ...(this.formData()[attr.name] || {}) });\n this.showAsDetailModal.set(true);\n }\n\n saveAsDetailObject(): void {\n const attr = this.editingAsDetailAttr();\n if (attr) {\n const data = { ...this.formData() };\n if (attr.isArray) {\n const arr = [...(data[attr.name] || [])];\n const idx = this.editingArrayIndex();\n if (idx !== null) {\n arr[idx] = { ...this.asDetailFormData() };\n } else {\n arr.push({ ...this.asDetailFormData() });\n }\n data[attr.name] = arr;\n } else {\n data[attr.name] = { ...this.asDetailFormData() };\n }\n this.formData.set(data);\n }\n this.closeAsDetailModal();\n }\n\n closeAsDetailModal(): void {\n this.showAsDetailModal.set(false);\n this.editingAsDetailAttr.set(null);\n this.editingArrayIndex.set(null);\n this.asDetailFormData.set({});\n }\n\n // Inline AsDetail methods\n addInlineRow(attr: EntityAttributeDefinition): void {\n const data = { ...this.formData() };\n const arr = [...(data[attr.name] || [])];\n arr.push({});\n data[attr.name] = arr;\n this.formData.set(data);\n }\n\n // Array AsDetail methods\n addArrayItem(attr: EntityAttributeDefinition): void {\n this.editingAsDetailAttr.set(attr);\n this.editingArrayIndex.set(null);\n this.asDetailFormData.set({});\n this.showAsDetailModal.set(true);\n }\n\n editArrayItem(attr: EntityAttributeDefinition, index: number): void {\n this.editingAsDetailAttr.set(attr);\n this.editingArrayIndex.set(index);\n const arr = this.formData()[attr.name] || [];\n this.asDetailFormData.set({ ...(arr[index] || {}) });\n this.showAsDetailModal.set(true);\n }\n\n removeArrayItem(attr: EntityAttributeDefinition, index: number): void {\n const data = { ...this.formData() };\n const arr = [...(data[attr.name] || [])];\n arr.splice(index, 1);\n data[attr.name] = arr;\n this.formData.set(data);\n }\n\n // Reference modal methods\n async openReferenceSelector(attr: EntityAttributeDefinition): Promise<void> {\n this.editingReferenceAttr.set(attr);\n this.referenceSearchTerm = '';\n this.referenceModalItems.set(this.getReferenceOptions(attr));\n\n const types = await this.sparkService.getEntityTypes();\n this.referenceModalEntityType.set(types.find(t => t.clrType === attr.referenceType) || null);\n this.referenceModalSettings.set(new DatatableSettings({\n perPage: { values: [10, 25, 50], selected: 10 },\n page: { values: [1], selected: 1 },\n sortColumns: []\n }));\n this.applyReferenceFilter();\n this.showReferenceModal.set(true);\n }\n\n onReferenceSearchChange(): void {\n this.referenceModalSettings().page.selected = 1;\n this.applyReferenceFilter();\n }\n\n applyReferenceFilter(): void {\n let filteredItems = this.referenceModalItems();\n\n if (this.referenceSearchTerm.trim()) {\n const term = this.referenceSearchTerm.toLowerCase().trim();\n filteredItems = this.referenceModalItems().filter(item => {\n if (item.name?.toLowerCase().includes(term)) return true;\n if (item.breadcrumb?.toLowerCase().includes(term)) return true;\n return item.attributes.some(attr => {\n const value = attr.breadcrumb || attr.value;\n if (value == null) return false;\n return String(value).toLowerCase().includes(term);\n });\n });\n }\n\n const totalPages = Math.ceil(filteredItems.length / this.referenceModalSettings().perPage.selected) || 1;\n this.referenceModalPagination.set({\n data: filteredItems,\n totalRecords: filteredItems.length,\n totalPages: totalPages,\n perPage: this.referenceModalSettings().perPage.selected,\n page: this.referenceModalSettings().page.selected\n });\n\n this.referenceModalSettings().page.values = Array.from({ length: totalPages }, (_, i) => i + 1);\n\n if (this.referenceModalSettings().page.selected > totalPages) {\n this.referenceModalSettings().page.selected = 1;\n }\n }\n\n clearReferenceSearch(): void {\n this.referenceSearchTerm = '';\n this.onReferenceSearchChange();\n }\n\n selectReferenceItem(item: PersistentObject): void {\n const attr = this.editingReferenceAttr();\n if (attr) {\n const data = { ...this.formData() };\n data[attr.name] = item.id;\n this.formData.set(data);\n }\n this.closeReferenceModal();\n }\n\n closeReferenceModal(): void {\n this.showReferenceModal.set(false);\n this.editingReferenceAttr.set(null);\n this.referenceModalItems.set([]);\n this.referenceModalEntityType.set(null);\n this.referenceSearchTerm = '';\n }\n}\n","<bs-form>\n @if (entityType()) {\n <bs-grid>\n <bs-tab-control>\n @for (tab of resolvedTabs(); track tab.id) {\n <bs-tab-page>\n <ng-template bsTabPageHeader>{{ tab.label | resolveTranslation:tab.name }}</ng-template>\n <ng-container *ngTemplateOutlet=\"tabContent; context: { $implicit: tab }\"></ng-container>\n </bs-tab-page>\n }\n </bs-tab-control>\n\n <ng-template #tabContent let-tab>\n @if (tab.id === '__default__') {\n @if (ungroupedAttributes().length > 0) {\n <bs-card class=\"d-block m-3\">\n <div class=\"p-3\">\n @for (attr of ungroupedAttributes(); track attr.id) {\n <ng-container *ngTemplateOutlet=\"attrField; context: { $implicit: attr }\"></ng-container>\n }\n </div>\n </bs-card>\n }\n }\n @for (group of groupsForTab(tab); track group.id) {\n @if (attrsForGroup(group); as groupAttrs) {\n @if (groupAttrs.length > 0) {\n <bs-card class=\"d-block m-3\">\n @if (group.label) {\n <bs-card-header>{{ group.label | resolveTranslation:group.name }}</bs-card-header>\n }\n <div class=\"p-3\">\n @for (attr of groupAttrs; track attr.id) {\n <ng-container *ngTemplateOutlet=\"attrField; context: { $implicit: attr }\"></ng-container>\n }\n </div>\n </bs-card>\n }\n }\n }\n </ng-template>\n\n <ng-template #attrField let-attr>\n <div bsRow class=\"mb-3\">\n <label [md]=\"4\" bsColFormLabel [for]=\"attr.name\">\n {{ attr.label | resolveTranslation:attr.name }}\n @if (attr.isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n <div [md]=\"8\">\n @if (attr.dataType === 'boolean') {\n <bs-checkbox\n [ngModel]=\"formData()[attr.name]\"\n (ngModelChange)=\"formData()[attr.name] = $event; onFieldChange()\">\n </bs-checkbox>\n } @else if (attr.lookupReferenceType) {\n @if ((attr | lookupDisplayType:lookupReferenceOptions()) === ELookupDisplayType.Modal) {\n <bs-input-group>\n <input\n type=\"text\"\n [id]=\"attr.name\"\n [value]=\"attr | lookupDisplayValue:formData():lookupReferenceOptions()\"\n readonly\n [class.is-invalid]=\"hasError(attr.name)\">\n <button\n type=\"button\"\n bsInputGroupBtn\n [color]=\"colors.secondary\"\n (click)=\"openLookupSelector(attr)\">\n ...\n </button>\n </bs-input-group>\n } @else {\n <bs-select\n [ngModel]=\"formData()[attr.name]\"\n (ngModelChange)=\"formData()[attr.name] = $event; onFieldChange()\"\n [id]=\"attr.name\"\n [class.is-invalid]=\"hasError(attr.name)\">\n <option [ngValue]=\"null\">{{ 'common.selectPlaceholder' | t }}</option>\n @for (option of (attr | lookupOptions:lookupReferenceOptions()); track option.key) {\n <option [ngValue]=\"option.key\">\n {{ option.values | resolveTranslation:option.key }}\n </option>\n }\n </bs-select>\n }\n } @else if (attr.dataType === 'Reference' && attr.isArray) {\n <bs-tree-select\n mode=\"multiple\"\n variant=\"textbox\"\n [showClear]=\"true\"\n [placeholder]=\"'common.search' | t\"\n [provider]=\"getReferenceProvider(attr)\"\n [ngModel]=\"referenceTreeValues()[attr.name] || []\"\n (ngModelChange)=\"onReferenceTreeChange(attr, $event)\"\n [ngModelOptions]=\"{ standalone: true }\">\n </bs-tree-select>\n } @else if (attr.dataType === 'Reference') {\n <bs-input-group>\n <input\n type=\"text\"\n [id]=\"attr.name\"\n [value]=\"attr | referenceDisplayValue:formData():referenceOptions()\"\n readonly\n [class.is-invalid]=\"hasError(attr.name)\">\n <button\n type=\"button\"\n bsInputGroupBtn\n [color]=\"colors.secondary\"\n (click)=\"openReferenceSelector(attr)\">\n ...\n </button>\n </bs-input-group>\n } @else if (attr.dataType === 'AsDetail' && attr.isArray && attr.editMode === 'inline') {\n <bs-table [isResponsive]=\"true\" class=\"mb-1\">\n <thead>\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <th>{{ col.label | resolveTranslation:col.name }}</th>\n }\n <th style=\"width: 50px\"></th>\n </tr>\n </thead>\n <tbody class=\"align-middle\">\n @for (row of formData()[attr.name] || []; track $index) {\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <td>\n @if (col.dataType === 'boolean') {\n <bs-checkbox\n [(ngModel)]=\"row[col.name]\"\n (ngModelChange)=\"onFieldChange()\">\n </bs-checkbox>\n } @else if (col.dataType === 'Reference' && col.query) {\n <bs-select\n [(ngModel)]=\"row[col.name]\"\n (ngModelChange)=\"onFieldChange()\">\n <option [ngValue]=\"null\">{{ 'common.selectPlaceholder' | t }}</option>\n @for (option of (attr | inlineRefOptions:col:asDetailReferenceOptions()); track option.id) {\n <option [ngValue]=\"option.id\">\n {{ option.breadcrumb || option.name || option.id }}\n </option>\n }\n </bs-select>\n } @else {\n <input\n [type]=\"col.dataType | inputType\"\n [(ngModel)]=\"row[col.name]\"\n [required]=\"col.isRequired\"\n [step]=\"col.dataType === 'decimal' ? '0.01' : '1'\"\n (ngModelChange)=\"onFieldChange()\">\n }\n </td>\n }\n <td class=\"text-nowrap\">\n @if (attr | canDeleteDetailRow:asDetailPermissions()) {\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"removeArrayItem(attr, $index)\">\n <spark-icon name=\"trash\" />\n </button>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td [attr.colspan]=\"(attr | asDetailColumns:asDetailTypes()).length + 1\" class=\"text-center text-muted\">\n {{ 'common.noItemsFound' | t }}\n </td>\n </tr>\n }\n </tbody>\n </bs-table>\n @if (attr | canCreateDetailRow:asDetailPermissions()) {\n <button type=\"button\" [color]=\"colors.primary\" class=\"w-100 rounded-0\" (click)=\"addInlineRow(attr)\">\n <spark-icon name=\"plus\" /> {{ 'common.add' | t }}\n </button>\n }\n } @else if (attr.dataType === 'AsDetail' && attr.isArray) {\n <bs-table [isResponsive]=\"true\" class=\"mb-1\">\n <thead>\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <th>{{ col.label | resolveTranslation:col.name }}</th>\n }\n <th style=\"width: 80px\"></th>\n </tr>\n </thead>\n <tbody class=\"align-middle\">\n @for (row of formData()[attr.name] || []; track $index) {\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <td>{{ row | asDetailCellValue:attr:col:asDetailReferenceOptions() }}</td>\n }\n <td class=\"text-nowrap\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-secondary me-1\" (click)=\"editArrayItem(attr, $index)\">\n <spark-icon name=\"pencil\" />\n </button>\n @if (attr | canDeleteDetailRow:asDetailPermissions()) {\n <button type=\"button\" class=\"btn btn-sm btn-outline-danger\" (click)=\"removeArrayItem(attr, $index)\">\n <spark-icon name=\"trash\" />\n </button>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td [attr.colspan]=\"(attr | asDetailColumns:asDetailTypes()).length + 1\" class=\"text-center text-muted\">\n {{ 'common.noItemsFound' | t }}\n </td>\n </tr>\n }\n </tbody>\n </bs-table>\n @if (attr | canCreateDetailRow:asDetailPermissions()) {\n <button type=\"button\" [color]=\"colors.primary\" class=\"w-100 rounded-0\" (click)=\"addArrayItem(attr)\">\n <spark-icon name=\"plus\" /> {{ 'common.add' | t }}\n </button>\n }\n } @else if (attr.dataType === 'AsDetail') {\n <bs-input-group>\n <input\n type=\"text\"\n [id]=\"attr.name\"\n [value]=\"attr | asDetailDisplayValue:formData():asDetailTypes()\"\n readonly\n [class.is-invalid]=\"hasError(attr.name)\">\n <button\n type=\"button\"\n bsInputGroupBtn\n [color]=\"colors.secondary\"\n (click)=\"openAsDetailEditor(attr)\">\n <spark-icon name=\"pencil\" />\n </button>\n </bs-input-group>\n } @else if (getEditRendererComponent(attr); as editComp) {\n <ng-container *ngComponentOutlet=\"editComp; inputs: getEditRendererInputs(attr)\"></ng-container>\n } @else {\n <input\n [type]=\"attr.dataType | inputType\"\n [id]=\"attr.name\"\n [ngModel]=\"formData()[attr.name]\"\n (ngModelChange)=\"formData()[attr.name] = $event; onFieldChange()\"\n [name]=\"attr.name\"\n [required]=\"attr.isRequired\"\n [step]=\"attr.dataType === 'decimal' ? '0.01' : '1'\"\n [class.is-invalid]=\"hasError(attr.name)\">\n }\n @if (attr.name | errorForAttribute:validationErrors(); as errorMsg) {\n <div class=\"invalid-feedback d-block\">\n {{ errorMsg }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n @if (showButtons()) {\n <div bsRow class=\"mt-4\">\n <div [md]=\"4\"></div>\n <div [md]=\"8\" class=\"d-flex justify-content-end gap-2\">\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"onCancel()\" [disabled]=\"isSaving()\">{{ 'common.cancel' | t }}</button>\n <button type=\"submit\" [color]=\"colors.primary\" [disabled]=\"isSaving()\" (click)=\"onSave()\">\n @if (isSaving()) {\n <bs-spinner class=\"me-1\" />\n }\n {{ 'common.save' | t }}\n </button>\n </div>\n </div>\n }\n </bs-grid>\n}\n\n<!-- Modal for editing AsDetail objects -->\n<bs-modal [isOpen]=\"showAsDetailModal()\" (isOpenChange)=\"!$event && closeAsDetailModal()\">\n <div *bsModal>\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ 'common.edit' | t }} {{ editingAsDetailAttr()?.label | resolveTranslation:editingAsDetailAttr()?.name }}</h5>\n </div>\n\n @if (editingAsDetailAttr(); as attr) {\n <div bsModalBody>\n <spark-po-form\n [entityType]=\"attr | asDetailType:asDetailTypes()\"\n [(formData)]=\"asDetailFormData\"\n [parentId]=\"parentId()\"\n [parentType]=\"parentType()\">\n </spark-po-form>\n </div>\n }\n\n <div bsModalFooter>\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"closeAsDetailModal()\">{{ 'common.cancel' | t }}</button>\n <button type=\"button\" [color]=\"colors.primary\" (click)=\"saveAsDetailObject()\">{{ 'common.save' | t }}</button>\n </div>\n </div>\n</bs-modal>\n\n<!-- Modal for selecting Reference items -->\n<bs-modal [isOpen]=\"showReferenceModal()\" (isOpenChange)=\"!$event && closeReferenceModal()\">\n <div *bsModal class=\"reference-modal\">\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ 'common.select' | t }} {{ editingReferenceAttr()?.label | resolveTranslation:editingReferenceAttr()?.name }}</h5>\n </div>\n\n <div bsModalBody>\n @if (referenceModalEntityType()) {\n <!-- Search box -->\n <bs-grid>\n <div bsRow class=\"mb-3\">\n <div [md]=\"6\">\n <bs-input-group>\n <span class=\"input-group-text\">\n <spark-icon name=\"search\" />\n </span>\n <input\n type=\"text\"\n [placeholder]=\"'common.search' | t\"\n [(ngModel)]=\"referenceSearchTerm\"\n (ngModelChange)=\"onReferenceSearchChange()\">\n @if (referenceSearchTerm) {\n <button\n type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"clearReferenceSearch()\">\n <spark-icon name=\"x-lg\" />\n </button>\n }\n </bs-input-group>\n </div>\n <div [md]=\"6\" class=\"text-end\">\n @if (referenceSearchTerm && referenceModalPagination()) {\n <span class=\"text-muted\">\n {{ referenceModalPagination()!.totalRecords }} {{ referenceModalPagination()!.totalRecords === 1 ? ('common.resultFound' | t) : ('common.resultsFound' | t) }}\n </span>\n }\n </div>\n </div>\n </bs-grid>\n\n <bs-datatable\n [(settings)]=\"referenceModalSettings\"\n [data]=\"referenceModalRows()\"\n (rowClick)=\"selectReferenceItem($event.row)\">\n @for (attr of referenceVisibleAttributes(); track attr.id) {\n <div *bsDatatableColumn=\"attr.name; sortable: true\">\n {{ attr.label | resolveTranslation:attr.name }}\n </div>\n }\n\n <ng-container *bsRowTemplate=\"let item\">\n @for (attr of referenceVisibleAttributes(); track attr.id) {\n <td>{{ $any(item) | referenceAttrValue:attr.name }}</td>\n }\n </ng-container>\n </bs-datatable>\n } @else {\n <div class=\"text-center p-3\">\n <bs-spinner />\n </div>\n }\n </div>\n\n <div bsModalFooter>\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"closeReferenceModal()\">{{ 'common.cancel' | t }}</button>\n </div>\n </div>\n</bs-modal>\n\n<!-- Modal for selecting LookupReference items -->\n<bs-modal [isOpen]=\"showLookupModal()\" (isOpenChange)=\"!$event && closeLookupModal()\">\n <div *bsModal>\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ 'common.select' | t }} {{ editingLookupAttr()?.label | resolveTranslation:editingLookupAttr()?.name }}</h5>\n </div>\n\n <div bsModalBody>\n <!-- Search box -->\n <bs-grid>\n <div bsRow class=\"mb-3\">\n <div [col]>\n <bs-input-group>\n <span class=\"input-group-text\">\n <spark-icon name=\"search\" />\n </span>\n <input\n type=\"text\"\n [placeholder]=\"'common.search' | t\"\n [ngModel]=\"lookupSearchTerm()\"\n (ngModelChange)=\"lookupSearchTerm.set($event)\">\n @if (lookupSearchTerm()) {\n <button\n type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"lookupSearchTerm.set('')\">\n <spark-icon name=\"x-lg\" />\n </button>\n }\n </bs-input-group>\n </div>\n </div>\n </bs-grid>\n\n <!-- List of items -->\n <bs-table [striped]=\"true\" [hover]=\"true\">\n <tbody class=\"align-middle\">\n @for (item of filteredLookupItems(); track item.key) {\n <tr\n [class.table-primary]=\"formData()[editingLookupAttr()?.name ?? ''] === item.key\"\n (click)=\"selectLookupItem(item)\"\n style=\"cursor: pointer;\">\n <td>{{ item.values | resolveTranslation:item.key }}</td>\n </tr>\n } @empty {\n <tr>\n <td class=\"text-center text-muted\">{{ 'common.noItemsFound' | t }}</td>\n </tr>\n }\n </tbody>\n </bs-table>\n </div>\n\n <div bsModalFooter>\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"closeLookupModal()\">{{ 'common.cancel' | t }}</button>\n </div>\n </div>\n</bs-modal>\n</bs-form>\n","/**\n * Generated bundle index.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AA,EAAA,MAAA,EAAA,IAAA,EAAE,qBAAqB,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIpiC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,sBAAsB,EAAE,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,kBAAkB,EAAA,oBAAA,EAAwB,gBAAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,CAAC,EAAA,eAAA,EAE/hC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,y1jBAAA,EAAA;;;AE5DjD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-spark-po-form.mjs","sources":["../../po-form/src/spark-po-form.component.ts","../../po-form/src/spark-po-form.component.html","../../po-form/mintplayer-ng-spark-po-form.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input, model, output, signal, effect, Type } from '@angular/core';\nimport { CommonModule, NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { BsCardComponent, BsCardHeaderComponent } from '@mintplayer/ng-bootstrap/card';\nimport { BsFormComponent, BsFormControlDirective } from '@mintplayer/ng-bootstrap/form';\nimport { BsGridComponent, BsGridRowDirective, BsGridColumnDirective, BsGridColDirective, BsColFormLabelDirective } from '@mintplayer/ng-bootstrap/grid';\nimport { BsInputGroupComponent } from '@mintplayer/ng-bootstrap/input-group';\nimport { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';\nimport { BsSelectComponent, BsSelectOption } from '@mintplayer/ng-bootstrap/select';\nimport { BsTreeSelectComponent, InMemoryTreeSelectProvider, TreeNode } from '@mintplayer/ng-bootstrap/tree-select';\nimport { BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective } from '@mintplayer/ng-bootstrap/modal';\nimport { BsDatatableComponent, BsDatatableColumnDirective, BsRowTemplateDirective, DatatableSettings } from '@mintplayer/ng-bootstrap/datatable';\nimport { BsCheckboxComponent } from '@mintplayer/ng-bootstrap/checkbox';\nimport { BsSpinnerComponent } from '@mintplayer/ng-bootstrap/spinner';\nimport { BsTabControlComponent, BsTabPageComponent, BsTabPageHeaderDirective } from '@mintplayer/ng-bootstrap/tab-control';\nimport { BsTableComponent } from '@mintplayer/ng-bootstrap/table';\nimport { PaginationResponse } from '@mintplayer/pagination';\nimport { SparkService, SparkLanguageService } from '@mintplayer/ng-spark/services';\nimport {\n TranslateKeyPipe,\n ResolveTranslationPipe,\n InputTypePipe,\n LookupDisplayValuePipe,\n LookupDisplayTypePipe,\n LookupOptionsPipe,\n ReferenceDisplayValuePipe,\n AsDetailDisplayValuePipe,\n AsDetailTypePipe,\n AsDetailColumnsPipe,\n AsDetailCellValuePipe,\n CanCreateDetailRowPipe,\n CanDeleteDetailRowPipe,\n InlineRefOptionsPipe,\n ReferenceAttrValuePipe,\n ErrorForAttributePipe,\n} from '@mintplayer/ng-spark/pipes';\nimport {\n ELookupDisplayType,\n EntityPermissions,\n EntityType,\n EntityAttributeDefinition,\n AttributeTab,\n AttributeGroup,\n LookupReference,\n LookupReferenceValue,\n PersistentObject,\n PersistentObjectAttribute,\n ValidationError,\n ShowedOn,\n hasShowedOnFlag,\n resolveTranslation,\n} from '@mintplayer/ng-spark/models';\nimport { SparkIconComponent } from '@mintplayer/ng-spark/icon';\nimport { SPARK_ATTRIBUTE_RENDERERS } from '@mintplayer/ng-spark/renderers';\n\n@Component({\n selector: 'spark-po-form',\n imports: [CommonModule, NgTemplateOutlet, NgComponentOutlet, FormsModule, BsCardComponent, BsCardHeaderComponent, BsFormComponent, BsFormControlDirective, BsGridComponent, BsGridRowDirective, BsGridColumnDirective, BsGridColDirective, BsColFormLabelDirective, BsButtonTypeDirective, BsInputGroupComponent, BsSelectComponent, BsSelectOption, BsTreeSelectComponent, BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective, BsDatatableComponent, BsDatatableColumnDirective, BsRowTemplateDirective, BsTableComponent, BsCheckboxComponent, BsSpinnerComponent, BsTabControlComponent, BsTabPageComponent, BsTabPageHeaderDirective, SparkIconComponent, SparkPoFormComponent, TranslateKeyPipe, ResolveTranslationPipe, InputTypePipe, LookupDisplayValuePipe, LookupDisplayTypePipe, LookupOptionsPipe, ReferenceDisplayValuePipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AsDetailColumnsPipe, AsDetailCellValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, InlineRefOptionsPipe, ReferenceAttrValuePipe, ErrorForAttributePipe],\n templateUrl: './spark-po-form.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SparkPoFormComponent {\n private readonly sparkService = inject(SparkService);\n private readonly translations = inject(SparkLanguageService);\n private readonly rendererRegistry = inject(SPARK_ATTRIBUTE_RENDERERS);\n\n entityType = input<EntityType | null>(null);\n formData = model<Record<string, any>>({});\n validationErrors = input<ValidationError[]>([]);\n showButtons = input(false);\n isSaving = input(false);\n parentId = input<string | undefined>(undefined);\n parentType = input<string | undefined>(undefined);\n\n save = output<void>();\n cancel = output<void>();\n\n colors = Color;\n referenceOptions = signal<Record<string, PersistentObject[]>>({});\n\n // Multi-reference (Reference && isArray) editor state. Built from the same query\n // results as referenceOptions: a flat TreeNode list per attribute drives an\n // InMemoryTreeSelectProvider (the <bs-tree-select> data port), and a node lookup\n // resolves selected ids back to chip labels.\n referenceProviders = signal<Record<string, InMemoryTreeSelectProvider>>({});\n referenceNodes = signal<Record<string, Record<string, TreeNode>>>({});\n asDetailTypes = signal<Record<string, EntityType>>({});\n lookupReferenceOptions = signal<Record<string, LookupReference>>({});\n\n // Modal state for AsDetail object editing\n editingAsDetailAttr = signal<EntityAttributeDefinition | null>(null);\n asDetailFormData = signal<Record<string, any>>({});\n showAsDetailModal = signal(false);\n editingArrayIndex = signal<number | null>(null);\n\n // Permissions for array AsDetail entity types\n asDetailPermissions = signal<Record<string, EntityPermissions>>({});\n\n // Reference options for columns within array AsDetail types (keyed by parent attr name, then column name)\n asDetailReferenceOptions = signal<Record<string, Record<string, PersistentObject[]>>>({});\n\n // Modal state for Reference selection\n editingReferenceAttr = signal<EntityAttributeDefinition | null>(null);\n showReferenceModal = signal(false);\n referenceModalItems = signal<PersistentObject[]>([]);\n referenceModalEntityType = signal<EntityType | null>(null);\n referenceModalPagination = signal<PaginationResponse<PersistentObject> | undefined>(undefined);\n referenceModalSettings = signal(new DatatableSettings({\n perPage: { values: [10, 25, 50], selected: 10 },\n page: { values: [1], selected: 1 },\n sortColumns: []\n }));\n referenceSearchTerm = '';\n\n // Modal state for LookupReference selection (Modal display type)\n editingLookupAttr = signal<EntityAttributeDefinition | null>(null);\n showLookupModal = signal(false);\n lookupModalItems = signal<LookupReferenceValue[]>([]);\n lookupSearchTerm = signal('');\n ELookupDisplayType = ELookupDisplayType;\n\n editableAttributes = computed(() => {\n return this.entityType()?.attributes\n .filter(a => a.isVisible && !a.isReadOnly && hasShowedOnFlag(a.showedOn, ShowedOn.PersistentObject))\n .sort((a, b) => a.order - b.order) || [];\n });\n\n private static readonly DEFAULT_TAB: AttributeTab = { id: '__default__', name: 'Algemeen', label: { nl: 'Algemeen', en: 'General' }, order: 0 };\n\n ungroupedAttributes = computed(() => {\n const attrs = this.editableAttributes();\n const groupIds = new Set((this.entityType()?.groups || []).map(g => g.id));\n return attrs.filter(a => !a.group || !groupIds.has(a.group));\n });\n\n resolvedTabs = computed((): AttributeTab[] => {\n const et = this.entityType();\n const definedTabs = et?.tabs?.length ? [...et.tabs].sort((a, b) => a.order - b.order) : [];\n const hasUngroupedAttrs = this.ungroupedAttributes().length > 0;\n const hasUntabbedGroups = (et?.groups || []).some(g => !g.tab);\n\n if (hasUngroupedAttrs || hasUntabbedGroups || definedTabs.length === 0) {\n return [SparkPoFormComponent.DEFAULT_TAB, ...definedTabs];\n }\n return definedTabs;\n });\n\n groupsForTab(tab: AttributeTab): AttributeGroup[] {\n const groups = this.entityType()?.groups || [];\n if (tab.id === '__default__') {\n return groups.filter(g => !g.tab).sort((a, b) => a.order - b.order);\n }\n return groups.filter(g => g.tab === tab.id).sort((a, b) => a.order - b.order);\n }\n\n attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[] {\n return this.editableAttributes().filter(a => a.group === group.id);\n }\n\n referenceVisibleAttributes = computed(() => {\n return this.referenceModalEntityType()?.attributes\n .filter(a => a.isVisible)\n .sort((a, b) => a.order - b.order) || [];\n });\n\n // Typed rows for the reference-modal datatable so its generic infers\n // PersistentObject (a `?? []` inline binding would degrade to `unknown`).\n referenceModalRows = computed<PersistentObject[]>(() => this.referenceModalPagination()?.data ?? []);\n\n filteredLookupItems = computed(() => {\n if (!this.lookupSearchTerm().trim()) {\n return this.lookupModalItems();\n }\n const term = this.lookupSearchTerm().toLowerCase().trim();\n return this.lookupModalItems().filter(item => {\n const translation = resolveTranslation(item.values);\n return translation.toLowerCase().includes(term) || item.key.toLowerCase().includes(term);\n });\n });\n\n constructor() {\n effect(() => {\n const et = this.entityType();\n const _pid = this.parentId();\n const _ptype = this.parentType();\n if (et) {\n this.loadReferenceOptions();\n this.loadAsDetailTypes();\n this.loadLookupReferenceOptions();\n }\n });\n }\n\n private toRecord<T>(entries: [string, T][]): Record<string, T> {\n const result: Record<string, T> = {};\n for (const [key, value] of entries) {\n result[key] = value;\n }\n return result;\n }\n\n async loadReferenceOptions(): Promise<void> {\n const refAttrs = this.editableAttributes().filter(a => a.dataType === 'Reference' && a.query);\n if (refAttrs.length === 0) return;\n\n const entries = await Promise.all(\n refAttrs.filter(a => a.query).map(async attr => {\n const result = await this.sparkService.executeQueryByName(attr.query!, {\n parentId: this.parentId(),\n parentType: this.parentType(),\n });\n return [attr.name, result.data] as [string, PersistentObject[]];\n })\n );\n const optionsByAttr = this.toRecord(entries);\n this.referenceOptions.set(optionsByAttr);\n\n // For multi-reference attributes (Reference && isArray), turn each query result\n // into a flat TreeNode list + an in-memory provider for <bs-tree-select>, and a\n // by-id node map used to render chip labels for the current selection.\n const providers: Record<string, InMemoryTreeSelectProvider> = {};\n const nodesByAttr: Record<string, Record<string, TreeNode>> = {};\n for (const attr of refAttrs) {\n if (!attr.isArray) continue;\n const pos = optionsByAttr[attr.name] || [];\n const nodes: TreeNode[] = pos\n .filter(po => !!po.id)\n .map(po => ({ id: po.id!, label: po.breadcrumb || po.name || po.id! }));\n providers[attr.name] = new InMemoryTreeSelectProvider(nodes);\n nodesByAttr[attr.name] = this.toRecord(nodes.map(n => [n.id, n] as [string, TreeNode]));\n }\n this.referenceProviders.set(providers);\n this.referenceNodes.set(nodesByAttr);\n }\n\n /**\n * Stable TreeNode[] value per multi-reference attribute, derived from the id array\n * in formData and the resolved node map. Recomputes only when formData or the node\n * map changes, so binding it into <bs-tree-select> doesn't churn on every CD pass.\n * Ids without a resolved node fall back to a label of the id itself.\n */\n referenceTreeValues = computed<Record<string, TreeNode[]>>(() => {\n const fd = this.formData();\n const nodesByAttr = this.referenceNodes();\n const result: Record<string, TreeNode[]> = {};\n for (const attr of this.editableAttributes()) {\n if (attr.dataType !== 'Reference' || !attr.isArray) continue;\n const ids: string[] = Array.isArray(fd[attr.name]) ? fd[attr.name] : [];\n const nodeMap = nodesByAttr[attr.name] || {};\n result[attr.name] = ids.map(id => nodeMap[id] ?? { id, label: id });\n }\n return result;\n });\n\n getReferenceProvider(attr: EntityAttributeDefinition): InMemoryTreeSelectProvider | undefined {\n return this.referenceProviders()[attr.name];\n }\n\n onReferenceTreeChange(attr: EntityAttributeDefinition, value: TreeNode | TreeNode[] | null): void {\n const nodes = Array.isArray(value) ? value : value ? [value] : [];\n const data = { ...this.formData() };\n data[attr.name] = nodes.map(n => n.id);\n this.formData.set(data);\n }\n\n async loadAsDetailTypes(): Promise<void> {\n const asDetailAttrs = this.editableAttributes().filter(a => a.dataType === 'AsDetail' && a.asDetailType);\n if (asDetailAttrs.length === 0) return;\n\n const types = await this.sparkService.getEntityTypes();\n const newAsDetailTypes: Record<string, EntityType> = {};\n\n for (const attr of asDetailAttrs) {\n const asDetailType = types.find(t => t.clrType === attr.asDetailType);\n if (asDetailType) {\n newAsDetailTypes[attr.name] = asDetailType;\n\n if (attr.isArray) {\n const perms = await this.sparkService.getPermissions(asDetailType.id);\n this.asDetailPermissions.update(prev => ({ ...prev, [attr.name]: perms }));\n\n const refCols = asDetailType.attributes.filter(a => a.dataType === 'Reference' && a.query);\n if (refCols.length > 0) {\n const refEntries = await Promise.all(\n refCols.filter(c => c.query).map(async col => {\n const result = await this.sparkService.executeQueryByName(col.query!, {\n parentId: this.parentId(),\n parentType: this.parentType(),\n });\n return [col.name, result.data] as [string, PersistentObject[]];\n })\n );\n this.asDetailReferenceOptions.update(prev => ({ ...prev, [attr.name]: this.toRecord(refEntries) }));\n }\n }\n }\n }\n this.asDetailTypes.set(newAsDetailTypes);\n }\n\n async loadLookupReferenceOptions(): Promise<void> {\n const lookupAttrs = this.editableAttributes().filter(a => a.lookupReferenceType);\n if (lookupAttrs.length === 0) return;\n\n const lookupNames = [...new Set(lookupAttrs.map(a => a.lookupReferenceType!))];\n const entries = await Promise.all(\n lookupNames.map(async name => {\n const ref = await this.sparkService.getLookupReference(name);\n return [name, ref] as [string, LookupReference];\n })\n );\n this.lookupReferenceOptions.set(this.toRecord(entries));\n }\n\n getReferenceOptions(attr: EntityAttributeDefinition): PersistentObject[] {\n return this.referenceOptions()[attr.name] || [];\n }\n\n getLookupOptions(attr: EntityAttributeDefinition): LookupReferenceValue[] {\n const lookupRef = attr.lookupReferenceType ? this.lookupReferenceOptions()[attr.lookupReferenceType] : null;\n return lookupRef?.values.filter(v => v.isActive) || [];\n }\n\n // LookupReference modal methods\n openLookupSelector(attr: EntityAttributeDefinition): void {\n this.editingLookupAttr.set(attr);\n this.lookupSearchTerm.set('');\n this.lookupModalItems.set(this.getLookupOptions(attr));\n this.showLookupModal.set(true);\n }\n\n selectLookupItem(item: LookupReferenceValue): void {\n const attr = this.editingLookupAttr();\n if (attr) {\n const data = { ...this.formData() };\n data[attr.name] = item.key;\n this.formData.set(data);\n }\n this.closeLookupModal();\n }\n\n closeLookupModal(): void {\n this.showLookupModal.set(false);\n this.editingLookupAttr.set(null);\n this.lookupModalItems.set([]);\n this.lookupSearchTerm.set('');\n }\n\n getEditRendererComponent(attr: EntityAttributeDefinition): Type<any> | null {\n if (!attr.renderer) return null;\n const reg = this.rendererRegistry.find(r => r.name === attr.renderer);\n return reg?.editComponent ?? null;\n }\n\n getEditRendererInputs(attr: EntityAttributeDefinition): Record<string, any> {\n return {\n value: this.formData()[attr.name],\n attribute: attr,\n options: attr.rendererOptions,\n valueChange: (newValue: any) => {\n const data = { ...this.formData() };\n data[attr.name] = newValue;\n this.formData.set(data);\n },\n };\n }\n\n /** Column renderer for a cell of an AsDetail sub-table (so embedded rows honor `col.renderer` too). */\n getAsDetailCellRendererComponent(col: EntityAttributeDefinition): Type<any> | null {\n if (!col.renderer) return null;\n return this.rendererRegistry.find(r => r.name === col.renderer)?.columnComponent ?? null;\n }\n\n getAsDetailCellRendererInputs(row: Record<string, any>, col: EntityAttributeDefinition): Record<string, any> {\n return {\n value: row[col.name],\n attribute: col,\n options: col.rendererOptions,\n };\n }\n\n hasError(attrName: string): boolean {\n return this.validationErrors().some(e => e.attributeName === attrName);\n }\n\n onFieldChange(): void {\n this.formData.set({ ...this.formData() });\n }\n\n onSave(): void {\n this.save.emit();\n }\n\n onCancel(): void {\n this.cancel.emit();\n }\n\n // AsDetail object modal methods\n openAsDetailEditor(attr: EntityAttributeDefinition): void {\n this.editingAsDetailAttr.set(attr);\n this.editingArrayIndex.set(null);\n this.asDetailFormData.set({ ...(this.formData()[attr.name] || {}) });\n this.showAsDetailModal.set(true);\n }\n\n saveAsDetailObject(): void {\n const attr = this.editingAsDetailAttr();\n if (attr) {\n const data = { ...this.formData() };\n if (attr.isArray) {\n const arr = [...(data[attr.name] || [])];\n const idx = this.editingArrayIndex();\n if (idx !== null) {\n arr[idx] = { ...this.asDetailFormData() };\n } else {\n arr.push({ ...this.asDetailFormData() });\n }\n data[attr.name] = arr;\n } else {\n data[attr.name] = { ...this.asDetailFormData() };\n }\n this.formData.set(data);\n }\n this.closeAsDetailModal();\n }\n\n closeAsDetailModal(): void {\n this.showAsDetailModal.set(false);\n this.editingAsDetailAttr.set(null);\n this.editingArrayIndex.set(null);\n this.asDetailFormData.set({});\n }\n\n // Inline AsDetail methods\n addInlineRow(attr: EntityAttributeDefinition): void {\n const data = { ...this.formData() };\n const arr = [...(data[attr.name] || [])];\n arr.push({});\n data[attr.name] = arr;\n this.formData.set(data);\n }\n\n // Array AsDetail methods\n addArrayItem(attr: EntityAttributeDefinition): void {\n this.editingAsDetailAttr.set(attr);\n this.editingArrayIndex.set(null);\n this.asDetailFormData.set({});\n this.showAsDetailModal.set(true);\n }\n\n editArrayItem(attr: EntityAttributeDefinition, index: number): void {\n this.editingAsDetailAttr.set(attr);\n this.editingArrayIndex.set(index);\n const arr = this.formData()[attr.name] || [];\n this.asDetailFormData.set({ ...(arr[index] || {}) });\n this.showAsDetailModal.set(true);\n }\n\n removeArrayItem(attr: EntityAttributeDefinition, index: number): void {\n const data = { ...this.formData() };\n const arr = [...(data[attr.name] || [])];\n arr.splice(index, 1);\n data[attr.name] = arr;\n this.formData.set(data);\n }\n\n // Reference modal methods\n async openReferenceSelector(attr: EntityAttributeDefinition): Promise<void> {\n this.editingReferenceAttr.set(attr);\n this.referenceSearchTerm = '';\n this.referenceModalItems.set(this.getReferenceOptions(attr));\n\n const types = await this.sparkService.getEntityTypes();\n this.referenceModalEntityType.set(types.find(t => t.clrType === attr.referenceType) || null);\n this.referenceModalSettings.set(new DatatableSettings({\n perPage: { values: [10, 25, 50], selected: 10 },\n page: { values: [1], selected: 1 },\n sortColumns: []\n }));\n this.applyReferenceFilter();\n this.showReferenceModal.set(true);\n }\n\n onReferenceSearchChange(): void {\n this.referenceModalSettings().page.selected = 1;\n this.applyReferenceFilter();\n }\n\n applyReferenceFilter(): void {\n let filteredItems = this.referenceModalItems();\n\n if (this.referenceSearchTerm.trim()) {\n const term = this.referenceSearchTerm.toLowerCase().trim();\n filteredItems = this.referenceModalItems().filter(item => {\n if (item.name?.toLowerCase().includes(term)) return true;\n if (item.breadcrumb?.toLowerCase().includes(term)) return true;\n return item.attributes.some(attr => {\n const value = attr.breadcrumb || attr.value;\n if (value == null) return false;\n return String(value).toLowerCase().includes(term);\n });\n });\n }\n\n const totalPages = Math.ceil(filteredItems.length / this.referenceModalSettings().perPage.selected) || 1;\n this.referenceModalPagination.set({\n data: filteredItems,\n totalRecords: filteredItems.length,\n totalPages: totalPages,\n perPage: this.referenceModalSettings().perPage.selected,\n page: this.referenceModalSettings().page.selected\n });\n\n this.referenceModalSettings().page.values = Array.from({ length: totalPages }, (_, i) => i + 1);\n\n if (this.referenceModalSettings().page.selected > totalPages) {\n this.referenceModalSettings().page.selected = 1;\n }\n }\n\n clearReferenceSearch(): void {\n this.referenceSearchTerm = '';\n this.onReferenceSearchChange();\n }\n\n selectReferenceItem(item: PersistentObject): void {\n const attr = this.editingReferenceAttr();\n if (attr) {\n const data = { ...this.formData() };\n data[attr.name] = item.id;\n this.formData.set(data);\n }\n this.closeReferenceModal();\n }\n\n closeReferenceModal(): void {\n this.showReferenceModal.set(false);\n this.editingReferenceAttr.set(null);\n this.referenceModalItems.set([]);\n this.referenceModalEntityType.set(null);\n this.referenceSearchTerm = '';\n }\n}\n","<bs-form>\n @if (entityType()) {\n <bs-grid>\n <bs-tab-control>\n @for (tab of resolvedTabs(); track tab.id) {\n <bs-tab-page>\n <ng-template bsTabPageHeader>{{ tab.label | resolveTranslation:tab.name }}</ng-template>\n <ng-container *ngTemplateOutlet=\"tabContent; context: { $implicit: tab }\"></ng-container>\n </bs-tab-page>\n }\n </bs-tab-control>\n\n <ng-template #tabContent let-tab>\n @if (tab.id === '__default__') {\n @if (ungroupedAttributes().length > 0) {\n <bs-card class=\"d-block m-3\">\n <div class=\"p-3\">\n @for (attr of ungroupedAttributes(); track attr.id) {\n <ng-container *ngTemplateOutlet=\"attrField; context: { $implicit: attr }\"></ng-container>\n }\n </div>\n </bs-card>\n }\n }\n @for (group of groupsForTab(tab); track group.id) {\n @if (attrsForGroup(group); as groupAttrs) {\n @if (groupAttrs.length > 0) {\n <bs-card class=\"d-block m-3\">\n @if (group.label) {\n <bs-card-header>{{ group.label | resolveTranslation:group.name }}</bs-card-header>\n }\n <div class=\"p-3\">\n @for (attr of groupAttrs; track attr.id) {\n <ng-container *ngTemplateOutlet=\"attrField; context: { $implicit: attr }\"></ng-container>\n }\n </div>\n </bs-card>\n }\n }\n }\n </ng-template>\n\n <ng-template #attrField let-attr>\n <div bsRow class=\"mb-3\">\n <label [md]=\"4\" bsColFormLabel [for]=\"attr.name\">\n {{ attr.label | resolveTranslation:attr.name }}\n @if (attr.isRequired) {\n <span class=\"text-danger\">*</span>\n }\n </label>\n <div [md]=\"8\">\n @if (attr.dataType === 'boolean') {\n <bs-checkbox\n [ngModel]=\"formData()[attr.name]\"\n (ngModelChange)=\"formData()[attr.name] = $event; onFieldChange()\">\n </bs-checkbox>\n } @else if (attr.lookupReferenceType) {\n @if ((attr | lookupDisplayType:lookupReferenceOptions()) === ELookupDisplayType.Modal) {\n <bs-input-group>\n <input\n type=\"text\"\n [id]=\"attr.name\"\n [value]=\"attr | lookupDisplayValue:formData():lookupReferenceOptions()\"\n readonly\n [class.is-invalid]=\"hasError(attr.name)\">\n <button\n type=\"button\"\n bsInputGroupBtn\n [color]=\"colors.secondary\"\n (click)=\"openLookupSelector(attr)\">\n ...\n </button>\n </bs-input-group>\n } @else {\n <bs-select\n [ngModel]=\"formData()[attr.name]\"\n (ngModelChange)=\"formData()[attr.name] = $event; onFieldChange()\"\n [id]=\"attr.name\"\n [class.is-invalid]=\"hasError(attr.name)\">\n <option [ngValue]=\"null\">{{ 'common.selectPlaceholder' | t }}</option>\n @for (option of (attr | lookupOptions:lookupReferenceOptions()); track option.key) {\n <option [ngValue]=\"option.key\">\n {{ option.values | resolveTranslation:option.key }}\n </option>\n }\n </bs-select>\n }\n } @else if (attr.dataType === 'Reference' && attr.isArray) {\n <bs-tree-select\n mode=\"multiple\"\n variant=\"textbox\"\n [showClear]=\"true\"\n [placeholder]=\"'common.search' | t\"\n [provider]=\"getReferenceProvider(attr)\"\n [ngModel]=\"referenceTreeValues()[attr.name] || []\"\n (ngModelChange)=\"onReferenceTreeChange(attr, $event)\"\n [ngModelOptions]=\"{ standalone: true }\">\n </bs-tree-select>\n } @else if (attr.dataType === 'Reference') {\n <bs-input-group>\n <input\n type=\"text\"\n [id]=\"attr.name\"\n [value]=\"attr | referenceDisplayValue:formData():referenceOptions()\"\n readonly\n [class.is-invalid]=\"hasError(attr.name)\">\n <button\n type=\"button\"\n bsInputGroupBtn\n [color]=\"colors.secondary\"\n (click)=\"openReferenceSelector(attr)\">\n ...\n </button>\n </bs-input-group>\n } @else if (attr.dataType === 'AsDetail' && attr.isArray && attr.editMode === 'inline') {\n <bs-table [isResponsive]=\"true\" class=\"mb-1\">\n <thead>\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <th>{{ col.label | resolveTranslation:col.name }}</th>\n }\n <th style=\"width: 50px\"></th>\n </tr>\n </thead>\n <tbody class=\"align-middle\">\n @for (row of formData()[attr.name] || []; track $index) {\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <td>\n @if (col.dataType === 'boolean') {\n <bs-checkbox\n [(ngModel)]=\"row[col.name]\"\n (ngModelChange)=\"onFieldChange()\">\n </bs-checkbox>\n } @else if (col.dataType === 'Reference' && col.query) {\n <bs-select\n [(ngModel)]=\"row[col.name]\"\n (ngModelChange)=\"onFieldChange()\">\n <option [ngValue]=\"null\">{{ 'common.selectPlaceholder' | t }}</option>\n @for (option of (attr | inlineRefOptions:col:asDetailReferenceOptions()); track option.id) {\n <option [ngValue]=\"option.id\">\n {{ option.breadcrumb || option.name || option.id }}\n </option>\n }\n </bs-select>\n } @else {\n <input\n [type]=\"col.dataType | inputType\"\n [(ngModel)]=\"row[col.name]\"\n [required]=\"col.isRequired\"\n [step]=\"col.dataType === 'decimal' ? '0.01' : '1'\"\n (ngModelChange)=\"onFieldChange()\">\n }\n </td>\n }\n <td class=\"text-nowrap\">\n @if (attr | canDeleteDetailRow:asDetailPermissions()) {\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"removeArrayItem(attr, $index)\">\n <spark-icon name=\"trash\" />\n </button>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td [attr.colspan]=\"(attr | asDetailColumns:asDetailTypes()).length + 1\" class=\"text-center text-muted\">\n {{ 'common.noItemsFound' | t }}\n </td>\n </tr>\n }\n </tbody>\n </bs-table>\n @if (attr | canCreateDetailRow:asDetailPermissions()) {\n <button type=\"button\" [color]=\"colors.primary\" class=\"w-100 rounded-0\" (click)=\"addInlineRow(attr)\">\n <spark-icon name=\"plus\" /> {{ 'common.add' | t }}\n </button>\n }\n } @else if (attr.dataType === 'AsDetail' && attr.isArray) {\n <bs-table [isResponsive]=\"true\" class=\"mb-1\">\n <thead>\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <th>{{ col.label | resolveTranslation:col.name }}</th>\n }\n <th style=\"width: 80px\"></th>\n </tr>\n </thead>\n <tbody class=\"align-middle\">\n @for (row of formData()[attr.name] || []; track $index) {\n <tr>\n @for (col of (attr | asDetailColumns:asDetailTypes()); track col.name) {\n <td>\n @if (getAsDetailCellRendererComponent(col); as cellRenderer) {\n <ng-container *ngComponentOutlet=\"cellRenderer; inputs: getAsDetailCellRendererInputs(row, col)\"></ng-container>\n } @else {\n {{ row | asDetailCellValue:attr:col:asDetailReferenceOptions() }}\n }\n </td>\n }\n <td class=\"text-nowrap\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-secondary me-1\" (click)=\"editArrayItem(attr, $index)\">\n <spark-icon name=\"pencil\" />\n </button>\n @if (attr | canDeleteDetailRow:asDetailPermissions()) {\n <button type=\"button\" class=\"btn btn-sm btn-outline-danger\" (click)=\"removeArrayItem(attr, $index)\">\n <spark-icon name=\"trash\" />\n </button>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td [attr.colspan]=\"(attr | asDetailColumns:asDetailTypes()).length + 1\" class=\"text-center text-muted\">\n {{ 'common.noItemsFound' | t }}\n </td>\n </tr>\n }\n </tbody>\n </bs-table>\n @if (attr | canCreateDetailRow:asDetailPermissions()) {\n <button type=\"button\" [color]=\"colors.primary\" class=\"w-100 rounded-0\" (click)=\"addArrayItem(attr)\">\n <spark-icon name=\"plus\" /> {{ 'common.add' | t }}\n </button>\n }\n } @else if (attr.dataType === 'AsDetail') {\n <bs-input-group>\n <input\n type=\"text\"\n [id]=\"attr.name\"\n [value]=\"attr | asDetailDisplayValue:formData():asDetailTypes()\"\n readonly\n [class.is-invalid]=\"hasError(attr.name)\">\n <button\n type=\"button\"\n bsInputGroupBtn\n [color]=\"colors.secondary\"\n (click)=\"openAsDetailEditor(attr)\">\n <spark-icon name=\"pencil\" />\n </button>\n </bs-input-group>\n } @else if (getEditRendererComponent(attr); as editComp) {\n <ng-container *ngComponentOutlet=\"editComp; inputs: getEditRendererInputs(attr)\"></ng-container>\n } @else {\n <input\n [type]=\"attr.dataType | inputType\"\n [id]=\"attr.name\"\n [ngModel]=\"formData()[attr.name]\"\n (ngModelChange)=\"formData()[attr.name] = $event; onFieldChange()\"\n [name]=\"attr.name\"\n [required]=\"attr.isRequired\"\n [step]=\"attr.dataType === 'decimal' ? '0.01' : '1'\"\n [class.is-invalid]=\"hasError(attr.name)\">\n }\n @if (attr.name | errorForAttribute:validationErrors(); as errorMsg) {\n <div class=\"invalid-feedback d-block\">\n {{ errorMsg }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n @if (showButtons()) {\n <div bsRow class=\"mt-4\">\n <div [md]=\"4\"></div>\n <div [md]=\"8\" class=\"d-flex justify-content-end gap-2\">\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"onCancel()\" [disabled]=\"isSaving()\">{{ 'common.cancel' | t }}</button>\n <button type=\"submit\" [color]=\"colors.primary\" [disabled]=\"isSaving()\" (click)=\"onSave()\">\n @if (isSaving()) {\n <bs-spinner class=\"me-1\" />\n }\n {{ 'common.save' | t }}\n </button>\n </div>\n </div>\n }\n </bs-grid>\n}\n\n<!-- Modal for editing AsDetail objects -->\n<bs-modal [isOpen]=\"showAsDetailModal()\" (isOpenChange)=\"!$event && closeAsDetailModal()\">\n <div *bsModal>\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ 'common.edit' | t }} {{ editingAsDetailAttr()?.label | resolveTranslation:editingAsDetailAttr()?.name }}</h5>\n </div>\n\n @if (editingAsDetailAttr(); as attr) {\n <div bsModalBody>\n <spark-po-form\n [entityType]=\"attr | asDetailType:asDetailTypes()\"\n [(formData)]=\"asDetailFormData\"\n [parentId]=\"parentId()\"\n [parentType]=\"parentType()\">\n </spark-po-form>\n </div>\n }\n\n <div bsModalFooter>\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"closeAsDetailModal()\">{{ 'common.cancel' | t }}</button>\n <button type=\"button\" [color]=\"colors.primary\" (click)=\"saveAsDetailObject()\">{{ 'common.save' | t }}</button>\n </div>\n </div>\n</bs-modal>\n\n<!-- Modal for selecting Reference items -->\n<bs-modal [isOpen]=\"showReferenceModal()\" (isOpenChange)=\"!$event && closeReferenceModal()\">\n <div *bsModal class=\"reference-modal\">\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ 'common.select' | t }} {{ editingReferenceAttr()?.label | resolveTranslation:editingReferenceAttr()?.name }}</h5>\n </div>\n\n <div bsModalBody>\n @if (referenceModalEntityType()) {\n <!-- Search box -->\n <bs-grid>\n <div bsRow class=\"mb-3\">\n <div [md]=\"6\">\n <bs-input-group>\n <span class=\"input-group-text\">\n <spark-icon name=\"search\" />\n </span>\n <input\n type=\"text\"\n [placeholder]=\"'common.search' | t\"\n [(ngModel)]=\"referenceSearchTerm\"\n (ngModelChange)=\"onReferenceSearchChange()\">\n @if (referenceSearchTerm) {\n <button\n type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"clearReferenceSearch()\">\n <spark-icon name=\"x-lg\" />\n </button>\n }\n </bs-input-group>\n </div>\n <div [md]=\"6\" class=\"text-end\">\n @if (referenceSearchTerm && referenceModalPagination()) {\n <span class=\"text-muted\">\n {{ referenceModalPagination()!.totalRecords }} {{ referenceModalPagination()!.totalRecords === 1 ? ('common.resultFound' | t) : ('common.resultsFound' | t) }}\n </span>\n }\n </div>\n </div>\n </bs-grid>\n\n <bs-datatable\n [(settings)]=\"referenceModalSettings\"\n [data]=\"referenceModalRows()\"\n (rowClick)=\"selectReferenceItem($event.row)\">\n @for (attr of referenceVisibleAttributes(); track attr.id) {\n <div *bsDatatableColumn=\"attr.name; sortable: true\">\n {{ attr.label | resolveTranslation:attr.name }}\n </div>\n }\n\n <ng-container *bsRowTemplate=\"let item\">\n @for (attr of referenceVisibleAttributes(); track attr.id) {\n <td>{{ $any(item) | referenceAttrValue:attr.name }}</td>\n }\n </ng-container>\n </bs-datatable>\n } @else {\n <div class=\"text-center p-3\">\n <bs-spinner />\n </div>\n }\n </div>\n\n <div bsModalFooter>\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"closeReferenceModal()\">{{ 'common.cancel' | t }}</button>\n </div>\n </div>\n</bs-modal>\n\n<!-- Modal for selecting LookupReference items -->\n<bs-modal [isOpen]=\"showLookupModal()\" (isOpenChange)=\"!$event && closeLookupModal()\">\n <div *bsModal>\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ 'common.select' | t }} {{ editingLookupAttr()?.label | resolveTranslation:editingLookupAttr()?.name }}</h5>\n </div>\n\n <div bsModalBody>\n <!-- Search box -->\n <bs-grid>\n <div bsRow class=\"mb-3\">\n <div [col]>\n <bs-input-group>\n <span class=\"input-group-text\">\n <spark-icon name=\"search\" />\n </span>\n <input\n type=\"text\"\n [placeholder]=\"'common.search' | t\"\n [ngModel]=\"lookupSearchTerm()\"\n (ngModelChange)=\"lookupSearchTerm.set($event)\">\n @if (lookupSearchTerm()) {\n <button\n type=\"button\"\n class=\"btn btn-outline-secondary\"\n (click)=\"lookupSearchTerm.set('')\">\n <spark-icon name=\"x-lg\" />\n </button>\n }\n </bs-input-group>\n </div>\n </div>\n </bs-grid>\n\n <!-- List of items -->\n <bs-table [striped]=\"true\" [hover]=\"true\">\n <tbody class=\"align-middle\">\n @for (item of filteredLookupItems(); track item.key) {\n <tr\n [class.table-primary]=\"formData()[editingLookupAttr()?.name ?? ''] === item.key\"\n (click)=\"selectLookupItem(item)\"\n style=\"cursor: pointer;\">\n <td>{{ item.values | resolveTranslation:item.key }}</td>\n </tr>\n } @empty {\n <tr>\n <td class=\"text-center text-muted\">{{ 'common.noItemsFound' | t }}</td>\n </tr>\n }\n </tbody>\n </bs-table>\n </div>\n\n <div bsModalFooter>\n <button type=\"button\" [color]=\"colors.secondary\" (click)=\"closeLookupModal()\">{{ 'common.cancel' | t }}</button>\n </div>\n </div>\n</bs-modal>\n</bs-form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MA8Da,oBAAoB,CAAA;AACd,IAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AACnC,IAAA,YAAY,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC3C,IAAA,gBAAgB,GAAG,MAAM,CAAC,yBAAyB,CAAC;IAErE,UAAU,GAAG,KAAK,CAAoB,IAAI;mFAAC;IAC3C,QAAQ,GAAG,KAAK,CAAsB,EAAE;iFAAC;IACzC,gBAAgB,GAAG,KAAK,CAAoB,EAAE;yFAAC;IAC/C,WAAW,GAAG,KAAK,CAAC,KAAK;oFAAC;IAC1B,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;IACvB,QAAQ,GAAG,KAAK,CAAqB,SAAS;iFAAC;IAC/C,UAAU,GAAG,KAAK,CAAqB,SAAS;mFAAC;IAEjD,IAAI,GAAG,MAAM,EAAQ;IACrB,MAAM,GAAG,MAAM,EAAQ;IAEvB,MAAM,GAAG,KAAK;IACd,gBAAgB,GAAG,MAAM,CAAqC,EAAE;yFAAC;;;;;IAMjE,kBAAkB,GAAG,MAAM,CAA6C,EAAE;2FAAC;IAC3E,cAAc,GAAG,MAAM,CAA2C,EAAE;uFAAC;IACrE,aAAa,GAAG,MAAM,CAA6B,EAAE;sFAAC;IACtD,sBAAsB,GAAG,MAAM,CAAkC,EAAE;+FAAC;;IAGpE,mBAAmB,GAAG,MAAM,CAAmC,IAAI;4FAAC;IACpE,gBAAgB,GAAG,MAAM,CAAsB,EAAE;yFAAC;IAClD,iBAAiB,GAAG,MAAM,CAAC,KAAK;0FAAC;IACjC,iBAAiB,GAAG,MAAM,CAAgB,IAAI;0FAAC;;IAG/C,mBAAmB,GAAG,MAAM,CAAoC,EAAE;4FAAC;;IAGnE,wBAAwB,GAAG,M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AAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,CAAC,EAAA,eAAA,EAE/hC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,irkBAAA,EAAA;;;AE5DjD;;AAEG;;;;"}
@@ -184,7 +184,7 @@ function entityTypeFromPo(po) {
184
184
  id: po.objectTypeId,
185
185
  name: po.name,
186
186
  clrType: '', // Not needed by the form's rendering path; the PO's attributes carry the schema.
187
- displayAttribute: undefined,
187
+ breadcrumb: undefined,
188
188
  tabs: [],
189
189
  groups: [],
190
190
  attributes: (po.attributes ?? []).map(attrToDefinition),
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-spark-retry-action-modal.mjs","sources":["../../retry-action-modal/src/spark-retry-action-modal.component.ts","../../retry-action-modal/mintplayer-ng-spark-retry-action-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective } from '@mintplayer/ng-bootstrap/modal';\nimport { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';\nimport { RetryActionService, SparkService } from '@mintplayer/ng-spark/services';\nimport { SparkPoFormComponent } from '@mintplayer/ng-spark/po-form';\nimport {\n dictToNestedPo,\n EntityAttributeDefinition,\n EntityType,\n EntityTypeResolver,\n nestedPoToDict,\n PersistentObject,\n PersistentObjectAttribute,\n} from '@mintplayer/ng-spark/models';\n\n/**\n * Renders a retry-action popup. Before PRD §3 this component rendered title / message /\n * option buttons only and silently forwarded the incoming <c>persistentObject</c> back to\n * the server on submit — meaning any <c>Retry.Action(..., persistentObject)</c> flow had\n * no UI to actually edit the PO. This component now embeds the shared PO form so every\n * scalar / Reference / AsDetail attribute on the scaffolded Virtual PO is a real form\n * field, and the values the user fills in flow back to the server via\n * <c>RetryResult.PersistentObject</c>.\n */\n@Component({\n selector: 'spark-retry-action-modal',\n imports: [CommonModule, BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective, BsButtonTypeDirective, SparkPoFormComponent],\n template: `\n <bs-modal [isOpen]=\"isOpen()\" (isOpenChange)=\"!$event && onOption('Cancel')\">\n <div *bsModal>\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ retryActionService.payload()?.title }}</h5>\n </div>\n <div bsModalBody>\n @if (retryActionService.payload()?.message; as message) {\n <p>{{ message }}</p>\n }\n @if (entityType(); as et) {\n <spark-po-form\n [entityType]=\"et\"\n [(formData)]=\"formData\"\n [showButtons]=\"false\">\n </spark-po-form>\n }\n </div>\n <div bsModalFooter>\n @for (option of retryActionService.payload()?.options; track option) {\n <button\n type=\"button\"\n [color]=\"option === 'Cancel' ? colors.secondary : colors.primary\"\n (click)=\"onOption(option)\">\n {{ option }}\n </button>\n }\n </div>\n </div>\n </bs-modal>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SparkRetryActionModalComponent {\n protected readonly retryActionService = inject(RetryActionService);\n private readonly sparkService = inject(SparkService);\n\n colors = Color;\n isOpen = computed(() => this.retryActionService.payload() !== null);\n\n /**\n * EntityType definition for the incoming PO — fetched lazily via SparkService so the\n * form knows which attributes are editable, their labels, rules, renderers, etc.\n * `null` when the payload has no persistentObject or its objectTypeId doesn't match\n * any registered entity type (renders the modal as a simple option picker).\n */\n entityType = signal<EntityType | null>(null);\n formData = signal<Record<string, any>>({});\n private allEntityTypes: EntityType[] = [];\n\n constructor() {\n // Reseed form state every time the retry service opens/closes the modal. Effect\n // cleanup isn't needed since `payload` is a signal and the component's own lifetime\n // is root-scoped.\n effect(() => {\n const payload = this.retryActionService.payload();\n if (!payload?.persistentObject) {\n this.entityType.set(null);\n this.formData.set({});\n return;\n }\n void this.seedForm(payload.persistentObject);\n });\n }\n\n private async seedForm(po: PersistentObject): Promise<void> {\n // Virtual POs used for retry prompts (e.g. ConfirmDeleteCar) typically have no\n // security.json grant — so `getEntityTypes()` filters them out for the current user\n // and the lookup-by-id would return null, leaving the form blank. The scaffolded PO\n // already carries full attribute metadata (label / dataType / rules / renderer / etc.),\n // so we synthesize an EntityType from the attributes directly and skip the HTTP\n // lookup altogether. `getEntityTypes()` is still fetched once (cached on the\n // component) because the embedded spark-po-form needs the full list to resolve\n // nested AsDetail / Reference types the retry PO might point at.\n if (this.allEntityTypes.length === 0) {\n try { this.allEntityTypes = await this.sparkService.getEntityTypes(); }\n catch { this.allEntityTypes = []; }\n }\n this.entityType.set(entityTypeFromPo(po));\n // Flatten the nested PO into the Record<string, any> shape the shared form uses\n // throughout the rest of ng-spark — same transformation po-edit applies.\n this.formData.set(nestedPoToDict(po));\n }\n\n onOption(option: string): void {\n const payload = this.retryActionService.payload();\n if (!payload) return;\n\n const populated = this.populatedPersistentObject(payload.persistentObject);\n this.retryActionService.respond({\n step: payload.step,\n option,\n persistentObject: populated,\n });\n }\n\n /**\n * Builds the PO the server sees under <c>Retry.Result.PersistentObject</c>. If the\n * form resolved an EntityType, rebuild from the schema + formData (identical to the\n * po-edit save path — AsDetail recursion included). Otherwise forward the incoming\n * PO unmodified so pre-§3 flows without editable attributes keep working.\n */\n private populatedPersistentObject(incoming: PersistentObject | undefined): PersistentObject | undefined {\n if (!incoming) return undefined;\n const type = this.entityType();\n if (!type) return incoming;\n\n const resolver: EntityTypeResolver = (clrName) => this.allEntityTypes.find(t => t.clrType === clrName);\n const rebuilt = dictToNestedPo(this.formData(), type, resolver);\n const populated: PersistentObject = {\n ...incoming,\n attributes: mergeAttributeMetadata(incoming.attributes ?? [], rebuilt.attributes),\n };\n return populated;\n }\n}\n\n/**\n * Builds a synthetic <see cref=\"EntityType\"/> from the PO's own scaffolded attributes so\n * the embedded spark-po-form can render without having to locate the matching server-side\n * EntityType registration. Used for Virtual POs that are schema-registered but not\n * security-granted (retry-action popups).\n */\nfunction entityTypeFromPo(po: PersistentObject): EntityType {\n return {\n id: po.objectTypeId,\n name: po.name,\n clrType: '', // Not needed by the form's rendering path; the PO's attributes carry the schema.\n displayAttribute: undefined,\n tabs: [],\n groups: [],\n attributes: (po.attributes ?? []).map(attrToDefinition),\n queries: [],\n };\n}\n\nfunction attrToDefinition(attr: PersistentObjectAttribute): EntityAttributeDefinition {\n return {\n id: attr.id ?? '',\n name: attr.name,\n label: attr.label,\n dataType: attr.dataType,\n isArray: attr.isArray,\n isRequired: attr.isRequired,\n isVisible: attr.isVisible,\n isReadOnly: attr.isReadOnly,\n order: attr.order,\n query: attr.query,\n asDetailType: attr.asDetailType,\n showedOn: attr.showedOn,\n rules: attr.rules ?? [],\n group: attr.group,\n renderer: attr.renderer,\n rendererOptions: attr.rendererOptions,\n };\n}\n\n/**\n * Keeps the server-issued id + metadata on each attribute while overlaying the user's\n * values from the rebuilt PO. Prevents the modal from accidentally dropping server-only\n * fields (e.g. rules, renderer options) that the form didn't need to know about.\n */\nfunction mergeAttributeMetadata(\n incoming: PersistentObjectAttribute[],\n rebuilt: PersistentObjectAttribute[],\n): PersistentObjectAttribute[] {\n const byName = new Map(rebuilt.map(a => [a.name, a]));\n return incoming.map(source => {\n const updated = byName.get(source.name);\n if (!updated) return source;\n return {\n ...source,\n value: updated.value,\n object: updated.object,\n objects: updated.objects,\n asDetailType: updated.asDetailType ?? source.asDetailType,\n isValueChanged: true,\n };\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiBA;;;;;;;;AAQG;MAqCU,8BAA8B,CAAA;AACtB,IAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACjD,IAAA,YAAY,GAAG,MAAM,CAAC,YAAY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;AACH;AAEA;;;;AAIG;AACH,SAAS,sBAAsB,CAC7B,QAAqC,EACrC,OAAoC,EAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACrD,IAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,IAAG;QAC3B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;AACvC,QAAA,IAAI,CAAC,OAAO;AAAE,YAAA,OAAO,MAAM;QAC3B,OAAO;AACL,YAAA,GAAG,MAAM;YACT,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;AACxB,YAAA,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY;AACzD,YAAA,cAAc,EAAE,IAAI;SACrB;AACH,IAAA,CAAC,CAAC;AACJ;;AChNA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-spark-retry-action-modal.mjs","sources":["../../retry-action-modal/src/spark-retry-action-modal.component.ts","../../retry-action-modal/mintplayer-ng-spark-retry-action-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective } from '@mintplayer/ng-bootstrap/modal';\nimport { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';\nimport { RetryActionService, SparkService } from '@mintplayer/ng-spark/services';\nimport { SparkPoFormComponent } from '@mintplayer/ng-spark/po-form';\nimport {\n dictToNestedPo,\n EntityAttributeDefinition,\n EntityType,\n EntityTypeResolver,\n nestedPoToDict,\n PersistentObject,\n PersistentObjectAttribute,\n} from '@mintplayer/ng-spark/models';\n\n/**\n * Renders a retry-action popup. Before PRD §3 this component rendered title / message /\n * option buttons only and silently forwarded the incoming <c>persistentObject</c> back to\n * the server on submit — meaning any <c>Retry.Action(..., persistentObject)</c> flow had\n * no UI to actually edit the PO. This component now embeds the shared PO form so every\n * scalar / Reference / AsDetail attribute on the scaffolded Virtual PO is a real form\n * field, and the values the user fills in flow back to the server via\n * <c>RetryResult.PersistentObject</c>.\n */\n@Component({\n selector: 'spark-retry-action-modal',\n imports: [CommonModule, BsModalHostComponent, BsModalDirective, BsModalHeaderDirective, BsModalBodyDirective, BsModalFooterDirective, BsButtonTypeDirective, SparkPoFormComponent],\n template: `\n <bs-modal [isOpen]=\"isOpen()\" (isOpenChange)=\"!$event && onOption('Cancel')\">\n <div *bsModal>\n <div bsModalHeader>\n <h5 class=\"modal-title\">{{ retryActionService.payload()?.title }}</h5>\n </div>\n <div bsModalBody>\n @if (retryActionService.payload()?.message; as message) {\n <p>{{ message }}</p>\n }\n @if (entityType(); as et) {\n <spark-po-form\n [entityType]=\"et\"\n [(formData)]=\"formData\"\n [showButtons]=\"false\">\n </spark-po-form>\n }\n </div>\n <div bsModalFooter>\n @for (option of retryActionService.payload()?.options; track option) {\n <button\n type=\"button\"\n [color]=\"option === 'Cancel' ? colors.secondary : colors.primary\"\n (click)=\"onOption(option)\">\n {{ option }}\n </button>\n }\n </div>\n </div>\n </bs-modal>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SparkRetryActionModalComponent {\n protected readonly retryActionService = inject(RetryActionService);\n private readonly sparkService = inject(SparkService);\n\n colors = Color;\n isOpen = computed(() => this.retryActionService.payload() !== null);\n\n /**\n * EntityType definition for the incoming PO — fetched lazily via SparkService so the\n * form knows which attributes are editable, their labels, rules, renderers, etc.\n * `null` when the payload has no persistentObject or its objectTypeId doesn't match\n * any registered entity type (renders the modal as a simple option picker).\n */\n entityType = signal<EntityType | null>(null);\n formData = signal<Record<string, any>>({});\n private allEntityTypes: EntityType[] = [];\n\n constructor() {\n // Reseed form state every time the retry service opens/closes the modal. Effect\n // cleanup isn't needed since `payload` is a signal and the component's own lifetime\n // is root-scoped.\n effect(() => {\n const payload = this.retryActionService.payload();\n if (!payload?.persistentObject) {\n this.entityType.set(null);\n this.formData.set({});\n return;\n }\n void this.seedForm(payload.persistentObject);\n });\n }\n\n private async seedForm(po: PersistentObject): Promise<void> {\n // Virtual POs used for retry prompts (e.g. ConfirmDeleteCar) typically have no\n // security.json grant — so `getEntityTypes()` filters them out for the current user\n // and the lookup-by-id would return null, leaving the form blank. The scaffolded PO\n // already carries full attribute metadata (label / dataType / rules / renderer / etc.),\n // so we synthesize an EntityType from the attributes directly and skip the HTTP\n // lookup altogether. `getEntityTypes()` is still fetched once (cached on the\n // component) because the embedded spark-po-form needs the full list to resolve\n // nested AsDetail / Reference types the retry PO might point at.\n if (this.allEntityTypes.length === 0) {\n try { this.allEntityTypes = await this.sparkService.getEntityTypes(); }\n catch { this.allEntityTypes = []; }\n }\n this.entityType.set(entityTypeFromPo(po));\n // Flatten the nested PO into the Record<string, any> shape the shared form uses\n // throughout the rest of ng-spark — same transformation po-edit applies.\n this.formData.set(nestedPoToDict(po));\n }\n\n onOption(option: string): void {\n const payload = this.retryActionService.payload();\n if (!payload) return;\n\n const populated = this.populatedPersistentObject(payload.persistentObject);\n this.retryActionService.respond({\n step: payload.step,\n option,\n persistentObject: populated,\n });\n }\n\n /**\n * Builds the PO the server sees under <c>Retry.Result.PersistentObject</c>. If the\n * form resolved an EntityType, rebuild from the schema + formData (identical to the\n * po-edit save path — AsDetail recursion included). Otherwise forward the incoming\n * PO unmodified so pre-§3 flows without editable attributes keep working.\n */\n private populatedPersistentObject(incoming: PersistentObject | undefined): PersistentObject | undefined {\n if (!incoming) return undefined;\n const type = this.entityType();\n if (!type) return incoming;\n\n const resolver: EntityTypeResolver = (clrName) => this.allEntityTypes.find(t => t.clrType === clrName);\n const rebuilt = dictToNestedPo(this.formData(), type, resolver);\n const populated: PersistentObject = {\n ...incoming,\n attributes: mergeAttributeMetadata(incoming.attributes ?? [], rebuilt.attributes),\n };\n return populated;\n }\n}\n\n/**\n * Builds a synthetic <see cref=\"EntityType\"/> from the PO's own scaffolded attributes so\n * the embedded spark-po-form can render without having to locate the matching server-side\n * EntityType registration. Used for Virtual POs that are schema-registered but not\n * security-granted (retry-action popups).\n */\nfunction entityTypeFromPo(po: PersistentObject): EntityType {\n return {\n id: po.objectTypeId,\n name: po.name,\n clrType: '', // Not needed by the form's rendering path; the PO's attributes carry the schema.\n breadcrumb: undefined,\n tabs: [],\n groups: [],\n attributes: (po.attributes ?? []).map(attrToDefinition),\n queries: [],\n };\n}\n\nfunction attrToDefinition(attr: PersistentObjectAttribute): EntityAttributeDefinition {\n return {\n id: attr.id ?? '',\n name: attr.name,\n label: attr.label,\n dataType: attr.dataType,\n isArray: attr.isArray,\n isRequired: attr.isRequired,\n isVisible: attr.isVisible,\n isReadOnly: attr.isReadOnly,\n order: attr.order,\n query: attr.query,\n asDetailType: attr.asDetailType,\n showedOn: attr.showedOn,\n rules: attr.rules ?? [],\n group: attr.group,\n renderer: attr.renderer,\n rendererOptions: attr.rendererOptions,\n };\n}\n\n/**\n * Keeps the server-issued id + metadata on each attribute while overlaying the user's\n * values from the rebuilt PO. Prevents the modal from accidentally dropping server-only\n * fields (e.g. rules, renderer options) that the form didn't need to know about.\n */\nfunction mergeAttributeMetadata(\n incoming: PersistentObjectAttribute[],\n rebuilt: PersistentObjectAttribute[],\n): PersistentObjectAttribute[] {\n const byName = new Map(rebuilt.map(a => [a.name, a]));\n return incoming.map(source => {\n const updated = byName.get(source.name);\n if (!updated) return source;\n return {\n ...source,\n value: updated.value,\n object: updated.object,\n objects: updated.objects,\n asDetailType: updated.asDetailType ?? source.asDetailType,\n isValueChanged: true,\n };\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiBA;;;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I,EAAE;QACvB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,eAAe,EAAE,IAAI,CAAC,eAAe;KACtC;AACH;AAEA;;;;AAIG;AACH,SAAS,sBAAsB,CAC7B,QAAqC,EACrC,OAAoC,EAAA;IAEpC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACrD,IAAA,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,IAAG;QAC3B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;AACvC,QAAA,IAAI,CAAC,OAAO;AAAE,YAAA,OAAO,MAAM;QAC3B,OAAO;AACL,YAAA,GAAG,MAAM;YACT,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;AACxB,YAAA,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY;AACzD,YAAA,cAAc,EAAE,IAAI;SACrB;AACH,IAAA,CAAC,CAAC;AACJ;;AChNA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-spark",
3
3
  "private": false,
4
- "version": "22.0.2",
4
+ "version": "22.0.4",
5
5
  "description": "Angular component library for MintPlayer.Spark CRUD applications",
6
6
  "repository": {
7
7
  "type": "git",
@@ -153,14 +153,16 @@ interface EntityType {
153
153
  clrType: string;
154
154
  alias?: string;
155
155
  /**
156
- * Template string with {PropertyName} placeholders for building a formatted display value.
157
- * Example: "{Street}, {PostalCode} {City}"
156
+ * Breadcrumb template: literal text plus `{AttributeName}` placeholders. A scalar placeholder
157
+ * renders its value; a reference placeholder renders the referenced entity's breadcrumb.
158
+ * The server resolves this — clients only read the resulting strings. Example: "{Street}, {City}".
158
159
  */
159
- displayFormat?: string;
160
+ breadcrumb?: string;
160
161
  /**
161
- * (Fallback) Single attribute name to use as display value when displayFormat is not specified.
162
+ * When false, the breadcrumb needs the collection document (a placeholder field is not on the
163
+ * projection). null/absent means renderable from the projection. Informational on the client.
162
164
  */
163
- displayAttribute?: string;
165
+ breadcrumbProjectionSatisfiable?: boolean;
164
166
  tabs?: AttributeTab[];
165
167
  groups?: AttributeGroup[];
166
168
  attributes: EntityAttributeDefinition[];
@@ -24,7 +24,6 @@ declare class InputTypePipe implements PipeTransform {
24
24
  declare class AttributeValuePipe implements PipeTransform {
25
25
  transform(attrName: string, item: PersistentObject | null, entityType: EntityType | null, lookupRefOptions: Record<string, LookupReference>, allEntityTypes: EntityType[]): any;
26
26
  private formatAsDetailValue;
27
- private resolveDisplayFormat;
28
27
  static ɵfac: i0.ɵɵFactoryDeclaration<AttributeValuePipe, never>;
29
28
  static ɵpipe: i0.ɵɵPipeDeclaration<AttributeValuePipe, "attributeValue", true>;
30
29
  }
@@ -98,7 +97,6 @@ declare class AsDetailCellValuePipe implements PipeTransform {
98
97
  declare class AsDetailDisplayValuePipe implements PipeTransform {
99
98
  private readonly lang;
100
99
  transform(attr: EntityAttributeDefinition, formData: Record<string, any>, asDetailTypes: Record<string, EntityType>): string;
101
- private resolveDisplayFormat;
102
100
  static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailDisplayValuePipe, never>;
103
101
  static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailDisplayValuePipe, "asDetailDisplayValue", true>;
104
102
  }
@@ -46,6 +46,9 @@ declare class SparkPoDetailComponent {
46
46
  attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[];
47
47
  getDetailRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
48
48
  getDetailRendererInputs(attr: EntityAttributeDefinition, item: PersistentObject): Record<string, any>;
49
+ /** Column renderer for a cell of an AsDetail sub-table (so embedded rows honor `col.renderer` too). */
50
+ getAsDetailCellRendererComponent(col: EntityAttributeDefinition): Type<any> | null;
51
+ getAsDetailCellRendererInputs(row: Record<string, any>, col: EntityAttributeDefinition): Record<string, any>;
49
52
  private loadLookupReferenceOptions;
50
53
  private loadAsDetailTypes;
51
54
  onCustomAction(action: CustomActionDefinition): Promise<void>;
@@ -73,6 +73,9 @@ declare class SparkPoFormComponent {
73
73
  closeLookupModal(): void;
74
74
  getEditRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
75
75
  getEditRendererInputs(attr: EntityAttributeDefinition): Record<string, any>;
76
+ /** Column renderer for a cell of an AsDetail sub-table (so embedded rows honor `col.renderer` too). */
77
+ getAsDetailCellRendererComponent(col: EntityAttributeDefinition): Type<any> | null;
78
+ getAsDetailCellRendererInputs(row: Record<string, any>, col: EntityAttributeDefinition): Record<string, any>;
76
79
  hasError(attrName: string): boolean;
77
80
  onFieldChange(): void;
78
81
  onSave(): void;