@asteby/metacore-runtime-react 53.25.0 → 53.27.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 (387) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/action-modal-dispatcher.d.ts +3 -3
  3. package/dist/action-modal-dispatcher.d.ts.map +1 -1
  4. package/dist/action-modal-dispatcher.js +36 -31
  5. package/dist/action-priority.d.ts +1 -1
  6. package/dist/activity-diff.d.ts +1 -1
  7. package/dist/activity-diff.js +1 -1
  8. package/dist/activity-timeline.d.ts +2 -2
  9. package/dist/activity-timeline.js +3 -3
  10. package/dist/activity-value-renderer.d.ts +1 -1
  11. package/dist/activity-value-renderer.js +3 -3
  12. package/dist/addon-loader.d.ts +1 -1
  13. package/dist/addon-loader.js +3 -3
  14. package/dist/addon-page-host.js +1 -1
  15. package/dist/addon-page-loader.d.ts +2 -2
  16. package/dist/addon-page-loader.js +3 -3
  17. package/dist/api-context.js +4 -4
  18. package/dist/approval-gate.d.ts +1 -1
  19. package/dist/approval-gate.js +5 -5
  20. package/dist/assist-interview.d.ts +1 -1
  21. package/dist/assist-interview.js +1 -1
  22. package/dist/attention/index.d.ts +3 -3
  23. package/dist/attention/index.js +3 -3
  24. package/dist/attention/use-nav-badges.js +2 -2
  25. package/dist/attribute-classes.d.ts +1 -1
  26. package/dist/audit-info.d.ts +1 -1
  27. package/dist/audit-info.js +5 -5
  28. package/dist/bulk-image-dialog.d.ts +1 -1
  29. package/dist/bulk-image-dialog.js +5 -5
  30. package/dist/bulk-image-import.d.ts +2 -2
  31. package/dist/bulk-image-import.js +1 -1
  32. package/dist/bulk-image-target.d.ts +1 -1
  33. package/dist/bulk-image-target.js +1 -1
  34. package/dist/bulk-image-wizard.d.ts +1 -1
  35. package/dist/bulk-image-wizard.js +5 -5
  36. package/dist/business/catalog-product-search.d.ts +1 -1
  37. package/dist/business/customer-picker.js +4 -4
  38. package/dist/business/document-editor-model.d.ts +3 -3
  39. package/dist/business/document-editor-model.js +4 -4
  40. package/dist/business/document-editor-panels.d.ts +3 -3
  41. package/dist/business/document-editor-panels.js +1 -1
  42. package/dist/business/document-editor.d.ts +2 -2
  43. package/dist/business/document-editor.js +22 -22
  44. package/dist/business/document-lines.d.ts +2 -2
  45. package/dist/business/document-lines.js +3 -3
  46. package/dist/business/field-errors.d.ts +1 -1
  47. package/dist/business/field-errors.js +1 -1
  48. package/dist/business/format.js +1 -1
  49. package/dist/business/index.d.ts +29 -29
  50. package/dist/business/index.js +29 -29
  51. package/dist/business/inspection-checklist.d.ts +1 -1
  52. package/dist/business/inspection-checklist.js +2 -2
  53. package/dist/business/inspection.d.ts +1 -1
  54. package/dist/business/inspection.js +2 -2
  55. package/dist/business/line-items-editor.d.ts +3 -3
  56. package/dist/business/line-items-editor.js +5 -5
  57. package/dist/business/line-items.d.ts +1 -1
  58. package/dist/business/line-items.js +2 -2
  59. package/dist/business/line-product-cell.d.ts +2 -2
  60. package/dist/business/line-product-cell.js +2 -2
  61. package/dist/business/payment-allocator.d.ts +1 -1
  62. package/dist/business/payment-allocator.js +2 -2
  63. package/dist/business/payment-capture.d.ts +1 -1
  64. package/dist/business/payment-capture.js +3 -3
  65. package/dist/business/payment.js +1 -1
  66. package/dist/business/print-send-dialog.js +1 -1
  67. package/dist/business/product-display.d.ts +1 -1
  68. package/dist/business/product-options.d.ts +1 -1
  69. package/dist/business/product-options.js +4 -4
  70. package/dist/business/product-picker.d.ts +1 -1
  71. package/dist/business/product-picker.js +3 -3
  72. package/dist/business/product-search.d.ts +2 -2
  73. package/dist/business/product-search.js +1 -1
  74. package/dist/business/refund-destination.d.ts +1 -1
  75. package/dist/business/refund-destination.js +2 -2
  76. package/dist/business/refund.js +1 -1
  77. package/dist/business/relate-documents.js +1 -1
  78. package/dist/business/return-wizard.d.ts +2 -2
  79. package/dist/business/return-wizard.js +4 -4
  80. package/dist/business/return.d.ts +2 -2
  81. package/dist/business/return.js +2 -2
  82. package/dist/business/vehicle-picker.js +3 -3
  83. package/dist/cache-coherence.js +3 -3
  84. package/dist/capability-providers/index.d.ts +3 -3
  85. package/dist/capability-providers/index.js +3 -3
  86. package/dist/capability-providers/provider-sortable-list.d.ts +1 -1
  87. package/dist/capability-providers/provider-sortable-list.js +1 -1
  88. package/dist/collection-cell.js +1 -1
  89. package/dist/column-filter-field.d.ts +1 -1
  90. package/dist/column-visibility.d.ts +1 -1
  91. package/dist/custom-stages.d.ts +2 -2
  92. package/dist/custom-stages.js +1 -1
  93. package/dist/dashboard-grid.d.ts +1 -1
  94. package/dist/dashboard-grid.js +3 -3
  95. package/dist/dialogs/create-record-dialog.d.ts +1 -1
  96. package/dist/dialogs/create-record-dialog.js +1 -1
  97. package/dist/dialogs/dynamic-record.d.ts +15 -5
  98. package/dist/dialogs/dynamic-record.d.ts.map +1 -1
  99. package/dist/dialogs/dynamic-record.js +47 -41
  100. package/dist/dialogs/export.d.ts +1 -1
  101. package/dist/dialogs/export.js +2 -2
  102. package/dist/dialogs/import.d.ts +1 -1
  103. package/dist/dialogs/import.js +3 -3
  104. package/dist/dialogs/inline-relation-rows.d.ts +3 -3
  105. package/dist/dialogs/inline-relation-rows.js +3 -3
  106. package/dist/dialogs/inline-relations.d.ts +3 -3
  107. package/dist/dialogs/inline-relations.js +3 -3
  108. package/dist/dialogs/normalize-submit.d.ts +1 -1
  109. package/dist/dialogs/normalize-submit.js +3 -3
  110. package/dist/dialogs/use-inline-relations.d.ts +1 -1
  111. package/dist/dialogs/use-inline-relations.js +3 -3
  112. package/dist/dialogs/view-record-dialog.d.ts +1 -1
  113. package/dist/dialogs/view-record-dialog.js +1 -1
  114. package/dist/display-value.js +1 -1
  115. package/dist/document/action-bar.d.ts +1 -1
  116. package/dist/document/action-bar.js +1 -1
  117. package/dist/document/document-header.d.ts +2 -2
  118. package/dist/document/document-header.js +2 -2
  119. package/dist/document/document-page.d.ts +3 -3
  120. package/dist/document/document-page.js +9 -9
  121. package/dist/document/document-timeline.d.ts +2 -2
  122. package/dist/document/document-timeline.js +2 -2
  123. package/dist/document/evaluate.d.ts +1 -1
  124. package/dist/document/evaluate.js +1 -1
  125. package/dist/document/format.d.ts +1 -1
  126. package/dist/document/index.d.ts +13 -13
  127. package/dist/document/index.js +13 -13
  128. package/dist/document/registry.d.ts +1 -1
  129. package/dist/document/secondary-bar.js +2 -2
  130. package/dist/document/smart-buttons.js +1 -1
  131. package/dist/document/status-badge.d.ts +1 -1
  132. package/dist/document/use-document-sources.d.ts +1 -1
  133. package/dist/document/use-document-sources.js +2 -2
  134. package/dist/document-form-dialog.d.ts +2 -2
  135. package/dist/document-form-dialog.js +16 -16
  136. package/dist/document-template-editor.js +1 -1
  137. package/dist/dynamic-columns-shim.d.ts +1 -1
  138. package/dist/dynamic-columns.d.ts +3 -3
  139. package/dist/dynamic-columns.js +19 -19
  140. package/dist/dynamic-crud-page.d.ts +2 -2
  141. package/dist/dynamic-crud-page.js +13 -13
  142. package/dist/dynamic-date-field.d.ts +1 -1
  143. package/dist/dynamic-date-field.js +1 -1
  144. package/dist/dynamic-form-schema.d.ts +2 -2
  145. package/dist/dynamic-form-schema.js +4 -4
  146. package/dist/dynamic-form.d.ts +10 -10
  147. package/dist/dynamic-form.d.ts.map +1 -1
  148. package/dist/dynamic-form.js +31 -24
  149. package/dist/dynamic-icon.js +1 -1
  150. package/dist/dynamic-kanban.d.ts +3 -3
  151. package/dist/dynamic-kanban.js +25 -25
  152. package/dist/dynamic-line-items.d.ts +1 -1
  153. package/dist/dynamic-line-items.d.ts.map +1 -1
  154. package/dist/dynamic-line-items.js +11 -6
  155. package/dist/dynamic-multi-select-field.d.ts +1 -1
  156. package/dist/dynamic-multi-select-field.d.ts.map +1 -1
  157. package/dist/dynamic-multi-select-field.js +12 -12
  158. package/dist/dynamic-relation-helpers.d.ts +1 -1
  159. package/dist/dynamic-relation-helpers.js +2 -2
  160. package/dist/dynamic-relation.d.ts +2 -2
  161. package/dist/dynamic-relation.js +15 -15
  162. package/dist/dynamic-relations.d.ts +2 -2
  163. package/dist/dynamic-relations.js +1 -1
  164. package/dist/dynamic-row-actions.d.ts +1 -1
  165. package/dist/dynamic-row-actions.js +5 -5
  166. package/dist/dynamic-select-field.d.ts +3 -3
  167. package/dist/dynamic-select-field.js +11 -11
  168. package/dist/dynamic-table.d.ts +2 -2
  169. package/dist/dynamic-table.js +24 -24
  170. package/dist/dynamic-view.d.ts +4 -4
  171. package/dist/dynamic-view.js +7 -7
  172. package/dist/entity-select.js +4 -4
  173. package/dist/field-validation-ui.d.ts +2 -2
  174. package/dist/field-widget-registry.d.ts +1 -1
  175. package/dist/form-layout-ui.d.ts +1 -1
  176. package/dist/form-layout.d.ts +1 -1
  177. package/dist/form-layout.js +1 -1
  178. package/dist/genui/index.d.ts +1 -1
  179. package/dist/genui/index.js +1 -1
  180. package/dist/genui/settings-block.d.ts +1 -1
  181. package/dist/genui/settings-block.js +3 -3
  182. package/dist/host-api-client.d.ts +28 -1
  183. package/dist/host-api-client.d.ts.map +1 -1
  184. package/dist/host-api-client.js +27 -14
  185. package/dist/host-api.d.ts +23 -1
  186. package/dist/host-api.d.ts.map +1 -1
  187. package/dist/host-api.js +79 -4
  188. package/dist/hotswap-reload-policy.d.ts +1 -1
  189. package/dist/hotswap-reload-policy.js +1 -1
  190. package/dist/icon-picker-field.d.ts +1 -1
  191. package/dist/icon-picker-field.js +3 -3
  192. package/dist/icon-resolvers.d.ts +1 -1
  193. package/dist/icon-resolvers.js +1 -1
  194. package/dist/icon-spec.js +1 -1
  195. package/dist/index.d.ts +165 -165
  196. package/dist/index.d.ts.map +1 -1
  197. package/dist/index.js +148 -148
  198. package/dist/license/index.d.ts +6 -6
  199. package/dist/license/index.js +6 -6
  200. package/dist/license/license-expiry-banner.d.ts +1 -1
  201. package/dist/license/license-expiry-banner.js +3 -3
  202. package/dist/license/license-gate.d.ts +1 -1
  203. package/dist/license/license-gate.js +5 -5
  204. package/dist/license/license-status-badge.d.ts +1 -1
  205. package/dist/license/license-status-badge.js +1 -1
  206. package/dist/license/use-license-t.d.ts +1 -1
  207. package/dist/license/use-license-t.js +1 -1
  208. package/dist/license/view.d.ts +1 -1
  209. package/dist/license/view.js +1 -1
  210. package/dist/list-include.d.ts +1 -1
  211. package/dist/manifest-hotswap-subscriber.d.ts +1 -1
  212. package/dist/manifest-hotswap-subscriber.js +1 -1
  213. package/dist/metadata-cache.d.ts +1 -1
  214. package/dist/metadata-cache.js +1 -1
  215. package/dist/model-action-toolbar.d.ts +1 -1
  216. package/dist/model-action-toolbar.js +7 -7
  217. package/dist/nav-permissions.d.ts +1 -1
  218. package/dist/nav-permissions.js +1 -1
  219. package/dist/navigation-builder.d.ts +1 -1
  220. package/dist/navigation-builder.js +1 -1
  221. package/dist/option-display.d.ts +1 -1
  222. package/dist/option-display.js +2 -2
  223. package/dist/option-filter.d.ts +1 -1
  224. package/dist/option-when.d.ts +1 -1
  225. package/dist/org-runtime-provider.d.ts +2 -2
  226. package/dist/org-runtime-provider.js +2 -2
  227. package/dist/permissions-context.d.ts +1 -1
  228. package/dist/permissions-manager.js +4 -4
  229. package/dist/primitives/aging.js +1 -1
  230. package/dist/primitives/allocation.js +1 -1
  231. package/dist/primitives/approvals.d.ts +1 -1
  232. package/dist/primitives/contributions.js +1 -1
  233. package/dist/primitives/document-kinds.d.ts +1 -1
  234. package/dist/primitives/index.d.ts +7 -7
  235. package/dist/primitives/index.js +7 -7
  236. package/dist/primitives/panels.d.ts +1 -1
  237. package/dist/primitives/use-contributions.d.ts +2 -2
  238. package/dist/primitives/use-contributions.js +2 -2
  239. package/dist/print-document-button.d.ts +1 -1
  240. package/dist/print-document-button.js +1 -1
  241. package/dist/provenance.js +3 -3
  242. package/dist/query-batch.d.ts +1 -1
  243. package/dist/query-batch.js +1 -1
  244. package/dist/record-actions.d.ts +2 -2
  245. package/dist/record-actions.js +2 -2
  246. package/dist/record-history.d.ts +2 -2
  247. package/dist/record-history.js +3 -3
  248. package/dist/record-picker-dialog.js +3 -3
  249. package/dist/record-picker-option.d.ts +1 -1
  250. package/dist/record-picker-option.js +1 -1
  251. package/dist/record-picker.d.ts +5 -0
  252. package/dist/record-picker.d.ts.map +1 -1
  253. package/dist/record-picker.js +16 -6
  254. package/dist/record-prefill-bar.js +1 -1
  255. package/dist/relation-gallery.js +1 -1
  256. package/dist/requires-addon.d.ts +1 -1
  257. package/dist/rich-cells.js +2 -2
  258. package/dist/rich-url.js +1 -1
  259. package/dist/row-actions-menu.js +5 -5
  260. package/dist/searchable-select-field.d.ts +33 -0
  261. package/dist/searchable-select-field.d.ts.map +1 -0
  262. package/dist/searchable-select-field.js +50 -0
  263. package/dist/searchable-select.d.ts +45 -0
  264. package/dist/searchable-select.d.ts.map +1 -0
  265. package/dist/searchable-select.js +72 -0
  266. package/dist/server-error.js +2 -2
  267. package/dist/setup/addon-config-surface.d.ts +3 -3
  268. package/dist/setup/addon-config-surface.js +10 -10
  269. package/dist/setup/connector-blocks-model.d.ts +1 -1
  270. package/dist/setup/connector-blocks.d.ts +1 -1
  271. package/dist/setup/connector-blocks.js +6 -6
  272. package/dist/setup/flow-model.d.ts +1 -1
  273. package/dist/setup/health-card.d.ts +1 -1
  274. package/dist/setup/health-card.js +2 -2
  275. package/dist/setup/index.d.ts +12 -12
  276. package/dist/setup/index.js +12 -12
  277. package/dist/setup/records-table.d.ts +1 -1
  278. package/dist/setup/records-table.js +2 -2
  279. package/dist/setup/setup-flow.d.ts +1 -1
  280. package/dist/setup/setup-flow.js +7 -7
  281. package/dist/setup/setup-form-step.d.ts +1 -1
  282. package/dist/setup/setup-form-step.js +4 -4
  283. package/dist/setup/step-status-badge.d.ts +1 -1
  284. package/dist/setup/step-status-badge.js +2 -2
  285. package/dist/setup/tone.d.ts +1 -1
  286. package/dist/setup/types.d.ts +2 -2
  287. package/dist/sidebar-layout-manager.d.ts +1 -1
  288. package/dist/sidebar-layout-manager.js +2 -2
  289. package/dist/slot.js +1 -1
  290. package/dist/slots/addon-slot.js +4 -4
  291. package/dist/slots/index.d.ts +2 -2
  292. package/dist/slots/index.js +2 -2
  293. package/dist/stage-automations.d.ts +2 -2
  294. package/dist/stage-automations.js +1 -1
  295. package/dist/stage-layout.js +1 -1
  296. package/dist/stage-overrides.d.ts +1 -1
  297. package/dist/stage-overrides.js +1 -1
  298. package/dist/supervised-action.js +1 -1
  299. package/dist/testing.d.ts +1 -1
  300. package/dist/testing.js +1 -1
  301. package/dist/tri-state-boolean.d.ts +2 -2
  302. package/dist/tri-state-boolean.js +1 -1
  303. package/dist/types.d.ts +13 -1
  304. package/dist/types.d.ts.map +1 -1
  305. package/dist/upload-field.d.ts +1 -1
  306. package/dist/upload-field.js +4 -4
  307. package/dist/use-addon-installed-probe.js +3 -3
  308. package/dist/use-addon-settings.d.ts +1 -1
  309. package/dist/use-addon-settings.js +1 -1
  310. package/dist/use-dynamic-filters.d.ts +2 -2
  311. package/dist/use-dynamic-filters.js +6 -6
  312. package/dist/use-edge-device.d.ts +1 -1
  313. package/dist/use-edge-device.js +2 -2
  314. package/dist/use-facet-loaders.d.ts +1 -1
  315. package/dist/use-facet-loaders.js +1 -1
  316. package/dist/use-flip-animation.d.ts +1 -1
  317. package/dist/use-flip-animation.js +1 -1
  318. package/dist/use-host-api-client.d.ts +2 -2
  319. package/dist/use-host-api-client.d.ts.map +1 -1
  320. package/dist/use-host-api-client.js +6 -4
  321. package/dist/use-option-ids.d.ts +1 -1
  322. package/dist/use-option-ids.js +2 -2
  323. package/dist/use-options-resolver.d.ts +2 -2
  324. package/dist/use-options-resolver.js +4 -4
  325. package/dist/use-org-document-templates.js +1 -1
  326. package/dist/use-print-document.js +1 -1
  327. package/dist/use-record-mutation-tick.js +1 -1
  328. package/dist/validator.d.ts +2 -2
  329. package/dist/validator.js +1 -1
  330. package/dist/view-system/card-spec.d.ts +1 -1
  331. package/dist/view-system/cards-view.d.ts +1 -1
  332. package/dist/view-system/cards-view.js +2 -2
  333. package/dist/view-system/index.d.ts +9 -9
  334. package/dist/view-system/index.js +9 -9
  335. package/dist/view-system/model-view.d.ts +3 -3
  336. package/dist/view-system/model-view.js +7 -7
  337. package/dist/view-system/saved-views.d.ts +1 -1
  338. package/dist/view-system/use-view-mode.d.ts +1 -1
  339. package/dist/view-system/view-state.d.ts +1 -1
  340. package/dist/view-system/view-switcher.d.ts +1 -1
  341. package/dist/view-system/view-toolbar.d.ts +1 -1
  342. package/dist/view-system/view-toolbar.js +2 -2
  343. package/dist/views/calendar-view.d.ts +1 -1
  344. package/dist/views/calendar-view.js +2 -2
  345. package/dist/views/chart-view.d.ts +2 -2
  346. package/dist/views/chart-view.js +2 -2
  347. package/dist/views/data-source.d.ts +2 -2
  348. package/dist/views/index.d.ts +3 -3
  349. package/dist/views/index.js +2 -2
  350. package/dist/views/map-view.d.ts +1 -1
  351. package/dist/views/map-view.js +3 -3
  352. package/dist/views/panels.d.ts +1 -1
  353. package/dist/views/panels.js +3 -3
  354. package/dist/views/registry.d.ts +2 -2
  355. package/dist/views/registry.js +12 -12
  356. package/dist/views/split-view.d.ts +1 -1
  357. package/dist/views/split-view.js +4 -4
  358. package/dist/views/timeline-view.d.ts +1 -1
  359. package/dist/views/timeline-view.js +3 -3
  360. package/dist/views/types.d.ts +2 -2
  361. package/dist/widgets/charts.d.ts +1 -1
  362. package/dist/widgets/charts.js +2 -2
  363. package/dist/widgets/lazy-charts.d.ts +1 -1
  364. package/dist/widgets/lazy-charts.js +2 -2
  365. package/dist/widgets/renderers.d.ts +2 -2
  366. package/dist/widgets/renderers.js +2 -2
  367. package/dist/widgets/widget-card.d.ts +1 -1
  368. package/dist/widgets/widget-card.js +2 -2
  369. package/dist/widgets/widget-renderer.d.ts +1 -1
  370. package/dist/widgets/widget-renderer.js +4 -4
  371. package/package.json +9 -9
  372. package/src/__tests__/host-api-client.test.tsx +28 -0
  373. package/src/__tests__/host-api.test.ts +91 -0
  374. package/src/__tests__/searchable-select.test.tsx +247 -0
  375. package/src/action-modal-dispatcher.tsx +16 -0
  376. package/src/dialogs/dynamic-record.tsx +26 -0
  377. package/src/dynamic-form.tsx +17 -0
  378. package/src/dynamic-line-items.tsx +17 -0
  379. package/src/dynamic-multi-select-field.tsx +5 -4
  380. package/src/host-api-client.ts +51 -15
  381. package/src/host-api.ts +81 -3
  382. package/src/index.ts +2 -1
  383. package/src/record-picker.tsx +32 -3
  384. package/src/searchable-select-field.tsx +134 -0
  385. package/src/searchable-select.ts +87 -0
  386. package/src/types.ts +12 -0
  387. package/src/use-host-api-client.ts +5 -3
