@nocobase/client 2.0.0-alpha.70 → 2.0.0-alpha.71

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 (39) hide show
  1. package/es/flow/actions/blockHeight.d.ts +9 -0
  2. package/es/flow/actions/index.d.ts +1 -0
  3. package/es/flow/components/BlockItemCard.d.ts +1 -0
  4. package/es/flow/models/base/PageModel/PageModel.d.ts +8 -0
  5. package/es/flow/models/blocks/details/DetailsGridModel.d.ts +1 -0
  6. package/es/flow/models/blocks/details/utils.d.ts +16 -0
  7. package/es/flow/models/blocks/filter-form/FilterFormItemModel.d.ts +2 -0
  8. package/es/flow/models/blocks/filter-form/fields/FilterFormRecordSelectFieldModel.d.ts +12 -0
  9. package/es/flow/models/blocks/filter-form/fields/index.d.ts +1 -0
  10. package/es/flow/models/blocks/form/FormAssociationFieldGroupModel.d.ts +12 -0
  11. package/es/flow/models/blocks/form/FormAssociationItemModel.d.ts +39 -0
  12. package/es/flow/models/blocks/form/FormBlockModel.d.ts +14 -1
  13. package/es/flow/models/blocks/form/FormGridModel.d.ts +1 -0
  14. package/es/flow/models/blocks/form/index.d.ts +2 -0
  15. package/es/flow/models/blocks/table/utils.d.ts +8 -8
  16. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/blocks/PopupSubTableFormModel.d.ts +1 -0
  17. package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +1 -0
  18. package/es/flow/utils/useJsonTemplateResolver.d.ts +9 -0
  19. package/es/index.mjs +13957 -13063
  20. package/es/route-switch/antd/admin-layout/index.d.ts +1 -1
  21. package/lib/index.js +278 -278
  22. package/lib/locale/de-DE.json +2 -0
  23. package/lib/locale/en-US.json +2 -0
  24. package/lib/locale/es-ES.json +2 -0
  25. package/lib/locale/fr-FR.json +2 -0
  26. package/lib/locale/hu-HU.json +2 -0
  27. package/lib/locale/id-ID.json +2 -0
  28. package/lib/locale/it-IT.json +2 -0
  29. package/lib/locale/ja-JP.json +2 -0
  30. package/lib/locale/ko-KR.json +2 -0
  31. package/lib/locale/nl-NL.json +2 -0
  32. package/lib/locale/pt-BR.json +2 -0
  33. package/lib/locale/ru-RU.json +2 -0
  34. package/lib/locale/tr-TR.json +2 -0
  35. package/lib/locale/uk-UA.json +2 -0
  36. package/lib/locale/vi-VN.json +2 -0
  37. package/lib/locale/zh-CN.json +8 -3
  38. package/lib/locale/zh-TW.json +2 -0
  39. 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 blockHeight: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -30,6 +30,7 @@ export * from './pattern';
30
30
  export * from './validation';
31
31
  export * from './columnFixed';
32
32
  export * from './linkageRulesRefresh';
33
+ export * from './blockHeight';
33
34
  export { fieldLinkageRules, subFormFieldLinkageRules, detailsFieldLinkageRules, linkageSetDetailsFieldProps, actionLinkageRules, blockLinkageRules, linkageSetBlockProps, linkageSetActionProps, linkageSetFieldProps, subFormLinkageSetFieldProps, linkageAssignField, linkageRunjs, subFormLinkageAssignField, } from './linkageRules';
34
35
  export { displayFieldComponent } from './displayFieldComponent';
35
36
  export * from './overflowMode';
@@ -12,4 +12,5 @@ export declare const BlockItemCard: React.ForwardRefExoticComponent<CardProps &
12
12
  beforeContent?: React.ReactNode;
13
13
  afterContent?: React.ReactNode;
14
14
  description?: any;
15
+ heightMode?: string;
15
16
  } & React.RefAttributes<unknown>>;
