@nocobase/client 2.0.2 → 2.0.5

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/README.md CHANGED
@@ -1,17 +1,24 @@
1
1
  # NocoBase
2
2
 
3
3
  <video width="100%" controls>
4
- <source src="https://static-docs.nocobase.com/NocoBase0510.mp4" type="video/mp4">
4
+ <source src="https://github.com/user-attachments/assets/4d11a87b-00e2-48f3-9bf7-389d21072d13" type="video/mp4">
5
5
  </video>
6
6
 
7
+ <p align="center">
8
+ <a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
9
+ <a href="https://www.producthunt.com/posts/nocobase?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=456520&theme=light&period=weekly&topic_id=267" alt="NocoBase - Scalability&#0045;first&#0044;&#0032;open&#0045;source&#0032;no&#0045;code&#0032;platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
10
+ </p>
7
11
 
8
12
  ## What is NocoBase
9
13
 
10
- NocoBase is a scalability-first, open-source no-code development platform.
11
- Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!
14
+ NocoBase is the most extensible AI-powered no-code platform.
15
+ Total control. Infinite extensibility. AI collaboration.
16
+ Enable your team to adapt quickly and cut costs dramatically.
17
+ No years of development. No millions wasted.
18
+ Deploy NocoBase in minutes — and take control of everything.
12
19
 
13
20
  Homepage:
14
- https://www.nocobase.com/
21
+ https://www.nocobase.com/
15
22
 
16
23
  Online Demo:
17
24
  https://demo.nocobase.com/new
@@ -19,12 +26,74 @@ https://demo.nocobase.com/new
19
26
  Documents:
20
27
  https://docs.nocobase.com/
21
28
 
22
- Commericial license & plugins:
23
- https://www.nocobase.com/en/commercial
29
+ Forum:
30
+ https://forum.nocobase.com/
24
31
 
25
- License agreement:
26
- https://www.nocobase.com/en/agreement
32
+ Use Cases:
33
+ https://www.nocobase.com/en/blog/tags/customer-stories
27
34
 
35
+ ## Release Notes
28
36
 
