@open-mercato/search 0.6.7-develop.6785.1.1dd7cfac55 → 0.6.7-develop.6795.1.8a3f27921c

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 (33) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/AGENTS.md +1 -0
  3. package/dist/lib/presenter-enricher.js +12 -12
  4. package/dist/lib/presenter-enricher.js.map +2 -2
  5. package/dist/modules/search/frontend/components/GlobalSearchDialog.js +2 -9
  6. package/dist/modules/search/frontend/components/GlobalSearchDialog.js.map +2 -2
  7. package/dist/modules/search/frontend/components/HybridSearchTable.js +2 -11
  8. package/dist/modules/search/frontend/components/HybridSearchTable.js.map +2 -2
  9. package/dist/modules/search/frontend/components/TopbarSearchInline.js +2 -9
  10. package/dist/modules/search/frontend/components/TopbarSearchInline.js.map +2 -2
  11. package/dist/modules/search/frontend/lib/entityTypeLabel.js +19 -0
  12. package/dist/modules/search/frontend/lib/entityTypeLabel.js.map +7 -0
  13. package/dist/modules/search/i18n/de.json +47 -0
  14. package/dist/modules/search/i18n/en.json +47 -0
  15. package/dist/modules/search/i18n/es.json +47 -0
  16. package/dist/modules/search/i18n/pl.json +47 -0
  17. package/dist/service.js +2 -5
  18. package/dist/service.js.map +2 -2
  19. package/package.json +9 -9
  20. package/src/__tests__/presenter-enricher.test.ts +48 -0
  21. package/src/__tests__/presenter-locale.test.ts +76 -0
  22. package/src/lib/presenter-enricher.ts +14 -14
  23. package/src/modules/search/api/__tests__/global-search.routes.test.ts +167 -0
  24. package/src/modules/search/frontend/components/GlobalSearchDialog.tsx +2 -15
  25. package/src/modules/search/frontend/components/HybridSearchTable.tsx +2 -17
  26. package/src/modules/search/frontend/components/TopbarSearchInline.tsx +2 -15
  27. package/src/modules/search/frontend/lib/__tests__/entityTypeLabel.test.ts +25 -0
  28. package/src/modules/search/frontend/lib/entityTypeLabel.ts +22 -0
  29. package/src/modules/search/i18n/de.json +47 -0
  30. package/src/modules/search/i18n/en.json +47 -0
  31. package/src/modules/search/i18n/es.json +47 -0
  32. package/src/modules/search/i18n/pl.json +47 -0
  33. package/src/service.ts +2 -7
@@ -50,6 +50,53 @@
50
50
  "search.dialog.strategies.toggle": "Opciones de búsqueda",
51
51
  "search.dialog.title": "Búsqueda Global",
52
52
  "search.dialog.warnings.configureLink": "Configurar búsqueda",
