@asteby/metacore-runtime-react 53.24.0 → 53.26.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 (383) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/action-modal-dispatcher.d.ts +3 -3
  3. package/dist/action-modal-dispatcher.js +31 -31
  4. package/dist/action-priority.d.ts +1 -1
  5. package/dist/activity-diff.d.ts +1 -1
  6. package/dist/activity-diff.js +1 -1
  7. package/dist/activity-timeline.d.ts +2 -2
  8. package/dist/activity-timeline.js +3 -3
  9. package/dist/activity-value-renderer.d.ts +1 -1
  10. package/dist/activity-value-renderer.js +3 -3
  11. package/dist/addon-loader.d.ts +1 -1
  12. package/dist/addon-loader.js +3 -3
  13. package/dist/addon-page-host.js +1 -1
  14. package/dist/addon-page-loader.d.ts +2 -2
  15. package/dist/addon-page-loader.js +3 -3
  16. package/dist/api-context.js +4 -4
  17. package/dist/approval-gate.d.ts +1 -1
  18. package/dist/approval-gate.js +5 -5
  19. package/dist/assist-interview.d.ts +1 -1
  20. package/dist/assist-interview.js +1 -1
  21. package/dist/attention/index.d.ts +3 -3
  22. package/dist/attention/index.js +3 -3
  23. package/dist/attention/use-nav-badges.js +2 -2
  24. package/dist/attribute-classes.d.ts +1 -1
  25. package/dist/audit-info.d.ts +1 -1
  26. package/dist/audit-info.js +5 -5
  27. package/dist/bulk-image-dialog.d.ts +1 -1
  28. package/dist/bulk-image-dialog.js +5 -5
  29. package/dist/bulk-image-import.d.ts +2 -2
  30. package/dist/bulk-image-import.js +1 -1
  31. package/dist/bulk-image-target.d.ts +1 -1
  32. package/dist/bulk-image-target.js +1 -1
  33. package/dist/bulk-image-wizard.d.ts +1 -1
  34. package/dist/bulk-image-wizard.js +5 -5
  35. package/dist/business/catalog-product-search.d.ts +1 -1
  36. package/dist/business/customer-picker.js +4 -4
  37. package/dist/business/document-editor-model.d.ts +3 -3
  38. package/dist/business/document-editor-model.js +4 -4
  39. package/dist/business/document-editor-panels.d.ts +3 -3
  40. package/dist/business/document-editor-panels.js +1 -1
  41. package/dist/business/document-editor.d.ts +2 -2
  42. package/dist/business/document-editor.js +22 -22
  43. package/dist/business/document-lines.d.ts +2 -2
  44. package/dist/business/document-lines.js +3 -3
  45. package/dist/business/field-errors.d.ts +1 -1
  46. package/dist/business/field-errors.js +1 -1
  47. package/dist/business/format.js +1 -1
  48. package/dist/business/index.d.ts +29 -29
  49. package/dist/business/index.js +29 -29
  50. package/dist/business/inspection-checklist.d.ts +1 -1
  51. package/dist/business/inspection-checklist.js +2 -2
  52. package/dist/business/inspection.d.ts +1 -1
  53. package/dist/business/inspection.js +2 -2
  54. package/dist/business/line-items-editor.d.ts +3 -3
  55. package/dist/business/line-items-editor.js +5 -5
  56. package/dist/business/line-items.d.ts +1 -1
  57. package/dist/business/line-items.js +2 -2
  58. package/dist/business/line-product-cell.d.ts +2 -2
  59. package/dist/business/line-product-cell.js +2 -2
  60. package/dist/business/payment-allocator.d.ts +1 -1
  61. package/dist/business/payment-allocator.js +2 -2
  62. package/dist/business/payment-capture.d.ts +1 -1
  63. package/dist/business/payment-capture.js +3 -3
  64. package/dist/business/payment.js +1 -1
  65. package/dist/business/print-send-dialog.js +1 -1
  66. package/dist/business/product-display.d.ts +1 -1
  67. package/dist/business/product-options.d.ts +1 -1
  68. package/dist/business/product-options.js +4 -4
  69. package/dist/business/product-picker.d.ts +1 -1
  70. package/dist/business/product-picker.js +3 -3
  71. package/dist/business/product-search.d.ts +2 -2
  72. package/dist/business/product-search.js +1 -1
  73. package/dist/business/refund-destination.d.ts +1 -1
  74. package/dist/business/refund-destination.js +2 -2
  75. package/dist/business/refund.js +1 -1
  76. package/dist/business/relate-documents.js +1 -1
  77. package/dist/business/return-wizard.d.ts +2 -2
  78. package/dist/business/return-wizard.js +4 -4
  79. package/dist/business/return.d.ts +2 -2
  80. package/dist/business/return.js +2 -2
  81. package/dist/business/vehicle-picker.js +3 -3
  82. package/dist/cache-coherence.js +3 -3
  83. package/dist/capability-providers/index.d.ts +3 -3
  84. package/dist/capability-providers/index.js +3 -3
  85. package/dist/capability-providers/provider-sortable-list.d.ts +1 -1
  86. package/dist/capability-providers/provider-sortable-list.js +1 -1
  87. package/dist/collection-cell.js +1 -1
  88. package/dist/column-filter-field.d.ts +1 -1
  89. package/dist/column-visibility.d.ts +1 -1
  90. package/dist/custom-stages.d.ts +2 -2
  91. package/dist/custom-stages.js +1 -1
  92. package/dist/dashboard-grid.d.ts +2 -2
  93. package/dist/dashboard-grid.d.ts.map +1 -1
  94. package/dist/dashboard-grid.js +22 -20
  95. package/dist/dashboard-types.d.ts +6 -0
  96. package/dist/dashboard-types.d.ts.map +1 -1
  97. package/dist/dialogs/create-record-dialog.d.ts +1 -1
  98. package/dist/dialogs/create-record-dialog.js +1 -1
  99. package/dist/dialogs/dynamic-record.d.ts +5 -5
  100. package/dist/dialogs/dynamic-record.js +41 -41
  101. package/dist/dialogs/export.d.ts +1 -1
  102. package/dist/dialogs/export.js +2 -2
  103. package/dist/dialogs/import.d.ts +1 -1
  104. package/dist/dialogs/import.js +3 -3
  105. package/dist/dialogs/inline-relation-rows.d.ts +3 -3
  106. package/dist/dialogs/inline-relation-rows.js +3 -3
  107. package/dist/dialogs/inline-relations.d.ts +3 -3
  108. package/dist/dialogs/inline-relations.js +3 -3
  109. package/dist/dialogs/normalize-submit.d.ts +1 -1
  110. package/dist/dialogs/normalize-submit.js +3 -3
  111. package/dist/dialogs/use-inline-relations.d.ts +1 -1
  112. package/dist/dialogs/use-inline-relations.js +3 -3
  113. package/dist/dialogs/view-record-dialog.d.ts +1 -1
  114. package/dist/dialogs/view-record-dialog.js +1 -1
  115. package/dist/display-value.js +1 -1
  116. package/dist/document/action-bar.d.ts +1 -1
  117. package/dist/document/action-bar.js +1 -1
  118. package/dist/document/document-header.d.ts +2 -2
  119. package/dist/document/document-header.js +2 -2
  120. package/dist/document/document-page.d.ts +3 -3
  121. package/dist/document/document-page.js +9 -9
  122. package/dist/document/document-timeline.d.ts +2 -2
  123. package/dist/document/document-timeline.js +2 -2
  124. package/dist/document/evaluate.d.ts +1 -1
  125. package/dist/document/evaluate.js +1 -1
  126. package/dist/document/format.d.ts +1 -1
  127. package/dist/document/index.d.ts +13 -13
  128. package/dist/document/index.js +13 -13
  129. package/dist/document/registry.d.ts +1 -1
  130. package/dist/document/secondary-bar.js +2 -2
  131. package/dist/document/smart-buttons.js +1 -1
  132. package/dist/document/status-badge.d.ts +1 -1
  133. package/dist/document/use-document-sources.d.ts +1 -1
  134. package/dist/document/use-document-sources.js +2 -2
  135. package/dist/document-form-dialog.d.ts +2 -2
  136. package/dist/document-form-dialog.js +16 -16
  137. package/dist/document-template-editor.js +1 -1
  138. package/dist/dynamic-columns-shim.d.ts +1 -1
  139. package/dist/dynamic-columns.d.ts +11 -3
  140. package/dist/dynamic-columns.d.ts.map +1 -1
  141. package/dist/dynamic-columns.js +52 -26
  142. package/dist/dynamic-crud-page.d.ts +2 -2
  143. package/dist/dynamic-crud-page.d.ts.map +1 -1
  144. package/dist/dynamic-crud-page.js +22 -19
  145. package/dist/dynamic-date-field.d.ts +1 -1
  146. package/dist/dynamic-date-field.js +1 -1
  147. package/dist/dynamic-form-schema.d.ts +2 -2
  148. package/dist/dynamic-form-schema.js +4 -4
  149. package/dist/dynamic-form.d.ts +10 -10
  150. package/dist/dynamic-form.js +24 -24
  151. package/dist/dynamic-icon.js +1 -1
  152. package/dist/dynamic-kanban.d.ts +3 -3
  153. package/dist/dynamic-kanban.js +25 -25
  154. package/dist/dynamic-line-items.d.ts +1 -1
  155. package/dist/dynamic-line-items.js +6 -6
  156. package/dist/dynamic-multi-select-field.d.ts +1 -1
  157. package/dist/dynamic-multi-select-field.js +7 -7
  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 +5 -3
  169. package/dist/dynamic-table.d.ts.map +1 -1
  170. package/dist/dynamic-table.js +48 -36
  171. package/dist/dynamic-view.d.ts +4 -4
  172. package/dist/dynamic-view.js +7 -7
  173. package/dist/entity-select.js +4 -4
  174. package/dist/field-validation-ui.d.ts +2 -2
  175. package/dist/field-widget-registry.d.ts +1 -1
  176. package/dist/form-layout-ui.d.ts +1 -1
  177. package/dist/form-layout.d.ts +1 -1
  178. package/dist/form-layout.js +1 -1
  179. package/dist/genui/index.d.ts +1 -1
  180. package/dist/genui/index.js +1 -1
  181. package/dist/genui/settings-block.d.ts +1 -1
  182. package/dist/genui/settings-block.js +3 -3
  183. package/dist/host-api-client.d.ts +11 -1
  184. package/dist/host-api-client.d.ts.map +1 -1
  185. package/dist/host-api-client.js +21 -14
  186. package/dist/host-api.d.ts +9 -1
  187. package/dist/host-api.d.ts.map +1 -1
  188. package/dist/host-api.js +57 -2
  189. package/dist/hotswap-reload-policy.d.ts +1 -1
  190. package/dist/hotswap-reload-policy.js +1 -1
  191. package/dist/icon-picker-field.d.ts +1 -1
  192. package/dist/icon-picker-field.js +3 -3
  193. package/dist/icon-resolvers.d.ts +1 -1
  194. package/dist/icon-resolvers.js +1 -1
  195. package/dist/icon-spec.js +1 -1
  196. package/dist/index.d.ts +165 -163
  197. package/dist/index.d.ts.map +1 -1
  198. package/dist/index.js +148 -147
  199. package/dist/license/index.d.ts +6 -6
  200. package/dist/license/index.js +6 -6
  201. package/dist/license/license-expiry-banner.d.ts +1 -1
  202. package/dist/license/license-expiry-banner.js +3 -3
  203. package/dist/license/license-gate.d.ts +1 -1
  204. package/dist/license/license-gate.js +5 -5
  205. package/dist/license/license-status-badge.d.ts +1 -1
  206. package/dist/license/license-status-badge.js +1 -1
  207. package/dist/license/use-license-t.d.ts +1 -1
  208. package/dist/license/use-license-t.js +1 -1
  209. package/dist/license/view.d.ts +1 -1
  210. package/dist/license/view.js +1 -1
  211. package/dist/list-include.d.ts +1 -1
  212. package/dist/manifest-hotswap-subscriber.d.ts +1 -1
  213. package/dist/manifest-hotswap-subscriber.js +1 -1
  214. package/dist/metadata-cache.d.ts +1 -1
  215. package/dist/metadata-cache.js +1 -1
  216. package/dist/model-action-toolbar.d.ts +1 -1
  217. package/dist/model-action-toolbar.js +7 -7
  218. package/dist/model-labels.d.ts +38 -0
  219. package/dist/model-labels.d.ts.map +1 -0
  220. package/dist/model-labels.js +35 -0
  221. package/dist/nav-permissions.d.ts +1 -1
  222. package/dist/nav-permissions.js +1 -1
  223. package/dist/navigation-builder.d.ts +1 -1
  224. package/dist/navigation-builder.js +1 -1
  225. package/dist/option-display.d.ts +1 -1
  226. package/dist/option-display.js +2 -2
  227. package/dist/option-filter.d.ts +1 -1
  228. package/dist/option-when.d.ts +1 -1
  229. package/dist/org-runtime-provider.d.ts +2 -2
  230. package/dist/org-runtime-provider.js +2 -2
  231. package/dist/permissions-context.d.ts +1 -1
  232. package/dist/permissions-manager.js +4 -4
  233. package/dist/primitives/aging.js +1 -1
  234. package/dist/primitives/allocation.js +1 -1
  235. package/dist/primitives/approvals.d.ts +1 -1
  236. package/dist/primitives/contributions.js +1 -1
  237. package/dist/primitives/document-kinds.d.ts +1 -1
  238. package/dist/primitives/index.d.ts +7 -7
  239. package/dist/primitives/index.js +7 -7
  240. package/dist/primitives/panels.d.ts +1 -1
  241. package/dist/primitives/use-contributions.d.ts +2 -2
  242. package/dist/primitives/use-contributions.js +2 -2
  243. package/dist/print-document-button.d.ts +1 -1
  244. package/dist/print-document-button.js +1 -1
  245. package/dist/provenance.js +3 -3
  246. package/dist/query-batch.d.ts +1 -1
  247. package/dist/query-batch.js +1 -1
  248. package/dist/record-actions.d.ts +2 -2
  249. package/dist/record-actions.js +2 -2
  250. package/dist/record-history.d.ts +2 -2
  251. package/dist/record-history.js +3 -3
  252. package/dist/record-picker-dialog.js +3 -3
  253. package/dist/record-picker-option.d.ts +1 -1
  254. package/dist/record-picker-option.js +1 -1
  255. package/dist/record-picker.js +2 -2
  256. package/dist/record-prefill-bar.js +1 -1
  257. package/dist/relation-gallery.js +1 -1
  258. package/dist/requires-addon.d.ts +1 -1
  259. package/dist/rich-cells.js +2 -2
  260. package/dist/rich-url.js +1 -1
  261. package/dist/row-actions-menu.js +5 -5
  262. package/dist/server-error.js +2 -2
  263. package/dist/setup/addon-config-surface.d.ts +3 -3
  264. package/dist/setup/addon-config-surface.js +10 -10
  265. package/dist/setup/connector-blocks-model.d.ts +1 -1
  266. package/dist/setup/connector-blocks.d.ts +1 -1
  267. package/dist/setup/connector-blocks.js +6 -6
  268. package/dist/setup/flow-model.d.ts +1 -1
  269. package/dist/setup/health-card.d.ts +1 -1
  270. package/dist/setup/health-card.js +2 -2
  271. package/dist/setup/index.d.ts +12 -12
  272. package/dist/setup/index.js +12 -12
  273. package/dist/setup/records-table.d.ts +1 -1
  274. package/dist/setup/records-table.js +2 -2
  275. package/dist/setup/setup-flow.d.ts +1 -1
  276. package/dist/setup/setup-flow.js +7 -7
  277. package/dist/setup/setup-form-step.d.ts +1 -1
  278. package/dist/setup/setup-form-step.js +4 -4
  279. package/dist/setup/step-status-badge.d.ts +1 -1
  280. package/dist/setup/step-status-badge.js +2 -2
  281. package/dist/setup/tone.d.ts +1 -1
  282. package/dist/setup/types.d.ts +2 -2
  283. package/dist/sidebar-layout-manager.d.ts +1 -1
  284. package/dist/sidebar-layout-manager.js +2 -2
  285. package/dist/slot.js +1 -1
  286. package/dist/slots/addon-slot.js +4 -4
  287. package/dist/slots/index.d.ts +2 -2
  288. package/dist/slots/index.js +2 -2
  289. package/dist/stage-automations.d.ts +2 -2
  290. package/dist/stage-automations.js +1 -1
  291. package/dist/stage-layout.js +1 -1
  292. package/dist/stage-overrides.d.ts +1 -1
  293. package/dist/stage-overrides.js +1 -1
  294. package/dist/supervised-action.js +1 -1
  295. package/dist/testing.d.ts +1 -1
  296. package/dist/testing.js +1 -1
  297. package/dist/tri-state-boolean.d.ts +2 -2
  298. package/dist/tri-state-boolean.js +1 -1
  299. package/dist/types.d.ts +4 -1
  300. package/dist/types.d.ts.map +1 -1
  301. package/dist/upload-field.d.ts +1 -1
  302. package/dist/upload-field.js +4 -4
  303. package/dist/use-addon-installed-probe.js +3 -3
  304. package/dist/use-addon-settings.d.ts +1 -1
  305. package/dist/use-addon-settings.js +1 -1
  306. package/dist/use-dynamic-filters.d.ts +2 -2
  307. package/dist/use-dynamic-filters.js +6 -6
  308. package/dist/use-edge-device.d.ts +1 -1
  309. package/dist/use-edge-device.js +2 -2
  310. package/dist/use-facet-loaders.d.ts +1 -1
  311. package/dist/use-facet-loaders.js +1 -1
  312. package/dist/use-flip-animation.d.ts +1 -1
  313. package/dist/use-flip-animation.js +1 -1
  314. package/dist/use-host-api-client.d.ts +2 -2
  315. package/dist/use-host-api-client.d.ts.map +1 -1
  316. package/dist/use-host-api-client.js +6 -4
  317. package/dist/use-option-ids.d.ts +1 -1
  318. package/dist/use-option-ids.js +2 -2
  319. package/dist/use-options-resolver.d.ts +2 -2
  320. package/dist/use-options-resolver.js +4 -4
  321. package/dist/use-org-document-templates.js +1 -1
  322. package/dist/use-print-document.js +1 -1
  323. package/dist/use-record-mutation-tick.js +1 -1
  324. package/dist/validator.d.ts +2 -2
  325. package/dist/validator.js +1 -1
  326. package/dist/view-system/card-spec.d.ts +1 -1
  327. package/dist/view-system/cards-view.d.ts +1 -1
  328. package/dist/view-system/cards-view.js +2 -2
  329. package/dist/view-system/index.d.ts +9 -9
  330. package/dist/view-system/index.js +9 -9
  331. package/dist/view-system/model-view.d.ts +3 -3
  332. package/dist/view-system/model-view.js +7 -7
  333. package/dist/view-system/saved-views.d.ts +1 -1
  334. package/dist/view-system/use-view-mode.d.ts +1 -1
  335. package/dist/view-system/view-state.d.ts +1 -1
  336. package/dist/view-system/view-switcher.d.ts +1 -1
  337. package/dist/view-system/view-toolbar.d.ts +1 -1
  338. package/dist/view-system/view-toolbar.js +2 -2
  339. package/dist/views/calendar-view.d.ts +1 -1
  340. package/dist/views/calendar-view.js +2 -2
  341. package/dist/views/chart-view.d.ts +2 -2
  342. package/dist/views/chart-view.js +2 -2
  343. package/dist/views/data-source.d.ts +2 -2
  344. package/dist/views/index.d.ts +3 -3
  345. package/dist/views/index.js +2 -2
  346. package/dist/views/map-view.d.ts +1 -1
  347. package/dist/views/map-view.js +3 -3
  348. package/dist/views/panels.d.ts +1 -1
  349. package/dist/views/panels.js +3 -3
  350. package/dist/views/registry.d.ts +2 -2
  351. package/dist/views/registry.js +12 -12
  352. package/dist/views/split-view.d.ts +1 -1
  353. package/dist/views/split-view.js +4 -4
  354. package/dist/views/timeline-view.d.ts +1 -1
  355. package/dist/views/timeline-view.js +3 -3
  356. package/dist/views/types.d.ts +2 -2
  357. package/dist/widgets/charts.d.ts +1 -1
  358. package/dist/widgets/charts.js +2 -2
  359. package/dist/widgets/lazy-charts.d.ts +1 -1
  360. package/dist/widgets/lazy-charts.js +2 -2
  361. package/dist/widgets/renderers.d.ts +2 -2
  362. package/dist/widgets/renderers.js +2 -2
  363. package/dist/widgets/widget-card.d.ts +1 -1
  364. package/dist/widgets/widget-card.js +2 -2
  365. package/dist/widgets/widget-renderer.d.ts +1 -1
  366. package/dist/widgets/widget-renderer.js +4 -4
  367. package/package.json +10 -10
  368. package/src/__tests__/host-api-client.test.tsx +16 -0
  369. package/src/__tests__/host-api.test.ts +50 -0
  370. package/src/__tests__/initials-avatar-cell.test.tsx +54 -0
  371. package/src/__tests__/load-guard.test.tsx +94 -0
  372. package/src/__tests__/model-labels.test.tsx +31 -0
  373. package/src/dashboard-grid.tsx +49 -35
  374. package/src/dashboard-types.ts +6 -0
  375. package/src/dynamic-columns.tsx +40 -9
  376. package/src/dynamic-crud-page.tsx +10 -7
  377. package/src/dynamic-table.tsx +38 -12
  378. package/src/host-api-client.ts +31 -14
  379. package/src/host-api.ts +54 -1
  380. package/src/index.ts +5 -1
  381. package/src/model-labels.ts +80 -0
  382. package/src/types.ts +3 -0
  383. package/src/use-host-api-client.ts +5 -3
