@nocobase/client-v2 2.2.0-alpha.6 → 2.2.0-alpha.7
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/BaseApplication.d.ts +1 -0
- package/es/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/collection-field-interface/CollectionFieldInterfaceManager.d.ts +1 -0
- package/es/flow/components/FieldAssignExactDatePicker.d.ts +1 -0
- package/es/flow/components/FieldAssignValueInput.d.ts +1 -0
- package/es/flow/components/RunJSValueEditor.d.ts +1 -0
- package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +17 -2
- package/es/index.mjs +86 -86
- package/lib/index.js +95 -95
- package/package.json +8 -7
- package/src/BaseApplication.tsx +9 -5
- package/src/__tests__/app.test.tsx +26 -0
- package/src/collection-field-interface/CollectionFieldInterface.ts +1 -0
- package/src/collection-field-interface/CollectionFieldInterfaceManager.ts +1 -0
- package/src/components/form/ScanInput/__tests__/useCodeScanner.test.tsx +145 -2
- package/src/components/form/ScanInput/useCodeScanner.ts +154 -2
- package/src/flow/FlowPage.tsx +9 -1
- package/src/flow/__tests__/FlowPage.test.tsx +50 -3
- package/src/flow/__tests__/FlowRoute.test.tsx +2 -2
- package/src/flow/admin-shell/admin-layout/AdminLayoutComponent.tsx +0 -1
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutComponent.test.tsx +253 -6
- package/src/flow/components/FieldAssignExactDatePicker.tsx +25 -11
- package/src/flow/components/FieldAssignValueInput.tsx +60 -15
- package/src/flow/components/FlowRoute.tsx +7 -3
- package/src/flow/components/RunJSValueEditor.tsx +9 -1
- package/src/flow/components/__tests__/FieldAssignValueInput.context.test.tsx +134 -0
- package/src/flow/models/blocks/filter-form/FilterFormBlockModel.tsx +1 -0
- package/src/flow/models/blocks/filter-form/FilterFormItemModel.tsx +27 -12
- package/src/flow/models/blocks/filter-form/__tests__/FilterFormItemModel.defineChildren.test.ts +36 -0
- package/src/flow/models/blocks/filter-form/__tests__/defaultValues.wiring.test.ts +34 -0
- package/src/flow/models/blocks/form/QuickEditFormModel.tsx +189 -36
- package/src/flow/models/blocks/form/__tests__/QuickEditFormModel.quickEdit.test.ts +350 -2
- package/src/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.tsx +1 -0
- package/src/flow/models/fields/mobile-components/MobileLazySelect.tsx +20 -10
- package/src/flow/models/fields/mobile-components/MobileSelect.tsx +24 -12
package/es/BaseApplication.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ export declare abstract class BaseApplication<TOptions extends BaseApplicationOp
|
|
|
143
143
|
setMaintaining(maintaining: boolean): void;
|
|
144
144
|
getOptions(): TOptions;
|
|
145
145
|
getName(): string;
|
|
146
|
+
getCdnUrl(): string;
|
|
146
147
|
getPublicPath(): string;
|
|
147
148
|
getApiUrl(pathname?: string): string;
|
|
148
149
|
getRouteUrl(pathname: string): string;
|
|
@@ -98,6 +98,7 @@ export declare abstract class CollectionFieldInterface {
|
|
|
98
98
|
titleUsable?: boolean;
|
|
99
99
|
usePathOptions?(field: any): any;
|
|
100
100
|
hidden?: boolean;
|
|
101
|
+
creatable?: boolean;
|
|
101
102
|
addComponentOption(componentOption: CollectionFieldInterfaceComponentOption): void;
|
|
102
103
|
getConfigureFormProperties(collectionInfo?: any): Record<string, ISchema>;
|
|
103
104
|
getDefaultValueProperty(): {
|
|
@@ -19,5 +19,6 @@ export interface FieldAssignExactDatePickerProps {
|
|
|
19
19
|
isRange?: boolean;
|
|
20
20
|
onChange?: (value: ExactDatePickerValue) => void;
|
|
21
21
|
style?: React.CSSProperties;
|
|
22
|
+
disabled?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare const FieldAssignExactDatePicker: React.FC<FieldAssignExactDatePickerProps>;
|
|
@@ -55,6 +55,7 @@ interface Props {
|
|
|
55
55
|
/** 是否允许在变量选择器中使用 RunJS。默认 true,保持历史行为。 */
|
|
56
56
|
allowRunJS?: boolean;
|
|
57
57
|
maxAssociationFieldDepth?: number;
|
|
58
|
+
disabled?: boolean;
|
|
58
59
|
}
|
|
59
60
|
export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
|
|
60
61
|
export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
|
|
@@ -11,6 +11,21 @@ import React from 'react';
|
|
|
11
11
|
export declare const QUICK_EDIT_POPOVER_MAX_HEIGHT = "calc(100vh - 96px)";
|
|
12
12
|
export declare const QUICK_EDIT_FORM_MAX_HEIGHT = "calc(100vh - 160px)";
|
|
13
13
|
export declare const QUICK_EDIT_MARKDOWN_HEIGHT = "min(480px, calc(100vh - 320px))";
|
|
14
|
+
type QuickEditViewBeforeClosePayload = {
|
|
15
|
+
result?: unknown;
|
|
16
|
+
force?: boolean;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
type QuickEditViewBeforeCloseHandler = (payload: QuickEditViewBeforeClosePayload) => Promise<boolean | void> | boolean | void;
|
|
20
|
+
type QuickEditViewUpdateConfig = {
|
|
21
|
+
preventClose?: boolean;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
type QuickEditViewContainer = {
|
|
25
|
+
close: (result?: unknown, force?: boolean) => Promise<boolean | void> | boolean | void;
|
|
26
|
+
update?: (newConfig: QuickEditViewUpdateConfig) => unknown;
|
|
27
|
+
beforeClose?: QuickEditViewBeforeCloseHandler;
|
|
28
|
+
};
|
|
14
29
|
export declare function getQuickEditFieldProps(collectionField: CollectionField, fieldProps?: Record<string, any>): {
|
|
15
30
|
[x: string]: any;
|
|
16
31
|
};
|
|
@@ -18,8 +33,7 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
18
33
|
fieldPath: string;
|
|
19
34
|
resource: SingleRecordResource;
|
|
20
35
|
collection: Collection;
|
|
21
|
-
|
|
22
|
-
viewContainer: any;
|
|
36
|
+
viewContainer: QuickEditViewContainer;
|
|
23
37
|
__onSubmitSuccess: any;
|
|
24
38
|
_fieldProps: any;
|
|
25
39
|
_onOk: any;
|
|
@@ -42,3 +56,4 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
42
56
|
addAppends(fieldPath: string, refresh?: boolean): void;
|
|
43
57
|
render(): React.JSX.Element;
|
|
44
58
|
}
|
|
59
|
+
export {};
|