@memberjunction/ng-base-forms 6.2.0-edge.7 → 6.2.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.
Files changed (84) hide show
  1. package/README.md +10 -0
  2. package/dist/lib/base-form-component.d.ts +15 -2
  3. package/dist/lib/base-form-component.d.ts.map +1 -1
  4. package/dist/lib/base-form-component.js +18 -8
  5. package/dist/lib/base-form-component.js.map +1 -1
  6. package/dist/lib/chrome/form-chrome-coordinator.service.d.ts.map +1 -1
  7. package/dist/lib/chrome/form-chrome-coordinator.service.js +4 -1
  8. package/dist/lib/chrome/form-chrome-coordinator.service.js.map +1 -1
  9. package/dist/lib/chrome/phone-viewport.d.ts +15 -0
  10. package/dist/lib/chrome/phone-viewport.d.ts.map +1 -0
  11. package/dist/lib/chrome/phone-viewport.js +28 -0
  12. package/dist/lib/chrome/phone-viewport.js.map +1 -0
  13. package/dist/lib/comments/form-record-comments-coordinator.service.d.ts +159 -0
  14. package/dist/lib/comments/form-record-comments-coordinator.service.d.ts.map +1 -0
  15. package/dist/lib/comments/form-record-comments-coordinator.service.js +421 -0
  16. package/dist/lib/comments/form-record-comments-coordinator.service.js.map +1 -0
  17. package/dist/lib/comments/record-comments.component.d.ts +205 -0
  18. package/dist/lib/comments/record-comments.component.d.ts.map +1 -0
  19. package/dist/lib/comments/record-comments.component.js +2019 -0
  20. package/dist/lib/comments/record-comments.component.js.map +1 -0
  21. package/dist/lib/container/record-form-container.component.d.ts +47 -1
  22. package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
  23. package/dist/lib/container/record-form-container.component.js +876 -316
  24. package/dist/lib/container/record-form-container.component.js.map +1 -1
  25. package/dist/lib/field/default-fk-lookup-strategy.d.ts.map +1 -1
  26. package/dist/lib/field/default-fk-lookup-strategy.js +14 -6
  27. package/dist/lib/field/default-fk-lookup-strategy.js.map +1 -1
  28. package/dist/lib/field/fk-lookup-strategy.d.ts +11 -0
  29. package/dist/lib/field/fk-lookup-strategy.d.ts.map +1 -1
  30. package/dist/lib/field/fk-lookup-strategy.js +10 -0
  31. package/dist/lib/field/fk-lookup-strategy.js.map +1 -1
  32. package/dist/lib/field/fk-search-utils.d.ts +17 -0
  33. package/dist/lib/field/fk-search-utils.d.ts.map +1 -1
  34. package/dist/lib/field/fk-search-utils.js +29 -0
  35. package/dist/lib/field/fk-search-utils.js.map +1 -1
  36. package/dist/lib/field/form-field.component.d.ts +35 -1
  37. package/dist/lib/field/form-field.component.d.ts.map +1 -1
  38. package/dist/lib/field/form-field.component.js +631 -446
  39. package/dist/lib/field/form-field.component.js.map +1 -1
  40. package/dist/lib/host/entity-form-host.component.d.ts +6 -0
  41. package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
  42. package/dist/lib/host/entity-form-host.component.js +17 -3
  43. package/dist/lib/host/entity-form-host.component.js.map +1 -1
  44. package/dist/lib/panel/collapsible-panel.component.d.ts +5 -0
  45. package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -1
  46. package/dist/lib/panel/collapsible-panel.component.js +109 -30
  47. package/dist/lib/panel/collapsible-panel.component.js.map +1 -1
  48. package/dist/lib/related-grid-height.d.ts +2 -2
  49. package/dist/lib/related-grid-height.d.ts.map +1 -1
  50. package/dist/lib/related-grid-height.js +2 -2
  51. package/dist/lib/related-grid-height.js.map +1 -1
  52. package/dist/lib/section-indicators/form-section-indicators.d.ts +4 -0
  53. package/dist/lib/section-indicators/form-section-indicators.d.ts.map +1 -1
  54. package/dist/lib/section-indicators/form-section-indicators.js +15 -1
  55. package/dist/lib/section-indicators/form-section-indicators.js.map +1 -1
  56. package/dist/lib/toolbar/actions/record-comments-toolbar-action.d.ts +17 -0
  57. package/dist/lib/toolbar/actions/record-comments-toolbar-action.d.ts.map +1 -0
  58. package/dist/lib/toolbar/actions/record-comments-toolbar-action.js +52 -0
  59. package/dist/lib/toolbar/actions/record-comments-toolbar-action.js.map +1 -0
  60. package/dist/lib/toolbar/base-form-toolbar-action.d.ts +9 -0
  61. package/dist/lib/toolbar/base-form-toolbar-action.d.ts.map +1 -1
  62. package/dist/lib/toolbar/base-form-toolbar-action.js.map +1 -1
  63. package/dist/lib/toolbar/form-toolbar.component.d.ts +107 -2
  64. package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
  65. package/dist/lib/toolbar/form-toolbar.component.js +927 -415
  66. package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
  67. package/dist/lib/types/form-toolbar-item.d.ts +1 -1
  68. package/dist/lib/types/form-toolbar-item.d.ts.map +1 -1
  69. package/dist/lib/types/form-toolbar-item.js.map +1 -1
  70. package/dist/lib/types/form-types.d.ts +8 -0
  71. package/dist/lib/types/form-types.d.ts.map +1 -1
  72. package/dist/lib/types/form-types.js.map +1 -1
  73. package/dist/lib/types/toolbar-config.d.ts +2 -0
  74. package/dist/lib/types/toolbar-config.d.ts.map +1 -1
  75. package/dist/lib/types/toolbar-config.js.map +1 -1
  76. package/dist/module.d.ts +15 -14
  77. package/dist/module.d.ts.map +1 -1
  78. package/dist/module.js +15 -5
  79. package/dist/module.js.map +1 -1
  80. package/dist/public-api.d.ts +3 -0
  81. package/dist/public-api.d.ts.map +1 -1
  82. package/dist/public-api.js +3 -0
  83. package/dist/public-api.js.map +1 -1
  84. package/package.json +20 -20
@@ -1 +1 @@
1
- {"version":3,"file":"default-fk-lookup-strategy.d.ts","sourceRoot":"","sources":["../../../src/lib/field/default-fk-lookup-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAkB9B,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,GAAG,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAMzF;AAgBD;;;;;;;;GAQG;AACH,qBAAa,uBAAwB,SAAQ,gBAAgB;IAC3D;;;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G,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAMzF;AAgBD;;;;;;;;GAQG;AACH,qBAAa,uBAAwB,SAAQ,gBAAgB;IAC3D;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAK;IAC7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAM;IAEhC,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IASvE,qGAAqG;IACrF,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM;IAI9D;;;;;;OAMG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO;IASzD,oEAAoE;IACpE,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM;IAKtD,gFAAgF;IAChF,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,EAAE;IAIvD,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM;IAKnD,4EAA4E;cAC5D,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAYxE;;;;OAIG;cACa,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;YAY1D,SAAS;cAqBP,OAAO,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAaxF,sFAAsF;IACtF,OAAO,CAAC,UAAU;IAOlB,iGAAiG;YACnF,UAAU;CAiBzB"}
@@ -7,7 +7,7 @@
7
7
  * `%` and `_` acting as live wildcards.
8
8
  */
9
9
  import { RunView, } from '@memberjunction/core';
10
- import { FKLookupStrategy, } from './fk-lookup-strategy';
10
+ import { FKLookupFailedError, FKLookupStrategy, } from './fk-lookup-strategy';
11
11
  import { EscapeSqlLikeValue, QuoteSqlIdList, RankByPrefix } from './fk-search-utils';
12
12
  /** The provider as a search source, or null when this one cannot rank records. */
13
13
  function asSearchSource(provider) {
@@ -100,7 +100,7 @@ export class DefaultFKLookupStrategy extends FKLookupStrategy {
100
100
  ResultType: 'simple',
101
101
  Fields: this.fieldsFor(context),
102
102
  });
103
- return result.Success ? result.Results.map(Values => ({ Values })) : [];
103
+ return rowsOrThrow(result, 'browse');
104
104
  }
105
105
  /**
106
106
  * Rank through the platform search API, then hydrate the winners in search order so the
@@ -144,7 +144,7 @@ export class DefaultFKLookupStrategy extends FKLookupStrategy {
144
144
  ResultType: 'simple',
145
145
  Fields: this.fieldsFor(context),
146
146
  });
147
- return result.Success ? result.Results.map(Values => ({ Values })) : [];
147
+ return rowsOrThrow(result, 'hydrate');
148
148
  }
149
149
  /** Re-impose the search API's ranking, which the hydrating view does not preserve. */
150
150
  orderByIds(rows, ids, pkField) {
@@ -165,9 +165,17 @@ export class DefaultFKLookupStrategy extends FKLookupStrategy {
165
165
  ResultType: 'simple',
166
166
  Fields: this.fieldsFor(context),
167
167
  });
