@nocobase/client 2.0.12 → 2.0.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.
Files changed (33) hide show
  1. package/es/flow/actions/afterSuccess.d.ts +9 -0
  2. package/es/flow/actions/index.d.ts +1 -0
  3. package/es/flow/components/FieldAssignValueInput.d.ts +6 -0
  4. package/es/flow/internal/utils/modelUtils.d.ts +4 -0
  5. package/es/flow/models/actions/LinkActionModel.d.ts +1 -4
  6. package/es/flow/models/actions/UpdateRecordActionUtils.d.ts +12 -0
  7. package/es/flow/models/actions/joinUrlSearch.d.ts +12 -0
  8. package/es/flow/models/base/GridModel.d.ts +1 -0
  9. package/es/flow/models/base/PageModel/ChildPageModel.d.ts +1 -0
  10. package/es/flow/models/blocks/details/DetailsBlockModel.d.ts +3 -0
  11. package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +12 -1
  12. package/es/flow/models/fields/DisplayAssociationField/displaySubListUtils.d.ts +14 -0
  13. package/es/index.mjs +3041 -2713
  14. package/es/route-switch/antd/admin-layout/index.d.ts +4 -0
  15. package/lib/index.js +163 -163
  16. package/lib/locale/de-DE.json +3 -0
  17. package/lib/locale/en-US.json +2 -0
  18. package/lib/locale/es-ES.json +3 -0
  19. package/lib/locale/fr-FR.json +3 -0
  20. package/lib/locale/hu-HU.json +3 -0
  21. package/lib/locale/id-ID.json +3 -0
  22. package/lib/locale/it-IT.json +3 -0
  23. package/lib/locale/ja-JP.json +3 -0
  24. package/lib/locale/ko-KR.json +3 -0
  25. package/lib/locale/nl-NL.json +3 -0
  26. package/lib/locale/pt-BR.json +3 -0
  27. package/lib/locale/ru-RU.json +3 -0
  28. package/lib/locale/tr-TR.json +3 -0
  29. package/lib/locale/uk-UA.json +3 -0
  30. package/lib/locale/vi-VN.json +3 -0
  31. package/lib/locale/zh-CN.json +3 -1
  32. package/lib/locale/zh-TW.json +3 -0
  33. package/package.json +6 -6
@@ -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 afterSuccess: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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
+ export * from './afterSuccess';
9
10
  export * from './confirm';
10
11
  export * from './dataScope';
11
12
  export * from './openView';
@@ -54,6 +54,12 @@ interface Props {
54
54
  enableDateVariableAsConstant?: boolean;
55
55
  }
56
56
  export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
