@nocobase/client 1.7.0-alpha.10 → 1.7.0-alpha.12

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 (69) hide show
  1. package/.dumirc.ts +4 -0
  2. package/es/application/components/defaultComponents.d.ts +3 -1
  3. package/es/collection-manager/interfaces/input.d.ts +6 -0
  4. package/es/collection-manager/interfaces/properties/operators.d.ts +3 -10
  5. package/es/collection-manager/interfaces/radioGroup.d.ts +3 -10
  6. package/es/collection-manager/interfaces/select.d.ts +3 -10
  7. package/es/collection-manager/interfaces/textarea.d.ts +6 -0
  8. package/es/collection-manager/mixins/InheritanceCollectionMixin.d.ts +6 -0
  9. package/es/common/SelectWithTitle.d.ts +1 -1
  10. package/es/data-source/data-source/DataSourceManagerProvider.d.ts +1 -1
  11. package/es/filter-provider/FilterProvider.d.ts +4 -0
  12. package/es/filter-provider/highlightBlock.d.ts +9 -0
  13. package/es/global-theme/type.d.ts +1 -0
  14. package/es/i18n/constant.d.ts +10 -0
  15. package/es/i18n/index.d.ts +1 -0
  16. package/es/index.mjs +8807 -7882
  17. package/es/modules/actions/view-edit-popup/customizePopupActionSettings.d.ts +0 -8
  18. package/es/route-switch/antd/admin-layout/index.d.ts +1 -0
  19. package/es/schema-component/antd/action/Action.Designer.d.ts +1 -0
  20. package/es/schema-component/antd/action/Action.Modal.d.ts +1 -0
  21. package/es/schema-component/antd/action/types.d.ts +1 -0
  22. package/es/schema-component/antd/action/utils.d.ts +2 -1
  23. package/es/schema-component/antd/index.d.ts +1 -0
  24. package/es/schema-component/antd/input/Input.d.ts +4 -1
  25. package/es/schema-component/antd/linkageFilter/DynamicComponent.d.ts +36 -0
  26. package/es/schema-component/antd/linkageFilter/FilterGroup.d.ts +10 -0
  27. package/es/schema-component/antd/linkageFilter/FilterItems.d.ts +10 -0
  28. package/es/schema-component/antd/linkageFilter/LinkageFilter.d.ts +9 -0
  29. package/es/schema-component/antd/linkageFilter/LinkageFilterItem.d.ts +10 -0
  30. package/es/schema-component/antd/linkageFilter/context.d.ts +26 -0
  31. package/es/schema-component/antd/linkageFilter/index.d.ts +9 -0
  32. package/es/schema-component/antd/linkageFilter/useOperators.d.ts +13 -0
  33. package/es/schema-component/antd/linkageFilter/useValues.d.ts +25 -0
  34. package/es/schema-component/antd/list/index.d.ts +1 -0
  35. package/es/schema-component/antd/page/AllDataBlocksProvider.d.ts +17 -0
  36. package/es/schema-component/antd/page/index.d.ts +1 -0
  37. package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
  38. package/es/schema-component/antd/variable/Input.d.ts +2 -0
  39. package/es/schema-component/antd/variable/TextArea.d.ts +14 -1
  40. package/es/schema-component/antd/variable/Variable.d.ts +1 -1
  41. package/es/schema-component/common/utils/uitls.d.ts +2 -5
  42. package/es/schema-component/core/DesignableSwitch.d.ts +4 -2
  43. package/es/schema-initializer/components/assigned-field/AssignedField.d.ts +2 -1
  44. package/es/schema-settings/LinkageRules/bindLinkageRulesToFiled.d.ts +2 -1
  45. package/es/schema-settings/LinkageRules/type.d.ts +2 -1
  46. package/es/schema-settings/SchemaSettings.d.ts +4 -0
  47. package/es/schema-settings/VariableInput/VariableInput.d.ts +4 -0
  48. package/es/schema-settings/VariableInput/hooks/index.d.ts +1 -0
  49. package/es/schema-settings/VariableInput/hooks/useBaseVariable.d.ts +3 -1
  50. package/es/schema-settings/VariableInput/hooks/useContextAssociationFields.d.ts +2 -2
  51. package/es/schema-settings/VariableInput/hooks/useDateVariable.d.ts +114 -2
  52. package/es/schema-settings/VariableInput/hooks/useRoleVariable.d.ts +1 -1
  53. package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +35 -0
  54. package/lib/index.js +219 -185
  55. package/lib/locale/de-DE.js +6 -1
  56. package/lib/locale/en-US.js +6 -1
  57. package/lib/locale/es-ES.js +6 -1
  58. package/lib/locale/fr-FR.js +6 -1
  59. package/lib/locale/it-IT.js +9 -1
  60. package/lib/locale/ja-JP.js +6 -1
  61. package/lib/locale/ko-KR.js +6 -1
  62. package/lib/locale/nl-NL.js +4 -1
  63. package/lib/locale/pt-BR.js +9 -1
  64. package/lib/locale/ru-RU.js +9 -1
  65. package/lib/locale/tr-TR.js +9 -1
  66. package/lib/locale/uk-UA.js +9 -1
  67. package/lib/locale/zh-CN.js +10 -1
  68. package/lib/locale/zh-TW.js +9 -1
  69. package/package.json +5 -5