168
- if (!result.Success)
169
- return [];
170
- return RankByPrefix(result.Results.map(Values => ({ Values })), context.Query, searchField);
168
+ return RankByPrefix(rowsOrThrow(result, 'search'), context.Query, searchField);
169
+ }
170
+ }
171
+ /**
172
+ * The rows of a successful view, or an {@link FKLookupFailedError}. A failed query must not come
173
+ * back as an empty list: the field would show "No matches" for a record that exists.
174
+ */
175
+ function rowsOrThrow(result, step) {
176
+ if (!result.Success) {
177
+ throw new FKLookupFailedError(`FK lookup ${step} failed: ${result.ErrorMessage || 'no error message'}`);
171
178
  }
179
+ return result.Results.map(Values => ({ Values }));
172
180
  }
173
181
  //# sourceMappingURL=default-fk-lookup-strategy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-fk-lookup-strategy.js","sourceRoot":"","sources":["../../../src/lib/field/default-fk-lookup-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,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AW,IAAI,OAAO,CAAC,SAAS,CAAC;QAC7D,MAAM,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;QAC7E,MAAM,OAAO,GAAG,gBAAgB,CAC9B,KAAK,EAAE,sBAAsB,IAAI,IAAI,EACrC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CACzC,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAA0B;YACnG,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC,IAAI;YACtC,WAAW,EAAE,cAAc,CAAC,IAAI,WAAW,UAAU,OAAO,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACzF,OAAO,EAAE,IAAI,WAAW,GAAG;YAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;SAChC,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,OAAO,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC9F,CAAC","sourcesContent":["/**\n * MJ's own rows for a foreign-key dropdown — the behaviour every field gets when no\n * {@link FKLookupStrategy} is registered for it.\n *\n * What this replaces: one `RunView` with `[<name>] LIKE '%<typed>%'`, no `OrderBy`, twenty rows.\n * On a large related entity that is twenty arbitrary records containing the letters typed, with\n * `%` and `_` acting as live wildcards.\n */\n\nimport {\n RunView,\n type EntitySearchResult,\n type IMetadataProvider,\n type SearchEntityParams,\n} from '@memberjunction/core';\nimport {\n FKLookupStrategy,\n type FKLookupContext,\n type FKLookupGroup,\n type FKLookupRow,\n} from './fk-lookup-strategy';\nimport { EscapeSqlLikeValue, QuoteSqlIdList, RankByPrefix } from './fk-search-utils';\n\n/**\n * A provider that can rank records through the platform search API. `SearchEntity` lives on\n * `IRunViewProvider`, which every shipped provider implements alongside `IMetadataProvider` —\n * but the field only ever holds the metadata half, so narrow before using it.\n */\ntype SearchCapableProvider = IMetadataProvider & {\n SearchEntity(params: SearchEntityParams): Promise<EntitySearchResult[]>;\n};\n\n/** The provider as a search source, or null when this one cannot rank records. */\nfunction asSearchSource(provider: IMetadataProvider): SearchCapableProvider | null {\n const candidate = provider as SearchCapableProvider;\n return typeof candidate.SearchEntity === 'function' ? candidate : null;\n}\n\n/** AND-join the non-empty fragments, each parenthesized so precedence survives. */\nexport function CombineFilters(...parts: ReadonlyArray<string | null | undefined>): string {\n return parts\n .map(p => (p ?? '').trim())\n .filter(p => p.length > 0)\n .map(p => `(${p})`)\n .join(' AND ');\n}\n\n/** `LIKE` pattern for one field, honouring the field's own `UserSearchPredicateAPI`. */\nfunction buildLikePattern(predicate: string | null, escaped: string): string {\n switch ((predicate ?? '').trim().toLowerCase()) {\n case 'beginswith':\n return `'${escaped}%'`;\n case 'endswith':\n return `'%${escaped}'`;\n case 'exact':\n return `'${escaped}'`;\n default:\n return `'%${escaped}%'`;\n }\n}\n\n/**\n * The stock lookup: browse by name for the empty query; for a typed one, an escaped `LIKE` on the\n * column the user is searching, prefix matches first. The field's `RelatedEntityFilter` and the\n * `[FKExtraFilter]` input apply to both, in SQL. `{ SearchMode: 'hybrid' }` in `[FKLookupOptions]`\n * ranks through the platform search API instead and hydrates the winners in search order.\n *\n * Subclass it rather than {@link FKLookupStrategy} when an app wants MJ's querying but its own\n * grouping or decoration — `fieldsFor` and `baseFilter` are the hooks for that.\n */\nexport class DefaultFKLookupStrategy extends FKLookupStrategy {\n /**\n * `SearchEntity` takes no filter, so the metadata filter can only be applied when hydrating the\n * IDs it returned. Over-fetch so a filter that removes most of the matches still leaves a usable\n * list; when it removes all of them the LIKE path, which filters in SQL, answers instead.\n */\n private static readonly SEARCH_OVERFETCH = 4;\n private static readonly SEARCH_MIN_TOPK = 25;\n\n public async Lookup(context: FKLookupContext): Promise<FKLookupGroup[]> {\n const rows = !context.Query.trim()\n ? await this.browse(context)\n : this.shouldSearch(context)\n ? await this.search(context)\n : await this.likeSearch(context);\n return [{ Key: 'results', Label: null, Rows: rows }];\n }\n\n /** The filter the browse and search paths apply, so a recent pick outside it stops being offered. */\n public override RecentFilter(context: FKLookupContext): string {\n return this.baseFilter(context);\n }\n\n /**\n * The search API ranks across every searchable field of the related entity, so it answers only\n * when the field opted into hybrid ranking AND the user is searching the name field — a column\n * chosen on the scope pill needs a LIKE on that column. A field metadata marks as `Dropdown` is a\n * small reference table the user is meant to read, and a composite key's search result is a\n * compact key segment rather than a SQL literal to hydrate with an IN list; both take the LIKE path.\n */\n protected shouldSearch(context: FKLookupContext): boolean {\n return (\n context.Options['SearchMode'] === 'hybrid' &&\n context.SearchField === context.NameField &&\n context.FieldInfo.RelatedEntityDisplayType !== 'Dropdown' &&\n context.RelatedEntity.PrimaryKeys.length === 1\n );\n }\n\n /** The metadata + caller filters, AND-ed. Subclasses widen this. */\n protected baseFilter(context: FKLookupContext): string {\n const fromInput = typeof context.Options['ExtraFilter'] === 'string' ? context.Options['ExtraFilter'] : '';\n return CombineFilters(context.FieldInfo.RelatedEntityFilter, fromInput);\n }\n\n /** Fields to read per row. Subclasses widen this for a second line or chips. */\n protected fieldsFor(context: FKLookupContext): string[] {\n return context.Fields;\n }\n\n protected orderBy(context: FKLookupContext): string {\n const fromInput = typeof context.Options['OrderBy'] === 'string' ? context.Options['OrderBy'] : '';\n return fromInput || context.FieldInfo.RelatedEntityOrderBy || `[${context.NameField}]`;\n }\n\n /** The empty-query list: the first `MaxRows` rows in a deliberate order. */\n protected async browse(context: FKLookupContext): Promise<FKLookupRow[]> {\n const result = await RunView.FromMetadataProvider(context.Provider).RunView<Record<string, unknown>>({\n EntityName: context.RelatedEntity.Name,\n ExtraFilter: this.baseFilter(context),\n OrderBy: this.orderBy(context),\n MaxRows: context.MaxRows,\n ResultType: 'simple',\n Fields: this.fieldsFor(context),\n });\n return result.Success ? result.Results.map(Values => ({ Values })) : [];\n }\n\n /**\n * Rank through the platform search API, then hydrate the winners in search order so the\n * dropdown has display columns. Falls back to a LIKE when search returns nothing — a server\n * with no search index — or when the filter removes every hit it did return.\n */\n protected async search(context: FKLookupContext): Promise<FKLookupRow[]> {\n const ids = await this.searchIds(context);\n if (ids.length === 0) {\n return this.likeSearch(context);\n }\n const rows = await this.hydrate(context, ids);\n if (rows.length === 0) {\n return this.likeSearch(context);\n }\n return this.orderByIds(rows, ids, context.PkField).slice(0, context.MaxRows);\n }\n\n private async searchIds(context: FKLookupContext): Promise<string[]> {\n const source = asSearchSource(context.Provider);\n if (!source) return [];\n const topK = Math.max(\n context.MaxRows * DefaultFKLookupStrategy.SEARCH_OVERFETCH,\n DefaultFKLookupStrategy.SEARCH_MIN_TOPK\n );\n try {\n const results: EntitySearchResult[] = await source.SearchEntity({\n entityName: context.RelatedEntity.Name,\n searchText: context.Query.trim(),\n options: { mode: 'hybrid', topK },\n });\n return results.map(r => r.recordId);\n } catch {\n // A server without the search resolver, or an entity with no searchable fields. The LIKE\n // fallback covers both; a failed dropdown lookup is not worth surfacing to the user.\n return [];\n }\n }\n\n protected async hydrate(context: FKLookupContext, ids: string[]): Promise<FKLookupRow[]> {\n const result = await RunView.FromMetadataProvider(context.Provider).RunView<Record<string, unknown>>({\n EntityName: context.RelatedEntity.Name,\n ExtraFilter: CombineFilters(\n `[${context.PkField}] IN (${QuoteSqlIdList(ids)})`,\n this.baseFilter(context)\n ),\n ResultType: 'simple',\n Fields: this.fieldsFor(context),\n });\n return result.Success ? result.Results.map(Values => ({ Values })) : [];\n }\n\n /** Re-impose the search API's ranking, which the hydrating view does not preserve. */\n private orderByIds(rows: FKLookupRow[], ids: string[], pkField: string): FKLookupRow[] {\n const rank = new Map(ids.map((id, i) => [id.trim().toLowerCase(), i]));\n const rankOf = (row: FKLookupRow): number =>\n rank.get(String(row.Values[pkField] ?? '').trim().toLowerCase()) ?? ids.length;\n return [...rows].sort((a, b) => rankOf(a) - rankOf(b));\n }\n\n /** `LIKE` on the column the user is searching, escaped, honouring that field's own predicate. */\n private async likeSearch(context: FKLookupContext): Promise<FKLookupRow[]> {\n const searchField = context.SearchField || context.NameField;\n const field = context.RelatedEntity.Fields.find(f => f.Name === searchField);\n const pattern = buildLikePattern(\n field?.UserSearchPredicateAPI ?? null,\n EscapeSqlLikeValue(context.Query.trim())\n );\n const result = await RunView.FromMetadataProvider(context.Provider).RunView<Record<string, unknown>>({\n EntityName: context.RelatedEntity.Name,\n ExtraFilter: CombineFilters(`[${searchField}] LIKE ${pattern}`, this.baseFilter(context)),\n OrderBy: `[${searchField}]`,\n MaxRows: context.MaxRows,\n ResultType: 'simple',\n Fields: this.fieldsFor(context),\n });\n if (!result.Success) return [];\n return RankByPrefix(result.Results.map(Values => ({ Values })), context.Query, searchField);\n }\n}\n"]}
