@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.
- package/CHANGELOG.md +23 -0
- package/dist/action-modal-dispatcher.d.ts +3 -3
- package/dist/action-modal-dispatcher.d.ts.map +1 -1
- package/dist/action-modal-dispatcher.js +36 -31
- package/dist/action-priority.d.ts +1 -1
- package/dist/activity-diff.d.ts +1 -1
- package/dist/activity-diff.js +1 -1
- package/dist/activity-timeline.d.ts +2 -2
- package/dist/activity-timeline.js +3 -3
- package/dist/activity-value-renderer.d.ts +1 -1
- package/dist/activity-value-renderer.js +3 -3
- package/dist/addon-loader.d.ts +1 -1
- package/dist/addon-loader.js +3 -3
- package/dist/addon-page-host.js +1 -1
- package/dist/addon-page-loader.d.ts +2 -2
- package/dist/addon-page-loader.js +3 -3
- package/dist/api-context.js +4 -4
- package/dist/approval-gate.d.ts +1 -1
- package/dist/approval-gate.js +5 -5
- package/dist/assist-interview.d.ts +1 -1
- package/dist/assist-interview.js +1 -1
- package/dist/attention/index.d.ts +3 -3
- package/dist/attention/index.js +3 -3
- package/dist/attention/use-nav-badges.js +2 -2
- package/dist/attribute-classes.d.ts +1 -1
- package/dist/audit-info.d.ts +1 -1
- package/dist/audit-info.js +5 -5
- package/dist/bulk-image-dialog.d.ts +1 -1
- package/dist/bulk-image-dialog.js +5 -5
- package/dist/bulk-image-import.d.ts +2 -2
- package/dist/bulk-image-import.js +1 -1
- package/dist/bulk-image-target.d.ts +1 -1
- package/dist/bulk-image-target.js +1 -1
- package/dist/bulk-image-wizard.d.ts +1 -1
- package/dist/bulk-image-wizard.js +5 -5
- package/dist/business/catalog-product-search.d.ts +1 -1
- package/dist/business/customer-picker.js +4 -4
- package/dist/business/document-editor-model.d.ts +3 -3
- package/dist/business/document-editor-model.js +4 -4
- package/dist/business/document-editor-panels.d.ts +3 -3
- package/dist/business/document-editor-panels.js +1 -1
- package/dist/business/document-editor.d.ts +2 -2
- package/dist/business/document-editor.js +22 -22
- package/dist/business/document-lines.d.ts +2 -2
- package/dist/business/document-lines.js +3 -3
- package/dist/business/field-errors.d.ts +1 -1
- package/dist/business/field-errors.js +1 -1
- package/dist/business/format.js +1 -1
- package/dist/business/index.d.ts +29 -29
- package/dist/business/index.js +29 -29
- package/dist/business/inspection-checklist.d.ts +1 -1
- package/dist/business/inspection-checklist.js +2 -2
- package/dist/business/inspection.d.ts +1 -1
- package/dist/business/inspection.js +2 -2
- package/dist/business/line-items-editor.d.ts +3 -3
- package/dist/business/line-items-editor.js +5 -5
- package/dist/business/line-items.d.ts +1 -1
- package/dist/business/line-items.js +2 -2
- package/dist/business/line-product-cell.d.ts +2 -2
- package/dist/business/line-product-cell.js +2 -2
- package/dist/business/payment-allocator.d.ts +1 -1
- package/dist/business/payment-allocator.js +2 -2
- package/dist/business/payment-capture.d.ts +1 -1
- package/dist/business/payment-capture.js +3 -3
- package/dist/business/payment.js +1 -1
- package/dist/business/print-send-dialog.js +1 -1
- package/dist/business/product-display.d.ts +1 -1
- package/dist/business/product-options.d.ts +1 -1
- package/dist/business/product-options.js +4 -4
- package/dist/business/product-picker.d.ts +1 -1
- package/dist/business/product-picker.js +3 -3
- package/dist/business/product-search.d.ts +2 -2
- package/dist/business/product-search.js +1 -1
- package/dist/business/refund-destination.d.ts +1 -1
- package/dist/business/refund-destination.js +2 -2
- package/dist/business/refund.js +1 -1
- package/dist/business/relate-documents.js +1 -1
- package/dist/business/return-wizard.d.ts +2 -2
- package/dist/business/return-wizard.js +4 -4
- package/dist/business/return.d.ts +2 -2
- package/dist/business/return.js +2 -2
- package/dist/business/vehicle-picker.js +3 -3
- package/dist/cache-coherence.js +3 -3
- package/dist/capability-providers/index.d.ts +3 -3
- package/dist/capability-providers/index.js +3 -3
- package/dist/capability-providers/provider-sortable-list.d.ts +1 -1
- package/dist/capability-providers/provider-sortable-list.js +1 -1
- package/dist/collection-cell.js +1 -1
- package/dist/column-filter-field.d.ts +1 -1
- package/dist/column-visibility.d.ts +1 -1
- package/dist/custom-stages.d.ts +2 -2
- package/dist/custom-stages.js +1 -1
- package/dist/dashboard-grid.d.ts +1 -1
- package/dist/dashboard-grid.js +3 -3
- package/dist/dialogs/create-record-dialog.d.ts +1 -1
- package/dist/dialogs/create-record-dialog.js +1 -1
- package/dist/dialogs/dynamic-record.d.ts +15 -5
- package/dist/dialogs/dynamic-record.d.ts.map +1 -1
- package/dist/dialogs/dynamic-record.js +47 -41
- package/dist/dialogs/export.d.ts +1 -1
- package/dist/dialogs/export.js +2 -2
- package/dist/dialogs/import.d.ts +1 -1
- package/dist/dialogs/import.js +3 -3
- package/dist/dialogs/inline-relation-rows.d.ts +3 -3
- package/dist/dialogs/inline-relation-rows.js +3 -3
- package/dist/dialogs/inline-relations.d.ts +3 -3
- package/dist/dialogs/inline-relations.js +3 -3
- package/dist/dialogs/normalize-submit.d.ts +1 -1
- package/dist/dialogs/normalize-submit.js +3 -3
- package/dist/dialogs/use-inline-relations.d.ts +1 -1
- package/dist/dialogs/use-inline-relations.js +3 -3
- package/dist/dialogs/view-record-dialog.d.ts +1 -1
- package/dist/dialogs/view-record-dialog.js +1 -1
- package/dist/display-value.js +1 -1
- package/dist/document/action-bar.d.ts +1 -1
- package/dist/document/action-bar.js +1 -1
- package/dist/document/document-header.d.ts +2 -2
- package/dist/document/document-header.js +2 -2
- package/dist/document/document-page.d.ts +3 -3
- package/dist/document/document-page.js +9 -9
- package/dist/document/document-timeline.d.ts +2 -2
- package/dist/document/document-timeline.js +2 -2
- package/dist/document/evaluate.d.ts +1 -1
- package/dist/document/evaluate.js +1 -1
- package/dist/document/format.d.ts +1 -1
- package/dist/document/index.d.ts +13 -13
- package/dist/document/index.js +13 -13
- package/dist/document/registry.d.ts +1 -1
- package/dist/document/secondary-bar.js +2 -2
- package/dist/document/smart-buttons.js +1 -1
- package/dist/document/status-badge.d.ts +1 -1
- package/dist/document/use-document-sources.d.ts +1 -1
- package/dist/document/use-document-sources.js +2 -2
- package/dist/document-form-dialog.d.ts +2 -2
- package/dist/document-form-dialog.js +16 -16
- package/dist/document-template-editor.js +1 -1
- package/dist/dynamic-columns-shim.d.ts +1 -1
- package/dist/dynamic-columns.d.ts +3 -3
- package/dist/dynamic-columns.js +19 -19
- package/dist/dynamic-crud-page.d.ts +2 -2
- package/dist/dynamic-crud-page.js +13 -13
- package/dist/dynamic-date-field.d.ts +1 -1
- package/dist/dynamic-date-field.js +1 -1
- package/dist/dynamic-form-schema.d.ts +2 -2
- package/dist/dynamic-form-schema.js +4 -4
- package/dist/dynamic-form.d.ts +10 -10
- package/dist/dynamic-form.d.ts.map +1 -1
- package/dist/dynamic-form.js +31 -24
- package/dist/dynamic-icon.js +1 -1
- package/dist/dynamic-kanban.d.ts +3 -3
- package/dist/dynamic-kanban.js +25 -25
- package/dist/dynamic-line-items.d.ts +1 -1
- package/dist/dynamic-line-items.d.ts.map +1 -1
- package/dist/dynamic-line-items.js +11 -6
- package/dist/dynamic-multi-select-field.d.ts +1 -1
- package/dist/dynamic-multi-select-field.d.ts.map +1 -1
- package/dist/dynamic-multi-select-field.js +12 -12
- package/dist/dynamic-relation-helpers.d.ts +1 -1
- package/dist/dynamic-relation-helpers.js +2 -2
- package/dist/dynamic-relation.d.ts +2 -2
- package/dist/dynamic-relation.js +15 -15
- package/dist/dynamic-relations.d.ts +2 -2
- package/dist/dynamic-relations.js +1 -1
- package/dist/dynamic-row-actions.d.ts +1 -1
- package/dist/dynamic-row-actions.js +5 -5
- package/dist/dynamic-select-field.d.ts +3 -3
- package/dist/dynamic-select-field.js +11 -11
- package/dist/dynamic-table.d.ts +2 -2
- package/dist/dynamic-table.js +24 -24
- package/dist/dynamic-view.d.ts +4 -4
- package/dist/dynamic-view.js +7 -7
- package/dist/entity-select.js +4 -4
- package/dist/field-validation-ui.d.ts +2 -2
- package/dist/field-widget-registry.d.ts +1 -1
- package/dist/form-layout-ui.d.ts +1 -1
- package/dist/form-layout.d.ts +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/genui/index.d.ts +1 -1
- package/dist/genui/index.js +1 -1
- package/dist/genui/settings-block.d.ts +1 -1
- package/dist/genui/settings-block.js +3 -3
- package/dist/host-api-client.d.ts +28 -1
- package/dist/host-api-client.d.ts.map +1 -1
- package/dist/host-api-client.js +27 -14
- package/dist/host-api.d.ts +23 -1
- package/dist/host-api.d.ts.map +1 -1
- package/dist/host-api.js +79 -4
- package/dist/hotswap-reload-policy.d.ts +1 -1
- package/dist/hotswap-reload-policy.js +1 -1
- package/dist/icon-picker-field.d.ts +1 -1
- package/dist/icon-picker-field.js +3 -3
- package/dist/icon-resolvers.d.ts +1 -1
- package/dist/icon-resolvers.js +1 -1
- package/dist/icon-spec.js +1 -1
- package/dist/index.d.ts +165 -165
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -148
- package/dist/license/index.d.ts +6 -6
- package/dist/license/index.js +6 -6
- package/dist/license/license-expiry-banner.d.ts +1 -1
- package/dist/license/license-expiry-banner.js +3 -3
- package/dist/license/license-gate.d.ts +1 -1
- package/dist/license/license-gate.js +5 -5
- package/dist/license/license-status-badge.d.ts +1 -1
- package/dist/license/license-status-badge.js +1 -1
- package/dist/license/use-license-t.d.ts +1 -1
- package/dist/license/use-license-t.js +1 -1
- package/dist/license/view.d.ts +1 -1
- package/dist/license/view.js +1 -1
- package/dist/list-include.d.ts +1 -1
- package/dist/manifest-hotswap-subscriber.d.ts +1 -1
- package/dist/manifest-hotswap-subscriber.js +1 -1
- package/dist/metadata-cache.d.ts +1 -1
- package/dist/metadata-cache.js +1 -1
- package/dist/model-action-toolbar.d.ts +1 -1
- package/dist/model-action-toolbar.js +7 -7
- package/dist/nav-permissions.d.ts +1 -1
- package/dist/nav-permissions.js +1 -1
- package/dist/navigation-builder.d.ts +1 -1
- package/dist/navigation-builder.js +1 -1
- package/dist/option-display.d.ts +1 -1
- package/dist/option-display.js +2 -2
- package/dist/option-filter.d.ts +1 -1
- package/dist/option-when.d.ts +1 -1
- package/dist/org-runtime-provider.d.ts +2 -2
- package/dist/org-runtime-provider.js +2 -2
- package/dist/permissions-context.d.ts +1 -1
- package/dist/permissions-manager.js +4 -4
- package/dist/primitives/aging.js +1 -1
- package/dist/primitives/allocation.js +1 -1
- package/dist/primitives/approvals.d.ts +1 -1
- package/dist/primitives/contributions.js +1 -1
- package/dist/primitives/document-kinds.d.ts +1 -1
- package/dist/primitives/index.d.ts +7 -7
- package/dist/primitives/index.js +7 -7
- package/dist/primitives/panels.d.ts +1 -1
- package/dist/primitives/use-contributions.d.ts +2 -2
- package/dist/primitives/use-contributions.js +2 -2
- package/dist/print-document-button.d.ts +1 -1
- package/dist/print-document-button.js +1 -1
- package/dist/provenance.js +3 -3
- package/dist/query-batch.d.ts +1 -1
- package/dist/query-batch.js +1 -1
- package/dist/record-actions.d.ts +2 -2
- package/dist/record-actions.js +2 -2
- package/dist/record-history.d.ts +2 -2
- package/dist/record-history.js +3 -3
- package/dist/record-picker-dialog.js +3 -3
- package/dist/record-picker-option.d.ts +1 -1
- package/dist/record-picker-option.js +1 -1
- package/dist/record-picker.d.ts +5 -0
- package/dist/record-picker.d.ts.map +1 -1
- package/dist/record-picker.js +16 -6
- package/dist/record-prefill-bar.js +1 -1
- package/dist/relation-gallery.js +1 -1
- package/dist/requires-addon.d.ts +1 -1
- package/dist/rich-cells.js +2 -2
- package/dist/rich-url.js +1 -1
- package/dist/row-actions-menu.js +5 -5
- package/dist/searchable-select-field.d.ts +33 -0
- package/dist/searchable-select-field.d.ts.map +1 -0
- package/dist/searchable-select-field.js +50 -0
- package/dist/searchable-select.d.ts +45 -0
- package/dist/searchable-select.d.ts.map +1 -0
- package/dist/searchable-select.js +72 -0
- package/dist/server-error.js +2 -2
- package/dist/setup/addon-config-surface.d.ts +3 -3
- package/dist/setup/addon-config-surface.js +10 -10
- package/dist/setup/connector-blocks-model.d.ts +1 -1
- package/dist/setup/connector-blocks.d.ts +1 -1
- package/dist/setup/connector-blocks.js +6 -6
- package/dist/setup/flow-model.d.ts +1 -1
- package/dist/setup/health-card.d.ts +1 -1
- package/dist/setup/health-card.js +2 -2
- package/dist/setup/index.d.ts +12 -12
- package/dist/setup/index.js +12 -12
- package/dist/setup/records-table.d.ts +1 -1
- package/dist/setup/records-table.js +2 -2
- package/dist/setup/setup-flow.d.ts +1 -1
- package/dist/setup/setup-flow.js +7 -7
- package/dist/setup/setup-form-step.d.ts +1 -1
- package/dist/setup/setup-form-step.js +4 -4
- package/dist/setup/step-status-badge.d.ts +1 -1
- package/dist/setup/step-status-badge.js +2 -2
- package/dist/setup/tone.d.ts +1 -1
- package/dist/setup/types.d.ts +2 -2
- package/dist/sidebar-layout-manager.d.ts +1 -1
- package/dist/sidebar-layout-manager.js +2 -2
- package/dist/slot.js +1 -1
- package/dist/slots/addon-slot.js +4 -4
- package/dist/slots/index.d.ts +2 -2
- package/dist/slots/index.js +2 -2
- package/dist/stage-automations.d.ts +2 -2
- package/dist/stage-automations.js +1 -1
- package/dist/stage-layout.js +1 -1
- package/dist/stage-overrides.d.ts +1 -1
- package/dist/stage-overrides.js +1 -1
- package/dist/supervised-action.js +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/tri-state-boolean.d.ts +2 -2
- package/dist/tri-state-boolean.js +1 -1
- package/dist/types.d.ts +13 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/upload-field.d.ts +1 -1
- package/dist/upload-field.js +4 -4
- package/dist/use-addon-installed-probe.js +3 -3
- package/dist/use-addon-settings.d.ts +1 -1
- package/dist/use-addon-settings.js +1 -1
- package/dist/use-dynamic-filters.d.ts +2 -2
- package/dist/use-dynamic-filters.js +6 -6
- package/dist/use-edge-device.d.ts +1 -1
- package/dist/use-edge-device.js +2 -2
- package/dist/use-facet-loaders.d.ts +1 -1
- package/dist/use-facet-loaders.js +1 -1
- package/dist/use-flip-animation.d.ts +1 -1
- package/dist/use-flip-animation.js +1 -1
- package/dist/use-host-api-client.d.ts +2 -2
- package/dist/use-host-api-client.d.ts.map +1 -1
- package/dist/use-host-api-client.js +6 -4
- package/dist/use-option-ids.d.ts +1 -1
- package/dist/use-option-ids.js +2 -2
- package/dist/use-options-resolver.d.ts +2 -2
- package/dist/use-options-resolver.js +4 -4
- package/dist/use-org-document-templates.js +1 -1
- package/dist/use-print-document.js +1 -1
- package/dist/use-record-mutation-tick.js +1 -1
- package/dist/validator.d.ts +2 -2
- package/dist/validator.js +1 -1
- package/dist/view-system/card-spec.d.ts +1 -1
- package/dist/view-system/cards-view.d.ts +1 -1
- package/dist/view-system/cards-view.js +2 -2
- package/dist/view-system/index.d.ts +9 -9
- package/dist/view-system/index.js +9 -9
- package/dist/view-system/model-view.d.ts +3 -3
- package/dist/view-system/model-view.js +7 -7
- package/dist/view-system/saved-views.d.ts +1 -1
- package/dist/view-system/use-view-mode.d.ts +1 -1
- package/dist/view-system/view-state.d.ts +1 -1
- package/dist/view-system/view-switcher.d.ts +1 -1
- package/dist/view-system/view-toolbar.d.ts +1 -1
- package/dist/view-system/view-toolbar.js +2 -2
- package/dist/views/calendar-view.d.ts +1 -1
- package/dist/views/calendar-view.js +2 -2
- package/dist/views/chart-view.d.ts +2 -2
- package/dist/views/chart-view.js +2 -2
- package/dist/views/data-source.d.ts +2 -2
- package/dist/views/index.d.ts +3 -3
- package/dist/views/index.js +2 -2
- package/dist/views/map-view.d.ts +1 -1
- package/dist/views/map-view.js +3 -3
- package/dist/views/panels.d.ts +1 -1
- package/dist/views/panels.js +3 -3
- package/dist/views/registry.d.ts +2 -2
- package/dist/views/registry.js +12 -12
- package/dist/views/split-view.d.ts +1 -1
- package/dist/views/split-view.js +4 -4
- package/dist/views/timeline-view.d.ts +1 -1
- package/dist/views/timeline-view.js +3 -3
- package/dist/views/types.d.ts +2 -2
- package/dist/widgets/charts.d.ts +1 -1
- package/dist/widgets/charts.js +2 -2
- package/dist/widgets/lazy-charts.d.ts +1 -1
- package/dist/widgets/lazy-charts.js +2 -2
- package/dist/widgets/renderers.d.ts +2 -2
- package/dist/widgets/renderers.js +2 -2
- package/dist/widgets/widget-card.d.ts +1 -1
- package/dist/widgets/widget-card.js +2 -2
- package/dist/widgets/widget-renderer.d.ts +1 -1
- package/dist/widgets/widget-renderer.js +4 -4
- package/package.json +9 -9
- package/src/__tests__/host-api-client.test.tsx +28 -0
- package/src/__tests__/host-api.test.ts +91 -0
- package/src/__tests__/searchable-select.test.tsx +247 -0
- package/src/action-modal-dispatcher.tsx +16 -0
- package/src/dialogs/dynamic-record.tsx +26 -0
- package/src/dynamic-form.tsx +17 -0
- package/src/dynamic-line-items.tsx +17 -0
- package/src/dynamic-multi-select-field.tsx +5 -4
- package/src/host-api-client.ts +51 -15
- package/src/host-api.ts +81 -3
- package/src/index.ts +2 -1
- package/src/record-picker.tsx +32 -3
- package/src/searchable-select-field.tsx +134 -0
- package/src/searchable-select.ts +87 -0
- package/src/types.ts +12 -0
- package/src/use-host-api-client.ts +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @asteby/metacore-runtime-react
|
|
2
2
|
|
|
3
|
+
## 53.27.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a81346d: `timeout` por llamada y `defaultTimeout` en el cliente HTTP del host (validado, topado por `createHostApi({ maxTimeoutMs })`, 10 min por defecto), y `freshness: 'network'` para lecturas que no deben salir del caché offline (el host debe leer `metacoreFreshness`). `HostApiRequestOptions` y `HostRequestConfig` coherentes; `PROTECTED_HOST_HEADERS` sin cambios.
|
|
8
|
+
- 98d6b64: Searchable select: a static `select` field with more than 8 options (or `searchable: true`) renders a combobox with a search box instead of a flat dropdown, in `DynamicForm`, `DynamicRecordDialog`, the action modal and line-item cells.
|
|
9
|
+
|
|
10
|
+
- `runtime-react`: new `SearchableSelectField` (thin configuration of `RecordPicker`), `isSearchableSelect`, `filterSearchableOptions`, `SEARCHABLE_SELECT_THRESHOLD`. Matching is case- and accent-insensitive over label, code (value) and option `description`; matches are highlighted; the list is windowed over 100 rows; optional fields get a clear button; full keyboard and ARIA combobox/listbox support. `ActionFieldDef` / `FieldDef` gain `searchable` (kernel `FieldDef.searchable`, `false` keeps the flat select) and `searchThreshold`; options gain `description`. `RecordPicker` gains `highlightQuery` and 44px touch rows. The multi-select picker now uses the same accent-insensitive filter.
|
|
11
|
+
- `ui`: new `normalizeSearchText`, `matchesSearch`, `splitHighlight` (lib). The column-filter value combobox now also matches the visible label (it only matched the raw value), ignoring case and accents.
|
|
12
|
+
|
|
13
|
+
Backward compatible: short lists keep the flat `Select`; hosts that do not send `searchable` get the combobox only above the threshold.
|
|
14
|
+
|
|
15
|
+
## 53.26.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 5dae350: `createHostApiClient(api, { defaultHeaders })`, `useHostApiClient({ defaultHeaders })` y `headers` por llamada (`X-Correlation-ID`...), aditivo. El host descarta las cabeceras que posee (Authorization, X-Organization-ID, X-Branch-ID, Accept-Language, Cookie...; `PROTECTED_HOST_HEADERS`). `HostApiRequestOptions.headers` en sdk. Ademas sdk, genui, ui y runtime-react reescriben en postbuild sus imports relativos de `dist/` con extension (`.js`) para que Node ESM los resuelva.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [5dae350]
|
|
24
|
+
- @asteby/metacore-lib@0.12.1
|
|
25
|
+
|
|
3
26
|
## 53.25.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Translate } from './server-error';
|
|
2
|
-
import type { ActionFieldDef } from './types';
|
|
1
|
+
import type { Translate } from './server-error.js';
|
|
2
|
+
import type { ActionFieldDef } from './types.js';
|
|
3
3
|
import { type ActionMetadata, type ActionModalProps } from '@asteby/metacore-sdk';
|
|
4
4
|
export type { ActionMetadata, ActionModalProps };
|
|
5
5
|
export interface PrefillSpec {
|
|
@@ -110,7 +110,7 @@ export interface FieldDefaultContext {
|
|
|
110
110
|
*/
|
|
111
111
|
export declare function resolveFieldDefault(field: ActionFieldDef, ctx?: FieldDefaultContext): unknown;
|
|
112
112
|
export declare function buildFieldDefaults(fields: ActionFieldDef[], record: any, model?: string, ctx?: FieldDefaultContext): Record<string, any>;
|
|
113
|
-
export declare function seedOptionFromRecord(field: ActionFieldDef, value: any, record?: Record<string, any>): import('./use-options-resolver').ResolvedOption | undefined;
|
|
113
|
+
export declare function seedOptionFromRecord(field: ActionFieldDef, value: any, record?: Record<string, any>): import('./use-options-resolver.js').ResolvedOption | undefined;
|
|
114
114
|
/** Renders one action field (same widgets as the action modals). Shared with DocumentFormDialog. */
|
|
115
115
|
export declare function renderField(field: ActionFieldDef, value: any, onChange: (value: any) => void, formValues?: Record<string, any>, record?: Record<string, any>, fieldErrors?: Record<string, string>, labelId?: string): import("react").JSX.Element;
|
|
116
116
|
//# sourceMappingURL=action-modal-dispatcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-modal-dispatcher.d.ts","sourceRoot":"","sources":["../src/action-modal-dispatcher.tsx"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"action-modal-dispatcher.d.ts","sourceRoot":"","sources":["../src/action-modal-dispatcher.tsx"],"names":[],"mappings":"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"}
|
|
@@ -15,45 +15,47 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
15
15
|
//
|
|
16
16
|
// The host injects its axios-like client via <ApiProvider>; we no longer
|
|
17
17
|
// depend on a bundler alias to `@/lib/api`.
|
|
18
|
-
import { emitRecordMutationSettled } from './record-mutation-events';
|
|
18
|
+
import { emitRecordMutationSettled } from './record-mutation-events.js';
|
|
19
19
|
import { Suspense, useState, useCallback, useEffect, useId, useMemo, useRef, useSyncExternalStore } from 'react';
|
|
20
20
|
import { useTranslation } from 'react-i18next';
|
|
21
21
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, Button, Input, Textarea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, } from '@asteby/metacore-ui/primitives';
|
|
22
22
|
import { Loader2 } from 'lucide-react';
|
|
23
23
|
import { ProcessStepper } from '@asteby/metacore-ui/wizard';
|
|
24
24
|
import { toast } from 'sonner';
|
|
25
|
-
import { toastServerError, toastServerSuccess, extractFieldErrors, extractServerError, localizeFieldErrorMap } from './server-error';
|
|
26
|
-
import { FormErrorBanner } from './business/feedback';
|
|
27
|
-
import { CfdiStampResultDialog, extractStampResult } from './cfdi-stamp-panel';
|
|
28
|
-
import { useBranchCreateGate } from './branch-create-gate';
|
|
29
|
-
import { validateValues, bagHasErrors } from './validator';
|
|
30
|
-
import { clearFieldErrorTree, formatFieldErrorsDescription, labelsForValidationFields, labelForValidationPath, lineItemErrorsFor, } from './field-validation-ui';
|
|
31
|
-
import { validationCatalog } from './validation-catalog';
|
|
32
|
-
import { useApi } from './api-context';
|
|
33
|
-
import { useReasonPrompt } from './reason-prompt';
|
|
34
|
-
import { useSupervisor, withApproval } from './supervised-action';
|
|
35
|
-
import { buildRelationFilterParams } from './dynamic-relation-helpers';
|
|
36
|
-
import { DynamicIcon } from './dynamic-icon';
|
|
37
|
-
import { DynamicLineItems } from './dynamic-line-items';
|
|
38
|
-
import { DynamicRelations } from './dynamic-relations';
|
|
39
|
-
import { DynamicSelectField } from './dynamic-select-field';
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
25
|
+
import { toastServerError, toastServerSuccess, extractFieldErrors, extractServerError, localizeFieldErrorMap } from './server-error.js';
|
|
26
|
+
import { FormErrorBanner } from './business/feedback.js';
|
|
27
|
+
import { CfdiStampResultDialog, extractStampResult } from './cfdi-stamp-panel.js';
|
|
28
|
+
import { useBranchCreateGate } from './branch-create-gate.js';
|
|
29
|
+
import { validateValues, bagHasErrors } from './validator.js';
|
|
30
|
+
import { clearFieldErrorTree, formatFieldErrorsDescription, labelsForValidationFields, labelForValidationPath, lineItemErrorsFor, } from './field-validation-ui.js';
|
|
31
|
+
import { validationCatalog } from './validation-catalog.js';
|
|
32
|
+
import { useApi } from './api-context.js';
|
|
33
|
+
import { useReasonPrompt } from './reason-prompt.js';
|
|
34
|
+
import { useSupervisor, withApproval } from './supervised-action.js';
|
|
35
|
+
import { buildRelationFilterParams } from './dynamic-relation-helpers.js';
|
|
36
|
+
import { DynamicIcon } from './dynamic-icon.js';
|
|
37
|
+
import { DynamicLineItems } from './dynamic-line-items.js';
|
|
38
|
+
import { DynamicRelations } from './dynamic-relations.js';
|
|
39
|
+
import { DynamicSelectField } from './dynamic-select-field.js';
|
|
40
|
+
import { SearchableSelectField } from './searchable-select-field.js';
|
|
41
|
+
import { isSearchableSelect } from './searchable-select.js';
|
|
42
|
+
import { DynamicDateField } from './dynamic-date-field.js';
|
|
43
|
+
import { UploadField } from './upload-field.js';
|
|
44
|
+
import { isLineItemsField, resolveWidget, resolveDependsValue, getDependsOn, getFieldRef, applyOptionWhen } from './dynamic-form-schema.js';
|
|
45
|
+
import { FieldGrid, FieldCell, FieldLabel } from './field-grid.js';
|
|
46
|
+
import { useMetadataCache } from './metadata-cache.js';
|
|
47
|
+
import { cacheScope } from './cache-scope.js';
|
|
48
|
+
import { ViewValue, objectLabel, relationSiblingValue, isLineItemsField as isRecordLineItemsField, } from './dialogs/dynamic-record.js';
|
|
47
49
|
// Canonical registry lives in @asteby/metacore-sdk
|
|
48
50
|
import { adaptActionProps, getActionComponent, subscribeActionComponents, } from '@asteby/metacore-sdk';
|
|
49
|
-
import { requestFederatedAction } from './federated-action-loader';
|
|
50
|
-
import { useInstalledAddons } from './installed-addons-context';
|
|
51
|
-
import { federatedModalComponent, resolveFederatedModal } from './primitives/contributions';
|
|
52
|
-
import { installedPredicate, useContributionsVersion } from './primitives/use-contributions';
|
|
53
|
-
import { isTodayToken, todayInZone } from './calendar-date';
|
|
54
|
-
import { useTimeZone } from './org-runtime-context';
|
|
55
|
-
import { isNullableBooleanField, omitUntouchedNullBooleans, usesTriState } from './nullable-boolean';
|
|
56
|
-
import { TriStateBooleanField } from './tri-state-boolean';
|
|
51
|
+
import { requestFederatedAction } from './federated-action-loader.js';
|
|
52
|
+
import { useInstalledAddons } from './installed-addons-context.js';
|
|
53
|
+
import { federatedModalComponent, resolveFederatedModal } from './primitives/contributions.js';
|
|
54
|
+
import { installedPredicate, useContributionsVersion } from './primitives/use-contributions.js';
|
|
55
|
+
import { isTodayToken, todayInZone } from './calendar-date.js';
|
|
56
|
+
import { useTimeZone } from './org-runtime-context.js';
|
|
57
|
+
import { isNullableBooleanField, omitUntouchedNullBooleans, usesTriState } from './nullable-boolean.js';
|
|
58
|
+
import { TriStateBooleanField } from './tri-state-boolean.js';
|
|
57
59
|
export function isPrefillSpec(v) {
|
|
58
60
|
return (typeof v === 'object' &&
|
|
59
61
|
v !== null &&
|
|
@@ -1320,6 +1322,9 @@ labelId) {
|
|
|
1320
1322
|
const stale = !!value && !options.some((o) => String(o.value) === String(value));
|
|
1321
1323
|
const selectInvalid = invalid || stale;
|
|
1322
1324
|
const selectCls = selectInvalid ? 'border-destructive ring-1 ring-destructive/30 focus-visible:ring-destructive' : '';
|
|
1325
|
+
if (isSearchableSelect(field, options.length)) {
|
|
1326
|
+
return (_jsx(SearchableSelectField, { id: field.key, ariaLabel: field.label || field.key, options: options, value: stale ? '' : value, onChange: onChange, placeholder: field.placeholder || undefined, required: !!field.required, invalid: selectInvalid }));
|
|
1327
|
+
}
|
|
1323
1328
|
return (_jsxs(Select, { value: stale ? '' : value || '', onValueChange: onChange, children: [_jsx(SelectTrigger, { className: 'w-full' + (selectCls ? ` ${selectCls}` : ''), "aria-invalid": selectInvalid || undefined, "data-stale-option": stale || undefined, children: _jsx(SelectValue, { placeholder: field.placeholder || 'Seleccionar...' }) }), _jsx(SelectContent, { children: options.map((opt) => _jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })] }));
|
|
1324
1329
|
}
|
|
1325
1330
|
case 'switch':
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActionPriority } from '@asteby/metacore-sdk';
|
|
2
|
-
import type { InstalledAddonsValue } from './installed-addons-context';
|
|
2
|
+
import type { InstalledAddonsValue } from './installed-addons-context.js';
|
|
3
3
|
export type { ActionPriority };
|
|
4
4
|
/** Lo mínimo que se lee de una acción de metadata para clasificarla. */
|
|
5
5
|
export interface PrioritizableAction {
|
package/dist/activity-diff.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Toggle: "Todos los campos / Solo cambios" (with changed-field counter).
|
|
16
16
|
*/
|
|
17
17
|
import * as React from 'react';
|
|
18
|
-
import type { ColumnDefinition } from './types';
|
|
18
|
+
import type { ColumnDefinition } from './types.js';
|
|
19
19
|
/**
|
|
20
20
|
* The canonical activity event shape as produced by the kernel / host backend.
|
|
21
21
|
* Transport-agnostic — the component only reads the fields it needs.
|
package/dist/activity-diff.js
CHANGED
|
@@ -19,7 +19,7 @@ import * as React from 'react';
|
|
|
19
19
|
import { ArrowRight } from 'lucide-react';
|
|
20
20
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
21
21
|
import { Badge } from '@asteby/metacore-ui/primitives';
|
|
22
|
-
import { ActivityValueRenderer } from './activity-value-renderer';
|
|
22
|
+
import { ActivityValueRenderer } from './activity-value-renderer.js';
|
|
23
23
|
// ---------------------------------------------------------------------------
|
|
24
24
|
// Helpers
|
|
25
25
|
// ---------------------------------------------------------------------------
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* per-model via the `resolveColumns(model)` injected function. No fetch.
|
|
14
14
|
*/
|
|
15
15
|
import * as React from 'react';
|
|
16
|
-
import type { ColumnDefinition } from './types';
|
|
17
|
-
import type { ActivityEvent } from './activity-diff';
|
|
16
|
+
import type { ColumnDefinition } from './types.js';
|
|
17
|
+
import type { ActivityEvent } from './activity-diff.js';
|
|
18
18
|
export interface ActivityTimelineProps {
|
|
19
19
|
/**
|
|
20
20
|
* All activity events to display. The component groups, sorts, and filters
|
|
@@ -14,15 +14,15 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
14
14
|
* per-model via the `resolveColumns(model)` injected function. No fetch.
|
|
15
15
|
*/
|
|
16
16
|
import * as React from 'react';
|
|
17
|
-
import { useSystemActor } from './org-runtime-context';
|
|
18
|
-
import { parseProvenance, ProvenanceAvatar, useResolvedAuthorship } from './provenance';
|
|
17
|
+
import { useSystemActor } from './org-runtime-context.js';
|
|
18
|
+
import { parseProvenance, ProvenanceAvatar, useResolvedAuthorship } from './provenance.js';
|
|
19
19
|
import { formatDistanceToNow } from 'date-fns';
|
|
20
20
|
import { es, enUS } from 'date-fns/locale';
|
|
21
21
|
import { ChevronDown, ChevronRight, Clock, Filter, X, Layers, Activity, } from 'lucide-react';
|
|
22
22
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
23
23
|
import { Avatar, AvatarFallback, Badge, Collapsible, CollapsibleContent, CollapsibleTrigger, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Button, } from '@asteby/metacore-ui/primitives';
|
|
24
24
|
import { getInitials } from '@asteby/metacore-ui/lib';
|
|
25
|
-
import { ActivityDiff } from './activity-diff';
|
|
25
|
+
import { ActivityDiff } from './activity-diff.js';
|
|
26
26
|
// ---------------------------------------------------------------------------
|
|
27
27
|
// Helpers
|
|
28
28
|
// ---------------------------------------------------------------------------
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* column-factory machinery — only React + metacore-ui primitives.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
13
|
-
import type { ColumnDefinition } from './types';
|
|
13
|
+
import type { ColumnDefinition } from './types.js';
|
|
14
14
|
export interface ActivityValueRendererProps {
|
|
15
15
|
/** The raw value to display (from before/after/changes). */
|
|
16
16
|
value: unknown;
|
|
@@ -15,9 +15,9 @@ import { Calendar, Check, ExternalLink, Mail, Minus } from 'lucide-react';
|
|
|
15
15
|
import { es, enUS } from 'date-fns/locale';
|
|
16
16
|
import { Badge, Avatar, AvatarImage, AvatarFallback, } from '@asteby/metacore-ui/primitives';
|
|
17
17
|
import { generateBadgeStyles, getInitials, optionColor, relationChipStyles } from '@asteby/metacore-ui/lib';
|
|
18
|
-
import { formatDateCell } from './dynamic-columns';
|
|
19
|
-
import { humanizeToken } from './dynamic-columns-helpers';
|
|
20
|
-
import { CollectionCell } from './collection-cell';
|
|
18
|
+
import { formatDateCell } from './dynamic-columns.js';
|
|
19
|
+
import { humanizeToken } from './dynamic-columns-helpers.js';
|
|
20
|
+
import { CollectionCell } from './collection-cell.js';
|
|
21
21
|
/**
|
|
22
22
|
* Parses a value into a jsonb line-items array (array of plain objects) when it
|
|
23
23
|
* is one — directly, or from a JSON-encoded string. Returns null otherwise, so
|
package/dist/addon-loader.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AddonAPI, AddonLayout, Registry } from '@asteby/metacore-sdk';
|
|
2
|
-
import { type FederatedErrorInfo } from './federated-error-boundary';
|
|
2
|
+
import { type FederatedErrorInfo } from './federated-error-boundary.js';
|
|
3
3
|
export interface AddonLoaderProps {
|
|
4
4
|
/** Unique key of the addon — maps to the federation container name. */
|
|
5
5
|
scope: string;
|
package/dist/addon-loader.js
CHANGED
|
@@ -20,9 +20,9 @@ function getMfRuntime() {
|
|
|
20
20
|
return mfRuntime;
|
|
21
21
|
}
|
|
22
22
|
import { ensureRemoteIntegrity, RemoteIntegrityError } from '@asteby/metacore-sdk';
|
|
23
|
-
import { useDeclareAddonLayout } from './addon-layout-context';
|
|
24
|
-
import { FederatedErrorBoundary } from './federated-error-boundary';
|
|
25
|
-
import { composeDisposables, disposableFromRegisterResult, markRemoteRegistered, purgeAddonFrontendCache, resolvePluginExports, runDispose, shouldReregisterRemote, } from './addon-fiber';
|
|
23
|
+
import { useDeclareAddonLayout } from './addon-layout-context.js';
|
|
24
|
+
import { FederatedErrorBoundary } from './federated-error-boundary.js';
|
|
25
|
+
import { composeDisposables, disposableFromRegisterResult, markRemoteRegistered, purgeAddonFrontendCache, resolvePluginExports, runDispose, shouldReregisterRemote, } from './addon-fiber.js';
|
|
26
26
|
// Derive the `loadRemote` id from the scope + exposed module name. MF resolves
|
|
27
27
|
// `"<remoteName>/<expose>"` — e.g. `metacore_tickets/register` for the
|
|
28
28
|
// `"./register"` expose. We strip the leading `./` of the expose path.
|
package/dist/addon-page-host.js
CHANGED
|
@@ -28,7 +28,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
28
28
|
// useBreadcrumbs([{ title: t('shipping.nav.group'), url: '/m/Shipment' }])
|
|
29
29
|
// usePageChrome({ title: t('shipping.pages.control_tower'), focus: true })
|
|
30
30
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useSyncExternalStore, } from 'react';
|
|
31
|
-
import { HostApiContext } from './host-api-context';
|
|
31
|
+
import { HostApiContext } from './host-api-context.js';
|
|
32
32
|
const EMPTY_CHROME = Object.freeze({ breadcrumbs: [] });
|
|
33
33
|
export function createPageChromeStore(initial) {
|
|
34
34
|
let state = { ...EMPTY_CHROME, ...initial };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type AddonHostContext, type FrontendPage, type HostApi } from '@asteby/metacore-sdk';
|
|
3
|
-
import { type AddonPageHostProps, type PageChromeStore } from './addon-page-host';
|
|
4
|
-
import { type FederatedErrorBoundaryProps, type FederatedErrorInfo } from './federated-error-boundary';
|
|
3
|
+
import { type AddonPageHostProps, type PageChromeStore } from './addon-page-host.js';
|
|
4
|
+
import { type FederatedErrorBoundaryProps, type FederatedErrorInfo } from './federated-error-boundary.js';
|
|
5
5
|
export interface AddonPageLoaderProps {
|
|
6
6
|
/** Federation container name (`metacore_shipping`). */
|
|
7
7
|
scope: string;
|
|
@@ -15,9 +15,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
// re-runs the load. `timeoutMs` turns a hung remote into that same error.
|
|
16
16
|
import { useEffect, useState } from 'react';
|
|
17
17
|
import { resolvePageModule, } from '@asteby/metacore-sdk';
|
|
18
|
-
import { loadFederatedModule } from './addon-loader';
|
|
19
|
-
import { AddonPageHost, addonSubpath } from './addon-page-host';
|
|
20
|
-
import { FederatedErrorBoundary, } from './federated-error-boundary';
|
|
18
|
+
import { loadFederatedModule } from './addon-loader.js';
|
|
19
|
+
import { AddonPageHost, addonSubpath } from './addon-page-host.js';
|
|
20
|
+
import { FederatedErrorBoundary, } from './federated-error-boundary.js';
|
|
21
21
|
/** Page-sized skeleton: header line + content block, fixed heights (no layout shift). */
|
|
22
22
|
export function AddonPageSkeleton() {
|
|
23
23
|
return (_jsxs("div", { "aria-busy": "true", "data-testid": "addon-page-skeleton", className: "flex flex-col gap-4 p-4", children: [_jsx("div", { className: "h-7 w-56 animate-pulse rounded-md bg-muted" }), _jsx("div", { className: "h-[60vh] w-full animate-pulse rounded-lg bg-muted/70" })] }));
|
package/dist/api-context.js
CHANGED
|
@@ -4,10 +4,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
// talk to the backend without a bundler alias to `@/lib/api`. Hosts wrap
|
|
5
5
|
// their app in <ApiProvider value={axiosInstance}> once at the root.
|
|
6
6
|
import { createContext, useContext, useEffect, useMemo } from 'react';
|
|
7
|
-
import { batchGet, invalidateQueryBatchData } from './query-batch';
|
|
8
|
-
import { syncCacheScope } from './cache-scope';
|
|
9
|
-
import { invalidateOptionsCache } from './use-options-resolver';
|
|
10
|
-
import { epochFromAxiosHeaders, isStaleStateError, reportCacheEpoch, STALE_RETRIED_FLAG, STALE_RETRY_DELAY_MS, } from './cache-coherence';
|
|
7
|
+
import { batchGet, invalidateQueryBatchData } from './query-batch.js';
|
|
8
|
+
import { syncCacheScope } from './cache-scope.js';
|
|
9
|
+
import { invalidateOptionsCache } from './use-options-resolver.js';
|
|
10
|
+
import { epochFromAxiosHeaders, isStaleStateError, reportCacheEpoch, STALE_RETRIED_FLAG, STALE_RETRY_DELAY_MS, } from './cache-coherence.js';
|
|
11
11
|
const ApiContext = createContext(null);
|
|
12
12
|
const BatchContext = createContext(true);
|
|
13
13
|
export function ApiProvider({ client, batch = true, children }) {
|
package/dist/approval-gate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export { APPROVAL_DECIDED_EVENT, APPROVAL_PARKED_EVENT, approvalGateAvailable, approvalRequiredInfo, type ApprovalRequiredInfo, } from './approval-events';
|
|
2
|
+
export { APPROVAL_DECIDED_EVENT, APPROVAL_PARKED_EVENT, approvalGateAvailable, approvalRequiredInfo, type ApprovalRequiredInfo, } from './approval-events.js';
|
|
3
3
|
/** Capability that authorizes `policy` (and lets its holder skip the prompt). */
|
|
4
4
|
export declare function approvalCapability(policy: string): string;
|
|
5
5
|
export interface ApprovalGrant {
|
package/dist/approval-gate.js
CHANGED
|
@@ -15,11 +15,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
17
|
import { toast } from 'sonner';
|
|
18
|
-
import { useApi } from './api-context';
|
|
19
|
-
import { useCan } from './permissions-context';
|
|
20
|
-
import { ApprovalPinDialog } from './approval-pin-dialog';
|
|
21
|
-
import { APPROVAL_DECIDED_EVENT, APPROVAL_PARKED_EVENT, gateMountedDelta, } from './approval-events';
|
|
22
|
-
export { APPROVAL_DECIDED_EVENT, APPROVAL_PARKED_EVENT, approvalGateAvailable, approvalRequiredInfo, } from './approval-events';
|
|
18
|
+
import { useApi } from './api-context.js';
|
|
19
|
+
import { useCan } from './permissions-context.js';
|
|
20
|
+
import { ApprovalPinDialog } from './approval-pin-dialog.js';
|
|
21
|
+
import { APPROVAL_DECIDED_EVENT, APPROVAL_PARKED_EVENT, gateMountedDelta, } from './approval-events.js';
|
|
22
|
+
export { APPROVAL_DECIDED_EVENT, APPROVAL_PARKED_EVENT, approvalGateAvailable, approvalRequiredInfo, } from './approval-events.js';
|
|
23
23
|
/** Capability that authorizes `policy` (and lets its holder skip the prompt). */
|
|
24
24
|
export function approvalCapability(policy) {
|
|
25
25
|
return `general.approve_${policy}`;
|
package/dist/assist-interview.js
CHANGED
|
@@ -17,7 +17,7 @@ import { unwrapResponse } from '@asteby/metacore-lib/envelope';
|
|
|
17
17
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
18
18
|
import { Button, Input } from '@asteby/metacore-ui/primitives';
|
|
19
19
|
import { ArrowRight, Check, CheckCircle2, Loader2, RotateCcw, Sparkles, XCircle } from 'lucide-react';
|
|
20
|
-
import { useApi } from './api-context';
|
|
20
|
+
import { useApi } from './api-context.js';
|
|
21
21
|
const POLL_MS = 800;
|
|
22
22
|
const THINKING_HINTS = ['Un momento…', 'Sigo trabajando…', 'Casi listo…'];
|
|
23
23
|
function useTypewriter(text) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { applyNavBadges } from './apply-nav-badges';
|
|
2
|
-
export { useNavBadges, parseNavCounts, NAV_BADGES_QUERY_KEY, type NavCountDTO, type AttentionBadge, type UseNavBadgesOptions, type UseNavBadgesResult, } from './use-nav-badges';
|
|
3
|
-
export { useDocumentAttention } from './use-document-attention';
|
|
1
|
+
export { applyNavBadges } from './apply-nav-badges.js';
|
|
2
|
+
export { useNavBadges, parseNavCounts, NAV_BADGES_QUERY_KEY, type NavCountDTO, type AttentionBadge, type UseNavBadgesOptions, type UseNavBadgesResult, } from './use-nav-badges.js';
|
|
3
|
+
export { useDocumentAttention } from './use-document-attention.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/attention/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { applyNavBadges } from './apply-nav-badges';
|
|
2
|
-
export { useNavBadges, parseNavCounts, NAV_BADGES_QUERY_KEY, } from './use-nav-badges';
|
|
3
|
-
export { useDocumentAttention } from './use-document-attention';
|
|
1
|
+
export { applyNavBadges } from './apply-nav-badges.js';
|
|
2
|
+
export { useNavBadges, parseNavCounts, NAV_BADGES_QUERY_KEY, } from './use-nav-badges.js';
|
|
3
|
+
export { useDocumentAttention } from './use-document-attention.js';
|
|
@@ -2,8 +2,8 @@ import { useMemo } from 'react';
|
|
|
2
2
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { aggregateBadges, isSeverity } from '@asteby/metacore-ui/layout';
|
|
5
|
-
import { useApi } from '../api-context';
|
|
6
|
-
import { useRealtimeInvalidate } from '../realtime-context';
|
|
5
|
+
import { useApi } from '../api-context.js';
|
|
6
|
+
import { useRealtimeInvalidate } from '../realtime-context.js';
|
|
7
7
|
export const NAV_BADGES_QUERY_KEY = ['nav-badges'];
|
|
8
8
|
/** Pure: DTO list -> map by id, dropping zero/invalid rows, unknown tone -> info. */
|
|
9
9
|
export function parseNavCounts(rows, translate = (k) => k) {
|
package/dist/audit-info.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* Renders nothing when `audit` is absent or the record has none of its values.
|
|
17
17
|
*/
|
|
18
18
|
import * as React from 'react';
|
|
19
|
-
import type { AuditMeta } from './types';
|
|
19
|
+
import type { AuditMeta } from './types.js';
|
|
20
20
|
/** The kernel's actor for unattended work (schedules, webhooks, connectors). */
|
|
21
21
|
export declare const SYSTEM_ACTOR_ID = "00000000-0000-0000-0000-000000000001";
|
|
22
22
|
/**
|
package/dist/audit-info.js
CHANGED
|
@@ -22,11 +22,11 @@ import { formatDistanceToNow } from 'date-fns';
|
|
|
22
22
|
import { es, enUS } from 'date-fns/locale';
|
|
23
23
|
import { ChevronDown, ChevronRight, History } from 'lucide-react';
|
|
24
24
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
25
|
-
import { formatDateCell } from './dynamic-columns';
|
|
26
|
-
import { objectLabel } from './dynamic-relation-helpers';
|
|
27
|
-
import { isNilUuid } from './nil-uuid';
|
|
28
|
-
import { useSystemActor, useTimeZone } from './org-runtime-context';
|
|
29
|
-
import { readProvenance, useResolvedAuthorship } from './provenance';
|
|
25
|
+
import { formatDateCell } from './dynamic-columns.js';
|
|
26
|
+
import { objectLabel } from './dynamic-relation-helpers.js';
|
|
27
|
+
import { isNilUuid } from './nil-uuid.js';
|
|
28
|
+
import { useSystemActor, useTimeZone } from './org-runtime-context.js';
|
|
29
|
+
import { readProvenance, useResolvedAuthorship } from './provenance.js';
|
|
30
30
|
/** The kernel's actor for unattended work (schedules, webhooks, connectors). */
|
|
31
31
|
export const SYSTEM_ACTOR_ID = '00000000-0000-0000-0000-000000000001';
|
|
32
32
|
const AUDIT_KEYS = [
|
|
@@ -10,13 +10,13 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
10
10
|
import { lazy, Suspense, useEffect, useState } from 'react';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import { ImagePlus } from 'lucide-react';
|
|
13
|
-
import { useApi } from './api-context';
|
|
14
|
-
import { useMetadataCache } from './metadata-cache';
|
|
15
|
-
import { modelCapability, useCan } from './permissions-context';
|
|
16
|
-
import { deriveBulkImageTarget } from './bulk-image-target';
|
|
13
|
+
import { useApi } from './api-context.js';
|
|
14
|
+
import { useMetadataCache } from './metadata-cache.js';
|
|
15
|
+
import { modelCapability, useCan } from './permissions-context.js';
|
|
16
|
+
import { deriveBulkImageTarget } from './bulk-image-target.js';
|
|
17
17
|
// El asistente (tabla de vista previa, progreso, deshacer) pesa bastante y solo se usa al
|
|
18
18
|
// pulsar el botón: se carga bajo demanda, fuera del JS inicial del shell.
|
|
19
|
-
const BulkImageDialog = lazy(() => import('./bulk-image-wizard').then((m) => ({ default: m.BulkImageDialog })));
|
|
19
|
+
const BulkImageDialog = lazy(() => import('./bulk-image-wizard.js').then((m) => ({ default: m.BulkImageDialog })));
|
|
20
20
|
export function BulkImageImportButton({ model, metadata, skuKey = 'sku', dataBase = '/data', minLongSide, className, onChange, }) {
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
const api = useApi();
|
|
@@ -31,8 +31,8 @@ export declare const normalizeSku: (s: string) => string;
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function collectCandidateSkus(names: string[]): string[];
|
|
33
33
|
export declare function chunk<T>(arr: T[], size: number): T[][];
|
|
34
|
-
export * from './bulk-image-target';
|
|
35
|
-
import type { BulkImageTarget } from './bulk-image-target';
|
|
34
|
+
export * from './bulk-image-target.js';
|
|
35
|
+
import type { BulkImageTarget } from './bulk-image-target.js';
|
|
36
36
|
export interface ParentRef {
|
|
37
37
|
id: string;
|
|
38
38
|
label: string;
|
|
@@ -75,7 +75,7 @@ export function chunk(arr, size) {
|
|
|
75
75
|
// ---------------------------------------------------------------------------
|
|
76
76
|
// Configuración (descubierta de la metadata, sin tocar el kernel)
|
|
77
77
|
// ---------------------------------------------------------------------------
|
|
78
|
-
export * from './bulk-image-target';
|
|
78
|
+
export * from './bulk-image-target.js';
|
|
79
79
|
/** ¿La fila se importa por defecto? (`low_res` sí, con aviso; el usuario puede excluirla). */
|
|
80
80
|
export const isImportable = (r) => r.status === 'ok' || r.status === 'low_res';
|
|
81
81
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { relationColumnUi, relationGalleryColumn } from './dynamic-relation-helpers';
|
|
1
|
+
import { relationColumnUi, relationGalleryColumn } from './dynamic-relation-helpers.js';
|
|
2
2
|
/**
|
|
3
3
|
* Busca la relación 1:N con galería. Necesita la metadata del hijo (para saber
|
|
4
4
|
* cuál es su columna de imagen); `childMetadata` la resuelve el llamador.
|
|
@@ -5,11 +5,11 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@asteby/metacore-ui/primitives';
|
|
7
7
|
import { AlertCircle, Check, FolderUp, ImagePlus, Loader2, Undo2, Download } from 'lucide-react';
|
|
8
|
-
import { useApi } from './api-context';
|
|
9
|
-
import { cacheScope } from './cache-scope';
|
|
10
|
-
import { Progress } from './dialogs/_primitives';
|
|
11
|
-
import { extractUploadedValue, readImageSize } from './upload-field';
|
|
12
|
-
import { buildChildPayload, buildPreview, chunk, collectBulkFiles, collectCandidateSkus, isImportable, loadBatchLogs, MAX_BULK_FILES, newBatchId, normalizeSku, pendingUndo, saveBatchLog, selectForImport, summarizePreview, } from './bulk-image-import';
|
|
8
|
+
import { useApi } from './api-context.js';
|
|
9
|
+
import { cacheScope } from './cache-scope.js';
|
|
10
|
+
import { Progress } from './dialogs/_primitives.js';
|
|
11
|
+
import { extractUploadedValue, readImageSize } from './upload-field.js';
|
|
12
|
+
import { buildChildPayload, buildPreview, chunk, collectBulkFiles, collectCandidateSkus, isImportable, loadBatchLogs, MAX_BULK_FILES, newBatchId, normalizeSku, pendingUndo, saveBatchLog, selectForImport, summarizePreview, } from './bulk-image-import.js';
|
|
13
13
|
const LOOKUP_CHUNK = 40;
|
|
14
14
|
const CONCURRENCY = 3;
|
|
15
15
|
const PAGE_SIZE = 200;
|
|
@@ -6,10 +6,10 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
import { useCallback, useState } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { Badge } from '@asteby/metacore-ui';
|
|
9
|
-
import { RecordPicker, useLatestSearch } from '../record-picker';
|
|
10
|
-
import { useRecordPickerDialog } from '../record-picker-dialog';
|
|
11
|
-
import { useCan } from '../permissions-context';
|
|
12
|
-
import { useFormatter } from './format';
|
|
9
|
+
import { RecordPicker, useLatestSearch } from '../record-picker.js';
|
|
10
|
+
import { useRecordPickerDialog } from '../record-picker-dialog.js';
|
|
11
|
+
import { useCan } from '../permissions-context.js';
|
|
12
|
+
import { useFormatter } from './format.js';
|
|
13
13
|
function snake(model) {
|
|
14
14
|
return model.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toLowerCase();
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type LineItem } from './line-items';
|
|
2
|
-
import type { Allocation, AllocationIssue, OpenDocument } from '../primitives/allocation';
|
|
3
|
-
import type { ActionFieldDef, DocumentFormLines, DocumentFormSource, DocumentFormOpenDocuments, DocumentFormsManifest, DocumentFormType } from '../types';
|
|
1
|
+
import { type LineItem } from './line-items.js';
|
|
2
|
+
import type { Allocation, AllocationIssue, OpenDocument } from '../primitives/allocation.js';
|
|
3
|
+
import type { ActionFieldDef, DocumentFormLines, DocumentFormSource, DocumentFormOpenDocuments, DocumentFormsManifest, DocumentFormType } from '../types.js';
|
|
4
4
|
export declare const EXTENSION_PREFIX = "fiscal_data.";
|
|
5
5
|
export type EditorLinesConfig = DocumentFormLines & {
|
|
6
6
|
field: string;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// traer renglones de un documento origen, cómo repartir un cobro entre los
|
|
4
4
|
// documentos abiertos y qué revisar antes de guardar. Genérico: factura,
|
|
5
5
|
// cotización, pedido, OC, nota de crédito y cobro/REP. El SDK no conoce CFDI.
|
|
6
|
-
import { roundMoney, toAmount } from './format';
|
|
7
|
-
import { computeTotals, makeLine } from './line-items';
|
|
8
|
-
import { optionPassesRule, getOptionFilter } from '../option-filter';
|
|
9
|
-
import { applyOptionWhen, getDependsOn } from '../dynamic-form-schema';
|
|
6
|
+
import { roundMoney, toAmount } from './format.js';
|
|
7
|
+
import { computeTotals, makeLine } from './line-items.js';
|
|
8
|
+
import { optionPassesRule, getOptionFilter } from '../option-filter.js';
|
|
9
|
+
import { applyOptionWhen, getDependsOn } from '../dynamic-form-schema.js';
|
|
10
10
|
export const EXTENSION_PREFIX = 'fiscal_data.';
|
|
11
11
|
/** Secciones de campo que el editor pliega en «Opciones fiscales». */
|
|
12
12
|
const ADVANCED_SECTIONS = new Set(['fiscal', 'advanced']);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { CreditStatus, EditorIssue } from './document-editor-model';
|
|
3
|
-
import type { Formatter } from './format';
|
|
4
|
-
import { type LineItem } from './line-items';
|
|
2
|
+
import type { CreditStatus, EditorIssue } from './document-editor-model.js';
|
|
3
|
+
import type { Formatter } from './format.js';
|
|
4
|
+
import { type LineItem } from './line-items.js';
|
|
5
5
|
/** Bloque con título discreto y espaciado generoso (sin bordes pesados). */
|
|
6
6
|
export declare function EditorSection({ title, hint, children, slot }: {
|
|
7
7
|
title?: ReactNode;
|
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { useId, useState } from 'react';
|
|
7
7
|
import { Badge } from '@asteby/metacore-ui/primitives';
|
|
8
8
|
import { AlertTriangle, ChevronDown, XCircle } from 'lucide-react';
|
|
9
|
-
import { computeLine } from './line-items';
|
|
9
|
+
import { computeLine } from './line-items.js';
|
|
10
10
|
/** Bloque con título discreto y espaciado generoso (sin bordes pesados). */
|
|
11
11
|
export function EditorSection({ title, hint, children, slot }) {
|
|
12
12
|
return (_jsxs("section", { className: "space-y-3", "data-slot": slot, children: [(title || hint) && (_jsxs("header", { className: "flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1", children: [title && _jsx("h3", { className: "whitespace-nowrap text-sm font-semibold", children: title }), hint && _jsx("span", { className: "text-xs text-muted-foreground", children: hint })] })), children] }));
|