@nocobase/client 2.0.0-alpha.6 → 2.0.0-alpha.8

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/.dumirc.ts CHANGED
@@ -124,10 +124,6 @@ export default defineConfig({
124
124
  title: 'Fork model',
125
125
  link: '/examples/flow-models/fork-model',
126
126
  },
127
- // {
128
- // title: 'cleanRun:自动流干净运行',
129
- // link: '/examples/flow-models/render-in-fork',
130
- // },
131
127
  {
132
128
  title: '拖拽(DND)',
133
129
  link: '/examples/flow-models/dnd',
@@ -6,6 +6,5 @@
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 { Completion } from '@codemirror/autocomplete';
10
- declare const _default: Completion[];
11
- export default _default;
9
+ import { FlowModel } from '@nocobase/flow-engine';
10
+ export declare const fixed: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -21,6 +21,7 @@ export * from './fieldComponent';
21
21
  export * from './aclCheck';
22
22
  export * from './pattern';
23
23
  export * from './validation';
24
+ export * from './columnFixed';
24
25
  export { fieldLinkageRules, detailsFieldLinkageRules, linkageSetDetailsFieldProps, actionLinkageRules, blockLinkageRules, linkageSetBlockProps, linkageSetActionProps, linkageSetFieldProps, linkageAssignField, linkageRunjs, } from './linkageRules';
25
26
  export { displayFieldComponent } from './displayFieldComponent';
26
27
  export * from './overflowMode';
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import type { Completion } from '@codemirror/autocomplete';
10
10
  import { type SnippetEntry } from '../runjsCompletions';
11
- export declare function useRunJSDocCompletions(hostCtx: any, version?: string): {
11
+ export declare function useRunJSDocCompletions(hostCtx: any, version?: string, scene?: string | string[]): {
12
12
  completions: Completion[];
13
13
  entries: SnippetEntry[];
14
14
  error: Error;
@@ -23,6 +23,7 @@ interface CodeEditorProps {
23
23
  wrapperStyle?: React.CSSProperties;
24
24
  extraCompletions?: Completion[];
25
25
  version?: string;
26
+ scene?: string | string[];
26
27
  }
27
28
  export * from './types';
28
29
  export declare const CodeEditor: React.FC<CodeEditorProps & InjectableRendingEventTriggerProps>;
@@ -14,8 +14,10 @@ export type SnippetEntry = {
14
14
  body: string;
15
15
  ref?: string;
16
16
  group?: string;
17
+ groups?: string[];
18
+ scenes?: string[];
17
19
  };
18
- export declare function buildRunJSCompletions(hostCtx: any, version?: string): Promise<{
20
+ export declare function buildRunJSCompletions(hostCtx: any, version?: string, scene?: string | string[]): Promise<{
19
21
  completions: Completion[];
20
22
  entries: SnippetEntry[];
21
23
  }>;
@@ -11,7 +11,7 @@ import { type MetaTreeNode, FlowModel } from '@nocobase/flow-engine';
11
11
  export interface VariableFilterItemValue {
12
12
  path: string;
13
13
  operator: string;
14
- value: string;
14
+ value: string | boolean;
15
15
  }
16
16
  export interface VariableFilterItemProps {
17
17
  /** 筛选条件值对象 */
@@ -7,14 +7,14 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { ButtonProps } from 'antd';
10
- import { ActionModel } from '../base';
11
- import { AssignFormModel } from '../blocks';
12
- export declare class UpdateActionModel extends ActionModel<{
10
+ import { ActionModel } from '../base/ActionModel';
11
+ import { AssignFormModel } from '../blocks/assign-form/AssignFormModel';
12
+ export declare class UpdateRecordActionModel extends ActionModel<{
13
13
  subModels: {
14
14
  assignForm: AssignFormModel;
15
15
  };
16
16
  }> {
17
- static scene: import("../base").ActionSceneType;
17
+ static scene: import("../base/ActionModel").ActionSceneType;
18
18
  assignFormUid?: string;
19
19
  defaultProps: ButtonProps;
20
20
  getAclActionName(): string;
@@ -15,5 +15,5 @@ export * from './JSCollectionActionModel';
15
15
  export * from './JSRecordActionModel';
16
16
  export * from './PopupCollectionActionModel';
17
17
  export * from './RefreshActionModel';
18
- export * from './UpdateActionModel';
18
+ export * from './UpdateRecordActionModel';
19
19
  export * from './ViewActionModel';
@@ -17,6 +17,8 @@ export declare class AssignFormModel extends FormBlockModel<{
17
17
  grid: any;
18
18
  };
19
19
  }> {
20
+ useHooksBeforeRender(): void;
21
+ onInit(options: any): void;
20
22
  createResource(ctx: any, params: any): SingleRecordResource<unknown>;
21
23
  renderComponent(): React.ReactNode;
22
24
  setInitialAssignedValues(map: Record<string, any> | undefined): void;
@@ -10,7 +10,7 @@ import { SingleRecordResource } from '@nocobase/flow-engine';
10
10
  import React from 'react';
11
11
  import { FormBlockModel } from './FormBlockModel';
12
12
  export declare class CreateFormModel extends FormBlockModel {
13
- static scene: import("../../base").BlockSceneType;
13
+ static scene: import("../../base/BlockModel").BlockSceneType;
14
14
  private actionFlowSettings;
15
15
  private actionExtraToolbarItems;
16
16
  createResource(ctx: any, params: any): SingleRecordResource<unknown>;
@@ -8,7 +8,8 @@
8
8
  */
9
9
  import { FormInstance } from 'antd';
10
10
  import React from 'react';
11
- import { BlockGridModel, CollectionBlockModel } from '../../base';
11
+ import { BlockGridModel } from '../../base/BlockGridModel';
12
+ import { CollectionBlockModel } from '../../base/CollectionBlockModel';
12
13
  import { FormActionModel } from './FormActionModel';
13
14
  import { FormGridModel } from './FormGridModel';
14
15
  type DefaultCollectionBlockModelStructure = {
@@ -36,7 +36,7 @@ export declare class TableBlockModel extends CollectionBlockModel<TableBlockMode
36
36
  customModelClasses: CustomTableBlockModelClassesEnum;
37
37
  get resource(): MultiRecordResource<any>;
38
38
  createResource(ctx: any, params: any): MultiRecordResource<unknown>;
39
- getColumns(): import("antd").TableColumnProps<import("antd/es/_util/type").AnyObject>[];
39
+ getColumns(): any[];
40
40
  EditableRow: (props: any) => React.JSX.Element;
41
41
  EditableCell: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
42
42
  components: {
@@ -7,3 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  export declare function extractIndex(str: any): string;
10
+ export declare function adjustColumnOrder(columns: any): any[];
@@ -15,5 +15,13 @@ import { FieldModel } from '../base/FieldModel';
15
15
  * - 子节点由脚本渲染(DOM 操作),用于完全自定义输入体验。
16
16
  */
17
17
  export declare class JSEditableFieldModel extends FieldModel {
18
+ private _mountedOnce;
18
19
  render(): React.JSX.Element;
20
+ /**
21
+ * 在 CreateForm / 提交后重置等场景下,字段可能被卸载并重新挂载。
22
+ * 由于 beforeRender 命中缓存,新挂载的容器不会自动写入 JS 渲染内容。
23
+ * 这里在二次挂载时检测容器已就绪,主动触发 rerender 来刷新 beforeRender(禁用缓存),
24
+ * 保证输入框不会因为容器变更而空白。
25
+ */
26
+ protected onMount(): void;
19
27
  }
@@ -38,7 +38,7 @@ export declare class JSFieldModel extends FieldModel {
38
38
  */
39
39
  render(): React.JSX.Element;
40
40
  /**
41
- * 组件挂载后,如果容器引用已就绪,强制重跑一次自动流程以把 HTML 写入当前 DOM。
41
+ * 组件挂载后,如果容器引用已就绪,强制重跑一次 beforeRender flows 以把 HTML 写入当前 DOM。
42
42
  * 解决新增后因命中缓存或执行时机导致内容未写入的问题(与 JSBlock/JSItem 一致处理)。
43
43
  */
44
44
  protected onMount(): void;
@@ -20,7 +20,7 @@ export declare class JSItemModel extends CommonItemModel {
20
20
  getInputArgs(): {};
21
21
  render(): React.JSX.Element;
22
22
  /**
23
- * 组件挂载后,如果容器引用已就绪,强制重跑一次自动流程以把 HTML 写入当前 DOM。
23
+ * 组件挂载后,如果容器引用已就绪,强制重跑一次 beforeRender 以把 HTML 写入当前 DOM。
24
24
  * 解决某些情况下命中旧缓存导致新节点未写入而显示空白的问题。
25
25
  */
26
26
  protected onMount(): void;