package/.dumirc.ts CHANGED
@@ -234,6 +234,10 @@ export default defineConfig({
234
234
  "title": "Filter",
235
235
  "link": "/components/filter"
236
236
  },
237
+ {
238
+ "title": "LinkageFilter",
239
+ "link": "/components/linkage-filter"
240
+ },
237
241
  ]
238
242
  },
239
243
  {
@@ -11,7 +11,9 @@ export declare const defaultAppComponents: {
11
11
  AppMain: React.NamedExoticComponent<object>;
12
12
  AppSpin: React.FC;
13
13
  AppError: React.FC<{
14
- error: Error;
14
+ error: Error & {
15
+ title?: string;
16
+ };
15
17
  }>;
16
18
  AppNotFound: React.FC;
17
19
  };
@@ -26,6 +26,12 @@ export declare class InputFieldInterface extends CollectionFieldInterface {
26
26
  availableTypes: string[];
27
27
  hasDefaultValue: boolean;
28
28
  properties: {
29
+ trim: {
30
+ type: string;
31
+ 'x-content': string;
32
+ 'x-decorator': string;
33
+ 'x-component': string;
34
+ };
29
35
  layout: {
30
36
  type: string;
31
37
  title: string;
@@ -133,17 +133,10 @@ export declare const enumType: ({
133
133
  selected: boolean;
134
134
  schema: {
135
135
  'x-component': string;
136
- 'x-component-props'?: undefined;
137
- };
138
- noValue?: undefined;
139
- } | {
140
- label: string;
141
- value: string;
142
- schema: {
143
- 'x-component': string;
144
- 'x-component-props'?: undefined;
136
+ 'x-component-props': {
137
+ mode: any;
138
+ };
145
139
  };
146
- selected?: undefined;
147
140
  noValue?: undefined;
148
141
  } | {
149
142
  label: string;
@@ -106,17 +106,10 @@ export declare class RadioGroupFieldInterface extends CollectionFieldInterface {
106
106
  selected: boolean;
107
107
  schema: {
108
108
  'x-component': string;
109
- 'x-component-props'?: undefined;
110
- };
111
- noValue?: undefined;
112
- } | {
113
- label: string;
114
- value: string;
115
- schema: {
116
- 'x-component': string;
117
- 'x-component-props'?: undefined;
109
+ 'x-component-props': {
110
+ mode: any;
111
+ };
118
112
  };
119
- selected?: undefined;
120
113
  noValue?: undefined;
121
114
  } | {
122
115
  label: string;
@@ -108,17 +108,10 @@ export declare class SelectFieldInterface extends CollectionFieldInterface {
108
108
  selected: boolean;
109
109
  schema: {
110
110
  'x-component': string;
111
- 'x-component-props'?: undefined;
112
- };
113
- noValue?: undefined;
114
- } | {
115
- label: string;
116
- value: string;
117
- schema: {
118
- 'x-component': string;
119
- 'x-component-props'?: undefined;
111
+ 'x-component-props': {
112
+ mode: any;
113
+ };
120
114
  };
121
- selected?: undefined;
122
115
  noValue?: undefined;
123
116
  } | {
124
117
  label: string;
@@ -26,6 +26,12 @@ export declare class TextareaFieldInterface extends CollectionFieldInterface {
26
26
  hasDefaultValue: boolean;
27
27
  titleUsable: boolean;
28
28
  properties: {
29
+ trim: {
30
+ type: string;
31
+ 'x-content': string;
32
+ 'x-decorator': string;
33
+ 'x-component': string;
34
+ };
29
35
  'uiSchema.title': {
30
36
  type: string;
31
37
  title: string;
@@ -25,6 +25,7 @@ export declare class InheritanceCollectionMixin extends Collection {
25
25
  protected parentCollectionFields: Record<string, CollectionFieldOptions[]>;
26
26
  protected allCollectionsInheritChain: string[];
27
27
  protected inheritCollectionsChain: string[];
28
+ protected inheritChain: string[];
28
29
  protected foreignKeyFields: CollectionFieldOptions[];
29
30
  getParentCollectionsName(): string[];
30
31
  getParentCollections(): Collection[];
@@ -36,6 +37,11 @@ export declare class InheritanceCollectionMixin extends Collection {
36
37
  getParentCollectionFields(parentCollectionName: string): CollectionFieldOptions[];
37
38
  getAllCollectionsInheritChain(): string[];
38
39
  getInheritCollectionsChain(): string[];
40
+ /**
41
+ * 获取所有祖先数据表和后代数据表,不包括兄弟表。用于下面这些地方:
42
+ * - 筛选区块链接数据区块时使用
43
+ */
44
+ getInheritChain(): string[];
39
45
  getAllFields(predicate?: GetCollectionFieldPredicate): CollectionFieldOptions[];
40
46
  getForeignKeyFields(): CollectionFieldOptions[];
41
47
  }
@@ -14,4 +14,4 @@ export interface SelectWithTitleProps {
14
14
  fieldNames?: any;
15
15
  onChange?: (...args: any[]) => void;
16
16
  }
17
- export declare function SelectWithTitle({ title, defaultValue, onChange, options, fieldNames }: SelectWithTitleProps): React.JSX.Element;
17
+ export declare function SelectWithTitle({ title, defaultValue, onChange, options, fieldNames, ...others }: SelectWithTitleProps): React.JSX.Element;
@@ -16,7 +16,7 @@ export interface DataSourceManagerProviderProps {
16
16
  export declare const DataSourceManagerProvider: FC<DataSourceManagerProviderProps>;
17
17
  export declare function useDataSourceManager(): DataSourceManager;
18
18
  /**
19
- * 获取当前 collection 继承链路上的所有 collection
19
+ * 获取当前 collection 继承链路上的所有 collection(不包括兄弟表)
20
20
  * @returns
21
21
  */
22
22
  export declare function useAllCollectionsInheritChainGetter(): {
@@ -56,6 +56,10 @@ export interface DataBlock {
56
56
  * manual: 只有当点击了筛选按钮,才会请求数据
57
57
  */
58
58
  dataLoadingMode?: 'auto' | 'manual';
59
+ /** 让整个区块悬浮起来 */
60
+ highlightBlock: () => void;
61
+ /** 取消悬浮 */
62
+ unhighlightBlock: () => void;
59
63
  }
60
64
  /**
61
65
  * 主要用于记录当前页面中的数据区块的信息,用于在过滤区块中使用
@@ -0,0 +1,9 @@
1
+ export declare const highlightBlock: (clonedBlockDom: HTMLElement, boxRect: DOMRect) => void;
2
+ export declare const unhighlightBlock: () => void;
3
+ export declare const startScrollEndTracking: (dom: HTMLElement & {
4
+ _prevRect?: DOMRect;
5
+ _timer?: any;
6
+ }, callback: () => void) => void;
7
+ export declare const stopScrollEndTracking: (dom: HTMLElement & {
8
+ _timer?: any;
9
+ }) => void;
@@ -43,6 +43,7 @@ export interface CustomToken extends AliasToken {
43
43
  marginBlock: number;
44
44
  /** 区块的圆角 */
45
45
  borderRadiusBlock: number;
46
+ siderWidth: number;
46
47
  }
47
48
  export interface ThemeConfig extends _ThemeConfig {
48
49
  name?: string;
@@ -0,0 +1,10 @@
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
+ declare const NAMESPACE_UI_SCHEMA = "ui-schema-storage";
10
+ export { NAMESPACE_UI_SCHEMA };
@@ -7,3 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  export * from './i18n';
10
+ export * from './constant';