@nocobase/client-v2 2.1.6 → 2.1.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/models/fields/AssociationFieldModel/RecordSelectFieldModel.d.ts +2 -0
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +1 -0
- package/es/flow/utils/dateTimeDisplayProps.d.ts +49 -0
- package/es/index.mjs +110 -90
- package/lib/index.js +89 -69
- package/package.json +7 -7
- package/src/flow/actions/__tests__/linkageRules.hiddenSync.restore.test.ts +19 -5
- package/src/flow/actions/__tests__/linkageRules.subFormSetFieldProps.test.ts +92 -0
- package/src/flow/actions/dateTimeFormat.tsx +42 -28
- package/src/flow/actions/linkageRules.tsx +45 -11
- package/src/flow/admin-shell/admin-layout/HelpLite.tsx +1 -3
- package/src/flow/components/DynamicFlowsIcon.tsx +447 -126
- package/src/flow/components/__tests__/DynamicFlowsIcon.test.tsx +148 -2
- package/src/flow/flows/editMarkdownFlow.tsx +1 -1
- package/src/flow/index.ts +1 -1
- package/src/flow/internal/utils/operatorSchemaHelper.ts +15 -1
- package/src/flow/models/blocks/filter-manager/flow-actions/__tests__/customizeFilterRender.test.tsx +56 -1
- package/src/flow/models/blocks/table/TableColumnModel.tsx +36 -3
- package/src/flow/models/blocks/table/__tests__/TableColumnModel.test.tsx +159 -1
- package/src/flow/models/fields/AssociationFieldModel/AssociationFieldModel.tsx +1 -1
- package/src/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.tsx +29 -6
- package/src/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.tsx +16 -4
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.tsx +24 -1
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableField.tsx +13 -1
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/__tests__/SubTableColumnModel.rowRecord.test.ts +12 -0
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/__tests__/SubTableFieldModel.reset.test.ts +180 -0
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/index.tsx +6 -4
- package/src/flow/models/fields/AssociationFieldModel/__tests__/AssociationFieldModel.updateAssociation.test.ts +72 -0
- package/src/flow/models/fields/AssociationFieldModel/__tests__/RecordPickerFieldModel.itemContext.test.ts +23 -0
- package/src/flow/models/fields/ClickableFieldModel.tsx +5 -0
- package/src/flow/models/fields/DisplayDateTimeFieldModel.tsx +29 -1
- package/src/flow/models/fields/SelectFieldModel.tsx +6 -4
- package/src/flow/models/fields/__tests__/DisplayDateTimeFieldModel.test.tsx +96 -0
- package/src/flow/models/fields/__tests__/SelectFieldModel.test.tsx +43 -0
- package/src/flow/utils/__tests__/dateTimeFormat.test.ts +258 -0
- package/src/flow/utils/dateTimeDisplayProps.ts +135 -0
- package/src/settings-center/plugin-manager/index.tsx +3 -0
|
@@ -23,6 +23,8 @@ export declare function collectAssociationHydrationCandidates(options: {
|
|
|
23
23
|
labelKey: string;
|
|
24
24
|
statusMap: Map<string, HydrateStatus>;
|
|
25
25
|
}): HydrationCandidate[];
|
|
26
|
+
export declare function getAssociationHydrationNamePath(model: any): any;
|
|
27
|
+
export declare function getAssociationHydrationSetterContext(model: any): any;
|
|
26
28
|
export declare function CreateContent({ model, toOne }: {
|
|
27
29
|
model: any;
|
|
28
30
|
toOne?: boolean;
|
package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare function FieldWithoutPermissionPlaceholder({ targetModel }: {
|
|
|
18
18
|
}): React.JSX.Element;
|
|
19
19
|
export declare function buildRowPathFromFieldIndex(fieldIndex: unknown): Array<string | number> | null;
|
|
20
20
|
export declare function getLatestSubTableRowRecord(form: any, fieldIndex: unknown, fallbackRecord: any): any;
|
|
21
|
+
export declare function buildSubTableColumnNamePath(fieldPath: Array<string | number>, rowIdx: number, namePath: string | number, rowFieldIndex: unknown): Array<string | number>;
|
|
21
22
|
export declare function isSubTableColumnReadPretty(parent: any): boolean;
|
|
22
23
|
export declare function isSubTableColumnConfiguredReadPretty(parent: any): boolean;
|
|
23
24
|
export declare function getSubTableColumnTitleField(parent: any): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import type { FlowModelContext } from '@nocobase/flow-engine';
|
|
10
|
+
type DateTimeDisplayProps = {
|
|
11
|
+
dateOnly?: boolean;
|
|
12
|
+
dateFormat?: string;
|
|
13
|
+
format?: string;
|
|
14
|
+
picker?: string;
|
|
15
|
+
showTime?: boolean;
|
|
16
|
+
timeFormat?: string;
|
|
17
|
+
};
|
|
18
|
+
type DateTimeCollectionField = {
|
|
19
|
+
type?: string;
|
|
20
|
+
interface?: string;
|
|
21
|
+
getComponentProps?: () => DateTimeDisplayProps;
|
|
22
|
+
targetCollection?: {
|
|
23
|
+
getField?: (name?: string) => DateTimeCollectionField | undefined;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type DateTimeModelContext = FlowModelContext & {
|
|
27
|
+
collectionField?: DateTimeCollectionField;
|
|
28
|
+
};
|
|
29
|
+
type DateTimeModel = {
|
|
30
|
+
props?: DateTimeDisplayProps & {
|
|
31
|
+
titleField?: string;
|
|
32
|
+
};
|
|
33
|
+
context?: DateTimeModelContext;
|
|
34
|
+
getStepParams?: (flowKey: string, stepKey: string) => DateTimeDisplayProps | undefined;
|
|
35
|
+
};
|
|
36
|
+
type ResolveDateTimeDisplayPropsOptions = {
|
|
37
|
+
model?: DateTimeModel;
|
|
38
|
+
collectionField?: DateTimeCollectionField;
|
|
39
|
+
titleField?: string;
|
|
40
|
+
currentProps?: DateTimeDisplayProps;
|
|
41
|
+
params?: DateTimeDisplayProps;
|
|
42
|
+
withDefaults?: boolean;
|
|
43
|
+
};
|
|
44
|
+
export declare const getDateTimeFormatCollectionField: (options: ResolveDateTimeDisplayPropsOptions) => DateTimeCollectionField;
|
|
45
|
+
export declare const isTimeCollectionField: (collectionField?: DateTimeCollectionField) => boolean;
|
|
46
|
+
export declare const isDateOnlyCollectionField: (collectionField?: DateTimeCollectionField) => boolean;
|
|
47
|
+
export declare const getSavedDateTimeFormatParams: (model?: DateTimeModel) => DateTimeDisplayProps;
|
|
48
|
+
export declare const resolveDateTimeDisplayProps: (options: ResolveDateTimeDisplayPropsOptions) => DateTimeDisplayProps;
|
|
49
|
+
export {};
|