1
+ {"version":3,"file":"default-fk-lookup-strategy.js","sourceRoot":"","sources":["../../../src/lib/field/default-fk-lookup-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,OAAO,GAKR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GAIjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWrF,kFAAkF;AAClF,SAAS,cAAc,CAAC,QAA2B;IACjD,MAAM,SAAS,GAAG,QAAiC,CAAC;IACpD,OAAO,OAAO,SAAS,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAA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AAO,EAAE,IAAI,WAAW,GAAG;YAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;SAChC,CAAC,CAAC;QACH,OAAO,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACjF,CAAC;;AAGH;;;GAGG;AACH,SAAS,WAAW,CAAC,MAA8C,EAAE,IAAY;IAC/E,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,mBAAmB,CAAC,aAAa,IAAI,YAAY,MAAM,CAAC,YAAY,IAAI,kBAAkB,EAAE,CAAC,CAAC;IAC1G,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC","sourcesContent":["/**\n * MJ's own rows for a foreign-key dropdown — the behaviour every field gets when no\n * {@link FKLookupStrategy} is registered for it.\n *\n * What this replaces: one `RunView` with `[<name>] LIKE '%<typed>%'`, no `OrderBy`, twenty rows.\n * On a large related entity that is twenty arbitrary records containing the letters typed, with\n * `%` and `_` acting as live wildcards.\n */\n\nimport {\n RunView,\n type RunViewResult,\n type EntitySearchResult,\n type IMetadataProvider,\n type SearchEntityParams,\n} from '@memberjunction/core';\nimport {\n FKLookupFailedError,\n FKLookupStrategy,\n type FKLookupContext,\n type FKLookupGroup,\n type FKLookupRow,\n} from './fk-lookup-strategy';\nimport { EscapeSqlLikeValue, QuoteSqlIdList, RankByPrefix } from './fk-search-utils';\n\n/**\n * A provider that can rank records through the platform search API. `SearchEntity` lives on\n * `IRunViewProvider`, which every shipped provider implements alongside `IMetadataProvider` —\n * but the field only ever holds the metadata half, so narrow before using it.\n */\ntype SearchCapableProvider = IMetadataProvider & {\n SearchEntity(params: SearchEntityParams): Promise<EntitySearchResult[]>;\n};\n\n/** The provider as a search source, or null when this one cannot rank records. */\nfunction asSearchSource(provider: IMetadataProvider): SearchCapableProvider | null {\n const candidate = provider as SearchCapableProvider;\n return typeof candidate.SearchEntity === 'function' ? candidate : null;\n}\n\n/** AND-join the non-empty fragments, each parenthesized so precedence survives. */\nexport function CombineFilters(...parts: ReadonlyArray<string | null | undefined>): string {\n return parts\n .map(p => (p ?? '').trim())\n .filter(p => p.length > 0)\n .map(p => `(${p})`)\n .join(' AND ');\n}\n\n/** `LIKE` pattern for one field, honouring the field's own `UserSearchPredicateAPI`. */\nfunction buildLikePattern(predicate: string | null, escaped: string): string {\n switch ((predicate ?? '').trim().toLowerCase()) {\n case 'beginswith':\n return `'${escaped}%'`;\n case 'endswith':\n return `'%${escaped}'`;\n case 'exact':\n return `'${escaped}'`;\n default:\n return `'%${escaped}%'`;\n }\n}\n\n/**\n * The stock lookup: browse by name for the empty query; for a typed one, an escaped `LIKE` on the\n * column the user is searching, prefix matches first. The field's `RelatedEntityFilter` and the\n * `[FKExtraFilter]` input apply to both, in SQL. `{ SearchMode: 'hybrid' }` in `[FKLookupOptions]`\n * ranks through the platform search API instead and hydrates the winners in search order.\n *\n * Subclass it rather than {@link FKLookupStrategy} when an app wants MJ's querying but its own\n * grouping or decoration — `fieldsFor` and `baseFilter` are the hooks for that.\n */\nexport class DefaultFKLookupStrategy extends FKLookupStrategy {\n /**\n * `SearchEntity` takes no filter, so the metadata filter can only be applied when hydrating the\n * IDs it returned. Over-fetch so a filter that removes most of the matches still leaves a usable\n * list; when it removes all of them the LIKE path, which filters in SQL, answers instead.\n */\n private static readonly SEARCH_OVERFETCH = 4;\n private static readonly SEARCH_MIN_TOPK = 25;\n\n public async Lookup(context: FKLookupContext): Promise<FKLookupGroup[]> {\n const rows = !context.Query.trim()\n ? await this.browse(context)\n : this.shouldSearch(context)\n ? await this.search(context)\n : await this.likeSearch(context);\n return [{ Key: 'results', Label: null, Rows: rows }];\n }\n\n /** The filter the browse and search paths apply, so a recent pick outside it stops being offered. */\n public override RecentFilter(context: FKLookupContext): string {\n return this.baseFilter(context);\n }\n\n /**\n * The search API ranks across every searchable field of the related entity, so it answers only\n * when the field opted into hybrid ranking AND the user is searching the name field — a column\n * chosen on the scope pill needs a LIKE on that column. A field metadata marks as `Dropdown` is a\n * small reference table the user is meant to read, and a composite key's search result is a\n * compact key segment rather than a SQL literal to hydrate with an IN list; both take the LIKE path.\n */\n protected shouldSearch(context: FKLookupContext): boolean {\n return (\n context.Options['SearchMode'] === 'hybrid' &&\n context.SearchField === context.NameField &&\n context.FieldInfo.RelatedEntityDisplayType !== 'Dropdown' &&\n context.RelatedEntity.PrimaryKeys.length === 1\n );\n }\n\n /** The metadata + caller filters, AND-ed. Subclasses widen this. */\n protected baseFilter(context: FKLookupContext): string {\n const fromInput = typeof context.Options['ExtraFilter'] === 'string' ? context.Options['ExtraFilter'] : '';\n return CombineFilters(context.FieldInfo.RelatedEntityFilter, fromInput);\n }\n\n /** Fields to read per row. Subclasses widen this for a second line or chips. */\n protected fieldsFor(context: FKLookupContext): string[] {\n return context.Fields;\n }\n\n protected orderBy(context: FKLookupContext): string {\n const fromInput = typeof context.Options['OrderBy'] === 'string' ? context.Options['OrderBy'] : '';\n return fromInput || context.FieldInfo.RelatedEntityOrderBy || `[${context.NameField}]`;\n }\n\n /** The empty-query list: the first `MaxRows` rows in a deliberate order. */\n protected async browse(context: FKLookupContext): Promise<FKLookupRow[]> {\n const result = await RunView.FromMetadataProvider(context.Provider).RunView<Record<string, unknown>>({\n EntityName: context.RelatedEntity.Name,\n ExtraFilter: this.baseFilter(context),\n OrderBy: this.orderBy(context),\n MaxRows: context.MaxRows,\n ResultType: 'simple',\n Fields: this.fieldsFor(context),\n });\n return rowsOrThrow(result, 'browse');\n }\n\n /**\n * Rank through the platform search API, then hydrate the winners in search order so the\n * dropdown has display columns. Falls back to a LIKE when search returns nothing — a server\n * with no search index — or when the filter removes every hit it did return.\n */\n protected async search(context: FKLookupContext): Promise<FKLookupRow[]> {\n const ids = await this.searchIds(context);\n if (ids.length === 0) {\n return this.likeSearch(context);\n }\n const rows = await this.hydrate(context, ids);\n if (rows.length === 0) {\n return this.likeSearch(context);\n }\n return this.orderByIds(rows, ids, context.PkField).slice(0, context.MaxRows);\n }\n\n private async searchIds(context: FKLookupContext): Promise<string[]> {\n const source = asSearchSource(context.Provider);\n if (!source) return [];\n const topK = Math.max(\n context.MaxRows * DefaultFKLookupStrategy.SEARCH_OVERFETCH,\n DefaultFKLookupStrategy.SEARCH_MIN_TOPK\n );\n try {\n const results: EntitySearchResult[] = await source.SearchEntity({\n entityName: context.RelatedEntity.Name,\n searchText: context.Query.trim(),\n options: { mode: 'hybrid', topK },\n });\n return results.map(r => r.recordId);\n } catch {\n // A server without the search resolver, or an entity with no searchable fields. The LIKE\n // fallback covers both; a failed dropdown lookup is not worth surfacing to the user.\n return [];\n }\n }\n\n protected async hydrate(context: FKLookupContext, ids: string[]): Promise<FKLookupRow[]> {\n const result = await RunView.FromMetadataProvider(context.Provider).RunView<Record<string, unknown>>({\n EntityName: context.RelatedEntity.Name,\n ExtraFilter: CombineFilters(\n `[${context.PkField}] IN (${QuoteSqlIdList(ids)})`,\n this.baseFilter(context)\n ),\n ResultType: 'simple',\n Fields: this.fieldsFor(context),\n });\n return rowsOrThrow(result, 'hydrate');\n }\n\n /** Re-impose the search API's ranking, which the hydrating view does not preserve. */\n private orderByIds(rows: FKLookupRow[], ids: string[], pkField: string): FKLookupRow[] {\n const rank = new Map(ids.map((id, i) => [id.trim().toLowerCase(), i]));\n const rankOf = (row: FKLookupRow): number =>\n rank.get(String(row.Values[pkField] ?? '').trim().toLowerCase()) ?? ids.length;\n return [...rows].sort((a, b) => rankOf(a) - rankOf(b));\n }\n\n /** `LIKE` on the column the user is searching, escaped, honouring that field's own predicate. */\n private async likeSearch(context: FKLookupContext): Promise<FKLookupRow[]> {\n const searchField = context.SearchField || context.NameField;\n const field = context.RelatedEntity.Fields.find(f => f.Name === searchField);\n const pattern = buildLikePattern(\n field?.UserSearchPredicateAPI ?? null,\n EscapeSqlLikeValue(context.Query.trim())\n );\n const result = await RunView.FromMetadataProvider(context.Provider).RunView<Record<string, unknown>>({\n EntityName: context.RelatedEntity.Name,\n ExtraFilter: CombineFilters(`[${searchField}] LIKE ${pattern}`, this.baseFilter(context)),\n OrderBy: `[${searchField}]`,\n MaxRows: context.MaxRows,\n ResultType: 'simple',\n Fields: this.fieldsFor(context),\n });\n return RankByPrefix(rowsOrThrow(result, 'search'), context.Query, searchField);\n }\n}\n\n/**\n * The rows of a successful view, or an {@link FKLookupFailedError}. A failed query must not come\n * back as an empty list: the field would show \"No matches\" for a record that exists.\n */\nfunction rowsOrThrow(result: RunViewResult<Record<string, unknown>>, step: string): FKLookupRow[] {\n if (!result.Success) {\n throw new FKLookupFailedError(`FK lookup ${step} failed: ${result.ErrorMessage || 'no error message'}`);\n }\n return result.Results.map(Values => ({ Values }));\n}\n"]}
@@ -83,6 +83,13 @@ export interface FKLookupContext {
83
83
  */
84
84
  Options: Record<string, unknown>;
85
85
  }
86
+ /**
87
+ * Thrown by a strategy when its query failed, as distinct from finding no rows. Carries the
88
+ * provider's error message for the log; the user sees a generic error with Retry.
89
+ */
90
+ export declare class FKLookupFailedError extends Error {
91
+ constructor(message: string);
92
+ }
86
93
  /**
87
94
  * Base class for a foreign-key lookup strategy. Subclass, implement {@link Lookup}, and register
88
95
  * it with `@RegisterClass(FKLookupStrategy, '<key>')` — see the module doc for the key forms.
@@ -99,6 +106,10 @@ export declare abstract class FKLookupStrategy {
99
106
  /**
100
107
  * The rows for the current query and scope, in the order they should render. Called for the
101
108
  * empty query too — that is the browse list the user sees on focus.
109
+ *
110
+ * Return no rows only when nothing matched. When the query itself failed, throw (an
111
+ * {@link FKLookupFailedError} reads best): the field then shows an error with Retry instead of
112
+ * "No matches", which would tell the user the record does not exist.
102
113
  */
103
114
  abstract Lookup(context: FKLookupContext): Promise<FKLookup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AGG;IACI,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,mBAAmB,GAAG,IAAI;IAIzE;;;;;;;OAOG;aACa,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAE1E;;;OAGG;IACU,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzF;;;;OAIG;IACI,YAAY,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM;IAItD,+FAA+F;IACxF,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAIzE;AAOD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,MAAM,GACxB,gBAAgB,GAAG,IAAI,CAgBzB"}
@@ -28,6 +28,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
28
28
  return c > 3 && r && Object.defineProperty(target, key, r), r;
29
29
  };