@@ -0,0 +1,35 @@
1
+ import { useMemo } from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ const MISSING = '\u0000';
4
+ /** Returns the translation or undefined when the key has no value. */
5
+ function tryKey(t, key) {
6
+ if (!key)
7
+ return undefined;
8
+ const v = t(key, { defaultValue: MISSING });
9
+ return v && v !== MISSING && v !== key ? v : undefined;
10
+ }
11
+ export function defaultSingular(title) {
12
+ const s = title.replace(/s$/i, '');
13
+ return s.charAt(0).toUpperCase() + s.slice(1);
14
+ }
15
+ export function resolveModelLabels(t, input) {
16
+ const { model } = input;
17
+ const title = input.titleOverride ??
18
+ tryKey(t, input.titleKey) ??
19
+ tryKey(t, `models.${model}.title`) ??
20
+ input.title ??
21
+ model;
22
+ const singular = tryKey(t, `models.${model}.singular`) ?? defaultSingular(title);
23
+ const newLabel = input.newLabelOverride ??
24
+ tryKey(t, `models.${model}.new`) ??
25
+ `${tryKey(t, 'common.new') ?? input.newPrefix ?? 'New'} ${singular}`;
26
+ return { title, singular, newLabel };
27
+ }
28
+ /** Hook form of {@link resolveModelLabels}, bound to the active i18n instance. */
29
+ export function useModelLabels(input) {
30
+ const { t, i18n } = useTranslation();
31
+ const { model, title, titleKey, newPrefix, titleOverride, newLabelOverride } = input;
32
+ return useMemo(() => resolveModelLabels(t, { model, title, titleKey, newPrefix, titleOverride, newLabelOverride }),
33
+ // eslint-disable-next-line react-hooks/exhaustive-deps
34
+ [t, i18n?.language, model, title, titleKey, newPrefix, titleOverride, newLabelOverride]);
35
+ }
@@ -1,4 +1,4 @@
1
- import { type CanFn } from './permissions-context';
1
+ import { type CanFn } from './permissions-context.js';
2
2
  /** Minimal structural shape of a sidebar leaf (matches `@asteby/metacore-ui` NavLinkItem). */
