@nocobase/client-v2 2.1.0-alpha.40 → 2.1.0-alpha.45
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/es/Application.d.ts +7 -0
- package/es/BaseApplication.d.ts +13 -0
- package/es/RouterManager.d.ts +1 -0
- package/es/collection-field-interface/CollectionFieldInterface.d.ts +51 -15
- package/es/collection-field-interface/CollectionFieldInterfaceManager.d.ts +82 -3
- package/es/collection-manager/field-configure.d.ts +80 -0
- package/es/collection-manager/field-validation.d.ts +43 -0
- package/es/collection-manager/filter-operators/index.d.ts +46 -0
- package/es/collection-manager/filter-operators/operators.d.ts +30 -0
- package/es/collection-manager/interfaces/checkbox.d.ts +1 -41
- package/es/collection-manager/interfaces/checkboxGroup.d.ts +12 -44
- package/es/collection-manager/interfaces/collection.d.ts +12 -51
- package/es/collection-manager/interfaces/color.d.ts +1 -16
- package/es/collection-manager/interfaces/createdAt.d.ts +1 -44
- package/es/collection-manager/interfaces/createdBy.d.ts +0 -4
- package/es/collection-manager/interfaces/dateOnly.d.ts +7 -44
- package/es/collection-manager/interfaces/datetime.d.ts +1 -44
- package/es/collection-manager/interfaces/datetimeNoTz.d.ts +1 -44
- package/es/collection-manager/interfaces/email.d.ts +1 -29
- package/es/collection-manager/interfaces/id.d.ts +1 -16
- package/es/collection-manager/interfaces/index.d.ts +2 -3
- package/es/collection-manager/interfaces/input.d.ts +1 -102
- package/es/collection-manager/interfaces/integer.d.ts +1 -95
- package/es/collection-manager/interfaces/json.d.ts +16 -7
- package/es/collection-manager/interfaces/m2m.d.ts +11 -19
- package/es/collection-manager/interfaces/m2o.d.ts +11 -19
- package/es/collection-manager/interfaces/markdown.d.ts +1 -63
- package/es/collection-manager/interfaces/multipleSelect.d.ts +12 -44
- package/es/collection-manager/interfaces/nanoid.d.ts +1 -34
- package/es/collection-manager/interfaces/number.d.ts +1 -87
- package/es/collection-manager/interfaces/o2m.d.ts +12 -24
- package/es/collection-manager/interfaces/obo.d.ts +207 -0
- package/es/collection-manager/interfaces/oho.d.ts +207 -0
- package/es/collection-manager/interfaces/password.d.ts +1 -56
- package/es/collection-manager/interfaces/percent.d.ts +1 -84
- package/es/collection-manager/interfaces/phone.d.ts +1 -25
- package/es/collection-manager/interfaces/properties/index.d.ts +0 -28
- package/es/collection-manager/interfaces/radioGroup.d.ts +1 -29
- package/es/collection-manager/interfaces/richText.d.ts +1 -63
- package/es/collection-manager/interfaces/select.d.ts +12 -44
- package/es/collection-manager/interfaces/snowflake-id.d.ts +1 -34
- package/es/collection-manager/interfaces/tableoid.d.ts +1 -10
- package/es/collection-manager/interfaces/textarea.d.ts +1 -51
- package/es/collection-manager/interfaces/time.d.ts +1 -16
- package/es/collection-manager/interfaces/types.d.ts +3 -12
- package/es/collection-manager/interfaces/unixTimestamp.d.ts +1 -44
- package/es/collection-manager/interfaces/updatedAt.d.ts +1 -44
- package/es/collection-manager/interfaces/updatedBy.d.ts +0 -4
- package/es/collection-manager/interfaces/url.d.ts +1 -20
- package/es/collection-manager/interfaces/uuid.d.ts +1 -34
- package/es/collection-manager/template-fields.d.ts +53 -0
- package/es/components/KeepAlive.d.ts +22 -0
- package/es/components/RouterBridge.d.ts +9 -0
- package/es/components/form/DialogFormLayout.d.ts +5 -29
- package/es/components/form/VariableInput.d.ts +53 -2
- package/es/components/form/filter/CollectionFilter.d.ts +49 -0
- package/es/components/form/filter/CollectionFilterItem.d.ts +49 -0
- package/es/components/form/filter/DateFilterDynamicComponent.d.ts +57 -0
- package/es/components/form/filter/FilterValueInput.d.ts +29 -0
- package/es/components/form/filter/index.d.ts +11 -0
- package/es/components/form/filter/useFilterActionProps.d.ts +96 -0
- package/es/components/form/index.d.ts +1 -0
- package/es/data-source/ExtendCollectionsProvider.d.ts +50 -0
- package/es/data-source/index.d.ts +9 -0
- package/es/flow/FlowPage.d.ts +2 -1
- package/es/flow/admin-shell/AdminLayoutRouteCoordinator.d.ts +8 -40
- package/es/flow/admin-shell/BaseLayoutModel.d.ts +89 -0
- package/es/flow/admin-shell/BaseLayoutRouteCoordinator.d.ts +74 -0
- package/es/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.d.ts +12 -0
- package/es/flow/admin-shell/admin-layout/AdminLayoutModel.d.ts +7 -92
- package/es/flow/admin-shell/admin-layout/AppListRender.d.ts +11 -0
- package/es/flow/admin-shell/admin-layout/index.d.ts +3 -0
- package/es/flow/admin-shell/admin-layout/useApplications.d.ts +3 -2
- package/es/flow/admin-shell/useAdminLayoutRoutePage.d.ts +2 -2
- package/es/flow/admin-shell/useLayoutRoutePage.d.ts +23 -0
- package/es/flow/components/FlowRoute.d.ts +10 -1
- package/es/flow/components/filter/index.d.ts +2 -0
- package/es/flow/components/filter/useFilterOptions.d.ts +66 -0
- package/es/flow/index.d.ts +4 -0
- package/es/flow/models/base/PageModel/PageModel.d.ts +3 -1
- package/es/flow/models/blocks/assign-form/assignFieldValuesFlow.d.ts +84 -0
- package/es/flow/models/blocks/assign-form/index.d.ts +1 -0
- package/es/flow/models/blocks/form/FormActionGroupModel.d.ts +1 -0
- package/es/flow/models/blocks/form/FormActionModel.d.ts +9 -2
- package/es/flow/models/blocks/table/TableBlockModel.d.ts +10 -0
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/index.d.ts +1 -1
- package/es/flow-compat/passwordUtils.d.ts +1 -1
- package/es/index.d.ts +6 -0
- package/es/index.mjs +552 -459
- package/es/layout-manager/LayoutContentRoute.d.ts +14 -0
- package/es/layout-manager/LayoutManager.d.ts +22 -0
- package/es/layout-manager/LayoutRoute.d.ts +14 -0
- package/es/layout-manager/index.d.ts +13 -0
- package/es/layout-manager/types.d.ts +20 -0
- package/es/layout-manager/utils.d.ts +14 -0
- package/es/nocobase-buildin-plugin/index.d.ts +3 -10
- package/es/settings-center/index.d.ts +1 -1
- package/es/settings-center/plugin-manager/BulkEnableButton.d.ts +15 -0
- package/es/settings-center/plugin-manager/PluginCard.d.ts +15 -0
- package/es/settings-center/plugin-manager/PluginDetail.d.ts +16 -0
- package/es/settings-center/{PluginManagerPage.d.ts → plugin-manager/index.d.ts} +1 -7
- package/es/settings-center/plugin-manager/types.d.ts +34 -0
- package/lib/index.js +552 -459
- package/package.json +8 -7
- package/src/Application.tsx +51 -12
- package/src/BaseApplication.tsx +32 -0
- package/src/PluginSettingsManager.ts +1 -1
- package/src/RouterManager.tsx +17 -1
- package/src/__tests__/PluginSettingsManager.test.ts +41 -2
- package/src/__tests__/app.test.tsx +17 -1
- package/src/__tests__/globalDeps.test.ts +1 -0
- package/src/__tests__/nocobase-buildin-plugin-auth.test.tsx +45 -2
- package/src/__tests__/plugin-manager.test.tsx +177 -0
- package/src/__tests__/settings-center.test.tsx +24 -2
- package/src/collection-field-interface/CollectionFieldInterface.ts +71 -77
- package/src/collection-field-interface/CollectionFieldInterfaceManager.ts +201 -4
- package/src/collection-manager/field-configure.ts +548 -0
- package/src/collection-manager/field-validation.ts +195 -0
- package/src/collection-manager/filter-operators/index.ts +176 -0
- package/src/collection-manager/{interfaces/properties → filter-operators}/operators.ts +24 -13
- package/src/collection-manager/interfaces/checkbox.ts +2 -9
- package/src/collection-manager/interfaces/checkboxGroup.ts +2 -10
- package/src/collection-manager/interfaces/collection.ts +2 -15
- package/src/collection-manager/interfaces/color.ts +2 -2
- package/src/collection-manager/interfaces/createdAt.ts +2 -2
- package/src/collection-manager/interfaces/createdBy.ts +1 -12
- package/src/collection-manager/interfaces/dateOnly.ts +8 -2
- package/src/collection-manager/interfaces/datetime.ts +2 -2
- package/src/collection-manager/interfaces/datetimeNoTz.ts +2 -2
- package/src/collection-manager/interfaces/email.ts +2 -9
- package/src/collection-manager/interfaces/id.ts +1 -2
- package/src/collection-manager/interfaces/index.ts +2 -3
- package/src/collection-manager/interfaces/input.ts +2 -133
- package/src/collection-manager/interfaces/integer.ts +2 -71
- package/src/collection-manager/interfaces/json.tsx +17 -11
- package/src/collection-manager/interfaces/m2m.tsx +0 -21
- package/src/collection-manager/interfaces/m2o.tsx +0 -22
- package/src/collection-manager/interfaces/markdown.ts +2 -51
- package/src/collection-manager/interfaces/multipleSelect.ts +2 -14
- package/src/collection-manager/interfaces/nanoid.ts +2 -2
- package/src/collection-manager/interfaces/number.ts +2 -85
- package/src/collection-manager/interfaces/o2m.tsx +1 -22
- package/src/collection-manager/interfaces/obo.tsx +145 -0
- package/src/collection-manager/interfaces/oho.tsx +145 -0
- package/src/collection-manager/interfaces/password.ts +2 -44
- package/src/collection-manager/interfaces/percent.ts +2 -74
- package/src/collection-manager/interfaces/phone.ts +2 -2
- package/src/collection-manager/interfaces/properties/index.ts +0 -133
- package/src/collection-manager/interfaces/radioGroup.ts +2 -2
- package/src/collection-manager/interfaces/richText.ts +2 -51
- package/src/collection-manager/interfaces/select.ts +2 -14
- package/src/collection-manager/interfaces/snowflake-id.ts +2 -2
- package/src/collection-manager/interfaces/tableoid.ts +1 -2
- package/src/collection-manager/interfaces/textarea.ts +2 -51
- package/src/collection-manager/interfaces/time.ts +2 -2
- package/src/collection-manager/interfaces/types.ts +4 -12
- package/src/collection-manager/interfaces/unixTimestamp.tsx +2 -2
- package/src/collection-manager/interfaces/updatedAt.ts +2 -2
- package/src/collection-manager/interfaces/updatedBy.ts +1 -12
- package/src/collection-manager/interfaces/url.ts +2 -4
- package/src/collection-manager/interfaces/uuid.ts +2 -2
- package/src/collection-manager/template-fields.ts +109 -0
- package/src/components/KeepAlive.tsx +131 -0
- package/src/components/README.md +90 -6
- package/src/components/README.zh-CN.md +90 -7
- package/src/components/RouterBridge.tsx +28 -4
- package/src/components/__tests__/KeepAlive.test.tsx +63 -0
- package/src/components/__tests__/RouterBridge.test.tsx +27 -0
- package/src/components/form/DialogFormLayout.tsx +5 -29
- package/src/components/form/VariableInput.tsx +101 -28
- package/src/components/form/__tests__/VariableInput.test.ts +85 -0
- package/src/components/form/filter/CollectionFilter.tsx +111 -0
- package/src/components/form/filter/CollectionFilterItem.tsx +184 -0
- package/src/components/form/filter/DateFilterDynamicComponent.tsx +283 -0
- package/src/components/form/filter/FilterValueInput.tsx +198 -0
- package/src/components/form/filter/__tests__/CollectionFilterItem.test.tsx +247 -0
- package/src/components/form/filter/__tests__/DateFilterDynamicComponent.test.tsx +148 -0
- package/src/components/form/filter/__tests__/FilterValueInput.test.tsx +243 -0
- package/src/components/form/filter/__tests__/compileFilterGroup.test.ts +146 -0
- package/src/components/form/filter/index.ts +13 -0
- package/src/components/form/filter/useFilterActionProps.ts +203 -0
- package/src/components/form/index.tsx +1 -0
- package/src/data-source/ExtendCollectionsProvider.tsx +144 -0
- package/src/data-source/__tests__/ExtendCollectionsProvider.test.tsx +264 -0
- package/src/data-source/index.ts +10 -0
- package/src/flow/FlowPage.tsx +35 -7
- package/src/flow/__tests__/FlowPage.test.tsx +79 -0
- package/src/flow/__tests__/FlowRoute.test.tsx +529 -2
- package/src/flow/actions/__tests__/linkageRules.subFormSetFieldProps.test.ts +191 -0
- package/src/flow/actions/__tests__/openView.subModelKey.test.tsx +33 -0
- package/src/flow/actions/aclCheck.tsx +4 -0
- package/src/flow/actions/aclCheckRefresh.tsx +4 -0
- package/src/flow/actions/dateTimeFormat.tsx +12 -8
- package/src/flow/actions/linkageRules.tsx +122 -0
- package/src/flow/actions/openView.tsx +28 -4
- package/src/flow/admin-shell/AdminLayoutRouteCoordinator.ts +11 -329
- package/src/flow/admin-shell/BaseLayoutModel.tsx +455 -0
- package/src/flow/admin-shell/BaseLayoutRouteCoordinator.ts +502 -0
- package/src/flow/admin-shell/__tests__/AdminLayoutRouteCoordinator.test.ts +547 -3
- package/src/flow/admin-shell/admin-layout/AdminLayoutComponent.tsx +35 -7
- package/src/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.tsx +160 -0
- package/src/flow/admin-shell/admin-layout/AdminLayoutMenuModels.tsx +0 -12
- package/src/flow/admin-shell/admin-layout/AdminLayoutModel.tsx +28 -201
- package/src/flow/admin-shell/admin-layout/AdminLayoutSlotModels.tsx +11 -2
- package/src/flow/admin-shell/admin-layout/AppListRender.tsx +139 -0
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutMenuModels.test.ts +1 -26
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutModel.test.tsx +149 -27
- package/src/flow/admin-shell/admin-layout/index.ts +3 -0
- package/src/flow/admin-shell/admin-layout/useApplications.tsx +34 -1
- package/src/flow/admin-shell/useAdminLayoutRoutePage.ts +10 -26
- package/src/flow/admin-shell/useLayoutRoutePage.ts +61 -0
- package/src/flow/components/AdminLayout.tsx +4 -154
- package/src/flow/components/FlowRoute.tsx +105 -15
- package/src/flow/components/filter/index.ts +3 -0
- package/src/flow/components/filter/useFilterOptions.ts +102 -0
- package/src/flow/index.ts +4 -0
- package/src/flow/models/actions/UpdateRecordActionModel.tsx +14 -95
- package/src/flow/models/actions/UpdateRecordActionUtils.ts +4 -7
- package/src/flow/models/actions/__tests__/AssignFormRefill.test.ts +26 -1
- package/src/flow/models/base/ActionModel.tsx +8 -1
- package/src/flow/models/base/PageModel/PageModel.tsx +51 -18
- package/src/flow/models/base/PageModel/RootPageModel.tsx +6 -13
- package/src/flow/models/base/PageModel/__tests__/PageModel.test.ts +102 -1
- package/src/flow/models/base/RouteModel.tsx +1 -1
- package/src/flow/models/blocks/assign-form/AssignFormItemModel.tsx +63 -2
- package/src/flow/models/blocks/assign-form/assignFieldValuesFlow.tsx +206 -0
- package/src/flow/models/blocks/assign-form/index.ts +1 -0
- package/src/flow/models/blocks/form/FormActionGroupModel.tsx +14 -0
- package/src/flow/models/blocks/form/FormActionModel.tsx +30 -3
- package/src/flow/models/blocks/form/FormItemModel.tsx +8 -1
- package/src/flow/models/blocks/form/__tests__/FormActionGroupModel.test.ts +46 -0
- package/src/flow/models/blocks/form/__tests__/submitHandler.test.ts +71 -0
- package/src/flow/models/blocks/form/submitHandler.ts +8 -1
- package/src/flow/models/blocks/form/submitValues.ts +4 -1
- package/src/flow/models/blocks/table/TableBlockModel.tsx +118 -16
- package/src/flow/models/blocks/table/__tests__/TableBlockModel.rowSelection.test.tsx +114 -0
- package/src/flow/models/fields/AssociationFieldModel/SubFormFieldModel.tsx +7 -1
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableField.tsx +1 -1
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/index.tsx +6 -5
- package/src/flow/models/fields/ClickableFieldModel.tsx +9 -1
- package/src/flow/models/fields/CollectionSelectorFieldModel.tsx +8 -2
- package/src/flow/models/fields/DisplayEnumFieldModel.tsx +8 -2
- package/src/flow/models/fields/DisplayTimeFieldModel.tsx +1 -1
- package/src/flow/models/fields/TimeFieldModel.tsx +1 -1
- package/src/flow/models/fields/__tests__/TimeFieldModel.test.tsx +61 -0
- package/src/flow/models/fields/mobile-components/MobileDatePicker.tsx +19 -3
- package/src/flow/models/fields/mobile-components/__tests__/MobileDatePicker.test.tsx +94 -0
- package/src/flow/models/topbar/TopbarActionModel.tsx +1 -1
- package/src/flow/utils/__tests__/dateTimeFormat.test.ts +91 -0
- package/src/index.ts +6 -0
- package/src/layout-manager/LayoutContentRoute.tsx +90 -0
- package/src/layout-manager/LayoutManager.tsx +185 -0
- package/src/layout-manager/LayoutRoute.tsx +138 -0
- package/src/layout-manager/__tests__/LayoutManager.test.tsx +335 -0
- package/src/layout-manager/__tests__/LayoutRoute.test.tsx +473 -0
- package/src/layout-manager/index.ts +14 -0
- package/src/layout-manager/types.ts +22 -0
- package/src/layout-manager/utils.ts +37 -0
- package/src/nocobase-buildin-plugin/index.tsx +69 -67
- package/src/nocobase-buildin-plugin/plugins/LocalePlugin.ts +1 -0
- package/src/settings-center/index.ts +1 -1
- package/src/settings-center/plugin-manager/BulkEnableButton.tsx +111 -0
- package/src/settings-center/plugin-manager/PluginCard.tsx +270 -0
- package/src/settings-center/plugin-manager/PluginDetail.tsx +195 -0
- package/src/settings-center/plugin-manager/index.tsx +254 -0
- package/src/settings-center/plugin-manager/types.ts +35 -0
- package/src/settings-center/utils.tsx +8 -1
- package/src/theme/__tests__/globalStyles.test.ts +24 -0
- package/src/theme/globalStyles.ts +10 -0
- package/src/utils/globalDeps.ts +2 -0
- package/es/collection-manager/interfaces/linkTo.d.ts +0 -90
- package/es/collection-manager/interfaces/o2o.d.ts +0 -621
- package/es/collection-manager/interfaces/properties/operators.d.ts +0 -294
- package/es/collection-manager/interfaces/subTable.d.ts +0 -172
- package/src/collection-manager/interfaces/linkTo.ts +0 -120
- package/src/collection-manager/interfaces/o2o.tsx +0 -561
- package/src/collection-manager/interfaces/subTable.ts +0 -218
- package/src/settings-center/PluginManagerPage.tsx +0 -162
|
@@ -1,294 +0,0 @@
|
|
|
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 string: ({
|
|
10
|
-
label: string;
|
|
11
|
-
value: string;
|
|
12
|
-
selected: boolean;
|
|
13
|
-
noValue?: undefined;
|
|
14
|
-
} | {
|
|
15
|
-
label: string;
|
|
16
|
-
value: string;
|
|
17
|
-
selected?: undefined;
|
|
18
|
-
noValue?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
label: string;
|
|
21
|
-
value: string;
|
|
22
|
-
noValue: boolean;
|
|
23
|
-
selected?: undefined;
|
|
24
|
-
})[];
|
|
25
|
-
export declare const array: ({
|
|
26
|
-
label: string;
|
|
27
|
-
value: string;
|
|
28
|
-
selected: boolean;
|
|
29
|
-
schema: {
|
|
30
|
-
'x-component': string;
|
|
31
|
-
'x-component-props': {
|
|
32
|
-
mode: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
noValue?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
label: string;
|
|
38
|
-
value: string;
|
|
39
|
-
schema: {
|
|
40
|
-
'x-component': string;
|
|
41
|
-
'x-component-props': {
|
|
42
|
-
mode: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
selected?: undefined;
|
|
46
|
-
noValue?: undefined;
|
|
47
|
-
} | {
|
|
48
|
-
label: string;
|
|
49
|
-
value: string;
|
|
50
|
-
noValue: boolean;
|
|
51
|
-
selected?: undefined;
|
|
52
|
-
schema?: undefined;
|
|
53
|
-
})[];
|
|
54
|
-
export declare const object: ({
|
|
55
|
-
label: string;
|
|
56
|
-
value: string;
|
|
57
|
-
selected: boolean;
|
|
58
|
-
} | {
|
|
59
|
-
label: string;
|
|
60
|
-
value: string;
|
|
61
|
-
selected?: undefined;
|
|
62
|
-
})[];
|
|
63
|
-
export declare const datetime: ({
|
|
64
|
-
label: string;
|
|
65
|
-
value: string;
|
|
66
|
-
selected: boolean;
|
|
67
|
-
schema: {
|
|
68
|
-
'x-component': string;
|
|
69
|
-
'x-component-props': {
|
|
70
|
-
isRange: boolean;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
onlyFilterAction: boolean;
|
|
74
|
-
noValue?: undefined;
|
|
75
|
-
} | {
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
schema: {
|
|
79
|
-
'x-component': string;
|
|
80
|
-
'x-component-props': {
|
|
81
|
-
isRange: boolean;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
onlyFilterAction: boolean;
|
|
85
|
-
selected?: undefined;
|
|
86
|
-
noValue?: undefined;
|
|
87
|
-
} | {
|
|
88
|
-
label: string;
|
|
89
|
-
value: string;
|
|
90
|
-
schema: {
|
|
91
|
-
'x-component': string;
|
|
92
|
-
'x-component-props': {
|
|
93
|
-
isRange: boolean;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
selected?: undefined;
|
|
97
|
-
onlyFilterAction?: undefined;
|
|
98
|
-
noValue?: undefined;
|
|
99
|
-
} | {
|
|
100
|
-
label: string;
|
|
101
|
-
value: string;
|
|
102
|
-
noValue: boolean;
|
|
103
|
-
selected?: undefined;
|
|
104
|
-
schema?: undefined;
|
|
105
|
-
onlyFilterAction?: undefined;
|
|
106
|
-
})[];
|
|
107
|
-
export declare const number: ({
|
|
108
|
-
label: string;
|
|
109
|
-
value: string;
|
|
110
|
-
selected: boolean;
|
|
111
|
-
noValue?: undefined;
|
|
112
|
-
} | {
|
|
113
|
-
label: string;
|
|
114
|
-
value: string;
|
|
115
|
-
selected?: undefined;
|
|
116
|
-
noValue?: undefined;
|
|
117
|
-
} | {
|
|
118
|
-
label: string;
|
|
119
|
-
value: string;
|
|
120
|
-
noValue: boolean;
|
|
121
|
-
selected?: undefined;
|
|
122
|
-
})[];
|
|
123
|
-
export declare const id: ({
|
|
124
|
-
label: string;
|
|
125
|
-
value: string;
|
|
126
|
-
selected: boolean;
|
|
127
|
-
noValue?: undefined;
|
|
128
|
-
} | {
|
|
129
|
-
label: string;
|
|
130
|
-
value: string;
|
|
131
|
-
selected?: undefined;
|
|
132
|
-
noValue?: undefined;
|
|
133
|
-
} | {
|
|
134
|
-
label: string;
|
|
135
|
-
value: string;
|
|
136
|
-
noValue: boolean;
|
|
137
|
-
selected?: undefined;
|
|
138
|
-
})[];
|
|
139
|
-
export declare const enumType: ({
|
|
140
|
-
label: string;
|
|
141
|
-
value: string;
|
|
142
|
-
selected: boolean;
|
|
143
|
-
schema: {
|
|
144
|
-
'x-component': string;
|
|
145
|
-
'x-component-props': {
|
|
146
|
-
mode: any;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
noValue?: undefined;
|
|
150
|
-
} | {
|
|
151
|
-
label: string;
|
|
152
|
-
value: string;
|
|
153
|
-
schema: {
|
|
154
|
-
'x-component': string;
|
|
155
|
-
'x-component-props': {
|
|
156
|
-
mode: string;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
selected?: undefined;
|
|
160
|
-
noValue?: undefined;
|
|
161
|
-
} | {
|
|
162
|
-
label: string;
|
|
163
|
-
value: string;
|
|
164
|
-
noValue: boolean;
|
|
165
|
-
selected?: undefined;
|
|
166
|
-
schema?: undefined;
|
|
167
|
-
})[];
|
|
168
|
-
export declare const time: ({
|
|
169
|
-
label: string;
|
|
170
|
-
value: string;
|
|
171
|
-
selected: boolean;
|
|
172
|
-
noValue?: undefined;
|
|
173
|
-
} | {
|
|
174
|
-
label: string;
|
|
175
|
-
value: string;
|
|
176
|
-
selected?: undefined;
|
|
177
|
-
noValue?: undefined;
|
|
178
|
-
} | {
|
|
179
|
-
label: string;
|
|
180
|
-
value: string;
|
|
181
|
-
noValue: boolean;
|
|
182
|
-
selected?: undefined;
|
|
183
|
-
})[];
|
|
184
|
-
export declare const boolean: ({
|
|
185
|
-
label: string;
|
|
186
|
-
value: string;
|
|
187
|
-
selected: boolean;
|
|
188
|
-
noValue: boolean;
|
|
189
|
-
schema: {
|
|
190
|
-
'x-component': string;
|
|
191
|
-
'x-component-props': {
|
|
192
|
-
multiple: boolean;
|
|
193
|
-
options: {
|
|
194
|
-
label: string;
|
|
195
|
-
value: boolean;
|
|
196
|
-
}[];
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
} | {
|
|
200
|
-
label: string;
|
|
201
|
-
value: string;
|
|
202
|
-
noValue: boolean;
|
|
203
|
-
schema: {
|
|
204
|
-
'x-component': string;
|
|
205
|
-
'x-component-props': {
|
|
206
|
-
multiple: boolean;
|
|
207
|
-
options: {
|
|
208
|
-
label: string;
|
|
209
|
-
value: boolean;
|
|
210
|
-
}[];
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
selected?: undefined;
|
|
214
|
-
} | {
|
|
215
|
-
label: string;
|
|
216
|
-
value: string;
|
|
217
|
-
noValue: boolean;
|
|
218
|
-
selected?: undefined;
|
|
219
|
-
schema?: undefined;
|
|
220
|
-
})[];
|
|
221
|
-
export declare const tableoid: {
|
|
222
|
-
label: string;
|
|
223
|
-
value: string;
|
|
224
|
-
schema: {
|
|
225
|
-
'x-component': string;
|
|
226
|
-
'x-component-props': {
|
|
227
|
-
mode: string;
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
}[];
|
|
231
|
-
export declare const collection: ({
|
|
232
|
-
label: string;
|
|
233
|
-
value: string;
|
|
234
|
-
selected: boolean;
|
|
235
|
-
schema: {
|
|
236
|
-
'x-component': string;
|
|
237
|
-
'x-component-props'?: undefined;
|
|
238
|
-
};
|
|
239
|
-
noValue?: undefined;
|
|
240
|
-
} | {
|
|
241
|
-
label: string;
|
|
242
|
-
value: string;
|
|
243
|
-
schema: {
|
|
244
|
-
'x-component': string;
|
|
245
|
-
'x-component-props'?: undefined;
|
|
246
|
-
};
|
|
247
|
-
selected?: undefined;
|
|
248
|
-
noValue?: undefined;
|
|
249
|
-
} | {
|
|
250
|
-
label: string;
|
|
251
|
-
value: string;
|
|
252
|
-
schema: {
|
|
253
|
-
'x-component': string;
|
|
254
|
-
'x-component-props': {
|
|
255
|
-
mode: string;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
selected?: undefined;
|
|
259
|
-
noValue?: undefined;
|
|
260
|
-
} | {
|
|
261
|
-
label: string;
|
|
262
|
-
value: string;
|
|
263
|
-
noValue: boolean;
|
|
264
|
-
selected?: undefined;
|
|
265
|
-
schema?: undefined;
|
|
266
|
-
})[];
|
|
267
|
-
export declare const bigField: ({
|
|
268
|
-
label: string;
|
|
269
|
-
value: string;
|
|
270
|
-
selected: boolean;
|
|
271
|
-
schema: {
|
|
272
|
-
type: string;
|
|
273
|
-
'x-component': string;
|
|
274
|
-
};
|
|
275
|
-
noValue?: undefined;
|
|
276
|
-
} | {
|
|
277
|
-
label: string;
|
|
278
|
-
value: string;
|
|
279
|
-
schema: {
|
|
280
|
-
type: string;
|
|
281
|
-
'x-component': string;
|
|
282
|
-
};
|
|
283
|
-
selected?: undefined;
|
|
284
|
-
noValue?: undefined;
|
|
285
|
-
} | {
|
|
286
|
-
label: string;
|
|
287
|
-
value: string;
|
|
288
|
-
noValue: boolean;
|
|
289
|
-
schema: {
|
|
290
|
-
type: string;
|
|
291
|
-
'x-component': string;
|
|
292
|
-
};
|
|
293
|
-
selected?: undefined;
|
|
294
|
-
})[];
|
|
@@ -1,172 +0,0 @@
|
|
|
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 { ISchema } from '@formily/react';
|
|
10
|
-
import { CollectionFieldInterface } from '../../collection-field-interface/CollectionFieldInterface';
|
|
11
|
-
export declare class SubTableFieldInterface extends CollectionFieldInterface {
|
|
12
|
-
name: string;
|
|
13
|
-
type: string;
|
|
14
|
-
group: string;
|
|
15
|
-
order: number;
|
|
16
|
-
title: string;
|
|
17
|
-
isAssociation: boolean;
|
|
18
|
-
default: {
|
|
19
|
-
type: string;
|
|
20
|
-
uiSchema: {
|
|
21
|
-
type: string;
|
|
22
|
-
'x-component': string;
|
|
23
|
-
'x-component-props': {};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
availableTypes: string[];
|
|
27
|
-
schemaInitialize(schema: ISchema, { field, readPretty }: {
|
|
28
|
-
field: any;
|
|
29
|
-
readPretty: any;
|
|
30
|
-
}): void;
|
|
31
|
-
initialize: (values: any) => void;
|
|
32
|
-
properties: {
|
|
33
|
-
subtable: {
|
|
34
|
-
type: string;
|
|
35
|
-
'x-component': string;
|
|
36
|
-
properties: {
|
|
37
|
-
actions: {
|
|
38
|
-
type: string;
|
|
39
|
-
'x-component': string;
|
|
40
|
-
'x-component-props': {};
|
|
41
|
-
properties: {
|
|
42
|
-
delete: {
|
|
43
|
-
type: string;
|
|
44
|
-
title: string;
|
|
45
|
-
'x-component': string;
|
|
46
|
-
'x-component-props': {
|
|
47
|
-
useAction: string;
|
|
48
|
-
confirm: {
|
|
49
|
-
title: string;
|
|
50
|
-
content: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
create: {
|
|
55
|
-
type: string;
|
|
56
|
-
title: string;
|
|
57
|
-
'x-component': string;
|
|
58
|
-
'x-component-props': {
|
|
59
|
-
type: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
children: {
|
|
65
|
-
type: string;
|
|
66
|
-
title: string;
|
|
67
|
-
'x-decorator': string;
|
|
68
|
-
'x-component': string;
|
|
69
|
-
'x-component-props': {
|
|
70
|
-
pagination: boolean;
|
|
71
|
-
expandable: {
|
|
72
|
-
childrenColumnName: string;
|
|
73
|
-
};
|
|
74
|
-
rowKey: string;
|
|
75
|
-
rowSelection: {
|
|
76
|
-
type: string;
|
|
77
|
-
};
|
|
78
|
-
useSelectedRowKeys: string;
|
|
79
|
-
useDataSource: string;
|
|
80
|
-
};
|
|
81
|
-
properties: {
|
|
82
|
-
column1: {
|
|
83
|
-
type: string;
|
|
84
|
-
title: string;
|
|
85
|
-
'x-component': string;
|
|
86
|
-
properties: {
|
|
87
|
-
'uiSchema.title': {
|
|
88
|
-
type: string;
|
|
89
|
-
'x-component': string;
|
|
90
|
-
'x-read-pretty': boolean;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
column2: {
|
|
95
|
-
type: string;
|
|
96
|
-
title: string;
|
|
97
|
-
'x-component': string;
|
|
98
|
-
properties: {
|
|
99
|
-
name: {
|
|
100
|
-
'x-component': string;
|
|
101
|
-
'x-read-pretty': boolean;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
column3: {
|
|
106
|
-
type: string;
|
|
107
|
-
title: string;
|
|
108
|
-
'x-component': string;
|
|
109
|
-
properties: {
|
|
110
|
-
interface: {
|
|
111
|
-
'x-component': string;
|
|
112
|
-
'x-read-pretty': boolean;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
column4: {
|
|
117
|
-
type: string;
|
|
118
|
-
title: string;
|
|
119
|
-
'x-component': string;
|
|
120
|
-
properties: {
|
|
121
|
-
actions: {
|
|
122
|
-
type: string;
|
|
123
|
-
'x-component': string;
|
|
124
|
-
'x-component-props': {
|
|
125
|
-
split: string;
|
|
126
|
-
};
|
|
127
|
-
properties: {
|
|
128
|
-
update: {
|
|
129
|
-
type: string;
|
|
130
|
-
title: string;
|
|
131
|
-
'x-component': string;
|
|
132
|
-
'x-component-props': {};
|
|
133
|
-
};
|
|
134
|
-
delete: {
|
|
135
|
-
type: string;
|
|
136
|
-
title: string;
|
|
137
|
-
'x-component': string;
|
|
138
|
-
'x-component-props': {
|
|
139
|
-
useAction: string;
|
|
140
|
-
confirm: {
|
|
141
|
-
title: string;
|
|
142
|
-
content: string;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
'uiSchema.title': {
|
|
155
|
-
type: string;
|
|
156
|
-
title: string;
|
|
157
|
-
required: boolean;
|
|
158
|
-
'x-decorator': string;
|
|
159
|
-
'x-component': string;
|
|
160
|
-
};
|
|
161
|
-
name: {
|
|
162
|
-
type: string;
|
|
163
|
-
title: string;
|
|
164
|
-
required: boolean;
|
|
165
|
-
'x-disabled': string;
|
|
166
|
-
'x-decorator': string;
|
|
167
|
-
'x-component': string;
|
|
168
|
-
'x-validator': string;
|
|
169
|
-
description: string;
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
import { ISchema } from '@formily/react';
|
|
11
|
-
import { uid } from '@formily/shared';
|
|
12
|
-
import { CollectionFieldInterface } from '../../collection-field-interface/CollectionFieldInterface';
|
|
13
|
-
import { defaultProps } from './properties';
|
|
14
|
-
|
|
15
|
-
export class LinkToFieldInterface extends CollectionFieldInterface {
|
|
16
|
-
name = 'linkTo';
|
|
17
|
-
type = 'object';
|
|
18
|
-
group = 'relation';
|
|
19
|
-
order = 1;
|
|
20
|
-
title = '{{t("Link to")}}';
|
|
21
|
-
description = '{{t("Link to description")}}';
|
|
22
|
-
isAssociation = true;
|
|
23
|
-
default = {
|
|
24
|
-
type: 'belongsToMany',
|
|
25
|
-
uiSchema: {
|
|
26
|
-
'x-component': 'AssociationField',
|
|
27
|
-
'x-component-props': {
|
|
28
|
-
multiple: true,
|
|
29
|
-
fieldNames: {
|
|
30
|
-
label: 'id',
|
|
31
|
-
value: 'id',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
reverseField: {
|
|
36
|
-
interface: 'linkTo',
|
|
37
|
-
type: 'belongsToMany',
|
|
38
|
-
uiSchema: {
|
|
39
|
-
'x-component': 'AssociationField',
|
|
40
|
-
'x-component-props': {
|
|
41
|
-
multiple: true,
|
|
42
|
-
fieldNames: {
|
|
43
|
-
label: 'id',
|
|
44
|
-
value: 'id',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
// availableTypes = ['belongsToMany'];
|
|
51
|
-
schemaInitialize(schema: ISchema, { readPretty, block, targetCollection }) {
|
|
52
|
-
if (targetCollection?.titleField && schema['x-component-props']) {
|
|
53
|
-
schema['x-component-props'].fieldNames = schema['x-component-props'].fieldNames || {
|
|
54
|
-
value: targetCollection.filterTargetKey || 'id',
|
|
55
|
-
};
|
|
56
|
-
schema['x-component-props'].fieldNames.label = targetCollection.titleField;
|
|
57
|
-
}
|
|
58
|
-
if (['Table', 'Kanban'].includes(block)) {
|
|
59
|
-
schema['x-component-props'] = schema['x-component-props'] || {};
|
|
60
|
-
schema['x-component-props']['ellipsis'] = true;
|
|
61
|
-
// 预览文件时需要的参数
|
|
62
|
-
schema['x-component-props']['size'] = 'small';
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
initialize = (values: any) => {
|
|
66
|
-
if (values.type === 'belongsToMany') {
|
|
67
|
-
if (!values.through) {
|
|
68
|
-
values.through = `t_${uid()}`;
|
|
69
|
-
}
|
|
70
|
-
if (!values.foreignKey) {
|
|
71
|
-
values.foreignKey = `f_${uid()}`;
|
|
72
|
-
}
|
|
73
|
-
if (!values.otherKey) {
|
|
74
|
-
values.otherKey = `f_${uid()}`;
|
|
75
|
-
}
|
|
76
|
-
if (!values.sourceKey) {
|
|
77
|
-
values.sourceKey = 'id';
|
|
78
|
-
}
|
|
79
|
-
if (!values.targetKey) {
|
|
80
|
-
values.targetKey = 'id';
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
properties = {
|
|
85
|
-
...defaultProps,
|
|
86
|
-
target: {
|
|
87
|
-
type: 'string',
|
|
88
|
-
title: '{{t("Related collection")}}',
|
|
89
|
-
required: true,
|
|
90
|
-
'x-reactions': ['{{useAsyncDataSource(loadCollections)}}'],
|
|
91
|
-
'x-decorator': 'FormItem',
|
|
92
|
-
'x-component': 'Select',
|
|
93
|
-
'x-disabled': '{{ !createOnly }}',
|
|
94
|
-
},
|
|
95
|
-
'uiSchema.x-component-props.multiple': {
|
|
96
|
-
type: 'boolean',
|
|
97
|
-
'x-content': '{{t("Allow linking to multiple records")}}',
|
|
98
|
-
'x-decorator': 'FormItem',
|
|
99
|
-
'x-component': 'Checkbox',
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
filterable = {
|
|
103
|
-
nested: true,
|
|
104
|
-
children: [
|
|
105
|
-
// {
|
|
106
|
-
// name: 'id',
|
|
107
|
-
// title: '{{t("Exists")}}',
|
|
108
|
-
// operators: [
|
|
109
|
-
// { label: '{{t("exists")}}', value: '$exists', noValue: true },
|
|
110
|
-
// { label: '{{t("not exists")}}', value: '$notExists', noValue: true },
|
|
111
|
-
// ],
|
|
112
|
-
// schema: {
|
|
113
|
-
// title: '{{t("Exists")}}',
|
|
114
|
-
// type: 'string',
|
|
115
|
-
// 'x-component': 'Input',
|
|
116
|
-
// },
|
|
117
|
-
// },
|
|
118
|
-
],
|
|
119
|
-
};
|
|
120
|
-
}
|