@nocobase/plugin-ai 2.2.0-beta.6 → 2.2.0-beta.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.
Files changed (46) hide show
  1. package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/knowledge/index.md +8 -0
  2. package/dist/ai/docs/nocobase/development/index.md +6 -2
  3. package/dist/ai/docs/nocobase/plugin-development/client/index.md +1 -0
  4. package/dist/ai/docs/nocobase/shared-components/create-form-registry.md +38 -0
  5. package/dist/ai/docs/nocobase/shared-components/filter/collection-filter-panel.md +44 -0
  6. package/dist/ai/docs/nocobase/shared-components/filter/index.md +44 -0
  7. package/dist/ai/docs/nocobase/shared-components/form/code-scanner.md +34 -0
  8. package/dist/ai/docs/nocobase/shared-components/form/dialog-form-layout.md +45 -0
  9. package/dist/ai/docs/nocobase/shared-components/form/drawer-form-layout.md +45 -0
  10. package/dist/ai/docs/nocobase/shared-components/form/env-variable-input.md +30 -0
  11. package/dist/ai/docs/nocobase/shared-components/form/file-size-input.md +24 -0
  12. package/dist/ai/docs/nocobase/shared-components/form/json-text-area.md +28 -0
  13. package/dist/ai/docs/nocobase/shared-components/form/password-input.md +23 -0
  14. package/dist/ai/docs/nocobase/shared-components/form/remote-select.md +34 -0
  15. package/dist/ai/docs/nocobase/shared-components/form/scan-input.md +27 -0
  16. package/dist/ai/docs/nocobase/shared-components/form/typed-variable-input.md +30 -0
  17. package/dist/ai/docs/nocobase/shared-components/form/variable-input.md +35 -0
  18. package/dist/ai/docs/nocobase/shared-components/form/variable-json-text-area.md +33 -0
  19. package/dist/ai/docs/nocobase/shared-components/form/variable-text-area.md +33 -0
  20. package/dist/ai/docs/nocobase/shared-components/icon.md +21 -0
  21. package/dist/ai/docs/nocobase/shared-components/index.md +70 -0
  22. package/dist/ai/docs/nocobase/shared-components/table/index.md +39 -0
  23. package/dist/ai/docs/nocobase/shared-components/table/sort-handle.md +37 -0
  24. package/dist/ai/docs/nocobase/shared-components/table/sortable-row.md +36 -0
  25. package/dist/client/580.35ba54ff91b7fe6d.js +10 -0
  26. package/dist/client/ai-employees/admin/mcp/schemas.d.ts +46 -18
  27. package/dist/client/index.js +1 -1
  28. package/dist/collections/ai-mcp-clients.js +5 -0
  29. package/dist/externalVersion.js +16 -16
  30. package/dist/locale/en-US.json +8 -3
  31. package/dist/locale/zh-CN.json +8 -3
  32. package/dist/node_modules/@langchain/xai/package.json +1 -1
  33. package/dist/node_modules/fs-extra/package.json +1 -1
  34. package/dist/node_modules/jsonrepair/package.json +1 -1
  35. package/dist/node_modules/just-bash/package.json +1 -1
  36. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  37. package/dist/node_modules/openai/package.json +1 -1
  38. package/dist/node_modules/zod/package.json +1 -1
  39. package/dist/server/ai-employees/ai-employee.js +8 -3
  40. package/dist/server/plugin.d.ts +2 -0
  41. package/dist/server/plugin.js +30 -0
  42. package/dist/server/resource/aiConversations.js +1 -1
  43. package/dist/server/resource/aiMcpClients.js +2 -2
  44. package/dist/server/resource/aiTools.js +14 -9
  45. package/package.json +2 -2
  46. package/dist/client/580.e75f97fb883ad042.js +0 -10
@@ -64,6 +64,14 @@ The core of this example is three synchronization workflows. They process the sa
64
64
 
65
65
  `Key` is the most important field in the synchronization chain. Create, update, and delete workflows must use the same `Key` rule. The example directly uses the record ID of the `Answers` collection.
