@mintplayer/ng-spark 22.14.0 → 22.16.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-spark",
3
3
  "private": false,
4
- "version": "22.14.0",
4
+ "version": "22.16.0",
5
5
  "description": "Angular component library for MintPlayer.Spark CRUD applications",
6
6
  "repository": {
7
7
  "type": "git",
@@ -237,6 +237,19 @@ interface EntityType {
237
237
  attributes: EntityAttributeDefinition[];
238
238
  /** Query aliases or IDs to display as related query tables on the detail page. */
239
239
  queries?: string[];
240
+ /**
241
+ * The definitions of this type's AsDetail row types, sent alongside it so a detail table can draw
242
+ * its columns.
243
+ *
244
+ * Needed because a row type usually has no rights of its own — a row is edited through its parent
245
+ * — and the entity-type catalogue is gated on `Query`. Resolving a row type from the catalogue
246
+ * therefore failed silently, and the table rendered with **no columns at all**.
247
+ *
248
+ * Per-caller and gated on the *parent's* right, which is the same gate that already ships each
249
+ * row's attribute schema inside `attr.objects`. Pruned server-side: no `queryType`, `indexName`,
250
+ * `queries` or `alias`.
251
+ */
252
+ detailTypes?: EntityType[];
240
253
  }
241
254
 
242
255
  type SparkQueryRenderMode = 'Pagination' | 'VirtualScrolling';
@@ -581,6 +594,17 @@ declare const AS_DETAIL_ROW_KEY = "__sparkRowKey";
581
594
  * rendering nothing — it reads as a real value. `typeName` lets a caller filter it back out.
582
595
  */
583
596
  declare function selfBreadcrumb(row: Record<string, any> | null | undefined, typeName?: string): string | null;
597
+ /**
598
+ * The same filter as {@link selfBreadcrumb}, for a caller holding the server's breadcrumb string
599
+ * directly rather than a flattened row dict — `attr.object.breadcrumb` on a detail page, or a query
600
+ * cell's `breadcrumb`.
601
+ *
602
+ * Split out so there is exactly one answer to "is this the type-name placeholder?". The first
603
+ * implementation lived inside `selfBreadcrumb` and so covered only the two pipes that flatten a row
604
+ * first; the two that read the string straight off the wire kept printing `BuildFeedback` and
605
+ * `GateSettings` at users (#384). A second copy of the comparison is how that happens again.
606
+ */
607
+ declare function resolvedBreadcrumb(value: unknown, typeName?: string): string | null;
584
608
  /**
585
609
  * Reserved key under which {@link nestedPoToDisplayRow} stashes the server-resolved breadcrumb of
586
610
  * each reference attribute (keyed by attribute name). Lets an AsDetail reference cell render the
@@ -588,6 +612,16 @@ declare function selfBreadcrumb(row: Record<string, any> | null | undefined, typ
588
612
  * reference-query options page. Prefixed to avoid colliding with a real attribute name.
589
613
  */
590
614
  declare const AS_DETAIL_BREADCRUMBS_KEY = "__sparkBreadcrumbs";
615
+ /**
616
+ * Whether a flattened-row key is one this module reserved rather than a model attribute.
617
+ *
618
+ * `nestedPoToDict` and `nestedPoToDisplayRow` stash the row key and the resolved breadcrumbs
619
+ * alongside the real values, which is safe on the way back — `dictToNestedPo` walks the entity
620
+ * type's attributes and never the dict's keys. It is *not* safe for anything that enumerates the
621
+ * dict to build display text: a caller joining `Object.values(dict)` prints the row's guid and its
622
+ * own breadcrumb as though they were fields.
623
+ */
624
+ declare function isReservedAsDetailKey(key: string): boolean;
591
625
  /**
592
626
  * Like {@link nestedPoToDict}, but for the read-only detail display path. In addition to each
593
627
  * attribute's value it preserves the server-resolved per-reference `breadcrumb` under
@@ -740,5 +774,5 @@ interface EvaluableAttribute {
740
774
  */
741
775
  declare function evaluateRules(attr: EvaluableAttribute, value: any): RuleFailure[];
742
776
 
743
- export { AS_DETAIL_BREADCRUMBS_KEY, AS_DETAIL_ROW_KEY, AS_DETAIL_SELF_BREADCRUMB_KEY, ELookupDisplayType, EReferenceDisplayType, ShowedOn, applyOverlay, currentLanguage, dictToNestedPo, evaluateRules, filterQueryActions, hasShowedOnFlag, isPersistentObject, isQueryRow, mergeRefreshValues, nestedPoToDict, nestedPoToDisplayRow, overlayFromResponse, parseSelectionRule, resolveTranslation, selectionModeFor, selfBreadcrumb, valueFor };
777
+ export { AS_DETAIL_BREADCRUMBS_KEY, AS_DETAIL_ROW_KEY, AS_DETAIL_SELF_BREADCRUMB_KEY, ELookupDisplayType, EReferenceDisplayType, ShowedOn, applyOverlay, currentLanguage, dictToNestedPo, evaluateRules, filterQueryActions, hasShowedOnFlag, isPersistentObject, isQueryRow, isReservedAsDetailKey, mergeRefreshValues, nestedPoToDict, nestedPoToDisplayRow, overlayFromResponse, parseSelectionRule, resolveTranslation, resolvedBreadcrumb, selectionModeFor, selfBreadcrumb, valueFor };
744
778
  export type { AttributeGroup, AttributeOverlay, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, EntityTypeResolver, EvaluableAttribute, LookupReference, LookupReferenceListItem, LookupReferenceValue, PersistentObject, PersistentObjectAttribute, PersistentObjectPermissions, ProgramUnit, ProgramUnitGroup, ProgramUnitsConfiguration, QueryColumn, QueryResult, QueryResultItem, QueryResultItemValue, RefreshOverlay, RefreshedOption, RetryActionPayload, RetryActionResult, RuleFailure, SparkCellColumn, SparkQuery, SparkQueryRenderMode, SparkQuerySortColumn, SparkRow, SparkSelectionMode, StreamingErrorMessage, StreamingMessage, StreamingPatchItem, StreamingPatchMessage, StreamingSnapshotMessage, TranslatedString, ValidationError, ValidationErrorResponse, ValidationRule };
@@ -170,6 +170,23 @@ declare class CanDeleteDetailRowPipe implements PipeTransform {
170
170
  static ɵpipe: i0.ɵɵPipeDeclaration<CanDeleteDetailRowPipe, "canDeleteDetailRow", true>;
171
171
  }
172
172
 
173
+ /**
174
+ * Whether the caller may edit rows of an AsDetail attribute's row type.
175
+ *
176
+ * The third of the `can*DetailRow` family, and the one the server was already answering. `canEdit`
177
+ * has been computed, shipped and fetched per AsDetail attribute since row rights landed — it was
178
+ * simply never read for the row path, so the form offered an edit the save would undo.
179
+ *
180
+ * ⚠️ Apply this **read-only, never hidden**. A row the caller may not edit must stay fully
181
+ * readable; hiding the inputs would hide the data, which is a worse answer than showing it
182
+ * uneditable.
183
+ */
184
+ declare class CanEditDetailRowPipe implements PipeTransform {
185
+ transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
186
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanEditDetailRowPipe, never>;
187
+ static ɵpipe: i0.ɵɵPipeDeclaration<CanEditDetailRowPipe, "canEditDetailRow", true>;
188
+ }
189
+
173
190
  declare class LookupDisplayTypePipe implements PipeTransform {
174
191
  transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): ELookupDisplayType;
175
192
  static ɵfac: i0.ɵɵFactoryDeclaration<LookupDisplayTypePipe, never>;
@@ -248,5 +265,5 @@ declare class QueryReferenceChipsPipe implements PipeTransform {
248
265
  static ɵpipe: i0.ɵɵPipeDeclaration<QueryReferenceChipsPipe, "queryReferenceChips", true>;
249
266
  }
250
267
 
251
- export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, QueryCellValuePipe, QueryReferenceChipsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceChipsPipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RouterLinkPipe, TranslateKeyPipe };
268
+ export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, CanEditDetailRowPipe, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, QueryCellValuePipe, QueryReferenceChipsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceChipsPipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RouterLinkPipe, TranslateKeyPipe };
252
269
  export type { AsDetailCellValue, ReferenceChip };