@@ -25,11 +25,19 @@ export declare class PageModel extends FlowModel<PageModelStructure> {
25
25
  private lastSeenEmitterViewActivatedVersion;
26
26
  private dirtyRefreshScheduled;
27
27
  private unmounted;
28
+ private documentTitleUpdateVersion;
28
29
  private getActiveTabKey;
29
30
  private scheduleActiveLifecycleRefresh;
30
31
  onMount(): void;
31
32
  protected onUnmount(): void;
32
33
  invokeTabModelLifecycleMethod(tabActiveKey: string, method: 'onActive' | 'onInactive'): void;
34
+ /**
35
+ * Resolve configured document title template and update browser tab title.
36
+ * Priority:
37
+ * 1) page without tabs: page.documentTitle > page title
38
+ * 2) page with tabs: activeTab.documentTitle > active tab name
39
+ */
40
+ updateDocumentTitle(preferredActiveTabKey?: string, retryCount?: number): Promise<void>;
33
41
  createPageTabModelOptions: () => CreateModelOptions;
34
42
  mapTabs(): {
35
43
  key: string;
@@ -29,4 +29,5 @@ export declare class DetailsGridModel extends GridModel<{
29
29
  };
30
30
  dragOverlayConfig: DragOverlayConfig;
31
31
  renderAddSubModelButton(): React.JSX.Element;
32
+ render(): React.JSX.Element;
32
33
  }
@@ -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
+ /// <reference types="react" />
10
+ export declare const useDetailsGridHeight: ({ heightMode, containerRef, actionsRef, paginationRef, deps, }: {
11
+ heightMode?: string;
12
+ containerRef: React.RefObject<HTMLDivElement>;
13
+ actionsRef: React.RefObject<HTMLDivElement>;
14
+ paginationRef: React.RefObject<HTMLDivElement>;
15
+ deps?: import("react").DependencyList;
16
+ }) => number;
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { FilterableItemModel, FlowModelContext } from '@nocobase/flow-engine';
10
10
  import React from 'react';
11
+ import { FieldModel } from '../../base';
11
12
  import { FilterFormFieldModel } from './fields';
12
13
  export declare class FilterFormItemModel extends FilterableItemModel<{
13
14
  subModels: {
@@ -76,6 +77,7 @@ export declare class FilterFormItemModel extends FilterableItemModel<{
76
77
  * @returns
77
78
  */
78
79
  getFilterValue(): any;
80
+ normalizeAssociationFilterValue(value: any, fieldModel: FieldModel): any;
79
81
  getDefaultValue(): any;
80
82
  /**
81
83
  * 处理回车事件
@@ -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
+ import { RecordSelectFieldModel } from '../../../fields/AssociationFieldModel';
10
+ export declare class FilterFormRecordSelectFieldModel extends RecordSelectFieldModel {
11
+ onInit(options: any): void;
12
+ }
@@ -7,5 +7,6 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  export * from './FilterFormFieldModel';
10
+ export * from './FilterFormRecordSelectFieldModel';
10
11
  export * from './date-time';
11
12
  export * from './FilterFormCustomFieldModel';
@@ -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
+ import { AssociationFieldGroupModel } from '../../base';
10
+ export declare class FormAssociationFieldGroupModel extends AssociationFieldGroupModel {
11
+ static itemModelName: string;
12
+ }
@@ -0,0 +1,39 @@
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 { DisplayItemModel, FlowModelContext } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ export declare class FormAssociationItemModel extends DisplayItemModel {
12
+ static defineChildren(ctx: FlowModelContext): {
13
+ key: any;
14
+ label: string;
15
+ refreshTargets: string[];
16
+ toggleable: (subModel: any) => boolean;
17
+ useModel: string;
18
+ createModelOptions: () => {
19
+ use: string;
20
+ stepParams: {
21
+ fieldSettings: {
22
+ init: {
23
+ dataSourceKey: any;
24
+ collectionName: any;
25
+ fieldPath: any;
26
+ };
27
+ };
28
+ };
29
+ subModels: {
30
+ field: {
31
+ use: string;
32
+ props: any;
33
+ };
34
+ };
35
+ };
36
+ }[];
37
+ onInit(options: any): void;
38
+ renderItem(): React.JSX.Element;
39
+ }
@@ -27,7 +27,7 @@ export declare class FormBlockModel<T extends DefaultCollectionBlockModelStructu
27
27
  _defaultCustomModelClasses: {
28
28
  FormActionGroupModel: string;
29
29
  FormItemModel: string;
30
- FormCustomItemModel: string;
30
+ FormAssociationFieldGroupModel: string;
31
31
  };
32
32
  customModelClasses: CustomFormBlockModelClassesEnum;
33
33
  renderConfigureActions(): React.JSX.Element;
@@ -69,7 +69,20 @@ export declare function FormComponent({ model, children, layoutProps, initialVal
69
69
  layoutProps?: any;
70
70
  initialValues?: any;
71
71
  onFinish?: (values: any) => void;
72
+ [key: string]: any;
72
73
  }): React.JSX.Element;
74
+ type FormBlockContentProps = {
75
+ model: FormBlockModel;
76
+ gridModel: FormGridModel;
77
+ layoutProps?: any;
78
+ onFinish?: (values: any) => void;
79
+ grid: React.ReactNode;
80
+ actions?: React.ReactNode;
81
+ footer?: React.ReactNode;
82
+ heightMode?: string;
83
+ height?: number;
84
+ };
85
+ export declare const FormBlockContent: ({ model, gridModel, layoutProps, onFinish, grid, actions, footer, heightMode, height, }: FormBlockContentProps) => React.JSX.Element;
73
86
  /**
74
87
  * 兼容旧版本
75
88
  * @deprecated use FormBlockModel instead
@@ -30,4 +30,5 @@ export declare class FormGridModel<T extends DefaultFormGridStructure = DefaultF
30
30
  };
31
31
  dragOverlayConfig: DragOverlayConfig;
32
32
  renderAddSubModelButton(): React.JSX.Element;
33
+ render(): React.JSX.Element;
33
34
  }
@@ -17,3 +17,5 @@ export * from './FormItemModel';
17
17
  export * from './FormJSFieldItemModel';
18
18
  export * from './JSFormActionModel';
19
19
  export * from './QuickEditFormModel';
20
+ export * from './FormAssociationFieldGroupModel';
21
+ export * from './FormAssociationItemModel';
@@ -1,11 +1,4 @@
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
- */
1
+ /// <reference types="react" />
9
2
  export declare function extractIndex(str: any): string;
10
3
  export declare function adjustColumnOrder(columns: any): any[];
11
4
  export declare function setNestedValue(data: any, recordIndex: any, value: any): void;
@@ -16,3 +9,10 @@ export declare function extractIds(data: any): any[];
16
9
  * @param key string | string[] 单字段或多字段
17
10
  */
18
11
  export declare function getRowKey(record: any, key: string | string[]): any;
12
+ type UseBlockHeightOptions = {
13
+ heightMode?: string;
14
+ tableAreaRef: React.RefObject<HTMLDivElement>;
15
+ deps?: React.DependencyList;
16
+ };
17
+ export declare const useBlockHeight: ({ heightMode, tableAreaRef, deps }: UseBlockHeightOptions) => number;
18
+ export {};
@@ -19,6 +19,7 @@ export declare class PopupSubTableFormModel extends FormBlockModel {
19
19
  FormActionGroupModel: string;
20
20
  FormItemModel: string;
21
21
  FormCustomItemModel: string;
22
+ FormAssociationFieldGroupModel: string;
22
23
  };
23
24
  protected defaultBlockTitle(): string;
24
25
  /**
@@ -21,6 +21,7 @@ export interface LazySelectProps extends Omit<SelectProps<any>, 'mode' | 'option
21
21
  value?: AssociationOption | AssociationOption[];
22
22
  multiple?: boolean;
23
23
  allowMultiple?: boolean;
24
+ keepDropdownOpenOnSelect?: boolean;
24
25
  options?: AssociationOption[];
25
26
  onChange: (option: AssociationOption | AssociationOption[]) => void;
26
27
  onDropdownVisibleChange?: (open: boolean) => void;
@@ -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 useJsonTemplateResolver: (template: string, deps?: any[]) => import("ahooks/lib/useRequest/src/types").Result<any, []>;