66
66
 
67
+ :::tip Text content ingestion and vectorization
68
+
69
+ When configuring a Create document or Update document node, if `Document type` is set to `Text`, the workflow first saves the text field selected in `Content` as a `.txt` document, then writes it to the target knowledge base. The knowledge base then generates segments according to the current segmentation settings, vectorizes enabled segments together with their related questions, and stores them in the vector database bound to the knowledge base.
70
+
71
+ This process runs as an asynchronous workflow node. A completed node does not mean the document can be retrieved immediately. Usually, wait until `Status` in the `Documents` list changes to `Success` before checking segments or running hit tests.
72
+
73
+ :::
74
+
67
75
  ## Operation guides
68
76
 
69
77
  - [Create document](./create-document)
@@ -2,8 +2,8 @@
2
2
  pageType: home
3
3
  pageName: development
4
4
  title: "NocoBase Development Guide"
5
- description: "NocoBase development guide: plugin development, FlowEngine, RunJS, block/field/action extensions, data source extensions, workflow extensions, authentication extensions."
6
- keywords: "NocoBase,development guide,plugin development,FlowEngine,RunJS,NocoBase extensions"
5
+ description: "NocoBase development guide: plugin development, shared components, FlowEngine, RunJS, block/field/action extensions, data source extensions, workflow extensions, authentication extensions."
6
+ keywords: "NocoBase,development guide,plugin development,shared components,FlowEngine,RunJS,NocoBase extensions"
7
7
  features:
8
8
  - title: Core Development
9
9
  details: Master NocoBase's underlying extension mechanism and advanced development capabilities, including the plugin system, AI assistance, FlowEngine and RunJS environment, to build a solid development foundation.
@@ -24,6 +24,10 @@ features:
24
24
  details: JavaScript execution environment for JS blocks, JS fields, and JS actions, and similar scenarios.
25
25
  link: /runjs
26
26
  showOnHome: true
27
+ - title: Shared Components
28
+ details: Reuse the built-in form, filter, table, and icon components in NocoBase client v2 when building plugin pages.
29
+ link: /shared-components
30
+ showOnHome: true
27
31
  - title: Plugin Ecosystem
28
32
  details: Extend the capabilities of existing plugins through other plugins, building a hierarchical and modular plugin ecosystem to enhance system extensibility and collaboration.
29
33
  items:
@@ -29,6 +29,7 @@ Specifically:
29
29
  1. **[Plugin](./plugin)**: The plugin entry class. Register routes, models, and other resources in lifecycle methods like `load()`.
30
30
  2. **[Router](./router)**: Register page routes via `router.add()` and plugin settings pages via `pluginSettingsManager`.
31
31
  3. **[Component](./component/index.md)**: Routes mount React components. Just use React + Antd by default -- no different from regular frontend development.
32
+ | Find reusable form, filter, and table components | [Shared Components](/shared-components/) |
32
33
  4. **[Context](./ctx/index.md)**: In plugins, access context via `this.context`; in components, use `useFlowContext()` to get the context. This gives you access to NocoBase capabilities -- making requests (`ctx.api`), internationalization (`ctx.t`), logging (`ctx.logger`), etc.
33
34
  5. **[FlowEngine](./flow-engine/index.md)**: If your components need to appear in the "Add Block / Field / Action" menus and support visual configuration by users, you need to wrap them with FlowModel.