@@ -0,0 +1,33 @@
1
+ export interface SearchableSelectOption {
2
+ value: string | number;
3
+ label: string;
4
+ description?: string | null;
5
+ color?: string;
6
+ icon?: string;
7
+ image?: string;
8
+ }
9
+ export interface SearchableSelectFieldProps {
10
+ options: readonly SearchableSelectOption[];
11
+ /** Current value (string | number); empty / nullish = nothing selected. */
12
+ value: unknown;
13
+ onChange: (value: string) => void;
14
+ id?: string;
15
+ /** Accessible name (the field label). */
16
+ ariaLabel?: string;
17
+ placeholder?: string;
18
+ /** Required fields cannot be cleared. */
19
+ required?: boolean;
20
+ disabled?: boolean;
21
+ invalid?: boolean;
22
+ /** `cell` = compact variant for table / line-item cells. */
23
+ variant?: 'field' | 'cell';
24
+ /** Overrides the "Buscar..." search placeholder. */
25
+ searchPlaceholder?: string;
26
+ /** Overrides the "Sin resultados" copy. */
27
+ emptyText?: string;
28
+ maxRows?: number;
29
+ triggerClassName?: string;
30
+ }
31
+ export declare function SearchableSelectField({ options, value, onChange, id, ariaLabel, placeholder, required, disabled, invalid, variant, searchPlaceholder, emptyText, maxRows, triggerClassName, }: SearchableSelectFieldProps): import("react").JSX.Element;
32
+ export default SearchableSelectField;
33
+ //# sourceMappingURL=searchable-select-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchable-select-field.d.ts","sourceRoot":"","sources":["../src/searchable-select-field.tsx"],"names":[],"mappings":"AAwBA,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,0BAA0B;IACvC,OAAO,EAAE,SAAS,sBAAsB,EAAE,CAAA;IAC1C,2EAA2E;IAC3E,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAaD,wBAAgB,qBAAqB,CAAC,EAClC,OAAO,EACP,KAAK,EACL,QAAQ,EACR,EAAE,EACF,SAAS,EACT,WAA8B,EAC9B,QAAgB,EAChB,QAAgB,EAChB,OAAe,EACf,OAAiB,EACjB,iBAA6B,EAC7B,SAA4B,EAC5B,OAAoC,EACpC,gBAAgB,GACnB,EAAE,0BAA0B,+BAiD5B;AAED,eAAe,qBAAqB,CAAA"}
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // SearchableSelectField - the combobox-with-search that replaces the flat
3
+ // <Select> when a STATIC option list is long (a tax-regime catalog with ~25
4
+ // entries, a country list...), so the user types instead of scrolling.
5
+ //
6
+ // It is a thin configuration of the shared <RecordPicker> (the same control
7
+ // DynamicSelectField and EntitySelect use), so it inherits ARIA combobox +
8
+ // listbox with aria-activedescendant, arrows/Home/End/Enter/Esc/Tab, type-ahead
9
+ // on the closed trigger, scroll-to-selected on open, a portaled collision-aware
10
+ // popover and light/dark theming. What it adds:
11
+ // - client-side filtering by label, code (value) and `description`, ignoring
12
+ // case and accents (a code, a word or an unaccented word find the same row);
13
+ // - match highlighting, a "no results" state and a windowed list when the
14
+ // catalog is huge;
15
+ // - a clear (x) when the field is not required.
16
+ //
17
+ // Who renders it: DynamicForm / DynamicRecordDialog / ActionModal / line items,
18
+ // via {@link isSearchableSelect}: `field.searchable === true`, or - unless
19
+ // `searchable === false` - more than SEARCHABLE_SELECT_THRESHOLD options.
20
+ import { useMemo, useState } from 'react';
21
+ import { RecordPicker } from './record-picker.js';
22
+ import { OptionLead } from './record-picker-option.js';
23
+ import { SEARCHABLE_SELECT_MAX_ROWS, filterSearchableOptions, windowOptions } from './searchable-select.js';
24
+ const toResolved = (o) => ({
25
+ id: String(o.value),
26
+ value: String(o.value),
27
+ label: o.label,
28
+ name: o.label,
29
+ description: o.description ?? undefined,
30
+ color: o.color,
31
+ icon: o.icon,
32
+ image: o.image,
33
+ });
34
+ export function SearchableSelectField({ options, value, onChange, id, ariaLabel, placeholder = 'Seleccionar...', required = false, disabled = false, invalid = false, variant = 'field', searchPlaceholder = 'Buscar…', emptyText = 'Sin resultados', maxRows = SEARCHABLE_SELECT_MAX_ROWS, triggerClassName, }) {
35
+ const [query, setQuery] = useState('');
36
+ const all = useMemo(() => options.map(toResolved), [options]);
37
+ const valueKey = value != null && value !== '' ? String(value) : '';
38
+ const selected = valueKey ? (all.find((o) => String(o.id) === valueKey) ?? null) : null;
39
+ const { rows, hidden } = useMemo(() => {
40
+ const matched = filterSearchableOptions(all, query);
41
+ return windowOptions(matched, maxRows, (o) => String(o.id) === valueKey);
42
+ }, [all, query, maxRows, valueKey]);
43
+ return (_jsx(RecordPicker, { slot: "searchable-select", id: id, ariaLabel: ariaLabel, items: rows, getKey: (o) => String(o.id), getLabel: (o) => o.label, getDescription: (o) => o.description,
44
+ // Plain text options get no lead (OptionLead would add an initials avatar).
45
+ renderLead: (o, where) => (o.image || o.icon || o.color ? _jsx(OptionLead, { option: o, size: where === 'option' ? 24 : 20 }) : null), value: valueKey || null, selected: selected, onSelect: (o) => onChange(String(o.id)), onClear: !required && valueKey ? () => onChange('') : undefined, query: query, onQueryChange: setQuery, onOpenChange: (o) => {
46
+ if (!o)
47
+ setQuery('');
48
+ }, placeholder: placeholder, searchPlaceholder: searchPlaceholder, emptyText: emptyText, highlightQuery: true, disabled: disabled, invalid: invalid, variant: variant, triggerClassName: triggerClassName, listLabel: ariaLabel, beforeList: hidden > 0 ? (_jsx("p", { className: "px-3 py-1.5 text-xs text-muted-foreground", "data-slot": "searchable-select-more", role: "status", children: `Mostrando ${rows.length} de ${rows.length + hidden} — escribe para filtrar` })) : null }));
49
+ }
50
+ export default SearchableSelectField;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Option count above which a static select becomes a searchable combobox when
3
+ * the field does not say otherwise. Mirrors the kernel constant
4
+ * `modelbase.SearchableSelectThreshold`. At or below it the flat select stays.
5
+ */
6
+ export declare const SEARCHABLE_SELECT_THRESHOLD = 8;
7
+ /**
8
+ * Rows rendered at once in the list. Static lists are filtered client-side, so
9
+ * a long catalog (hundreds of rows) is windowed instead of painting every row:
10
+ * the match set is cut to this many (the selected option is always kept) and
11
+ * the list says how many more there are. Typing narrows it.
12
+ */
13
+ export declare const SEARCHABLE_SELECT_MAX_ROWS = 100;
14
+ export interface SearchableSelectConfig {
15
+ /** `true` forces the combobox, `false` the flat select, unset = by option count. */
16
+ searchable?: boolean | null;
17
+ /** Per-field override of the threshold (`searchThreshold`). */
18
+ searchThreshold?: number | null;
19
+ }
20
+ /** Should a static select with `count` options render as a searchable combobox? */
21
+ export declare function isSearchableSelect(field: SearchableSelectConfig | undefined | null, count: number): boolean;
22
+ export interface SearchableOptionLike {
23
+ value: unknown;
24
+ label: string;
25
+ description?: string | null;
26
+ }
27
+ /** Text an option is matched against: label, code (value) and description. */
28
+ export declare function optionHaystack(o: SearchableOptionLike): string;
29
+ /**
30
+ * Filters options by `query` (case/accent insensitive, every token must hit the
31
+ * label, value or description) and ranks them: label or code starts with the
32
+ * query, then a word of the label starts with it, then any other hit. The
33
+ * original order is kept inside each rank. An empty query returns a copy of the
34
+ * list untouched.
35
+ */
36
+ export declare function filterSearchableOptions<T extends SearchableOptionLike>(options: readonly T[], query: string): T[];
37
+ /**
38
+ * Cuts a match list to `max` rows, always keeping the selected one(s) so the
39
+ * list never loses them. Returns the window and how many rows were hidden.
40
+ */
41
+ export declare function windowOptions<T>(rows: readonly T[], max: number, isSelected: (o: T) => boolean): {
42
+ rows: T[];
43
+ hidden: number;
44
+ };
45
+ //# sourceMappingURL=searchable-select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../src/searchable-select.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAE7C,MAAM,WAAW,sBAAsB;IACnC,oFAAoF;IACpF,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IAC3B,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC;AAED,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,sBAAsB,GAAG,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAM3G;AAED,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,oBAAoB,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAiBjH;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC3B,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,GAC9B;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAK/B"}
@@ -0,0 +1,72 @@
1
+ // Pure rules of the searchable select (combobox with a search box) used by the
2
+ // STATIC `select` / `multiselect` widgets. Kept free of React so the threshold
3
+ // and the matching are unit-testable and shared with the table filters.
4
+ import { matchesSearch, normalizeSearchText } from '@asteby/metacore-ui/lib';
5
+ /**
6
+ * Option count above which a static select becomes a searchable combobox when
7
+ * the field does not say otherwise. Mirrors the kernel constant
8
+ * `modelbase.SearchableSelectThreshold`. At or below it the flat select stays.
9
+ */
10
+ export const SEARCHABLE_SELECT_THRESHOLD = 8;
11
+ /**
12
+ * Rows rendered at once in the list. Static lists are filtered client-side, so
13
+ * a long catalog (hundreds of rows) is windowed instead of painting every row:
14
+ * the match set is cut to this many (the selected option is always kept) and
15
+ * the list says how many more there are. Typing narrows it.
16
+ */
17
+ export const SEARCHABLE_SELECT_MAX_ROWS = 100;
18
+ /** Should a static select with `count` options render as a searchable combobox? */
19
+ export function isSearchableSelect(field, count) {
20
+ if (field?.searchable === true)
21
+ return true;
22
+ if (field?.searchable === false)
23
+ return false;
24
+ const t = field?.searchThreshold;
25
+ const threshold = typeof t === 'number' && Number.isFinite(t) && t >= 0 ? t : SEARCHABLE_SELECT_THRESHOLD;
26
+ return count > threshold;
27
+ }
28
+ /** Text an option is matched against: label, code (value) and description. */
29
+ export function optionHaystack(o) {
30
+ return `${o.label ?? ''} ${o.value ?? ''} ${o.description ?? ''}`;
31
+ }
32
+ /**
33
+ * Filters options by `query` (case/accent insensitive, every token must hit the
34
+ * label, value or description) and ranks them: label or code starts with the
35
+ * query, then a word of the label starts with it, then any other hit. The
36
+ * original order is kept inside each rank. An empty query returns a copy of the
37
+ * list untouched.
38
+ */
39
+ export function filterSearchableOptions(options, query) {
40
+ const q = normalizeSearchText(query);
41
+ if (!q)
42
+ return options.slice();
43
+ const first = q.split(' ')[0];
44
+ const ranked = [];
45
+ options.forEach((o, i) => {
46
+ if (!matchesSearch(optionHaystack(o), q))
47
+ return;
48
+ const label = normalizeSearchText(o.label);
49
+ const code = normalizeSearchText(o.value);
50
+ let rank = 3;
51
+ if (label.startsWith(q) || code.startsWith(q))
52
+ rank = 0;
53
+ else if (label.split(/[^a-z0-9]+/).some((w) => w.startsWith(first)))
54
+ rank = 1;
55
+ else if (label.includes(q))
56
+ rank = 2;
57
+ ranked.push({ o, rank, i });
58
+ });
59
+ ranked.sort((a, b) => a.rank - b.rank || a.i - b.i);
60
+ return ranked.map((r) => r.o);
61
+ }
62
+ /**
63
+ * Cuts a match list to `max` rows, always keeping the selected one(s) so the
64
+ * list never loses them. Returns the window and how many rows were hidden.
65
+ */
66
+ export function windowOptions(rows, max, isSelected) {
67
+ if (rows.length <= max)
68
+ return { rows: rows.slice(), hidden: 0 };
69
+ const head = rows.slice(0, max);
70
+ const missing = rows.slice(max).filter(isSelected);
71
+ return { rows: [...head, ...missing], hidden: rows.length - max - missing.length };
72
+ }
@@ -10,8 +10,8 @@
10
10
  // or report it. This module keeps the headline but ALSO surfaces the cause as
