@mintplayer/ng-spark 22.8.0 → 22.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mintplayer-ng-spark-attribute-description.mjs +68 -0
- package/fesm2022/mintplayer-ng-spark-attribute-description.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-grid.mjs +3 -2
- package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-pipes.mjs +4 -2
- package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs +3 -2
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-form.mjs +5 -4
- package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-renderers.mjs +6 -4
- package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
- package/package.json +5 -1
- package/types/mintplayer-ng-spark-attribute-description.d.ts +30 -0
- package/types/mintplayer-ng-spark-models.d.ts +4 -0
- package/types/mintplayer-ng-spark-renderers.d.ts +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-spark-models.mjs","sources":["../../models/src/translated-string.ts","../../models/src/showed-on.ts","../../models/src/entity-type.ts","../../models/src/as-detail-conversions.ts","../../models/src/query-result.ts","../../models/src/lookup-reference.ts","../../models/src/query-actions.ts","../../models/src/selection-rule.ts","../../models/src/selection-mode.ts","../../models/src/refresh-overlay.ts","../../models/src/rule-evaluation.ts","../../models/mintplayer-ng-spark-models.ts"],"sourcesContent":["import { signal, type WritableSignal } from '@angular/core';\n\nexport type TranslatedString = Record<string, string>;\n\n/** Global reactive language state — shared across library boundaries via globalThis */\nexport const currentLanguage: WritableSignal<string> =\n ((globalThis as any).__sparkCurrentLanguage ??= signal('en'));\n\nexport function resolveTranslation(ts: TranslatedString | undefined, lang?: string): string {\n if (!ts) return '';\n const language = lang ?? currentLanguage();\n return ts[language] ?? ts['en'] ?? Object.values(ts)[0] ?? '';\n}\n","/**\n * Flags enum controlling on which pages an attribute should be displayed.\n * Values can be combined: ShowedOn.Query | ShowedOn.PersistentObject\n */\nexport enum ShowedOn {\n Query = 1,\n PersistentObject = 2,\n}\n\n/**\n * Helper function to check if a ShowedOn value includes a specific flag.\n */\nexport function hasShowedOnFlag(value: ShowedOn | string | undefined, flag: ShowedOn): boolean {\n if (value === undefined) return true; // Default: show on all pages\n\n // Handle string values from JSON (e.g., \"Query, PersistentObject\")\n if (typeof value === 'string') {\n const parts = value.split(',').map(s => s.trim());\n const flagName = ShowedOn[flag];\n return parts.includes(flagName);\n }\n\n // Handle numeric flag values\n return (value & flag) === flag;\n}\n","import { ShowedOn } from './showed-on';\nimport { TranslatedString } from './translated-string';\nimport { ValidationRule } from './validation-rule';\n\n/**\n * Controls how a Reference attribute is picked in the PO-edit form.\n * Serialized as a string by the server (mirrors the .NET EReferenceDisplayType).\n */\nexport enum EReferenceDisplayType {\n /** Renders as a `<bs-select>` listing every referenced item. */\n Dropdown = 'Dropdown',\n /** Renders a readonly textbox + \"…\" button that opens a searchable modal grid picker. */\n Modal = 'Modal',\n}\n\nexport interface EntityAttributeDefinition {\n id: string;\n name: string;\n label?: TranslatedString;\n dataType: string;\n isRequired: boolean;\n isVisible: boolean;\n isReadOnly: boolean;\n order: number;\n query?: string;\n /** For reference attributes, specifies the target entity type's CLR type name */\n referenceType?: string;\n /** For AsDetail attributes, specifies the nested entity type's CLR type name */\n asDetailType?: string;\n /** When true, the attribute represents an array/collection of AsDetail objects */\n isArray?: boolean;\n /** For array AsDetail attributes: \"modal\" (default) or \"inline\" */\n editMode?: 'inline' | 'modal';\n /**\n * For Reference attributes: 'Modal' renders the \"…\" + modal query-grid picker;\n * 'Dropdown'/absent (default) renders a `<bs-select>`. Hand-set in the model JSON.\n */\n referenceDisplayType?: EReferenceDisplayType;\n /** For array AsDetail attributes: when true, rows can be drag-reordered (order = array position) */\n isSortable?: boolean;\n /**\n * When true, changing this attribute's value posts the in-progress object to\n * `/spark/po/{objectTypeId}/refresh` and applies the reshaped result as an overlay.\n * Schema-only by design — it never travels on a PersistentObjectAttribute, so a client\n * cannot claim a trigger the model did not declare.\n */\n triggersRefresh?: boolean;\n /** For LookupReference attributes, specifies the lookup reference type name */\n lookupReferenceType?: string;\n /**\n * Controls on which pages the attribute should be displayed.\n * Query = shown in list views, PersistentObject = shown in detail/edit views.\n * Can be a numeric flag value or a string like \"Query, PersistentObject\".\n */\n showedOn?: ShowedOn | string;\n rules: ValidationRule[];\n /** References an AttributeGroup.id to assign this attribute to a group */\n group?: string;\n /** Number of grid columns this attribute spans within a tab's column layout */\n columnSpan?: number;\n /** Renderer component name for custom display in detail/list views */\n renderer?: string;\n /** Options passed to the renderer component */\n rendererOptions?: Record<string, any>;\n}\n\nexport interface AttributeTab {\n id: string;\n name: string;\n label?: TranslatedString;\n order: number;\n /** Number of columns for the grid layout within this tab */\n columnCount?: number;\n}\n\nexport interface AttributeGroup {\n id: string;\n name: string;\n label?: TranslatedString;\n /** References an AttributeTab.id to assign this group to a tab */\n tab?: string;\n order: number;\n}\n\nexport interface EntityType {\n id: string;\n name: string;\n description?: TranslatedString;\n /**\n * The backing CLR type, or absent for a JSON-only virtual type (#325).\n *\n * Optional on purpose: the server sends null for a virtual type, and this was declared\n * non-nullable, so any unguarded `.endsWith(...)` on it threw a TypeError naming an innocent\n * query. Types are data from the wire, not a promise about it.\n */\n clrType?: string;\n alias?: string;\n /**\n * Breadcrumb template: literal text plus `{AttributeName}` placeholders. A scalar placeholder\n * renders its value; a reference placeholder renders the referenced entity's breadcrumb.\n * The server resolves this — clients only read the resulting strings. Example: \"{Street}, {City}\".\n */\n breadcrumb?: string;\n /**\n * When false, the breadcrumb needs the collection document (a placeholder field is not on the\n * projection). null/absent means renderable from the projection. Informational on the client.\n */\n breadcrumbProjectionSatisfiable?: boolean;\n tabs?: AttributeTab[];\n groups?: AttributeGroup[];\n attributes: EntityAttributeDefinition[];\n /** Query aliases or IDs to display as related query tables on the detail page. */\n queries?: string[];\n}\n","import { EntityAttributeDefinition } from './entity-type';\nimport { EntityType } from './entity-type';\nimport { PersistentObject } from './persistent-object';\nimport { PersistentObjectAttribute } from './persistent-object-attribute';\n\n/**\n * Resolves an `EntityType` by its CLR type name (e.g. `\"HR.Entities.Address\"`).\n * Callers typically close over a list they already hold. `getEntityTypes()` is NOT cached --\n * it issues a request per call -- so resolve against a list you fetched once rather than\n * calling it inside the resolver.\n */\nexport type EntityTypeResolver = (clrTypeName: string) => EntityType | undefined;\n\n/**\n * Flattens a nested `PersistentObject` into the plain `Record<string, any>` shape the\n * form state uses throughout ng-spark. Primitive / reference attributes contribute their\n * `value`; nested AsDetail attributes recurse — single becomes an inner dict, array\n * becomes an array of inner dicts. Returns `{}` for `null` / `undefined` input.\n *\n * This is the ONE place that reads the server's new AsDetail wire shape and collapses it\n * back to the flat dict the form components already handle.\n */\nexport function nestedPoToDict(po: PersistentObject | null | undefined): Record<string, any> {\n if (!po) return {};\n const dict: Record<string, any> = {};\n for (const attr of po.attributes ?? []) {\n dict[attr.name] = attributeValueForForm(attr);\n }\n // The object's own server-resolved breadcrumb, kept under a reserved key so the form can label\n // it without re-deriving a template it may be structurally unable to resolve. Safe to carry\n // through save: `dictToNestedPo` walks the entity type's attributes, never the dict's keys, so\n // a reserved key is never sent to the server. Attached only when it resolved, which keeps the\n // common case byte-for-byte identical to the plain flat dict.\n if (typeof po.breadcrumb === 'string' && po.breadcrumb !== '') {\n dict[AS_DETAIL_SELF_BREADCRUMB_KEY] = po.breadcrumb;\n }\n return dict;\n}\n\nfunction attributeValueForForm(attr: PersistentObjectAttribute): any {\n if (attr.dataType === 'AsDetail') {\n if (attr.isArray) return (attr.objects ?? []).map(po => nestedPoToDict(po));\n return attr.object ? nestedPoToDict(attr.object) : null;\n }\n return attr.value;\n}\n\n/**\n * Reserved key under which a flattened nested object keeps the breadcrumb the SERVER resolved for\n * that object itself (as opposed to {@link AS_DETAIL_BREADCRUMBS_KEY}, which keys the breadcrumbs\n * of its reference attributes by attribute name).\n *\n * This exists because a breadcrumb template can name a property the model does not carry. HR's\n * `Address` declares `[Breadcrumb, IgnoreProperty] string Crumb`, and `Address.json` renders it as\n * `\"{Crumb}\"` — the server resolves that by reflecting over the CLR property, which no client can\n * do, because `[IgnoreProperty]` is exactly the instruction to keep it out of the model. Flattening\n * used to discard the resolved string, leaving the form to substitute `{Crumb}` against a dict that\n * can never contain it.\n */\nexport const AS_DETAIL_SELF_BREADCRUMB_KEY = '__sparkBreadcrumb';\n\n/**\n * The breadcrumb the server resolved for a flattened object, or null when it resolved to nothing.\n *\n * `EntityMapper` never emits an empty breadcrumb: when the template renders blank it substitutes\n * the CLR type name, so an unset `Address` arrives as the literal string `\"Address\"`\n * (EntityMapper.cs:209-211). That is a placeholder, not data, and rendering it would be worse than\n * rendering nothing — it reads as a real value. `typeName` lets a caller filter it back out.\n */\nexport function selfBreadcrumb(row: Record<string, any> | null | undefined, typeName?: string): string | null {\n const value = row?.[AS_DETAIL_SELF_BREADCRUMB_KEY];\n if (typeof value !== 'string' || value.trim() === '') return null;\n\n // Callers hold the type name in two shapes — `EntityType.name` is the short model name, while an\n // attribute's `asDetailType` is the full CLR name — and the server's placeholder is always the\n // short one. Compare on the last dotted segment so either shape filters it.\n if (typeName) {\n const shortName = typeName.slice(typeName.lastIndexOf('.') + 1);\n if (value === shortName) return null;\n }\n return value;\n}\n\n/**\n * Reserved key under which {@link nestedPoToDisplayRow} stashes the server-resolved breadcrumb of\n * each reference attribute (keyed by attribute name). Lets an AsDetail reference cell render the\n * label the server already resolved by id — page-independent — instead of guessing from a single\n * reference-query options page. Prefixed to avoid colliding with a real attribute name.\n */\nexport const AS_DETAIL_BREADCRUMBS_KEY = '__sparkBreadcrumbs';\n\n/**\n * Like {@link nestedPoToDict}, but for the read-only detail display path. In addition to each\n * attribute's value it preserves the server-resolved per-reference `breadcrumb` under\n * {@link AS_DETAIL_BREADCRUMBS_KEY}, so an AsDetail reference cell can render the label by id\n * regardless of whether the referenced document fits on the reference query's first options page.\n * The form/edit path keeps using {@link nestedPoToDict}, which never carries breadcrumbs.\n */\nexport function nestedPoToDisplayRow(po: PersistentObject | null | undefined): Record<string, any> {\n if (!po) return {};\n const dict: Record<string, any> = {};\n let breadcrumbs: Record<string, string> | undefined;\n for (const attr of po.attributes ?? []) {\n dict[attr.name] = displayValueForAttribute(attr);\n if (attr.dataType === 'Reference' && !attr.isArray && typeof attr.breadcrumb === 'string' && attr.breadcrumb !== '') {\n (breadcrumbs ??= {})[attr.name] = attr.breadcrumb;\n }\n }\n // Only attach the side channel when something resolved — keeps reference-free rows (the common\n // case) byte-for-byte identical to the plain flat dict.\n if (breadcrumbs) dict[AS_DETAIL_BREADCRUMBS_KEY] = breadcrumbs;\n // Same self-breadcrumb the form path carries: a nested-AsDetail COLUMN in a detail table has an\n // inner dict as its value, which used to stringify to \"[object Object]\".\n if (typeof po.breadcrumb === 'string' && po.breadcrumb !== '') {\n dict[AS_DETAIL_SELF_BREADCRUMB_KEY] = po.breadcrumb;\n }\n return dict;\n}\n\nfunction displayValueForAttribute(attr: PersistentObjectAttribute): any {\n if (attr.dataType === 'AsDetail') {\n if (attr.isArray) return (attr.objects ?? []).map(po => nestedPoToDisplayRow(po));\n return attr.object ? nestedPoToDisplayRow(attr.object) : null;\n }\n return attr.value;\n}\n\n/**\n * Builds a nested `PersistentObject` from a flat dict against the schema in\n * <paramref name=\"entityType\"/>. Used when the form is about to save — AsDetail attributes\n * are no longer sent as flat dicts in `attribute.value`; the server now requires\n * `attribute.object` / `attribute.objects` with fully scaffolded nested POs.\n *\n * `resolve` walks through AsDetail types registered elsewhere (usually the full\n * `getEntityTypes()` list, keyed by CLR type name). Nested AsDetail inside AsDetail is\n * handled recursively.\n */\nexport function dictToNestedPo(\n dict: Record<string, any> | null | undefined,\n entityType: EntityType,\n resolve: EntityTypeResolver,\n): PersistentObject {\n const attributes: PersistentObjectAttribute[] = (entityType.attributes ?? [])\n .map(attrDef => buildAttribute(attrDef, dict?.[attrDef.name], resolve));\n\n return {\n id: (dict?.['Id'] as string) ?? (dict?.['id'] as string) ?? '',\n name: entityType.name,\n objectTypeId: entityType.id,\n attributes,\n };\n}\n\nfunction buildAttribute(\n attrDef: EntityAttributeDefinition,\n raw: any,\n resolve: EntityTypeResolver,\n): PersistentObjectAttribute {\n const attr: PersistentObjectAttribute = {\n id: attrDef.id,\n name: attrDef.name,\n label: attrDef.label,\n dataType: attrDef.dataType,\n isArray: attrDef.isArray,\n isRequired: attrDef.isRequired,\n isVisible: attrDef.isVisible,\n isReadOnly: attrDef.isReadOnly,\n order: attrDef.order,\n rules: attrDef.rules ?? [],\n isValueChanged: true,\n };\n\n if (attrDef.dataType === 'AsDetail') {\n // Server expects attr.value null for AsDetail; the nested PO carries the data.\n attr.value = null;\n attr.asDetailType = attrDef.asDetailType;\n\n const nestedType = attrDef.asDetailType ? resolve(attrDef.asDetailType) : undefined;\n if (!nestedType) {\n attr.object = null;\n attr.objects = attrDef.isArray ? [] : null;\n return attr;\n }\n\n if (attrDef.isArray) {\n const items: any[] = Array.isArray(raw) ? raw : [];\n attr.objects = items.map(item => dictToNestedPo((item as Record<string, any>) ?? {}, nestedType, resolve));\n } else {\n attr.object = raw ? dictToNestedPo(raw as Record<string, any>, nestedType, resolve) : null;\n }\n return attr;\n }\n\n attr.value = raw;\n return attr;\n}\n","import { TranslatedString } from './translated-string';\nimport { PersistentObject } from './persistent-object';\nimport { AS_DETAIL_BREADCRUMBS_KEY } from './as-detail-conversions';\n\n/**\n * What a query returns: the column metadata once, then one lightweight row per result.\n *\n * Rows used to be full `PersistentObject`s, so every row repeated the complete attribute\n * metadata the client already held from `/spark/types` and never read off the row. More\n * importantly it conflated two things that are not the same: a **row is a projection**, a\n * **persistent object is a document**. Nothing here is entitled to act on a row — every\n * mutating path re-loads by id and re-applies security server-side.\n */\nexport interface QueryResult {\n columns: QueryColumn[];\n items: QueryResultItem[];\n /** Rows matching the query after filtering, before paging. */\n totalItems: number;\n skip: number;\n take: number;\n typeHints?: Record<string, string>;\n}\n\n/**\n * The subset of column metadata a cell needs in order to render.\n *\n * Both {@link QueryColumn} (a query result's column) and `EntityAttributeDefinition` (a detail\n * page's attribute) satisfy this, which is what lets one cell component serve the query grid and\n * the AsDetail sub-table without either side knowing about the other's shape.\n */\nexport interface SparkCellColumn {\n name: string;\n label?: TranslatedString;\n dataType: string;\n isArray?: boolean;\n renderer?: string;\n rendererOptions?: Record<string, any>;\n referenceType?: string;\n lookupReferenceType?: string;\n asDetailType?: string;\n}\n\n/** One column of a query result, sent once rather than repeated on every row. */\nexport interface QueryColumn extends SparkCellColumn {\n order: number;\n isSortable?: boolean;\n /**\n * Whether the grid draws this column. `false` means the row carries the value but no column is\n * rendered — for a renderer that needs a sibling value (a lock glyph beside a name) without\n * spending a column on it. `showedOn` decides what ships; this decides what is drawn.\n */\n isVisible?: boolean;\n /** The query backing a Reference column, by name — the client's option source. */\n query?: string;\n}\n\n/**\n * One row: an id, a display string, and a value per column.\n *\n * Deliberately too weak to act on — no attribute metadata, no `can` block, no etag, because none\n * of those can be trusted from a projection.\n */\nexport interface QueryResultItem {\n /** Never null and unique within a result; the server refuses anything else. */\n id: string;\n /** What to show when the row is named rather than tabulated (a reference picker's value). */\n breadcrumb?: string;\n values: QueryResultItemValue[];\n /** Presentation hints for the whole row. Keys arrive lower-cased. */\n typeHints?: Record<string, string>;\n}\n\n/** One cell. */\nexport interface QueryResultItemValue {\n /** The {@link QueryColumn.name} this value belongs to. */\n key: string;\n /** Typed JSON, not a string — the server converts on the way out. */\n value?: any;\n /** For a reference cell: the target document's id, so a link needs no second lookup. */\n objectId?: string;\n /** For a reference cell: the target's display string. */\n breadcrumb?: string;\n /** Resolved display labels per referenced id, for a multi-reference cell. */\n breadcrumbs?: Record<string, string | null>;\n typeHints?: Record<string, string>;\n}\n\n/**\n * Every shape a renderer's `item` can arrive in.\n *\n * Three, and they are genuinely different objects rather than variations of one: a query grid hands\n * a {@link QueryResultItem}, an AsDetail sub-table hands the flat record `nestedPoToDisplayRow`\n * built, and a detail or form host hands the `PersistentObject` itself. A renderer reused across a\n * grid and an AsDetail table therefore sees two of them, which is why {@link valueFor} reads all\n * three rather than making every app write the branch.\n */\nexport type SparkRow = QueryResultItem | PersistentObject | Record<string, unknown>;\n\n/**\n * The value a row carries for a column, whatever shape the row is in — or `undefined` when it\n * carries none.\n *\n * ```ts\n * const isPrivate = valueFor(this.item(), 'IsPrivate')?.value === true;\n * ```\n *\n * Always returns the **cell** rather than the bare value, because a reference cell is worth as much\n * for its `objectId` as for its text, and a helper that discarded it would have to be replaced the\n * first time a renderer wanted to link somewhere. `?.value` is the cost, once per call site.\n *\n * ⚠️ A value only reaches a grid row if its attribute is on the **query surface**. To read a sibling\n * the grid does not draw, mark it `\"showedOn\": \"Query\", \"isVisible\": false` — shipped, not drawn. An\n * attribute marked `\"showedOn\": \"PersistentObject\"` is absent from a row by design, and this returns\n * `undefined` for it; that is the first thing to check when a sibling read comes back empty.\n */\nexport function valueFor(item: SparkRow | null | undefined, columnName: string): QueryResultItemValue | undefined {\n if (!item) return undefined;\n\n if (isQueryRow(item)) {\n return item.values.find(v => v.key === columnName);\n }\n\n if (isPersistentObject(item)) {\n const attribute = item.attributes.find(a => a.name === columnName);\n if (!attribute) return undefined;\n return {\n key: attribute.name,\n value: attribute.value,\n // A single reference's value IS the target's id, which is what the row shape carries\n // separately. Deriving it here keeps a renderer from having to know that.\n objectId: attribute.dataType === 'Reference' && !attribute.isArray && attribute.value != null\n ? String(attribute.value)\n : undefined,\n breadcrumb: attribute.breadcrumb,\n breadcrumbs: attribute.breadcrumbs,\n };\n }\n\n const record = item as Record<string, unknown>;\n if (!(columnName in record)) return undefined;\n\n const value = record[columnName];\n // The flat row's side channel is populated only for single references, so its presence for this\n // key is what identifies one — the record itself carries no dataType to ask.\n const breadcrumb = (record[AS_DETAIL_BREADCRUMBS_KEY] as Record<string, string> | undefined)?.[columnName];\n\n return {\n key: columnName,\n value,\n objectId: breadcrumb !== undefined && value != null ? String(value) : undefined,\n breadcrumb,\n };\n}\n\n/**\n * Whether this row is a query result item.\n *\n * Discriminated on the *elements*, not just on `Array.isArray(values)`: a flat AsDetail record may\n * legitimately have a column named `values` holding an array, and mistaking one for the other would\n * silently read the wrong thing.\n */\nexport function isQueryRow(row: SparkRow | null | undefined): row is QueryResultItem {\n const values = (row as QueryResultItem | undefined)?.values;\n return Array.isArray(values) && (values.length === 0 || typeof values[0]?.key === 'string');\n}\n\n/** Whether this row is a full persistent object. Discriminated on elements, as above. */\nexport function isPersistentObject(row: SparkRow | null | undefined): row is PersistentObject {\n const attributes = (row as PersistentObject | undefined)?.attributes;\n return Array.isArray(attributes) && (attributes.length === 0 || typeof attributes[0]?.name === 'string');\n}\n","import { TranslatedString } from './translated-string';\n\nexport enum ELookupDisplayType {\n Dropdown = 0,\n Modal = 1\n}\n\nexport interface LookupReferenceListItem {\n name: string;\n isTransient: boolean;\n valueCount: number;\n displayType: ELookupDisplayType;\n}\n\nexport interface LookupReference {\n name: string;\n isTransient: boolean;\n displayType: ELookupDisplayType;\n values: LookupReferenceValue[];\n}\n\nexport interface LookupReferenceValue {\n key: string;\n values: TranslatedString;\n isActive: boolean;\n extra?: Record<string, unknown>;\n}\n","import { CustomActionDefinition } from './custom-action';\n\n/**\n * The custom actions a query should offer, from the entity type's full set.\n *\n * `showedOn` must include the query side. The accepted values are `\"detail\"`, `\"query\"`\n * and `\"both\"` — as the server model and the custom-actions guide have always\n * documented. Both grids previously tested for `\"list\"`, a value nothing emits, so an\n * action authored per the documentation rendered nowhere at all.\n *\n * ⚠️ This narrows what is DISPLAYED. It is NOT an authorization boundary: the grant\n * is, and it is enforced independently in `ExecuteCustomAction` regardless of which\n * query the caller clicked from — a caller can always POST directly.\n */\nexport function filterQueryActions(\n actions: CustomActionDefinition[],\n): CustomActionDefinition[] {\n return actions.filter(a => a.showedOn === 'query' || a.showedOn === 'both');\n}\n","/**\n * Parses a custom action's `selectionRule` — a cardinality expression over the number\n * of selected rows — into a predicate.\n *\n * A port of the server's `SelectionRuleParser`, and the two MUST agree: they are tested\n * against one shared fixture (`selection-rule.fixture.json`) for exactly this reason.\n * Vidyano, where this grammar comes from, has the same algorithm in C# and JavaScript and\n * the two have already drifted — one throws on a non-numeric operand where the other\n * silently permits everything.\n *\n * Grammar: `X` is the count placeholder, whitespace is insignificant, terms split on `X`\n * are AND-combined (`1<X<5` is a range), operators are `<= >= < > != =` matched in that\n * order so `>=` is never read as `>`, and a number-first term is mirrored (`0<X` is `>0`).\n *\n * Client-side this only drives whether a button is disabled. The server enforces the same\n * rule independently — and neither is an authorization boundary: the action's grant is.\n */\nexport function parseSelectionRule(rule?: string | null): (count: number) => boolean {\n if (!rule || !rule.trim()) return () => true;\n try {\n return compile(rule);\n } catch {\n // Unlike the server, which refuses to start on a malformed rule, the client cannot\n // usefully fail: the rule arrived over the wire from a server that already validated\n // it. Disabling the button is the safe direction — it never permits an action the\n // server would refuse.\n return () => false;\n }\n}\n\nconst OPERATORS = ['<=', '>=', '<', '>', '!=', '='] as const;\n\nfunction compile(rule: string): (count: number) => boolean {\n const normalized = rule.replace(/ /g, '').toUpperCase();\n const terms = normalized.split('X').filter(t => t.length > 0);\n if (terms.length === 0) throw new Error(`Selection rule '${rule}' has no condition.`);\n\n const numberFirst = !normalized.startsWith('X') && normalized.includes('X');\n const predicates = terms.map((term, i) => compileTerm(term, rule, numberFirst && i === 0));\n\n return count => predicates.every(p => p(count));\n}\n\nfunction compileTerm(term: string, rule: string, mirrored: boolean): (count: number) => boolean {\n const op = OPERATORS.find(o => (mirrored ? term.endsWith(o) : term.startsWith(o)));\n if (!op) throw new Error(`Selection rule '${rule}' has no recognised operator in '${term}'.`);\n\n const numberPart = mirrored ? term.slice(0, term.length - op.length) : term.slice(op.length);\n // Number(' ') is 0 and Number('1.5') is 1.5 — neither is a valid operand here.\n if (!/^-?\\d+$/.test(numberPart)) {\n throw new Error(`Selection rule '${rule}' has a non-numeric operand in '${term}'.`);\n }\n const value = Number(numberPart);\n const effective = mirrored ? mirror(op) : op;\n\n switch (effective) {\n case '<=': return count => count <= value;\n case '>=': return count => count >= value;\n case '<': return count => count < value;\n case '>': return count => count > value;\n case '!=': return count => count !== value;\n case '=': return count => count === value;\n default: throw new Error(`Selection rule '${rule}' has an unsupported operator '${effective}'.`);\n }\n}\n\nfunction mirror(op: string): string {\n switch (op) {\n case '<': return '>';\n case '>': return '<';\n case '<=': return '>=';\n case '>=': return '<=';\n default: return op;\n }\n}\n","import { CustomActionDefinition } from './custom-action';\nimport { parseSelectionRule } from './selection-rule';\n\nexport type SparkSelectionMode = 'none' | 'single' | 'multiple';\n\n/**\n * The selection mode a grid needs in order to satisfy the actions offered on it.\n *\n * Derived rather than configured, so a grid gains a checkbox column exactly when an\n * action needs one and is otherwise pixel-identical to a grid with no selection at all.\n * Vidyano's query grid does the same thing — it renders the checkbox column only if some\n * action is selection-gated.\n *\n * `'single'` when every gated action is satisfied by one row and refused by two; anything\n * else that cares about the count gets `'multiple'`.\n */\nexport function selectionModeFor(actions: CustomActionDefinition[]): SparkSelectionMode {\n // An action with no rule is not selection-gated: it acts on the query, not on rows.\n const gated = actions.filter(a => !!a.selectionRule?.trim());\n if (gated.length === 0) return 'none';\n\n const everyRuleWantsExactlyOne = gated.every(a => {\n const rule = parseSelectionRule(a.selectionRule);\n return rule(1) && !rule(2);\n });\n\n return everyRuleWantsExactlyOne ? 'single' : 'multiple';\n}\n","import { EntityAttributeDefinition } from './entity-type';\nimport { PersistentObject } from './persistent-object';\nimport { ValidationRule } from './validation-rule';\n\n/**\n * One selectable value, as replaced by a refresh hook. Mirrors the server's\n * `PersistentObjectAttributeOption`.\n */\nexport interface RefreshedOption {\n key: string;\n label?: Record<string, string>;\n}\n\n/**\n * What a refresh changed about one attribute's *presentation*.\n *\n * Kept separate from `EntityType` on purpose. The form's option loading hangs off a single effect\n * keyed on `entityType` identity, and `SparkService` caches nothing — so applying a refresh by\n * setting a new `EntityType` re-issues every reference query, every lookup fetch, a full\n * `getEntityTypes()` and a `getPermissions()` per array-AsDetail attribute, on every refresh.\n * Mutating the existing object instead is inert, because the rendering computed would not re-run.\n * An overlay is the only shape that is both reactive and free.\n */\nexport interface AttributeOverlay {\n isRequired?: boolean;\n isReadOnly?: boolean;\n isVisible?: boolean;\n rules?: ValidationRule[];\n query?: string;\n /** `undefined` means the hook did not touch the options; an empty array means there are none. */\n options?: RefreshedOption[];\n}\n\nexport type RefreshOverlay = Record<string, AttributeOverlay>;\n\n/** Applies an overlay to one attribute definition, returning a new object when anything changed. */\nexport function applyOverlay(\n attr: EntityAttributeDefinition,\n overlay: AttributeOverlay | undefined,\n): EntityAttributeDefinition {\n if (!overlay) return attr;\n\n return {\n ...attr,\n isRequired: overlay.isRequired ?? attr.isRequired,\n isReadOnly: overlay.isReadOnly ?? attr.isReadOnly,\n isVisible: overlay.isVisible ?? attr.isVisible,\n rules: overlay.rules ?? attr.rules,\n query: overlay.query ?? attr.query,\n };\n}\n\n/**\n * Reads a refresh response into an overlay.\n *\n * Everything here is presentation the server owns outright, so it is taken verbatim — there is no\n * merging to do on this half, only on values.\n */\nexport function overlayFromResponse(response: PersistentObject): RefreshOverlay {\n const overlay: RefreshOverlay = {};\n\n for (const attr of response.attributes ?? []) {\n overlay[attr.name] = {\n isRequired: attr.isRequired,\n isReadOnly: attr.isReadOnly,\n isVisible: attr.isVisible,\n rules: attr.rules ?? [],\n query: attr.query,\n options: (attr as { options?: RefreshedOption[] | null }).options ?? undefined,\n };\n }\n\n return overlay;\n}\n\n/**\n * Merges a refresh response's values into the live form.\n *\n * The rule, and the reason for it: a refresh is not instant, and the user keeps typing during it —\n * the form is deliberately never frozen. So for each attribute we ask whether the *server* changed\n * it, by comparing the response against the values that were **sent**, not against what is on\n * screen now.\n *\n * - server value equals what we sent → the hook did not touch it, so whatever is in the form now\n * wins, including anything typed while the request was in flight;\n * - server value differs → the hook deliberately changed it, and it wins over a concurrent edit.\n *\n * Comparing against the displayed value instead is the classic \"refresh eats my typing\" bug;\n * refusing to overwrite anything the user touched is the equally wrong opposite, where a dependent\n * field the hook computed never appears.\n *\n * @param sent values as they were POSTed, captured before the request left\n * @param current values as they are now, which may have moved on\n * @param response the reshaped object\n */\nexport function mergeRefreshValues(\n sent: Record<string, any>,\n current: Record<string, any>,\n response: PersistentObject,\n): Record<string, any> {\n const merged = { ...current };\n\n for (const attr of response.attributes ?? []) {\n const serverValue = attr.value ?? null;\n const sentValue = sent[attr.name] ?? null;\n\n if (!valuesEqual(serverValue, sentValue)) {\n merged[attr.name] = attr.value;\n }\n }\n\n return merged;\n}\n\n/**\n * Structural for arrays, `===` otherwise.\n *\n * Multi-reference attributes hold `string[]`, and a fresh array of the same ids is a different\n * object — so reference equality would report every one of them as \"changed by the server\" on\n * every refresh, and clobber in-flight edits to them.\n */\nfunction valuesEqual(a: any, b: any): boolean {\n if (a === b) return true;\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, i) => valuesEqual(item, b[i]));\n }\n // Values arrive off the wire as JSON scalars; anything else compares by JSON shape rather than\n // by identity, which is what a caller means by \"did this change\".\n if (a !== null && b !== null && typeof a === 'object' && typeof b === 'object') {\n return JSON.stringify(a) === JSON.stringify(b);\n }\n return false;\n}\n","import { ValidationRule } from './validation-rule';\nimport { TranslatedString } from './translated-string';\n\n/** One rule failure, in the shape the form already renders per field. */\nexport interface RuleFailure {\n attributeName: string;\n ruleType: string;\n message: string;\n}\n\nexport interface EvaluableAttribute {\n name: string;\n label?: TranslatedString;\n isRequired?: boolean;\n rules?: ValidationRule[];\n}\n\nconst EMAIL = /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/i;\nconst URL = /^https?:\\/\\/[^\\s]+$/i;\n\nfunction isEmpty(value: any): boolean {\n if (value === null || value === undefined) return true;\n if (typeof value === 'string') return value.trim() === '';\n if (Array.isArray(value)) return value.length === 0;\n return false;\n}\n\n/**\n * Evaluates an attribute's rules against a value, mirroring the server's `ValidationService`.\n *\n * ⚠️ **Parity with the server is the point, and disagreement is worse than silence.** A client that\n * rejects something the server would accept blocks legitimate work with no recourse; one that\n * accepts something the server rejects merely defers the error to the round-trip, which is where it\n * used to live anyway. So the rule set here is deliberately limited to the types the server\n * implements, and an unrecognised rule type is ignored rather than guessed at.\n *\n * This exists because a refresh hook that imposes a rule needs it to bite before Save — previously\n * `rules` was carried on the wire and never evaluated in the browser at all.\n */\nexport function evaluateRules(attr: EvaluableAttribute, value: any): RuleFailure[] {\n const failures: RuleFailure[] = [];\n const label = attr.label?.['en'] ?? attr.name;\n\n if (attr.isRequired && isEmpty(value)) {\n return [{ attributeName: attr.name, ruleType: 'required', message: `${label} is required` }];\n }\n\n // A rule other than \"required\" says nothing about an absent value — that is what required is for.\n if (isEmpty(value)) return failures;\n\n const text = value?.toString() ?? '';\n\n for (const rule of attr.rules ?? []) {\n const failure = evaluateRule(attr.name, label, rule, value, text);\n if (failure) failures.push(failure);\n }\n\n return failures;\n}\n\nfunction evaluateRule(\n name: string,\n label: string,\n rule: ValidationRule,\n value: any,\n text: string,\n): RuleFailure | null {\n const message = rule.message?.['en'];\n\n switch (rule.type?.toLowerCase()) {\n case 'maxlength': {\n const max = toInt(rule.value);\n if (max === null || text.length <= max) return null;\n return { attributeName: name, ruleType: 'maxLength', message: message ?? `${label} must be at most ${max} characters` };\n }\n case 'minlength': {\n const min = toInt(rule.value);\n if (min === null || text.length >= min) return null;\n return { attributeName: name, ruleType: 'minLength', message: message ?? `${label} must be at least ${min} characters` };\n }\n case 'range': {\n const numeric = toNumber(value);\n if (numeric === null) return null;\n if (rule.min !== undefined && rule.min !== null && numeric < rule.min) {\n return { attributeName: name, ruleType: 'range', message: message ?? `${label} must be at least ${rule.min}` };\n }\n if (rule.max !== undefined && rule.max !== null && numeric > rule.max) {\n return { attributeName: name, ruleType: 'range', message: message ?? `${label} must be at most ${rule.max}` };\n }\n return null;\n }\n case 'regex': {\n const pattern = rule.value?.toString();\n if (!pattern) return null;\n let re: RegExp;\n try {\n re = new RegExp(pattern);\n } catch {\n // An unparseable pattern is a server-side authoring bug. Staying silent leaves the server to\n // report it, which is strictly better than blocking the user over a rule nobody can evaluate.\n return null;\n }\n return re.test(text) ? null : { attributeName: name, ruleType: 'regex', message: message ?? `${label} is not in the expected format` };\n }\n case 'email':\n return EMAIL.test(text) ? null : { attributeName: name, ruleType: 'email', message: message ?? `${label} must be a valid email address` };\n case 'url':\n return URL.test(text) ? null : { attributeName: name, ruleType: 'url', message: message ?? `${label} must be a valid URL` };\n default:\n return null;\n }\n}\n\nfunction toInt(value: any): number | null {\n const n = Number(value);\n return Number.isFinite(n) ? Math.trunc(n) : null;\n}\n\nfunction toNumber(value: any): number | null {\n const n = Number(value);\n return Number.isFinite(n) ? n : null;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAIA;AACO,MAAM,eAAe,IACxB,UAAkB,CAAC,sBAAsB,KAAK,MAAM,CAAC,IAAI,CAAC;AAExD,SAAU,kBAAkB,CAAC,EAAgC,EAAE,IAAa,EAAA;AAChF,IAAA,IAAI,CAAC,EAAE;AAAE,QAAA,OAAO,EAAE;AAClB,IAAA,MAAM,QAAQ,GAAG,IAAI,IAAI,eAAe,EAAE;IAC1C,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;AAC/D;;ACZA;;;AAGG;IACS;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAS;AACT,IAAA,QAAA,CAAA,QAAA,CAAA,kBAAA,CAAA,GAAA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,KAAK,CAAC;AACvB,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI;AACtC;;ACzHA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-spark-models.mjs","sources":["../../models/src/translated-string.ts","../../models/src/showed-on.ts","../../models/src/entity-type.ts","../../models/src/as-detail-conversions.ts","../../models/src/query-result.ts","../../models/src/lookup-reference.ts","../../models/src/query-actions.ts","../../models/src/selection-rule.ts","../../models/src/selection-mode.ts","../../models/src/refresh-overlay.ts","../../models/src/rule-evaluation.ts","../../models/mintplayer-ng-spark-models.ts"],"sourcesContent":["import { signal, type WritableSignal } from '@angular/core';\n\nexport type TranslatedString = Record<string, string>;\n\n/** Global reactive language state — shared across library boundaries via globalThis */\nexport const currentLanguage: WritableSignal<string> =\n ((globalThis as any).__sparkCurrentLanguage ??= signal('en'));\n\nexport function resolveTranslation(ts: TranslatedString | undefined, lang?: string): string {\n if (!ts) return '';\n const language = lang ?? currentLanguage();\n return ts[language] ?? ts['en'] ?? Object.values(ts)[0] ?? '';\n}\n","/**\n * Flags enum controlling on which pages an attribute should be displayed.\n * Values can be combined: ShowedOn.Query | ShowedOn.PersistentObject\n */\nexport enum ShowedOn {\n Query = 1,\n PersistentObject = 2,\n}\n\n/**\n * Helper function to check if a ShowedOn value includes a specific flag.\n */\nexport function hasShowedOnFlag(value: ShowedOn | string | undefined, flag: ShowedOn): boolean {\n if (value === undefined) return true; // Default: show on all pages\n\n // Handle string values from JSON (e.g., \"Query, PersistentObject\")\n if (typeof value === 'string') {\n const parts = value.split(',').map(s => s.trim());\n const flagName = ShowedOn[flag];\n return parts.includes(flagName);\n }\n\n // Handle numeric flag values\n return (value & flag) === flag;\n}\n","import { ShowedOn } from './showed-on';\nimport { TranslatedString } from './translated-string';\nimport { ValidationRule } from './validation-rule';\n\n/**\n * Controls how a Reference attribute is picked in the PO-edit form.\n * Serialized as a string by the server (mirrors the .NET EReferenceDisplayType).\n */\nexport enum EReferenceDisplayType {\n /** Renders as a `<bs-select>` listing every referenced item. */\n Dropdown = 'Dropdown',\n /** Renders a readonly textbox + \"…\" button that opens a searchable modal grid picker. */\n Modal = 'Modal',\n}\n\nexport interface EntityAttributeDefinition {\n id: string;\n name: string;\n label?: TranslatedString;\n /** Help text rendered as an [i] tooltip beside the label. Absent when the model declares none. */\n description?: TranslatedString;\n dataType: string;\n isRequired: boolean;\n isVisible: boolean;\n isReadOnly: boolean;\n order: number;\n query?: string;\n /** For reference attributes, specifies the target entity type's CLR type name */\n referenceType?: string;\n /** For AsDetail attributes, specifies the nested entity type's CLR type name */\n asDetailType?: string;\n /** When true, the attribute represents an array/collection of AsDetail objects */\n isArray?: boolean;\n /** For array AsDetail attributes: \"modal\" (default) or \"inline\" */\n editMode?: 'inline' | 'modal';\n /**\n * For Reference attributes: 'Modal' renders the \"…\" + modal query-grid picker;\n * 'Dropdown'/absent (default) renders a `<bs-select>`. Hand-set in the model JSON.\n */\n referenceDisplayType?: EReferenceDisplayType;\n /** For array AsDetail attributes: when true, rows can be drag-reordered (order = array position) */\n isSortable?: boolean;\n /**\n * When true, changing this attribute's value posts the in-progress object to\n * `/spark/po/{objectTypeId}/refresh` and applies the reshaped result as an overlay.\n * Schema-only by design — it never travels on a PersistentObjectAttribute, so a client\n * cannot claim a trigger the model did not declare.\n */\n triggersRefresh?: boolean;\n /** For LookupReference attributes, specifies the lookup reference type name */\n lookupReferenceType?: string;\n /**\n * Controls on which pages the attribute should be displayed.\n * Query = shown in list views, PersistentObject = shown in detail/edit views.\n * Can be a numeric flag value or a string like \"Query, PersistentObject\".\n */\n showedOn?: ShowedOn | string;\n rules: ValidationRule[];\n /** References an AttributeGroup.id to assign this attribute to a group */\n group?: string;\n /** Number of grid columns this attribute spans within a tab's column layout */\n columnSpan?: number;\n /** Renderer component name for custom display in detail/list views */\n renderer?: string;\n /** Options passed to the renderer component */\n rendererOptions?: Record<string, any>;\n}\n\nexport interface AttributeTab {\n id: string;\n name: string;\n label?: TranslatedString;\n order: number;\n /** Number of columns for the grid layout within this tab */\n columnCount?: number;\n}\n\nexport interface AttributeGroup {\n id: string;\n name: string;\n label?: TranslatedString;\n /** References an AttributeTab.id to assign this group to a tab */\n tab?: string;\n order: number;\n}\n\nexport interface EntityType {\n id: string;\n name: string;\n description?: TranslatedString;\n /**\n * The backing CLR type, or absent for a JSON-only virtual type (#325).\n *\n * Optional on purpose: the server sends null for a virtual type, and this was declared\n * non-nullable, so any unguarded `.endsWith(...)` on it threw a TypeError naming an innocent\n * query. Types are data from the wire, not a promise about it.\n */\n clrType?: string;\n alias?: string;\n /**\n * Breadcrumb template: literal text plus `{AttributeName}` placeholders. A scalar placeholder\n * renders its value; a reference placeholder renders the referenced entity's breadcrumb.\n * The server resolves this — clients only read the resulting strings. Example: \"{Street}, {City}\".\n */\n breadcrumb?: string;\n /**\n * When false, the breadcrumb needs the collection document (a placeholder field is not on the\n * projection). null/absent means renderable from the projection. Informational on the client.\n */\n breadcrumbProjectionSatisfiable?: boolean;\n tabs?: AttributeTab[];\n groups?: AttributeGroup[];\n attributes: EntityAttributeDefinition[];\n /** Query aliases or IDs to display as related query tables on the detail page. */\n queries?: string[];\n}\n","import { EntityAttributeDefinition } from './entity-type';\nimport { EntityType } from './entity-type';\nimport { PersistentObject } from './persistent-object';\nimport { PersistentObjectAttribute } from './persistent-object-attribute';\n\n/**\n * Resolves an `EntityType` by its CLR type name (e.g. `\"HR.Entities.Address\"`).\n * Callers typically close over a list they already hold. `getEntityTypes()` is NOT cached --\n * it issues a request per call -- so resolve against a list you fetched once rather than\n * calling it inside the resolver.\n */\nexport type EntityTypeResolver = (clrTypeName: string) => EntityType | undefined;\n\n/**\n * Flattens a nested `PersistentObject` into the plain `Record<string, any>` shape the\n * form state uses throughout ng-spark. Primitive / reference attributes contribute their\n * `value`; nested AsDetail attributes recurse — single becomes an inner dict, array\n * becomes an array of inner dicts. Returns `{}` for `null` / `undefined` input.\n *\n * This is the ONE place that reads the server's new AsDetail wire shape and collapses it\n * back to the flat dict the form components already handle.\n */\nexport function nestedPoToDict(po: PersistentObject | null | undefined): Record<string, any> {\n if (!po) return {};\n const dict: Record<string, any> = {};\n for (const attr of po.attributes ?? []) {\n dict[attr.name] = attributeValueForForm(attr);\n }\n // The object's own server-resolved breadcrumb, kept under a reserved key so the form can label\n // it without re-deriving a template it may be structurally unable to resolve. Safe to carry\n // through save: `dictToNestedPo` walks the entity type's attributes, never the dict's keys, so\n // a reserved key is never sent to the server. Attached only when it resolved, which keeps the\n // common case byte-for-byte identical to the plain flat dict.\n if (typeof po.breadcrumb === 'string' && po.breadcrumb !== '') {\n dict[AS_DETAIL_SELF_BREADCRUMB_KEY] = po.breadcrumb;\n }\n return dict;\n}\n\nfunction attributeValueForForm(attr: PersistentObjectAttribute): any {\n if (attr.dataType === 'AsDetail') {\n if (attr.isArray) return (attr.objects ?? []).map(po => nestedPoToDict(po));\n return attr.object ? nestedPoToDict(attr.object) : null;\n }\n return attr.value;\n}\n\n/**\n * Reserved key under which a flattened nested object keeps the breadcrumb the SERVER resolved for\n * that object itself (as opposed to {@link AS_DETAIL_BREADCRUMBS_KEY}, which keys the breadcrumbs\n * of its reference attributes by attribute name).\n *\n * This exists because a breadcrumb template can name a property the model does not carry. HR's\n * `Address` declares `[Breadcrumb, IgnoreProperty] string Crumb`, and `Address.json` renders it as\n * `\"{Crumb}\"` — the server resolves that by reflecting over the CLR property, which no client can\n * do, because `[IgnoreProperty]` is exactly the instruction to keep it out of the model. Flattening\n * used to discard the resolved string, leaving the form to substitute `{Crumb}` against a dict that\n * can never contain it.\n */\nexport const AS_DETAIL_SELF_BREADCRUMB_KEY = '__sparkBreadcrumb';\n\n/**\n * The breadcrumb the server resolved for a flattened object, or null when it resolved to nothing.\n *\n * `EntityMapper` never emits an empty breadcrumb: when the template renders blank it substitutes\n * the CLR type name, so an unset `Address` arrives as the literal string `\"Address\"`\n * (EntityMapper.cs:209-211). That is a placeholder, not data, and rendering it would be worse than\n * rendering nothing — it reads as a real value. `typeName` lets a caller filter it back out.\n */\nexport function selfBreadcrumb(row: Record<string, any> | null | undefined, typeName?: string): string | null {\n const value = row?.[AS_DETAIL_SELF_BREADCRUMB_KEY];\n if (typeof value !== 'string' || value.trim() === '') return null;\n\n // Callers hold the type name in two shapes — `EntityType.name` is the short model name, while an\n // attribute's `asDetailType` is the full CLR name — and the server's placeholder is always the\n // short one. Compare on the last dotted segment so either shape filters it.\n if (typeName) {\n const shortName = typeName.slice(typeName.lastIndexOf('.') + 1);\n if (value === shortName) return null;\n }\n return value;\n}\n\n/**\n * Reserved key under which {@link nestedPoToDisplayRow} stashes the server-resolved breadcrumb of\n * each reference attribute (keyed by attribute name). Lets an AsDetail reference cell render the\n * label the server already resolved by id — page-independent — instead of guessing from a single\n * reference-query options page. Prefixed to avoid colliding with a real attribute name.\n */\nexport const AS_DETAIL_BREADCRUMBS_KEY = '__sparkBreadcrumbs';\n\n/**\n * Like {@link nestedPoToDict}, but for the read-only detail display path. In addition to each\n * attribute's value it preserves the server-resolved per-reference `breadcrumb` under\n * {@link AS_DETAIL_BREADCRUMBS_KEY}, so an AsDetail reference cell can render the label by id\n * regardless of whether the referenced document fits on the reference query's first options page.\n * The form/edit path keeps using {@link nestedPoToDict}, which never carries breadcrumbs.\n */\nexport function nestedPoToDisplayRow(po: PersistentObject | null | undefined): Record<string, any> {\n if (!po) return {};\n const dict: Record<string, any> = {};\n let breadcrumbs: Record<string, string> | undefined;\n for (const attr of po.attributes ?? []) {\n dict[attr.name] = displayValueForAttribute(attr);\n if (attr.dataType === 'Reference' && !attr.isArray && typeof attr.breadcrumb === 'string' && attr.breadcrumb !== '') {\n (breadcrumbs ??= {})[attr.name] = attr.breadcrumb;\n }\n }\n // Only attach the side channel when something resolved — keeps reference-free rows (the common\n // case) byte-for-byte identical to the plain flat dict.\n if (breadcrumbs) dict[AS_DETAIL_BREADCRUMBS_KEY] = breadcrumbs;\n // Same self-breadcrumb the form path carries: a nested-AsDetail COLUMN in a detail table has an\n // inner dict as its value, which used to stringify to \"[object Object]\".\n if (typeof po.breadcrumb === 'string' && po.breadcrumb !== '') {\n dict[AS_DETAIL_SELF_BREADCRUMB_KEY] = po.breadcrumb;\n }\n return dict;\n}\n\nfunction displayValueForAttribute(attr: PersistentObjectAttribute): any {\n if (attr.dataType === 'AsDetail') {\n if (attr.isArray) return (attr.objects ?? []).map(po => nestedPoToDisplayRow(po));\n return attr.object ? nestedPoToDisplayRow(attr.object) : null;\n }\n return attr.value;\n}\n\n/**\n * Builds a nested `PersistentObject` from a flat dict against the schema in\n * <paramref name=\"entityType\"/>. Used when the form is about to save — AsDetail attributes\n * are no longer sent as flat dicts in `attribute.value`; the server now requires\n * `attribute.object` / `attribute.objects` with fully scaffolded nested POs.\n *\n * `resolve` walks through AsDetail types registered elsewhere (usually the full\n * `getEntityTypes()` list, keyed by CLR type name). Nested AsDetail inside AsDetail is\n * handled recursively.\n */\nexport function dictToNestedPo(\n dict: Record<string, any> | null | undefined,\n entityType: EntityType,\n resolve: EntityTypeResolver,\n): PersistentObject {\n const attributes: PersistentObjectAttribute[] = (entityType.attributes ?? [])\n .map(attrDef => buildAttribute(attrDef, dict?.[attrDef.name], resolve));\n\n return {\n id: (dict?.['Id'] as string) ?? (dict?.['id'] as string) ?? '',\n name: entityType.name,\n objectTypeId: entityType.id,\n attributes,\n };\n}\n\nfunction buildAttribute(\n attrDef: EntityAttributeDefinition,\n raw: any,\n resolve: EntityTypeResolver,\n): PersistentObjectAttribute {\n const attr: PersistentObjectAttribute = {\n id: attrDef.id,\n name: attrDef.name,\n label: attrDef.label,\n dataType: attrDef.dataType,\n isArray: attrDef.isArray,\n isRequired: attrDef.isRequired,\n isVisible: attrDef.isVisible,\n isReadOnly: attrDef.isReadOnly,\n order: attrDef.order,\n rules: attrDef.rules ?? [],\n isValueChanged: true,\n };\n\n if (attrDef.dataType === 'AsDetail') {\n // Server expects attr.value null for AsDetail; the nested PO carries the data.\n attr.value = null;\n attr.asDetailType = attrDef.asDetailType;\n\n const nestedType = attrDef.asDetailType ? resolve(attrDef.asDetailType) : undefined;\n if (!nestedType) {\n attr.object = null;\n attr.objects = attrDef.isArray ? [] : null;\n return attr;\n }\n\n if (attrDef.isArray) {\n const items: any[] = Array.isArray(raw) ? raw : [];\n attr.objects = items.map(item => dictToNestedPo((item as Record<string, any>) ?? {}, nestedType, resolve));\n } else {\n attr.object = raw ? dictToNestedPo(raw as Record<string, any>, nestedType, resolve) : null;\n }\n return attr;\n }\n\n attr.value = raw;\n return attr;\n}\n","import { TranslatedString } from './translated-string';\nimport { PersistentObject } from './persistent-object';\nimport { AS_DETAIL_BREADCRUMBS_KEY } from './as-detail-conversions';\n\n/**\n * What a query returns: the column metadata once, then one lightweight row per result.\n *\n * Rows used to be full `PersistentObject`s, so every row repeated the complete attribute\n * metadata the client already held from `/spark/types` and never read off the row. More\n * importantly it conflated two things that are not the same: a **row is a projection**, a\n * **persistent object is a document**. Nothing here is entitled to act on a row — every\n * mutating path re-loads by id and re-applies security server-side.\n */\nexport interface QueryResult {\n columns: QueryColumn[];\n items: QueryResultItem[];\n /** Rows matching the query after filtering, before paging. */\n totalItems: number;\n skip: number;\n take: number;\n typeHints?: Record<string, string>;\n}\n\n/**\n * The subset of column metadata a cell needs in order to render.\n *\n * Both {@link QueryColumn} (a query result's column) and `EntityAttributeDefinition` (a detail\n * page's attribute) satisfy this, which is what lets one cell component serve the query grid and\n * the AsDetail sub-table without either side knowing about the other's shape.\n */\nexport interface SparkCellColumn {\n name: string;\n label?: TranslatedString;\n /** Help text rendered as an [i] tooltip in the column header. Absent when the model declares none. */\n description?: TranslatedString;\n dataType: string;\n isArray?: boolean;\n renderer?: string;\n rendererOptions?: Record<string, any>;\n referenceType?: string;\n lookupReferenceType?: string;\n asDetailType?: string;\n}\n\n/** One column of a query result, sent once rather than repeated on every row. */\nexport interface QueryColumn extends SparkCellColumn {\n order: number;\n isSortable?: boolean;\n /**\n * Whether the grid draws this column. `false` means the row carries the value but no column is\n * rendered — for a renderer that needs a sibling value (a lock glyph beside a name) without\n * spending a column on it. `showedOn` decides what ships; this decides what is drawn.\n */\n isVisible?: boolean;\n /** The query backing a Reference column, by name — the client's option source. */\n query?: string;\n}\n\n/**\n * One row: an id, a display string, and a value per column.\n *\n * Deliberately too weak to act on — no attribute metadata, no `can` block, no etag, because none\n * of those can be trusted from a projection.\n */\nexport interface QueryResultItem {\n /** Never null and unique within a result; the server refuses anything else. */\n id: string;\n /** What to show when the row is named rather than tabulated (a reference picker's value). */\n breadcrumb?: string;\n values: QueryResultItemValue[];\n /** Presentation hints for the whole row. Keys arrive lower-cased. */\n typeHints?: Record<string, string>;\n}\n\n/** One cell. */\nexport interface QueryResultItemValue {\n /** The {@link QueryColumn.name} this value belongs to. */\n key: string;\n /** Typed JSON, not a string — the server converts on the way out. */\n value?: any;\n /** For a reference cell: the target document's id, so a link needs no second lookup. */\n objectId?: string;\n /** For a reference cell: the target's display string. */\n breadcrumb?: string;\n /** Resolved display labels per referenced id, for a multi-reference cell. */\n breadcrumbs?: Record<string, string | null>;\n typeHints?: Record<string, string>;\n}\n\n/**\n * Every shape a renderer's `item` can arrive in.\n *\n * Three, and they are genuinely different objects rather than variations of one: a query grid hands\n * a {@link QueryResultItem}, an AsDetail sub-table hands the flat record `nestedPoToDisplayRow`\n * built, and a detail or form host hands the `PersistentObject` itself. A renderer reused across a\n * grid and an AsDetail table therefore sees two of them, which is why {@link valueFor} reads all\n * three rather than making every app write the branch.\n */\nexport type SparkRow = QueryResultItem | PersistentObject | Record<string, unknown>;\n\n/**\n * The value a row carries for a column, whatever shape the row is in — or `undefined` when it\n * carries none.\n *\n * ```ts\n * const isPrivate = valueFor(this.item(), 'IsPrivate')?.value === true;\n * ```\n *\n * Always returns the **cell** rather than the bare value, because a reference cell is worth as much\n * for its `objectId` as for its text, and a helper that discarded it would have to be replaced the\n * first time a renderer wanted to link somewhere. `?.value` is the cost, once per call site.\n *\n * ⚠️ A value only reaches a grid row if its attribute is on the **query surface**. To read a sibling\n * the grid does not draw, mark it `\"showedOn\": \"Query\", \"isVisible\": false` — shipped, not drawn. An\n * attribute marked `\"showedOn\": \"PersistentObject\"` is absent from a row by design, and this returns\n * `undefined` for it; that is the first thing to check when a sibling read comes back empty.\n */\nexport function valueFor(item: SparkRow | null | undefined, columnName: string): QueryResultItemValue | undefined {\n if (!item) return undefined;\n\n if (isQueryRow(item)) {\n return item.values.find(v => v.key === columnName);\n }\n\n if (isPersistentObject(item)) {\n const attribute = item.attributes.find(a => a.name === columnName);\n if (!attribute) return undefined;\n return {\n key: attribute.name,\n value: attribute.value,\n // A single reference's value IS the target's id, which is what the row shape carries\n // separately. Deriving it here keeps a renderer from having to know that.\n objectId: attribute.dataType === 'Reference' && !attribute.isArray && attribute.value != null\n ? String(attribute.value)\n : undefined,\n breadcrumb: attribute.breadcrumb,\n breadcrumbs: attribute.breadcrumbs,\n };\n }\n\n const record = item as Record<string, unknown>;\n if (!(columnName in record)) return undefined;\n\n const value = record[columnName];\n // The flat row's side channel is populated only for single references, so its presence for this\n // key is what identifies one — the record itself carries no dataType to ask.\n const breadcrumb = (record[AS_DETAIL_BREADCRUMBS_KEY] as Record<string, string> | undefined)?.[columnName];\n\n return {\n key: columnName,\n value,\n objectId: breadcrumb !== undefined && value != null ? String(value) : undefined,\n breadcrumb,\n };\n}\n\n/**\n * Whether this row is a query result item.\n *\n * Discriminated on the *elements*, not just on `Array.isArray(values)`: a flat AsDetail record may\n * legitimately have a column named `values` holding an array, and mistaking one for the other would\n * silently read the wrong thing.\n */\nexport function isQueryRow(row: SparkRow | null | undefined): row is QueryResultItem {\n const values = (row as QueryResultItem | undefined)?.values;\n return Array.isArray(values) && (values.length === 0 || typeof values[0]?.key === 'string');\n}\n\n/** Whether this row is a full persistent object. Discriminated on elements, as above. */\nexport function isPersistentObject(row: SparkRow | null | undefined): row is PersistentObject {\n const attributes = (row as PersistentObject | undefined)?.attributes;\n return Array.isArray(attributes) && (attributes.length === 0 || typeof attributes[0]?.name === 'string');\n}\n","import { TranslatedString } from './translated-string';\n\nexport enum ELookupDisplayType {\n Dropdown = 0,\n Modal = 1\n}\n\nexport interface LookupReferenceListItem {\n name: string;\n isTransient: boolean;\n valueCount: number;\n displayType: ELookupDisplayType;\n}\n\nexport interface LookupReference {\n name: string;\n isTransient: boolean;\n displayType: ELookupDisplayType;\n values: LookupReferenceValue[];\n}\n\nexport interface LookupReferenceValue {\n key: string;\n values: TranslatedString;\n isActive: boolean;\n extra?: Record<string, unknown>;\n}\n","import { CustomActionDefinition } from './custom-action';\n\n/**\n * The custom actions a query should offer, from the entity type's full set.\n *\n * `showedOn` must include the query side. The accepted values are `\"detail\"`, `\"query\"`\n * and `\"both\"` — as the server model and the custom-actions guide have always\n * documented. Both grids previously tested for `\"list\"`, a value nothing emits, so an\n * action authored per the documentation rendered nowhere at all.\n *\n * ⚠️ This narrows what is DISPLAYED. It is NOT an authorization boundary: the grant\n * is, and it is enforced independently in `ExecuteCustomAction` regardless of which\n * query the caller clicked from — a caller can always POST directly.\n */\nexport function filterQueryActions(\n actions: CustomActionDefinition[],\n): CustomActionDefinition[] {\n return actions.filter(a => a.showedOn === 'query' || a.showedOn === 'both');\n}\n","/**\n * Parses a custom action's `selectionRule` — a cardinality expression over the number\n * of selected rows — into a predicate.\n *\n * A port of the server's `SelectionRuleParser`, and the two MUST agree: they are tested\n * against one shared fixture (`selection-rule.fixture.json`) for exactly this reason.\n * Vidyano, where this grammar comes from, has the same algorithm in C# and JavaScript and\n * the two have already drifted — one throws on a non-numeric operand where the other\n * silently permits everything.\n *\n * Grammar: `X` is the count placeholder, whitespace is insignificant, terms split on `X`\n * are AND-combined (`1<X<5` is a range), operators are `<= >= < > != =` matched in that\n * order so `>=` is never read as `>`, and a number-first term is mirrored (`0<X` is `>0`).\n *\n * Client-side this only drives whether a button is disabled. The server enforces the same\n * rule independently — and neither is an authorization boundary: the action's grant is.\n */\nexport function parseSelectionRule(rule?: string | null): (count: number) => boolean {\n if (!rule || !rule.trim()) return () => true;\n try {\n return compile(rule);\n } catch {\n // Unlike the server, which refuses to start on a malformed rule, the client cannot\n // usefully fail: the rule arrived over the wire from a server that already validated\n // it. Disabling the button is the safe direction — it never permits an action the\n // server would refuse.\n return () => false;\n }\n}\n\nconst OPERATORS = ['<=', '>=', '<', '>', '!=', '='] as const;\n\nfunction compile(rule: string): (count: number) => boolean {\n const normalized = rule.replace(/ /g, '').toUpperCase();\n const terms = normalized.split('X').filter(t => t.length > 0);\n if (terms.length === 0) throw new Error(`Selection rule '${rule}' has no condition.`);\n\n const numberFirst = !normalized.startsWith('X') && normalized.includes('X');\n const predicates = terms.map((term, i) => compileTerm(term, rule, numberFirst && i === 0));\n\n return count => predicates.every(p => p(count));\n}\n\nfunction compileTerm(term: string, rule: string, mirrored: boolean): (count: number) => boolean {\n const op = OPERATORS.find(o => (mirrored ? term.endsWith(o) : term.startsWith(o)));\n if (!op) throw new Error(`Selection rule '${rule}' has no recognised operator in '${term}'.`);\n\n const numberPart = mirrored ? term.slice(0, term.length - op.length) : term.slice(op.length);\n // Number(' ') is 0 and Number('1.5') is 1.5 — neither is a valid operand here.\n if (!/^-?\\d+$/.test(numberPart)) {\n throw new Error(`Selection rule '${rule}' has a non-numeric operand in '${term}'.`);\n }\n const value = Number(numberPart);\n const effective = mirrored ? mirror(op) : op;\n\n switch (effective) {\n case '<=': return count => count <= value;\n case '>=': return count => count >= value;\n case '<': return count => count < value;\n case '>': return count => count > value;\n case '!=': return count => count !== value;\n case '=': return count => count === value;\n default: throw new Error(`Selection rule '${rule}' has an unsupported operator '${effective}'.`);\n }\n}\n\nfunction mirror(op: string): string {\n switch (op) {\n case '<': return '>';\n case '>': return '<';\n case '<=': return '>=';\n case '>=': return '<=';\n default: return op;\n }\n}\n","import { CustomActionDefinition } from './custom-action';\nimport { parseSelectionRule } from './selection-rule';\n\nexport type SparkSelectionMode = 'none' | 'single' | 'multiple';\n\n/**\n * The selection mode a grid needs in order to satisfy the actions offered on it.\n *\n * Derived rather than configured, so a grid gains a checkbox column exactly when an\n * action needs one and is otherwise pixel-identical to a grid with no selection at all.\n * Vidyano's query grid does the same thing — it renders the checkbox column only if some\n * action is selection-gated.\n *\n * `'single'` when every gated action is satisfied by one row and refused by two; anything\n * else that cares about the count gets `'multiple'`.\n */\nexport function selectionModeFor(actions: CustomActionDefinition[]): SparkSelectionMode {\n // An action with no rule is not selection-gated: it acts on the query, not on rows.\n const gated = actions.filter(a => !!a.selectionRule?.trim());\n if (gated.length === 0) return 'none';\n\n const everyRuleWantsExactlyOne = gated.every(a => {\n const rule = parseSelectionRule(a.selectionRule);\n return rule(1) && !rule(2);\n });\n\n return everyRuleWantsExactlyOne ? 'single' : 'multiple';\n}\n","import { EntityAttributeDefinition } from './entity-type';\nimport { PersistentObject } from './persistent-object';\nimport { ValidationRule } from './validation-rule';\n\n/**\n * One selectable value, as replaced by a refresh hook. Mirrors the server's\n * `PersistentObjectAttributeOption`.\n */\nexport interface RefreshedOption {\n key: string;\n label?: Record<string, string>;\n}\n\n/**\n * What a refresh changed about one attribute's *presentation*.\n *\n * Kept separate from `EntityType` on purpose. The form's option loading hangs off a single effect\n * keyed on `entityType` identity, and `SparkService` caches nothing — so applying a refresh by\n * setting a new `EntityType` re-issues every reference query, every lookup fetch, a full\n * `getEntityTypes()` and a `getPermissions()` per array-AsDetail attribute, on every refresh.\n * Mutating the existing object instead is inert, because the rendering computed would not re-run.\n * An overlay is the only shape that is both reactive and free.\n */\nexport interface AttributeOverlay {\n isRequired?: boolean;\n isReadOnly?: boolean;\n isVisible?: boolean;\n rules?: ValidationRule[];\n query?: string;\n /** `undefined` means the hook did not touch the options; an empty array means there are none. */\n options?: RefreshedOption[];\n}\n\nexport type RefreshOverlay = Record<string, AttributeOverlay>;\n\n/** Applies an overlay to one attribute definition, returning a new object when anything changed. */\nexport function applyOverlay(\n attr: EntityAttributeDefinition,\n overlay: AttributeOverlay | undefined,\n): EntityAttributeDefinition {\n if (!overlay) return attr;\n\n return {\n ...attr,\n isRequired: overlay.isRequired ?? attr.isRequired,\n isReadOnly: overlay.isReadOnly ?? attr.isReadOnly,\n isVisible: overlay.isVisible ?? attr.isVisible,\n rules: overlay.rules ?? attr.rules,\n query: overlay.query ?? attr.query,\n };\n}\n\n/**\n * Reads a refresh response into an overlay.\n *\n * Everything here is presentation the server owns outright, so it is taken verbatim — there is no\n * merging to do on this half, only on values.\n */\nexport function overlayFromResponse(response: PersistentObject): RefreshOverlay {\n const overlay: RefreshOverlay = {};\n\n for (const attr of response.attributes ?? []) {\n overlay[attr.name] = {\n isRequired: attr.isRequired,\n isReadOnly: attr.isReadOnly,\n isVisible: attr.isVisible,\n rules: attr.rules ?? [],\n query: attr.query,\n options: (attr as { options?: RefreshedOption[] | null }).options ?? undefined,\n };\n }\n\n return overlay;\n}\n\n/**\n * Merges a refresh response's values into the live form.\n *\n * The rule, and the reason for it: a refresh is not instant, and the user keeps typing during it —\n * the form is deliberately never frozen. So for each attribute we ask whether the *server* changed\n * it, by comparing the response against the values that were **sent**, not against what is on\n * screen now.\n *\n * - server value equals what we sent → the hook did not touch it, so whatever is in the form now\n * wins, including anything typed while the request was in flight;\n * - server value differs → the hook deliberately changed it, and it wins over a concurrent edit.\n *\n * Comparing against the displayed value instead is the classic \"refresh eats my typing\" bug;\n * refusing to overwrite anything the user touched is the equally wrong opposite, where a dependent\n * field the hook computed never appears.\n *\n * @param sent values as they were POSTed, captured before the request left\n * @param current values as they are now, which may have moved on\n * @param response the reshaped object\n */\nexport function mergeRefreshValues(\n sent: Record<string, any>,\n current: Record<string, any>,\n response: PersistentObject,\n): Record<string, any> {\n const merged = { ...current };\n\n for (const attr of response.attributes ?? []) {\n const serverValue = attr.value ?? null;\n const sentValue = sent[attr.name] ?? null;\n\n if (!valuesEqual(serverValue, sentValue)) {\n merged[attr.name] = attr.value;\n }\n }\n\n return merged;\n}\n\n/**\n * Structural for arrays, `===` otherwise.\n *\n * Multi-reference attributes hold `string[]`, and a fresh array of the same ids is a different\n * object — so reference equality would report every one of them as \"changed by the server\" on\n * every refresh, and clobber in-flight edits to them.\n */\nfunction valuesEqual(a: any, b: any): boolean {\n if (a === b) return true;\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, i) => valuesEqual(item, b[i]));\n }\n // Values arrive off the wire as JSON scalars; anything else compares by JSON shape rather than\n // by identity, which is what a caller means by \"did this change\".\n if (a !== null && b !== null && typeof a === 'object' && typeof b === 'object') {\n return JSON.stringify(a) === JSON.stringify(b);\n }\n return false;\n}\n","import { ValidationRule } from './validation-rule';\nimport { TranslatedString } from './translated-string';\n\n/** One rule failure, in the shape the form already renders per field. */\nexport interface RuleFailure {\n attributeName: string;\n ruleType: string;\n message: string;\n}\n\nexport interface EvaluableAttribute {\n name: string;\n label?: TranslatedString;\n isRequired?: boolean;\n rules?: ValidationRule[];\n}\n\nconst EMAIL = /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/i;\nconst URL = /^https?:\\/\\/[^\\s]+$/i;\n\nfunction isEmpty(value: any): boolean {\n if (value === null || value === undefined) return true;\n if (typeof value === 'string') return value.trim() === '';\n if (Array.isArray(value)) return value.length === 0;\n return false;\n}\n\n/**\n * Evaluates an attribute's rules against a value, mirroring the server's `ValidationService`.\n *\n * ⚠️ **Parity with the server is the point, and disagreement is worse than silence.** A client that\n * rejects something the server would accept blocks legitimate work with no recourse; one that\n * accepts something the server rejects merely defers the error to the round-trip, which is where it\n * used to live anyway. So the rule set here is deliberately limited to the types the server\n * implements, and an unrecognised rule type is ignored rather than guessed at.\n *\n * This exists because a refresh hook that imposes a rule needs it to bite before Save — previously\n * `rules` was carried on the wire and never evaluated in the browser at all.\n */\nexport function evaluateRules(attr: EvaluableAttribute, value: any): RuleFailure[] {\n const failures: RuleFailure[] = [];\n const label = attr.label?.['en'] ?? attr.name;\n\n if (attr.isRequired && isEmpty(value)) {\n return [{ attributeName: attr.name, ruleType: 'required', message: `${label} is required` }];\n }\n\n // A rule other than \"required\" says nothing about an absent value — that is what required is for.\n if (isEmpty(value)) return failures;\n\n const text = value?.toString() ?? '';\n\n for (const rule of attr.rules ?? []) {\n const failure = evaluateRule(attr.name, label, rule, value, text);\n if (failure) failures.push(failure);\n }\n\n return failures;\n}\n\nfunction evaluateRule(\n name: string,\n label: string,\n rule: ValidationRule,\n value: any,\n text: string,\n): RuleFailure | null {\n const message = rule.message?.['en'];\n\n switch (rule.type?.toLowerCase()) {\n case 'maxlength': {\n const max = toInt(rule.value);\n if (max === null || text.length <= max) return null;\n return { attributeName: name, ruleType: 'maxLength', message: message ?? `${label} must be at most ${max} characters` };\n }\n case 'minlength': {\n const min = toInt(rule.value);\n if (min === null || text.length >= min) return null;\n return { attributeName: name, ruleType: 'minLength', message: message ?? `${label} must be at least ${min} characters` };\n }\n case 'range': {\n const numeric = toNumber(value);\n if (numeric === null) return null;\n if (rule.min !== undefined && rule.min !== null && numeric < rule.min) {\n return { attributeName: name, ruleType: 'range', message: message ?? `${label} must be at least ${rule.min}` };\n }\n if (rule.max !== undefined && rule.max !== null && numeric > rule.max) {\n return { attributeName: name, ruleType: 'range', message: message ?? `${label} must be at most ${rule.max}` };\n }\n return null;\n }\n case 'regex': {\n const pattern = rule.value?.toString();\n if (!pattern) return null;\n let re: RegExp;\n try {\n re = new RegExp(pattern);\n } catch {\n // An unparseable pattern is a server-side authoring bug. Staying silent leaves the server to\n // report it, which is strictly better than blocking the user over a rule nobody can evaluate.\n return null;\n }\n return re.test(text) ? null : { attributeName: name, ruleType: 'regex', message: message ?? `${label} is not in the expected format` };\n }\n case 'email':\n return EMAIL.test(text) ? null : { attributeName: name, ruleType: 'email', message: message ?? `${label} must be a valid email address` };\n case 'url':\n return URL.test(text) ? null : { attributeName: name, ruleType: 'url', message: message ?? `${label} must be a valid URL` };\n default:\n return null;\n }\n}\n\nfunction toInt(value: any): number | null {\n const n = Number(value);\n return Number.isFinite(n) ? Math.trunc(n) : null;\n}\n\nfunction toNumber(value: any): number | null {\n const n = Number(value);\n return Number.is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AAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,CAAA,EAAG,KAAK,CAAA,8BAAA,CAAgC,EAAE;AAC3I,QAAA,KAAK,KAAK;AACR,YAAA,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,IAAI,CAAA,EAAG,KAAK,CAAA,oBAAA,CAAsB,EAAE;AAC7H,QAAA;AACE,YAAA,OAAO,IAAI;;AAEjB;AAEA,SAAS,KAAK,CAAC,KAAU,EAAA;AACvB,IAAA,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;AACvB,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI;AAClD;AAEA,SAAS,QAAQ,CAAC,KAAU,EAAA;AAC1B,IAAA,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;AACvB,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI;AACtC;;ACzHA;;AAEG;;;;"}
|
|
@@ -522,8 +522,10 @@ class QueryCellValuePipe {
|
|
|
522
522
|
if (cell.breadcrumb)
|
|
523
523
|
return cell.breadcrumb;
|
|
524
524
|
if (column.dataType === 'AsDetail') {
|
|
525
|
-
//
|
|
526
|
-
// pluralisation — is decided here, where the language is.
|
|
525
|
+
// An array cell carries a child COUNT rather than the children, so the wording — and its
|
|
526
|
+
// pluralisation — is decided here, where the language is. A single-child cell carries the
|
|
527
|
+
// child object (for a renderer to read) and is displayed by the server-resolved breadcrumb
|
|
528
|
+
// above, never by stringifying it here.
|
|
527
529
|
if (!column.isArray)
|
|
528
530
|
return '';
|
|
529
531
|
const count = typeof cell.value === 'number' ? cell.value : 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-spark-pipes.mjs","sources":["../../pipes/src/translate-key.pipe.ts","../../pipes/src/resolve-translation.pipe.ts","../../pipes/src/input-type.pipe.ts","../../pipes/src/apply-field-template.ts","../../pipes/src/attribute-value.pipe.ts","../../pipes/src/raw-attribute-value.pipe.ts","../../pipes/src/reference-display-value.pipe.ts","../../pipes/src/reference-attr-value.pipe.ts","../../pipes/src/reference-link-route.pipe.ts","../../pipes/src/reference-chips.pipe.ts","../../pipes/src/router-link.pipe.ts","../../pipes/src/as-detail-type.pipe.ts","../../pipes/src/as-detail-columns.pipe.ts","../../pipes/src/as-detail-cell-value.pipe.ts","../../pipes/src/as-detail-display-value.pipe.ts","../../pipes/src/can-create-detail-row.pipe.ts","../../pipes/src/can-delete-detail-row.pipe.ts","../../pipes/src/lookup-display-type.pipe.ts","../../pipes/src/lookup-display-value.pipe.ts","../../pipes/src/lookup-options.pipe.ts","../../pipes/src/inline-ref-options.pipe.ts","../../pipes/src/error-for-attribute.pipe.ts","../../pipes/src/icon-name.pipe.ts","../../pipes/src/array-value.pipe.ts","../../pipes/src/query-cell.pipe.ts","../../pipes/mintplayer-ng-spark-pipes.ts"],"sourcesContent":["import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { SparkLanguageService } from '@mintplayer/ng-spark/services';\n\n@Pipe({ name: 't', pure: false, standalone: true })\nexport class TranslateKeyPipe implements PipeTransform {\n private readonly lang = inject(SparkLanguageService);\n\n transform(key: string): string {\n return this.lang.t(key);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { TranslatedString, resolveTranslation } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'resolveTranslation', standalone: true, pure: false })\nexport class ResolveTranslationPipe implements PipeTransform {\n transform(value: TranslatedString | undefined, fallback?: string): string {\n return resolveTranslation(value) || fallback || '';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'inputType', standalone: true, pure: true })\nexport class InputTypePipe implements PipeTransform {\n transform(dataType: string): string {\n switch (dataType) {\n case 'number':\n case 'decimal':\n return 'number';\n case 'boolean':\n return 'checkbox';\n case 'datetime':\n return 'datetime-local';\n case 'date':\n return 'date';\n case 'color':\n return 'color';\n case 'url':\n case 'image':\n // Both hold a URL, so `url` gets the browser's own validation and keyboard. `image` is a\n // link to an image rather than an upload: the value is still a string the author types.\n return 'url';\n default:\n return 'text';\n }\n }\n}\n","/**\n * Fills a `{Field}` template from a plain object's own fields. Used ONLY for AsDetail\n * nested-object summary display: an embedded value object (no id, no document) is rendered\n * client-side from its own fields. This is deliberately distinct from entity/reference\n * breadcrumbs — those are resolved recursively on the server (BreadcrumbResolver) and the\n * client only reads the resulting strings. Unknown or null placeholders render empty.\n */\nexport function applyFieldTemplate(template: string, data: Record<string, any>): string {\n return template.replace(/\\{(\\w+)\\}/g, (_match, propertyName) => {\n const value = data[propertyName];\n return value != null ? String(value) : '';\n });\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType, LookupReference, PersistentObject, nestedPoToDict, resolveTranslation } from '@mintplayer/ng-spark/models';\nimport { applyFieldTemplate } from './apply-field-template';\n\n@Pipe({ name: 'attributeValue', standalone: true, pure: true })\nexport class AttributeValuePipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null, entityType: EntityType | null, lookupRefOptions: Record<string, LookupReference>, allEntityTypes: EntityType[]): any {\n if (!item) return '';\n const attr = item.attributes.find(a => a.name === attrName);\n if (!attr) return '';\n\n if (attr.breadcrumb) return attr.breadcrumb;\n\n const attrDef = entityType?.attributes.find(a => a.name === attrName);\n if (attrDef?.dataType === 'AsDetail') {\n // Server emits nested PO(s) in attr.objects (array) / attr.object (single) — attr.value is null.\n if (attr.isArray) {\n const count = attr.objects?.length ?? 0;\n if (count === 0) return '';\n return `${count} item${count !== 1 ? 's' : ''}`;\n }\n if (attr.object) {\n // The server has already resolved this object's breadcrumb, and it can resolve templates\n // this side cannot. A type's breadcrumb may name a computed property that `[IgnoreProperty]`\n // keeps out of the model — HR's `Address.Crumb` is exactly that, `[Breadcrumb, IgnoreProperty]`\n // — so the template `{Crumb}` has no matching attribute here and never will. Recomputing it\n // client-side produced an empty string and fell through to \"(object)\" while the correct\n // \"Deinzestraat 231, 9700 Oudenaarde\" sat unread on `attr.object.breadcrumb`.\n if (attr.object.breadcrumb) return attr.object.breadcrumb;\n return this.formatAsDetailValue(attrDef, nestedPoToDict(attr.object), allEntityTypes);\n }\n }\n\n if (attrDef?.lookupReferenceType && attr.value != null && attr.value !== '') {\n const lookupRef = lookupRefOptions[attrDef.lookupReferenceType];\n if (lookupRef) {\n const option = lookupRef.values.find(v => v.key === String(attr.value));\n if (option) {\n return resolveTranslation(option.values) || option.key;\n }\n }\n }\n\n if (attrDef?.dataType === 'boolean') {\n return attr.value ?? null;\n }\n\n return attr.value ?? '';\n }\n\n private formatAsDetailValue(attrDef: EntityAttributeDefinition, value: Record<string, any>, allEntityTypes: EntityType[]): string {\n const asDetailType = allEntityTypes.find(t => t.clrType === attrDef.asDetailType);\n\n if (asDetailType?.breadcrumb) {\n const result = applyFieldTemplate(asDetailType.breadcrumb, value);\n if (result && result.trim()) return result;\n }\n\n // Last resort, reached when the type declares no breadcrumb or its template resolved to\n // nothing. Joining the scalar values is always more use to a reader than \"(object)\", which\n // named the failure rather than the row and looked identical for every unresolvable cell.\n return Object.values(value)\n .filter(v => v != null && typeof v !== 'object' && String(v).trim() !== '')\n .join(', ');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'rawAttributeValue', standalone: true, pure: true })\nexport class RawAttributeValuePipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null): any {\n return item?.attributes.find(a => a.name === attrName)?.value;\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { EntityAttributeDefinition, PersistentObject, QueryResultItem } from '@mintplayer/ng-spark/models';\nimport { SparkLanguageService } from '@mintplayer/ng-spark/services';\n\n@Pipe({ name: 'referenceDisplayValue', standalone: true, pure: true })\nexport class ReferenceDisplayValuePipe implements PipeTransform {\n private readonly lang = inject(SparkLanguageService);\n\n transform(attr: EntityAttributeDefinition, formData: Record<string, any>, referenceOptions: Record<string, QueryResultItem[]>): string {\n const selectedId = formData[attr.name];\n if (!selectedId) return this.lang.t('notSelected');\n\n const options = referenceOptions[attr.name] || [];\n const selected = options.find(o => o.id === selectedId);\n // The server resolves a row's display string into `breadcrumb`; falling back to the id\n // beats showing nothing, and there is no third source now that a row carries no `name`.\n return selected?.breadcrumb || selectedId;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'referenceAttrValue', standalone: true, pure: true })\nexport class ReferenceAttrValuePipe implements PipeTransform {\n transform(item: PersistentObject, attrName: string): any {\n const attr = item.attributes.find(a => a.name === attrName);\n if (!attr) return '';\n if (attr.breadcrumb) return attr.breadcrumb;\n return attr.value ?? '';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityType } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'referenceLinkRoute', standalone: true, pure: true })\nexport class ReferenceLinkRoutePipe implements PipeTransform {\n transform(referenceClrType: string, referenceId: any, allEntityTypes: EntityType[]): string[] | null {\n if (!referenceId || !referenceClrType) return null;\n const targetType = allEntityTypes.find(t => t.clrType === referenceClrType);\n if (!targetType) return null;\n return ['/po', targetType.alias || targetType.id, referenceId];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject } from '@mintplayer/ng-spark/models';\n\nexport interface ReferenceChip {\n id: string;\n label: string;\n}\n\n/**\n * Resolves a multi-reference attribute (`dataType === 'Reference'`, `isArray === true`)\n * to a list of chips. The attribute's `value` carries the id array; `breadcrumbs` (a\n * server-resolved id → label map) provides each chip's display label, falling back to\n * the id when no breadcrumb is present. Mirrors the single-reference `breadcrumb`\n * display, applied per id.\n */\n@Pipe({ name: 'referenceChips', standalone: true, pure: true })\nexport class ReferenceChipsPipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null): ReferenceChip[] {\n const attr = item?.attributes.find(a => a.name === attrName);\n if (!attr || !Array.isArray(attr.value)) return [];\n const breadcrumbs = attr.breadcrumbs ?? {};\n return attr.value\n .filter(v => v != null && v !== '')\n .map(v => {\n const id = String(v);\n return { id, label: breadcrumbs[id] || id };\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ProgramUnit } from '@mintplayer/ng-spark/models';\n\n/**\n * Maps a program unit to the router commands that open it. Type comparisons are exact: the\n * server's loader canonicalizes `type` casing, so tolerating variants here would only mask a\n * server that stopped doing so.\n *\n * Returns null for a `url` unit — an external address is an `<a href>`, not a router link; the\n * component rendering the menu owns that branch.\n */\n@Pipe({ name: 'routerLink', standalone: true, pure: true })\nexport class RouterLinkPipe implements PipeTransform {\n transform(unit: ProgramUnit): string[] | null {\n if (unit.type === 'query') {\n return ['/query', unit.alias || unit.queryId!];\n } else if (unit.type === 'persistentObject') {\n const type = unit.alias || unit.persistentObjectId!;\n return unit.objectId ? ['/po', type, unit.objectId] : ['/po', type];\n } else if (unit.type === 'url') {\n return null;\n }\n return ['/'];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'asDetailType', standalone: true, pure: true })\nexport class AsDetailTypePipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityType | null {\n return asDetailTypes[attr.name] || null;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'asDetailColumns', standalone: true, pure: true })\nexport class AsDetailColumnsPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityAttributeDefinition[] {\n const type = asDetailTypes[attr.name];\n if (!type) return [];\n return type.attributes\n .filter(a => a.isVisible)\n .sort((a, b) => a.order - b.order);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { AS_DETAIL_BREADCRUMBS_KEY, EntityAttributeDefinition, PersistentObject, QueryResultItem, selfBreadcrumb } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'asDetailCellValue', standalone: true, pure: true })\nexport class AsDetailCellValuePipe implements PipeTransform {\n transform(row: Record<string, any>, parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): string {\n const value = row[col.name];\n if (value == null) return '';\n\n if (col.dataType === 'Reference' && col.query) {\n // Prefer the breadcrumb the server already resolved by id — it is page-independent, so it\n // renders the label even when the referenced document falls outside the reference query's\n // first options page (issue #185).\n const serverBreadcrumb = (row[AS_DETAIL_BREADCRUMBS_KEY] as Record<string, string> | undefined)?.[col.name];\n if (serverBreadcrumb) return serverBreadcrumb;\n\n // Fallback: resolve against the loaded options page (legacy path).\n const parentOptions = asDetailRefOptions[parentAttr.name];\n if (parentOptions) {\n const options = parentOptions[col.name];\n if (options) {\n const match = options.find(o => o.id === value);\n if (match) return match.breadcrumb || String(value);\n }\n }\n }\n\n // A nested-AsDetail column's value is an inner dict, so String(value) produced \"[object\n // Object]\". The flattener kept that object's server-resolved breadcrumb for exactly this.\n if (col.dataType === 'AsDetail' && typeof value === 'object') {\n return selfBreadcrumb(value as Record<string, any>, col.asDetailType) ?? '';\n }\n\n return String(value);\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType, selfBreadcrumb } from '@mintplayer/ng-spark/models';\nimport { SparkLanguageService } from '@mintplayer/ng-spark/services';\nimport { applyFieldTemplate } from './apply-field-template';\n\n@Pipe({ name: 'asDetailDisplayValue', standalone: true, pure: true })\nexport class AsDetailDisplayValuePipe implements PipeTransform {\n private readonly lang = inject(SparkLanguageService);\n\n transform(attr: EntityAttributeDefinition, formData: Record<string, any>, asDetailTypes: Record<string, EntityType>): string {\n const value = formData[attr.name];\n if (!value) return this.lang.t('notSet');\n\n const asDetailType = asDetailTypes[attr.name] || null;\n\n // The server's own resolution wins, because it can render templates this side cannot: a\n // breadcrumb may name a property that `[IgnoreProperty]` deliberately keeps out of the model\n // (HR's `Address.Crumb`), and no amount of client-side substitution will ever find it. Passing\n // the type name filters out the mapper's \"template rendered blank\" placeholder, which is the\n // bare type name rather than an empty string — see `selfBreadcrumb`.\n const resolved = selfBreadcrumb(value, asDetailType?.name);\n if (resolved) return resolved;\n\n // Still correct for a template naming real, projected attributes (`\"{Street}, {City}\"`), which\n // is the common case and the only one reachable on the create path, where there is no server\n // object to have resolved anything yet.\n if (asDetailType?.breadcrumb) {\n const result = applyFieldTemplate(asDetailType.breadcrumb, value);\n if (result && result.trim()) return result;\n }\n\n return this.lang.t('clickToEdit');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityPermissions } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'canCreateDetailRow', standalone: true, pure: true })\nexport class CanCreateDetailRowPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean {\n const perms = permissions[attr.name];\n return perms ? perms.canCreate : true;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityPermissions } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'canDeleteDetailRow', standalone: true, pure: true })\nexport class CanDeleteDetailRowPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean {\n const perms = permissions[attr.name];\n return perms ? perms.canDelete : true;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ELookupDisplayType, EntityAttributeDefinition, LookupReference } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'lookupDisplayType', standalone: true, pure: true })\nexport class LookupDisplayTypePipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): ELookupDisplayType {\n const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;\n return lookupRef?.displayType ?? ELookupDisplayType.Dropdown;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, LookupReference, resolveTranslation } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'lookupDisplayValue', standalone: true, pure: true })\nexport class LookupDisplayValuePipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, formData: Record<string, any>, lookupRefOptions: Record<string, LookupReference>): string {\n const currentValue = formData[attr.name];\n if (currentValue == null || currentValue === '') return '';\n\n const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;\n const options = lookupRef?.values.filter(v => v.isActive) || [];\n const selected = options.find(o => o.key === String(currentValue));\n if (!selected) return String(currentValue);\n\n return resolveTranslation(selected.values) || selected.key;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, LookupReference, LookupReferenceValue } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'lookupOptions', standalone: true, pure: true })\nexport class LookupOptionsPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): LookupReferenceValue[] {\n const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;\n return lookupRef?.values.filter(v => v.isActive) || [];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, PersistentObject, QueryResultItem } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'inlineRefOptions', standalone: true, pure: true })\nexport class InlineRefOptionsPipe implements PipeTransform {\n transform(parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): QueryResultItem[] {\n return asDetailRefOptions[parentAttr.name]?.[col.name] || [];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ValidationError, resolveTranslation } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'errorForAttribute', standalone: true, pure: true })\nexport class ErrorForAttributePipe implements PipeTransform {\n transform(attrName: string, validationErrors: ValidationError[]): string | null {\n const error = validationErrors.find(e => e.attributeName === attrName);\n return error ? resolveTranslation(error.errorMessage) : null;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'iconName', standalone: true, pure: true })\nexport class IconNamePipe implements PipeTransform {\n transform(value: string | undefined, fallback: string): string {\n const iconClass = value || fallback;\n // Strip 'bi-' prefix if present\n return iconClass.startsWith('bi-') ? iconClass.substring(3) : iconClass;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject, nestedPoToDisplayRow } from '@mintplayer/ng-spark/models';\n\n/**\n * Resolves an attribute to a list of flat row dicts for the detail-page table.\n * AsDetail array attributes carry their data as nested PersistentObjects in\n * <c>attr.objects</c>, not <c>attr.value</c> — the server stopped putting flat\n * dicts in <c>value</c> when AsDetail moved to its dedicated wire shape. Without\n * this branch, the detail page rendered AsDetail arrays as empty tables even\n * when the edit page (which reads <c>attr.objects</c> directly) showed rows.\n */\n@Pipe({ name: 'arrayValue', standalone: true, pure: true })\nexport class ArrayValuePipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null): Record<string, any>[] {\n const attr = item?.attributes.find(a => a.name === attrName);\n if (!attr) return [];\n if (attr.dataType === 'AsDetail' && attr.isArray && Array.isArray(attr.objects)) {\n return attr.objects.map(po => nestedPoToDisplayRow(po));\n }\n if (Array.isArray(attr.value)) return attr.value;\n return [];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n LookupReference,\n QueryColumn,\n QueryResultItem,\n resolveTranslation,\n valueFor,\n} from '@mintplayer/ng-spark/models';\nimport { ReferenceChip } from './reference-chips.pipe';\n\n/**\n * The display text of one query-grid cell.\n *\n * The attribute-shaped sibling of this ({@link AttributeValuePipe}) still serves detail and edit\n * pages, which do work in attributes. They are deliberately not one pipe: a query row is a flat\n * projection with no nested objects and no per-row metadata, so the fallbacks that make sense\n * there — reaching into `attr.object`, recomputing a breadcrumb template client-side — are not\n * merely unnecessary here, they are unreachable. Sharing the code would mean carrying branches\n * that can never fire and inviting the next reader to feed one shape into the other.\n */\n@Pipe({ name: 'queryCellValue', standalone: true, pure: true })\nexport class QueryCellValuePipe implements PipeTransform {\n transform(\n column: QueryColumn,\n item: QueryResultItem | null,\n lookupRefOptions: Record<string, LookupReference>,\n ): any {\n const cell = valueFor(item, column.name);\n if (!cell) return '';\n\n // A resolved reference display wins: the server can resolve breadcrumb templates this side\n // cannot (a template may name a computed property `[IgnoreProperty]` keeps out of the model).\n if (cell.breadcrumb) return cell.breadcrumb;\n\n if (column.dataType === 'AsDetail') {\n // The projection carries a child COUNT rather than the children, so the wording — and its\n // pluralisation — is decided here, where the language is.\n if (!column.isArray) return '';\n const count = typeof cell.value === 'number' ? cell.value : 0;\n return count === 0 ? '' : `${count} item${count !== 1 ? 's' : ''}`;\n }\n\n if (column.lookupReferenceType && cell.value != null && cell.value !== '') {\n const lookupRef = lookupRefOptions[column.lookupReferenceType];\n const option = lookupRef?.values.find(v => v.key === String(cell.value));\n if (option) return resolveTranslation(option.values) || option.key;\n }\n\n // Null rather than '' so the cell can tell \"false\" from \"unset\" and render an indeterminate\n // checkbox instead of an unchecked one.\n if (column.dataType === 'boolean') return cell.value ?? null;\n\n return cell.value ?? '';\n }\n}\n\n/**\n * Resolves a multi-reference column (`dataType === 'Reference'`, `isArray === true`) to chips.\n *\n * The cell's `value` carries the id array and `breadcrumbs` the server-resolved id → label map,\n * falling back to the id itself when a label is missing — the same display rule as a single\n * reference, applied per id.\n */\n@Pipe({ name: 'queryReferenceChips', standalone: true, pure: true })\nexport class QueryReferenceChipsPipe implements PipeTransform {\n transform(column: QueryColumn, item: QueryResultItem | null): ReferenceChip[] {\n const cell = valueFor(item, column.name);\n if (!cell || !Array.isArray(cell.value)) return [];\n\n const breadcrumbs = cell.breadcrumbs ?? {};\n return cell.value\n .filter(v => v != null && v !== '')\n .map(v => {\n const id = String(v);\n return { id, label: breadcrumbs[id] || id };\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAIa,gBAAgB,CAAA;AACV,IAAA,IAAI,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAEpD,IAAA,SAAS,CAAC,GAAW,EAAA;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACzB;uGALW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,GAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,IAAI;mBAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;;;MCCrC,sBAAsB,CAAA;IACjC,SAAS,CAAC,KAAmC,EAAE,QAAiB,EAAA;QAC9D,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,QAAQ,IAAI,EAAE;IACpD;uGAHW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,IAAI;mBAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE;;;MCAtD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AA,OAAO,EAAE;AAElD,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE;QAC1C,OAAO,IAAI,CAAC;AACT,aAAA,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;aACjC,GAAG,CAAC,CAAC,IAAG;AACP,YAAA,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;AACpB,YAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE;AAC7C,QAAA,CAAC,CAAC;IACN;uGAZW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,IAAI;mBAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;;;AC/DnE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-spark-pipes.mjs","sources":["../../pipes/src/translate-key.pipe.ts","../../pipes/src/resolve-translation.pipe.ts","../../pipes/src/input-type.pipe.ts","../../pipes/src/apply-field-template.ts","../../pipes/src/attribute-value.pipe.ts","../../pipes/src/raw-attribute-value.pipe.ts","../../pipes/src/reference-display-value.pipe.ts","../../pipes/src/reference-attr-value.pipe.ts","../../pipes/src/reference-link-route.pipe.ts","../../pipes/src/reference-chips.pipe.ts","../../pipes/src/router-link.pipe.ts","../../pipes/src/as-detail-type.pipe.ts","../../pipes/src/as-detail-columns.pipe.ts","../../pipes/src/as-detail-cell-value.pipe.ts","../../pipes/src/as-detail-display-value.pipe.ts","../../pipes/src/can-create-detail-row.pipe.ts","../../pipes/src/can-delete-detail-row.pipe.ts","../../pipes/src/lookup-display-type.pipe.ts","../../pipes/src/lookup-display-value.pipe.ts","../../pipes/src/lookup-options.pipe.ts","../../pipes/src/inline-ref-options.pipe.ts","../../pipes/src/error-for-attribute.pipe.ts","../../pipes/src/icon-name.pipe.ts","../../pipes/src/array-value.pipe.ts","../../pipes/src/query-cell.pipe.ts","../../pipes/mintplayer-ng-spark-pipes.ts"],"sourcesContent":["import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { SparkLanguageService } from '@mintplayer/ng-spark/services';\n\n@Pipe({ name: 't', pure: false, standalone: true })\nexport class TranslateKeyPipe implements PipeTransform {\n private readonly lang = inject(SparkLanguageService);\n\n transform(key: string): string {\n return this.lang.t(key);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { TranslatedString, resolveTranslation } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'resolveTranslation', standalone: true, pure: false })\nexport class ResolveTranslationPipe implements PipeTransform {\n transform(value: TranslatedString | undefined, fallback?: string): string {\n return resolveTranslation(value) || fallback || '';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'inputType', standalone: true, pure: true })\nexport class InputTypePipe implements PipeTransform {\n transform(dataType: string): string {\n switch (dataType) {\n case 'number':\n case 'decimal':\n return 'number';\n case 'boolean':\n return 'checkbox';\n case 'datetime':\n return 'datetime-local';\n case 'date':\n return 'date';\n case 'color':\n return 'color';\n case 'url':\n case 'image':\n // Both hold a URL, so `url` gets the browser's own validation and keyboard. `image` is a\n // link to an image rather than an upload: the value is still a string the author types.\n return 'url';\n default:\n return 'text';\n }\n }\n}\n","/**\n * Fills a `{Field}` template from a plain object's own fields. Used ONLY for AsDetail\n * nested-object summary display: an embedded value object (no id, no document) is rendered\n * client-side from its own fields. This is deliberately distinct from entity/reference\n * breadcrumbs — those are resolved recursively on the server (BreadcrumbResolver) and the\n * client only reads the resulting strings. Unknown or null placeholders render empty.\n */\nexport function applyFieldTemplate(template: string, data: Record<string, any>): string {\n return template.replace(/\\{(\\w+)\\}/g, (_match, propertyName) => {\n const value = data[propertyName];\n return value != null ? String(value) : '';\n });\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType, LookupReference, PersistentObject, nestedPoToDict, resolveTranslation } from '@mintplayer/ng-spark/models';\nimport { applyFieldTemplate } from './apply-field-template';\n\n@Pipe({ name: 'attributeValue', standalone: true, pure: true })\nexport class AttributeValuePipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null, entityType: EntityType | null, lookupRefOptions: Record<string, LookupReference>, allEntityTypes: EntityType[]): any {\n if (!item) return '';\n const attr = item.attributes.find(a => a.name === attrName);\n if (!attr) return '';\n\n if (attr.breadcrumb) return attr.breadcrumb;\n\n const attrDef = entityType?.attributes.find(a => a.name === attrName);\n if (attrDef?.dataType === 'AsDetail') {\n // Server emits nested PO(s) in attr.objects (array) / attr.object (single) — attr.value is null.\n if (attr.isArray) {\n const count = attr.objects?.length ?? 0;\n if (count === 0) return '';\n return `${count} item${count !== 1 ? 's' : ''}`;\n }\n if (attr.object) {\n // The server has already resolved this object's breadcrumb, and it can resolve templates\n // this side cannot. A type's breadcrumb may name a computed property that `[IgnoreProperty]`\n // keeps out of the model — HR's `Address.Crumb` is exactly that, `[Breadcrumb, IgnoreProperty]`\n // — so the template `{Crumb}` has no matching attribute here and never will. Recomputing it\n // client-side produced an empty string and fell through to \"(object)\" while the correct\n // \"Deinzestraat 231, 9700 Oudenaarde\" sat unread on `attr.object.breadcrumb`.\n if (attr.object.breadcrumb) return attr.object.breadcrumb;\n return this.formatAsDetailValue(attrDef, nestedPoToDict(attr.object), allEntityTypes);\n }\n }\n\n if (attrDef?.lookupReferenceType && attr.value != null && attr.value !== '') {\n const lookupRef = lookupRefOptions[attrDef.lookupReferenceType];\n if (lookupRef) {\n const option = lookupRef.values.find(v => v.key === String(attr.value));\n if (option) {\n return resolveTranslation(option.values) || option.key;\n }\n }\n }\n\n if (attrDef?.dataType === 'boolean') {\n return attr.value ?? null;\n }\n\n return attr.value ?? '';\n }\n\n private formatAsDetailValue(attrDef: EntityAttributeDefinition, value: Record<string, any>, allEntityTypes: EntityType[]): string {\n const asDetailType = allEntityTypes.find(t => t.clrType === attrDef.asDetailType);\n\n if (asDetailType?.breadcrumb) {\n const result = applyFieldTemplate(asDetailType.breadcrumb, value);\n if (result && result.trim()) return result;\n }\n\n // Last resort, reached when the type declares no breadcrumb or its template resolved to\n // nothing. Joining the scalar values is always more use to a reader than \"(object)\", which\n // named the failure rather than the row and looked identical for every unresolvable cell.\n return Object.values(value)\n .filter(v => v != null && typeof v !== 'object' && String(v).trim() !== '')\n .join(', ');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'rawAttributeValue', standalone: true, pure: true })\nexport class RawAttributeValuePipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null): any {\n return item?.attributes.find(a => a.name === attrName)?.value;\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { EntityAttributeDefinition, PersistentObject, QueryResultItem } from '@mintplayer/ng-spark/models';\nimport { SparkLanguageService } from '@mintplayer/ng-spark/services';\n\n@Pipe({ name: 'referenceDisplayValue', standalone: true, pure: true })\nexport class ReferenceDisplayValuePipe implements PipeTransform {\n private readonly lang = inject(SparkLanguageService);\n\n transform(attr: EntityAttributeDefinition, formData: Record<string, any>, referenceOptions: Record<string, QueryResultItem[]>): string {\n const selectedId = formData[attr.name];\n if (!selectedId) return this.lang.t('notSelected');\n\n const options = referenceOptions[attr.name] || [];\n const selected = options.find(o => o.id === selectedId);\n // The server resolves a row's display string into `breadcrumb`; falling back to the id\n // beats showing nothing, and there is no third source now that a row carries no `name`.\n return selected?.breadcrumb || selectedId;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'referenceAttrValue', standalone: true, pure: true })\nexport class ReferenceAttrValuePipe implements PipeTransform {\n transform(item: PersistentObject, attrName: string): any {\n const attr = item.attributes.find(a => a.name === attrName);\n if (!attr) return '';\n if (attr.breadcrumb) return attr.breadcrumb;\n return attr.value ?? '';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityType } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'referenceLinkRoute', standalone: true, pure: true })\nexport class ReferenceLinkRoutePipe implements PipeTransform {\n transform(referenceClrType: string, referenceId: any, allEntityTypes: EntityType[]): string[] | null {\n if (!referenceId || !referenceClrType) return null;\n const targetType = allEntityTypes.find(t => t.clrType === referenceClrType);\n if (!targetType) return null;\n return ['/po', targetType.alias || targetType.id, referenceId];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject } from '@mintplayer/ng-spark/models';\n\nexport interface ReferenceChip {\n id: string;\n label: string;\n}\n\n/**\n * Resolves a multi-reference attribute (`dataType === 'Reference'`, `isArray === true`)\n * to a list of chips. The attribute's `value` carries the id array; `breadcrumbs` (a\n * server-resolved id → label map) provides each chip's display label, falling back to\n * the id when no breadcrumb is present. Mirrors the single-reference `breadcrumb`\n * display, applied per id.\n */\n@Pipe({ name: 'referenceChips', standalone: true, pure: true })\nexport class ReferenceChipsPipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null): ReferenceChip[] {\n const attr = item?.attributes.find(a => a.name === attrName);\n if (!attr || !Array.isArray(attr.value)) return [];\n const breadcrumbs = attr.breadcrumbs ?? {};\n return attr.value\n .filter(v => v != null && v !== '')\n .map(v => {\n const id = String(v);\n return { id, label: breadcrumbs[id] || id };\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ProgramUnit } from '@mintplayer/ng-spark/models';\n\n/**\n * Maps a program unit to the router commands that open it. Type comparisons are exact: the\n * server's loader canonicalizes `type` casing, so tolerating variants here would only mask a\n * server that stopped doing so.\n *\n * Returns null for a `url` unit — an external address is an `<a href>`, not a router link; the\n * component rendering the menu owns that branch.\n */\n@Pipe({ name: 'routerLink', standalone: true, pure: true })\nexport class RouterLinkPipe implements PipeTransform {\n transform(unit: ProgramUnit): string[] | null {\n if (unit.type === 'query') {\n return ['/query', unit.alias || unit.queryId!];\n } else if (unit.type === 'persistentObject') {\n const type = unit.alias || unit.persistentObjectId!;\n return unit.objectId ? ['/po', type, unit.objectId] : ['/po', type];\n } else if (unit.type === 'url') {\n return null;\n }\n return ['/'];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'asDetailType', standalone: true, pure: true })\nexport class AsDetailTypePipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityType | null {\n return asDetailTypes[attr.name] || null;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'asDetailColumns', standalone: true, pure: true })\nexport class AsDetailColumnsPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityAttributeDefinition[] {\n const type = asDetailTypes[attr.name];\n if (!type) return [];\n return type.attributes\n .filter(a => a.isVisible)\n .sort((a, b) => a.order - b.order);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { AS_DETAIL_BREADCRUMBS_KEY, EntityAttributeDefinition, PersistentObject, QueryResultItem, selfBreadcrumb } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'asDetailCellValue', standalone: true, pure: true })\nexport class AsDetailCellValuePipe implements PipeTransform {\n transform(row: Record<string, any>, parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): string {\n const value = row[col.name];\n if (value == null) return '';\n\n if (col.dataType === 'Reference' && col.query) {\n // Prefer the breadcrumb the server already resolved by id — it is page-independent, so it\n // renders the label even when the referenced document falls outside the reference query's\n // first options page (issue #185).\n const serverBreadcrumb = (row[AS_DETAIL_BREADCRUMBS_KEY] as Record<string, string> | undefined)?.[col.name];\n if (serverBreadcrumb) return serverBreadcrumb;\n\n // Fallback: resolve against the loaded options page (legacy path).\n const parentOptions = asDetailRefOptions[parentAttr.name];\n if (parentOptions) {\n const options = parentOptions[col.name];\n if (options) {\n const match = options.find(o => o.id === value);\n if (match) return match.breadcrumb || String(value);\n }\n }\n }\n\n // A nested-AsDetail column's value is an inner dict, so String(value) produced \"[object\n // Object]\". The flattener kept that object's server-resolved breadcrumb for exactly this.\n if (col.dataType === 'AsDetail' && typeof value === 'object') {\n return selfBreadcrumb(value as Record<string, any>, col.asDetailType) ?? '';\n }\n\n return String(value);\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { EntityAttributeDefinition, EntityType, selfBreadcrumb } from '@mintplayer/ng-spark/models';\nimport { SparkLanguageService } from '@mintplayer/ng-spark/services';\nimport { applyFieldTemplate } from './apply-field-template';\n\n@Pipe({ name: 'asDetailDisplayValue', standalone: true, pure: true })\nexport class AsDetailDisplayValuePipe implements PipeTransform {\n private readonly lang = inject(SparkLanguageService);\n\n transform(attr: EntityAttributeDefinition, formData: Record<string, any>, asDetailTypes: Record<string, EntityType>): string {\n const value = formData[attr.name];\n if (!value) return this.lang.t('notSet');\n\n const asDetailType = asDetailTypes[attr.name] || null;\n\n // The server's own resolution wins, because it can render templates this side cannot: a\n // breadcrumb may name a property that `[IgnoreProperty]` deliberately keeps out of the model\n // (HR's `Address.Crumb`), and no amount of client-side substitution will ever find it. Passing\n // the type name filters out the mapper's \"template rendered blank\" placeholder, which is the\n // bare type name rather than an empty string — see `selfBreadcrumb`.\n const resolved = selfBreadcrumb(value, asDetailType?.name);\n if (resolved) return resolved;\n\n // Still correct for a template naming real, projected attributes (`\"{Street}, {City}\"`), which\n // is the common case and the only one reachable on the create path, where there is no server\n // object to have resolved anything yet.\n if (asDetailType?.breadcrumb) {\n const result = applyFieldTemplate(asDetailType.breadcrumb, value);\n if (result && result.trim()) return result;\n }\n\n return this.lang.t('clickToEdit');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityPermissions } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'canCreateDetailRow', standalone: true, pure: true })\nexport class CanCreateDetailRowPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean {\n const perms = permissions[attr.name];\n return perms ? perms.canCreate : true;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, EntityPermissions } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'canDeleteDetailRow', standalone: true, pure: true })\nexport class CanDeleteDetailRowPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean {\n const perms = permissions[attr.name];\n return perms ? perms.canDelete : true;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ELookupDisplayType, EntityAttributeDefinition, LookupReference } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'lookupDisplayType', standalone: true, pure: true })\nexport class LookupDisplayTypePipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): ELookupDisplayType {\n const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;\n return lookupRef?.displayType ?? ELookupDisplayType.Dropdown;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, LookupReference, resolveTranslation } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'lookupDisplayValue', standalone: true, pure: true })\nexport class LookupDisplayValuePipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, formData: Record<string, any>, lookupRefOptions: Record<string, LookupReference>): string {\n const currentValue = formData[attr.name];\n if (currentValue == null || currentValue === '') return '';\n\n const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;\n const options = lookupRef?.values.filter(v => v.isActive) || [];\n const selected = options.find(o => o.key === String(currentValue));\n if (!selected) return String(currentValue);\n\n return resolveTranslation(selected.values) || selected.key;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, LookupReference, LookupReferenceValue } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'lookupOptions', standalone: true, pure: true })\nexport class LookupOptionsPipe implements PipeTransform {\n transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): LookupReferenceValue[] {\n const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;\n return lookupRef?.values.filter(v => v.isActive) || [];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EntityAttributeDefinition, PersistentObject, QueryResultItem } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'inlineRefOptions', standalone: true, pure: true })\nexport class InlineRefOptionsPipe implements PipeTransform {\n transform(parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, QueryResultItem[]>>): QueryResultItem[] {\n return asDetailRefOptions[parentAttr.name]?.[col.name] || [];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ValidationError, resolveTranslation } from '@mintplayer/ng-spark/models';\n\n@Pipe({ name: 'errorForAttribute', standalone: true, pure: true })\nexport class ErrorForAttributePipe implements PipeTransform {\n transform(attrName: string, validationErrors: ValidationError[]): string | null {\n const error = validationErrors.find(e => e.attributeName === attrName);\n return error ? resolveTranslation(error.errorMessage) : null;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'iconName', standalone: true, pure: true })\nexport class IconNamePipe implements PipeTransform {\n transform(value: string | undefined, fallback: string): string {\n const iconClass = value || fallback;\n // Strip 'bi-' prefix if present\n return iconClass.startsWith('bi-') ? iconClass.substring(3) : iconClass;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { PersistentObject, nestedPoToDisplayRow } from '@mintplayer/ng-spark/models';\n\n/**\n * Resolves an attribute to a list of flat row dicts for the detail-page table.\n * AsDetail array attributes carry their data as nested PersistentObjects in\n * <c>attr.objects</c>, not <c>attr.value</c> — the server stopped putting flat\n * dicts in <c>value</c> when AsDetail moved to its dedicated wire shape. Without\n * this branch, the detail page rendered AsDetail arrays as empty tables even\n * when the edit page (which reads <c>attr.objects</c> directly) showed rows.\n */\n@Pipe({ name: 'arrayValue', standalone: true, pure: true })\nexport class ArrayValuePipe implements PipeTransform {\n transform(attrName: string, item: PersistentObject | null): Record<string, any>[] {\n const attr = item?.attributes.find(a => a.name === attrName);\n if (!attr) return [];\n if (attr.dataType === 'AsDetail' && attr.isArray && Array.isArray(attr.objects)) {\n return attr.objects.map(po => nestedPoToDisplayRow(po));\n }\n if (Array.isArray(attr.value)) return attr.value;\n return [];\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n LookupReference,\n QueryColumn,\n QueryResultItem,\n resolveTranslation,\n valueFor,\n} from '@mintplayer/ng-spark/models';\nimport { ReferenceChip } from './reference-chips.pipe';\n\n/**\n * The display text of one query-grid cell.\n *\n * The attribute-shaped sibling of this ({@link AttributeValuePipe}) still serves detail and edit\n * pages, which do work in attributes. They are deliberately not one pipe: a query row is a flat\n * projection with no nested objects and no per-row metadata, so the fallbacks that make sense\n * there — reaching into `attr.object`, recomputing a breadcrumb template client-side — are not\n * merely unnecessary here, they are unreachable. Sharing the code would mean carrying branches\n * that can never fire and inviting the next reader to feed one shape into the other.\n */\n@Pipe({ name: 'queryCellValue', standalone: true, pure: true })\nexport class QueryCellValuePipe implements PipeTransform {\n transform(\n column: QueryColumn,\n item: QueryResultItem | null,\n lookupRefOptions: Record<string, LookupReference>,\n ): any {\n const cell = valueFor(item, column.name);\n if (!cell) return '';\n\n // A resolved reference display wins: the server can resolve breadcrumb templates this side\n // cannot (a template may name a computed property `[IgnoreProperty]` keeps out of the model).\n if (cell.breadcrumb) return cell.breadcrumb;\n\n if (column.dataType === 'AsDetail') {\n // An array cell carries a child COUNT rather than the children, so the wording — and its\n // pluralisation — is decided here, where the language is. A single-child cell carries the\n // child object (for a renderer to read) and is displayed by the server-resolved breadcrumb\n // above, never by stringifying it here.\n if (!column.isArray) return '';\n const count = typeof cell.value === 'number' ? cell.value : 0;\n return count === 0 ? '' : `${count} item${count !== 1 ? 's' : ''}`;\n }\n\n if (column.lookupReferenceType && cell.value != null && cell.value !== '') {\n const lookupRef = lookupRefOptions[column.lookupReferenceType];\n const option = lookupRef?.values.find(v => v.key === String(cell.value));\n if (option) return resolveTranslation(option.values) || option.key;\n }\n\n // Null rather than '' so the cell can tell \"false\" from \"unset\" and render an indeterminate\n // checkbox instead of an unchecked one.\n if (column.dataType === 'boolean') return cell.value ?? null;\n\n return cell.value ?? '';\n }\n}\n\n/**\n * Resolves a multi-reference column (`dataType === 'Reference'`, `isArray === true`) to chips.\n *\n * The cell's `value` carries the id array and `breadcrumbs` the server-resolved id → label map,\n * falling back to the id itself when a label is missing — the same display rule as a single\n * reference, applied per id.\n */\n@Pipe({ name: 'queryReferenceChips', standalone: true, pure: true })\nexport class QueryReferenceChipsPipe implements PipeTransform {\n transform(column: QueryColumn, item: QueryResultItem | null): ReferenceChip[] {\n const cell = valueFor(item, column.name);\n if (!cell || !Array.isArray(cell.value)) return [];\n\n const breadcrumbs = cell.breadcrumbs ?? {};\n return cell.value\n .filter(v => v != null && v !== '')\n .map(v => {\n const id = String(v);\n return { id, label: breadcrumbs[id] || id };\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAIa,gBAAgB,CAAA;AACV,IAAA,IAAI,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAEpD,IAAA,SAAS,CAAC,GAAW,EAAA;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACzB;uGALW,gBAAgB,EAAA,IAAA,EAAA,E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