57
+ export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
58
+ export declare function resolveAssignValueFieldModelUse(options: {
59
+ itemModel: any;
60
+ fieldModelUse?: string;
61
+ preferFormItemFieldModel?: boolean;
62
+ }): string | undefined;
57
63
  /**
58
64
  * 根据所选字段渲染对应的赋值编辑器:
59
65
  * - 使用临时的 VariableFieldFormModel 包裹字段模型,确保常量编辑为真实字段组件
@@ -13,8 +13,12 @@ export interface CollectionLike {
13
13
  dataSourceKey?: string;
14
14
  name?: string;
15
15
  }
16
+ export declare const CUSTOM_FIELD_TARGET_PATH_PREFIX = "__custom__";
17
+ export declare function buildCustomFieldTargetPath(customFieldName: string): string;
16
18
  export declare function isToManyAssociationField(field: unknown): boolean;
17
19
  export declare function getCollectionFromModel(model: unknown): CollectionLike | undefined;
20
+ export declare function getFormItemFieldPathCandidates(model: unknown): string[];
21
+ export declare function getFormItemPreferredFieldPath(model: unknown): string | undefined;
18
22
  /**
19
23
  * Find a configured FormItemModel by its `fieldSettings.init.fieldPath` (or `fieldPath`) in the current form grid,
20
24
  * including nested subform items. Also supports combined path matching when a model stores
@@ -8,10 +8,7 @@
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
+ export { joinUrlSearch } from './joinUrlSearch';
15
12
  export declare class LinkActionModel extends ActionModel {
16
13
  static scene: import("../base").ActionSceneType;
17
14
  defaultProps: ButtonProps;
@@ -0,0 +1,12 @@
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 function refreshLinkageRulesAfterUpdate(ctx: any): Promise<void>;
10
+ export declare function applyUpdateRecordAction(ctx: any, params: any, options?: {
11
+ settingsFlowKey?: string;
12
+ }): Promise<void>;
@@ -0,0 +1,12 @@
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 function joinUrlSearch(url: string, params?: {
10
+ name: string;
11
+ value: any;
12
+ }[]): string;
@@ -45,6 +45,7 @@ export declare class GridModel<T extends {
45
45
  mergeRowsWithItems(rows: Record<string, string[][]>): Record<string, string[][]>;
46
46
  resetRows(syncProps?: boolean): void;
47
47
  private computePointerPosition;
48
+ private getDragContainer;
48
49
  private updateLayoutSnapshot;
49
50
  private scheduleSnapshotRefresh;
50
51
  /**
@@ -14,6 +14,7 @@ export declare class ChildPageModel extends PageModel {
14
14
  tabBarExtraContent: {
15
15
  left: React.JSX.Element;
16
16
  };
17
+ renderBackButtonWhenTabsDisabled(): React.JSX.Element;
17
18
  createPageTabModelOptions: () => CreateModelOptions;
18
19
  handleDragEnd(event: DragEndEvent): Promise<void>;
19
20
  render(): React.JSX.Element;
@@ -18,6 +18,8 @@ export declare class DetailsBlockModel extends CollectionBlockModel<{
18
18
  };
19
19
  }> {
20
20
  static scene: import("../../base").BlockSceneType;
21
+ private hadSingleRecordData;
22
+ private hasMultiRefreshDispatched;
21
23
  _defaultCustomModelClasses: {
22
24
  RecordActionGroupModel: string;
23
25
  DetailsItemModel: string;
@@ -28,6 +30,7 @@ export declare class DetailsBlockModel extends CollectionBlockModel<{
28
30
  createResource(ctx: any, params: any): SingleRecordResource<unknown> | MultiRecordResource<unknown>;
29
31
  onInit(options: any): void;
30
32
  isMultiRecordResource(): boolean;
33
+ hasDispatchedMultiRefresh(): boolean;
31
34
  getCurrentRecord(): any;
32
35
  hasAvailableData(): boolean;
33
36
  handlePageChange: (page: number) => Promise<void>;
@@ -22,10 +22,21 @@ export declare class FilterFormGridModel extends GridModel {
22
22
  };
23
23
  };
24
24
  dragOverlayConfig: DragOverlayConfig;
25
- private hiddenRows;
26
25
  readonly loading: {
27
26
  value: boolean;
28
27
  };
28
+ private getAssociationFilterTargetKey;
29
+ /**
30
+ * 获取筛选表单当前“完整布局”。
31
+ * 折叠态会临时裁剪 props.rows,因此这里优先选取行数更多的那份布局,
32
+ * 避免拖拽排序或重新挂载后只拿到被裁剪过的运行时 rows。
33
+ */
34
+ private getFullLayout;
35
+ /**
36
+ * 按“可视字段行数”裁剪布局,而不是只按 grid row 数裁剪。
37
+ * 这样即使拖拽后多个字段被排进同一个 cell,也仍然可以正确折叠。
38
+ */
39
+ private limitRowsByVisibleCount;
29
40
  toggleFormFieldsCollapse(collapse: boolean, visibleRows: number): void;
30
41
  onModelCreated(subModel: FilterFormItemModel): Promise<void>;
31
42
  renderAddSubModelButton(): React.JSX.Element;
@@ -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
+ export declare const normalizeFieldIndexChain: (fieldIndex: unknown) => string[];
10
+ export declare const buildDisplaySubListForkKey: ({ parentFieldIndex, index, blockPage, }: {
11
+ parentFieldIndex: string[];
12
+ index: number;
13
+ blockPage: number;
14
+ }) => string;