@nocobase/client 2.0.0-beta.15 → 2.0.0-beta.16

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 (22) hide show
  1. package/es/api-client/APIClient.d.ts +1 -0
  2. package/es/flow/models/base/BlockModel.d.ts +2 -1
  3. package/es/flow/models/base/CollectionBlockModel.d.ts +2 -0
  4. package/es/flow/models/base/PageModel/PageModel.d.ts +8 -0
  5. package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +3 -1
  6. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionGroupModel.d.ts +11 -0
  7. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionsColumnModel.d.ts +19 -0
  8. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.d.ts +30 -0
  9. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableEditActionModel.d.ts +28 -0
  10. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableFormSubmitActionModel.d.ts +16 -0
  11. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableRemoveActionModel.d.ts +14 -0
  12. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/blocks/PopupSubTableFormModel.d.ts +35 -0
  13. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/index.d.ts +17 -0
  14. package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +3 -0
  15. package/es/flow/models/fields/AssociationFieldModel/index.d.ts +1 -0
  16. package/es/flow/models/fields/index.d.ts +0 -1
  17. package/es/index.mjs +3126 -2036
  18. package/lib/{index-C3fHjsMw-DeYCS85h.js → index-C3fHjsMw-CJcvZYD_.js} +313 -265
  19. package/lib/index.js +95 -47
  20. package/lib/locale/zh-CN.json +16 -6
  21. package/package.json +6 -6
  22. package/es/flow/models/fields/UploadFieldModel.d.ts +0 -22