34
35
 
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: "createFormRegistry"
3
+ description: "createFormRegistry: Create an internal registry for plugin extension items."
4
+ keywords: "createFormRegistry,NocoBase,client-v2"
5
+ ---
6
+
7
+ # createFormRegistry
8
+
9
+ `createFormRegistry` is used to create an internal registry for plugin extension items.
10
+
11
+ ## Basic Usage
12
+
13
+ ```ts
14
+ import { createFormRegistry, type FormRegistryEntry } from '@nocobase/client-v2';
15
+
16
+ interface StorageType extends FormRegistryEntry {
17
+ title: string;
18
+ Component: React.ComponentType;
19
+ }
20
+
21
+ const storageTypes = createFormRegistry<StorageType>('file-manager/storage-types');
22
+
23
+ storageTypes.register({ name: 'local', title: 'Local', Component: LocalStorageForm });
24
+ storageTypes.register({ name: 's3', title: 'Amazon S3', Component: S3StorageForm });
25
+
26
+ const s3 = storageTypes.get('s3');
27
+ const all = storageTypes.list();
28
+ ```
29
+
30
+ ## API
31
+
32
+ | Prop | Type | Description |
33
+ | --- | --- | --- |
34
+ | `register(entry)` | `-` | Register an entry |
35
+ | `unregister(name)` | `-` | Remove an entry |
36
+ | `get(name)` | `-` | Get an entry by name |
37
+ | `has(name)` | `-` | Check whether an entry exists |
38
+ | `list()` | `-` | Return all entries |
@@ -0,0 +1,44 @@
1
+ ---
2
+ title: "CollectionFilterPanel"
3
+ description: "CollectionFilterPanel: Embed a Collection filter panel in a page."
4
+ keywords: "CollectionFilterPanel,NocoBase,client-v2"
5
+ ---
6
+
7
+ # CollectionFilterPanel
8
+
9
+ `CollectionFilterPanel` is used to embed a Collection filter panel in a page.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx
14
+ import { CollectionFilterPanel, type CollectionFilterPanelRef } from '@nocobase/client-v2';
15
+
16
+ const ref = useRef<CollectionFilterPanelRef>(null);
17
+
18
+ <CollectionFilterPanel ref={ref} collection={collection} t={t} />;
19
+
20
+ const filter = ref.current?.getFilter();
21
+ ```
22
+
23
+ ## API
24
+
25
+ | Prop | Type | Description |
26
+ | --- | --- | --- |
27
+ | `collection` | `Collection | undefined` | Collection used as the field source |
28
+ | `initialValue` | `Record<string, unknown>` | Initial filter value |
29
+ | `onChange` | `(filter) => void` | Change callback |
30
+ | `t` | `(key, options?) => string` | Translation function |
31
+ | `filterableFieldNames` | `string[]` | Field allowlist |
32
+ | `nonfilterableFieldNames` | `string[]` | Field blocklist |
33
+ | `noIgnore` | `boolean` | Skip allowlist restrictions |
34
+
35
+ ## Methods
36
+
37
+ | Method | Description |
38
+ | --- | --- |
39
+ | `getFilter()` | Get the compiled filter |
40
+ | `reset()` | Clear all conditions |
41
+
42
+ ## Related Links
43
+
44
+ - [CollectionFilter](./)
@@ -0,0 +1,44 @@
1
+ ---
2
+ title: "CollectionFilter"
3
+ description: "CollectionFilter: Filter a Collection with multiple conditions."
4
+ keywords: "CollectionFilter,NocoBase,client-v2"
5
+ ---
6
+
7
+ # CollectionFilter
8
+
9
+ `CollectionFilter` is used to filter a Collection with multiple conditions.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx
14
+ import { CollectionFilter } from '@nocobase/client-v2';
15
+
16
+ <CollectionFilter
17
+ collection={collection}
18
+ t={t}
19
+ onChange={(filter) => {
20
+ listRequest.run({ filter });
21
+ }}
22
+ />;
23
+ ```
24
+
25
+ ## API
26
+
27
+ | Prop | Type | Description |
28
+ | --- | --- | --- |
29
+ | `collection` | `Collection | undefined` | Collection used as the field source |
30
+ | `initialValue` | `Record<string, unknown>` | Initial filter value |
31
+ | `onChange` | `(filter) => void` | Change callback |
32
+ | `t` | `(key, options?) => string` | Translation function |
33
+ | `filterableFieldNames` | `string[]` | Field allowlist |
34
+ | `nonfilterableFieldNames` | `string[]` | Field blocklist |
35
+ | `noIgnore` | `boolean` | Skip allowlist restrictions |
36
+ | `buttonText` | `React.ReactNode` | Custom button text |
37
+ | `showCount` | `boolean` | Whether to show the number of conditions |
38
+ | `popoverProps` | `PopoverProps` | Props passed to Antd Popover |
39
+ | `buttonProps` | `ButtonProps` | Props passed to Antd Button |
40
+ | `popoverMinWidth` | `number` | Minimum width of the Popover content |
41
+
42
+ ## Related Links
43
+
44
+ - [CollectionFilterPanel](./collection-filter-panel)
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: "CodeScanner"
3
+ description: "CodeScanner: Control the low-level full-screen scanner."
4
+ keywords: "CodeScanner,NocoBase,client-v2"
5
+ ---
6
+
7
+ # CodeScanner
8
+
9
+ `CodeScanner` is used to control the low-level full-screen scanner.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx
14
+ import { CodeScanner } from '@nocobase/client-v2';
15
+
16
+ <CodeScanner
17
+ visible={visible}
18
+ onClose={() => setVisible(false)}
19
+ onScanSuccess={(text) => setValue(text)}
20
+ />;
21
+ ```
22
+
23
+ ## API
24
+
25
+ | Prop | Type | Description |
26
+ | --- | --- | --- |
27
+ | `visible` | `boolean` | Whether the scanner is visible |
28
+ | `formatsToSupport` | `Html5QrcodeSupportedFormats[]` | Supported QR code or barcode formats |
29
+ | `onClose` | `() => void` | Called when the scanner closes |
30
+ | `onScanSuccess` | `(result: string) => void` | Called after a successful scan |
31
+
32
+ ## Related Links
33
+
34
+ - [ScanInput](./scan-input)
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: "DialogFormLayout"
3
+ description: "DialogFormLayout: Put a standard form in a dialog."
4
+ keywords: "DialogFormLayout,NocoBase,client-v2"
5
+ ---
6
+
7
+ # DialogFormLayout
8
+
9
+ `DialogFormLayout` is used to put a standard form in a dialog.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx
14
+ import { DialogFormLayout } from '@nocobase/client-v2';
15
+
16
+ ctx.viewer.dialog({
17
+ closable: true,
18
+ content: () => (
19
+ <DialogFormLayout title={t('Bind verifier')} onSubmit={handleSubmit}>
20
+ <Form form={form} layout="vertical">
21
+ <Form.Item name="code" label={t('Code')}>
22
+ <Input />
23
+ </Form.Item>
24
+ </Form>
25
+ </DialogFormLayout>
26
+ ),
27
+ });
28
+ ```
29
+
30
+ ## API
31
+
32
+ | Prop | Type | Description |
33
+ | --- | --- | --- |
34
+ | `title` | `React.ReactNode` | Title content |
35
+ | `children` | `React.ReactNode` | Content rendered inside the component |
36
+ | `onCancel` | `() => void | Promise<void>` | Called before Cancel closes the view |
37
+ | `onSubmit` | `() => void | Promise<void>` | Called when Submit is clicked |
38
+ | `submitting` | `boolean` | Loading state of the submit button |
39
+ | `submitText` | `React.ReactNode` | Submit button text |
40
+ | `cancelText` | `React.ReactNode` | Cancel button text |
41
+ | `footer` | `React.ReactNode` | Replace the default footer |
42
+
43
+ ## Related Links
44
+
45
+ - [DrawerFormLayout](./drawer-form-layout)
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: "DrawerFormLayout"
3
+ description: "DrawerFormLayout: Put a standard form in a drawer."
4
+ keywords: "DrawerFormLayout,NocoBase,client-v2"
5
+ ---
6
+
7
+ # DrawerFormLayout
8
+
9
+ `DrawerFormLayout` is used to put a standard form in a drawer.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx
14
+ import { DrawerFormLayout } from '@nocobase/client-v2';
15
+
16
+ ctx.viewer.drawer({
17
+ width: '50%',
18
+ closable: true,
19
+ content: () => (
20
+ <DrawerFormLayout title={t('Add provider')} onSubmit={handleSubmit}>
21
+ <Form form={form} layout="vertical">
22
+ <Form.Item name="name" label={t('Name')} rules={[{ required: true }]}>
23
+ <Input />
24
+ </Form.Item>
25
+ </Form>
26
+ </DrawerFormLayout>
27
+ ),
28
+ });
29
+ ```
30
+
31
+ ## API
32
+
33
+ | Prop | Type | Description |
34
+ | --- | --- | --- |
35
+ | `title` | `React.ReactNode` | Title content |
36
+ | `children` | `React.ReactNode` | Content rendered inside the component |
37
+ | `onSubmit` | `() => void | Promise<void>` | Called when Submit is clicked |
38
+ | `submitting` | `boolean` | Loading state of the submit button |
39
+ | `submitText` | `React.ReactNode` | Submit button text |
40
+ | `cancelText` | `React.ReactNode` | Cancel button text |
41
+ | `footer` | `React.ReactNode` | Replace the default footer |
42
+
43
+ ## Related Links
44
+
45
+ - [DialogFormLayout](./dialog-form-layout)
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: "EnvVariableInput"
3
+ description: "EnvVariableInput: Allow only `$env` is used to environment variables."
4
+ keywords: "EnvVariableInput,NocoBase,client-v2"
5
+ ---
6
+
7
+ # EnvVariableInput
8
+
9
+ `EnvVariableInput` is used to allow only `$env` environment variables.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/env-variable-input.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `value` | `string` | Current value |
21
+ | `onChange` | `(value: string) => void` | Change callback |
22
+ | `addonBefore` | `React.ReactNode` | Content before the input |
23
+ | `disabled` | `boolean` | Whether disabled |
24
+ | `password` | `boolean` | Mask plain non-variable values |
25
+ | `placeholder` | `string` | Placeholder text |
26
+
27
+ ## Related Links
28
+
29
+ - [VariableInput](./variable-input)
30
+ - [TypedVariableInput](./typed-variable-input)
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: "FileSizeInput"
3
+ description: "FileSizeInput: Enter a file size and store it as bytes."
4
+ keywords: "FileSizeInput,NocoBase,client-v2"
5
+ ---
6
+
7
+ # FileSizeInput
8
+
9
+ `FileSizeInput` is used to enter a file size and store it as bytes.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/file-size-input.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `value` | `number` | Current value |
21
+ | `onChange` | `(value: number | null) => void` | Change callback |
22
+ | `disabled` | `boolean` | Whether disabled |
23
+ | `min` | `number` | Minimum value |
24
+ | `max` | `number` | Maximum value |
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: "JsonTextArea"
3
+ description: "JsonTextArea: Edit JSON / JSON5 configuration."
4
+ keywords: "JsonTextArea,NocoBase,client-v2"
5
+ ---
6
+
7
+ # JsonTextArea
8
+
9
+ `JsonTextArea` is used to edit JSON / JSON5 configuration.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/json-text-area.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `value` | `unknown` | Current value |
21
+ | `onChange` | `(value: unknown) => void` | Change callback |
22
+ | `space` | `number` | Stringify indentation |
23
+ | `json5` | `boolean` | Whether to parse with JSON5 |
24
+ | `showError` | `boolean` | Whether to show parse errors |
25
+
26
+ ## Related Links
27
+
28
+ - [VariableJsonTextArea](./variable-json-text-area)
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: "PasswordInput"
3
+ description: "PasswordInput: Enter a password with a strength indicator."
4
+ keywords: "PasswordInput,NocoBase,client-v2"
5
+ ---
6
+
7
+ # PasswordInput
8
+
9
+ `PasswordInput` is used to enter a password with a strength indicator.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/password-input.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `value` | `string` | Current value |
21
+ | `onChange` | `(event) => void` | Change callback |
22
+ | `disabled` | `boolean` | Whether disabled |
23
+ | `placeholder` | `string` | Placeholder text |
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: "RemoteSelect"
3
+ description: "RemoteSelect: Load Select options asynchronously from an API."
4
+ keywords: "RemoteSelect,NocoBase,client-v2"
5
+ ---
6
+
7
+ # RemoteSelect
8
+
9
+ `RemoteSelect` is used to load Select options asynchronously from an API.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx
14
+ import { RemoteSelect } from '@nocobase/client-v2';
15
+
16
+ <RemoteSelect<{ name: string; title: string }>
17
+ request={async () => {
18
+ const { data } = await ctx.api.resource('providers').list();
19
+ return data.data;
20
+ }}
21
+ fieldNames={{ label: 'title', value: 'name' }}
22
+ />;
23
+ ```
24
+
25
+ ## API
26
+
27
+ | Prop | Type | Description |
28
+ | --- | --- | --- |
29
+ | `request` | `() => Promise<T[]>` | Async request for loading options |
30
+ | `fieldNames` | `{ label; value }` | Map option label and value fields |
31
+ | `options` | `DefaultOptionType[]` | Static options |
32
+ | `mode` | `SelectProps['mode']` | Select mode |
33
+ | `showSearch` | `boolean` | Whether search is enabled |
34
+ | `filterOption` | `boolean | function` | Client-side option filtering |
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: "ScanInput"
3
+ description: "ScanInput: Add scanning support to an input."
4
+ keywords: "ScanInput,NocoBase,client-v2"
5
+ ---
6
+
7
+ # ScanInput
8
+
9
+ `ScanInput` is used to add scanning support to an input.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/scan-input.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `disableManualInput` | `boolean` | Make the input read-only |
21
+ | `enableScan` | `boolean` | Reserved prop; the scan button is always rendered |
22
+ | `formatsToSupport` | `Html5QrcodeSupportedFormats[]` | Supported QR code or barcode formats |
23
+ | `onChange` | `(value: string | ChangeEvent<HTMLInputElement>) => void` | Change callback |
24
+
25
+ ## Related Links
26
+
27
+ - [CodeScanner](./code-scanner)
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: "TypedVariableInput"
3
+ description: "TypedVariableInput: Allow a field to accept both constants and variables."
4
+ keywords: "TypedVariableInput,NocoBase,client-v2"
5
+ ---
6
+
7
+ # TypedVariableInput
8
+
9
+ `TypedVariableInput` is used to allow a field to accept both constants and variables.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/typed-variable-input.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `value` | `unknown` | Current value |
21
+ | `onChange` | `(next: unknown) => void` | Change callback |
22
+ | `types` | `TypedConstantSpec[]` | Allowed constant types |
23
+ | `namespaces` | `string[]` | Allowed top-level variable namespaces |
24
+ | `extraNodes` | `MetaTreeNode[]` | Additional local variable nodes |
25
+ | `nullable` | `boolean` | Whether null is allowed |
26
+ | `delimiters` | `[string, string]` | Variable delimiters |
27
+ | `disabled` | `boolean` | Whether disabled |
28
+ | `placeholder` | `string` | Placeholder text |
29
+ | `style` | `React.CSSProperties` | Custom style |
30
+ | `className` | `string` | Custom class name |
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: "VariableInput"
3
+ description: "VariableInput: Let a single-line field accept variables such as `{{ $env.X }}` is used to and `{{ $user.name }}`."
4
+ keywords: "VariableInput,NocoBase,client-v2"
5
+ ---
6
+
7
+ # VariableInput
8
+
9
+ `VariableInput` is used to let a single-line field accept variables such as `{{ $env.X }}` and `{{ $user.name }}`.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/variable-input.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `value` | `string` | Current value |
21
+ | `onChange` | `(value: string) => void` | Change callback |
22
+ | `disabled` | `boolean` | Whether disabled |
23
+ | `placeholder` | `string` | Placeholder text |
24
+ | `addonBefore` | `React.ReactNode` | Content before the input |
25
+ | `namespaces` | `string[]` | Allowed top-level variable namespaces |
26
+ | `extraNodes` | `MetaTreeNode[]` | Additional local variable nodes |
27
+ | `delimiters` | `[string, string]` | Variable delimiters |
28
+ | `className` | `string` | Custom class name |
29
+ | `style` | `React.CSSProperties` | Custom style |
30
+
31
+ ## Related Links
32
+
33
+ - [VariableTextArea](./variable-text-area)
34
+ - [EnvVariableInput](./env-variable-input)
35
+ - [TypedVariableInput](./typed-variable-input)
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: "VariableJsonTextArea"
3
+ description: "VariableJsonTextArea: Insert variables into JSON / JSON5 configuration."
4
+ keywords: "VariableJsonTextArea,NocoBase,client-v2"
5
+ ---
6
+
7
+ # VariableJsonTextArea
8
+
9
+ `VariableJsonTextArea` is used to insert variables into JSON / JSON5 configuration.
10
+
11
+ `VariableJsonTextArea` is based on [JsonTextArea](./json-text-area).
12
+
13
+ ## Basic Usage
14
+
15
+ ```tsx file="../_demos/variable-json-text-area.tsx" preview
16
+ ```
17
+
18
+ ## API
19
+
20
+ | Prop | Type | Description |
21
+ | --- | --- | --- |
22
+ | `value` | `unknown` | Current value |
23
+ | `onChange` | `(value: unknown) => void` | Change callback |
24
+ | `namespaces` | `string[]` | Allowed top-level variable namespaces |
25
+ | `extraNodes` | `MetaTreeNode[]` | Additional local variable nodes |
26
+ | `metaTree` | `MetaTreeNode[] | function` | Custom variable tree |
27
+ | `delimiters` | `[string, string]` | Variable delimiters |
28
+ | `formatPathToValue` | `(meta) => string | undefined` | Custom variable path formatter |
29
+
30
+ ## Related Links
31
+
32
+ - [JsonTextArea](./json-text-area)
33
+ - [VariableInput](./variable-input)
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: "VariableTextArea"
3
+ description: "VariableTextArea: Let multi-line text accept variables."
4
+ keywords: "VariableTextArea,NocoBase,client-v2"
5
+ ---
6
+
7
+ # VariableTextArea
8
+
9
+ `VariableTextArea` is used to let multi-line text accept variables.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="../_demos/variable-text-area.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `value` | `string` | Current value |
21
+ | `onChange` | `(value: string) => void` | Change callback |
22
+ | `disabled` | `boolean` | Whether disabled |
23
+ | `placeholder` | `string` | Placeholder text |
24
+ | `namespaces` | `string[]` | Allowed top-level variable namespaces |
25
+ | `extraNodes` | `MetaTreeNode[]` | Additional local variable nodes |
26
+ | `delimiters` | `[string, string]` | Variable delimiters |
27
+ | `rows` | `number` | Fixed row count |
28
+ | `maxRows` | `number` | Maximum row count |
29
+
30
+ ## Related Links
31
+
32
+ - [VariableInput](./variable-input)
33
+ - [VariableJsonTextArea](./variable-json-text-area)
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: "Icon"
3
+ description: "Icon: Use Ant Design icons or register custom icons."
4
+ keywords: "Icon,NocoBase,client-v2"
5
+ ---
6
+
7
+ # Icon
8
+
9
+ `Icon` is used to use Ant Design icons or register custom icons.
10
+
11
+ ## Basic Usage
12
+
13
+ ```tsx file="./_demos/icon.tsx" preview
14
+ ```
15
+
16
+ ## API
17
+
18
+ | Prop | Type | Description |
19
+ | --- | --- | --- |
20
+ | `type` | `string` | Icon name |
21
+ | `component` | `React.ComponentType` | Custom SVG component |