@nocobase/client 2.0.0-alpha.21 → 2.0.0-alpha.22

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.
@@ -6,7 +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 React, { ReactNode } from "react";
9
+ import React, { ReactNode } from 'react';
10
10
  export declare const BlockConfigsContext: React.Context<{
11
11
  getConfigs: () => any;
12
12
  setConfigs: (value: any, shouldNotify?: boolean) => void;
@@ -47,7 +47,7 @@ export declare const useFilterDataSource: (options: any) => import("../api-clien
47
47
  export declare const useFilterAction: () => {
48
48
  run(): Promise<void>;
49
49
  };
50
- export declare const useCreateAction: (actionCallback?: (values: any, collections: any[]) => void) => {
50
+ export declare const useCreateAction: (actionCallback?: (values: any) => void) => {
51
51
  run(): Promise<void>;
52
52
  };
53
53
  export declare const useCreateActionWithoutRefresh: (actionCallback?: (values: any) => void) => {
@@ -35,6 +35,7 @@ export declare class DataSourceManager {
35
35
  constructor(options: DataSourceManagerOptions, app: Application);
36
36
  addCollectionMixins(mixins?: (typeof Collection)[]): void;
37
37
  getDataSources(filterDataSource?: (dataSource: DataSource) => boolean): DataSource[];
38
+ setDataSources(dataSources: DataSourceOptions[]): void;
38
39
  getDataSource(key?: string): DataSource;
39
40
  removeDataSources(keys: string[]): void;
40
41
  addDataSource(DataSource: DataSourceFactory, options: DataSourceOptions): DataSource;
@@ -0,0 +1,31 @@
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 { Liquid } from 'liquidjs';
10
+ export declare class LiquidEngine extends Liquid {
11
+ constructor(options?: {});
12
+ /**
13
+ * 将路径数组转为 Liquid 模板上下文对象
14
+ * @param {string[]} paths - 如 ['ctx.user.name', 'ctx.order.total']
15
+ * @returns {object} 形如 { user: { name: '{{ctx.user.name}}' }, order: {...} }
16
+ */
17
+ transformLiquidContext(paths?: any[]): {};
18
+ /**
19
+ * 渲染模板
20
+ * @param {string} template - Liquid 模板字符串
21
+ * @param {object} context - 模板上下文变量
22
+ * @returns {Promise<string>} 渲染后的字符串
23
+ */
24
+ render(template: any, context?: {}): Promise<any>;
25
+ /**
26
+ * 合并步骤:获取变量 -> 构建 context -> 解析 -> 渲染
27
+ * @param {string} template Liquid 模板字符串
28
+ * @param {context} ctx flowContext
29
+ */
30
+ renderWithFullContext(template: any, ctx: any): Promise<any>;
31
+ }
@@ -0,0 +1,10 @@
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 React from 'react';
10
+ export declare const Display: (props: any) => string | React.JSX.Element;
@@ -0,0 +1,21 @@
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 React from 'react';
10
+ import 'vditor/dist/index.css';
11
+ export interface MarkdownWithContextSelectorProps {
12
+ value?: string;
13
+ onChange?: (v: string) => void;
14
+ placeholder?: string;
15
+ rows?: number;
16
+ style?: React.CSSProperties;
17
+ }
18
+ /**
19
+ * markdown 与变量选择器的组合,紧凑排版,边框无缝拼接。
20
+ */
21
+ export declare const MarkdownWithContextSelector: React.FC<MarkdownWithContextSelectorProps>;
@@ -0,0 +1,24 @@
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 React from 'react';
10
+ export declare class Markdown {
11
+ /**
12
+ * 渲染 Markdown
13
+ * @param {string} text - Markdown 文本
14
+ * @param {object} props - 其他属性
15
+ * @returns {JSX.Element}
16
+ */
17
+ render(text: any, props: any): React.JSX.Element;
18
+ /**
19
+ * 渲染可编辑的 Markdown 组件
20
+ * @param {object} props - 编辑器属性
21
+ * @returns {JSX.Element}
22
+ */
23
+ edit(props: any): React.JSX.Element;
24
+ }
@@ -0,0 +1,10 @@
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
+ declare const _default: (props?: any) => import("../../../schema-component/antd/__builtins__").UseComponentStyleResult;
10
+ export default _default;
@@ -0,0 +1,9 @@
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
+ export declare const useCDN: () => any;
@@ -12,3 +12,4 @@ export * from './EllipsisWithTooltip';
12
12
  export * from './ExpiresRadio';
13
13
  export * from './JsonInput';
14
14
  export * from './code-editor';
15
+ export * from './TextAreaWithContextSelector';
@@ -12,6 +12,7 @@ export declare class PluginFlowEngine extends Plugin {
12
12
  }
13
13
  export * from './components/filter';
14
14
  export * from './components/code-editor';
15
+ export * from './components/TextAreaWithContextSelector';
15
16
  export * from './FlowModelRepository';
16
17
  export * from './FlowPage';
17
18
  export * from './models';
@@ -8,6 +8,10 @@
8
8
  */
9
9
  import type { ButtonProps } from 'antd/es/button';
10
10
  import { ActionModel } from '../base';
11
+ export declare function joinUrlSearch(url: string, params?: {
12
+ name: string;
13
+ value: any;
14
+ }[]): string;
11
15
  export declare class LinkActionModel extends ActionModel {
12
16
  static scene: import("../base").ActionSceneType;
13
17
  defaultProps: ButtonProps;