@nocobase/client 0.21.0-alpha.14 → 0.21.0-alpha.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 (38) hide show
  1. package/.dumirc.ts +25 -1
  2. package/es/api-client/APIClient.d.ts +1 -0
  3. package/es/application/Application.d.ts +3 -0
  4. package/es/application/RouterManager.d.ts +1 -0
  5. package/es/block-provider/BlockProvider.d.ts +7 -0
  6. package/es/collection-manager/collectionPlugin.d.ts +1 -0
  7. package/es/collection-manager/templates/components/UnSupportFields.d.ts +4 -0
  8. package/es/collection-manager/templates/properties/index.d.ts +3 -0
  9. package/es/global-theme/customAlgorithm.d.ts +7 -0
  10. package/es/global-theme/type.d.ts +12 -0
  11. package/es/index.mjs +2232 -2221
  12. package/es/{md-iAGHvWot.mjs → md-1OKMvqVH.mjs} +1 -0
  13. package/es/modules/fields/component/FileManager/previewComponentFieldSettings.d.ts +2 -0
  14. package/es/schema-component/antd/association-field/AssociationSelect.d.ts +1 -0
  15. package/es/schema-component/antd/block-item/BlockItemCard.d.ts +1 -1
  16. package/es/schema-component/antd/input-number/ReadPretty.d.ts +15 -4
  17. package/es/schema-component/antd/page/FixedBlock.d.ts +2 -2
  18. package/es/schema-component/antd/password/utils.d.ts +1 -1
  19. package/es/schema-settings/VariableInput/hooks/useBaseVariable.d.ts +6 -1
  20. package/es/schema-settings/VariableInput/type.d.ts +1 -0
  21. package/es/style/index.d.ts +6 -1
  22. package/lib/index.js +169 -140
  23. package/lib/locale/en_US.js +2 -1
  24. package/lib/locale/es_ES.js +2 -1
  25. package/lib/locale/fr_FR.js +2 -1
  26. package/lib/locale/ja_JP.js +2 -1
  27. package/lib/locale/ko_KR.js +2 -1
  28. package/lib/locale/pt_BR.js +2 -1
  29. package/lib/locale/ru_RU.js +2 -1
  30. package/lib/locale/tr_TR.js +2 -1
  31. package/lib/locale/uk_UA.js +2 -1
  32. package/lib/locale/zh-CN.js +9 -3
  33. package/lib/locale/zh-TW.js +2 -1
  34. package/lib/md-1OKMvqVH-tU4j-cWD.js +1 -0
  35. package/package.json +5 -5
  36. package/es/schema-component/antd/color-picker/ReadPretty.d.ts +0 -7
  37. package/es/schema-component/antd/color-picker/util.d.ts +0 -31
  38. package/lib/md-iAGHvWot-jxZqkGLs.js +0 -1
package/.dumirc.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import path from 'path';
2
+ import glob from 'glob';
3
+ import _ from 'lodash'
1
4
  import { getUmiConfig } from '@nocobase/devtools/umiConfig';
2
5
  import { defineConfig } from 'dumi';
3
6
  import { defineThemeConfig } from 'dumi-theme-nocobase';
@@ -8,6 +11,19 @@ const lang = process.env.DOC_LANG;
8
11
 
9
12
  console.log('process.env.DOC_LANG', lang);
10
13
 
