@nocobase/client-v2 2.1.21 → 2.1.23
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 -1
- package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +17 -1
- package/es/index.mjs +80 -80
- package/lib/index.js +90 -90
- package/package.json +8 -7
- package/src/BaseApplication.tsx +7 -6
- package/src/__tests__/app.test.tsx +55 -0
- package/src/components/form/ScanInput/__tests__/useCodeScanner.test.tsx +145 -2
- package/src/components/form/ScanInput/useCodeScanner.ts +154 -2
- package/src/flow/actions/__tests__/linkageRulesRefresh.test.ts +7 -3
- package/src/flow/actions/linkageRulesRefresh.tsx +2 -6
- 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/form/QuickEditFormModel.tsx +177 -19
- package/src/flow/models/blocks/form/__tests__/QuickEditFormModel.quickEdit.test.ts +320 -1
- package/src/flow/models/blocks/table/TableActionsColumnModel.tsx +2 -1
- 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
|
@@ -141,7 +141,7 @@ export declare abstract class BaseApplication<TOptions extends BaseApplicationOp
|
|
|
141
141
|
setMaintaining(maintaining: boolean): void;
|
|
142
142
|
getOptions(): TOptions;
|
|
143
143
|
getName(): string;
|
|
144
|
-
getCdnUrl():
|
|
144
|
+
getCdnUrl(): string;
|
|
145
145
|
getPublicPath(): string;
|
|
146
146
|
getApiUrl(pathname?: string): string;
|
|
147
147
|
getRouteUrl(pathname: string): string;
|
|
@@ -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,7 +33,7 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
18
33
|
fieldPath: string;
|
|
19
34
|
resource: SingleRecordResource;
|
|
20
35
|
collection: Collection;
|
|
21
|
-
viewContainer:
|
|
36
|
+
viewContainer: QuickEditViewContainer;
|
|
22
37
|
__onSubmitSuccess: any;
|
|
23
38
|
_fieldProps: any;
|
|
24
39
|
_onOk: any;
|
|
@@ -41,3 +56,4 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
41
56
|
addAppends(fieldPath: string, refresh?: boolean): void;
|
|
42
57
|
render(): React.JSX.Element;
|
|
43
58
|
}
|
|
59
|
+
export {};
|