/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import _ from 'lodash'; import { FLOW_SURFACE_APPLY_BLUEPRINT_POPUP_DEFAULTS_KEY, type FlowSurfaceApplyBlueprintPopupDefaultsMetadata } from './blueprint/defaults'; import type { FlowSurfaceNodeSpec, FlowSurfaceNodeSubModel } from './types'; import { type FlowSurfacePublicRelationFieldType } from './field-type-resolver'; export declare function buildDefinedPayload(payload: Record): _.Dictionary; export declare function normalizeFlowSurfaceComposeKey(key: any, context: string): string; export declare function assertFlowSurfaceComposeUniqueKeys(items: Array<{ key?: string; }>, context: string): void; export declare function normalizeChartCardSettings(cardSettings: any): any; export declare function normalizeBlockTitleDescriptionValue(value: any): any; export declare function normalizeBlockTitleDescription(titleDescription: any): any; export declare function buildBlockTitleDescriptionFromSemanticChanges(changes: Record): { titleDescription: _.Dictionary; }; export declare function buildBlockCardSettingsFromSemanticChanges(changes: Record): {}; export declare function buildChartCardSettingsFromSemanticChanges(currentCardSettings: any, changes: Record): any; export declare function buildPopupTabTree(options: { tabUid?: string; gridUid?: string; title?: string; icon?: string; documentTitle?: string; flowRegistry?: Record; }): { subModels: { grid: { uid: string; use: string; }; }; flowRegistry?: Record; uid: string; use: string; props: _.Dictionary; stepParams: { pageTabSettings: { tab: _.Dictionary; }; }; }; export declare function getSingleNodeSubModel(subModel?: FlowSurfaceNodeSubModel | null): FlowSurfaceNodeSpec | undefined; export declare function getNodeSubModelList(subModel?: FlowSurfaceNodeSubModel | null): FlowSurfaceNodeSpec[]; export declare function flattenModel(node: any, carry?: Record): Record; export declare function buildDefaultFieldState(containerUse: string, fieldUse: string, field: any): { wrapperProps: {}; fieldProps: Record; }; export declare function hasOwnDefined(input: Record, key: string): boolean; export declare function hasMeaningfulChartSemanticPatch(input: Record, key: string): boolean; export declare function hasDefinedValue(input: Record, keys: string[]): boolean; export declare function ensureNoRawSimpleChangeKeys(changes: Record): void; export declare function ensureNoRawDirectAddKeys(actionName: string, values: Record, rawKeys: string[]): void; export declare function ensureNoDirectActionScopeKey(actionName: 'addAction' | 'addRecordAction', values: Record): void; export type NormalizedComposeFieldSpec = { index: number; key: string; fieldPath?: string; associationPathName?: string; renderer?: string; type?: string; fieldType?: FlowSurfacePublicRelationFieldType; fields?: string[]; titleField?: string; openMode?: string; popupSize?: string; pageSize?: number; showIndex?: boolean; target?: string; defaultTargetUid?: string; targetBlockUid?: string; settings: Record; popup?: Record; __autoPopupForRelationField?: boolean; [FLOW_SURFACE_APPLY_BLUEPRINT_POPUP_DEFAULTS_KEY]?: FlowSurfaceApplyBlueprintPopupDefaultsMetadata; }; export declare function normalizeComposeFieldSpec(input: any, index: number): NormalizedComposeFieldSpec; export declare function resolveRequestedFieldComponent(values: Record | undefined): any; export declare function resolveRequestedFieldUse(values: Record | undefined): any; export declare function resolveRequestedFieldUseAlias(values: Record | undefined): string; export declare function normalizeComposeActionSpec(input: any, index: number): { popup?: any; key: string; type: string; settings: any; }; export declare function normalizeSimpleResourceInit(input: any): _.Dictionary; export declare function isMissingRequiredResourceInitValue(value: any): boolean; export declare function joinRequiredFieldPaths(paths: string[]): string; export declare function normalizeSimpleLayoutValue(layout: any): any; export declare function normalizeGridCardColumns(columns: any): _.Dictionary; export declare function normalizeSimpleConfirm(confirm: any): _.Dictionary; export declare function normalizeAfterSuccess(afterSuccess: unknown): _.Dictionary; export declare function assertSupportedSimpleChanges(context: string, changes: Record, allowedKeys: string[]): void; export declare function hasLegacyLocatorFields(input: any, options?: { allowRootUid?: boolean; }): boolean; export declare function rethrowInlineConfigurationError(error: any, prefix: string): never; export declare function toFlowSurfaceBatchItemError(error: any): { message: string; errorCount: number; details: { requiredBlockPolicy?: { requiredBlockTypes: string[]; fixStrategy: string; doNotReplaceOrDrop: boolean; }; errorCount: number; mustFixAllErrorsBeforeRetry: boolean; retryPolicy: string; sameWriteRetryRequired: boolean; agentInstruction: string; }; errors: import("./errors").FlowSurfaceErrorItem[]; code: string; status: number; type: import("./errors").FlowSurfaceErrorType; } | { code: string; message: string; status: number; type: import("./errors").FlowSurfaceErrorType; }; export declare function splitComposeFieldChanges(changes: Record, wrapperUse?: string): { wrapperChanges: _.Dictionary; fieldChanges: _.Dictionary; }; export declare function getCatalogRecordActionContainerUse(use?: string): "DetailsBlockModel" | "ListItemModel" | "GridCardItemModel" | "TableActionsColumnModel" | "CommentItemModel"; export declare function normalizeRowSpans(spans?: Array): number[]; export declare function normalizePublicBlockHeightMode(input: any): string; export declare function normalizeStoredChartCardHeightMode(input: any): string; export declare function normalizeChartCardHeightModeForWrite(input: any): string; export declare function isFieldNodeUse(use?: string): boolean; export declare function getFieldBindingDefaultProps(containerUse: string, fieldUse: string, field: any): Record;