29
- ## Contact Us:
30
- hello@nocobase.com
37
+ Our [blog](https://www.nocobase.com/en/blog/timeline) is regularly updated with release notes and provides a weekly summary.
38
+
39
+ ## Distinctive features
40
+
41
+ ### 1. Data model-driven, not form/table–driven
42
+
43
+ Instead of being constrained by forms or tables, NocoBase adopts a data model–driven approach, separating data structure from user interface to unlock unlimited possibilities.
44
+
45
+ - UI and data structure are fully decoupled
46
+ - Multiple blocks and actions can be created for the same table or record in any quantity or form
47
+ - Supports the main database, external databases, and third-party APIs as data sources
48
+
49
+ ![model](https://static-docs.nocobase.com/model.png)
50
+
51
+ ### 2. AI employees, integrated into your business systems
52
+ Unlike standalone AI demos, NocoBase allows you to embed AI capabilities seamlessly into your interfaces, workflows, and data context, making AI truly useful in real business scenarios.
53
+
54
+ - Define AI employees for roles such as translator, analyst, researcher, or assistant
55
+ - Seamless AI–human collaboration in interfaces and workflows
56
+ - Ensure AI usage is secure, transparent, and customizable for your business needs
57
+
58
+ ![AI-employee](https://static-docs.nocobase.com/ai-employee-home.png)
59
+
60
+ ### 3. What you see is what you get, incredibly easy to use
61
+
62
+ While enabling the development of complex business systems, NocoBase keeps the experience simple and intuitive.
63
+
64
+ - One-click switch between usage mode and configuration mode
65
+ - Pages serve as a canvas to arrange blocks and actions, similar to Notion
66
+ - Configuration mode is designed for ordinary users, not just programmers
67
+
68
+ ![wysiwyg](https://static-docs.nocobase.com/wysiwyg.gif)
69
+
70
+ ### 4. Everything is a plugin, designed for extension
71
+ Adding more no-code features will never cover every business case. NocoBase is built for extension through its plugin-based microkernel architecture.
72
+
73
+ - All functionalities are plugins, similar to WordPress
74
+ - Plugins are ready to use upon installation
75
+ - Pages, blocks, actions, APIs, and data sources can all be extended through custom plugins
76
+
77
+ ![plugins](https://static-docs.nocobase.com/plugins.png)
78
+
79
+ ## Installation
80
+
81
+ NocoBase supports three installation methods:
82
+
83
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/docker-compose">Installing With Docker (👍Recommended)</a>
84
+
85
+ Suitable for no-code scenarios, no code to write. When upgrading, just download the latest image and reboot.
86
+
87
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/create-nocobase-app">Installing from create-nocobase-app CLI</a>
88
+
89
+ The business code of the project is completely independent and supports low-code development.
90
+
91
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/git-clone">Installing from Git source code</a>
92
+
93
+ If you want to experience the latest unreleased version, or want to participate in the contribution, you need to make changes and debug on the source code, it is recommended to choose this installation method, which requires a high level of development skills, and if the code has been updated, you can git pull the latest code.
94
+
95
+ ## How NocoBase works
96
+
97
+ <video width="100%" controls>
98
+ <source src="https://github.com/user-attachments/assets/8d183b44-9bb5-4792-b08f-bc08fe8dfaaf" type="video/mp4">
99
+ </video>
@@ -18,6 +18,32 @@ export declare class BlockModel<T = DefaultStructure> extends FlowModel<T> {
18
18
  customModelClasses: any;
19
19
  collectionRequired: boolean;
20
20
  private ObservedRenderComponent;
21
+ /**
22
+ * 记录各筛选来源是否活跃(有有效筛选值)
23
+ * key: filterId (筛选器 uid), value: boolean (是否有有效筛选)
24
+ */
25
+ private activeFilterSources;
26
+ /**
27
+ * 设置指定筛选来源的活跃状态
28
+ * @param filterId 筛选器 uid
29
+ * @param active 是否有有效筛选值
30
+ */
31
+ setFilterActive(filterId: string, active: boolean): void;
32
+ /**
33
+ * 检查是否有任何活跃的筛选来源
34
+ * @returns boolean
35
+ */
36
+ hasActiveFilters(): boolean;
37
+ /**
38
+ * 移除指定筛选来源
39
+ * @param filterId 筛选器 uid
40
+ */
41
+ removeFilterSource(filterId: string): void;
42
+ /**
43
+ * 获取数据加载模式
44
+ * @returns 'auto' | 'manual'
45
+ */
46
+ getDataLoadingMode(): 'auto' | 'manual';
21
47
  static _getScene(): BlockSceneType[];
22
48
  static _isScene(scene: BlockSceneType): boolean;
23
49
  getModelClassName(className: string): any;
@@ -21,11 +21,6 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
21
21
  private previousBeforeRenderHash;
22
22
  private lastSeenDirtyVersion;
23
23
  private dirtyRefreshing;
24
- /**
25
- * 记录各筛选来源是否活跃(有有效筛选值)
26
- * key: filterId (筛选器 uid), value: boolean (是否有有效筛选)
27
- */
28
- private activeFilterSources;
29
24
  protected onMount(): void;
30
25
  onActive(): void;
31
26
  /**
@@ -61,27 +56,6 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
61
56
  }[]>;
62
57
  getResourceSettingsInitParams(): ResourceSettingsInitParams;
63
58
  onInit(options: any): void;
64
- /**
65
- * 获取数据加载模式
66
- * @returns 'auto' | 'manual'
67
- */
68
- getDataLoadingMode(): 'auto' | 'manual';
69
- /**
70
- * 设置指定筛选来源的活跃状态
71
- * @param filterId 筛选器 uid
72
- * @param active 是否有有效筛选值
73
- */
74
- setFilterActive(filterId: string, active: boolean): void;
75
- /**
76
- * 检查是否有任何活跃的筛选来源
77
- * @returns boolean
78
- */
79
- hasActiveFilters(): boolean;
80
- /**
81
- * 移除指定筛选来源
82
- * @param filterId 筛选器 uid
83
- */
84
- removeFilterSource(filterId: string): void;
85
59
  createResource(ctx: any, params: any): SingleRecordResource | MultiRecordResource;
86
60
  refresh(): Promise<void>;
87
61
  protected defaultBlockTitle(): string;
@@ -62,29 +62,7 @@ export declare class TableBlockModel extends CollectionBlockModel<TableBlockMode
62
62
  };
63
63
  renderCell: (checked: any, record: any, index: any, originNode: any) => any;
64
64
  renderConfigureActions(): React.JSX.Element;
65
- pagination(): {
66
- current: number;
67
- pageSize: number;
68
- total: any;
69
- showTotal: (total: any) => any;
70
- showSizeChanger: boolean;
71
- simple?: undefined;
72
- showTitle?: undefined;
73
- hideOnSinglePage?: undefined;
74
- className?: undefined;
75
- itemRender?: undefined;
76
- } | {
77
- simple: boolean;
78
- showTitle: boolean;
79
- showSizeChanger: boolean;
80
- hideOnSinglePage: boolean;
81
- pageSize: number;
82
- total: number;
83
- className: string;
84
- itemRender: (_: any, type: any, originalElement: any) => any;
85
- current?: undefined;
86
- showTotal?: undefined;
87
- };
65
+ pagination(): import("antd").PaginationProps;
88
66
  renderComponent(): React.JSX.Element;
89
67
  }
90
68
  export {};
@@ -8,3 +8,4 @@
8
8
  */
9
9
  export * from './blockUtils';
10
10
  export * from './dispatchEventDeep';
11
+ export * from './pagination';
@@ -0,0 +1,29 @@
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 { PaginationProps } from 'antd';
10
+ /**
11
+ * 计算未知总数场景下的 Pagination total:
12
+ * - 本页不足 pageSize 或 hasNext=false,说明到末页
13
+ * - 否则用 +1 触发“还有下一页”
14
+ */
15
+ export declare const getUnknownCountPaginationTotal: (options: {
16
+ dataLength?: number;
17
+ pageSize?: number;
18
+ current?: number;
19
+ hasNext?: boolean;
20
+ }) => number;
21
+ export declare const getSimpleModePaginationClassName: (withLineHeight?: boolean) => string;
22
+ export declare const getMobileCompactPaginationClassName: () => string;
23
+ export declare const mergePaginationClassName: (...classNames: Array<string | undefined | false>) => string;
24
+ export declare const createCompactSimpleItemRender: (options: {
25
+ current?: number;
26
+ controlHeight?: number;
27
+ currentTextMarginLeft?: number;
28
+ }) => PaginationProps['itemRender'];
29
+ export declare const applyMobilePaginationProps: <T extends PaginationProps>(pagination: T, isMobileLayout: boolean) => PaginationProps;