@nocobase/client 1.2.14-alpha → 1.3.0-alpha.20240710141659

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 (53) hide show
  1. package/es/application/CustomRouterContextProvider.d.ts +23 -0
  2. package/es/application/index.d.ts +4 -0
  3. package/es/application/schema-initializer/components/SchemaInitializerItem.d.ts +1 -0
  4. package/es/application/schema-settings/index.d.ts +0 -1
  5. package/es/data-source/collection/CollectionManager.d.ts +10 -0
  6. package/es/filter-provider/FilterProvider.d.ts +1 -1
  7. package/es/index.mjs +5357 -4595
  8. package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.d.ts +0 -8
  9. package/es/{schema-component/antd/page/style.d.ts → modules/blocks/data-blocks/form/hooks/useDataFormItemProps.d.ts} +3 -1
  10. package/es/route-switch/antd/route-schema-component/index.d.ts +1 -1
  11. package/es/schema-component/antd/action/Action.Designer.d.ts +1 -0
  12. package/es/schema-component/antd/action/Action.Drawer.d.ts +1 -2
  13. package/es/{application/schema-settings/utils/index.d.ts → schema-component/antd/action/Action.Page.style.d.ts} +3 -3
  14. package/es/schema-component/antd/action/hooks/usePopupSlotDOM.d.ts +15 -0
  15. package/es/schema-component/antd/action/hooks.d.ts +0 -3
  16. package/es/schema-component/antd/association-field/InternalViewer.d.ts +8 -0
  17. package/es/schema-component/antd/association-field/hooks.d.ts +6 -1
  18. package/es/schema-component/antd/page/BackButtonUsedInSubPage.d.ts +14 -0
  19. package/es/schema-component/antd/page/Page.d.ts +1 -0
  20. package/es/schema-component/antd/page/Page.style.d.ts +9 -0
  21. package/es/schema-component/antd/page/PagePopups.d.ts +120 -0
  22. package/es/schema-component/antd/page/PopupSettingsProvider.d.ts +15 -0
  23. package/es/schema-component/antd/page/index.d.ts +3 -3
  24. package/es/schema-component/antd/page/nestedSchemaKeyStorage.d.ts +10 -0
  25. package/es/schema-component/antd/page/pagePopupUtils.d.ts +82 -0
  26. package/es/schema-component/antd/page/usePopupContextInActionOrAssociationField.d.ts +30 -0
  27. package/es/schema-component/core/SchemaComponent.d.ts +2 -2
  28. package/es/schema-component/core/useRequestSchema.d.ts +16 -0
  29. package/es/schema-items/GeneralSettings.d.ts +0 -8
  30. package/es/schema-items/OpenModeSchemaItems.d.ts +4 -0
  31. package/es/schema-settings/LinkageRules/LinkageRuleAction.d.ts +1 -0
  32. package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +2 -3
  33. package/es/schema-settings/LinkageRules/ValueDynamicComponent.d.ts +2 -0
  34. package/es/schema-settings/LinkageRules/compute-rules.d.ts +13 -0
  35. package/es/schema-settings/LinkageRules/type.d.ts +8 -1
  36. package/es/schema-settings/LinkageRules/useActionValues.d.ts +17 -0
  37. package/es/schema-settings/SchemaSettings.d.ts +1 -0
  38. package/es/schema-settings/VariableInput/hooks/useParentPopupVariable.d.ts +1 -0
  39. package/es/schema-settings/VariableInput/hooks/usePopupVariable.d.ts +1 -0
  40. package/es/schema-settings/VariableInput/hooks/useURLSearchParamsVariable.d.ts +1 -2
  41. package/lib/index.js +144 -136
  42. package/lib/locale/en_US.js +4 -1
  43. package/lib/locale/es_ES.js +2 -1
  44. package/lib/locale/fr_FR.js +2 -1
  45. package/lib/locale/ja_JP.js +2 -1
  46. package/lib/locale/ko_KR.js +2 -1
  47. package/lib/locale/pt_BR.js +2 -1
  48. package/lib/locale/ru_RU.js +2 -1
  49. package/lib/locale/tr_TR.js +2 -1
  50. package/lib/locale/uk_UA.js +2 -1
  51. package/lib/locale/zh-CN.js +3 -1
  52. package/lib/locale/zh-TW.js +2 -1
  53. package/package.json +5 -5