53
+ "search.entityType.catalog.catalog_offer": "Oferta",
54
+ "search.entityType.catalog.catalog_option_schema_template": "Plantilla de opciones",
55
+ "search.entityType.catalog.catalog_price_kind": "Tipo de precio",
56
+ "search.entityType.catalog.catalog_product": "Producto",
57
+ "search.entityType.catalog.catalog_product_category": "Categoría",
58
+ "search.entityType.catalog.catalog_product_tag": "Etiqueta",
59
+ "search.entityType.catalog.catalog_product_unit_conversion": "Conversión de unidades",
60
+ "search.entityType.catalog.catalog_product_variant": "Variante",
61
+ "search.entityType.customer_accounts.customer_role": "Rol de cliente",
62
+ "search.entityType.customer_accounts.customer_user": "Usuario de cliente",
63
+ "search.entityType.customers.customer_activity": "Actividad",
64
+ "search.entityType.customers.customer_comment": "Comentario",
65
+ "search.entityType.customers.customer_company_profile": "Empresa",
66
+ "search.entityType.customers.customer_deal": "Oportunidad",
67
+ "search.entityType.customers.customer_entity": "Cliente",
68
+ "search.entityType.customers.customer_person_profile": "Persona",
69
+ "search.entityType.customers.customer_todo_link": "Tarea",
70
+ "search.entityType.inbox_ops.inbox_proposal": "Propuesta de bandeja",
71
+ "search.entityType.messages.message": "Mensaje",
72
+ "search.entityType.planner.planner_availability_rule_set": "Reglas de disponibilidad",
73
+ "search.entityType.resources.resources_resource": "Recurso",
74
+ "search.entityType.resources.resources_resource_type": "Tipo de recurso",
75
+ "search.entityType.sales.sales_channel": "Canal",
76
+ "search.entityType.sales.sales_credit_memo": "Nota de crédito",
77
+ "search.entityType.sales.sales_credit_memo_line": "Línea de nota de crédito",
78
+ "search.entityType.sales.sales_delivery_window": "Ventana de entrega",
79
+ "search.entityType.sales.sales_document_address": "Dirección del documento",
80
+ "search.entityType.sales.sales_document_tag": "Etiqueta de documento",
81
+ "search.entityType.sales.sales_invoice": "Factura",
82
+ "search.entityType.sales.sales_invoice_line": "Línea de factura",
83
+ "search.entityType.sales.sales_note": "Nota",
84
+ "search.entityType.sales.sales_order": "Pedido",
85
+ "search.entityType.sales.sales_order_adjustment": "Ajuste de pedido",
86
+ "search.entityType.sales.sales_order_line": "Línea de pedido",
87
+ "search.entityType.sales.sales_payment": "Pago",
88
+ "search.entityType.sales.sales_payment_allocation": "Asignación de pago",
89
+ "search.entityType.sales.sales_payment_method": "Método de pago",
90
+ "search.entityType.sales.sales_quote": "Presupuesto",
91
+ "search.entityType.sales.sales_quote_adjustment": "Ajuste de presupuesto",
92
+ "search.entityType.sales.sales_quote_line": "Línea de presupuesto",
93
+ "search.entityType.sales.sales_shipment": "Envío",
94
+ "search.entityType.sales.sales_shipment_item": "Artículo de envío",
95
+ "search.entityType.sales.sales_shipping_method": "Método de envío",
96
+ "search.entityType.sales.sales_tax_rate": "Tasa de impuesto",
97
+ "search.entityType.staff.staff_team": "Equipo",
98
+ "search.entityType.staff.staff_team_member": "Miembro del equipo",
99
+ "search.entityType.staff.staff_team_role": "Rol del equipo",
53
100
  "search.messages.missingConfig": "La búsqueda requiere configurar un proveedor de embeddings para la búsqueda semántica.",
54
101
  "search.nav.hybridSearch": "Búsqueda",
55
102
  "search.scopeHint.currentOrg": "Alcance: organización actual",
@@ -50,6 +50,53 @@
50
50
  "search.dialog.strategies.toggle": "Opcje wyszukiwania",
51
51
  "search.dialog.title": "Globalne Wyszukiwanie",
52
52
  "search.dialog.warnings.configureLink": "Skonfiguruj wyszukiwanie",
