@asteby/metacore-runtime-react 53.25.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.
- package/CHANGELOG.md +11 -0
- package/dist/action-modal-dispatcher.d.ts +3 -3
- package/dist/action-modal-dispatcher.js +31 -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 +5 -5
- package/dist/dialogs/dynamic-record.js +41 -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.js +24 -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.js +6 -6
- package/dist/dynamic-multi-select-field.d.ts +1 -1
- package/dist/dynamic-multi-select-field.js +7 -7
- 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 +11 -1
- package/dist/host-api-client.d.ts.map +1 -1
- package/dist/host-api-client.js +21 -14
- package/dist/host-api.d.ts +9 -1
- package/dist/host-api.d.ts.map +1 -1
- package/dist/host-api.js +57 -2
- 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.js +2 -2
- 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/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 +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 +16 -0
- package/src/__tests__/host-api.test.ts +50 -0
- package/src/host-api-client.ts +31 -14
- package/src/host-api.ts +54 -1
- package/src/index.ts +2 -1
- package/src/use-host-api-client.ts +5 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { pickText, domainOf, humanizeSegment, servesMarket, resolveCapability, recommendProvider, groupByDomain, activeMarkets, bundleSelections, storedSelections, choiceBlock, checkoutBlockers, changeImpact, providerStatus, usableCapabilities, needsProviderChoice, competingProviderAddons, } from './model';
|
|
2
|
-
export { moveItem, moveId, dropIndexFromPointer } from './reorder';
|
|
3
|
-
export { ProviderSortableList, sortableOrder, DEFAULT_PROVIDER_LIST_LABELS, } from './provider-sortable-list';
|
|
1
|
+
export { pickText, domainOf, humanizeSegment, servesMarket, resolveCapability, recommendProvider, groupByDomain, activeMarkets, bundleSelections, storedSelections, choiceBlock, checkoutBlockers, changeImpact, providerStatus, usableCapabilities, needsProviderChoice, competingProviderAddons, } from './model.js';
|
|
2
|
+
export { moveItem, moveId, dropIndexFromPointer } from './reorder.js';
|
|
3
|
+
export { ProviderSortableList, sortableOrder, DEFAULT_PROVIDER_LIST_LABELS, } from './provider-sortable-list.js';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* and replace the order of the eligible ones with what is emitted here.
|
|
17
17
|
*/
|
|
18
18
|
import * as React from 'react';
|
|
19
|
-
import type { ProviderStatus } from './model';
|
|
19
|
+
import type { ProviderStatus } from './model.js';
|
|
20
20
|
export interface ProviderSortableItem {
|
|
21
21
|
id: string;
|
|
22
22
|
/**
|
|
@@ -18,7 +18,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
18
18
|
*/
|
|
19
19
|
import * as React from 'react';
|
|
20
20
|
import { useTranslation } from 'react-i18next';
|
|
21
|
-
import { dropIndexFromPointer, moveId } from './reorder';
|
|
21
|
+
import { dropIndexFromPointer, moveId } from './reorder.js';
|
|
22
22
|
/** Spanish defaults, kept as a plain constant for hosts that want to spread/override it. */
|
|
23
23
|
export const DEFAULT_PROVIDER_LIST_LABELS = {
|
|
24
24
|
ready: 'Listo',
|
package/dist/collection-cell.js
CHANGED
|
@@ -9,7 +9,7 @@ import * as React from 'react';
|
|
|
9
9
|
import { Box, List } from 'lucide-react';
|
|
10
10
|
import { Avatar, AvatarFallback, AvatarImage, Badge, Popover, PopoverContent, PopoverTrigger, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, cn, } from '@asteby/metacore-ui';
|
|
11
11
|
import { getInitials, relationChipStyles } from '@asteby/metacore-ui/lib';
|
|
12
|
-
import { humanizeToken } from './dynamic-columns-helpers';
|
|
12
|
+
import { humanizeToken } from './dynamic-columns-helpers.js';
|
|
13
13
|
/**
|
|
14
14
|
* Tracks the host's dark-mode class on <html> so relation chips pick a tint
|
|
15
15
|
* tuned for the active theme. Replicated from dynamic-columns (kept local to
|
package/dist/custom-stages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ApiClient } from './api-context';
|
|
3
|
-
import type { ColumnDefinition, StageMeta, SmartLaneMeta } from './types';
|
|
2
|
+
import type { ApiClient } from './api-context.js';
|
|
3
|
+
import type { ColumnDefinition, StageMeta, SmartLaneMeta } from './types.js';
|
|
4
4
|
export type CustomStageType = 'stage' | 'smart';
|
|
5
5
|
export type CustomStageFilterOp = 'eq' | 'neq' | 'contains' | 'in';
|
|
6
6
|
export interface CustomStageFilter {
|
package/dist/custom-stages.js
CHANGED
|
@@ -25,7 +25,7 @@ import { Plus, Trash2, Pencil, MoreVertical, Filter, Flag, GripVertical, Lock, R
|
|
|
25
25
|
import { toast } from 'sonner';
|
|
26
26
|
import { Badge, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Skeleton, } from '@asteby/metacore-ui/primitives';
|
|
27
27
|
import { generateBadgeStyles, optionColor } from '@asteby/metacore-ui/lib';
|
|
28
|
-
import { useApi } from './api-context';
|
|
28
|
+
import { useApi } from './api-context.js';
|
|
29
29
|
// ~8 preset palette names understood by `generateBadgeStyles`.
|
|
30
30
|
export const CUSTOM_STAGE_COLORS = [
|
|
31
31
|
'slate',
|
package/dist/dashboard-grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { DashboardGridProps, DashboardWidgetGroup, DashboardWidgetSpec } from './dashboard-types';
|
|
2
|
+
import type { DashboardGridProps, DashboardWidgetGroup, DashboardWidgetSpec } from './dashboard-types.js';
|
|
3
3
|
/** Normalizes flat `widgets` + `groups` into an ordered group list. */
|
|
4
4
|
export declare function normalizeGroups(groups?: DashboardWidgetGroup[], widgets?: DashboardWidgetSpec[]): DashboardWidgetGroup[];
|
|
5
5
|
export declare function DashboardGrid({ groups, widgets, loadData, loadTimeoutMs, isAdmin, locale, currency, className, strings, }: DashboardGridProps): React.JSX.Element;
|
package/dist/dashboard-grid.js
CHANGED
|
@@ -8,9 +8,9 @@ import * as React from 'react';
|
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
10
10
|
import { LoadState } from '@asteby/metacore-ui/primitives';
|
|
11
|
-
import { useCan, usePermissionsActive } from './permissions-context';
|
|
12
|
-
import { WidgetRenderer, WidgetSkeleton, isTallWidget } from './widgets/widget-renderer';
|
|
13
|
-
import { DashboardEmptyMockup } from './dashboard-empty-mockup';
|
|
11
|
+
import { useCan, usePermissionsActive } from './permissions-context.js';
|
|
12
|
+
import { WidgetRenderer, WidgetSkeleton, isTallWidget } from './widgets/widget-renderer.js';
|
|
13
|
+
import { DashboardEmptyMockup } from './dashboard-empty-mockup.js';
|
|
14
14
|
const DEFAULT_STRINGS = {
|
|
15
15
|
emptyTitle: 'Your dashboard is taking shape',
|
|
16
16
|
emptyDescription: 'Install an addon with dashboard widgets and your metrics will start living here.',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CreateRecordDialogProps } from './types';
|
|
1
|
+
import type { CreateRecordDialogProps } from './types.js';
|
|
2
2
|
export declare function CreateRecordDialog({ modelKey, open, onOpenChange, recordId, endpoint, schema, defaults, lockedFields, onCreate, onUpdate, onSaved, }: CreateRecordDialogProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=create-record-dialog.d.ts.map
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
* when omitted, the dialog falls back to the configured `useApi()` transport
|
|
14
14
|
* with the default `/dynamic/${modelKey}` endpoint convention.
|
|
15
15
|
*/
|
|
16
|
-
import { DynamicRecordDialog } from './dynamic-record';
|
|
16
|
+
import { DynamicRecordDialog } from './dynamic-record.js';
|
|
17
17
|
export function CreateRecordDialog({ modelKey, open, onOpenChange, recordId, endpoint, schema, defaults, lockedFields, onCreate, onUpdate, onSaved, }) {
|
|
18
18
|
const mode = recordId ? 'edit' : 'create';
|
|
19
19
|
return (_jsx(DynamicRecordDialog, { open: open, onOpenChange: onOpenChange, mode: mode, model: modelKey, recordId: recordId, endpoint: endpoint, schema: schema, defaults: defaults, lockedFields: lockedFields, onCreate: onCreate, onUpdate: onUpdate, onSaved: onSaved }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ModelSchema } from './types';
|
|
2
|
-
import { type ResolvedOption } from '../use-options-resolver';
|
|
3
|
-
import type { VisibleWhen } from '../types';
|
|
4
|
-
import { type ItemField } from '../collection-cell';
|
|
5
|
-
import { type GetImageUrl } from '../image-url-context';
|
|
1
|
+
import type { ModelSchema } from './types.js';
|
|
2
|
+
import { type ResolvedOption } from '../use-options-resolver.js';
|
|
3
|
+
import type { VisibleWhen } from '../types.js';
|
|
4
|
+
import { type ItemField } from '../collection-cell.js';
|
|
5
|
+
import { type GetImageUrl } from '../image-url-context.js';
|
|
6
6
|
export type { GetImageUrl };
|
|
7
7
|
export interface FieldOption {
|
|
8
8
|
value: string;
|
|
@@ -10,7 +10,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
// flows through <ApiProvider> from runtime-react. Host-specific runtime values —
|
|
11
11
|
// the image-url resolver and the org IANA timezone — are passed as props so the
|
|
12
12
|
// SDK stays transport- and host-agnostic.
|
|
13
|
-
import { emitRecordMutation } from '../record-mutation-events';
|
|
13
|
+
import { emitRecordMutation } from '../record-mutation-events.js';
|
|
14
14
|
import { createContext, lazy, Suspense, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
/** Model key of the open create/edit dialog — used to hide "+" on self-FK pickers
|
|
@@ -20,51 +20,51 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Di
|
|
|
20
20
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
21
21
|
import { toast } from 'sonner';
|
|
22
22
|
import { format, parseISO } from 'date-fns';
|
|
23
|
-
import { parseCalendarDate } from '../calendar-date';
|
|
23
|
+
import { parseCalendarDate } from '../calendar-date.js';
|
|
24
24
|
import { es } from 'date-fns/locale';
|
|
25
25
|
import { ExternalLink, Loader2, CalendarIcon, Upload, X as XIcon, ScanLine } from 'lucide-react';
|
|
26
|
-
import { BarcodeScanner } from '../barcode-scanner';
|
|
27
|
-
import { useApi } from '../api-context';
|
|
28
|
-
import { useBranchCreateGate } from '../branch-create-gate';
|
|
29
|
-
import { toastServerError, extractFieldErrors, localizeFieldIssue, localizeFieldErrorMap } from '../server-error';
|
|
30
|
-
import { DynamicSelectField, OptionLead, OptionThumb } from '../dynamic-select-field';
|
|
31
|
-
import { RecordPicker } from '../record-picker';
|
|
32
|
-
import { DynamicMultiSelectField } from '../dynamic-multi-select-field';
|
|
33
|
-
import { UploadField, validateUploadFile } from '../upload-field';
|
|
34
|
-
import { DynamicRelations } from '../dynamic-relations';
|
|
35
|
-
import { AuditInfo, readAuditMeta } from '../audit-info';
|
|
36
|
-
import { useOptionsResolver } from '../use-options-resolver';
|
|
37
|
-
import { getFieldRef, getVisibleWhen, evaluateVisibleWhen, getUploadConfig, ATTRIBUTE_CLASSES_KEY } from '../dynamic-form-schema';
|
|
38
|
-
import { useAttributeClasses } from '../attribute-classes';
|
|
39
|
-
import { groupFieldsBySection } from '../form-layout';
|
|
40
|
-
import { FieldSection, WizardProgress } from '../form-layout-ui';
|
|
41
|
-
import { AssistInterview } from '../assist-interview';
|
|
42
|
-
import { RecordPrefillBar } from '../record-prefill-bar';
|
|
43
|
-
import { FieldCell } from '../field-grid';
|
|
44
|
-
import { isNullableBooleanField, omitUntouchedNullBooleans, usesTriState } from '../nullable-boolean';
|
|
45
|
-
import { NullBooleanMark, TriStateBooleanField } from '../tri-state-boolean';
|
|
46
|
-
import { isNilUuid, normalizeNilUuid } from '../nil-uuid';
|
|
47
|
-
import { normalizeRefFieldsForSubmit, withInlineChildren } from './normalize-submit';
|
|
48
|
-
import { relationMin, splitChildErrors } from './inline-relations';
|
|
49
|
-
import { useInlineRelations } from './use-inline-relations';
|
|
26
|
+
import { BarcodeScanner } from '../barcode-scanner.js';
|
|
27
|
+
import { useApi } from '../api-context.js';
|
|
28
|
+
import { useBranchCreateGate } from '../branch-create-gate.js';
|
|
29
|
+
import { toastServerError, extractFieldErrors, localizeFieldIssue, localizeFieldErrorMap } from '../server-error.js';
|
|
30
|
+
import { DynamicSelectField, OptionLead, OptionThumb } from '../dynamic-select-field.js';
|
|
31
|
+
import { RecordPicker } from '../record-picker.js';
|
|
32
|
+
import { DynamicMultiSelectField } from '../dynamic-multi-select-field.js';
|
|
33
|
+
import { UploadField, validateUploadFile } from '../upload-field.js';
|
|
34
|
+
import { DynamicRelations } from '../dynamic-relations.js';
|
|
35
|
+
import { AuditInfo, readAuditMeta } from '../audit-info.js';
|
|
36
|
+
import { useOptionsResolver } from '../use-options-resolver.js';
|
|
37
|
+
import { getFieldRef, getVisibleWhen, evaluateVisibleWhen, getUploadConfig, ATTRIBUTE_CLASSES_KEY } from '../dynamic-form-schema.js';
|
|
38
|
+
import { useAttributeClasses } from '../attribute-classes.js';
|
|
39
|
+
import { groupFieldsBySection } from '../form-layout.js';
|
|
40
|
+
import { FieldSection, WizardProgress } from '../form-layout-ui.js';
|
|
41
|
+
import { AssistInterview } from '../assist-interview.js';
|
|
42
|
+
import { RecordPrefillBar } from '../record-prefill-bar.js';
|
|
43
|
+
import { FieldCell } from '../field-grid.js';
|
|
44
|
+
import { isNullableBooleanField, omitUntouchedNullBooleans, usesTriState } from '../nullable-boolean.js';
|
|
45
|
+
import { NullBooleanMark, TriStateBooleanField } from '../tri-state-boolean.js';
|
|
46
|
+
import { isNilUuid, normalizeNilUuid } from '../nil-uuid.js';
|
|
47
|
+
import { normalizeRefFieldsForSubmit, withInlineChildren } from './normalize-submit.js';
|
|
48
|
+
import { relationMin, splitChildErrors } from './inline-relations.js';
|
|
49
|
+
import { useInlineRelations } from './use-inline-relations.js';
|
|
50
50
|
// La tabla de filas hijas solo se usa al CREAR un registro cuyo modelo declara `create_inline`: se carga bajo demanda para no
|
|
51
51
|
// engordar el grafo inicial del panel (el shell de Ops tiene un techo de no-regresión).
|
|
52
|
-
const InlineRelationRows = lazy(() => import('./inline-relation-rows').then(m => ({ default: m.InlineRelationRows })));
|
|
53
|
-
import { validateDraftRows } from '../draft-rows';
|
|
54
|
-
import { clearFieldErrorTree, lineItemErrorsFor } from '../field-validation-ui';
|
|
55
|
-
import { validateValues, bagHasErrors, exemptUnchangedRuleIssues } from '../validator';
|
|
56
|
-
import { DynamicIcon, Icon, isLucideIconName } from '../dynamic-icon';
|
|
57
|
-
import { IconPickerField } from '../icon-picker-field';
|
|
58
|
-
import { humanizeToken, localizeFieldLabel } from '../dynamic-columns-helpers';
|
|
59
|
-
import { formatDateCell } from '../dynamic-columns';
|
|
60
|
-
import { ImageStack, OptionBadge, statusColorFor, useIsDarkTheme, } from '../display-value';
|
|
61
|
-
import { MediaValue, RichText } from '../rich-url';
|
|
52
|
+
const InlineRelationRows = lazy(() => import('./inline-relation-rows.js').then(m => ({ default: m.InlineRelationRows })));
|
|
53
|
+
import { validateDraftRows } from '../draft-rows.js';
|
|
54
|
+
import { clearFieldErrorTree, lineItemErrorsFor } from '../field-validation-ui.js';
|
|
55
|
+
import { validateValues, bagHasErrors, exemptUnchangedRuleIssues } from '../validator.js';
|
|
56
|
+
import { DynamicIcon, Icon, isLucideIconName } from '../dynamic-icon.js';
|
|
57
|
+
import { IconPickerField } from '../icon-picker-field.js';
|
|
58
|
+
import { humanizeToken, localizeFieldLabel } from '../dynamic-columns-helpers.js';
|
|
59
|
+
import { formatDateCell } from '../dynamic-columns.js';
|
|
60
|
+
import { ImageStack, OptionBadge, statusColorFor, useIsDarkTheme, } from '../display-value.js';
|
|
61
|
+
import { MediaValue, RichText } from '../rich-url.js';
|
|
62
62
|
import { generateBadgeStyles } from '@asteby/metacore-ui/lib';
|
|
63
|
-
import { CollectionCell } from '../collection-cell';
|
|
64
|
-
import { ImageUrlContext, identityImageUrl } from '../image-url-context';
|
|
65
|
-
import { getFieldWidget, useFieldWidgetRegistryVersion } from '../field-widget-registry';
|
|
66
|
-
import { TimeZoneContext, CurrencyContext, useNumberLocale, useSystemActor } from '../org-runtime-context';
|
|
67
|
-
import { AuthorshipCell, hasSpecialAuthorship, readProvenance } from '../provenance';
|
|
63
|
+
import { CollectionCell } from '../collection-cell.js';
|
|
64
|
+
import { ImageUrlContext, identityImageUrl } from '../image-url-context.js';
|
|
65
|
+
import { getFieldWidget, useFieldWidgetRegistryVersion } from '../field-widget-registry.js';
|
|
66
|
+
import { TimeZoneContext, CurrencyContext, useNumberLocale, useSystemActor } from '../org-runtime-context.js';
|
|
67
|
+
import { AuthorshipCell, hasSpecialAuthorship, readProvenance } from '../provenance.js';
|
|
68
68
|
/**
|
|
69
69
|
* Lowercase, accent-free, hyphenated slug ("Asociaciones Médicas" →
|
|
70
70
|
* "asociaciones-medicas"). Pure — used by `FieldDef.deriveFrom`.
|
package/dist/dialogs/export.d.ts
CHANGED
package/dist/dialogs/export.js
CHANGED
|
@@ -13,10 +13,10 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
13
13
|
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Button, Label, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, } from '@asteby/metacore-ui/primitives';
|
|
16
|
-
import { Progress, RadioGroup, RadioGroupItem } from './_primitives';
|
|
16
|
+
import { Progress, RadioGroup, RadioGroupItem } from './_primitives.js';
|
|
17
17
|
import { toast } from 'sonner';
|
|
18
18
|
import { Download, ChevronDown, Loader2 } from 'lucide-react';
|
|
19
|
-
import { useApi } from '../api-context';
|
|
19
|
+
import { useApi } from '../api-context.js';
|
|
20
20
|
export function ExportDialog({ open, onOpenChange, model, metadata, currentFilters, hasActiveFilters, }) {
|
|
21
21
|
const api = useApi();
|
|
22
22
|
const { t, i18n } = useTranslation();
|
package/dist/dialogs/import.d.ts
CHANGED
package/dist/dialogs/import.js
CHANGED
|
@@ -7,11 +7,11 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
7
7
|
import { useState, useEffect } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Button, Label, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@asteby/metacore-ui/primitives';
|
|
10
|
-
import { Progress } from './_primitives';
|
|
10
|
+
import { Progress } from './_primitives.js';
|
|
11
11
|
import { toast } from 'sonner';
|
|
12
12
|
import { FileDown, Loader2, Check, AlertCircle } from 'lucide-react';
|
|
13
|
-
import { useApi } from '../api-context';
|
|
14
|
-
import { FilePickButton } from '../file-pick-button';
|
|
13
|
+
import { useApi } from '../api-context.js';
|
|
14
|
+
import { FilePickButton } from '../file-pick-button.js';
|
|
15
15
|
function errorColumn(e) {
|
|
16
16
|
return e.column ?? e.field ?? '';
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type DraftRow } from '../draft-rows';
|
|
3
|
-
import { type InlineFieldMeta } from './inline-relations';
|
|
4
|
-
import type { RelationMeta } from '../types';
|
|
2
|
+
import { type DraftRow } from '../draft-rows.js';
|
|
3
|
+
import { type InlineFieldMeta } from './inline-relations.js';
|
|
4
|
+
import type { RelationMeta } from '../types.js';
|
|
5
5
|
export interface InlineRelationRowsProps {
|
|
6
6
|
relation: Pick<RelationMeta, 'name' | 'label' | 'min'>;
|
|
7
7
|
fields: InlineFieldMeta[];
|
|
@@ -7,9 +7,9 @@ import { useEffect, useId, useRef, useState } from 'react';
|
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { Plus, Trash2 } from 'lucide-react';
|
|
9
9
|
import { Button } from '@asteby/metacore-ui/primitives';
|
|
10
|
-
import { localizeFieldLabel } from '../dynamic-columns-helpers';
|
|
11
|
-
import { appendDraftRow, cellErrorKey, makeDraftRow, removeDraftRow, updateDraftCell, } from '../draft-rows';
|
|
12
|
-
import { relationMin } from './inline-relations';
|
|
10
|
+
import { localizeFieldLabel } from '../dynamic-columns-helpers.js';
|
|
11
|
+
import { appendDraftRow, cellErrorKey, makeDraftRow, removeDraftRow, updateDraftCell, } from '../draft-rows.js';
|
|
12
|
+
import { relationMin } from './inline-relations.js';
|
|
13
13
|
const TOUCH = 'min-h-11 min-w-11';
|
|
14
14
|
const CONTROLS = 'input, select, textarea, button[role="combobox"]';
|
|
15
15
|
function blankValues(fields) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type DraftColumn, type DraftRow } from '../draft-rows';
|
|
2
|
-
import { type FieldIssue, type Translate } from '../server-error';
|
|
3
|
-
import type { RelationMeta } from '../types';
|
|
1
|
+
import { type DraftColumn, type DraftRow } from '../draft-rows.js';
|
|
2
|
+
import { type FieldIssue, type Translate } from '../server-error.js';
|
|
3
|
+
import type { RelationMeta } from '../types.js';
|
|
4
4
|
export declare const CHILDREN_KEY = "_children";
|
|
5
5
|
/** ¿Se captura al crear? Solo `create_inline === true` (ausente = no). */
|
|
6
6
|
export declare const isCreateInline: (rel: Pick<RelationMeta, "create_inline">) => boolean;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Puro (sin React): qué relaciones aplican, qué columnas tiene cada fila,
|
|
3
3
|
// cómo viaja `_children` y cómo se reparten los errores 422
|
|
4
4
|
// `_children.<relación>.<i>.<campo>`.
|
|
5
|
-
import { isManagedRelationColumn } from '../dynamic-relation-helpers';
|
|
6
|
-
import { serializeDraftRows, } from '../draft-rows';
|
|
7
|
-
import { localizeFieldIssue } from '../server-error';
|
|
5
|
+
import { isManagedRelationColumn } from '../dynamic-relation-helpers.js';
|
|
6
|
+
import { serializeDraftRows, } from '../draft-rows.js';
|
|
7
|
+
import { localizeFieldIssue } from '../server-error.js';
|
|
8
8
|
export const CHILDREN_KEY = '_children';
|
|
9
9
|
/** ¿Se captura al crear? Solo `create_inline === true` (ausente = no). */
|
|
10
10
|
export const isCreateInline = (rel) => rel.create_inline === true;
|
|
@@ -26,5 +26,5 @@ type RefFieldMeta = Record<string, any>;
|
|
|
26
26
|
* mutate `values`.
|
|
27
27
|
*/
|
|
28
28
|
export declare function normalizeRefFieldsForSubmit(values: Record<string, any>, fields: RefFieldMeta[] | undefined): Record<string, any>;
|
|
29
|
-
export { withInlineChildren } from './inline-relations';
|
|
29
|
+
export { withInlineChildren } from './inline-relations.js';
|
|
30
30
|
//# sourceMappingURL=normalize-submit.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Pure submit-payload normalization for dynamic record forms. Kept in its own
|
|
2
2
|
// module (no React / UI imports) so it is unit-testable in isolation and
|
|
3
3
|
// reusable by any caller that builds a create/update payload.
|
|
4
|
-
import { isNilUuid } from '../nil-uuid';
|
|
5
|
-
import { getFieldRef } from '../dynamic-form-schema';
|
|
4
|
+
import { isNilUuid } from '../nil-uuid.js';
|
|
5
|
+
import { getFieldRef } from '../dynamic-form-schema.js';
|
|
6
6
|
/**
|
|
7
7
|
* Normalize a submit payload so that EMPTY reference fields go to the server as
|
|
8
8
|
* `null` rather than as `""` or the nil UUID ("00000000-…"). A dynamic FK column
|
|
@@ -69,4 +69,4 @@ export function normalizeRefFieldsForSubmit(values, fields) {
|
|
|
69
69
|
}
|
|
70
70
|
// Relaciones hijas capturadas al crear (`create_inline`): `_children` viaja con
|
|
71
71
|
// el padre; sin ellas el cuerpo no cambia. Ver `inline-relations.ts`.
|
|
72
|
-
export { withInlineChildren } from './inline-relations';
|
|
72
|
+
export { withInlineChildren } from './inline-relations.js';
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// `deriveRelationFormFields`, el mecanismo que ya usa `<DynamicRelation>`.
|
|
9
9
|
import { unwrapResponse } from '@asteby/metacore-lib/envelope';
|
|
10
10
|
import { useEffect, useState } from 'react';
|
|
11
|
-
import { useApi } from '../api-context';
|
|
12
|
-
import { deriveRelationFormFields } from '../dynamic-relation-helpers';
|
|
13
|
-
import { deriveInlineRowFields, isCreateInline } from './inline-relations';
|
|
11
|
+
import { useApi } from '../api-context.js';
|
|
12
|
+
import { deriveRelationFormFields } from '../dynamic-relation-helpers.js';
|
|
13
|
+
import { deriveInlineRowFields, isCreateInline } from './inline-relations.js';
|
|
14
14
|
export function useInlineRelations(opts) {
|
|
15
15
|
const api = useApi();
|
|
16
16
|
const { enabled, model } = opts;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ViewRecordDialogProps } from './types';
|
|
1
|
+
import type { ViewRecordDialogProps } from './types.js';
|
|
2
2
|
export declare function ViewRecordDialog({ modelKey, open, onOpenChange, recordId, endpoint, schema, onEdit, onDelete, }: ViewRecordDialogProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=view-record-dialog.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
* supplies `onEdit` / `onDelete`, so the dialog gracefully degrades to a
|
|
10
10
|
* pure viewer when those affordances are not needed.
|
|
11
11
|
*/
|
|
12
|
-
import { DynamicRecordDialog } from './dynamic-record';
|
|
12
|
+
import { DynamicRecordDialog } from './dynamic-record.js';
|
|
13
13
|
export function ViewRecordDialog({ modelKey, open, onOpenChange, recordId, endpoint, schema, onEdit, onDelete, }) {
|
|
14
14
|
return (_jsx(DynamicRecordDialog, { open: open, onOpenChange: onOpenChange, mode: "view", model: modelKey, recordId: recordId, endpoint: endpoint, schema: schema, onEdit: onEdit, onDelete: onDelete }));
|
|
15
15
|
}
|
package/dist/display-value.js
CHANGED
|
@@ -12,7 +12,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { Avatar, AvatarImage, AvatarFallback, Badge } from '@asteby/metacore-ui';
|
|
14
14
|
import { generateBadgeStyles, getInitials, optionColor, } from '@asteby/metacore-ui/lib';
|
|
15
|
-
import { DynamicIcon } from './dynamic-icon';
|
|
15
|
+
import { DynamicIcon } from './dynamic-icon.js';
|
|
16
16
|
/**
|
|
17
17
|
* `true` when the host document is in dark mode. Observes the `<html>` class so
|
|
18
18
|
* badge colors re-derive on theme toggle. SSR/no-DOM safe (starts light).
|
|
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
8
8
|
import { Loader2, MoreHorizontal } from 'lucide-react';
|
|
9
9
|
import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '@asteby/metacore-ui/primitives';
|
|
10
10
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
11
|
-
import { DynamicIcon } from '../dynamic-icon';
|
|
11
|
+
import { DynamicIcon } from '../dynamic-icon.js';
|
|
12
12
|
export function ActionBar({ layout, onAction, className }) {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const [busy, setBusy] = useState(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { formatFieldValue, type FieldFormatOptions } from './format';
|
|
3
|
-
import type { StatusDef } from './types';
|
|
2
|
+
import { formatFieldValue, type FieldFormatOptions } from './format.js';
|
|
3
|
+
import type { StatusDef } from './types.js';
|
|
4
4
|
export interface HeaderBadge {
|
|
5
5
|
id: string;
|
|
6
6
|
label?: string;
|
|
@@ -7,8 +7,8 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import { Check, Copy } from 'lucide-react';
|
|
8
8
|
import { Button } from '@asteby/metacore-ui/primitives';
|
|
9
9
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
10
|
-
import { StatusBadge } from './status-badge';
|
|
11
|
-
import { formatFieldValue } from './format';
|
|
10
|
+
import { StatusBadge } from './status-badge.js';
|
|
11
|
+
import { formatFieldValue } from './format.js';
|
|
12
12
|
export function DocumentHeader({ title, subtitle, subtitleHref, badges, metrics, copyable, actions, leading, renderLink, className, }) {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const [copied, setCopied] = useState(false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type FieldFormatOptions } from './format';
|
|
3
|
-
import { type DocumentPageRegistration } from './registry';
|
|
4
|
-
import type { DocumentContext, DocumentSlotRenderer, ResolvedAction } from './types';
|
|
2
|
+
import { type FieldFormatOptions } from './format.js';
|
|
3
|
+
import { type DocumentPageRegistration } from './registry.js';
|
|
4
|
+
import type { DocumentContext, DocumentSlotRenderer, ResolvedAction } from './types.js';
|
|
5
5
|
export interface DocumentPageProps extends FieldFormatOptions {
|
|
6
6
|
registration: DocumentPageRegistration;
|
|
7
7
|
record: Record<string, unknown>;
|
|
@@ -8,15 +8,15 @@ import { useMemo, useState } from 'react';
|
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@asteby/metacore-ui/primitives';
|
|
10
10
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
11
|
-
import { ActionBar } from './action-bar';
|
|
12
|
-
import { DocumentSecondaryBar } from './secondary-bar';
|
|
13
|
-
import { DocumentHeader } from './document-header';
|
|
14
|
-
import { SmartButtons } from './smart-buttons';
|
|
15
|
-
import { StatusBadge } from './status-badge';
|
|
16
|
-
import { interpolate, readPath, resolveActions, resolveStatus, resolveTitle } from './evaluate';
|
|
17
|
-
import { formatFieldValue } from './format';
|
|
18
|
-
import { findStatusMachine } from './registry';
|
|
19
|
-
import { useDocumentSources } from './use-document-sources';
|
|
11
|
+
import { ActionBar } from './action-bar.js';
|
|
12
|
+
import { DocumentSecondaryBar } from './secondary-bar.js';
|
|
13
|
+
import { DocumentHeader } from './document-header.js';
|
|
14
|
+
import { SmartButtons } from './smart-buttons.js';
|
|
15
|
+
import { StatusBadge } from './status-badge.js';
|
|
16
|
+
import { interpolate, readPath, resolveActions, resolveStatus, resolveTitle } from './evaluate.js';
|
|
17
|
+
import { formatFieldValue } from './format.js';
|
|
18
|
+
import { findStatusMachine } from './registry.js';
|
|
19
|
+
import { useDocumentSources } from './use-document-sources.js';
|
|
20
20
|
export function DocumentPage(props) {
|
|
21
21
|
const { registration, record, onAction, slots, onNavigate, renderLink, leading, defaultTab, className } = props;
|
|
22
22
|
const { spec } = registration;
|
|
@@ -6,8 +6,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { Circle } from 'lucide-react';
|
|
8
8
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
9
|
-
import { DynamicIcon } from '../dynamic-icon';
|
|
10
|
-
import { formatFieldValue } from './format';
|
|
9
|
+
import { DynamicIcon } from '../dynamic-icon.js';
|
|
10
|
+
import { formatFieldValue } from './format.js';
|
|
11
11
|
const TONE_DOT = {
|
|
12
12
|
neutral: 'text-muted-foreground',
|
|
13
13
|
info: 'text-[var(--info,oklch(0.55_0.13_235))]',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DocumentContext, DocumentSpec, Predicate, ResolvedActionLayout, StatusDef, StatusMachine, When } from './types';
|
|
1
|
+
import type { DocumentContext, DocumentSpec, Predicate, ResolvedActionLayout, StatusDef, StatusMachine, When } from './types.js';
|
|
2
2
|
/** Máximo de secundarias visibles; el resto pasa a «Más…» (§5.2 / §6.2). */
|
|
3
3
|
export declare const MAX_VISIBLE_SECONDARY = 3;
|
|
4
4
|
/**
|
package/dist/document/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export { MAX_VISIBLE_SECONDARY, evaluatePredicate, evaluateWhen, interpolate, pruneUnavailableActions, readPath, resolveActions, resolveStatus, resolveTitle, } from './evaluate';
|
|
3
|
-
export { formatFieldValue, type FieldFormatOptions } from './format';
|
|
4
|
-
export { StatusBadge, STATUS_TONE_STYLE, type StatusBadgeProps } from './status-badge';
|
|
5
|
-
export { ActionBar, type ActionBarProps } from './action-bar';
|
|
6
|
-
export { DocumentSecondaryBar, type DocumentSecondaryBarProps, type SecondaryBarItem } from './secondary-bar';
|
|
7
|
-
export { DocumentHeader, type DocumentHeaderProps, type HeaderBadge, type HeaderMetric } from './document-header';
|
|
8
|
-
export { SmartButtons, type SmartButtonItem, type SmartButtonsProps } from './smart-buttons';
|
|
9
|
-
export { DocumentTimeline, type DocumentTimelineProps, type TimelineEntry } from './document-timeline';
|
|
10
|
-
export { CancelWithReason, type CancelPayload, type CancelReason, type CancelWithReasonProps } from './cancel-with-reason';
|
|
11
|
-
export { DocumentPage, type DocumentPageProps } from './document-page';
|
|
12
|
-
export { useDocumentSources, type DocumentSourcesState } from './use-document-sources';
|
|
13
|
-
export { clearDocumentPages, findStatusMachine, getDocumentPage, registerDocumentPage, type DocumentPageRegistration, } from './registry';
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export { MAX_VISIBLE_SECONDARY, evaluatePredicate, evaluateWhen, interpolate, pruneUnavailableActions, readPath, resolveActions, resolveStatus, resolveTitle, } from './evaluate.js';
|
|
3
|
+
export { formatFieldValue, type FieldFormatOptions } from './format.js';
|
|
4
|
+
export { StatusBadge, STATUS_TONE_STYLE, type StatusBadgeProps } from './status-badge.js';
|
|
5
|
+
export { ActionBar, type ActionBarProps } from './action-bar.js';
|
|
6
|
+
export { DocumentSecondaryBar, type DocumentSecondaryBarProps, type SecondaryBarItem } from './secondary-bar.js';
|
|
7
|
+
export { DocumentHeader, type DocumentHeaderProps, type HeaderBadge, type HeaderMetric } from './document-header.js';
|
|
8
|
+
export { SmartButtons, type SmartButtonItem, type SmartButtonsProps } from './smart-buttons.js';
|
|
9
|
+
export { DocumentTimeline, type DocumentTimelineProps, type TimelineEntry } from './document-timeline.js';
|
|
10
|
+
export { CancelWithReason, type CancelPayload, type CancelReason, type CancelWithReasonProps } from './cancel-with-reason.js';
|
|
11
|
+
export { DocumentPage, type DocumentPageProps } from './document-page.js';
|
|
12
|
+
export { useDocumentSources, type DocumentSourcesState } from './use-document-sources.js';
|
|
13
|
+
export { clearDocumentPages, findStatusMachine, getDocumentPage, registerDocumentPage, type DocumentPageRegistration, } from './registry.js';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/document/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export { MAX_VISIBLE_SECONDARY, evaluatePredicate, evaluateWhen, interpolate, pruneUnavailableActions, readPath, resolveActions, resolveStatus, resolveTitle, } from './evaluate';
|
|
3
|
-
export { formatFieldValue } from './format';
|
|
4
|
-
export { StatusBadge, STATUS_TONE_STYLE } from './status-badge';
|
|
5
|
-
export { ActionBar } from './action-bar';
|
|
6
|
-
export { DocumentSecondaryBar } from './secondary-bar';
|
|
7
|
-
export { DocumentHeader } from './document-header';
|
|
8
|
-
export { SmartButtons } from './smart-buttons';
|
|
9
|
-
export { DocumentTimeline } from './document-timeline';
|
|
10
|
-
export { CancelWithReason } from './cancel-with-reason';
|
|
11
|
-
export { DocumentPage } from './document-page';
|
|
12
|
-
export { useDocumentSources } from './use-document-sources';
|
|
13
|
-
export { clearDocumentPages, findStatusMachine, getDocumentPage, registerDocumentPage, } from './registry';
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export { MAX_VISIBLE_SECONDARY, evaluatePredicate, evaluateWhen, interpolate, pruneUnavailableActions, readPath, resolveActions, resolveStatus, resolveTitle, } from './evaluate.js';
|
|
3
|
+
export { formatFieldValue } from './format.js';
|
|
4
|
+
export { StatusBadge, STATUS_TONE_STYLE } from './status-badge.js';
|
|
5
|
+
export { ActionBar } from './action-bar.js';
|
|
6
|
+
export { DocumentSecondaryBar } from './secondary-bar.js';
|
|
7
|
+
export { DocumentHeader } from './document-header.js';
|
|
8
|
+
export { SmartButtons } from './smart-buttons.js';
|
|
9
|
+
export { DocumentTimeline } from './document-timeline.js';
|
|
10
|
+
export { CancelWithReason } from './cancel-with-reason.js';
|
|
11
|
+
export { DocumentPage } from './document-page.js';
|
|
12
|
+
export { useDocumentSources } from './use-document-sources.js';
|
|
13
|
+
export { clearDocumentPages, findStatusMachine, getDocumentPage, registerDocumentPage, } from './registry.js';
|