30
30
  import { MJGlobal, OptionalKeyedSpecialization } from '@memberjunction/global';
31
+ /**
32
+ * Thrown by a strategy when its query failed, as distinct from finding no rows. Carries the
33
+ * provider's error message for the log; the user sees a generic error with Retry.
34
+ */
35
+ export class FKLookupFailedError extends Error {
36
+ constructor(message) {
37
+ super(message);
38
+ this.name = 'FKLookupFailedError';
39
+ }
40
+ }
31
41
  /**
32
42
  * Base class for a foreign-key lookup strategy. Subclass, implement {@link Lookup}, and register
33
43
  * it with `@RegisterClass(FKLookupStrategy, '<key>')` — see the module doc for the key forms.
@@ -1 +1 @@
1
- {"version":3,"file":"fk-lookup-strategy.js","sourceRoot":"","sources":["../../../src/lib/field/fk-lookup-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;;;;;AAGH,OAAO,EAAE,QAAQ,EAAE,2BAA2B,EAAE,MAAM,wBAA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GAAG,OAAO,CAAC,iBAAiB,CAAmB,gBAAgB,EAAE,GAAG,CAAC,CAAC;QACtF,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC/C,OAAO,UAAU,CAAC,QAAQ,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * The extension point for where the rows in a foreign-key dropdown come from.\n *\n * {@link MjFormFieldComponent} owns the dropdown itself — rendering, keyboard handling, the\n * column plan, the pinned current selection, the recent-picks group and the create-new footer.\n * A strategy owns only the rows, so an app can decide *which* records a given foreign key\n * should offer without forking the field.\n *\n * Registration is through `MJGlobal.ClassFactory`, most specific first:\n *\n * ```ts\n * // every foreign key that points at Organizations\n * @RegisterClass(FKLookupStrategy, 'MJ_BizApps_Common: Organizations')\n * export class PartyLookupStrategy extends FKLookupStrategy { ... }\n *\n * // just this one field on this one entity\n * @RegisterClass(FKLookupStrategy, 'MJ_BizApps_Orders: Orders.BillToOrganizationID')\n * export class BillToLookupStrategy extends PartyLookupStrategy { ... }\n * ```\n *\n * When nothing is registered the field uses `DefaultFKLookupStrategy`, which is MJ's own\n * behaviour and the case for almost every field in the system.\n */\n\nimport type { BaseEntity, EntityFieldInfo, EntityInfo, IMetadataProvider } from '@memberjunction/core';\nimport { MJGlobal, OptionalKeyedSpecialization } from '@memberjunction/global';\n\n/** A small marker rendered beside a row's name, e.g. \"4 orders\". */\nexport interface FKLookupChip {\n Text: string;\n Tone?: 'default' | 'info' | 'warn';\n}\n\n/**\n * One row a strategy offers. `Values` must contain every field named in\n * {@link FKLookupContext.Fields} — the field maps those into the dropdown's columns, so a row\n * missing the primary key or the name field cannot be rendered or selected.\n */\nexport interface FKLookupRow {\n Values: Record<string, unknown>;\n /** Second line under the name, used to tell look-alikes apart, e.g. \"Springfield, IL · northwind.example.org\". */\n Secondary?: string;\n Chips?: FKLookupChip[];\n}\n\n/** A titled group of rows. `Label: null` renders the rows with no header. */\nexport interface FKLookupGroup {\n Key: string;\n Label: string | null;\n Rows: FKLookupRow[];\n}\n\n/**\n * Labels for the dropdown's scope toggle. `primary` names the narrow population the strategy\n * offers first (\"Customers\"); `all` names the wide one (\"All organizations\").\n */\nexport interface FKLookupScopeLabels {\n primary: string;\n all: string;\n}\n\n/** Which population the current lookup is over. Strategies decide what `primary` means. */\nexport type FKLookupScope = 'primary' | 'all';\n\n/** Everything a strategy needs to answer one lookup. Rebuilt per keystroke. */\nexport interface FKLookupContext {\n /** The record being edited — the host of the foreign key, not the record being looked up. */\n Record: BaseEntity;\n /** The foreign-key field itself, carrying `RelatedEntityFilter` / `RelatedEntityOrderBy`. */\n FieldInfo: EntityFieldInfo;\n RelatedEntity: EntityInfo;\n Provider: IMetadataProvider;\n /** Fields the dropdown will read from each row: primary key, name, extra columns, icon. */\n Fields: string[];\n /** The related entity's primary key field name. */\n PkField: string;\n /** The related entity's name field name. */\n NameField: string;\n /**\n * The field the user is searching — the name field unless they chose another column on the\n * dropdown's scope pill. A typed query is matched against this column.\n */\n SearchField: string;\n /** What the user has typed. Empty when the dropdown was opened by focus. */\n Query: string;\n Scope: FKLookupScope;\n MaxRows: number;\n /**\n * From the field's `[FKLookupOptions]` input, plus `ExtraFilter` and `OrderBy` contributed by\n * `[FKExtraFilter]` / `[FKOrderBy]`. Opaque to the field; each strategy documents its own keys.\n */\n Options: Record<string, unknown>;\n}\n\n/**\n * Base class for a foreign-key lookup strategy. Subclass, implement {@link Lookup}, and register\n * it with `@RegisterClass(FKLookupStrategy, '<key>')` — see the module doc for the key forms.\n *\n * Marked `@OptionalKeyedSpecialization` because a keyed lookup landing on the base is the\n * designed outcome for nearly every foreign key in the system, not a failed resolution.\n */\n@OptionalKeyedSpecialization()\nexport abstract class FKLookupStrategy {\n /**\n * Labels for the scope toggle, or null to hide it. Called before every {@link Lookup} so a\n * strategy can decide per field whether a second population is worth offering.\n */\n public ScopeLabels(_context: FKLookupContext): FKLookupScopeLabels | null {\n return null;\n }\n\n /**\n * The rows for the current query and scope, in the order they should render. Called for the\n * empty query too — that is the browse list the user sees on focus.\n */\n public abstract Lookup(context: FKLookupContext): Promise<FKLookupGroup[]>;\n\n /**\n * Runs after the user picks a row and before the value is written. Return false to cancel the\n * pick — used where choosing a record has a side effect the user should confirm first.\n */\n public async BeforeSelect(_context: FKLookupContext, _row: FKLookupRow): Promise<boolean> {\n return true;\n }\n\n /**\n * WHERE fragment the field applies when it hydrates the user's recent picks, so a record this\n * strategy's population no longer includes stops being offered under \"Recent\". Empty means no\n * filter beyond the primary-key list.\n */\n public RecentFilter(_context: FKLookupContext): string {\n return '';\n }\n\n /** Values to prefill when the user creates a new related record from the dropdown's footer. */\n public CreateDefaults(context: FKLookupContext): Record<string, unknown> {\n const typed = context.Query.trim();\n return typed ? { [context.NameField]: typed } : {};\n }\n}\n\n/** Trim + lowercase, so a registration can use whatever casing reads naturally. */\nfunction normalizeKeyPart(value: string): string {\n return (value ?? '').trim().toLowerCase();\n}\n\n/**\n * Resolve the strategy for one foreign key: a `<HostEntity>.<FieldName>` registration wins over a\n * `<RelatedEntity>` one. Returns null when neither exists, so the caller can fall back to\n * `DefaultFKLookupStrategy` rather than this module depending on it.\n */\nexport function ResolveFKLookupStrategy(\n hostEntityName: string,\n fieldName: string,\n relatedEntityName: string,\n): FKLookupStrategy | null {\n const factory = MJGlobal.Instance.ClassFactory;\n const keys = [\n `${normalizeKeyPart(hostEntityName)}.${normalizeKeyPart(fieldName)}`,\n normalizeKeyPart(relatedEntityName),\n ];\n for (const key of keys) {\n if (!factory.GetRegistration(FKLookupStrategy, key)) {\n continue;\n }\n const resolution = factory.TryCreateInstance<FKLookupStrategy>(FKLookupStrategy, key);\n if (resolution.Resolved && resolution.Instance) {\n return resolution.Instance;\n }\n }\n return null;\n}\n"]}
1
+ {"version":3,"file":"fk-lookup-strategy.js","sourceRoot":"","sources":["../../../src/lib/field/fk-lookup-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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IAAI,gBAAgB,CAAC,SAAS,CAAC,EAAE;QACpE,gBAAgB,CAAC,iBAAiB,CAAC;KACpC,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,gBAAgB,EAAE,GAAG,CAAC,EAAE,CAAC;YACpD,SAAS;QACX,CAAC;QACD,MAAM,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAmB,gBAAgB,EAAE,GAAG,CAAC,CAAC;QACtF,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC/C,OAAO,UAAU,CAAC,QAAQ,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * The extension point for where the rows in a foreign-key dropdown come from.\n *\n * {@link MjFormFieldComponent} owns the dropdown itself — rendering, keyboard handling, the\n * column plan, the pinned current selection, the recent-picks group and the create-new footer.\n * A strategy owns only the rows, so an app can decide *which* records a given foreign key\n * should offer without forking the field.\n *\n * Registration is through `MJGlobal.ClassFactory`, most specific first:\n *\n * ```ts\n * // every foreign key that points at Organizations\n * @RegisterClass(FKLookupStrategy, 'MJ_BizApps_Common: Organizations')\n * export class PartyLookupStrategy extends FKLookupStrategy { ... }\n *\n * // just this one field on this one entity\n * @RegisterClass(FKLookupStrategy, 'MJ_BizApps_Orders: Orders.BillToOrganizationID')\n * export class BillToLookupStrategy extends PartyLookupStrategy { ... }\n * ```\n *\n * When nothing is registered the field uses `DefaultFKLookupStrategy`, which is MJ's own\n * behaviour and the case for almost every field in the system.\n */\n\nimport type { BaseEntity, EntityFieldInfo, EntityInfo, IMetadataProvider } from '@memberjunction/core';\nimport { MJGlobal, OptionalKeyedSpecialization } from '@memberjunction/global';\n\n/** A small marker rendered beside a row's name, e.g. \"4 orders\". */\nexport interface FKLookupChip {\n Text: string;\n Tone?: 'default' | 'info' | 'warn';\n}\n\n/**\n * One row a strategy offers. `Values` must contain every field named in\n * {@link FKLookupContext.Fields} — the field maps those into the dropdown's columns, so a row\n * missing the primary key or the name field cannot be rendered or selected.\n */\nexport interface FKLookupRow {\n Values: Record<string, unknown>;\n /** Second line under the name, used to tell look-alikes apart, e.g. \"Springfield, IL · northwind.example.org\". */\n Secondary?: string;\n Chips?: FKLookupChip[];\n}\n\n/** A titled group of rows. `Label: null` renders the rows with no header. */\nexport interface FKLookupGroup {\n Key: string;\n Label: string | null;\n Rows: FKLookupRow[];\n}\n\n/**\n * Labels for the dropdown's scope toggle. `primary` names the narrow population the strategy\n * offers first (\"Customers\"); `all` names the wide one (\"All organizations\").\n */\nexport interface FKLookupScopeLabels {\n primary: string;\n all: string;\n}\n\n/** Which population the current lookup is over. Strategies decide what `primary` means. */\nexport type FKLookupScope = 'primary' | 'all';\n\n/** Everything a strategy needs to answer one lookup. Rebuilt per keystroke. */\nexport interface FKLookupContext {\n /** The record being edited — the host of the foreign key, not the record being looked up. */\n Record: BaseEntity;\n /** The foreign-key field itself, carrying `RelatedEntityFilter` / `RelatedEntityOrderBy`. */\n FieldInfo: EntityFieldInfo;\n RelatedEntity: EntityInfo;\n Provider: IMetadataProvider;\n /** Fields the dropdown will read from each row: primary key, name, extra columns, icon. */\n Fields: string[];\n /** The related entity's primary key field name. */\n PkField: string;\n /** The related entity's name field name. */\n NameField: string;\n /**\n * The field the user is searching — the name field unless they chose another column on the\n * dropdown's scope pill. A typed query is matched against this column.\n */\n SearchField: string;\n /** What the user has typed. Empty when the dropdown was opened by focus. */\n Query: string;\n Scope: FKLookupScope;\n MaxRows: number;\n /**\n * From the field's `[FKLookupOptions]` input, plus `ExtraFilter` and `OrderBy` contributed by\n * `[FKExtraFilter]` / `[FKOrderBy]`. Opaque to the field; each strategy documents its own keys.\n */\n Options: Record<string, unknown>;\n}\n\n/**\n * Thrown by a strategy when its query failed, as distinct from finding no rows. Carries the\n * provider's error message for the log; the user sees a generic error with Retry.\n */\nexport class FKLookupFailedError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'FKLookupFailedError';\n }\n}\n\n/**\n * Base class for a foreign-key lookup strategy. Subclass, implement {@link Lookup}, and register\n * it with `@RegisterClass(FKLookupStrategy, '<key>')` — see the module doc for the key forms.\n *\n * Marked `@OptionalKeyedSpecialization` because a keyed lookup landing on the base is the\n * designed outcome for nearly every foreign key in the system, not a failed resolution.\n */\n@OptionalKeyedSpecialization()\nexport abstract class FKLookupStrategy {\n /**\n * Labels for the scope toggle, or null to hide it. Called before every {@link Lookup} so a\n * strategy can decide per field whether a second population is worth offering.\n */\n public ScopeLabels(_context: FKLookupContext): FKLookupScopeLabels | null {\n return null;\n }\n\n /**\n * The rows for the current query and scope, in the order they should render. Called for the\n * empty query too — that is the browse list the user sees on focus.\n *\n * Return no rows only when nothing matched. When the query itself failed, throw (an\n * {@link FKLookupFailedError} reads best): the field then shows an error with Retry instead of\n * \"No matches\", which would tell the user the record does not exist.\n */\n public abstract Lookup(context: FKLookupContext): Promise<FKLookupGroup[]>;\n\n /**\n * Runs after the user picks a row and before the value is written. Return false to cancel the\n * pick — used where choosing a record has a side effect the user should confirm first.\n */\n public async BeforeSelect(_context: FKLookupContext, _row: FKLookupRow): Promise<boolean> {\n return true;\n }\n\n /**\n * WHERE fragment the field applies when it hydrates the user's recent picks, so a record this\n * strategy's population no longer includes stops being offered under \"Recent\". Empty means no\n * filter beyond the primary-key list.\n */\n public RecentFilter(_context: FKLookupContext): string {\n return '';\n }\n\n /** Values to prefill when the user creates a new related record from the dropdown's footer. */\n public CreateDefaults(context: FKLookupContext): Record<string, unknown> {\n const typed = context.Query.trim();\n return typed ? { [context.NameField]: typed } : {};\n }\n}\n\n/** Trim + lowercase, so a registration can use whatever casing reads naturally. */\nfunction normalizeKeyPart(value: string): string {\n return (value ?? '').trim().toLowerCase();\n}\n\n/**\n * Resolve the strategy for one foreign key: a `<HostEntity>.<FieldName>` registration wins over a\n * `<RelatedEntity>` one. Returns null when neither exists, so the caller can fall back to\n * `DefaultFKLookupStrategy` rather than this module depending on it.\n */\nexport function ResolveFKLookupStrategy(\n hostEntityName: string,\n fieldName: string,\n relatedEntityName: string,\n): FKLookupStrategy | null {\n const factory = MJGlobal.Instance.ClassFactory;\n const keys = [\n `${normalizeKeyPart(hostEntityName)}.${normalizeKeyPart(fieldName)}`,\n normalizeKeyPart(relatedEntityName),\n ];\n for (const key of keys) {\n if (!factory.GetRegistration(FKLookupStrategy, key)) {\n continue;\n }\n const resolution = factory.TryCreateInstance<FKLookupStrategy>(FKLookupStrategy, key);\n if (resolution.Resolved && resolution.Instance) {\n return resolution.Instance;\n }\n }\n return null;\n}\n"]}
@@ -59,4 +59,21 @@ export declare function EscapeSqlLikeValue(text: string): string;
59
59
  * Single-column keys only — a composite key's compact segment is not a SQL literal.