11
11
  // the toast description, in ONE place so every call site behaves identically.
12
12
  import { toast } from 'sonner';
13
- import { validationCatalog, validationMessageKey } from './validation-catalog';
14
- import { APPROVAL_PARKED_EVENT, approvalGateAvailable, approvalRequiredInfo } from './approval-events';
13
+ import { validationCatalog, validationMessageKey } from './validation-catalog.js';
14
+ import { APPROVAL_PARKED_EVENT, approvalGateAvailable, approvalRequiredInfo } from './approval-events.js';
15
15
  function formatIssueEntry(v) {
16
16
  if (v == null)
17
17
  return '';
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type ApiClient } from '../api-context';
3
- import type { VisibleWhen } from '../types';
4
- import { type ConnectorFormBlock } from './connector-blocks-model';
2
+ import { type ApiClient } from '../api-context.js';
3
+ import type { VisibleWhen } from '../types.js';
4
+ import { type ConnectorFormBlock } from './connector-blocks-model.js';
5
5
  export interface AddonSettingDef {
6
6
  key: string;
7
7
  label: string;
@@ -20,16 +20,16 @@ import { toast } from 'sonner';
20
20
  import { AlertCircle, Cable, Check, Copy, Eye, EyeOff, Link2, Loader2, Pencil, RefreshCw, Settings, Sparkles, X } from 'lucide-react';
21
21
  import { Badge, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, } from '@asteby/metacore-ui/primitives';
22
22
  import { cn } from '@asteby/metacore-ui/lib';
23
- import { useApi } from '../api-context';
24
- import { evaluateVisibleWhen, getVisibleWhen } from '../dynamic-form-schema';
25
- import { useSetupT } from './messages';
26
- import { StepStatusBadge } from './step-status-badge';
27
- import { ConnectorBlocks, CopyValue, HelpText } from './connector-blocks';
28
- import { copyText } from './records-table';
29
- import { generateSecret, generatedLength, secretMinLength, secretStrength, splitHelp, tooShortSecrets, } from './secret-field-model';
30
- import { buildWizardSteps, errorMessage, hasExplicitTest, normalizeBlockResult, stepStatus, } from './connector-blocks-model';
31
- import { useAddonSettings } from '../use-addon-settings';
32
- import { isSecretCredential, missingRequired, applicableFields, visibleSections, parseSaveError, shapeMismatch, textOrFallback, } from './connector-form-model';
23
+ import { useApi } from '../api-context.js';
24
+ import { evaluateVisibleWhen, getVisibleWhen } from '../dynamic-form-schema.js';
25
+ import { useSetupT } from './messages.js';
26
+ import { StepStatusBadge } from './step-status-badge.js';
27
+ import { ConnectorBlocks, CopyValue, HelpText } from './connector-blocks.js';
28
+ import { copyText } from './records-table.js';
29
+ import { generateSecret, generatedLength, secretMinLength, secretStrength, splitHelp, tooShortSecrets, } from './secret-field-model.js';
30
+ import { buildWizardSteps, errorMessage, hasExplicitTest, normalizeBlockResult, stepStatus, } from './connector-blocks-model.js';
31
+ import { useAddonSettings } from '../use-addon-settings.js';
32
+ import { isSecretCredential, missingRequired, applicableFields, visibleSections, parseSaveError, shapeMismatch, textOrFallback, } from './connector-form-model.js';
33
33
  // Empty write_only value (typed then erased) must not overwrite the stored secret.
34
34
  const isBlank = (v) => v == null || (typeof v === 'string' && v.trim() === '');
35
35
  const NO_OPTION_KINDS = {};
@@ -1,4 +1,4 @@
1
- import type { StepStatus } from './types';
1
+ import type { StepStatus } from './types.js';
2
2
  export type ConnectorBlockKind = 'webhook_url' | 'instructions' | 'action';
3
3
  export interface ConnectorBlockLink {
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { type BlockResult, type ConnectorFormBlock } from './connector-blocks-model';
1
+ import { type BlockResult, type ConnectorFormBlock } from './connector-blocks-model.js';
2
2
  /** Long help is clamped to 3 lines with a "Ver más" toggle: never cut for good. */
3
3
  export declare function HelpText({ text, id, className, clampAt, }: {
4
4
  text: string;
@@ -13,12 +13,12 @@ import { useTranslation } from 'react-i18next';
13
13
  import { Check, Copy, ExternalLink, Loader2, Play, RotateCcw } from 'lucide-react';
14
14
  import { Button } from '@asteby/metacore-ui/primitives';
15
15
  import { cn } from '@asteby/metacore-ui/lib';
16
- import { useSetupT } from './messages';
17
- import { copyText } from './records-table';
18
- import { StepStatusBadge } from './step-status-badge';
19
- import { STEP_TONE, TONE_BADGE } from './tone';
20
- import { textOrFallback } from './connector-form-model';
21
- import { safeHttpsUrl } from './connector-blocks-model';
16
+ import { useSetupT } from './messages.js';
17
+ import { copyText } from './records-table.js';
18
+ import { StepStatusBadge } from './step-status-badge.js';
19
+ import { STEP_TONE, TONE_BADGE } from './tone.js';
20
+ import { textOrFallback } from './connector-form-model.js';
21
+ import { safeHttpsUrl } from './connector-blocks-model.js';
22
22
  /** Resolves an addon i18n key (or literal); never paints a raw dotted key. */
23
23
  function useAddonText() {
24
24
  const { t } = useTranslation();
@@ -1,4 +1,4 @@
1
- import type { SetupFlowState, SetupStepDef, SetupStepState, StepStatus } from './types';
1
+ import type { SetupFlowState, SetupStepDef, SetupStepState, StepStatus } from './types.js';
2
2
  export declare const STEP_STATUSES: StepStatus[];
3
3
  /** Accepts the array or the by-key map the server may send. */
4
4
  export declare function normalizeState(raw: SetupFlowState | null | undefined): Record<string, SetupStepState>;
@@ -1,4 +1,4 @@
1
- import type { HealthIssue, HealthMetric, HealthStatus, SetupFix } from './types';
1
+ import type { HealthIssue, HealthMetric, HealthStatus, SetupFix } from './types.js';
2
2
  export interface HealthCardProps {
3
3
  title?: string;
4
4
  status: HealthStatus;
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { AlertTriangle, CheckCircle2, HelpCircle, Info, RefreshCw, XCircle } from 'lucide-react';
3
3
  import { Button } from '@asteby/metacore-ui/primitives';
4
4
  import { cn } from '@asteby/metacore-ui/lib';
5
- import { useSetupT } from './messages';
6
- import { TONE_BADGE, TONE_TEXT, metricTone } from './tone';
5
+ import { useSetupT } from './messages.js';
6
+ import { TONE_BADGE, TONE_TEXT, metricTone } from './tone.js';
7
7
  const STATUS_TONE = { ok: 'good', warn: 'warn', error: 'bad', unknown: 'neutral' };
8
8
  const STATUS_ICON = { ok: CheckCircle2, warn: AlertTriangle, error: XCircle, unknown: HelpCircle };
9
9
  const SEVERITY_ICON = { info: Info, warn: AlertTriangle, error: XCircle };
@@ -1,13 +1,13 @@
1
- export * from './types';
2
- export * from './flow-model';
3
- export { useSetupT, SETUP_MESSAGES_ES, SETUP_MESSAGES_EN } from './messages';
4
- export { StepStatusBadge, type StepStatusBadgeProps } from './step-status-badge';
5
- export { RecordsTable, copyText, type RecordsTableProps } from './records-table';
6
- export { HealthCard, type HealthCardProps } from './health-card';
7
- export { SetupFlow, type SetupFlowProps, type SetupCustomStepProps } from './setup-flow';
8
- export { SetupFormStep, type SetupFormStepProps } from './setup-form-step';
9
- export { AddonConfigSurface, clearConnectorLookupCache, type AddonConfigSurfaceProps, type AddonConfigAddon, type AddonConfigNotifier, type AddonSettingDef, type ConnectorEntry, type ConnectorCredentialField, type ConnectorFormLayout, } from './addon-config-surface';
10
- export * from './connector-form-model';
11
- export * from './connector-blocks-model';
12
- export { ConnectorBlocks, WebhookUrlBlock, InstructionsBlock, ActionBlock, BlockResultView, HelpText, CopyValue, type ConnectorBlocksProps, type ActionBlockProps, } from './connector-blocks';
1
+ export * from './types.js';
2
+ export * from './flow-model.js';
3
+ export { useSetupT, SETUP_MESSAGES_ES, SETUP_MESSAGES_EN } from './messages.js';
4
+ export { StepStatusBadge, type StepStatusBadgeProps } from './step-status-badge.js';
5
+ export { RecordsTable, copyText, type RecordsTableProps } from './records-table.js';
6
+ export { HealthCard, type HealthCardProps } from './health-card.js';
7
+ export { SetupFlow, type SetupFlowProps, type SetupCustomStepProps } from './setup-flow.js';
8
+ export { SetupFormStep, type SetupFormStepProps } from './setup-form-step.js';
9
+ export { AddonConfigSurface, clearConnectorLookupCache, type AddonConfigSurfaceProps, type AddonConfigAddon, type AddonConfigNotifier, type AddonSettingDef, type ConnectorEntry, type ConnectorCredentialField, type ConnectorFormLayout, } from './addon-config-surface.js';
10
+ export * from './connector-form-model.js';
11
+ export * from './connector-blocks-model.js';
12
+ export { ConnectorBlocks, WebhookUrlBlock, InstructionsBlock, ActionBlock, BlockResultView, HelpText, CopyValue, type ConnectorBlocksProps, type ActionBlockProps, } from './connector-blocks.js';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,15 @@
1
1
  // Setup flow + health components (kernel `contributions.setup` / `.health`) and
2
2
  // the unified addon configuration surface. Import from the package root or from
3
3
  // `@asteby/metacore-runtime-react/setup` to pull only this slice.
4
- export * from './types';
5
- export * from './flow-model';
6
- export { useSetupT, SETUP_MESSAGES_ES, SETUP_MESSAGES_EN } from './messages';
7
- export { StepStatusBadge } from './step-status-badge';
8
- export { RecordsTable, copyText } from './records-table';
9
- export { HealthCard } from './health-card';
10
- export { SetupFlow } from './setup-flow';
11
- export { SetupFormStep } from './setup-form-step';
12
- export { AddonConfigSurface, clearConnectorLookupCache, } from './addon-config-surface';
13
- export * from './connector-form-model';
14
- export * from './connector-blocks-model';
15
- export { ConnectorBlocks, WebhookUrlBlock, InstructionsBlock, ActionBlock, BlockResultView, HelpText, CopyValue, } from './connector-blocks';
4
+ export * from './types.js';
5
+ export * from './flow-model.js';
6
+ export { useSetupT, SETUP_MESSAGES_ES, SETUP_MESSAGES_EN } from './messages.js';
7
+ export { StepStatusBadge } from './step-status-badge.js';
8
+ export { RecordsTable, copyText } from './records-table.js';
9
+ export { HealthCard } from './health-card.js';
10
+ export { SetupFlow } from './setup-flow.js';
11
+ export { SetupFormStep } from './setup-form-step.js';
12
+ export { AddonConfigSurface, clearConnectorLookupCache, } from './addon-config-surface.js';
13
+ export * from './connector-form-model.js';
14
+ export * from './connector-blocks-model.js';
15
+ export { ConnectorBlocks, WebhookUrlBlock, InstructionsBlock, ActionBlock, BlockResultView, HelpText, CopyValue, } from './connector-blocks.js';
@@ -1,4 +1,4 @@
1
- import type { SetupFix, SetupRecord } from './types';
1
+ import type { SetupFix, SetupRecord } from './types.js';
2
2
  /**
3
3
  * Copies text with a fallback: the async Clipboard API when the page may use
4
4
  * it, otherwise a hidden textarea + `execCommand('copy')` (http pages, older
@@ -3,8 +3,8 @@ import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { Check, Copy, RefreshCw } from 'lucide-react';
4
4
  import { Button } from '@asteby/metacore-ui/primitives';
5
5
  import { cn } from '@asteby/metacore-ui/lib';
6
- import { useSetupT } from './messages';
7
- import { RECORD_TONE, TONE_BADGE } from './tone';
6
+ import { useSetupT } from './messages.js';
7
+ import { RECORD_TONE, TONE_BADGE } from './tone.js';
8
8
  /**
9
9
  * Copies text with a fallback: the async Clipboard API when the page may use
10
10
  * it, otherwise a hidden textarea + `execCommand('copy')` (http pages, older
@@ -1,4 +1,4 @@
1
- import type { RunStepInput, SetupFlowClient, SetupFlowDef, SetupFlowState, SetupStepDef, SetupStepState } from './types';
1
+ import type { RunStepInput, SetupFlowClient, SetupFlowDef, SetupFlowState, SetupStepDef, SetupStepState } from './types.js';
2
2
  export interface SetupCustomStepProps {
3
3
  step: SetupStepDef;
4
4
  state?: SetupStepState;
@@ -3,13 +3,13 @@ import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { Loader2, RefreshCw } from 'lucide-react';
4
4
  import { Button } from '@asteby/metacore-ui/primitives';
5
5
  import { cn } from '@asteby/metacore-ui/lib';
6
- import { Slot } from '../slot';
7
- import { useSetupT } from './messages';
8
- import { effectiveStatus, flowProgress, isSatisfied, mergeAnswer, nextPollDelayMs, normalizeState, pickActiveStep, safeUrl, unmetDependencies, } from './flow-model';
9
- import { RecordsTable } from './records-table';
10
- import { SetupFormStep } from './setup-form-step';
11
- import { StepStatusBadge } from './step-status-badge';
12
- import { TONE_TEXT } from './tone';
6
+ import { Slot } from '../slot.js';
7
+ import { useSetupT } from './messages.js';
8
+ import { effectiveStatus, flowProgress, isSatisfied, mergeAnswer, nextPollDelayMs, normalizeState, pickActiveStep, safeUrl, unmetDependencies, } from './flow-model.js';
9
+ import { RecordsTable } from './records-table.js';
10
+ import { SetupFormStep } from './setup-form-step.js';
11
+ import { StepStatusBadge } from './step-status-badge.js';
12
+ import { TONE_TEXT } from './tone.js';
13
13
  const errorMessage = (e, fallback) => {
14
14
  const r = e?.response?.data?.message;
15
15
  if (typeof r === 'string' && r.trim())
@@ -1,4 +1,4 @@
1
- import type { SetupStepDef, SetupStepState } from './types';
1
+ import type { SetupStepDef, SetupStepState } from './types.js';
2
2
  export type AutosaveState = 'idle' | 'saving' | 'saved' | 'error';
3
3
  export interface SetupFormStepProps {
4
4
  step: SetupStepDef;
@@ -3,10 +3,10 @@ import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react'
3
3
  import { Loader2 } from 'lucide-react';
4
4
  import { Button, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, Textarea, } from '@asteby/metacore-ui/primitives';
5
5
  import { cn } from '@asteby/metacore-ui/lib';
6
- import { evaluateVisibleWhen, getVisibleWhen } from '../dynamic-form-schema';
7
- import { groupFieldsBySection } from '../form-layout';
8
- import { FieldSection, WizardProgress } from '../form-layout-ui';
9
- import { useSetupT } from './messages';
6
+ import { evaluateVisibleWhen, getVisibleWhen } from '../dynamic-form-schema.js';
7
+ import { groupFieldsBySection } from '../form-layout.js';
8
+ import { FieldSection, WizardProgress } from '../form-layout-ui.js';
9
+ import { useSetupT } from './messages.js';
10
10
  const AUTOSAVE_MS = 800;
11
11
  function initialValues(fields, saved) {
12
12
  const out = {};
@@ -1,4 +1,4 @@
1
- import type { StepStatus } from './types';
1
+ import type { StepStatus } from './types.js';
2
2
  export interface StepStatusBadgeProps {
3
3
  status: StepStatus;
4
4
  /** Overrides the localized label. */
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { AlertTriangle, Circle, CheckCircle2, Loader2, Lock, XCircle } from 'lucide-react';
3
3
  import { cn } from '@asteby/metacore-ui/lib';
4
- import { useSetupT } from './messages';
5
- import { STEP_TONE, TONE_BADGE } from './tone';
4
+ import { useSetupT } from './messages.js';
5
+ import { STEP_TONE, TONE_BADGE } from './tone.js';
6
6
  const ICONS = {
7
7
  pending: Circle,
8
8
  running: Loader2,
@@ -1,4 +1,4 @@
1
- import type { MetricTone, RecordStatus, StepStatus } from './types';
1
+ import type { MetricTone, RecordStatus, StepStatus } from './types.js';
2
2
  export type Tone = 'neutral' | 'info' | 'good' | 'warn' | 'bad';
3
3
  export declare const TONE_BADGE: Record<Tone, string>;
4
4
  export declare const TONE_TEXT: Record<Tone, string>;
@@ -1,5 +1,5 @@
1
- import type { FormLayout } from '../form-layout';
2
- import type { VisibleWhen } from '../types';
1
+ import type { FormLayout } from '../form-layout.js';
2
+ import type { VisibleWhen } from '../types.js';
3
3
  export type StepStatus = 'pending' | 'running' | 'ok' | 'warn' | 'error' | 'blocked';
4
4
  export type SetupStepKind = 'check' | 'form' | 'action' | 'records' | 'custom';
5
5
  /** What the "fix" button of a diagnostic does. Exactly one is expected. */
@@ -3,7 +3,7 @@
3
3
  * The canvas IS the sidebar: sections, folders, leaves — drag, rename, nest.
4
4
  */
5
5
  import * as React from 'react';
6
- import { type CatalogLeaf, type SidebarLayoutDoc, type SidebarLayoutNode } from './apply-sidebar-layout';
6
+ import { type CatalogLeaf, type SidebarLayoutDoc, type SidebarLayoutNode } from './apply-sidebar-layout.js';
7
7
  export interface SidebarLayoutManagerProps {
8
8
  loadLayout: () => Promise<SidebarLayoutDoc>;
9
9
  saveLayout: (doc: SidebarLayoutDoc) => Promise<void>;
@@ -7,12 +7,12 @@ import * as React from 'react';
7
7
  import { DndContext, PointerSensor, closestCenter, useSensor, useSensors, } from '@dnd-kit/core';
8
8
  import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable';
9
9
  import { CSS } from '@dnd-kit/utilities';
10
- import { PortalDragOverlay } from './portal-drag-overlay';
10
+ import { PortalDragOverlay } from './portal-drag-overlay.js';
11
11
  import { ChevronDown, ChevronRight, FolderPlus, GripVertical, Pencil, Plus, RotateCcw, Save, Trash2, Eye, EyeOff, Hash, Folder, } from 'lucide-react';
12
12
  import { toast } from 'sonner';
13
13
  import { Button, Input, ScrollArea, } from '@asteby/metacore-ui/primitives';
14
14
  import { cn } from '@asteby/metacore-ui/lib';
15
- import { collectFolderKeys, folderAccessCapability, layoutTreeFromNavGroups, leafRefFor, slugifyFolderKey, } from './apply-sidebar-layout';
15
+ import { collectFolderKeys, folderAccessCapability, layoutTreeFromNavGroups, leafRefFor, slugifyFolderKey, } from './apply-sidebar-layout.js';
16
16
  function pathKey(path) {
17
17
  return path.length ? path.join('.') : 'root';
18
18
  }
package/dist/slot.js CHANGED
@@ -9,7 +9,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
9
9
  // consta como NO instalado (InstalledAddonsProvider) no se pinta.
10
10
  import { useSyncExternalStore } from 'react';
11
11
  import { slotStore } from '@asteby/metacore-sdk';
12
- import { useInstalledAddons } from './installed-addons-context';
12
+ import { useInstalledAddons } from './installed-addons-context.js';
13
13
  /** Alias histórico del store canónico (`slotRegistry.register/get/subscribe`). */
14
14
  export const slotRegistry = slotStore;
15
15
  export function Slot({ name, props, fallback = null }) {
@@ -22,10 +22,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
22
22
  // en proceso (equivale al `<Slot>` histórico).
23
23
  import { createContext, Suspense, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
24
24
  import { slotStore } from '@asteby/metacore-sdk';
25
- import { loadFederatedModule } from '../addon-loader';
26
- import { FederatedErrorBoundary } from '../federated-error-boundary';
27
- import { useInstalledAddons } from '../installed-addons-context';
28
- import { satisfiesSdkRange } from './sdk-range';
25
+ import { loadFederatedModule } from '../addon-loader.js';
26
+ import { FederatedErrorBoundary } from '../federated-error-boundary.js';
27
+ import { useInstalledAddons } from '../installed-addons-context.js';
28
+ import { satisfiesSdkRange } from './sdk-range.js';
29
29
  export const ADDON_SLOT_FAILED = 'addon_slot_failed';
30
30
  export const DEFAULT_ADDON_SLOT_TIMEOUT_MS = 10_000;
31
31
  /** Rango permitido por el contrato C1 para `slot.timeout_ms` del manifest. */
@@ -1,3 +1,3 @@
1
- export { AddonSlot, AddonSlotProvider, sortSlotItems, ADDON_SLOT_FAILED, DEFAULT_ADDON_SLOT_TIMEOUT_MS, resolveSlotTimeout, type AddonSlotProps, type AddonSlotProviderProps, type AddonSlotManifest, type AddonSlotContribution, type AddonSlotSDK, type AddonSlotComponentProps, type AddonSlotFailure, type AddonSlotFailureReason, type AddonSlotEventHandler, } from './addon-slot';
2
- export { satisfiesSdkRange } from './sdk-range';
1
+ export { AddonSlot, AddonSlotProvider, sortSlotItems, ADDON_SLOT_FAILED, DEFAULT_ADDON_SLOT_TIMEOUT_MS, resolveSlotTimeout, type AddonSlotProps, type AddonSlotProviderProps, type AddonSlotManifest, type AddonSlotContribution, type AddonSlotSDK, type AddonSlotComponentProps, type AddonSlotFailure, type AddonSlotFailureReason, type AddonSlotEventHandler, } from './addon-slot.js';
2
+ export { satisfiesSdkRange } from './sdk-range.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export { AddonSlot, AddonSlotProvider, sortSlotItems, ADDON_SLOT_FAILED, DEFAULT_ADDON_SLOT_TIMEOUT_MS, resolveSlotTimeout, } from './addon-slot';
2
- export { satisfiesSdkRange } from './sdk-range';
1
+ export { AddonSlot, AddonSlotProvider, sortSlotItems, ADDON_SLOT_FAILED, DEFAULT_ADDON_SLOT_TIMEOUT_MS, resolveSlotTimeout, } from './addon-slot.js';
2
+ export { satisfiesSdkRange } from './sdk-range.js';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { ApiClient } from './api-context';
3
- import type { ColumnDefinition } from './types';
2
+ import type { ApiClient } from './api-context.js';
3
+ import type { ColumnDefinition } from './types.js';
4
4
  export type StageAutomationActionType = 'add_tag' | 'remove_tag' | 'set_field';
5
5
  export interface StageAutomationAction {
6
6
  type: StageAutomationActionType;
@@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';
15
15
  import { Zap, Trash2, Plus } from 'lucide-react';
16
16
  import { toast } from 'sonner';
17
17
  import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, } from '@asteby/metacore-ui/primitives';
18
- import { useApi } from './api-context';
18
+ import { useApi } from './api-context.js';
19
19
  // ---------------------------------------------------------------------------
20
20
  // Pure helpers (exported for unit tests — no React, no transport)
21
21
  // ---------------------------------------------------------------------------
@@ -15,7 +15,7 @@
15
15
  // DELETE /stage-layout?model=<m> → reset to the declared order
16
16
  import { unwrapResponse } from '@asteby/metacore-lib/envelope';
17
17
  import { useCallback, useEffect, useState } from 'react';
18
- import { useApi } from './api-context';
18
+ import { useApi } from './api-context.js';
19
19
  /**
20
20
  * Loads a model's saved lane order (only to learn availability + whether a
21
21
  * custom order exists) and exposes save/reset. A missing endpoint degrades to
@@ -1,4 +1,4 @@
1
- import type { CustomStageFilter } from './custom-stages';
1
+ import type { CustomStageFilter } from './custom-stages.js';
2
2
  /** Fields a stage override can carry. All optional — send only what changed. */
3
3
  export interface StageOverridePatch {
4
4
  label?: string;
@@ -19,7 +19,7 @@
19
19
  // PUT /stage-overrides { model, stage_key, label?, color?, filters? } (upsert)
20
20
  // DELETE /stage-overrides?model=<m>&stage_key=<k> → reset the lane to its declared default
21
21
  import { useCallback, useEffect, useState } from 'react';
22
- import { useApi } from './api-context';
22
+ import { useApi } from './api-context.js';
23
23
  /**
24
24
  * Learns whether the host wired `/stage-overrides` (so the gear can appear on
25
25
  * declared lanes) and exposes save/reset. A missing endpoint degrades to