53
+ "search.entityType.catalog.catalog_offer": "Oferta",
54
+ "search.entityType.catalog.catalog_option_schema_template": "Szablon opcji",
55
+ "search.entityType.catalog.catalog_price_kind": "Typ ceny",
56
+ "search.entityType.catalog.catalog_product": "Produkt",
57
+ "search.entityType.catalog.catalog_product_category": "Kategoria",
58
+ "search.entityType.catalog.catalog_product_tag": "Tag",
59
+ "search.entityType.catalog.catalog_product_unit_conversion": "Przelicznik jednostek",
60
+ "search.entityType.catalog.catalog_product_variant": "Wariant",
61
+ "search.entityType.customer_accounts.customer_role": "Rola klienta",
62
+ "search.entityType.customer_accounts.customer_user": "Użytkownik klienta",
63
+ "search.entityType.customers.customer_activity": "Aktywność",
64
+ "search.entityType.customers.customer_comment": "Komentarz",
65
+ "search.entityType.customers.customer_company_profile": "Firma",
66
+ "search.entityType.customers.customer_deal": "Szansa sprzedaży",
67
+ "search.entityType.customers.customer_entity": "Klient",
68
+ "search.entityType.customers.customer_person_profile": "Osoba",
69
+ "search.entityType.customers.customer_todo_link": "Zadanie",
70
+ "search.entityType.inbox_ops.inbox_proposal": "Propozycja skrzynki",
71
+ "search.entityType.messages.message": "Wiadomość",
72
+ "search.entityType.planner.planner_availability_rule_set": "Reguły dostępności",
73
+ "search.entityType.resources.resources_resource": "Zasób",
74
+ "search.entityType.resources.resources_resource_type": "Typ zasobu",
75
+ "search.entityType.sales.sales_channel": "Kanał",
76
+ "search.entityType.sales.sales_credit_memo": "Nota kredytowa",
77
+ "search.entityType.sales.sales_credit_memo_line": "Pozycja noty kredytowej",
78
+ "search.entityType.sales.sales_delivery_window": "Okno dostawy",
79
+ "search.entityType.sales.sales_document_address": "Adres dokumentu",
80
+ "search.entityType.sales.sales_document_tag": "Tag dokumentu",
81
+ "search.entityType.sales.sales_invoice": "Faktura",
82
+ "search.entityType.sales.sales_invoice_line": "Pozycja faktury",
83
+ "search.entityType.sales.sales_note": "Notatka",
84
+ "search.entityType.sales.sales_order": "Zamówienie",
85
+ "search.entityType.sales.sales_order_adjustment": "Korekta zamówienia",
86
+ "search.entityType.sales.sales_order_line": "Pozycja zamówienia",
87
+ "search.entityType.sales.sales_payment": "Płatność",
88
+ "search.entityType.sales.sales_payment_allocation": "Przypisanie płatności",
89
+ "search.entityType.sales.sales_payment_method": "Metoda płatności",
90
+ "search.entityType.sales.sales_quote": "Oferta",
91
+ "search.entityType.sales.sales_quote_adjustment": "Korekta oferty",
92
+ "search.entityType.sales.sales_quote_line": "Pozycja oferty",
93
+ "search.entityType.sales.sales_shipment": "Wysyłka",
94
+ "search.entityType.sales.sales_shipment_item": "Pozycja wysyłki",
95
+ "search.entityType.sales.sales_shipping_method": "Metoda wysyłki",
96
+ "search.entityType.sales.sales_tax_rate": "Stawka podatku",
97
+ "search.entityType.staff.staff_team": "Zespół",
98
+ "search.entityType.staff.staff_team_member": "Członek zespołu",
99
+ "search.entityType.staff.staff_team_role": "Rola w zespole",
53
100
  "search.messages.missingConfig": "Wyszukiwanie wymaga skonfigurowania dostawcy embeddingów dla wyszukiwania semantycznego.",
54
101
  "search.nav.hybridSearch": "Wyszukiwanie",
55
102
  "search.scopeHint.currentOrg": "Zakres: bieżąca organizacja",
package/src/service.ts CHANGED
@@ -10,7 +10,6 @@ import type {
10
10
  } from './types'
11
11
  import { mergeAndRankResults } from './lib/merger'
12
12
  import { searchError } from './lib/debug'
13
- import { needsSearchResultEnrichment } from './lib/search-result-enrichment'
14
13
 
15
14
  /**
16
15
  * Default merge configuration.
@@ -163,8 +162,8 @@ export class SearchService {
163
162
  }
164
163
 
165
164
  /**
166
- * Enrich results that are missing presenter data using the configured enricher.
167
- * This ensures token-only results get proper titles/subtitles for display.
165
+ * Recompute configured presenters at request time and fill missing presenter
166
+ * or navigation data for unconfigured results.
168
167
  */
169
168
  private async enrichResultsWithPresenter(
170
169
  results: SearchResult[],
@@ -174,10 +173,6 @@ export class SearchService {
174
173
  // If no enricher configured, return as-is
175
174
  if (!this.presenterEnricher) return results
176
175
 
177
- const hasMissing = results.some(needsSearchResultEnrichment)
178
- if (!hasMissing) return results
179
-
180
- // Use the configured presenter enricher
181
176
  try {
182
177
  return await this.presenterEnricher(results, tenantId, organizationId)
183
178
  } catch {