14
+ const componentsDir = 'src/schema-component/antd';
15
+
16
+ function getComponentsMenu() {
17
+ const cwd = path.join(__dirname, componentsDir);
18
+ const ignores = ['table/index.md', 'form/index.md']; // 老版本,不需要展示
19
+ const files = glob.sync('*/index.md', { cwd, ignore: ignores });
20
+
21
+ return files.map((file) => ({
22
+ title: _.upperFirst(_.camelCase(file.replace('/index.md', ''))),
23
+ link: `/components/${file.replace('/index.md', '')}`,
24
+ }));
25
+ }
26
+
11
27
  export default defineConfig({
12
28
  hash: true,
13
29
  alias: {
@@ -21,7 +37,10 @@ export default defineConfig({
21
37
  cacheDirectoryPath: `node_modules/.docs-client-${lang}-cache`,
22
38
  outputPath: `./dist/${lang}`,
23
39
  resolve: {
24
- docDirs: [`./docs/${lang}`]
40
+ docDirs: [`./docs/${lang}`],
41
+ atomDirs: [
42
+ { type: 'component', dir: componentsDir },
43
+ ],
25
44
  },
26
45
  locales: [
27
46
  { id: 'en-US', name: 'English' },
@@ -38,6 +57,10 @@ export default defineConfig({
38
57
  title: 'API',
39
58
  link: '/core/application/application',
40
59
  },
60
+ {
61
+ title: 'Components',
62
+ link: '/components/action',
63
+ }
41
64
  // {
42
65
  // title: 'UI Schema',
43
66
  // link: '/ui-schema',
@@ -202,6 +225,7 @@ export default defineConfig({
202
225
  ]
203
226
  }
204
227
  ],
228
+ '/components': getComponentsMenu(),
205
229
  // '/ui-schema': [
206
230
  // {
207
231
  // title: 'Overview',
@@ -7,6 +7,7 @@ export declare class APIClient extends APIClientSDK {
7
7
  app: Application;
8
8
  /** 该值会在 AntdAppProvider 中被重新赋值 */
9
9
  notification: any;
10
+ getHeaders(): {};
10
11
  service(uid: string): Result<any, any>;
11
12
  interceptors(): void;
12
13
  useNotificationMiddleware(): void;
@@ -38,6 +38,7 @@ export interface ApplicationOptions {
38
38
  loadRemotePlugins?: boolean;
39
39
  devDynamicImport?: DevDynamicImport;
40
40
  dataSourceManager?: DataSourceManagerOptions;
41
+ disableAcl?: boolean;
41
42
  }
42
43
  export declare class Application {
43
44
  protected options: ApplicationOptions;
@@ -62,12 +63,14 @@ export declare class Application {
62
63
  maintaining: boolean;
63
64
  error: any;
64
65
  get pm(): PluginManager;
66
+ get disableAcl(): boolean;
65
67
  constructor(options?: ApplicationOptions);
66
68
  private initRequireJs;
67
69
  private addDefaultProviders;
68
70
  private addReactRouterComponents;
69
71
  private addRoutes;
70
72
  getOptions(): ApplicationOptions;
73
+ getName(): string;
71
74
  getPublicPath(): string;
72
75
  getApiUrl(pathname?: string): string;
73
76
  getRouteUrl(pathname: string): string;
@@ -12,6 +12,7 @@ export interface MemoryRouterOptions extends Omit<MemoryRouterProps, 'children'>
12
12
  }
13
13
  export type RouterOptions = (HashRouterOptions | BrowserRouterOptions | MemoryRouterOptions) & {
14
14
  renderComponent?: RenderComponentType;
15
+ routes?: Record<string, RouteType>;
15
16
  };
16
17
  export type ComponentTypeAndString<T = any> = ComponentType<T> | string;
17
18
  export interface RouteType extends Omit<RouteObject, 'children' | 'Component'> {
@@ -57,6 +57,13 @@ export declare const useBlockRequestContext: () => {
57
57
  * 废弃组件,不建议使用
58
58
  */
59
59
  export declare const RenderChildrenWithAssociationFilter: React.FC<any>;
60
+ /**
61
+ * @internal
62
+ */
63
+ export declare const BlockContext: React.Context<{
64
+ /** 用以区分区块的标识 */
65
+ name: string;
66
+ }>;
60
67
  /**
61
68
  * @internal
62
69
  * @returns
@@ -1,6 +1,7 @@
1
1
  import { Plugin } from '../application/Plugin';
2
2
  export declare class CollectionPlugin extends Plugin {
3
3
  load(): Promise<void>;
4
+ addMainDataSource(): void;
4
5
  addFieldInterfaceGroups(): void;
5
6
  addFieldInterfaces(): void;
6
7
  addCollectionTemplates(): void;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const UnSupportFields: ({ dataSource }: {
3
+ dataSource: any;
4
+ }) => React.JSX.Element;
@@ -57,6 +57,9 @@ export declare const defaultConfigurableProperties: {
57
57
  className: string;
58
58
  };
59
59
  'x-component': import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
60
+ 'x-component-props': {
61
+ disabled: string;
62
+ };
60
63
  };
61
64
  };
62
65
  export type DefaultConfigurableKeys = 'name' | 'title' | 'inherits' | 'category' | 'autoGenId' | 'createdBy' | 'updatedBy' | 'createdAt' | 'updatedAt' | 'sortable' | 'description' | 'presetFields';
@@ -0,0 +1,7 @@
1
+ import { MappingAlgorithm } from 'antd';
2
+ import { ThemeConfig } from './type';
3
+ /**
4
+ * 该算法用于计算自定义的一些 token
5
+ */
6
+ export declare const customAlgorithm: MappingAlgorithm;
7
+ export declare const addCustomAlgorithmToTheme: (theme: ThemeConfig) => ThemeConfig;
@@ -21,6 +21,18 @@ export interface CustomToken extends AliasToken {
21
21
  colorBgSettingsHover: string;
22
22
  /** 鼠标悬浮时显示的边框色 */
23
23
  colorBorderSettingsHover: string;
24
+ /** 页面左右内边距 */
25
+ paddingPageHorizontal: number;
26
+ /** 页面上下内边距 */
27
+ paddingPageVertical: number;
28
+ /** 弹窗左右内边距 */
29
+ paddingPopupHorizontal: number;
30
+ /** 弹窗上下内边距 */
31
+ paddingPopupVertical: number;
32
+ /** 区块之间的间隔 */
33
+ marginBlock: number;
34
+ /** 区块的圆角 */
35
+ borderRadiusBlock: number;
24
36
  }
25
37
  export interface ThemeConfig extends _ThemeConfig {
26
38
  name?: string;