@asteby/metacore-runtime-react 53.24.0 → 53.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -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 +2 -2
- package/dist/dashboard-grid.d.ts.map +1 -1
- package/dist/dashboard-grid.js +22 -20
- package/dist/dashboard-types.d.ts +6 -0
- package/dist/dashboard-types.d.ts.map +1 -1
- 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 +11 -3
- package/dist/dynamic-columns.d.ts.map +1 -1
- package/dist/dynamic-columns.js +52 -26
- package/dist/dynamic-crud-page.d.ts +2 -2
- package/dist/dynamic-crud-page.d.ts.map +1 -1
- package/dist/dynamic-crud-page.js +22 -19
- 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 +5 -3
- package/dist/dynamic-table.d.ts.map +1 -1
- package/dist/dynamic-table.js +48 -36
- 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 -163
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -147
- 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/model-labels.d.ts +38 -0
- package/dist/model-labels.d.ts.map +1 -0
- package/dist/model-labels.js +35 -0
- 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 +4 -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 +10 -10
- package/src/__tests__/host-api-client.test.tsx +16 -0
- package/src/__tests__/host-api.test.ts +50 -0
- package/src/__tests__/initials-avatar-cell.test.tsx +54 -0
- package/src/__tests__/load-guard.test.tsx +94 -0
- package/src/__tests__/model-labels.test.tsx +31 -0
- package/src/dashboard-grid.tsx +49 -35
- package/src/dashboard-types.ts +6 -0
- package/src/dynamic-columns.tsx +40 -9
- package/src/dynamic-crud-page.tsx +10 -7
- package/src/dynamic-table.tsx +38 -12
- package/src/host-api-client.ts +31 -14
- package/src/host-api.ts +54 -1
- package/src/index.ts +5 -1
- package/src/model-labels.ts +80 -0
- package/src/types.ts +3 -0
- package/src/use-host-api-client.ts +5 -3
package/dist/dynamic-form.js
CHANGED
|
@@ -3,33 +3,33 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// pattern + ActionFieldDef renderer so callers can reuse the form layout
|
|
4
4
|
// outside the full record-edit modal.
|
|
5
5
|
import { useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
6
|
-
import { groupFieldsBySection } from './form-layout';
|
|
7
|
-
import { FieldSection, WizardProgress } from './form-layout-ui';
|
|
8
|
-
import { AssistInterview } from './assist-interview';
|
|
6
|
+
import { groupFieldsBySection } from './form-layout.js';
|
|
7
|
+
import { FieldSection, WizardProgress } from './form-layout-ui.js';
|
|
8
|
+
import { AssistInterview } from './assist-interview.js';
|
|
9
9
|
import { Input, Textarea, Label, Switch, Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@asteby/metacore-ui/primitives';
|
|
10
|
-
import { buildZodSchema, resolveWidget, isLineItemsField, evaluateBalance, applyOptionWhen, getDependsOn, getVisibleWhen, evaluateVisibleWhen, } from './dynamic-form-schema';
|
|
10
|
+
import { buildZodSchema, resolveWidget, isLineItemsField, evaluateBalance, applyOptionWhen, getDependsOn, getVisibleWhen, evaluateVisibleWhen, } from './dynamic-form-schema.js';
|
|
11
11
|
import { ScanLine } from 'lucide-react';
|
|
12
|
-
import { BarcodeScanner } from './barcode-scanner';
|
|
13
|
-
import { getOptionFilter } from './option-filter';
|
|
14
|
-
import { useOptionsResolver } from './use-options-resolver';
|
|
15
|
-
import { DynamicLineItems } from './dynamic-line-items';
|
|
16
|
-
import { DynamicSelectField } from './dynamic-select-field';
|
|
17
|
-
import { DynamicMultiSelectField } from './dynamic-multi-select-field';
|
|
18
|
-
import { DynamicDateField } from './dynamic-date-field';
|
|
19
|
-
import { UploadField } from './upload-field';
|
|
20
|
-
import { IconPickerField } from './icon-picker-field';
|
|
21
|
-
import { ColorPickerField } from './color-picker-field';
|
|
22
|
-
import { getFieldWidget, useFieldWidgetRegistryVersion } from './field-widget-registry';
|
|
23
|
-
import { isBooleanField, isNullableBooleanField, usesTriState } from './nullable-boolean';
|
|
24
|
-
import { TriStateBooleanField } from './tri-state-boolean';
|
|
12
|
+
import { BarcodeScanner } from './barcode-scanner.js';
|
|
13
|
+
import { getOptionFilter } from './option-filter.js';
|
|
14
|
+
import { useOptionsResolver } from './use-options-resolver.js';
|
|
15
|
+
import { DynamicLineItems } from './dynamic-line-items.js';
|
|
16
|
+
import { DynamicSelectField } from './dynamic-select-field.js';
|
|
17
|
+
import { DynamicMultiSelectField } from './dynamic-multi-select-field.js';
|
|
18
|
+
import { DynamicDateField } from './dynamic-date-field.js';
|
|
19
|
+
import { UploadField } from './upload-field.js';
|
|
20
|
+
import { IconPickerField } from './icon-picker-field.js';
|
|
21
|
+
import { ColorPickerField } from './color-picker-field.js';
|
|
22
|
+
import { getFieldWidget, useFieldWidgetRegistryVersion } from './field-widget-registry.js';
|
|
23
|
+
import { isBooleanField, isNullableBooleanField, usesTriState } from './nullable-boolean.js';
|
|
24
|
+
import { TriStateBooleanField } from './tri-state-boolean.js';
|
|
25
25
|
export { buildZodSchema, resolveWidget };
|
|
26
|
-
export { DynamicLineItems } from './dynamic-line-items';
|
|
27
|
-
export { DynamicSelectField } from './dynamic-select-field';
|
|
28
|
-
export { DynamicMultiSelectField } from './dynamic-multi-select-field';
|
|
29
|
-
export { DynamicDateField } from './dynamic-date-field';
|
|
30
|
-
export { UploadField } from './upload-field';
|
|
31
|
-
export { IconPickerField } from './icon-picker-field';
|
|
32
|
-
export { ColorPickerField, DEFAULT_ROLE_COLOR, normalizeHex } from './color-picker-field';
|
|
26
|
+
export { DynamicLineItems } from './dynamic-line-items.js';
|
|
27
|
+
export { DynamicSelectField } from './dynamic-select-field.js';
|
|
28
|
+
export { DynamicMultiSelectField } from './dynamic-multi-select-field.js';
|
|
29
|
+
export { DynamicDateField } from './dynamic-date-field.js';
|
|
30
|
+
export { UploadField } from './upload-field.js';
|
|
31
|
+
export { IconPickerField } from './icon-picker-field.js';
|
|
32
|
+
export { ColorPickerField, DEFAULT_ROLE_COLOR, normalizeHex } from './color-picker-field.js';
|
|
33
33
|
// Valores iniciales del formulario: el registro (edición) gana sobre el default
|
|
34
34
|
// del campo. Se calcula de forma síncrona en el primer render para que ningún
|
|
35
35
|
// widget (p.ej. un Select de Radix) monte con '' y emita un cambio espurio que
|
package/dist/dynamic-icon.js
CHANGED
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import dynamicIconImports from 'lucide-react/dynamicIconImports';
|
|
8
8
|
import { Glyph } from '@asteby/metacore-ui/icons';
|
|
9
|
-
import { resolveIconSpec } from './icon-resolvers';
|
|
9
|
+
import { resolveIconSpec } from './icon-resolvers.js';
|
|
10
10
|
function pascalToKebab(pascal) {
|
|
11
11
|
return pascal
|
|
12
12
|
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
package/dist/dynamic-kanban.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { summarizeFilterValues, translateOptionLabels } from './filter-chips';
|
|
3
|
-
import type { RowActionPredicate } from './dynamic-columns-shim';
|
|
4
|
-
import type { TableMetadata, ColumnDefinition, StageMeta, StageTransition } from './types';
|
|
2
|
+
import { summarizeFilterValues, translateOptionLabels } from './filter-chips.js';
|
|
3
|
+
import type { RowActionPredicate } from './dynamic-columns-shim.js';
|
|
4
|
+
import type { TableMetadata, ColumnDefinition, StageMeta, StageTransition } from './types.js';
|
|
5
5
|
export { summarizeFilterValues, translateOptionLabels };
|
|
6
6
|
/**
|
|
7
7
|
* Resolves the board lanes for a kanban view. Prefers the model-level
|
package/dist/dynamic-kanban.js
CHANGED
|
@@ -25,12 +25,12 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
25
25
|
// Transitions: when the metadata carries `transitions[]`, a card may only be
|
|
26
26
|
// dropped into a lane reachable from its current stage. Disallowed lanes dim
|
|
27
27
|
// while dragging and reject the drop.
|
|
28
|
-
import { BOOLEAN_UNSET_FILTER_VALUE } from './nullable-boolean';
|
|
28
|
+
import { BOOLEAN_UNSET_FILTER_VALUE } from './nullable-boolean.js';
|
|
29
29
|
import { useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
|
|
30
30
|
import { useTranslation } from 'react-i18next';
|
|
31
|
-
import { useTimeZone, useCurrency, useNumberLocale } from './org-runtime-context';
|
|
31
|
+
import { useTimeZone, useCurrency, useNumberLocale } from './org-runtime-context.js';
|
|
32
32
|
import { QueryClient, QueryClientContext, QueryClientProvider, useQueryClient, } from '@tanstack/react-query';
|
|
33
|
-
import { useI18nResourceVersion } from './use-i18n-resource-version';
|
|
33
|
+
import { useI18nResourceVersion } from './use-i18n-resource-version.js';
|
|
34
34
|
import { DndContext, KeyboardSensor, PointerSensor, closestCenter, defaultDropAnimationSideEffects, pointerWithin, rectIntersection, useSensor, useSensors, useDraggable, useDroppable, } from '@dnd-kit/core';
|
|
35
35
|
import { SortableContext, horizontalListSortingStrategy, sortableKeyboardCoordinates, useSortable, } from '@dnd-kit/sortable';
|
|
36
36
|
import { CSS } from '@dnd-kit/utilities';
|
|
@@ -47,28 +47,28 @@ import { Badge, Button, Card, CardContent, Input, Popover, PopoverContent, Popov
|
|
|
47
47
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@asteby/metacore-ui';
|
|
48
48
|
import { ColumnFilterControl, FilterValueCombobox } from '@asteby/metacore-ui/data-table';
|
|
49
49
|
import { generateBadgeStyles, optionColor } from '@asteby/metacore-ui/lib';
|
|
50
|
-
import { useApi } from './api-context';
|
|
51
|
-
import { useRealtimeDefault, useRealtimeTick } from './realtime-context';
|
|
52
|
-
import { useStageAutomations, StageAutomationsButton, } from './stage-automations';
|
|
53
|
-
import { useCustomStages, splitCustomStages, mergeLaneStages, resolveSmartLanes, cardMatchesStageFilters, smartLaneParams, AddStageColumn, CustomStageDialog, CustomStageDeleteDialog, StageConfigDialog, SmartLane, } from './custom-stages';
|
|
54
|
-
import { useStageOverrides } from './stage-overrides';
|
|
55
|
-
import { useDynamicFilters } from './use-dynamic-filters';
|
|
56
|
-
import { FilterChipsRow, summarizeFilterValues, translateOptionLabels, } from './filter-chips';
|
|
57
|
-
import { dedupeById, useInfiniteScrollSentinel } from './use-infinite-scroll';
|
|
58
|
-
import { useOptimisticMutation } from './use-optimistic-mutation';
|
|
59
|
-
import { useFlipAnimation } from './use-flip-animation';
|
|
60
|
-
import { PortalDragOverlay } from './portal-drag-overlay';
|
|
61
|
-
import { objectLabel } from './dynamic-relation-helpers';
|
|
62
|
-
import { useMetadataCache } from './metadata-cache';
|
|
63
|
-
import { cacheScope } from './cache-scope';
|
|
64
|
-
import { useRecordMutationTick } from './use-record-mutation-tick';
|
|
65
|
-
import { useOptionsResolver } from './use-options-resolver';
|
|
66
|
-
import { ActivityValueRenderer } from './activity-value-renderer';
|
|
67
|
-
import { isColumnVisibleInTable } from './column-visibility';
|
|
68
|
-
import { aggregateOf, formatAggregateTotal, isRowActionVisible, lifecycleStageField, relationKeyFor, RowActionMenuItem, } from './dynamic-columns';
|
|
69
|
-
import { useCan, usePermissionsActive, useRoleGate, resolveRowActions } from './permissions-context';
|
|
70
|
-
import { useDynamicRowActions } from './dynamic-row-actions';
|
|
71
|
-
import { useStageLayout } from './stage-layout';
|
|
50
|
+
import { useApi } from './api-context.js';
|
|
51
|
+
import { useRealtimeDefault, useRealtimeTick } from './realtime-context.js';
|
|
52
|
+
import { useStageAutomations, StageAutomationsButton, } from './stage-automations.js';
|
|
53
|
+
import { useCustomStages, splitCustomStages, mergeLaneStages, resolveSmartLanes, cardMatchesStageFilters, smartLaneParams, AddStageColumn, CustomStageDialog, CustomStageDeleteDialog, StageConfigDialog, SmartLane, } from './custom-stages.js';
|
|
54
|
+
import { useStageOverrides } from './stage-overrides.js';
|
|
55
|
+
import { useDynamicFilters } from './use-dynamic-filters.js';
|
|
56
|
+
import { FilterChipsRow, summarizeFilterValues, translateOptionLabels, } from './filter-chips.js';
|
|
57
|
+
import { dedupeById, useInfiniteScrollSentinel } from './use-infinite-scroll.js';
|
|
58
|
+
import { useOptimisticMutation } from './use-optimistic-mutation.js';
|
|
59
|
+
import { useFlipAnimation } from './use-flip-animation.js';
|
|
60
|
+
import { PortalDragOverlay } from './portal-drag-overlay.js';
|
|
61
|
+
import { objectLabel } from './dynamic-relation-helpers.js';
|
|
62
|
+
import { useMetadataCache } from './metadata-cache.js';
|
|
63
|
+
import { cacheScope } from './cache-scope.js';
|
|
64
|
+
import { useRecordMutationTick } from './use-record-mutation-tick.js';
|
|
65
|
+
import { useOptionsResolver } from './use-options-resolver.js';
|
|
66
|
+
import { ActivityValueRenderer } from './activity-value-renderer.js';
|
|
67
|
+
import { isColumnVisibleInTable } from './column-visibility.js';
|
|
68
|
+
import { aggregateOf, formatAggregateTotal, isRowActionVisible, lifecycleStageField, relationKeyFor, RowActionMenuItem, } from './dynamic-columns.js';
|
|
69
|
+
import { useCan, usePermissionsActive, useRoleGate, resolveRowActions } from './permissions-context.js';
|
|
70
|
+
import { useDynamicRowActions } from './dynamic-row-actions.js';
|
|
71
|
+
import { useStageLayout } from './stage-layout.js';
|
|
72
72
|
// Re-exported for tests + backward-compat: these live in ./filter-chips now
|
|
73
73
|
// (shared with DynamicTable) but were historically imported from here.
|
|
74
74
|
export { summarizeFilterValues, translateOptionLabels };
|
|
@@ -11,12 +11,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
import { Input, Textarea, Switch, Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@asteby/metacore-ui/primitives';
|
|
12
12
|
import { useEffect, useRef, useState } from 'react';
|
|
13
13
|
import { Plus, Trash2, Check } from 'lucide-react';
|
|
14
|
-
import { usesTriState } from './nullable-boolean';
|
|
15
|
-
import { TriStateBooleanField } from './tri-state-boolean';
|
|
16
|
-
import { resolveWidget, getItemFields, computeLineItemTotals, applyLineItemRowFormulas, autofillLineFromOption, evaluateBalance, toNumber, getDependsOn, resolveDependsValue, getOptionsConfig, resolveOptionsSource, applyOptionWhen, } from './dynamic-form-schema';
|
|
17
|
-
import { DynamicSelectField, DEFAULT_DEPENDS_HINT } from './dynamic-select-field';
|
|
18
|
-
import { getOptionFilter } from './option-filter';
|
|
19
|
-
import { useOptionsResolver } from './use-options-resolver';
|
|
14
|
+
import { usesTriState } from './nullable-boolean.js';
|
|
15
|
+
import { TriStateBooleanField } from './tri-state-boolean.js';
|
|
16
|
+
import { resolveWidget, getItemFields, computeLineItemTotals, applyLineItemRowFormulas, autofillLineFromOption, evaluateBalance, toNumber, getDependsOn, resolveDependsValue, getOptionsConfig, resolveOptionsSource, applyOptionWhen, } from './dynamic-form-schema.js';
|
|
17
|
+
import { DynamicSelectField, DEFAULT_DEPENDS_HINT } from './dynamic-select-field.js';
|
|
18
|
+
import { getOptionFilter } from './option-filter.js';
|
|
19
|
+
import { useOptionsResolver } from './use-options-resolver.js';
|
|
20
20
|
const fmtNumber = (n) => n.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
21
21
|
/** Numeric columns render right-aligned (debit/credit/amount feel). */
|
|
22
22
|
function isNumericCol(col) {
|
|
@@ -23,13 +23,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
// with ONE `?ids=` lookup (useResolveOptionIds): a chip reads "Cargando…" while
|
|
24
24
|
// it resolves and "(registro eliminado)" when the record is gone — never the id.
|
|
25
25
|
import { useMemo, useState } from 'react';
|
|
26
|
-
import { getOptionFilter } from './option-filter';
|
|
27
|
-
import { RecordPicker } from './record-picker';
|
|
28
|
-
import { OptionLead } from './record-picker-option';
|
|
29
|
-
import { useOptionsResolver } from './use-options-resolver';
|
|
30
|
-
import { useResolveOptionIds } from './use-option-ids';
|
|
31
|
-
import { DELETED_RECORD_LABEL } from './dynamic-select-field';
|
|
32
|
-
import { getFieldRef } from './dynamic-form-schema';
|
|
26
|
+
import { getOptionFilter } from './option-filter.js';
|
|
27
|
+
import { RecordPicker } from './record-picker.js';
|
|
28
|
+
import { OptionLead } from './record-picker-option.js';
|
|
29
|
+
import { useOptionsResolver } from './use-options-resolver.js';
|
|
30
|
+
import { useResolveOptionIds } from './use-option-ids.js';
|
|
31
|
+
import { DELETED_RECORD_LABEL } from './dynamic-select-field.js';
|
|
32
|
+
import { getFieldRef } from './dynamic-form-schema.js';
|
|
33
33
|
export function DynamicMultiSelectField({ field, value, onChange, staticOptions }) {
|
|
34
34
|
const ref = getFieldRef(field);
|
|
35
35
|
const [query, setQuery] = useState('');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionFieldDef, ColumnDefinition, TableMetadata } from './types';
|
|
1
|
+
import type { ActionFieldDef, ColumnDefinition, TableMetadata } from './types.js';
|
|
2
2
|
export type DynamicRelationKind = 'one_to_many' | 'many_to_many';
|
|
3
3
|
export declare function isManagedRelationColumn(key: string): boolean;
|
|
4
4
|
export declare function relationMediaKind(col: ColumnDefinition): 'image' | 'file' | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isNilUuid } from './nil-uuid';
|
|
2
|
-
import { humanizeToken } from './dynamic-columns-helpers';
|
|
1
|
+
import { isNilUuid } from './nil-uuid.js';
|
|
2
|
+
import { humanizeToken } from './dynamic-columns-helpers.js';
|
|
3
3
|
// An enum-like column renders a single token value (status/select/option/badge)
|
|
4
4
|
// rather than free text, so an unmatched value should be humanized, not leaked.
|
|
5
5
|
function isEnumLikeColumn(col) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { DynamicRelationKind } from './dynamic-relation-helpers';
|
|
2
|
-
export { buildCreatePayload, buildPivotAttachPayload, buildPivotRowIndex, buildRelationFilterParams, deriveRelationFormFields, diffSelection, extractSelectedTargetIds, formatRelationCell, objectLabel, pickOptionLabel, relationRowKey, } from './dynamic-relation-helpers';
|
|
1
|
+
export type { DynamicRelationKind } from './dynamic-relation-helpers.js';
|
|
2
|
+
export { buildCreatePayload, buildPivotAttachPayload, buildPivotRowIndex, buildRelationFilterParams, deriveRelationFormFields, diffSelection, extractSelectedTargetIds, formatRelationCell, objectLabel, pickOptionLabel, relationRowKey, } from './dynamic-relation-helpers.js';
|
|
3
3
|
export interface DynamicRelationStrings {
|
|
4
4
|
title: string;
|
|
5
5
|
emptyState: string;
|
package/dist/dynamic-relation.js
CHANGED
|
@@ -10,22 +10,22 @@ import { flexRender, getCoreRowModel, useReactTable, } from '@tanstack/react-tab
|
|
|
10
10
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
11
11
|
import { Button, Skeleton, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, Dialog, DialogContent, DialogHeader, DialogTitle, Input, MultiSelect, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@asteby/metacore-ui/primitives';
|
|
12
12
|
import { Plus, Trash2, Pencil, Search } from 'lucide-react';
|
|
13
|
-
import { useApi } from './api-context';
|
|
14
|
-
import { useMetadataCache } from './metadata-cache';
|
|
15
|
-
import { cacheScope } from './cache-scope';
|
|
16
|
-
import { OptionsContext } from './options-context';
|
|
17
|
-
import { DynamicForm } from './dynamic-form';
|
|
18
|
-
import { useImageUrl } from './image-url-context';
|
|
19
|
-
import { useTimeZone, useCurrency } from './org-runtime-context';
|
|
20
|
-
import { makeDefaultGetDynamicColumns } from './dynamic-columns';
|
|
21
|
-
import { isColumnVisibleInLineSubtable } from './column-visibility';
|
|
22
|
-
import { useOptionsResolver } from './use-options-resolver';
|
|
23
|
-
import { dedupeById, useInfiniteScrollSentinel } from './use-infinite-scroll';
|
|
13
|
+
import { useApi } from './api-context.js';
|
|
14
|
+
import { useMetadataCache } from './metadata-cache.js';
|
|
15
|
+
import { cacheScope } from './cache-scope.js';
|
|
16
|
+
import { OptionsContext } from './options-context.js';
|
|
17
|
+
import { DynamicForm } from './dynamic-form.js';
|
|
18
|
+
import { useImageUrl } from './image-url-context.js';
|
|
19
|
+
import { useTimeZone, useCurrency } from './org-runtime-context.js';
|
|
20
|
+
import { makeDefaultGetDynamicColumns } from './dynamic-columns.js';
|
|
21
|
+
import { isColumnVisibleInLineSubtable } from './column-visibility.js';
|
|
22
|
+
import { useOptionsResolver } from './use-options-resolver.js';
|
|
23
|
+
import { dedupeById, useInfiniteScrollSentinel } from './use-infinite-scroll.js';
|
|
24
24
|
import { toast } from 'sonner';
|
|
25
|
-
import { RelationGallery } from './relation-gallery';
|
|
26
|
-
import { extractUploadedValue, readImageSize } from './upload-field';
|
|
27
|
-
import { buildCreatePayload, buildPivotAttachPayload, buildPivotRowIndex, buildRelationFilterParams, deriveRelationFormFields, diffSelection, extractSelectedTargetIds, pickOptionLabel, relationColumnUi, relationDerivedValues, galleryLeadImage, contiguousPositionUpdates, relationGalleryColumn, relationInitialValues, relationPositionKey, relationPositionSortable, relationRowKey, sortRelationRows, } from './dynamic-relation-helpers';
|
|
28
|
-
export { buildCreatePayload, buildPivotAttachPayload, buildPivotRowIndex, buildRelationFilterParams, deriveRelationFormFields, diffSelection, extractSelectedTargetIds, formatRelationCell, objectLabel, pickOptionLabel, relationRowKey, } from './dynamic-relation-helpers';
|
|
25
|
+
import { RelationGallery } from './relation-gallery.js';
|
|
26
|
+
import { extractUploadedValue, readImageSize } from './upload-field.js';
|
|
27
|
+
import { buildCreatePayload, buildPivotAttachPayload, buildPivotRowIndex, buildRelationFilterParams, deriveRelationFormFields, diffSelection, extractSelectedTargetIds, pickOptionLabel, relationColumnUi, relationDerivedValues, galleryLeadImage, contiguousPositionUpdates, relationGalleryColumn, relationInitialValues, relationPositionKey, relationPositionSortable, relationRowKey, sortRelationRows, } from './dynamic-relation-helpers.js';
|
|
28
|
+
export { buildCreatePayload, buildPivotAttachPayload, buildPivotRowIndex, buildRelationFilterParams, deriveRelationFormFields, diffSelection, extractSelectedTargetIds, formatRelationCell, objectLabel, pickOptionLabel, relationRowKey, } from './dynamic-relation-helpers.js';
|
|
29
29
|
const DEFAULT_STRINGS = {
|
|
30
30
|
title: '',
|
|
31
31
|
emptyState: 'No hay registros relacionados.',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type DynamicRelationStrings } from './dynamic-relation';
|
|
2
|
-
import type { RelationMeta } from './types';
|
|
1
|
+
import { type DynamicRelationStrings } from './dynamic-relation.js';
|
|
2
|
+
import type { RelationMeta } from './types.js';
|
|
3
3
|
export interface DynamicRelationsProps {
|
|
4
4
|
/**
|
|
5
5
|
* The parent record. Its `id` (or `parentIdKey`) seeds every child list's
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
// is scoped by the FK AND every scope column.
|
|
14
14
|
import { useMemo } from 'react';
|
|
15
15
|
import { cn } from '@asteby/metacore-ui/lib';
|
|
16
|
-
import { DynamicRelation } from './dynamic-relation';
|
|
16
|
+
import { DynamicRelation } from './dynamic-relation.js';
|
|
17
17
|
/**
|
|
18
18
|
* Normalizes the parent id off the record, tolerating a custom `parentIdKey`.
|
|
19
19
|
* Returns `undefined` when unusable so callers can guard rendering.
|
|
@@ -25,11 +25,11 @@ import { useNavigate } from '@tanstack/react-router';
|
|
|
25
25
|
import { useTranslation } from 'react-i18next';
|
|
26
26
|
import { toast } from 'sonner';
|
|
27
27
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '@asteby/metacore-ui/primitives';
|
|
28
|
-
import { useApi } from './api-context';
|
|
29
|
-
import { useReasonPrompt } from './reason-prompt';
|
|
30
|
-
import { ActionModalDispatcher } from './action-modal-dispatcher';
|
|
31
|
-
import { DynamicRecordDialog } from './dialogs/dynamic-record';
|
|
32
|
-
import { RequiresAddonDialog, resolveRequiresAddon } from './requires-addon';
|
|
28
|
+
import { useApi } from './api-context.js';
|
|
29
|
+
import { useReasonPrompt } from './reason-prompt.js';
|
|
30
|
+
import { ActionModalDispatcher } from './action-modal-dispatcher.js';
|
|
31
|
+
import { DynamicRecordDialog } from './dialogs/dynamic-record.js';
|
|
32
|
+
import { RequiresAddonDialog, resolveRequiresAddon } from './requires-addon.js';
|
|
33
33
|
/**
|
|
34
34
|
* Destino de una acción link. La query (`?create=…&from_id=…`) va como `search`:
|
|
35
35
|
* metida en `to` el router la tomaba como parte del path y la ruta no casaba.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ResolvedOption } from './use-options-resolver';
|
|
2
|
-
import type { ActionFieldDef } from './types';
|
|
3
|
-
export { OptionLead, OptionThumb } from './record-picker-option';
|
|
1
|
+
import { type ResolvedOption } from './use-options-resolver.js';
|
|
2
|
+
import type { ActionFieldDef } from './types.js';
|
|
3
|
+
export { OptionLead, OptionThumb } from './record-picker-option.js';
|
|
4
4
|
/**
|
|
5
5
|
* Default hint shown when a cascading picker's depended-on field is still
|
|
6
6
|
* empty. Domain-neutral on purpose; a caller may override it per field via
|
|
@@ -25,20 +25,20 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
25
25
|
// the same ref on screen). While it resolves the trigger reads "Cargando…",
|
|
26
26
|
// never the raw id; an id that no longer exists reads "(registro eliminado)".
|
|
27
27
|
import { useEffect, useRef, useState } from 'react';
|
|
28
|
-
import { getOptionFilter } from './option-filter';
|
|
28
|
+
import { getOptionFilter } from './option-filter.js';
|
|
29
29
|
import { useTranslation } from 'react-i18next';
|
|
30
30
|
import { Badge, Button } from '@asteby/metacore-ui/primitives';
|
|
31
31
|
import { Check, ScanLine } from 'lucide-react';
|
|
32
|
-
import { BarcodeScanner } from './barcode-scanner';
|
|
33
|
-
import { RecordPicker } from './record-picker';
|
|
34
|
-
import { OptionLead } from './record-picker-option';
|
|
35
|
-
import { OptionDisplayRow, OptionDisplayValue, getOptionDisplay, hasOptionDisplays } from './option-display';
|
|
36
|
-
import { recordLabel, requestRecordCreate, requestRecordEdit, withSearchPrefill } from './record-picker-actions';
|
|
37
|
-
import { useOptionsResolver } from './use-options-resolver';
|
|
38
|
-
import { useResolveOptionIds } from './use-option-ids';
|
|
39
|
-
import { useDebouncedValue } from './use-debounced-value';
|
|
40
|
-
import { getDependsOn, getFieldRef, resolveOptionsSource } from './dynamic-form-schema';
|
|
41
|
-
export { OptionLead, OptionThumb } from './record-picker-option';
|
|
32
|
+
import { BarcodeScanner } from './barcode-scanner.js';
|
|
33
|
+
import { RecordPicker } from './record-picker.js';
|
|
34
|
+
import { OptionLead } from './record-picker-option.js';
|
|
35
|
+
import { OptionDisplayRow, OptionDisplayValue, getOptionDisplay, hasOptionDisplays } from './option-display.js';
|
|
36
|
+
import { recordLabel, requestRecordCreate, requestRecordEdit, withSearchPrefill } from './record-picker-actions.js';
|
|
37
|
+
import { useOptionsResolver } from './use-options-resolver.js';
|
|
38
|
+
import { useResolveOptionIds } from './use-option-ids.js';
|
|
39
|
+
import { useDebouncedValue } from './use-debounced-value.js';
|
|
40
|
+
import { getDependsOn, getFieldRef, resolveOptionsSource } from './dynamic-form-schema.js';
|
|
41
|
+
export { OptionLead, OptionThumb } from './record-picker-option.js';
|
|
42
42
|
/**
|
|
43
43
|
* Default hint shown when a cascading picker's depended-on field is still
|
|
44
44
|
* empty. Domain-neutral on purpose; a caller may override it per field via
|
package/dist/dynamic-table.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type ColumnDef } from '@tanstack/react-table';
|
|
3
|
-
import type { GetDynamicColumns, RowActionPredicate } from './dynamic-columns-shim';
|
|
4
|
-
import type { ActionDefinition } from './types';
|
|
3
|
+
import type { GetDynamicColumns, RowActionPredicate } from './dynamic-columns-shim.js';
|
|
4
|
+
import type { ActionDefinition } from './types.js';
|
|
5
5
|
/** Drops every persisted first-page row set (all scopes). */
|
|
6
6
|
export declare function clearTableDataCache(): void;
|
|
7
7
|
export interface DynamicTableProps {
|
|
@@ -106,6 +106,8 @@ export interface DynamicTableProps {
|
|
|
106
106
|
* mode exactly as before.
|
|
107
107
|
*/
|
|
108
108
|
infiniteScroll?: boolean;
|
|
109
|
+
/** Max ms a metadata/list request may stay loading before an error + retry replaces the skeleton. Default 15000; 0 disables. */
|
|
110
|
+
loadTimeoutMs?: number;
|
|
109
111
|
/**
|
|
110
112
|
* Row virtualization. When the visible row model has at least N rows,
|
|
111
113
|
* only viewport rows are mounted (helps infinite scroll and large page
|
|
@@ -163,5 +165,5 @@ export interface BulkDeleteResult {
|
|
|
163
165
|
status?: number;
|
|
164
166
|
}>;
|
|
165
167
|
}
|
|
166
|
-
export declare function DynamicTable({ model, endpoint, mutationEndpoint, enableUrlSync, defaultSort, hideImport, hideExport, hiddenColumns, allowedActionKeys, onAction, onRowClick, isRowActionVisible: rowActionPredicate, refreshTrigger, defaultFilters, extraColumns, getDynamicColumns, timeZone: timeZoneProp, currency: currencyProp, pagination: paginationMode, infiniteScroll: infiniteScrollProp, virtualizeRows, extraBulkActions, hideBulkDelete, onBulkDeleteResult, emptyState, }: DynamicTableProps): import("react").JSX.Element;
|
|
168
|
+
export declare function DynamicTable({ model, endpoint, mutationEndpoint, enableUrlSync, defaultSort, hideImport, hideExport, hiddenColumns, allowedActionKeys, onAction, onRowClick, isRowActionVisible: rowActionPredicate, refreshTrigger, defaultFilters, extraColumns, getDynamicColumns, timeZone: timeZoneProp, currency: currencyProp, pagination: paginationMode, infiniteScroll: infiniteScrollProp, loadTimeoutMs, virtualizeRows, extraBulkActions, hideBulkDelete, onBulkDeleteResult, emptyState, }: DynamicTableProps): import("react").JSX.Element;
|
|
167
169
|
//# sourceMappingURL=dynamic-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-table.d.ts","sourceRoot":"","sources":["../src/dynamic-table.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAM1G,OAAO,EAKH,KAAK,SAAS,EAajB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"dynamic-table.d.ts","sourceRoot":"","sources":["../src/dynamic-table.tsx"],"names":[],"mappings":"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"}
|