@@ -0,0 +1,23 @@
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, { FC } from 'react';
10
+ import { Location, NavigateFunction } from 'react-router-dom';
11
+ export declare const LocationSearchContext: React.Context<string>;
12
+ /**
13
+ * use `useNavigateNoUpdate` to avoid components that use `useNavigateNoUpdate` re-rendering.
14
+ * @returns
15
+ */
16
+ export declare const useNavigateNoUpdate: () => NavigateFunction;
17
+ /**
18
+ * use `useLocationNoUpdate` to avoid components that use `useLocationNoUpdate` re-rendering.
19
+ * @returns
20
+ */
21
+ export declare const useLocationNoUpdate: () => Location<any>;
22
+ export declare const useLocationSearch: () => string;
23
+ export declare const CustomRouterContextProvider: FC;
@@ -7,6 +7,7 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  export * from './Application';
10
+ export * from './CustomRouterContextProvider';
10
11
  export * from './Plugin';
11
12
  export * from './PluginSettingsManager';
12
13
  export * from './RouterManager';
@@ -18,5 +19,8 @@ export * from './schema-initializer';
18
19
  export * from './schema-settings';
19
20
  export * from './schema-settings/context/SchemaSettingItemContext';
20
21
  export * from './schema-settings/hooks/useSchemaSettingsRender';
22
+ export * from './schema-settings/utils/createModalSettingsItem';
23
+ export * from './schema-settings/utils/createSelectSettingsItem';
24
+ export * from './schema-settings/utils/createSwitchSettingsItem';
21
25
  export * from './schema-toolbar';
22
26
  export * from './utils';
@@ -14,6 +14,7 @@ export interface SchemaInitializerItemProps {
14
14
  icon?: React.ReactNode;
15
15
  title?: React.ReactNode;
16
16
  items?: any[];
17
+ disabled?: boolean;
17
18
  onClick?: (args?: any) => any;
18
19
  applyMenuStyle?: boolean;
19
20
  children?: ReactNode;
@@ -11,4 +11,3 @@ export * from './SchemaSettingsManager';
11
11
  export * from './components';
12
12
  export * from './context/SchemaSettingItemContext';
13
13
  export * from './types';
14
- export * from './utils';
@@ -40,6 +40,16 @@ export declare class CollectionManager {
40
40
  */
41
41
  getCollectionField(path: SchemaKey | CollectionFieldOptions): any;
42
42
  getCollectionFields(collectionName: string, predicate?: GetCollectionFieldPredicate): CollectionFieldOptions[];
43
+ /**
44
+ * @example
45
+ * getFilterByTK('users', { id: 1 }); // 1
46
+ * getFilterByTK('users.profile', { name: 'name' }); // name
47
+ *
48
+ * @param collectionOrAssociation - collection name or association name
49
+ * @param collectionRecordOrAssociationRecord - collection record or association record
50
+ * @returns the value of the filterByTK
51
+ */
52
+ getFilterByTK(collectionOrAssociation: string | Collection, collectionRecordOrAssociationRecord: Record<string, any>): any;
43
53
  getSourceKeyByAssociation(associationName: string): any;
44
54
  /**
45
55
  * @internal
@@ -27,7 +27,7 @@ export interface ForeignKeyField {
27
27
  }
28
28
  type Collection = ReturnType<typeof useCollection_deprecated>;
29
29
  export interface DataBlock {
30
- /** 唯一标识符,schema 中的 name 值 */
30
+ /** 唯一标识符,schema 中的 x-uid 值 */
31
31
  uid: string;
32
32
  /** 用户自行设置的区块名称 */
33
33
  title?: string;