@nocobase/client 2.0.0-alpha.13 → 2.0.0-alpha.14
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/block-provider/hooks/index.d.ts +2 -1
- package/es/flow/components/code-editor/extension/CodeEditorExtension.d.ts +14 -0
- package/es/flow/components/{decorator → code-editor/extension}/index.d.ts +1 -1
- package/es/flow/components/code-editor/index.d.ts +4 -4
- package/es/flow/components/code-editor/panels/RightExtra.d.ts +3 -1
- package/es/flow/components/code-editor/types.d.ts +14 -0
- package/es/index.mjs +1663 -1658
- package/lib/{index-C3fHjsMw-DI4QGopA.js → index-C3fHjsMw-Dbd-7ROZ.js} +205 -205
- package/lib/index.js +75 -75
- package/package.json +6 -6
- package/es/flow/components/decorator/injectable.d.ts +0 -19
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import { Form } from '@formily/core';
|
|
9
10
|
import { ChangeEvent } from 'react';
|
|
10
11
|
import { NavigateFunction } from 'react-router-dom';
|
|
11
12
|
import { CollectionOptions } from '../../collection-manager';
|
|
@@ -26,7 +27,7 @@ export declare function getFormValues({ filterByTk, field, form, fieldNames, get
|
|
|
26
27
|
resource: any;
|
|
27
28
|
actionFields: any[];
|
|
28
29
|
}): any;
|
|
29
|
-
export declare function useCollectValuesToSubmit(): () => Promise<any>;
|
|
30
|
+
export declare function useCollectValuesToSubmit(f?: Form): () => Promise<any>;
|
|
30
31
|
export declare const useCreateActionProps: () => {
|
|
31
32
|
onClick(): Promise<void>;
|
|
32
33
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { CodeEditorExtra, CodeEditorExtraRegistry } from '../types';
|
|
10
|
+
export declare class CodeEditorExtension {
|
|
11
|
+
private static rightExtras;
|
|
12
|
+
static registerRightExtra(options: CodeEditorExtraRegistry): void;
|
|
13
|
+
static getRightExtras(): CodeEditorExtra[];
|
|
14
|
+
}
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import type { Completion } from '@codemirror/autocomplete';
|
|
11
|
-
import { InjectableRendingEventTriggerProps } from '../decorator';
|
|
12
|
-
import type { EditorRef } from './types';
|
|
13
11
|
interface CodeEditorProps {
|
|
14
12
|
value?: string;
|
|
15
13
|
onChange?: (value: string) => void;
|
|
@@ -19,11 +17,13 @@ interface CodeEditorProps {
|
|
|
19
17
|
theme?: 'light' | 'dark';
|
|
20
18
|
readonly?: boolean;
|
|
21
19
|
enableLinter?: boolean;
|
|
22
|
-
rightExtra?: ((editorRef: EditorRef, setActive: (key: string, active: boolean) => void) => React.ReactNode)[];
|
|
23
20
|
wrapperStyle?: React.CSSProperties;
|
|
24
21
|
extraCompletions?: Completion[];
|
|
25
22
|
version?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
language?: string;
|
|
26
25
|
scene?: string | string[];
|
|
27
26
|
}
|
|
28
27
|
export * from './types';
|
|
29
|
-
export
|
|
28
|
+
export * from './extension';
|
|
29
|
+
export declare const CodeEditor: React.FC<CodeEditorProps>;
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import type { EditorRef } from '../types';
|
|
11
11
|
export declare const RightExtra: React.FC<{
|
|
12
|
-
|
|
12
|
+
name?: string;
|
|
13
|
+
language?: string;
|
|
14
|
+
scene?: string | string[];
|
|
13
15
|
extraEditorRef: EditorRef;
|
|
14
16
|
onActionCountChange?: (count: number) => void;
|
|
15
17
|
extraContent?: React.ReactNode;
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import { ComponentType } from 'react';
|
|
10
|
+
import { SnippetEntry } from './runjsCompletions';
|
|
9
11
|
/**
|
|
10
12
|
* Shared types for CodeEditor components
|
|
11
13
|
*/
|
|
@@ -13,4 +15,16 @@ export interface EditorRef {
|
|
|
13
15
|
write(document: string): void;
|
|
14
16
|
read(): string;
|
|
15
17
|
buttonGroupHeight?: number;
|
|
18
|
+
snippetEntries: SnippetEntry[];
|
|
16
19
|
}
|
|
20
|
+
export type CodeEditorExtra = ComponentType<{
|
|
21
|
+
name?: string;
|
|
22
|
+
language?: string;
|
|
23
|
+
scene?: string | string[];
|
|
24
|
+
editorRef: EditorRef;
|
|
25
|
+
setActive: (key: string, active: boolean) => void;
|
|
26
|
+
}>;
|
|
27
|
+
export type CodeEditorExtraRegistry = {
|
|
28
|
+
name: string;
|
|
29
|
+
extra: CodeEditorExtra;
|
|
30
|
+
};
|