60
60
  */
61
61
  export declare function QuoteSqlIdList(ids: ReadonlyArray<string>): string;
62
+ /**
63
+ * Raised by {@link WithFKSearchTimeout} when a foreign-key lookup has not answered in time. The
64
+ * field shows it as an error with Retry rather than as "No matches" or an endless spinner.
65
+ */
66
+ export declare class FKSearchTimeoutError extends Error {
67
+ readonly TimeoutMs: number;
68
+ constructor(TimeoutMs: number);
69
+ }
70
+ /**
71
+ * Settle with `work`, or reject with {@link FKSearchTimeoutError} once `timeoutMs` passes first.
72
+ *
73
+ * The transport under a lookup has no deadline of its own: a request a gateway never answers
74
+ * keeps its promise pending for good, and the dropdown spinning on it with it. This bounds the
75
+ * wait the user sees. It does not cancel the request; the field's sequence check drops a late
76
+ * answer. A `timeoutMs` of zero or less disables the bound.
77
+ */
78
+ export declare function WithFKSearchTimeout<T>(work: Promise<T>, timeoutMs: number): Promise<T>;
62
79
  //# sourceMappingURL=fk-search-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fk-search-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/field/fk-search-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,G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S;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACxE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EACtB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,CAAC,EAAE,CAKL;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAUjE;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;aACjB,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM;CAI9C;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAOtF"}
