@nexia/sdk 0.6.5 → 0.7.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.
@@ -3,7 +3,7 @@ export type DataMigrationRunStatus = 'processing' | 'completed' | 'completed_wit
3
3
  /** Host-owned asynchronous operation returned by migration analysis/apply APIs. */
4
4
  export interface DataMigrationBackgroundOperation<TResult = Readonly<Record<string, unknown>>> {
5
5
  ticket: string;
6
- status: 'processing' | 'completed' | 'failed' | 'unknown';
6
+ status: 'processing' | 'completed' | 'failed' | 'cancelled' | 'unknown';
7
7
  result?: TResult;
8
8
  errors?: string[];
9
9
  validation_errors?: Record<string, string[]>;
@@ -19,6 +19,8 @@ export interface DataMigrationOperationAccepted {
19
19
  export interface DataMigrationOperationWaitOptions {
20
20
  statusUrl?: string;
21
21
  signal?: AbortSignal;
22
+ /** Keep an already submitted operation observable across route unmounts. */
23
+ continueInBackground?: boolean;
22
24
  onProgress?: (progress: number, phase: string | null) => void;
23
25
  }
24
26
  export interface DataMigrationBackgroundOperationClient {
@@ -62,10 +64,25 @@ export declare function dataMigrationRunPublicId(result: unknown): string | null
62
64
  export interface DataMigrationStageCompletion {
63
65
  runPublicId: string;
64
66
  }
67
+ /** Transient progress from an App-owned migration stage to the host choice list. */
68
+ export interface DataMigrationStageActivityUpdate {
69
+ attemptId: string;
70
+ phase: 'analyzing' | 'review_ready' | 'importing' | 'attention' | 'cancelled' | 'completed';
71
+ ticket?: string | null;
72
+ }
65
73
  /** App-owned stage rendered inside the host-owned data migration workspace. */
66
74
  export interface DataMigrationStageProps {
67
75
  providerKey: string;
76
+ /** Host-selected draft identity; a new value starts a separate file upload. */
77
+ draftKey?: string;
78
+ /** Actor-owned server operation selected by the host when reopening a stage. */
79
+ resumeOperation?: {
80
+ ticket: string;
81
+ kind: 'review' | 'import';
82
+ attemptId?: string;
83
+ };
68
84
  onCompleted: (completion: DataMigrationStageCompletion) => void;
85
+ onActivityChange?: (activity: DataMigrationStageActivityUpdate) => void;
69
86
  }
70
87
  export type DataMigrationStageLoader = () => Promise<{
71
88
  default: ComponentType<DataMigrationStageProps>;
@@ -103,6 +120,17 @@ export interface DataMigrationStageRegistration {
103
120
  requiredPermissions?: readonly string[];
104
121
  permissionMode?: 'all' | 'any';
105
122
  prerequisiteStageIds?: readonly string[];
123
+ /** Ordered schema column keys shown in the host's saved-result table. */
124
+ resultColumnKeys?: readonly string[];
125
+ /** Provider-specific file preparation instructions, owned by the registering App. */
126
+ fileGuideSteps?: readonly {
127
+ titleKey: string;
128
+ sections?: readonly {
129
+ titleKey: string;
130
+ descriptionKey: string;
131
+ }[];
132
+ noteKey?: string;
133
+ }[];
106
134
  loader: DataMigrationStageLoader;
107
135
  }
108
136
  /** App-facing capability. Inspection and composition remain host-owned. */
package/dist/host.d.ts CHANGED
@@ -5,21 +5,21 @@ import type { ApprovalBusinessFormRegistrar, ApprovalBusinessFormRegistry } from
5
5
  import type { ContextQueryResult, PermissionsQueryResult } from './context';
6
6
  import type { DataMigrationBackgroundOperationClient, DataMigrationRegistrar, DataMigrationRegistry } from './data-migration';
7
7
  import type { ProcessUserTaskFormRegistrar, ProcessUserTaskFormRegistry } from './process';
8
- import type { AppRouteFrameProps, AutoRegisterPackageSurfacesOptions, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, MessageApi, MutationFormError, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserProps, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxDropdownMenuProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxOverviewBandProps, InsightFilterControls, UseInsightFilterStateOptions, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxPageFrameProps, NxPaginationProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxSearchFieldProps, NxSectionCardProps, NxSectionStackProps, NxResponsiveRegionProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, OpenResourceWorkTab, ResourceCreateCompletion, ResourceCreateReceiverRegistration, ResourceInspectorAdapterRegistry, ResourceInspectorAdapterRegistrar, ResourceInspectorPanelProps, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListParams, ResourceListParamsControls, ResourceListToolbarMoreMenuProps, ResourcePrimaryCellProps, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableProps, ResourceTableSort, ResourceTextCellProps, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, TabContextActionRegistration, ToastOptions, WorkSectionProps, FavoriteTarget, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps } from './shell';
8
+ import type { AppRouteFrameProps, AutoRegisterPackageSurfacesOptions, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, MessageApi, MutationFormError, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserProps, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxDropdownMenuProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxOverviewBandProps, InsightFilterControls, UseInsightFilterStateOptions, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxPageFrameProps, NxPaginationProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxSearchFieldProps, NxSectionCardProps, SectionRowProps, NxSectionStackProps, NxResponsiveRegionProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxSwitchProps, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, OpenResourceWorkTab, ResourceCreateCompletion, ResourceCreateReceiverRegistration, ResourceInspectorAdapterRegistry, ResourceInspectorAdapterRegistrar, ResourceInspectorPanelProps, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListParams, ResourceListParamsControls, ResourceListToolbarMoreMenuProps, ResourcePrimaryCellProps, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableProps, ResourceTableSort, ResourceTextCellProps, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, TabContextActionRegistration, RegisterDraftActionOptions, ToastOptions, WorkSectionProps, FavoriteTarget, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps } from './shell';
9
9
  import type { AgentComponentRenderer, AttachmentDeleteResult, AttachmentQueryResult, AttachmentUploadOptions, AttachmentUploadResult, ApprovalRoutePoliciesQueryResult, ApprovalSharedLinesQueryResult, DashboardWidgetAutoHeightRef, LegalEntityMemberListParams, LegalEntityMemberQueryResult, LegalEntityApplicabilityQueryResult, LegalEntityQueryResult, MediaUploadResult, OperatingUnitQueryResult, OperatingUnitQueryScope, OperatingUnitScopeFieldProps, OperatingUnitScopeResult, OperatingUnitSelectionResult, PartyListParams, PartyQueryResult, TrustedAssetListParams, TrustedAssetsQueryResult, UploadFileClient } from './platform';
10
10
  import type { NxOrganizationTargetSelectorProps, NxOperatingUnitSelectorProps, OrganizationListScopeMode, OrganizationListScopeResult, OrganizationTargetQuery, OrganizationTargetQueryResult } from './organization-target';
11
11
  import type { NxCalendarProps, NxResourceSchedulerProps, ResourceBoardProps, ResourceScheduleProps } from './resources/resource-projections';
12
- import type { NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxResourceImportDialogProps, NxResourceTransferActionsProps } from './resources/resource-transfer';
12
+ import type { NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxInlineResourceCreateProps, NxResourceImportDialogProps, NxResourceTransferActionsProps } from './resources/resource-transfer';
13
13
  import type { NxResourceInformationFormProps, NxResourceFormLegalEntityFieldProps, NxResourceInformationViewProps } from './resources/resource-information';
14
14
  import type { SignatureAuthenticationMethodSelectorProps, SignatureInvitationChannelSelectorProps, SignatureRequestPreparationEditorProps, SignatureRequestPreparationExactPreviewProps, SignatureRequestPreparationPlacementEditorProps, SignatureSingleRequestDialogProps } from './signature';
15
15
  import type { ResourceProjectionChangeSubscription } from './resource-reference';
16
16
  import type { ResourceCreateDestinationRegistry } from './resource-create-destination';
17
17
  export type { ResourceProjectionChangeSubscription } from './resource-reference';
18
18
  /** Host-only visual component prop contracts. App packages import these from ./host. */
19
- export type { AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, NxAdaptiveSplitAsideWidth, NxAdaptiveSplitBreakpoint, NxAdaptiveSplitDensity, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxDropdownMenuProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartItem, NxOrgChartLabels, NxOrgChartMember, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxOverviewBandProps, NxPageFrameProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxResponsiveRegionProps, ResourceListToolbarMoreMenuProps, NxSearchFieldProps, NxSectionCardProps, NxSectionStackProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxTabNavItem, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, ResourceListRefreshConfig, ResourceTableDensity, ResourceTableStyle, ResourceTableSummaryRow, } from './shell';
19
+ export type { AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, NxAdaptiveSplitAsideWidth, NxAdaptiveSplitBreakpoint, NxAdaptiveSplitDensity, NxAdaptiveSplitProps, NxActionButtonProps, NxAlertProps, NxButtonProps, NxLinkButtonProps, NxIconButtonProps, NxIconLinkProps, NxCanonicalRoutePaneProps, NxCheckboxProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxComboboxProps, NxDatePickerProps, NxDateRangePickerProps, NxDetailRowProps, NxDropdownMenuProps, NxEmptyViewProps, NxFieldGroupProps, NxFieldLegendProps, NxFieldsetProps, NxFileDropzoneProps, NxFormFieldProps, NxFormSectionProps, NxInsightFilterBarProps, NxInsightSurfaceProps, NxHelpTooltipProps, NxLoadingBlockProps, NxModalDialogProps, NxOrgChartItem, NxOrgChartLabels, NxOrgChartMember, NxOrgChartProps, NxMissingRequiredReferencesAlertProps, NxOverviewBandProps, NxPageFrameProps, NxRadioGroupProps, NxRadioProps, NxRefreshControlProps, NxResponsiveRegionProps, ResourceListToolbarMoreMenuProps, NxSearchFieldProps, NxSectionCardProps, SectionRowProps, NxSectionStackProps, NxSelectProps, NxStatCardProps, NxStatusBadgeProps, NxSwitchProps, NxTabNavItem, NxTabNavProps, NxTextAreaProps, NxTextInputProps, NxTooltipProps, ResourceListRefreshConfig, ResourceTableDensity, ResourceTableStyle, ResourceTableSummaryRow, } from './shell';
20
20
  export type { NxResourceInformationFormProps, NxResourceFormLegalEntityFieldProps, NxResourceInformationViewProps, ResourceInformationControlProjection, ResourceInformationControlSlot, ResourceInformationCustomProjection, ResourceInformationEditProjection, ResourceInformationEditRenderContext, ResourceInformationField, ResourceInformationFieldSpan, ResourceInformationMode, ResourceInformationReadOnlyProjection, ResourceInformationRequirement, ResourceInformationSchema, ResourceInformationSection, ResourceInformationTranslator, ResourceInformationValue, } from './resources/resource-information';
21
21
  export type { NxCalendarActionBinding, NxCalendarActionCommand, NxCalendarActionResult, NxCalendarInteraction, NxCalendarOccurrence, NxCalendarProps, NxCalendarRange, NxCalendarSelection, NxCalendarTemporalRange, NxCalendarView, NxResourceSchedulerActionBinding, NxResourceSchedulerActionCommand, NxResourceSchedulerActionResult, NxResourceSchedulerInteraction, NxResourceSchedulerOccurrence, NxResourceSchedulerProps, NxResourceSchedulerResource, NxResourceSchedulerSelection, NxResourceSchedulerView, ResourceBoardCard, ResourceBoardLabels, ResourceBoardLane, ResourceBoardLoadState, ResourceBoardMoveCommand, ResourceBoardMutationResult, ResourceBoardProjection, ResourceBoardProps, ResourceBoardSummaryField, ResourceProjectionReference, ResourceScheduleActionBinding, ResourceScheduleActionCommand, ResourceScheduleDatePair, ResourceScheduleDateSemantics, ResourceScheduleDependency, ResourceScheduleDependencyType, ResourceScheduleInteraction, ResourceScheduleItem, ResourceScheduleItemType, ResourceScheduleLoadState, ResourceScheduleMutationResult, ResourceScheduleProjection, ResourceScheduleProps, ResourceScheduleTimeUnit, ResourceScheduleView, } from './resources/resource-projections';
22
- export type { DatasetImportConfirmationSummary, NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxResourceImportDialogProps, NxResourceTransferActionsProps, } from './resources/resource-transfer';
22
+ export type { DatasetImportConfirmationSummary, NxDatasetExportWorkspaceProps, NxDatasetImportWorkspaceProps, NxInlineResourceCreateProps, NxResourceImportDialogProps, NxResourceTransferActionsProps, } from './resources/resource-transfer';
23
23
  export { projectSignatureCapabilityCatalog, signatureCapabilityIdentity, } from './signature';
24
24
  export type { SignatureAuthenticationCapability, SignatureAuthenticationMethod, SignatureAuthenticationMethodSelectorProps, SignatureCapability, SignatureCapabilityCatalog, SignatureCapabilityKind, SignatureCapabilityStatus, SignatureCapabilityUnavailableReason, SignatureInvitationCapability, SignatureInvitationChannel, SignatureInvitationChannelSelectorProps, SignatureRequestPreparationDocument, SignatureRequestPreparationEditorPreparation, SignatureRequestPreparationEditorProps, SignatureRequestPreparationDataSourceCard, SignatureRequestPreparationEditPolicy, SignatureRequestPreparationExactPreviewPreparation, SignatureRequestPreparationExactPreviewProps, SignatureRequestPreparationInputDefinition, SignatureRequestPreparationInputKind, SignatureRequestPreparationInputValueAuthority, SignatureRequestPreparationPlacementEditorProps, SignatureRequestPreparationPlacementElement, SignatureRequestPreparationPlacementFormElement, SignatureRequestPreparationPlacementFormKind, SignatureRequestPreparationPlacementImageAsset, SignatureRequestPreparationPlacementImageElement, SignatureRequestPreparationPlacementParticipant, SignatureRequestPreparationPlacementStaticCheckboxElement, SignatureRequestPreparationPlacementDataSourceElement, SignatureRequestPreparationPlacementStaticTextElement, SignatureRequestPreparationRect, SignatureRequestPreparationRenderStatus, SignatureRequestPreparationStatus, SignatureRequestPreparationTextElement, SignatureRoutingCapability, SignatureRoutingMode, SignatureTemporalDisplayPart, SignatureSingleRequestDialogProps, SignatureSingleRequestParticipant, SignatureSingleRequestParticipantAssignmentSource, SignatureSingleRequestParticipantCandidate, SignatureSingleRequestParticipantSubmission, SignatureSingleRequestPreparationReference, SignatureSingleRequestSubmission, } from './signature';
25
25
  export interface NxBarChartProps {
@@ -194,6 +194,7 @@ export interface NexiaAppFrontendHostBindings {
194
194
  NxResourceTransferActions: ComponentType<NxResourceTransferActionsProps>;
195
195
  NxDatasetExportWorkspace: ComponentType<NxDatasetExportWorkspaceProps>;
196
196
  NxDatasetImportWorkspace: ComponentType<NxDatasetImportWorkspaceProps>;
197
+ NxInlineResourceCreate: ComponentType<NxInlineResourceCreateProps>;
197
198
  NxSpreadsheetEditor: ComponentType<NxSpreadsheetEditorProps>;
198
199
  NxSankey: typeof NxSankey;
199
200
  NxLoadingBlock: typeof NxLoadingBlock;
@@ -208,11 +209,13 @@ export interface NexiaAppFrontendHostBindings {
208
209
  NxRefreshControl: ComponentType<NxRefreshControlProps>;
209
210
  NxSearchField: typeof NxSearchField;
210
211
  NxSectionCard: typeof NxSectionCard;
212
+ NxSectionRow: typeof NxSectionRow;
211
213
  NxSectionStack: typeof NxSectionStack;
212
214
  NxResponsiveRegion: typeof NxResponsiveRegion;
213
215
  NxSelect: <TValue extends string | number>(props: NxSelectProps<TValue>) => ReactNode;
214
216
  NxStatCard: typeof NxStatCard;
215
217
  NxStatusBadge: typeof NxStatusBadge;
218
+ NxSwitch: typeof NxSwitch;
216
219
  NxTabNav: typeof NxTabNav;
217
220
  NxTextArea: typeof NxTextArea;
218
221
  NxTextInput: typeof NxTextInput;
@@ -275,6 +278,7 @@ export interface NexiaAppFrontendHostBindings {
275
278
  usePermissionsQuery: (tenantId: string | undefined, legalEntityPublicId: string | null | undefined, operatingUnitPublicId?: string | null, enabled?: boolean) => PermissionsQueryResult;
276
279
  useResourceProjectionChange: (subscription: ResourceProjectionChangeSubscription) => void;
277
280
  useRegisterTabActions: (actions: TabContextActionRegistration[] | null) => void;
281
+ useRegisterDraftAction: (options: RegisterDraftActionOptions) => void;
278
282
  useRegisterListLocateAction: <Row>(options: UseRegisterListLocateActionOptions<Row>) => void;
279
283
  useResourceListParams: (options?: UseResourceListParamsOptions) => ResourceListParamsControls;
280
284
  useTrustedAssetsQuery: (tenantId: string | undefined, legalEntityPublicId: string | null | undefined, params: TrustedAssetListParams, enabled?: boolean) => TrustedAssetsQueryResult;
@@ -314,8 +318,8 @@ export declare function configureNexiaAppFrontendHost(bindings: NexiaAppFrontend
314
318
  /** Axios-compatible host client carrying the active shell CSRF configuration. */
315
319
  export declare const api: AxiosInstance;
316
320
  /**
317
- * Polls Core's standard background-operation endpoint and cancels outstanding
318
- * waits when the owning surface unmounts.
321
+ * Polls Core's standard background-operation endpoint. By default unmounting
322
+ * cancels the wait; callers retaining a checkpoint can explicitly keep waiting.
319
323
  */
320
324
  export declare function useDataMigrationBackgroundOperation(): DataMigrationBackgroundOperationClient;
321
325
  export declare function AppRouteFrame(props: AppRouteFrameProps): ReactNode;
@@ -383,6 +387,7 @@ export declare function NxOrgChart(props: NxOrgChartProps): ReactNode;
383
387
  export declare function NxResourceImportDialog(props: NxResourceImportDialogProps): ReactNode;
384
388
  export declare function NxResourceTransferActions(props: NxResourceTransferActionsProps): ReactNode;
385
389
  export declare function NxDatasetImportWorkspace(props: NxDatasetImportWorkspaceProps): ReactNode;
390
+ export declare function NxInlineResourceCreate(props: NxInlineResourceCreateProps): ReactNode;
386
391
  export declare function NxDatasetExportWorkspace(props: NxDatasetExportWorkspaceProps): ReactNode;
387
392
  export declare function NxMissingRequiredReferencesAlert(props: NxMissingRequiredReferencesAlertProps): ReactNode;
388
393
  export declare function NxPageFrame(props: NxPageFrameProps): ReactNode;
@@ -390,6 +395,8 @@ export declare function NxResponsiveRegion(props: NxResponsiveRegionProps): Reac
390
395
  export declare function NxPagination(props: NxPaginationProps): ReactNode;
391
396
  export declare function NxSearchField(props: NxSearchFieldProps): ReactNode;
392
397
  export declare function NxSectionCard(props: NxSectionCardProps): ReactNode;
398
+ export declare function NxSectionRow(props: SectionRowProps): ReactNode;
399
+ export declare function NxSwitch(props: NxSwitchProps): ReactNode;
393
400
  export declare function NxSectionStack(props: NxSectionStackProps): ReactNode;
394
401
  export declare function NxSelect<TValue extends string | number>(props: NxSelectProps<TValue>): ReactNode;
395
402
  export declare function NxStatCard(props: NxStatCardProps): ReactNode;
@@ -567,6 +574,7 @@ export declare function useResourceCreateCompletion(): ResourceCreateCompletion;
567
574
  export declare function useMarkTabDirty(dirty: boolean, snapshot?: string, initialSnapshot?: string): void;
568
575
  export declare function useClearTabDirty(): () => void;
569
576
  export declare function useRegisterTabActions(actions: TabContextActionRegistration[] | null): void;
577
+ export declare function useRegisterDraftAction(options: RegisterDraftActionOptions): void;
570
578
  export declare function useWorkTabLabel(label: string | null | undefined): void;
571
579
  export declare function useWorkSurfaceLabels(input: WorkSurfaceLabelInput): WorkSurfaceLabels;
572
580
  export declare function autoRegisterPackageSurfaces(options: AutoRegisterPackageSurfacesOptions): void;
package/dist/host.js CHANGED
@@ -64,15 +64,17 @@ function backgroundOperationClientPath(statusUrl) {
64
64
  return path;
65
65
  }
66
66
  /**
67
- * Polls Core's standard background-operation endpoint and cancels outstanding
68
- * waits when the owning surface unmounts.
67
+ * Polls Core's standard background-operation endpoint. By default unmounting
68
+ * cancels the wait; callers retaining a checkpoint can explicitly keep waiting.
69
69
  */
70
70
  export function useDataMigrationBackgroundOperation() {
71
71
  const activeControllers = useRef(new Set());
72
+ const backgroundControllers = useRef(new Set());
72
73
  useEffect(() => () => {
73
- for (const controller of activeControllers.current)
74
- controller.abort();
75
- activeControllers.current.clear();
74
+ for (const controller of activeControllers.current) {
75
+ if (!backgroundControllers.current.has(controller))
76
+ controller.abort();
77
+ }
76
78
  }, []);
77
79
  const cancelAll = useCallback(() => {
78
80
  for (const controller of activeControllers.current)
@@ -91,6 +93,8 @@ export function useDataMigrationBackgroundOperation() {
91
93
  else
92
94
  options.signal?.addEventListener('abort', abortFromCaller, { once: true });
93
95
  activeControllers.current.add(controller);
96
+ if (options.continueInBackground)
97
+ backgroundControllers.current.add(controller);
94
98
  try {
95
99
  for (;;) {
96
100
  const operation = (await api.get(backgroundOperationClientPath(statusUrl), { signal: controller.signal })).data;
@@ -101,6 +105,9 @@ export function useDataMigrationBackgroundOperation() {
101
105
  }
102
106
  return operation.result;
103
107
  }
108
+ if (operation.status === 'cancelled') {
109
+ throw new DOMException('Data migration analysis cancelled.', 'AbortError');
110
+ }
104
111
  if (operation.status === 'failed' || operation.status === 'unknown') {
105
112
  throw new Error(operationFailureMessage(operation));
106
113
  }
@@ -109,6 +116,7 @@ export function useDataMigrationBackgroundOperation() {
109
116
  }
110
117
  finally {
111
118
  activeControllers.current.delete(controller);
119
+ backgroundControllers.current.delete(controller);
112
120
  options.signal?.removeEventListener('abort', abortFromCaller);
113
121
  }
114
122
  }, []);
@@ -302,6 +310,9 @@ export function NxResourceTransferActions(props) {
302
310
  export function NxDatasetImportWorkspace(props) {
303
311
  return render(host().components.NxDatasetImportWorkspace, props);
304
312
  }
313
+ export function NxInlineResourceCreate(props) {
314
+ return render(host().components.NxInlineResourceCreate, props);
315
+ }
305
316
  export function NxDatasetExportWorkspace(props) {
306
317
  return render(host().components.NxDatasetExportWorkspace, props);
307
318
  }
@@ -323,6 +334,12 @@ export function NxSearchField(props) {
323
334
  export function NxSectionCard(props) {
324
335
  return render(host().components.NxSectionCard, props);
325
336
  }
337
+ export function NxSectionRow(props) {
338
+ return render(host().components.NxSectionRow, props);
339
+ }
340
+ export function NxSwitch(props) {
341
+ return render(host().components.NxSwitch, props);
342
+ }
326
343
  export function NxSectionStack(props) {
327
344
  return render(host().components.NxSectionStack, props);
328
345
  }
@@ -697,6 +714,9 @@ export function useClearTabDirty() {
697
714
  export function useRegisterTabActions(actions) {
698
715
  host().hooks.useRegisterTabActions(actions);
699
716
  }
717
+ export function useRegisterDraftAction(options) {
718
+ host().hooks.useRegisterDraftAction(options);
719
+ }
700
720
  export function useWorkTabLabel(label) {
701
721
  host().hooks.useWorkTabLabel(label);
702
722
  }
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  export type { ResourceListFilterableEntry, ResourceListSchema, } from "./resources/resource-list";
2
+ export { draftStringField } from './resources/draft-field';
2
3
  export { defineResourceInformationSchema, resourceInformationValue, } from "./resources/resource-information";
3
- export type { NxResourceInformationFormProps, NxResourceInformationViewProps, ResourceFormLegalEntity, NxResourceFormLegalEntityFieldProps, ResourceInformationControlProjection, ResourceInformationControlSlot, ResourceInformationCustomProjection, ResourceInformationEditProjection, ResourceInformationEditRenderContext, ResourceInformationField, ResourceInformationFieldSpan, ResourceInformationMode, ResourceInformationReadOnlyProjection, ResourceInformationRequirement, ResourceInformationSchema, ResourceInformationSection, ResourceInformationTranslator, ResourceInformationValue, } from "./resources/resource-information";
4
- export type { DatasetImportConfirmationSummary, ResourceImportPreview, ResourceImportPreviewRow, ResourceImportResponse, ResourceImportRun, ResourceImportRunStatus, ResourceImportSummary, ResourceTransferFormat, ResourceTransferMessage, ResourceTransferMeta, NxResourceImportDialogProps, NxResourceTransferActionsProps, NxDatasetImportWorkspaceProps, NxDatasetExportWorkspaceProps, } from "./resources/resource-transfer";
4
+ export type { NxResourceInformationFormProps, NxResourceInformationViewProps, ResourceFormLegalEntity, ResourceFormBinding, NxResourceFormLegalEntityFieldProps, ResourceInformationControlProjection, ResourceInformationControlSlot, ResourceInformationCustomProjection, ResourceInformationEditProjection, ResourceInformationEditRenderContext, ResourceInformationField, ResourceInformationFieldSpan, ResourceInformationMode, ResourceInformationReadOnlyProjection, ResourceInformationRequirement, ResourceInformationSchema, ResourceInformationSection, ResourceInformationTranslator, ResourceInformationValue, } from "./resources/resource-information";
5
+ export type { DatasetImportConfirmationSummary, DatasetImportPlanChoice, DatasetImportPlanSection, ResourceImportPreview, ResourceImportPreviewRow, ResourceImportResponse, ResourceImportRun, ResourceImportRunStatus, ResourceImportSummary, ResourceTransferFormat, ResourceTransferMessage, ResourceTransferMeta, NxResourceImportDialogProps, NxResourceTransferActionsProps, NxDatasetImportWorkspaceProps, NxInlineResourceCreateProps, NxDatasetExportWorkspaceProps, } from "./resources/resource-transfer";
5
6
  export type { NxCalendarActionBinding, NxCalendarActionCommand, NxCalendarActionResult, NxCalendarInteraction, NxCalendarOccurrence, NxCalendarProps, NxCalendarRange, NxCalendarSelection, NxCalendarTemporalRange, NxCalendarView, NxResourceSchedulerActionBinding, NxResourceSchedulerActionCommand, NxResourceSchedulerActionResult, NxResourceSchedulerInteraction, NxResourceSchedulerOccurrence, NxResourceSchedulerProps, NxResourceSchedulerResource, NxResourceSchedulerSelection, NxResourceSchedulerView, ResourceBoardCard, ResourceBoardLabels, ResourceBoardLane, ResourceBoardLoadState, ResourceBoardMoveCommand, ResourceBoardMutationResult, ResourceBoardProjection, ResourceBoardProps, ResourceBoardSummaryField, ResourceProjectionReference, ResourceScheduleActionBinding, ResourceScheduleActionCommand, ResourceScheduleDatePair, ResourceScheduleDateSemantics, ResourceScheduleDependency, ResourceScheduleDependencyType, ResourceScheduleInteraction, ResourceScheduleItem, ResourceScheduleItemType, ResourceScheduleLoadState, ResourceScheduleMutationResult, ResourceScheduleProjection, ResourceScheduleProps, ResourceScheduleTimeUnit, ResourceScheduleView, } from "./resources/resource-projections";
6
7
  export type { ContextQueryResult, ContextResponse, LegalEntityContext, PermissionsQueryResult, PermissionsResponse, TenantContext, UserContext, WorkspaceContext, } from "./context";
7
- export type { DataMigrationBackgroundOperation, DataMigrationBackgroundOperationClient, DataMigrationOperationAccepted, DataMigrationOperationWaitOptions, DataMigrationProviderRegistration, DataMigrationRegistrar, DataMigrationRegistry, DataMigrationRun, DataMigrationRunStatus, DataMigrationSessionCheckpointStore, DataMigrationStageCompletion, DataMigrationStageLoader, DataMigrationStageProps, DataMigrationStageRegistration, DataMigrationTargetRegistration, } from "./data-migration";
8
+ export type { DataMigrationBackgroundOperation, DataMigrationBackgroundOperationClient, DataMigrationOperationAccepted, DataMigrationOperationWaitOptions, DataMigrationProviderRegistration, DataMigrationRegistrar, DataMigrationRegistry, DataMigrationRun, DataMigrationRunStatus, DataMigrationSessionCheckpointStore, DataMigrationStageCompletion, DataMigrationStageActivityUpdate, DataMigrationStageLoader, DataMigrationStageProps, DataMigrationStageRegistration, DataMigrationTargetRegistration, } from "./data-migration";
8
9
  export { createDataMigrationSessionCheckpointStore, dataMigrationUploadAccept, dataMigrationRunPublicId, isDataMigrationOperationAccepted, } from "./data-migration";
9
10
  export { projectSignatureCapabilityCatalog, signatureCapabilityIdentity, } from "./signature";
10
11
  export type { SignatureDocumentDataBinding, SignatureDocumentDataCandidate, SignatureDocumentDataCardinality, SignatureDocumentDataClassification, SignatureDocumentDataCompatibleSourceBinding, SignatureDocumentDataContractDescriptor, SignatureDocumentDataFieldDescriptor, SignatureDocumentDataFieldMapping, SignatureDocumentDataFieldType, SignatureDocumentDataFixedSourceBinding, SignatureDocumentDataFormatter, SignatureDocumentDataLookupMode, SignatureDocumentDataResourceRef, SignatureDocumentDataSourceCatalog, SignatureDocumentDataSourceCatalogEntry, SignatureDocumentDataSourceDescriptor, SignatureDocumentDataSourceResolution, SignatureDocumentDataStatus, SignatureAuthenticationCapability, SignatureAuthenticationMethod, SignatureAuthenticationMethodSelectorProps, SignatureCapability, SignatureCapabilityCatalog, SignatureCapabilityKind, SignatureCapabilityStatus, SignatureCapabilityUnavailableReason, SignatureInvitationCapability, SignatureInvitationChannel, SignatureInvitationChannelSelectorProps, SignatureRequestPreparationDocument, SignatureRequestPreparationEditorPreparation, SignatureRequestPreparationEditorProps, SignatureRequestPreparationDataSourceCard, SignatureRequestPreparationEditPolicy, SignatureRequestPreparationExactPreviewPreparation, SignatureRequestPreparationExactPreviewProps, SignatureRequestPreparationInputDefinition, SignatureRequestPreparationInputKind, SignatureRequestPreparationInputValueAuthority, SignatureRequestPreparationPlacementEditorProps, SignatureRequestPreparationPlacementElement, SignatureRequestPreparationPlacementFormElement, SignatureRequestPreparationPlacementFormKind, SignatureRequestPreparationPlacementImageAsset, SignatureRequestPreparationPlacementImageElement, SignatureRequestPreparationPlacementParticipant, SignatureRequestPreparationPlacementStaticCheckboxElement, SignatureRequestPreparationPlacementDataSourceElement, SignatureRequestPreparationPlacementStaticTextElement, SignatureRequestPreparationRect, SignatureRequestPreparationRenderStatus, SignatureRequestPreparationStatus, SignatureRequestPreparationTextElement, SignatureRoutingCapability, SignatureRoutingMode, SignatureTemporalDisplayPart, SignatureSingleRequestDialogProps, SignatureSingleRequestParticipant, SignatureSingleRequestParticipantAssignmentSource, SignatureSingleRequestParticipantCandidate, SignatureSingleRequestParticipantSubmission, SignatureSingleRequestPreparationReference, SignatureSingleRequestSubmission, } from "./signature";
@@ -35,7 +36,7 @@ export type { ApprovalActor, ApprovalBodySnapshot, ApprovalBusinessFormControlle
35
36
  export { APPROVAL_STATES, APPROVAL_STEP_KINDS } from "./approval";
36
37
  export type { BpmnEditorDocument, BpmnEditorElement, BpmnEditorNodeType, BpmnEditorProcess, DmnEditorDocument, DmnEditorHitPolicy, DmnEditorInputClause, DmnEditorOutputClause, DmnEditorRule, DmnEditorValueType, ProcessUserTaskFormController, ProcessUserTaskFormRegistrar, ProcessUserTaskFormRegistration, ProcessUserTaskFormRegistry, ProcessUserTaskFormSlotPropsV1, ProcessUserTaskFormWidgetLoader, ProcessUserTaskResourceRef, } from "./process";
37
38
  export { DMN_EDITOR_HIT_POLICIES } from "./process";
38
- export type { AppRouteFrameProps, AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, ListLocateRecord, MessageApi, MutationFormError, NxCanonicalRoutePaneProps, NxActionKind, NxIconButtonProps, NxComboboxOption, NxComboboxProps, NxRefreshControlProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxDatePickerLabels, NxDatePickerProps, NxDateRangePickerProps, NxDateRangeValue, NxDropdownMenuItem, NxHelpTooltipProps, InsightFilterControls, InsightFilterState, InsightQueryLike, InsightRangePreset, UseInsightFilterStateOptions, NxOverviewBandCard, NxSelectOption, NxStatDelta, NxStatDeltaDirection, NxStatDeltaTone, NxTabNavItem, NxTabNavProps, NxTooltipAlign, NxTooltipProps, NxTooltipSide, OpenResourceWorkTab, OpenResourceWorkTabOptions, ResourceCreateCompletion, ResourceCreateCompletionInput, ResourceCreateContinuationTarget, ResourceCreateReceiverRegistration, ResourceInspectorAdapter, ResourceInspectorAdapterLoader, ResourceInspectorAdapterProps, ResourceInspectorAdapterRegistry, ResourceInspectorPanelProps, ResourceInspectorStack, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListFilters, ResourceListFilterValue, ResourceListFooterConfig, ResourceListParams, ResourceListParamsControls, ResourceListRefreshConfig, ResourceListToolbarConfig, ResourceListToolbarMoreMenuProps, ResourceListToolbarViewOption, ResourcePrimaryCellProps, ResourceActionDescriptor, ResourceRef, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableColumn, ResourceTableAccess, ResourceTableDensity, ResourceTableProps, ResourceTableStyle, ResourceTableSummaryRow, ResourceTableSort, TabContextActionContext, TabContextActionRegistration, TabContextActionResult, ResourceTextCellProps, ToastOptions, ToastSource, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, WorkSectionProps, FavoriteTarget, WorkTabRef, WorkSurfaceAction, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps, } from "./shell";
39
+ export type { AppRouteFrameProps, AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, ListLocateRecord, MessageApi, MutationFormError, NxCanonicalRoutePaneProps, NxActionKind, NxIconButtonProps, NxComboboxOption, NxComboboxProps, NxRefreshControlProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxDatePickerLabels, NxDatePickerProps, NxDateRangePickerProps, NxDateRangeValue, NxDropdownMenuItem, NxHelpTooltipProps, InsightFilterControls, InsightFilterState, InsightQueryLike, InsightRangePreset, UseInsightFilterStateOptions, NxOverviewBandCard, NxSelectOption, NxStatDelta, NxStatDeltaDirection, NxStatDeltaTone, NxTabNavItem, NxTabNavProps, NxTooltipAlign, NxTooltipProps, NxTooltipSide, OpenResourceWorkTab, OpenResourceWorkTabOptions, ResourceCreateCompletion, ResourceCreateCompletionInput, ResourceCreateContinuationTarget, ResourceCreateReceiverRegistration, ResourceInspectorAdapter, ResourceInspectorAdapterLoader, ResourceInspectorAdapterProps, ResourceInspectorAdapterRegistry, ResourceInspectorPanelProps, ResourceInspectorStack, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListFilters, ResourceListFilterValue, ResourceListFooterConfig, ResourceListParams, ResourceListParamsControls, ResourceListRefreshConfig, ResourceListToolbarConfig, ResourceListToolbarMoreMenuProps, ResourceListToolbarViewOption, ResourcePrimaryCellProps, ResourceActionDescriptor, ResourceRef, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableColumn, ResourceTableAccess, ResourceTableDensity, ResourceTableProps, ResourceTableStyle, ResourceTableSummaryRow, ResourceTableSort, TabContextActionContext, TabContextActionRegistration, DraftFieldBinding, RegisterDraftActionOptions, TabContextActionResult, ResourceTextCellProps, ToastOptions, ToastSource, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, WorkSectionProps, FavoriteTarget, WorkTabRef, WorkSurfaceAction, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps, } from "./shell";
39
40
  export { FavoriteButton } from "./host";
40
41
  export type { FavoriteButtonProps } from "./host";
41
42
  export { createSpreadsheetWorkbook } from "./spreadsheet";
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export { draftStringField } from './resources/draft-field.js';
1
2
  export { defineResourceInformationSchema, resourceInformationValue, } from "./resources/resource-information.js";
2
3
  export { createDataMigrationSessionCheckpointStore, dataMigrationUploadAccept, dataMigrationRunPublicId, isDataMigrationOperationAccepted, } from "./data-migration.js";
3
4
  export { projectSignatureCapabilityCatalog, signatureCapabilityIdentity, } from "./signature.js";
@@ -0,0 +1,9 @@
1
+ import type { DraftFieldBinding } from '../shell';
2
+ /** Binds one App-owned text/choice state to a draft action without submitting it. */
3
+ export declare function draftStringField<T extends string>(value: T, initialValue: T, apply: (value: T) => void, rules: {
4
+ maxLength: number;
5
+ minLength?: number;
6
+ trim?: boolean;
7
+ values?: readonly T[];
8
+ pattern?: string;
9
+ }): DraftFieldBinding;
@@ -0,0 +1,22 @@
1
+ /** Binds one App-owned text/choice state to a draft action without submitting it. */
2
+ export function draftStringField(value, initialValue, apply, rules) {
3
+ return {
4
+ value, initialValue,
5
+ inputSchema: { type: 'string', maxLength: rules.maxLength,
6
+ ...(rules.minLength === undefined ? {} : { minLength: rules.minLength }),
7
+ ...(rules.pattern === undefined ? {} : { pattern: rules.pattern }),
8
+ ...(rules.values === undefined ? {} : { enum: rules.values }) },
9
+ parse(input) {
10
+ if (typeof input !== 'string')
11
+ throw new Error('Expected text');
12
+ const parsed = rules.trim ? input.trim() : input;
13
+ const length = Array.from(parsed).length;
14
+ if (length > rules.maxLength || length < (rules.minLength ?? 0)
15
+ || (rules.pattern !== undefined && !new RegExp(rules.pattern, 'u').test(parsed))
16
+ || (rules.values && !rules.values.includes(parsed)))
17
+ throw new Error('Invalid field value');
18
+ return parsed;
19
+ },
20
+ apply: next => apply(next),
21
+ };
22
+ }
@@ -60,6 +60,8 @@ export interface ResourceInformationField<TViewContext, TEditContext> {
60
60
  /** Short domain definition rendered from the field label. */
61
61
  definitionKey?: string;
62
62
  requirement?: ResourceInformationRequirement;
63
+ /** Personal/secret values are excluded from automated form discovery and writes. */
64
+ sensitive?: boolean;
63
65
  span?: ResourceInformationFieldSpan;
64
66
  /** Defaults to all projections. Omissions must be deliberate and explicit. */
65
67
  modes?: readonly ResourceInformationMode[];
@@ -109,6 +111,8 @@ export interface NxResourceInformationFormProps<TViewContext, TEditContext> {
109
111
  schema: ResourceInformationSchema<TViewContext, TEditContext>;
110
112
  context: TEditContext;
111
113
  mode: "create" | "edit";
114
+ /** Explicit owner and effect of this form; control writers remain public callbacks. */
115
+ binding?: ResourceFormBinding;
112
116
  /** First field of the first schema section, full row width. Omit for tenant-owned forms.
113
117
  * Use `stored` on edit; the host never renders an editable owner in edit mode.
114
118
  * Do not also declare the Legal Entity field in the form schema.
@@ -118,6 +122,17 @@ export interface NxResourceInformationFormProps<TViewContext, TEditContext> {
118
122
  emptyValue: ReactNode;
119
123
  testIdPrefix?: string;
120
124
  }
125
+ export interface ResourceFormBinding {
126
+ /** Omit identity inside a declared Resource route; the host supplies it. */
127
+ resourceKey?: string;
128
+ resourceId?: string | null;
129
+ /** Additional form-owned scope; otherwise use the pane-local route scope. */
130
+ scopeKey?: string;
131
+ effect: "draft" | "autosave";
132
+ disabled?: boolean;
133
+ /** Pure cross-field preflight; return rejected keys before any value writer runs. */
134
+ validateBatch?: (values: Readonly<Record<string, unknown>>) => readonly string[];
135
+ }
121
136
  /**
122
137
  * Checks a schema once, then deliberately widens it to the stable host
123
138
  * contract. Keeping every App field as one deep literal union makes a
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { ResourceCreateContinuationTarget } from "../shell";
2
+ import type { ResourceCreateCompletionInput, ResourceCreateContinuationTarget } from "../shell";
3
3
  /** Lifecycle states returned by resource import endpoints. */
4
4
  export type ResourceImportRunStatus = "queued" | "processing" | "completed" | "completed_with_errors" | "failed";
5
5
  export type ResourceTransferFormat = "csv" | "xlsx" | "txt" | "json" | string;
@@ -130,12 +130,23 @@ export interface DatasetImportConfirmationSummary {
130
130
  willUpdate: number;
131
131
  willReject: number;
132
132
  }
133
+ /** Host-rendered create form that returns to its import preview after saving. */
134
+ export interface NxInlineResourceCreateProps {
135
+ route: string;
136
+ title: string;
137
+ progress?: {
138
+ current: number;
139
+ total: number;
140
+ };
141
+ onClose: () => void;
142
+ onCreated: (input: ResourceCreateCompletionInput) => void;
143
+ }
133
144
  /** Shared mapped-dataset import workspace for App management destinations. */
134
145
  export interface NxDatasetImportWorkspaceProps {
135
146
  sourceProfileKey?: string;
136
147
  showSourceSelector?: boolean;
137
148
  resourceKey: string;
138
- /** App-owned reference review above the shared editable preview. */
149
+ /** App-owned reference review within the shared import flow. */
139
150
  renderReferenceReview?: (context: {
140
151
  rows: Array<{
141
152
  line: number;
@@ -150,15 +161,55 @@ export interface NxDatasetImportWorkspaceProps {
150
161
  message_key?: string;
151
162
  }>;
152
163
  }>;
164
+ /** App-reported reference issues covering the entire batch, including rows outside the preview sample. */
165
+ referenceIssues?: Array<{
166
+ issue: {
167
+ kind: string;
168
+ field: string;
169
+ value: string;
170
+ reference_kind?: string;
171
+ reference_value?: string;
172
+ label_key?: string;
173
+ message_key?: string;
174
+ };
175
+ count: number;
176
+ }>;
153
177
  busy: boolean;
154
178
  recheck: () => void;
155
179
  /** Open an offered reference editor after preserving the import draft. */
156
180
  createReference: (kind: string, seed: string) => void;
181
+ /** Configure several references of one kind in sequence without leaving the preview. */
182
+ createReferences: (items: Array<{
183
+ kind: string;
184
+ seed: string;
185
+ }>) => void;
157
186
  /** Apply edits to source rows and rerun the existing validation pipeline. */
158
187
  applyChanges: (changes: Record<string, Record<string, string | null>>) => Promise<void>;
159
188
  }) => ReactNode;
189
+ /** Place reference setup before the preview, after its plan choices, or below the complete preview. */
190
+ referenceReviewPlacement?: "before_preview" | "after_plan" | "after_preview";
191
+ /** App-owned presentation of plan choices, while Core retains preview and commit decisions. */
192
+ renderPlanChoices?: (context: {
193
+ /** Authorized target of the current import preview. */
194
+ legalEntityPublicId?: string | null;
195
+ referenceIssues?: Parameters<NonNullable<NxDatasetImportWorkspaceProps["renderReferenceReview"]>>[0]["referenceIssues"];
196
+ choices: DatasetImportPlanChoice[];
197
+ sections: DatasetImportPlanSection[];
198
+ values: Record<string, unknown>;
199
+ /** Decisions used for the plan currently shown, before local edits. */
200
+ analyzedValues: Record<string, unknown>;
201
+ onChange: (key: string, value: string) => void;
202
+ busy: boolean;
203
+ previewIsCurrent: boolean;
204
+ /** Reanalyze the uploaded file with the current App rules. */
205
+ recheck: () => void;
206
+ }) => ReactNode;
207
+ /** Use with renderPlanChoices when the App presents its own decision summary. */
208
+ hidePlanSections?: boolean;
160
209
  /** Allowed display values, keyed by import column. Domain lookup remains App-owned. */
161
210
  cellOptions?: Record<string, string[]>;
211
+ /** Allow source-row correction controls in the preview. Defaults to true. */
212
+ allowRowEditing?: boolean;
162
213
  inlineEditing?: boolean;
163
214
  onCompleted?: (result: Record<string, unknown>) => void | Promise<void>;
164
215
  /** Called when an ordinary Resource Transfer import has been accepted by the queue. */
@@ -176,11 +227,19 @@ export interface NxDatasetImportWorkspaceProps {
176
227
  processingLabel?: string;
177
228
  /** App-owned title for domain-specific apply semantics; Core supplies only counts. */
178
229
  confirmationTitle?: (summary: DatasetImportConfirmationSummary) => string;
230
+ /** Promote a multiple-choice decision to a selection dialog, then confirm its normalized selection before applying. */
231
+ confirmationSelection?: {
232
+ decisionKey: string;
233
+ title: string;
234
+ confirmTitle: (selectedValues: string[]) => string;
235
+ };
179
236
  testIdPrefix?: string;
180
237
  /** App-owned canonical create actions for reference issues reported by its pipeline. */
181
238
  referenceCreateActions?: Record<string, {
182
239
  label: string;
183
- onCreate: (seed: string) => void;
240
+ onCreate: (seed: string, legalEntityPublicId?: string) => void;
241
+ /** Reuse the owning create route inside the import review instead of changing Work Tabs. */
242
+ inlineRoute?: (seed: string, legalEntityPublicId?: string) => string;
184
243
  continuation: ResourceCreateContinuationTarget;
185
244
  }>;
186
245
  /** Keep stable App-owned decisions while a contextual reference create is completed and rechecked. */
@@ -188,6 +247,29 @@ export interface NxDatasetImportWorkspaceProps {
188
247
  /** Drop submitted decisions that the refreshed App plan no longer offers. */
189
248
  retainOnlyOfferedDecisions?: boolean;
190
249
  }
250
+ export interface DatasetImportPlanChoice {
251
+ type: "choice";
252
+ key: string;
253
+ label_key: string;
254
+ label_params: Record<string, string | number>;
255
+ default_value?: string | null;
256
+ presentation?: "select" | "checkbox";
257
+ options: Array<{
258
+ value: string;
259
+ label_key: string;
260
+ label_params: Record<string, string | number>;
261
+ }>;
262
+ }
263
+ export interface DatasetImportPlanSection {
264
+ heading_key: string | null;
265
+ heading_params: Record<string, string | number>;
266
+ items: Array<{
267
+ label_key: string;
268
+ label_params: Record<string, string | number>;
269
+ count: number | null;
270
+ existing: boolean;
271
+ }>;
272
+ }
191
273
  /** Shared export workspace for an App-contributed dataset. */
192
274
  export interface NxDatasetExportWorkspaceProps {
193
275
  resourceKey: string;
package/dist/shell.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { QueryClient } from "@tanstack/react-query";
3
3
  import type { PermissionsResponse } from "./context";
4
4
  import type { ResourcePickerRevalidation, ResourceReferenceIdentity } from "./resource-reference";
5
5
  import type { ResourceListSchema } from "./resources/resource-list";
6
+ import type { ResourceFormBinding } from "./resources/resource-information";
6
7
  import type { ResourceTransferMeta } from "./resources/resource-transfer";
7
8
  /** A server-authorized, durable favorite identity. */
8
9
  export type FavoriteTarget = {
@@ -42,6 +43,8 @@ export interface ResourceCreateCompletion {
42
43
  /** Cancel a contextual create flow; returns true when the host returned to its origin. */
43
44
  cancel: () => boolean;
44
45
  isContextual: boolean;
46
+ /** The create form is rendered over its caller and can open another inline form. */
47
+ isInline?: boolean;
45
48
  }
46
49
  export interface ResourceCreateReceiverRegistration {
47
50
  target: ResourceCreateContinuationTarget;
@@ -232,6 +235,11 @@ interface NxComboboxBaseProps<TValue extends string | number> {
232
235
  emptyLabel?: ReactNode;
233
236
  searchValue?: string;
234
237
  onSearchChange?: (query: string) => void;
238
+ /** Await an authorized query using the same source as the displayed options. */
239
+ searchOptions?: {
240
+ scopeKey: string;
241
+ search: (query: string, signal?: AbortSignal) => Promise<readonly NxComboboxOption<TValue>[]>;
242
+ };
235
243
  loading?: boolean;
236
244
  id?: string;
237
245
  describedBy?: string;
@@ -614,10 +622,31 @@ export interface NxIconLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorEle
614
622
  className?: string;
615
623
  }
616
624
  export interface NxCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
625
+ onCheckedChange?: (checked: boolean) => void;
617
626
  inputSize?: "sm" | "md";
618
627
  indeterminate?: boolean;
619
628
  label?: string;
620
629
  }
630
+ export interface NxSwitchProps {
631
+ inputSize?: "xs" | "sm" | "md";
632
+ label?: ReactNode;
633
+ checked?: boolean;
634
+ defaultChecked?: boolean;
635
+ disabled?: boolean;
636
+ className?: string;
637
+ id?: string;
638
+ name?: string;
639
+ value?: string;
640
+ required?: boolean;
641
+ "aria-label"?: string;
642
+ "aria-describedby"?: string;
643
+ onCheckedChange?: (checked: boolean) => void;
644
+ onChange?: (event: {
645
+ target: {
646
+ checked: boolean;
647
+ };
648
+ }) => void;
649
+ }
621
650
  export interface NxRadioGroupProps {
622
651
  name?: string;
623
652
  value?: string;
@@ -732,6 +761,9 @@ export interface NxOrgChartProps {
732
761
  testId?: string;
733
762
  }
734
763
  export interface NxFormFieldProps {
764
+ /** Canonical field identity; schema forms already supply it and must not repeat it. */
765
+ fieldKey?: string;
766
+ sensitive?: boolean;
735
767
  label: ReactNode;
736
768
  labelTooltip?: ReactNode;
737
769
  children: (context: {
@@ -749,6 +781,8 @@ export interface NxFormFieldProps {
749
781
  className?: string;
750
782
  }
751
783
  export interface NxFormSectionProps {
784
+ /** Explicit unsaved semantics for composed forms; uses published route identity. */
785
+ binding?: ResourceFormBinding;
752
786
  id?: string;
753
787
  children: ReactNode;
754
788
  onSubmit?: (event: FormEvent<HTMLFormElement>) => void;
@@ -834,6 +868,12 @@ export interface NxSectionCardProps {
834
868
  }
835
869
  /** Canonical vertical rhythm for sibling sections outside a route frame. */
836
870
  export type NxSectionStackProps = HTMLAttributes<HTMLDivElement>;
871
+ export interface SectionRowProps {
872
+ label: ReactNode;
873
+ description?: ReactNode;
874
+ children: ReactNode;
875
+ className?: string;
876
+ }
837
877
  export interface NxSelectOption<TValue extends string | number> {
838
878
  value: TValue;
839
879
  label: ReactNode;
@@ -1022,12 +1062,15 @@ export interface NxTextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAre
1022
1062
  invalid?: boolean;
1023
1063
  autoResize?: boolean;
1024
1064
  resizable?: boolean;
1065
+ onValueChange?: (value: string) => void;
1025
1066
  }
1026
1067
  export interface NxTextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
1027
1068
  inputSize?: "md" | "lg";
1028
1069
  appearance?: "field" | "title";
1029
1070
  mono?: boolean;
1030
1071
  invalid?: boolean;
1072
+ /** Controlled value writer shared by direct editing and form integrations. */
1073
+ onValueChange?: (value: string) => void;
1031
1074
  }
1032
1075
  export interface NxDatePickerLabels {
1033
1076
  calendar: string;
@@ -1165,12 +1208,36 @@ export interface TabContextActionContext {
1165
1208
  signal?: AbortSignal;
1166
1209
  }
1167
1210
  export interface TabContextActionRegistration {
1211
+ /** Declares read or local draft work; neither saves nor submits. */
1212
+ effect?: "read" | "draft";
1168
1213
  type: string;
1169
1214
  label: string;
1170
1215
  description?: string;
1171
1216
  inputSchema?: Record<string, unknown>;
1172
1217
  run: (payload: Record<string, unknown>, context: TabContextActionContext) => TabContextActionResult | Promise<TabContextActionResult>;
1173
1218
  }
1219
+ /** Explicit form-owner binding. Reference resolution and field rules stay in the App. */
1220
+ export interface DraftFieldBinding {
1221
+ value: unknown;
1222
+ initialValue: unknown;
1223
+ inputSchema: Record<string, unknown>;
1224
+ /** Return a canonical value or throw for invalid/unresolved input. */
1225
+ parse: (input: unknown) => unknown;
1226
+ apply: (value: unknown) => void;
1227
+ }
1228
+ export interface RegisterDraftActionOptions {
1229
+ actionType: string;
1230
+ label: string;
1231
+ description?: string;
1232
+ resourceKey: string;
1233
+ resourceId: string | null;
1234
+ /** Local form context identity (for example tenant and selected create owner); never grants authority. */
1235
+ scopeKey?: string;
1236
+ enabled: boolean;
1237
+ fields: Record<string, DraftFieldBinding>;
1238
+ /** Return invalid field keys for App-owned cross-field constraints, before any writer runs. */
1239
+ validateBatch?: (values: Readonly<Record<string, unknown>>) => readonly string[];
1240
+ }
1174
1241
  export interface WorkSurfaceLabelInput {
1175
1242
  action: WorkSurfaceAction;
1176
1243
  resourceLabel: string;
@@ -1227,12 +1294,21 @@ export interface ListLocateRecord {
1227
1294
  hint?: string;
1228
1295
  showUrl?: string;
1229
1296
  editUrl?: string;
1297
+ /** Authorized edit destination's draft-only action; the host still verifies
1298
+ * the mounted action, record and completion before reporting success. */
1299
+ editDraft?: {
1300
+ resourceKey: string;
1301
+ action: string;
1302
+ inputSchema: Record<string, unknown>;
1303
+ };
1230
1304
  }
1231
1305
  export interface UseRegisterListLocateActionOptions<Row> {
1232
1306
  actionType: string;
1233
1307
  label: string;
1234
1308
  description?: string;
1235
1309
  enabled: boolean;
1310
+ /** Tenant/authority/organization identity; exclude ordinary search text. */
1311
+ scopeKey?: string;
1236
1312
  schema: ResourceListSchema | undefined;
1237
1313
  params: Pick<ResourceListParamsControls, "setParams" | "perPage">;
1238
1314
  fetchPage: (params: ResourceListParams) => Promise<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexia/sdk",
3
- "version": "0.6.5",
3
+ "version": "0.7.0",
4
4
  "description": "Frontend contracts for Nexia App Packages",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "scripts": {
32
32
  "build": "node scripts/build.mjs",
33
33
  "prepack": "npm run build",
34
- "test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node scripts/organization-target-contract.mjs",
34
+ "test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node tests/SettingsPrimitivesTest.mjs && node scripts/organization-target-contract.mjs",
35
35
  "test:wire-values": "node tests/WireValuesTest.mjs",
36
36
  "typecheck": "tsc -p tsconfig.json --noEmit",
37
37
  "test:resource-composition": "pnpm run build && node tests/ResourceCompositionFrontendContractsTest.mjs",