@@ -16,6 +16,7 @@ export declare class APIClient extends APIClientSDK {
16
16
  /** 该值会在 AntdAppProvider 中被重新赋值 */
17
17
  notification: any;
18
18
  cloneInstance(): APIClient;
19
+ getHostname(): string;
19
20
  getHeaders(): {};
20
21
  service(uid: string): Result<any, any>;
21
22
  interceptors(): void;
@@ -1,6 +1,6 @@
1
1
  import { DefaultStructure, FlowModel } from '@nocobase/flow-engine';
2
2
  import React from 'react';
3
- export type BlockSceneType = 'new' | 'filter' | 'one' | 'many' | 'select' | BlockSceneType[];
3
+ export type BlockSceneType = 'new' | 'filter' | 'one' | 'many' | 'select' | 'subForm' | BlockSceneType[];
4
4
  export declare const BlockSceneEnum: {
5
5
  new: BlockSceneType;
6
6
  one: BlockSceneType;
@@ -8,6 +8,7 @@ export declare const BlockSceneEnum: {
8
8
  select: BlockSceneType;
9
9
  filter: BlockSceneType;
10
10
  oam: BlockSceneType;
11
+ subForm: BlockSceneType;
11
12
  };
12
13
  export declare class BlockModel<T = DefaultStructure> extends FlowModel<T> {
13
14
  decoratorProps: Record<string, any>;
@@ -19,6 +19,8 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
19
19
  isManualRefresh: boolean;
20
20
  collectionRequired: boolean;
21
21
  private previousBeforeRenderHash;
22
+ private lastSeenDirtyVersion;
23
+ private dirtyRefreshing;
22
24
  protected onMount(): void;
23
25
  onActive(): void;
24
26
  /**
@@ -20,7 +20,15 @@ export declare class PageModel extends FlowModel<PageModelStructure> {
20
20
  left?: ReactNode;
21
21
  right?: ReactNode;
22
22
  };
23
+ private viewActivatedListener?;
24
+ private dataSourceDirtyListener?;
25
+ private lastSeenEmitterViewActivatedVersion;
26
+ private dirtyRefreshScheduled;
27
+ private unmounted;
28
+ private getActiveTabKey;
29
+ private scheduleActiveLifecycleRefresh;
23
30
  onMount(): void;
31
+ protected onUnmount(): void;
24
32
  invokeTabModelLifecycleMethod(tabActiveKey: string, method: 'onActive' | 'onInactive'): void;
25
33
  createPageTabModelOptions: () => CreateModelOptions;
26
34
  mapTabs(): {
@@ -16,6 +16,7 @@ export declare class QuickEditFormModel extends FlowModel {
16
16
  viewContainer: any;
17
17
  __onSubmitSuccess: any;
18
18
  _fieldProps: any;
19
+ _onOk: any;
19
20
  get form(): any;
20
21
  useHooksBeforeRender(): void;
21
22
  static open(options: {
@@ -24,11 +25,12 @@ export declare class QuickEditFormModel extends FlowModel {
24
25
  dataSourceKey: string;
25
26
  collectionName: string;
26
27
  fieldPath: string;
27
- filterByTk: string;
28
28
  record: any;
29
+ filterByTk?: string;
29
30
  onSuccess?: (values: any) => void;
30
31
  fieldProps?: any;
31
32
  sourceFieldModelUid?: string;
33
+ onOk?: (values: any) => void;
32
34
  }): Promise<void>;
33
35
  onInit(options: any): void;
34
36
  addAppends(fieldPath: string, refresh?: boolean): void;
@@ -0,0 +1,11 @@
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 { ActionGroupModel } from '../../../base/ActionGroupModel';
10
+ export declare class PopupSubTableActionGroupModel extends ActionGroupModel {
11
+ }
@@ -0,0 +1,19 @@
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 { TableCustomColumnModel } from '../../../blocks/table/TableCustomColumnModel';
11
+ export declare class PopupSubTableActionsColumnModel extends TableCustomColumnModel {
12
+ _subTableModel: any;
13
+ afterAddAsSubModel(): Promise<void>;
14
+ getColumnProps(model: any): {
15
+ title: React.JSX.Element;
16
+ render: (value: any, record: any, index: any) => React.JSX.Element;
17
+ };
18
+ render(): (value: any, record: any, index: any) => React.JSX.Element;
19
+ }
@@ -0,0 +1,30 @@
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 { AssociationFieldModel } from '../AssociationFieldModel';
11
+ export declare class PopupSubTableFieldModel extends AssociationFieldModel {
12
+ disableTitleField: boolean;
13
+ defaultOverflowMode: string;
14
+ updateAssociation: boolean;
15
+ selectedRows: {
16
+ value: any[];
17
+ };
18
+ setCurrentPage: any;
19
+ currentPageSize: any;
20
+ get collection(): any;
21
+ get collectionField(): any;
22
+ onInit(options: any): void;
23
+ onDispatchEventStart(eventName: string): Promise<void>;
24
+ set onSelectExitRecordClick(fn: any);
25
+ set onAddRecordClick(fn: any);
26
+ afterAddAsSubModel(): Promise<void>;
27
+ getBaseColumns(model: any): any;
28
+ change(): void;
29
+ render(): React.JSX.Element;
30
+ }
@@ -0,0 +1,28 @@
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 { ButtonProps } from 'antd/es/button';
10
+ import React from 'react';
11
+ import { ActionModel } from '../../../../base/ActionModel';
12
+ export declare function EditFormContent({ model, scene }: {
13
+ model: any;
14
+ scene?: string;
15
+ }): React.JSX.Element;
16
+ export declare class SubTableRecordAction extends ActionModel {
17
+ renderHiddenInConfig(): React.ReactNode | undefined;
18
+ }
19
+ export declare class PopupSubTableEditActionModel extends SubTableRecordAction {
20
+ renderHiddenInConfig(): React.ReactNode | undefined;
21
+ selectedRows: {
22
+ value: any[];
23
+ };
24
+ defaultPopupTitle: string;
25
+ defaultProps: ButtonProps;
26
+ getAclActionName(): string;
27
+ onDispatchEventStart(eventName: string): Promise<void>;
28
+ }
@@ -0,0 +1,16 @@
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 { ButtonProps } from 'antd';
10
+ import { ActionGroupModel, ActionModel } from '../../../../base';
11
+ export declare class PopupSubTableFormSubmitActionModel extends ActionModel {
12
+ defaultProps: ButtonProps;
13
+ }
14
+ export declare class PopupSubTableFormActionGroupModel extends ActionGroupModel {
15
+ static baseClass: typeof PopupSubTableFormSubmitActionModel;
16
+ }
@@ -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 { ButtonProps } from 'antd/es/button';
10
+ import { SubTableRecordAction } from './PopupSubTableEditActionModel';
11
+ export declare class PopupSubTableRemoveActionModel extends SubTableRecordAction {
12
+ defaultProps: ButtonProps;
13
+ onDispatchEventStart(eventName: string): Promise<void>;
14
+ }
@@ -0,0 +1,35 @@
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 { FlowModelContext, SingleRecordResource } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ import { FormBlockModel } from '../../../../blocks/form/FormBlockModel';
12
+ export declare class PopupSubTableFormModel extends FormBlockModel {
13
+ static scene: import("../../../../base").BlockSceneType;
14
+ private actionFlowSettings;
15
+ private actionExtraToolbarItems;
16
+ onInit(options: any): void;
17
+ createResource(_ctx: FlowModelContext, params: any): SingleRecordResource<unknown>;
18
+ _defaultCustomModelClasses: {
19
+ FormActionGroupModel: string;
20
+ FormItemModel: string;
21
+ FormCustomItemModel: string;
22
+ };
23
+ protected defaultBlockTitle(): string;
24
+ /**
25
+ * 定义子菜单选项
26
+ */
27
+ static defineChildren(ctx: any): Promise<{
28
+ key: string;
29
+ label: string;
30
+ useModel: string;
31
+ createModelOptions: any;
32
+ }[]>;
33
+ onMount(): Promise<void>;
34
+ renderComponent(): React.JSX.Element;
35
+ }
@@ -0,0 +1,17 @@
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 * from './PopupSubTableFieldModel';
10
+ export * from './PopupSubTableActionGroupModel';
11
+ export * from './PopupSubTableActionsColumnModel';
12
+ export * from './actions/PopupSubTableEditActionModel';
13
+ export * from './actions/PopupSubTableRemoveActionModel';
14
+ export * from './actions/PopupSubTableFormSubmitActionModel';
15
+ export * from './PopupSubTableActionGroupModel';
16
+ export * from './blocks/PopupSubTableFormModel';
17
+ export * from './PopupSubTableActionsColumnModel';
@@ -11,6 +11,9 @@ import { TableColumnProps } from 'antd';
11
11
  import React from 'react';
12
12
  import { SubTableFieldModel } from '.';
13
13
  import { FieldModel } from '../../../base';
14
+ export declare function FieldWithoutPermissionPlaceholder({ targetModel }: {
15
+ targetModel: any;
16
+ }): React.JSX.Element;
14
17
  export interface SubTableColumnModelStructure {
15
18
  parent: SubTableFieldModel;
16
19
  subModels: {
@@ -12,3 +12,4 @@ export * from './SubTableFieldModel';
12
12
  export * from './SubFormFieldModel';
13
13
  export * from './RecordPickerFieldModel';
14
14
  export * from './CascadeSelectFieldModel';
15
+ export * from './PopupSubTableFieldModel';
@@ -23,7 +23,6 @@ export * from './RichTextFieldModel';
23
23
  export * from './SelectFieldModel';
24
24
  export * from './TextareaFieldModel';
25
25
  export * from './TimeFieldModel';
26
- export * from './UploadFieldModel';
27
26
  export * from './VariableFieldFormModel';
28
27
  export * from './JSFieldModel';
29
28
  export * from './JSEditableFieldModel';