@@ -97,4 +97,33 @@ export function QuoteSqlIdList(ids) {
97
97
  }
98
98
  return quoted.join(',');
99
99
  }
100
+ /**
101
+ * Raised by {@link WithFKSearchTimeout} when a foreign-key lookup has not answered in time. The
102
+ * field shows it as an error with Retry rather than as "No matches" or an endless spinner.
103
+ */
104
+ export class FKSearchTimeoutError extends Error {
105
+ TimeoutMs;
106
+ constructor(TimeoutMs) {
107
+ super(`The lookup did not answer within ${TimeoutMs} ms`);
108
+ this.TimeoutMs = TimeoutMs;
109
+ this.name = 'FKSearchTimeoutError';
110
+ }
111
+ }
112
+ /**
113
+ * Settle with `work`, or reject with {@link FKSearchTimeoutError} once `timeoutMs` passes first.
114
+ *
115
+ * The transport under a lookup has no deadline of its own: a request a gateway never answers
116
+ * keeps its promise pending for good, and the dropdown spinning on it with it. This bounds the
117
+ * wait the user sees. It does not cancel the request; the field's sequence check drops a late
118
+ * answer. A `timeoutMs` of zero or less disables the bound.
119
+ */
120
+ export function WithFKSearchTimeout(work, timeoutMs) {
121
+ if (!(timeoutMs > 0))
122
+ return work;
123
+ let timer;
124
+ const deadline = new Promise((_, reject) => {
125
+ timer = setTimeout(() => reject(new FKSearchTimeoutError(timeoutMs)), timeoutMs);
126
+ });
127
+ return Promise.race([work, deadline]).finally(() => clearTimeout(timer));
128
+ }
100
129
  //# sourceMappingURL=fk-search-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fk-search-utils.js","sourceRoot":"","sources":["../../../src/lib/field/fk-search-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY,EAAE,OAAuB;IAChE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjD,IAAI,GAAG,YAAY,IAAI;QAAE,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC;IAC5G,IAAI,OAAO,GAAG,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAsB,EACtB,KAAa,EACb,KAAa,EACb,OAA4B;IAE5B,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,IAAI,CAAC;aACb,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,C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AI,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,GAA0B;IACvD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAAE,SAAS;QACtD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC","sourcesContent":["/**\n * Pure, framework-free helpers for the FK autocomplete in {@link MjFormFieldComponent}.\n *\n * These functions hold the parts of the FK search UX that have real logic worth\n * unit-testing in isolation — cell formatting, the in-memory cached-entity filter,\n * and the empty-input \"focus-show\" (first N, sorted by name). Keeping them out of\n * the Angular component means they can be tested without TestBed / DI.\n */\n\nimport { IsDateOnlySQLType, FormatDateOnly } from '@memberjunction/core';\n\n/**\n * Format a raw entity cell value for display in the dropdown.\n * - `Date` → locale date string; a SQL `date` column (pass its `sqlType`) is a calendar day that\n * arrives as UTC midnight and is rendered as its stored day rather than shifted into the\n * reader's zone (MJ#4210); a timestamp names an instant and stays in local time\n * - `null` / `undefined` → empty string\n * - `boolean` → `Yes` / `No`\n * - everything else → `String(value)`\n */\nexport function FormatFKCell(val: unknown, sqlType?: string | null): string {\n if (val === null || val === undefined) return '';\n if (val instanceof Date) return IsDateOnlySQLType(sqlType) ? FormatDateOnly(val) : val.toLocaleDateString();\n if (typeof val === 'boolean') return val ? 'Yes' : 'No';\n return String(val);\n}\n\n/**\n * In-memory filter/sort over cached rows for the FK dropdown.\n *\n * - **Empty query** → returns the first `limit` rows sorted ascending by the\n * formatted name field (the \"focus-show\" behavior).\n * - **Non-empty query** → returns every row whose formatted name field contains\n * the query as a case-insensitive substring (no limit; the full match set).\n *\n * `getName` extracts the raw name-field value for a row; formatting + comparison\n * are handled here so callers don't duplicate the rules.\n *\n * @returns A NEW array (never mutates the input) suitable for rendering.\n */\nexport function FilterCachedFKRows<T>(\n rows: ReadonlyArray<T>,\n query: string,\n limit: number,\n getName: (row: T) => unknown\n): T[] {\n const q = query.trim().toLowerCase();\n if (q.length === 0) {\n return [...rows]\n .sort((a, b) => FormatFKCell(getName(a)).localeCompare(FormatFKCell(getName(b))))\n .slice(0, limit);\n }\n return rows.filter(r => FormatFKCell(getName(r)).toLowerCase().includes(q));\n}\n\n/**\n * Rank lookup rows so that names *starting with* what the user typed come before names that\n * merely contain it somewhere, alphabetically within each tier.\n *\n * Three typed letters otherwise match any name containing them anywhere, so an organization\n * whose name merely happens to include the sequence outranks the one the user was reaching for.\n * An empty query is a single tier, alphabetical.\n *\n * @returns A NEW array (never mutates the input).\n */\nexport function RankByPrefix<T extends { Values: Record<string, unknown> }>(\n rows: ReadonlyArray<T>,\n query: string,\n nameField: string\n): T[] {\n const q = query.trim().toLowerCase();\n const nameOf = (row: T): string => FormatFKCell(row.Values[nameField]).toLowerCase();\n const tierOf = (row: T): number => (!q || nameOf(row).startsWith(q) ? 0 : 1);\n return [...rows].sort((a, b) => tierOf(a) - tierOf(b) || nameOf(a).localeCompare(nameOf(b)));\n}\n\n/**\n * Escape free text for interpolation into a SQL Server `LIKE` pattern: quotes doubled so the\n * string literal stays closed, and `%`, `_`, `[` bracketed so a user typing \"50%\" or \"a_b\" gets\n * literal matches instead of live wildcards.\n *\n * Bracketing rather than an `ESCAPE` clause, so a caller can drop the result into an existing\n * pattern without also having to declare an escape character.\n */\nexport function EscapeSqlLikeValue(text: string): string {\n return (text ?? '')\n .replace(/\\0/g, '')\n .replace(/'/g, \"''\")\n .replace(/\\[/g, '[[]')\n .replace(/%/g, '[%]')\n .replace(/_/g, '[_]');\n}\n\n/**\n * Build the `'a','b'` body of an `IN (...)` clause from a list of primary-key values. Blanks and\n * case-insensitive duplicates are dropped; quotes inside a value are doubled.\n *\n * Single-column keys only — a composite key's compact segment is not a SQL literal.\n */\nexport function QuoteSqlIdList(ids: ReadonlyArray<string>): string {\n const seen = new Set<string>();\n const quoted: string[] = [];\n for (const id of ids) {\n const value = (id ?? '').trim();\n if (!value || seen.has(value.toLowerCase())) continue;\n seen.add(value.toLowerCase());\n quoted.push(`'${value.replace(/'/g, \"''\")}'`);\n }\n return quoted.join(',');\n}\n"]}
