@nocobase/client-v2 2.2.0-alpha.7 → 2.2.0-alpha.8
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/es/flow/components/FieldAssignValueInput.d.ts +6 -0
- package/es/flow/components/filter/FilterGroup.d.ts +1 -0
- package/es/flow/components/filter/VariableFilterItem.d.ts +1 -0
- package/es/index.mjs +10 -10
- package/lib/index.js +30 -30
- package/package.json +7 -7
- package/src/BaseApplication.tsx +3 -2
- package/src/__tests__/app.test.tsx +29 -0
- package/src/components/form/TypedVariableInput.tsx +12 -8
- package/src/components/form/__tests__/TypedVariableInput.test.tsx +44 -3
- package/src/flow/actions/__tests__/linkageRulesRefresh.test.ts +7 -3
- package/src/flow/actions/linkageRulesRefresh.tsx +2 -6
- package/src/flow/components/FieldAssignValueInput.tsx +21 -0
- package/src/flow/components/__tests__/FieldAssignValueInput.context.test.tsx +84 -2
- package/src/flow/components/filter/FilterGroup.tsx +33 -5
- package/src/flow/components/filter/VariableFilterItem.tsx +139 -6
- package/src/flow/components/filter/__tests__/FilterGroup.test.tsx +45 -0
- package/src/flow/components/filter/__tests__/VariableFilterItem.leftMetaTree.test.tsx +9 -0
- package/src/flow/components/filter/__tests__/VariableFilterItem.test.tsx +21 -0
- package/src/flow/models/blocks/table/TableActionsColumnModel.tsx +2 -1
- package/src/flow/models/fields/VariableFieldFormModel.tsx +3 -3
- package/src/flow/models/fields/__tests__/VariableFieldFormModel.test.tsx +51 -0
|
@@ -10,6 +10,11 @@ import React from 'react';
|
|
|
10
10
|
import { dayjs } from '@nocobase/utils/client';
|
|
11
11
|
import { type CollectionField, type MetaTreeNode } from '@nocobase/flow-engine';
|
|
12
12
|
import { type ExactDatePickerMode } from './FieldAssignExactDatePicker';
|
|
13
|
+
type VariableInputConverters = {
|
|
14
|
+
renderInputComponent?: (metaTreeNode: MetaTreeNode | null) => React.ComponentType<any> | null;
|
|
15
|
+
resolvePathFromValue?: (value: any) => string[] | undefined;
|
|
16
|
+
resolveValueFromPath?: (metaTreeNode: MetaTreeNode) => any;
|
|
17
|
+
};
|
|
13
18
|
export type DateVariableExactNormalizeMode = 'none' | 'date' | 'datetimeNoTz' | 'iso';
|
|
14
19
|
export declare function toExactPickerDisplayValue(rawValue: unknown, options: {
|
|
15
20
|
format: string;
|
|
@@ -56,6 +61,7 @@ interface Props {
|
|
|
56
61
|
allowRunJS?: boolean;
|
|
57
62
|
maxAssociationFieldDepth?: number;
|
|
58
63
|
disabled?: boolean;
|
|
64
|
+
variableConverters?: VariableInputConverters;
|
|
59
65
|
}
|
|
60
66
|
export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
|
|
61
67
|
export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
|