3
3
  export interface NavLeafLike {
4
4
  url: string;
@@ -10,7 +10,7 @@
10
10
  // - any other entry (custom pages, activity, settings…) -> kept. Those are
11
11
  // gated by the backend / the host's own `requires`, never guessed here.
12
12
  import { useCallback } from 'react';
13
- import { modelCapability, useCan, usePermissionsActive } from './permissions-context';
13
+ import { modelCapability, useCan, usePermissionsActive } from './permissions-context.js';
14
14
  const MODEL_URL_RE = /^\/(?:app\/)?m\/([^/?#]+)/i;
15
15
  /** Model key of a `/m/<model>` url, or undefined for any other route. */
16
16
  export function modelFromNavUrl(url) {
@@ -1,4 +1,4 @@
1
- import { type CanFn } from './permissions-context';
1
+ import { type CanFn } from './permissions-context.js';
2
2
  export interface NavItem {
3
3
  key: string;
4
4
  label: string;
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  // NavigationBuilder — merges a host's base sidebar with `manifest.navigation`
3
3
  // contributions from every loaded addon. Pure function + a React hook.
4
4
  import { useMemo } from 'react';
5
- import { useCan } from './permissions-context';
5
+ import { useCan } from './permissions-context.js';
6
6
  /** Deep-merge nav trees by `key`. Children are merged recursively; on
7
7
  * conflict the higher-priority wins, then the later contribution.
8
8
  */
@@ -1,4 +1,4 @@
1
- import { type Formatter } from './business/format';
1
+ import { type Formatter } from './business/format.js';
2
2
  export type OptionDisplayTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
3
3
  /** One resolved right-aligned metric (`display.trailing[]`). */
4
4
  export interface OptionTrailingItem {
@@ -13,8 +13,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  // option without `display` keeps rendering exactly as before.
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { Badge } from '@asteby/metacore-ui/primitives';
16
- import { useFormatter } from './business/format';
17
- import { OptionThumb } from './record-picker-option';
16
+ import { useFormatter } from './business/format.js';
17
+ import { OptionThumb } from './record-picker-option.js';
18
18
  /** Reads a well-formed display off any option-like value (null when absent). */
19
19
  export function getOptionDisplay(option) {
20
20
  const d = option && typeof option === 'object' ? option.display : null;
@@ -1,4 +1,4 @@
1
- import type { ResolvedOption } from './use-options-resolver';
1
+ import type { ResolvedOption } from './use-options-resolver.js';
2
2
  export interface OptionFilterRule {
3
3
  /** Option property to test: a `meta` key (e.g. `status`) or `id`/`value`/`label`/`name`/`description`/`color`/`icon`. */
4
4
  field: string;
@@ -1,4 +1,4 @@
1
- import type { ActionFieldDef, OptionDef } from './types';
1
+ import type { ActionFieldDef, OptionDef } from './types.js';
2
2
  /**
3
3
  * Resolves a field's cascade dependency — the key of another form field whose
4
4
  * current value scopes this picker's options (`filter_value`). Tolerates the
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type GetImageUrl } from './image-url-context';
3
- import { type AgentActor, type NumberLocales, type ProvenanceOriginResolver, type SystemActor } from './org-runtime-context';
2
+ import { type GetImageUrl } from './image-url-context.js';
3
+ import { type AgentActor, type NumberLocales, type ProvenanceOriginResolver, type SystemActor } from './org-runtime-context.js';
4
4
  export interface OrgRuntimeProviderProps {
5
5
  /** Org IANA timezone (e.g. `America/Mexico_City`). */
6
6
  timeZone?: string;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ImageUrlContext, identityImageUrl, } from './image-url-context';
3
- import { AgentActorContext, CurrencyContext, ProvenanceOriginContext, NumberLocalesContext, SystemActorContext, TaxRateContext, TimeZoneContext, } from './org-runtime-context';
2
+ import { ImageUrlContext, identityImageUrl, } from './image-url-context.js';
3
+ import { AgentActorContext, CurrencyContext, ProvenanceOriginContext, NumberLocalesContext, SystemActorContext, TaxRateContext, TimeZoneContext, } from './org-runtime-context.js';
4
4
  export function OrgRuntimeProvider({ timeZone, currency, taxRate, numberLocales, systemActor, agentActor, provenanceOrigin, getImageUrl = identityImageUrl, children, }) {
5
5
  return (_jsx(ImageUrlContext.Provider, { value: getImageUrl, children: _jsx(TimeZoneContext.Provider, { value: timeZone, children: _jsx(CurrencyContext.Provider, { value: currency, children: _jsx(TaxRateContext.Provider, { value: taxRate, children: _jsx(NumberLocalesContext.Provider, { value: numberLocales, children: _jsx(SystemActorContext.Provider, { value: systemActor, children: _jsx(AgentActorContext.Provider, { value: agentActor, children: _jsx(ProvenanceOriginContext.Provider, { value: provenanceOrigin, children: children }) }) }) }) }) }) }) }));
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { TableMetadata, ActionDefinition } from './types';
2
+ import type { TableMetadata, ActionDefinition } from './types.js';
3
3
  /** Predicate answering "can the current user use this capability?". */
4
4
  export type CanFn = (capability: string) => boolean;
5
5
  export interface PermissionsProviderProps {
@@ -27,12 +27,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
27
  import * as React from 'react';
28
28
  import { Check, ChevronsUpDown, CheckCheck, ChevronDown, Eraser, Pencil, Plus, Save, Shield, Trash2, } from 'lucide-react';
29
29
  import { toast } from 'sonner';
30
- import { extractServerError } from './server-error';
30
+ import { extractServerError } from './server-error.js';
31
31
  import { cn } from '@asteby/metacore-ui/lib';
32
32
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Checkbox, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Label, Popover, PopoverContent, PopoverTrigger, Skeleton, Collapsible, CollapsibleContent, CollapsibleTrigger, } from '@asteby/metacore-ui/primitives';
33
- import { DynamicIcon } from './dynamic-icon';
34
- import { IconPickerField } from './icon-picker-field';
35
- import { ColorPickerField, DEFAULT_ROLE_COLOR } from './color-picker-field';
33
+ import { DynamicIcon } from './dynamic-icon.js';
34
+ import { IconPickerField } from './icon-picker-field.js';
35
+ import { ColorPickerField, DEFAULT_ROLE_COLOR } from './color-picker-field.js';
36
36
  // ---------------------------------------------------------------------------
37
37
  // Pure helpers (exported for hosts/tests)
38
38
  // ---------------------------------------------------------------------------
@@ -3,7 +3,7 @@
3
3
  // customers ya guarda aging_1_30 … aging_90_plus por cliente (refresh_credit_file).
4
4
  // Esta función es la MISMA regla para la UI (drill-down por documento, CxP que
5
5
  // hoy no la tiene) y para reportes: un solo lugar decide qué es «corriente».
6
- import { roundMoney } from '../business/format';
6
+ import { roundMoney } from '../business/format.js';
7
7
  export const DEFAULT_AGING_BUCKETS = [
8
8
  { key: 'current', label: 'Corriente', from: Number.NEGATIVE_INFINITY, to: 0 },
9
9
  { key: 'd1_30', label: '1–30', from: 1, to: 30 },
@@ -4,7 +4,7 @@
4
4
  // Lo usan: cobro multi-factura + REP (customers / fiscal_mexico), CxC
5
5
  // «Registrar abono», CxP «Aplicar pago», abonos de apartado. Sin React y sin
6
6
  // host: la UI (PaymentAllocator) y el backend (wasm) pueden validar con lo mismo.
7
- import { roundMoney } from '../business/format';
7
+ import { roundMoney } from '../business/format.js';
8
8
  function sortKey(d, s) {
9
9
  return s === 'oldest_issued_first' ? d.issued_at : (d.due_at ?? d.issued_at);
10
10
  }
@@ -1,4 +1,4 @@
1
- import type { ApiClient } from '../api-context';
1
+ import type { ApiClient } from '../api-context.js';
2
2
  /** Espejo de dynamic.ApprovalRequest (JSON). jsonb llega como string. */
3
3
  export interface ApprovalRequestDTO {
4
4
  id: string;
@@ -13,7 +13,7 @@
13
13
  // recargar el remote y la contribución desaparece sin recargar la página.
14
14
  import { createElement, lazy, Suspense } from 'react';
15
15
  import { getModalComponent, registerModalComponent, subscribeActionComponents, } from '@asteby/metacore-sdk';
16
- import { slotRegistry } from '../slot';
16
+ import { slotRegistry } from '../slot.js';
17
17
  const contribs = new Map();
18
18
  const listeners = new Set();
19
19
  let version = 0;
@@ -1,4 +1,4 @@
1
- import type { DocumentFormPreview, DocumentFormSource } from '../types';
1
+ import type { DocumentFormPreview, DocumentFormSource } from '../types.js';
2
2
  export type PartyRole = 'customer' | 'supplier' | 'none';
3
3
  export type LinesMode = 'sale' | 'purchase' | 'credit' | 'allocation' | 'workorder' | 'none';
4
4
  export interface DocumentKind {
@@ -1,8 +1,8 @@
1
- export * from './allocation';
2
- export * from './aging';
3
- export * from './approvals';
4
- export * from './contributions';
5
- export * from './document-kinds';
6
- export * from './panels';
7
- export * from './use-contributions';
1
+ export * from './allocation.js';
2
+ export * from './aging.js';
3
+ export * from './approvals.js';
4
+ export * from './contributions.js';
5
+ export * from './document-kinds.js';
6
+ export * from './panels.js';
7
+ export * from './use-contributions.js';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -14,10 +14,10 @@
14
14
  // panels Tipos de PartyCard / TotalsPanel / PreviewPanel /
15
15
  // ValidationChecklist / LoadFromDocument + blockingChecks.
16
16
  // use-contributions Hooks: useDocumentContributions, useIsAddonInstalled.
17
- export * from './allocation';
18
- export * from './aging';
19
- export * from './approvals';
20
- export * from './contributions';
21
- export * from './document-kinds';
22
- export * from './panels';
23
- export * from './use-contributions';
17
+ export * from './allocation.js';
18
+ export * from './aging.js';
19
+ export * from './approvals.js';
20
+ export * from './contributions.js';
21
+ export * from './document-kinds.js';
22
+ export * from './panels.js';
23
+ export * from './use-contributions.js';
@@ -1,4 +1,4 @@
1
- import type { LineItemsTotals } from '../business/line-items';
1
+ import type { LineItemsTotals } from '../business/line-items.js';
2
2
  /** PartyCard: lo que se muestra de la contraparte. */
3
3
  export interface PartySummary {
4
4
  id: string;
@@ -1,5 +1,5 @@
1
- import { type InstalledAddonsValue } from '../installed-addons-context';
2
- import { type DocumentEditorContext, type DocumentRegion, type IsAddonInstalled, type ResolvedDocumentContribution } from './contributions';
1
+ import { type InstalledAddonsValue } from '../installed-addons-context.js';
2
+ import { type DocumentEditorContext, type DocumentRegion, type IsAddonInstalled, type ResolvedDocumentContribution } from './contributions.js';
3
3
  /**
4
4
  * Predicado de instalación a partir del InstalledAddonsProvider. Sin provider
5
5
  * devuelve siempre true: el host solo carga remotes de addons instalados, así
@@ -3,8 +3,8 @@
3
3
  // useInstalledAddons y con la suscripción para re-pintar cuando un remote
4
4
  // registra o se desmonta.
5
5
  import { useMemo, useSyncExternalStore } from 'react';
6
- import { useInstalledAddons } from '../installed-addons-context';
7
- import { contributionsVersion, resolveContributions, subscribeContributions, } from './contributions';
6
+ import { useInstalledAddons } from '../installed-addons-context.js';
7
+ import { contributionsVersion, resolveContributions, subscribeContributions, } from './contributions.js';
8
8
  /**
9
9
  * Predicado de instalación a partir del InstalledAddonsProvider. Sin provider
10
10
  * devuelve siempre true: el host solo carga remotes de addons instalados, así
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type PrintDocumentArgs } from './use-print-document';
2
+ import { type PrintDocumentArgs } from './use-print-document.js';
3
3
  export interface PrintDocumentButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onError'> {
4
4
  /** Model KEY the document is declared against (e.g. "SalesOrder"). */
5
5
  model: string;
@@ -9,7 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
9
  // <PrintDocumentButton model="SalesOrder" id={sale.id} documentKey="sale_ticket"
10
10
  // className="btn">Imprimir ticket</PrintDocumentButton>
11
11
  import { useCallback, useState } from 'react';
12
- import { usePrintDocument } from './use-print-document';
12
+ import { usePrintDocument } from './use-print-document.js';
13
13
  export function PrintDocumentButton({ model, id, documentKey, mode, filename, onError, pendingLabel, children, disabled, onClick, ...rest }) {
14
14
  const printDocument = usePrintDocument();
15
15
  const [busy, setBusy] = useState(false);
@@ -26,9 +26,9 @@ import { useTranslation } from 'react-i18next';
26
26
  import { Bot, Plug, Server } from 'lucide-react';
27
27
  import { Avatar, AvatarFallback, AvatarImage, Tooltip, TooltipContent, TooltipTrigger } from '@asteby/metacore-ui';
28
28
  import { cn, getInitials } from '@asteby/metacore-ui/lib';
29
- import { useImageUrl } from './image-url-context';
30
- import { isNilUuid } from './nil-uuid';
31
- import { useAgentActor, useProvenanceOrigin, useSystemActor, useTimeZone } from './org-runtime-context';
29
+ import { useImageUrl } from './image-url-context.js';
30
+ import { isNilUuid } from './nil-uuid.js';
31
+ import { useAgentActor, useProvenanceOrigin, useSystemActor, useTimeZone } from './org-runtime-context.js';
32
32
  /** The kernel's fixed actor for unattended work. */
33
33
  const KERNEL_SYSTEM_ACTOR_ID = '00000000-0000-0000-0000-000000000001';
34
34
  const KINDS = new Set(['human', 'agent', 'system', 'integration']);
@@ -5,7 +5,7 @@
5
5
  * arrive inside an 8ms window share one request. Each part keeps its own
6
6
  * success, data and etag. A failed part does not reject the others.
7
7
  */
8
- import type { ApiClient } from './api-context';
8
+ import type { ApiClient } from './api-context.js';
9
9
  export interface QueryPart {
10
10
  success: boolean;
11
11
  data?: unknown;
@@ -1,4 +1,4 @@
1
- import { cacheScope, onCacheScopeChange } from './cache-scope';
1
+ import { cacheScope, onCacheScopeChange } from './cache-scope.js';
2
2
  const WINDOW_MS = 8;
3
3
  const PART_TTL_MS = 30_000;
4
4
  const ENTITY_TTL_MS = 30_000;
@@ -1,6 +1,6 @@
1
1
  import { type ActionPriority, type OwnedRecordAction, type RecordActionContext, type RecordActionContribution } from '@asteby/metacore-sdk';
2
- import { type InstalledAddonsValue } from './installed-addons-context';
3
- export * from './action-priority';
2
+ import { type InstalledAddonsValue } from './installed-addons-context.js';
3
+ export * from './action-priority.js';
4
4
  export type { RecordActionContext, RecordActionContribution };
5
5
  export interface ResolvedRecordAction {
6
6
  /** Id de la contribución (o `<id>:<item>` si viene de `expand`). */
@@ -13,8 +13,8 @@
13
13
  // instalado y activo (InstalledAddonsProvider).
14
14
  import { useMemo, useSyncExternalStore } from 'react';
15
15
  import { listRecordActions, subscribeActionComponents, } from '@asteby/metacore-sdk';
16
- import { useInstalledAddons } from './installed-addons-context';
17
- export * from './action-priority';
16
+ import { useInstalledAddons } from './installed-addons-context.js';
17
+ export * from './action-priority.js';
18
18
  function modelMatches(models, model) {
19
19
  if (!models || models === '*')
20
20
  return true;
@@ -10,8 +10,8 @@
10
10
  * Transport-agnostic: events and column metadata arrive via props. No fetching.
11
11
  */
12
12
  import * as React from 'react';
13
- import type { ColumnDefinition } from './types';
14
- import type { ActivityEvent } from './activity-diff';
13
+ import type { ColumnDefinition } from './types.js';
14
+ import type { ActivityEvent } from './activity-diff.js';
15
15
  export interface RecordHistoryProps {
16
16
  /**
17
17
  * All activity events for the record, in any order. The component sorts
@@ -11,15 +11,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  * Transport-agnostic: events and column metadata arrive via props. No fetching.
12
12
  */
13
13
  import * as React from 'react';
14
- import { useSystemActor } from './org-runtime-context';
15
- import { parseProvenance, ProvenanceActorChip } from './provenance';
14
+ import { useSystemActor } from './org-runtime-context.js';
15
+ import { parseProvenance, ProvenanceActorChip } from './provenance.js';
16
16
  import { formatDistanceToNow } from 'date-fns';
17
17
  import { es, enUS } from 'date-fns/locale';
18
18
  import { ChevronDown, ChevronRight, Clock, ExternalLink } from 'lucide-react';
19
19
  import { cn } from '@asteby/metacore-ui/lib';
20
20
  import { Avatar, AvatarFallback, AvatarImage, Badge, Collapsible, CollapsibleContent, CollapsibleTrigger, } from '@asteby/metacore-ui/primitives';
21
21
  import { getInitials } from '@asteby/metacore-ui/lib';
22
- import { ActivityDiff } from './activity-diff';
22
+ import { ActivityDiff } from './activity-diff.js';
23
23
  // ---------------------------------------------------------------------------
24
24
  // Helpers
25
25
  // ---------------------------------------------------------------------------
@@ -10,9 +10,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
10
10
  // handed back to select it (create) or refresh its label (edit).
11
11
  import { unwrapResponse } from '@asteby/metacore-lib/envelope';
12
12
  import { useState } from 'react';
13
- import { CreateRecordDialog } from './dialogs/create-record-dialog';
14
- import { useApi } from './api-context';
15
- import { withSearchPrefill } from './record-picker-actions';
13
+ import { CreateRecordDialog } from './dialogs/create-record-dialog.js';
14
+ import { useApi } from './api-context.js';
15
+ import { withSearchPrefill } from './record-picker-actions.js';
16
16
  const unwrapRecord = (res) => unwrapResponse(res) ?? {};
17
17
  export function useRecordPickerDialog({ model, endpoint, prefillField = 'name', createDefaults, lockedCreateFields, onSaved, }) {
18
18
  const api = useApi();
@@ -1,4 +1,4 @@
1
- import type { ResolvedOption } from './use-options-resolver';
1
+ import type { ResolvedOption } from './use-options-resolver.js';
2
2
  /**
3
3
  * Small square thumbnail for an option's `image`. When the option has no image
4
4
  * it falls back to a deterministic initials avatar (shared `InitialsAvatar`)
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  import { useState } from 'react';
6
6
  import { InitialsAvatar } from '@asteby/metacore-ui/primitives';
7
7
  import { resolveColorCss } from '@asteby/metacore-ui/lib';
8
- import { DynamicIcon, isLucideIconName } from './dynamic-icon';
8
+ import { DynamicIcon, isLucideIconName } from './dynamic-icon.js';
9
9
  /**
10
10
  * Small square thumbnail for an option's `image`. When the option has no image
11
11
  * it falls back to a deterministic initials avatar (shared `InitialsAvatar`)
@@ -31,8 +31,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
31
31
  import { useCallback, useEffect, useId, useRef, useState, } from 'react';
32
32
  import { Check, ChevronsUpDown, Loader2, Plus, Search, X } from 'lucide-react';
33
33
  import { Badge, Button, Input, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from '@asteby/metacore-ui/primitives';
34
- import { JOINED_TRIGGER_CLASS, RecordPickerAction, hasRecordPickerAction } from './record-picker-actions';
35
- import { useDebouncedValue } from './use-debounced-value';
34
+ import { JOINED_TRIGGER_CLASS, RecordPickerAction, hasRecordPickerAction } from './record-picker-actions.js';
35
+ import { useDebouncedValue } from './use-debounced-value.js';
36
36
  /**
37
37
  * z-index of the portaled list. Dialogs/sheets sit at 50; the list must stay
38
38
  * above the modal it was opened from regardless of portal order.
@@ -12,7 +12,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
12
12
  // created_by…) por esta vía; el backend sigue validando como siempre.
13
13
  import { useCallback, useSyncExternalStore } from 'react';
14
14
  import { getRecordPrefills, recordPrefillsVersion, subscribeRecordPrefills, } from '@asteby/metacore-sdk';
15
- import { useCan } from './permissions-context';
15
+ import { useCan } from './permissions-context.js';
16
16
  export function RecordPrefillBar({ model, mode, recordId, values, allowedKeys, onApply }) {
17
17
  // Re-render cuando un remote registra/des-registra (carga tardía o unbind).
18
18
  useSyncExternalStore(subscribeRecordPrefills, recordPrefillsVersion, recordPrefillsVersion);
@@ -19,7 +19,7 @@ import { CSS } from '@dnd-kit/utilities';
19
19
  import { cn } from '@asteby/metacore-ui/lib';
20
20
  import { Button } from '@asteby/metacore-ui/primitives';
21
21
  import { ArrowLeft, ArrowRight, ImagePlus, Loader2, Pencil, RotateCcw, Star, Trash2, X } from 'lucide-react';
22
- import { validateUploadFile } from './upload-field';
22
+ import { validateUploadFile } from './upload-field.js';
23
23
  let uploadSeq = 0;
24
24
  export function RelationGallery({ rows, rowKey, imageKey, captionKey, getImageUrl, accept = 'image/*', maxSize, canCreate = true, canEdit = true, canReorder, canDelete = true, onUpload, onUploadsSettled, onReorder, onEdit, onDelete, hiddenKeys, lead, }) {
25
25
  const { t } = useTranslation();
@@ -1,4 +1,4 @@
1
- import type { RequiresAddon } from './types';
1
+ import type { RequiresAddon } from './types.js';
2
2
  export type { RequiresAddon };
3
3
  /**
4
4
  * Reads the addon requirement off an action, tolerating both the camelCase
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Progress } from './dialogs/_primitives';
3
- import { OptionBadge } from './display-value';
2
+ import { Progress } from './dialogs/_primitives.js';
3
+ import { OptionBadge } from './display-value.js';
4
4
  /** Normalizes a JSON array (strings or {value,label,color,icon} objects) or a CSV string into chip items. */
5
5
  export function chipItems(value) {
6
6
  const out = [];
package/dist/rich-url.js CHANGED
@@ -20,7 +20,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
20
20
  import React from 'react';
21
21
  import { cn } from '@asteby/metacore-ui/lib';
22
22
  import { Dialog, DialogContent, DialogTitle } from '@asteby/metacore-ui/primitives';
23
- import { DynamicIcon } from './dynamic-icon';
23
+ import { DynamicIcon } from './dynamic-icon.js';
24
24
  /** Image file extensions we render as an inline thumbnail. */
25
25
  const IMAGE_EXT_RE = /\.(jpe?g|png|gif|webp|avif|svg|bmp|ico)(?:[?#].*)?$/i;
26
26
  /**
@@ -12,11 +12,11 @@ import { useTranslation } from 'react-i18next';
12
12
  import { MoreHorizontal } from 'lucide-react';
13
13
  // Root entry on purpose (not '/primitives'): see dropdown-menu-entry.test.ts.
14
14
  import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from '@asteby/metacore-ui';
15
- import { DynamicIcon } from './dynamic-icon';
16
- import { translateMetadataLabel } from './dynamic-columns-helpers';
17
- import { RequiresAddonLock, resolveRequiresAddon, useRequiresAddonLabel } from './requires-addon';
18
- import { useInstalledAddons } from './installed-addons-context';
19
- import { isActionProviderActive, splitActionsByPriority, useRecordActions } from './record-actions';
15
+ import { DynamicIcon } from './dynamic-icon.js';
16
+ import { translateMetadataLabel } from './dynamic-columns-helpers.js';
17
+ import { RequiresAddonLock, resolveRequiresAddon, useRequiresAddonLabel } from './requires-addon.js';
18
+ import { useInstalledAddons } from './installed-addons-context.js';
19
+ import { isActionProviderActive, splitActionsByPriority, useRecordActions } from './record-actions.js';
20
20
  /**
21
21
  * One entry of the row "…" menu. An action gated by a missing optional addon
22
22
  * (`requiresAddon`) stays listed with a lock + tooltip; the click still goes to
@@ -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 };