1
+ {"version":3,"file":"fk-search-utils.js","sourceRoot":"","sources":["../../../src/lib/field/fk-search-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY,EAAE,OAAuB;IAChE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjD,IAAI,GAAG,YAAY,IAAI;QAAE,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC;IAC5G,IAAI,OAAO,GAAG,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,OAAO,MAAM,CAAC,GAAG,CAA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AoC,SAAS,KAAK,CAAC,CAAC;QADhC,cAAS,GAAT,SAAS,CAAQ;QAE3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAI,IAAgB,EAAE,SAAiB;IACxE,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,KAAgD,CAAC;IACrD,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;QAChD,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["/**\n * Pure, framework-free helpers for the FK autocomplete in {@link MjFormFieldComponent}.\n *\n * These functions hold the parts of the FK search UX that have real logic worth\n * unit-testing in isolation — cell formatting, the in-memory cached-entity filter,\n * and the empty-input \"focus-show\" (first N, sorted by name). Keeping them out of\n * the Angular component means they can be tested without TestBed / DI.\n */\n\nimport { IsDateOnlySQLType, FormatDateOnly } from '@memberjunction/core';\n\n/**\n * Format a raw entity cell value for display in the dropdown.\n * - `Date` → locale date string; a SQL `date` column (pass its `sqlType`) is a calendar day that\n * arrives as UTC midnight and is rendered as its stored day rather than shifted into the\n * reader's zone (MJ#4210); a timestamp names an instant and stays in local time\n * - `null` / `undefined` → empty string\n * - `boolean` → `Yes` / `No`\n * - everything else → `String(value)`\n */\nexport function FormatFKCell(val: unknown, sqlType?: string | null): string {\n if (val === null || val === undefined) return '';\n if (val instanceof Date) return IsDateOnlySQLType(sqlType) ? FormatDateOnly(val) : val.toLocaleDateString();\n if (typeof val === 'boolean') return val ? 'Yes' : 'No';\n return String(val);\n}\n\n/**\n * In-memory filter/sort over cached rows for the FK dropdown.\n *\n * - **Empty query** → returns the first `limit` rows sorted ascending by the\n * formatted name field (the \"focus-show\" behavior).\n * - **Non-empty query** → returns every row whose formatted name field contains\n * the query as a case-insensitive substring (no limit; the full match set).\n *\n * `getName` extracts the raw name-field value for a row; formatting + comparison\n * are handled here so callers don't duplicate the rules.\n *\n * @returns A NEW array (never mutates the input) suitable for rendering.\n */\nexport function FilterCachedFKRows<T>(\n rows: ReadonlyArray<T>,\n query: string,\n limit: number,\n getName: (row: T) => unknown\n): T[] {\n const q = query.trim().toLowerCase();\n if (q.length === 0) {\n return [...rows]\n .sort((a, b) => FormatFKCell(getName(a)).localeCompare(FormatFKCell(getName(b))))\n .slice(0, limit);\n }\n return rows.filter(r => FormatFKCell(getName(r)).toLowerCase().includes(q));\n}\n\n/**\n * Rank lookup rows so that names *starting with* what the user typed come before names that\n * merely contain it somewhere, alphabetically within each tier.\n *\n * Three typed letters otherwise match any name containing them anywhere, so an organization\n * whose name merely happens to include the sequence outranks the one the user was reaching for.\n * An empty query is a single tier, alphabetical.\n *\n * @returns A NEW array (never mutates the input).\n */\nexport function RankByPrefix<T extends { Values: Record<string, unknown> }>(\n rows: ReadonlyArray<T>,\n query: string,\n nameField: string\n): T[] {\n const q = query.trim().toLowerCase();\n const nameOf = (row: T): string => FormatFKCell(row.Values[nameField]).toLowerCase();\n const tierOf = (row: T): number => (!q || nameOf(row).startsWith(q) ? 0 : 1);\n return [...rows].sort((a, b) => tierOf(a) - tierOf(b) || nameOf(a).localeCompare(nameOf(b)));\n}\n\n/**\n * Escape free text for interpolation into a SQL Server `LIKE` pattern: quotes doubled so the\n * string literal stays closed, and `%`, `_`, `[` bracketed so a user typing \"50%\" or \"a_b\" gets\n * literal matches instead of live wildcards.\n *\n * Bracketing rather than an `ESCAPE` clause, so a caller can drop the result into an existing\n * pattern without also having to declare an escape character.\n */\nexport function EscapeSqlLikeValue(text: string): string {\n return (text ?? '')\n .replace(/\\0/g, '')\n .replace(/'/g, \"''\")\n .replace(/\\[/g, '[[]')\n .replace(/%/g, '[%]')\n .replace(/_/g, '[_]');\n}\n\n/**\n * Build the `'a','b'` body of an `IN (...)` clause from a list of primary-key values. Blanks and\n * case-insensitive duplicates are dropped; quotes inside a value are doubled.\n *\n * Single-column keys only — a composite key's compact segment is not a SQL literal.\n */\nexport function QuoteSqlIdList(ids: ReadonlyArray<string>): string {\n const seen = new Set<string>();\n const quoted: string[] = [];\n for (const id of ids) {\n const value = (id ?? '').trim();\n if (!value || seen.has(value.toLowerCase())) continue;\n seen.add(value.toLowerCase());\n quoted.push(`'${value.replace(/'/g, \"''\")}'`);\n }\n return quoted.join(',');\n}\n\n/**\n * Raised by {@link WithFKSearchTimeout} when a foreign-key lookup has not answered in time. The\n * field shows it as an error with Retry rather than as \"No matches\" or an endless spinner.\n */\nexport class FKSearchTimeoutError extends Error {\n constructor(public readonly TimeoutMs: number) {\n super(`The lookup did not answer within ${TimeoutMs} ms`);\n this.name = 'FKSearchTimeoutError';\n }\n}\n\n/**\n * Settle with `work`, or reject with {@link FKSearchTimeoutError} once `timeoutMs` passes first.\n *\n * The transport under a lookup has no deadline of its own: a request a gateway never answers\n * keeps its promise pending for good, and the dropdown spinning on it with it. This bounds the\n * wait the user sees. It does not cancel the request; the field's sequence check drops a late\n * answer. A `timeoutMs` of zero or less disables the bound.\n */\nexport function WithFKSearchTimeout<T>(work: Promise<T>, timeoutMs: number): Promise<T> {\n if (!(timeoutMs > 0)) return work;\n let timer: ReturnType<typeof setTimeout> | undefined;\n const deadline = new Promise<never>((_, reject) => {\n timer = setTimeout(() => reject(new FKSearchTimeoutError(timeoutMs)), timeoutMs);\n });\n return Promise.race([work, deadline]).finally(() => clearTimeout(timer));\n}\n"]}
@@ -138,6 +138,7 @@ export declare class MjFormFieldComponent extends BaseAngularComponent implement
138
138
  private fieldEdits;
139
139
  private recordRefresh;
140
140
  private previewPopoverService;
141
+ private commentsCoordinator;
141
142
  private _coordinatorSubs;
142
143
  private _remoteHighlightTimer;
143
144
  private _lastPolymorphicEntityRef;
@@ -172,6 +173,12 @@ export declare class MjFormFieldComponent extends BaseAngularComponent implement
172
173
  private _hoverPreviewOpenTimer;
173
174
  private _hoverPreviewCloseTimer;
174
175
  constructor();
176
+ /** Number of open (unresolved) anchored comment threads targeting this field. */
177
+ get FieldOpenCommentCount(): number;
178
+ /** Whether inline field commenting is available on this field. */
179
+ get CanCommentOnField(): boolean;
180
+ /** Opens the inline anchored comment popover (or drawer) targeted at this field. */
181
+ OnOpenFieldComments(event: MouseEvent): void;
175
182
  /** This component's host element — what a section uses to confirm the field is inside it. */
176
183
  get HostElement(): HTMLElement;
177
184
  private _inputsBound;
@@ -536,6 +543,11 @@ export declare class MjFormFieldComponent extends BaseAngularComponent implement
536
543
  FKOrderBy: string | null;
537
544
  /** Rows requested from a lookup. */
538
545
  FKMaxRows: number;
546
+ /**
547
+ * Milliseconds a lookup may take before the dropdown shows an error with Retry. Zero or less
548
+ * waits indefinitely.
549
+ */
550
+ FKSearchTimeoutMs: number;
539
551
  /**
540
552
  * Opaque options handed to the resolved {@link FKLookupStrategy} — e.g.
541
553
  * `{ ScopeField: 'BillToOrganizationID' }` to tell a person picker which organization's
@@ -630,6 +642,12 @@ export declare class MjFormFieldComponent extends BaseAngularComponent implement
630
642
  FKLoading: boolean;
631
643
  /** True when a search completed with zero results (drives the "No matches" row). */
632
644
  FKNoMatches: boolean;
645
+ /**
646
+ * Set when the last lookup failed or timed out (drives the error row with Retry). Kept apart
647
+ * from {@link FKNoMatches}: "No matches" tells the user the record does not exist, which a
648
+ * failed request does not establish.
649
+ */
650
+ FKSearchError: string | null;
633
651
  /** Index of the keyboard-highlighted active suggestion (-1 = none). */
634
652
  FKActiveIndex: number;
635
653
  /** Headers for the extra (DefaultInView) columns shown in the dropdown. */
@@ -950,6 +968,22 @@ export declare class MjFormFieldComponent extends BaseAngularComponent implement
950
968
  * Falls back to searching by primary key when no NameField exists (single-field PKs only).
951
969
  */
952
970
  private searchRelatedEntity;
971
+ /**
972
+ * Run the resolved strategy under the field's timeout. Everything inside is third-party code:
973
+ * the seam exists so an app can supply its own lookup. A registered strategy that throws falls
974
+ * back to MJ's own rows; a timeout, or a failure of MJ's own lookup, becomes the error row.
975
+ * Null when a newer lookup superseded this one before it failed.
976
+ */
977
+ private runLookup;
978
+ /** The error row's text: a timeout says so, anything else is a plain failure. */
979
+ private describeFKSearchFailure;
980
+ /** Replace the dropdown's rows with the error row. The pinned current selection stays. */
981
+ private showFKSearchFailure;
982
+ /**
983
+ * Re-run the query that failed. `mousedown` with `preventDefault`, like the clear button, so
984
+ * the input keeps focus and the blur grace period never closes the panel under the click.
985
+ */
986
+ OnFKRetryClick(event: MouseEvent): void;
953
987
  /**
954
988
  * MJ's own rows, used when a registered strategy threw. Contained in turn: if the default
955
989
  * cannot answer either, the dropdown shows "no matches" rather than propagating.
@@ -1137,6 +1171,6 @@ export declare class MjFormFieldComponent extends BaseAngularComponent implement
1137
1171
  */
1138
1172
  get StoredDateIsUnreadable(): boolean;
1139
1173
  static ɵfac: i0.ɵɵFactoryDeclaration<MjFormFieldComponent, never>;
1140
- static ɵcmp: i0.ɵɵComponentDeclaration<MjFormFieldComponent, "mj-form-field", never, { "Record": { "alias": "Record"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "FieldName": { "alias": "FieldName"; "required": false; }; "Type": { "alias": "Type"; "required": false; }; "LinkType": { "alias": "LinkType"; "required": false; }; "ShowLabel": { "alias": "ShowLabel"; "required": false; }; "FormContext": { "alias": "FormContext"; "required": false; }; "_deprecatedRecord": { "alias": "record"; "required": false; }; "_deprecatedFormContext": { "alias": "formContext"; "required": false; }; "HideWhenEmptyInReadOnlyMode": { "alias": "HideWhenEmptyInReadOnlyMode"; "required": false; }; "DisplayNameOverride": { "alias": "DisplayNameOverride"; "required": false; }; "PossibleValuesOverride": { "alias": "PossibleValuesOverride"; "required": false; }; "FKDropdownMaxWidth": { "alias": "FKDropdownMaxWidth"; "required": false; }; "FKHighlightMatches": { "alias": "FKHighlightMatches"; "required": false; }; "AllowFKCreate": { "alias": "AllowFKCreate"; "required": false; }; "FKCreatePresentation": { "alias": "FKCreatePresentation"; "required": false; }; "FKExtraFilter": { "alias": "FKExtraFilter"; "required": false; }; "FKOrderBy": { "alias": "FKOrderBy"; "required": false; }; "FKMaxRows": { "alias": "FKMaxRows"; "required": false; }; "FKLookupOptions": { "alias": "FKLookupOptions"; "required": false; }; }, { "ValueChange": "ValueChange"; "Navigate": "Navigate"; }, never, never, false, never>;
1174
+ static ɵcmp: i0.ɵɵComponentDeclaration<MjFormFieldComponent, "mj-form-field", never, { "Record": { "alias": "Record"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "FieldName": { "alias": "FieldName"; "required": false; }; "Type": { "alias": "Type"; "required": false; }; "LinkType": { "alias": "LinkType"; "required": false; }; "ShowLabel": { "alias": "ShowLabel"; "required": false; }; "FormContext": { "alias": "FormContext"; "required": false; }; "_deprecatedRecord": { "alias": "record"; "required": false; }; "_deprecatedFormContext": { "alias": "formContext"; "required": false; }; "HideWhenEmptyInReadOnlyMode": { "alias": "HideWhenEmptyInReadOnlyMode"; "required": false; }; "DisplayNameOverride": { "alias": "DisplayNameOverride"; "required": false; }; "PossibleValuesOverride": { "alias": "PossibleValuesOverride"; "required": false; }; "FKDropdownMaxWidth": { "alias": "FKDropdownMaxWidth"; "required": false; }; "FKHighlightMatches": { "alias": "FKHighlightMatches"; "required": false; }; "AllowFKCreate": { "alias": "AllowFKCreate"; "required": false; }; "FKCreatePresentation": { "alias": "FKCreatePresentation"; "required": false; }; "FKExtraFilter": { "alias": "FKExtraFilter"; "required": false; }; "FKOrderBy": { "alias": "FKOrderBy"; "required": false; }; "FKMaxRows": { "alias": "FKMaxRows"; "required": false; }; "FKSearchTimeoutMs": { "alias": "FKSearchTimeoutMs"; "required": false; }; "FKLookupOptions": { "alias": "FKLookupOptions"; "required": false; }; }, { "ValueChange": "ValueChange"; "Navigate": "Navigate"; }, never, never, false, never>;
1141
1175
  }
1142
1176
  //# sourceMappingURL=form-field.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../../src/lib/field/form-field.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAsD,SAAS,EAAE,aAAa,EAAE,SAAS,EAAqC,MAAM,eAAe,CAAC;AAEnM,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAc,eAAe,EAAqB,YAAY,EAAwO,MAAM,sBAAsB,CAAC;AAEtV,OAAO,EAAE,mBAAmB,EAA4E,MAAM,wBAAwB,CAAC;AACvI,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC/B,MAAM,qDAAqD,CAAC;AAQ7D,OAAO,EAGL,KAAK,YAAY,EAGjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;;AAS9B;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvE;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,gBAA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,IAAI;IAMtC,UAAU,IAAI,IAAI;IAQlB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,aAAa;IASrB;;;OAGG;YACW,yBAAyB;IA4BvC;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMlC;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAKhC;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAKpC;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAM3B;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,sBAAsB,IAAI,OAAO,CAMpC;yCA77GU,oBAAoB;2CAApB,oBAAoB;CA87GhC"}
1
+ {"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../../src/lib/field/form-field.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAsD,SAAS,EAAE,aAAa,EAAE,SAAS,EAAqC,MAAM,eAAe,CAAC;AAEnM,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAc,eAAe,EAAqB,YAAY,EAAwO,MAAM,sBAAsB,CAAC;AAEtV,OAAO,EAAE,mBAAmB,EAA4E,MAAM,wBAAwB,CAAC;AACvI,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC/B,MAAM,qDAAqD,CAAC;AAS7D,OAAO,EAGL,KAAK,YAAY,EAGjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;;AAmB9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