@nocobase/client-v2 2.2.0-beta.8 → 2.2.0
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/APIClient.d.ts +13 -3
- package/es/BaseApplication.d.ts +3 -0
- package/es/RouteRepository.d.ts +8 -0
- package/es/RouterManager.d.ts +15 -0
- package/es/authRedirect.d.ts +1 -0
- package/es/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/collection-field-interface/CollectionFieldInterfaceManager.d.ts +1 -0
- package/es/components/category-tabs/SortableCategoryTabs.d.ts +55 -0
- package/es/components/category-tabs/index.d.ts +9 -0
- package/es/components/form/ScanInput/useCodeScanner.d.ts +3 -2
- package/es/components/form/TypedVariableInput.d.ts +31 -5
- package/es/components/form/filter/CollectionFilter.d.ts +2 -0
- package/es/components/form/filter/CollectionFilterItem.d.ts +11 -1
- package/es/components/form/filter/CollectionFilterPanel.d.ts +2 -0
- package/es/components/form/filter/index.d.ts +2 -0
- package/es/components/form/filter/useFilterActionProps.d.ts +2 -0
- package/es/components/index.d.ts +1 -0
- package/es/entry-actions/EntryActionManager.d.ts +24 -0
- package/es/entry-actions/index.d.ts +9 -0
- package/es/flow/actions/index.d.ts +1 -1
- package/es/flow/actions/linkageRules.d.ts +27 -0
- package/es/flow/admin-shell/BaseLayoutModel.d.ts +6 -0
- package/es/flow/admin-shell/BaseLayoutRouteCoordinator.d.ts +7 -0
- package/es/flow/admin-shell/admin-layout/AdminLayoutMenuModels.d.ts +1 -0
- package/es/flow/admin-shell/admin-layout/AppListRender.d.ts +2 -1
- package/es/flow/admin-shell/admin-layout/AppSwitcherActionPanelModel.d.ts +24 -0
- package/es/flow/admin-shell/admin-layout/index.d.ts +1 -0
- package/es/flow/admin-shell/admin-layout/useApplications.d.ts +7 -2
- package/es/flow/components/FieldAssignExactDatePicker.d.ts +1 -0
- package/es/flow/components/FieldAssignValueInput.d.ts +7 -24
- package/es/flow/components/FlowRoute.d.ts +2 -2
- package/es/flow/components/RunJSValueEditor.d.ts +1 -0
- package/es/flow/components/field-value-variable/DateVariableEditor.d.ts +24 -0
- package/es/flow/components/field-value-variable/FieldValueVariableInput.d.ts +31 -0
- package/es/flow/components/field-value-variable/dateValue.d.ts +36 -0
- package/es/flow/components/field-value-variable/index.d.ts +11 -0
- package/es/flow/components/filter/FilterGroup.d.ts +1 -0
- package/es/flow/components/filter/VariableFilterItem.d.ts +6 -1
- package/es/flow/components/placeholders/BlockPlaceholder.d.ts +1 -0
- package/es/flow/index.d.ts +1 -0
- package/es/flow/internal/registerDeviceTypeContext.d.ts +10 -0
- package/es/flow/internal/utils/operatorSchemaHelper.d.ts +2 -2
- package/es/flow/models/actions/UpdateRecordActionUtils.d.ts +8 -2
- package/es/flow/models/base/ActionModelCore.d.ts +6 -2
- package/es/flow/models/base/BlockGridModel.d.ts +3 -0
- package/es/flow/models/base/CollectionBlockModel.d.ts +3 -0
- package/es/flow/models/base/PageModel/PageModel.d.ts +12 -0
- package/es/flow/models/base/PageModel/PageModelTabBar.d.ts +22 -0
- package/es/flow/models/base/PageModel/PageTabModel.d.ts +12 -0
- package/es/flow/models/blocks/details/DetailsBlockModel.d.ts +3 -0
- package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +1 -0
- package/es/flow/models/blocks/filter-form/FilterFormSubmitActionModel.d.ts +3 -1
- package/es/flow/models/blocks/form/FormBlockModel.d.ts +7 -0
- package/es/flow/models/blocks/form/FormGridModel.d.ts +6 -0
- package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +17 -2
- package/es/flow/models/blocks/form/value-runtime/rules.d.ts +1 -0
- package/es/flow/models/blocks/table/JSColumnModel.d.ts +2 -0
- package/es/flow/models/blocks/table/TableBlockModel.d.ts +1 -0
- package/es/flow/models/blocks/table/TableColumnModel.d.ts +12 -0
- package/es/flow/models/blocks/table/utils.d.ts +1 -0
- package/es/flow/models/fields/AssociationFieldModel/RecordPickerFieldModel.d.ts +2 -1
- package/es/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.d.ts +0 -17
- package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +41 -0
- package/es/flow/models/fields/DateTimeFieldModel/dateLimit.d.ts +15 -7
- package/es/flow/routeTransientInputArgs.d.ts +14 -0
- package/es/flow-compat/fieldValidationConstants.d.ts +1 -1
- package/es/flow-compat/passwordUtils.d.ts +1 -1
- package/es/flow-compat/routeTypes.d.ts +1 -0
- package/es/index.d.ts +7 -0
- package/es/index.mjs +301 -177
- package/es/ui-operation/index.d.ts +15 -0
- package/es/ui-operation/ui-operation-codec.d.ts +10 -0
- package/es/utils/getRouteRuntimeVersion.d.ts +23 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/markdownSanitize.d.ts +11 -0
- package/lib/index.js +313 -189
- package/lib/locale/languageCodes.js +3 -1
- package/package.json +9 -7
- package/src/APIClient.ts +90 -7
- package/src/Application.tsx +7 -1
- package/src/BaseApplication.tsx +13 -6
- package/src/RouteRepository.ts +25 -0
- package/src/RouterManager.tsx +142 -1
- package/src/__tests__/APIClient.test.tsx +58 -0
- package/src/__tests__/RouteRepository.test.ts +23 -0
- package/src/__tests__/RouterManager.test.ts +125 -0
- package/src/__tests__/app.test.tsx +73 -0
- package/src/__tests__/authRedirect.test.ts +17 -0
- package/src/__tests__/browserChecker.test.ts +61 -0
- package/src/__tests__/getRouteRuntimeVersion.test.ts +68 -0
- package/src/__tests__/nocobase-buildin-plugin-auth.test.tsx +35 -2
- package/src/__tests__/settings-center.test.tsx +270 -6
- package/src/acl/ACLProvider.tsx +2 -0
- package/src/acl/__tests__/ACLProvider.test.tsx +92 -0
- package/src/authRedirect.ts +38 -0
- package/src/collection-field-interface/CollectionFieldInterface.ts +1 -0
- package/src/collection-field-interface/CollectionFieldInterfaceManager.ts +1 -0
- package/src/collection-manager/field-validation.ts +1 -1
- package/src/components/README.md +7 -1
- package/src/components/README.zh-CN.md +6 -1
- package/src/components/category-tabs/SortableCategoryTabs.tsx +210 -0
- package/src/components/category-tabs/index.ts +10 -0
- package/src/components/form/JsonTextArea.tsx +4 -0
- package/src/components/form/ScanInput/CodeScanner.tsx +79 -35
- package/src/components/form/ScanInput/__tests__/CodeScanner.test.tsx +101 -0
- package/src/components/form/ScanInput/__tests__/useCodeScanner.test.tsx +284 -11
- package/src/components/form/ScanInput/useCodeScanner.ts +332 -24
- package/src/components/form/TypedVariableInput.tsx +452 -101
- package/src/components/form/__tests__/TypedVariableInput.test.tsx +364 -12
- package/src/components/form/filter/CollectionFilter.tsx +4 -0
- package/src/components/form/filter/CollectionFilterItem.tsx +36 -9
- package/src/components/form/filter/CollectionFilterPanel.tsx +4 -0
- package/src/components/form/filter/__tests__/CollectionFilterItem.test.tsx +55 -0
- package/src/components/form/filter/__tests__/useFilterActionProps.test.tsx +95 -0
- package/src/components/form/filter/index.ts +2 -0
- package/src/components/form/filter/useFilterActionProps.ts +37 -6
- package/src/components/form/table/Table.tsx +81 -6
- package/src/components/form/table/__tests__/Table.columnWidth.test.tsx +433 -0
- package/src/components/index.ts +1 -0
- package/src/entry-actions/EntryActionManager.ts +76 -0
- package/src/entry-actions/index.ts +10 -0
- package/src/flow/FlowPage.tsx +38 -3
- package/src/flow/__tests__/FlowPage.test.tsx +201 -27
- package/src/flow/__tests__/FlowRoute.test.tsx +675 -12
- package/src/flow/__tests__/PluginFlowEngine.test.ts +58 -0
- package/src/flow/actions/__tests__/actionLinkageRules.forkProps.test.ts +314 -0
- package/src/flow/actions/__tests__/dataScopeFilter.test.ts +62 -0
- package/src/flow/actions/__tests__/dataScopeFormValueClear.test.ts +102 -0
- package/src/flow/actions/__tests__/linkageRules.actionStates.test.ts +33 -0
- package/src/flow/actions/__tests__/linkageRules.subFormSetFieldProps.test.ts +72 -0
- package/src/flow/actions/__tests__/linkageRules.tab.test.ts +171 -0
- package/src/flow/actions/__tests__/linkageRulesRefresh.test.ts +7 -3
- package/src/flow/actions/__tests__/openView.defineProps.route.test.tsx +80 -20
- package/src/flow/actions/dataScopeFilter.ts +10 -1
- package/src/flow/actions/dateTimeFormat.tsx +2 -2
- package/src/flow/actions/index.ts +2 -0
- package/src/flow/actions/linkageRules.tsx +144 -26
- package/src/flow/actions/linkageRulesRefresh.tsx +2 -6
- package/src/flow/actions/openView.tsx +21 -1
- package/src/flow/admin-shell/BaseLayoutModel.tsx +124 -0
- package/src/flow/admin-shell/BaseLayoutRouteCoordinator.ts +184 -42
- package/src/flow/admin-shell/__tests__/AdminLayoutRouteCoordinator.test.ts +1016 -119
- package/src/flow/admin-shell/admin-layout/AdminLayoutComponent.tsx +41 -5
- package/src/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.test.tsx +177 -1
- package/src/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.tsx +20 -0
- package/src/flow/admin-shell/admin-layout/AdminLayoutMenuUtils.tsx +78 -59
- package/src/flow/admin-shell/admin-layout/AppListRender.tsx +13 -2
- package/src/flow/admin-shell/admin-layout/AppSwitcherActionPanelModel.tsx +289 -0
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutComponent.test.tsx +253 -6
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutMenuModels.test.ts +228 -0
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutModel.test.tsx +436 -2
- package/src/flow/admin-shell/admin-layout/__tests__/TopbarActionsBar.test.tsx +48 -0
- package/src/flow/admin-shell/admin-layout/index.ts +1 -0
- package/src/flow/admin-shell/admin-layout/useApplications.tsx +81 -12
- package/src/flow/common/Markdown/Display.tsx +14 -3
- package/src/flow/common/Markdown/Edit.tsx +19 -7
- package/src/flow/common/Markdown/style.ts +4 -0
- package/src/flow/components/BlockItemCard.tsx +2 -2
- package/src/flow/components/FieldAssignExactDatePicker.tsx +25 -11
- package/src/flow/components/FieldAssignValueInput.tsx +72 -584
- package/src/flow/components/FlowRoute.tsx +204 -46
- package/src/flow/components/RunJSValueEditor.tsx +9 -1
- package/src/flow/components/__tests__/FieldAssignValueInput.context.test.tsx +216 -0
- package/src/flow/components/field-value-variable/DateVariableEditor.tsx +181 -0
- package/src/flow/components/field-value-variable/FieldValueVariableInput.tsx +326 -0
- package/src/flow/components/field-value-variable/__tests__/FieldValueVariableInput.test.tsx +380 -0
- package/src/flow/components/field-value-variable/dateValue.ts +223 -0
- package/src/flow/components/field-value-variable/index.ts +12 -0
- package/src/flow/components/filter/FilterGroup.tsx +33 -5
- package/src/flow/components/filter/VariableFilterItem.tsx +170 -13
- package/src/flow/components/filter/__tests__/FilterGroup.test.tsx +45 -0
- package/src/flow/components/filter/__tests__/VariableFilterItem.leftMetaTree.test.tsx +9 -0
- package/src/flow/components/filter/__tests__/VariableFilterItem.test.tsx +195 -1
- package/src/flow/components/placeholders/BlockPlaceholder.tsx +70 -23
- package/src/flow/components/placeholders/__tests__/BlockPlaceholder.test.tsx +57 -7
- package/src/flow/index.ts +3 -0
- package/src/flow/internal/components/Markdown/util.ts +2 -1
- package/src/flow/internal/registerDeviceTypeContext.ts +39 -0
- package/src/flow/internal/utils/operatorSchemaHelper.ts +3 -2
- package/src/flow/models/actions/UpdateRecordActionModel.tsx +18 -1
- package/src/flow/models/actions/UpdateRecordActionUtils.ts +18 -6
- package/src/flow/models/actions/__tests__/UpdateRecordActionModel.test.ts +76 -4
- package/src/flow/models/base/ActionModel.tsx +10 -8
- package/src/flow/models/base/ActionModelCore.tsx +16 -2
- package/src/flow/models/base/BlockGridModel.tsx +26 -0
- package/src/flow/models/base/CollectionBlockModel.tsx +38 -3
- package/src/flow/models/base/PageModel/PageModel.tsx +387 -53
- package/src/flow/models/base/PageModel/PageModelTabBar.tsx +114 -0
- package/src/flow/models/base/PageModel/PageTabModel.tsx +249 -18
- package/src/flow/models/base/PageModel/__tests__/PageModel.test.ts +790 -10
- package/src/flow/models/base/PageModel/__tests__/PageModelTabBar.module-isolation.test.tsx +130 -0
- package/src/flow/models/base/PageModel/__tests__/PageModelTabBar.test.tsx +118 -0
- package/src/flow/models/base/PageModel/__tests__/PageTabModel.test.ts +1075 -7
- package/src/flow/models/base/__tests__/ActionModelCore.render.test.tsx +49 -0
- package/src/flow/models/base/__tests__/BlockGridModel.selectSceneActivation.test.ts +124 -0
- package/src/flow/models/base/__tests__/CollectionBlockModel.addAppends.test.ts +41 -0
- package/src/flow/models/base/__tests__/CollectionBlockModel.initialBeforeRenderRefresh.test.ts +125 -9
- package/src/flow/models/blocks/assign-form/AssignFormItemModel.tsx +28 -53
- package/src/flow/models/blocks/details/DetailsBlockModel.tsx +8 -3
- package/src/flow/models/blocks/details/__tests__/DetailsBlockModel.initialPaginationChangeRefresh.test.ts +32 -1
- package/src/flow/models/blocks/filter-form/FilterFormBlockModel.tsx +28 -3
- package/src/flow/models/blocks/filter-form/FilterFormGridModel.tsx +36 -5
- package/src/flow/models/blocks/filter-form/FilterFormItemModel.tsx +155 -25
- package/src/flow/models/blocks/filter-form/FilterFormSubmitActionModel.tsx +57 -4
- package/src/flow/models/blocks/filter-form/__tests__/FilterFormGridModel.onModelCreated.test.ts +174 -1
- package/src/flow/models/blocks/filter-form/__tests__/FilterFormItemModel.defineChildren.test.ts +395 -1
- package/src/flow/models/blocks/filter-form/__tests__/FilterFormItemModel.getFilterValue.test.ts +72 -0
- package/src/flow/models/blocks/filter-form/__tests__/FilterFormSubmitActionModel.lifecycle.test.ts +90 -0
- package/src/flow/models/blocks/filter-form/__tests__/defaultValues.wiring.test.ts +66 -4
- package/src/flow/models/blocks/filter-manager/FilterManager.ts +5 -0
- package/src/flow/models/blocks/filter-manager/__tests__/FilterManager.test.ts +40 -0
- package/src/flow/models/blocks/form/FormBlockModel.tsx +47 -0
- package/src/flow/models/blocks/form/FormGridModel.tsx +4 -0
- package/src/flow/models/blocks/form/QuickEditFormModel.tsx +189 -36
- package/src/flow/models/blocks/form/__tests__/FormBlockModel.test.tsx +8 -2
- package/src/flow/models/blocks/form/__tests__/QuickEditFormModel.quickEdit.test.ts +350 -2
- package/src/flow/models/blocks/form/__tests__/runJsFormSubmit.test.ts +131 -0
- package/src/flow/models/blocks/form/value-runtime/__tests__/runtime.test.ts +435 -0
- package/src/flow/models/blocks/form/value-runtime/rules.ts +67 -14
- package/src/flow/models/blocks/form/value-runtime/runtime.ts +43 -19
- package/src/flow/models/blocks/js-block/JSBlock.tsx +1 -1
- package/src/flow/models/blocks/table/JSColumnModel.tsx +10 -1
- package/src/flow/models/blocks/table/TableActionsColumnModel.tsx +2 -1
- package/src/flow/models/blocks/table/TableBlockModel.tsx +29 -3
- package/src/flow/models/blocks/table/TableColumnModel.tsx +54 -11
- package/src/flow/models/blocks/table/__tests__/JSColumnModel.test.tsx +52 -5
- package/src/flow/models/blocks/table/__tests__/TableBlockModel.filterReset.test.ts +78 -0
- package/src/flow/models/blocks/table/__tests__/TableBlockModel.quickEditRefresh.test.ts +12 -0
- package/src/flow/models/blocks/table/__tests__/TableColumnModel.test.tsx +84 -0
- package/src/flow/models/blocks/table/utils.ts +7 -0
- package/src/flow/models/fields/AssociationFieldModel/CascadeSelectFieldModel.tsx +33 -1
- package/src/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.tsx +10 -1
- package/src/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/__tests__/popupContext.test.ts +120 -0
- package/src/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableEditActionModel.tsx +10 -2
- package/src/flow/models/fields/AssociationFieldModel/RecordPickerFieldModel.tsx +24 -1
- package/src/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.tsx +54 -149
- package/src/flow/models/fields/AssociationFieldModel/__tests__/RecordPickerFieldModel.itemContext.test.ts +167 -3
- package/src/flow/models/fields/AssociationFieldModel/recordSelectShared.tsx +156 -0
- package/src/flow/models/fields/DateTimeFieldModel/__tests__/DateTimeNoTzFieldModel.dateLimit.test.tsx +149 -0
- package/src/flow/models/fields/DateTimeFieldModel/dateLimit.ts +149 -113
- package/src/flow/models/fields/DisplayNumberFieldModel.tsx +1 -1
- package/src/flow/models/fields/JsonFieldModel.tsx +31 -8
- package/src/flow/models/fields/NumberFieldModel.tsx +1 -1
- package/src/flow/models/fields/TextareaFieldModel.tsx +42 -19
- package/src/flow/models/fields/VariableFieldFormModel.tsx +3 -3
- package/src/flow/models/fields/__tests__/DisplayNumberFieldModel.test.ts +33 -0
- package/src/flow/models/fields/__tests__/JsonFieldModel.test.ts +82 -0
- package/src/flow/models/fields/__tests__/NumberFieldModel.test.tsx +47 -0
- package/src/flow/models/fields/__tests__/TextareaFieldModel.test.tsx +32 -1
- package/src/flow/models/fields/__tests__/VariableFieldFormModel.test.tsx +51 -0
- package/src/flow/models/fields/mobile-components/MobileLazySelect.tsx +26 -10
- package/src/flow/models/fields/mobile-components/MobileSelect.tsx +51 -14
- package/src/flow/models/fields/mobile-components/__tests__/MobileSelect.test.tsx +139 -13
- package/src/flow/models/topbar/TopbarActionModel.tsx +78 -3
- package/src/flow/routeTransientInputArgs.ts +27 -0
- package/src/flow/utils/__tests__/dateTimeFormat.test.ts +42 -0
- package/src/flow/utils/dataScopeFormValueClear.ts +4 -3
- package/src/flow-compat/fieldValidationConstants.ts +1 -1
- package/src/flow-compat/routeTypes.ts +1 -0
- package/src/index.ts +7 -0
- package/src/layout-manager/LayoutContentRoute.tsx +2 -1
- package/src/layout-manager/LayoutRoute.tsx +2 -1
- package/src/layout-manager/__tests__/LayoutRoute.test.tsx +87 -1
- package/src/locale/languageCodes.ts +3 -1
- package/src/nocobase-buildin-plugin/index.tsx +19 -1
- package/src/settings-center/AdminSettingsLayout.tsx +23 -2
- package/src/ui-operation/index.ts +33 -0
- package/src/ui-operation/ui-operation-codec.ts +54 -0
- package/src/utils/getRouteRuntimeVersion.ts +185 -0
- package/src/utils/index.tsx +1 -0
- package/src/utils/markdownSanitize.ts +88 -0
|
@@ -7,27 +7,8 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import { type ExactDatePickerMode } from './FieldAssignExactDatePicker';
|
|
13
|
-
export type DateVariableExactNormalizeMode = 'none' | 'date' | 'datetimeNoTz' | 'iso';
|
|
14
|
-
export declare function toExactPickerDisplayValue(rawValue: unknown, options: {
|
|
15
|
-
format: string;
|
|
16
|
-
isRange: boolean;
|
|
17
|
-
}): dayjs.Dayjs | [dayjs.Dayjs, dayjs.Dayjs] | null;
|
|
18
|
-
export declare function normalizeDateVariableExactValue(rawValue: any, options: {
|
|
19
|
-
exactNormalizeMode: DateVariableExactNormalizeMode;
|
|
20
|
-
format: string;
|
|
21
|
-
showTime: boolean;
|
|
22
|
-
}): any;
|
|
23
|
-
type DateVariableComponentProps = {
|
|
24
|
-
picker: ExactDatePickerMode;
|
|
25
|
-
showTime: boolean;
|
|
26
|
-
timeFormat: string;
|
|
27
|
-
format: string;
|
|
28
|
-
exactNormalizeMode: DateVariableExactNormalizeMode;
|
|
29
|
-
};
|
|
30
|
-
export declare function normalizeDateVariableOutput(rawValue: any, options: DateVariableComponentProps): any;
|
|
10
|
+
import { type CollectionField, type MetaTreeNode, type VariableInputProps } from '@nocobase/flow-engine';
|
|
11
|
+
export { normalizeDateVariableExactValue, normalizeDateVariableOutput, toExactPickerDisplayValue, type DateVariableExactNormalizeMode, } from './field-value-variable';
|
|
31
12
|
interface Props {
|
|
32
13
|
/** 赋值目标路径,例如 `title` / `users.nickname` / `user.name` */
|
|
33
14
|
targetPath: string;
|
|
@@ -48,11 +29,14 @@ interface Props {
|
|
|
48
29
|
value?: string;
|
|
49
30
|
};
|
|
50
31
|
/**
|
|
51
|
-
*
|
|
52
|
-
* 默认 false,保持历史行为。
|
|
32
|
+
* @deprecated Date 已作为独立一级变量提供,此参数仅为调用兼容保留。
|
|
53
33
|
*/
|
|
54
34
|
enableDateVariableAsConstant?: boolean;
|
|
35
|
+
/** 是否允许在变量选择器中使用 RunJS。默认 true,保持历史行为。 */
|
|
36
|
+
allowRunJS?: boolean;
|
|
55
37
|
maxAssociationFieldDepth?: number;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
variableConverters?: VariableInputProps['converters'];
|
|
56
40
|
}
|
|
57
41
|
export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
|
|
58
42
|
export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
|
|
@@ -86,4 +70,3 @@ export declare function resolveAssignValueFieldModelConfig(options: {
|
|
|
86
70
|
* - 支持变量引用,并提供 Constant / Null 两种快捷项
|
|
87
71
|
*/
|
|
88
72
|
export declare const FieldAssignValueInput: React.FC<Props>;
|
|
89
|
-
export {};
|
|
@@ -19,8 +19,8 @@ export type FlowRouteProps = {
|
|
|
19
19
|
/**
|
|
20
20
|
* 管理后台动态页面路由组件。
|
|
21
21
|
*
|
|
22
|
-
* 负责读取当前路由页面 UID
|
|
23
|
-
*
|
|
22
|
+
* 负责读取当前路由页面 UID,并把页面生命周期桥接到 AdminLayout host model。
|
|
23
|
+
* 设备变量通常由 PluginFlowEngine 共享初始化提供;独立渲染时会在挂载后补充注册。
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```tsx
|
|
@@ -0,0 +1,24 @@
|
|
|
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 CtxDateExpressionConfig } from '@nocobase/flow-engine';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { type ExactDatePickerValue } from '../FieldAssignExactDatePicker';
|
|
12
|
+
import { type DateVariableComponentProps } from './dateValue';
|
|
13
|
+
export declare function getDefaultDateVariableFormat(config: CtxDateExpressionConfig): string;
|
|
14
|
+
export declare function serializeExactDatePickerValue(value: ExactDatePickerValue, showTime: boolean): string | [string, string];
|
|
15
|
+
type DateVariableEditorProps = {
|
|
16
|
+
value?: CtxDateExpressionConfig;
|
|
17
|
+
onChange?: (value: CtxDateExpressionConfig) => void;
|
|
18
|
+
isDateLikeField: boolean;
|
|
19
|
+
dateComponentProps: DateVariableComponentProps;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const DateVariableEditor: React.FC<DateVariableEditorProps>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
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 MetaTreeNode, type VariableInputProps } from '@nocobase/flow-engine';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { type DateVariableComponentProps } from './dateValue';
|
|
12
|
+
type ValueEditorComponent = React.ComponentType<{
|
|
13
|
+
value?: unknown;
|
|
14
|
+
onChange?: (value: unknown) => void;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
export type FieldValueVariableInputProps = Omit<VariableInputProps, 'value' | 'onChange' | 'metaTree' | 'converters'> & {
|
|
19
|
+
value?: unknown;
|
|
20
|
+
onChange: (value: unknown) => void;
|
|
21
|
+
baseMetaTree: MetaTreeNode[] | (() => MetaTreeNode[] | Promise<MetaTreeNode[]>);
|
|
22
|
+
constantComponent: ValueEditorComponent;
|
|
23
|
+
nullComponent: ValueEditorComponent;
|
|
24
|
+
runJSComponent: ValueEditorComponent;
|
|
25
|
+
isDateLikeField: boolean;
|
|
26
|
+
dateComponentProps: DateVariableComponentProps;
|
|
27
|
+
allowRunJS?: boolean;
|
|
28
|
+
converters?: VariableInputProps['converters'];
|
|
29
|
+
};
|
|
30
|
+
export declare const FieldValueVariableInput: React.FC<FieldValueVariableInputProps>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { dayjs } from '@nocobase/utils/client';
|
|
10
|
+
import type { ExactDatePickerMode } from '../FieldAssignExactDatePicker';
|
|
11
|
+
type DateFieldLike = {
|
|
12
|
+
interface?: unknown;
|
|
13
|
+
type?: unknown;
|
|
14
|
+
getComponentProps?: () => unknown;
|
|
15
|
+
uiSchema?: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
export type DateVariableExactNormalizeMode = 'none' | 'date' | 'datetimeNoTz' | 'iso';
|
|
18
|
+
export type DateVariableComponentProps = {
|
|
19
|
+
picker: ExactDatePickerMode;
|
|
20
|
+
showTime: boolean;
|
|
21
|
+
timeFormat: string;
|
|
22
|
+
format: string;
|
|
23
|
+
exactNormalizeMode: DateVariableExactNormalizeMode;
|
|
24
|
+
};
|
|
25
|
+
export declare const DEFAULT_DATE_VARIABLE_COMPONENT_PROPS: DateVariableComponentProps;
|
|
26
|
+
export declare function getFieldInterface(field: DateFieldLike | null | undefined): string;
|
|
27
|
+
export declare function isDateLikeField(field: DateFieldLike | null | undefined, fallbackFieldName?: string, fallbackFieldInterface?: string): boolean;
|
|
28
|
+
export declare function resolveDateVariableComponentProps(field: DateFieldLike | null | undefined, fieldInterface?: string): DateVariableComponentProps;
|
|
29
|
+
export declare function normalizeDateVariableExactValue(rawValue: unknown, options: Pick<DateVariableComponentProps, 'format' | 'showTime' | 'exactNormalizeMode'>): unknown;
|
|
30
|
+
export declare function toExactPickerDisplayValue(rawValue: unknown, options: {
|
|
31
|
+
format: string;
|
|
32
|
+
isRange: boolean;
|
|
33
|
+
}): dayjs.Dayjs | [dayjs.Dayjs, dayjs.Dayjs] | null;
|
|
34
|
+
/** Compatibility helper retained for existing callers and tests. */
|
|
35
|
+
export declare function normalizeDateVariableOutput(rawValue: unknown, options: DateVariableComponentProps): unknown;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 * from './dateValue';
|
|
10
|
+
export * from './DateVariableEditor';
|
|
11
|
+
export * from './FieldValueVariableInput';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { type MetaTreeNode, FlowModel } from '@nocobase/flow-engine';
|
|
10
|
+
import { type MetaTreeNode, type Converters, FlowModel } from '@nocobase/flow-engine';
|
|
11
11
|
export interface VariableFilterItemValue {
|
|
12
12
|
path: string;
|
|
13
13
|
operator: string;
|
|
@@ -19,6 +19,7 @@ export interface VariableFilterItemProps {
|
|
|
19
19
|
/** 筛选条件值对象 */
|
|
20
20
|
value: VariableFilterItemValue;
|
|
21
21
|
model: FlowModel;
|
|
22
|
+
disabled?: boolean;
|
|
22
23
|
/**
|
|
23
24
|
* 是否启用右侧 VariableInput(变量或静态值二合一)。
|
|
24
25
|
* 默认 false:保持原有行为,右侧仅静态输入组件。
|
|
@@ -29,6 +30,10 @@ export interface VariableFilterItemProps {
|
|
|
29
30
|
* 默认使用整棵 ctx 的 metaTree:model.context.getPropertyMetaTree()
|
|
30
31
|
*/
|
|
31
32
|
rightMetaTree?: MetaTreeNode[] | (() => MetaTreeNode[] | Promise<MetaTreeNode[]>);
|
|
33
|
+
/**
|
|
34
|
+
* 右侧变量的领域转换器。常量和空值仍由 VariableFilterItem 处理,未匹配的值回退到 FlowEngine 默认转换器。
|
|
35
|
+
*/
|
|
36
|
+
rightVariableConverters?: Pick<Converters, 'resolvePathFromValue' | 'resolveValueFromPath'>;
|
|
32
37
|
ignoreFieldNames?: string[];
|
|
33
38
|
maxAssociationFieldDepth?: number;
|
|
34
39
|
}
|
package/es/flow/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './FlowPage';
|
|
|
21
21
|
export * from './models';
|
|
22
22
|
export * from './utils';
|
|
23
23
|
export * from './actions';
|
|
24
|
+
export { FieldAssignValueInput } from './components/FieldAssignValueInput';
|
|
24
25
|
export * from './system-settings';
|
|
25
26
|
export * from './admin-shell/admin-layout';
|
|
26
27
|
export * from './admin-shell/BaseLayoutModel';
|
|
@@ -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
|
+
import type { FlowEngine } from '@nocobase/flow-engine';
|
|
10
|
+
export declare const registerDeviceTypeContext: (flowEngine: FlowEngine) => void;
|
|
@@ -15,7 +15,7 @@ type OperatorMeta = {
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
type ComponentRegistry = {
|
|
18
|
-
getComponent?: (name: string) => ComponentType<Record<string, unknown>> | undefined;
|
|
18
|
+
getComponent?: (name: string, isShowError?: boolean) => ComponentType<Record<string, unknown>> | undefined;
|
|
19
19
|
};
|
|
20
20
|
type OperatorComponentRenderOptions = {
|
|
21
21
|
app?: ComponentRegistry;
|
|
@@ -29,7 +29,7 @@ export declare function pickOperatorStyle(value: unknown): CSSProperties | undef
|
|
|
29
29
|
/**
|
|
30
30
|
* 根据操作符的 schema 定位组件及其 props。
|
|
31
31
|
*/
|
|
32
|
-
export declare function resolveOperatorComponent(app: ComponentRegistry | undefined, operator: string, operators?: OperatorMeta[]): {
|
|
32
|
+
export declare function resolveOperatorComponent(app: ComponentRegistry | undefined, operator: string, operators?: OperatorMeta[], isShowError?: boolean): {
|
|
33
33
|
Comp: React.ComponentType<Record<string, unknown>>;
|
|
34
34
|
props: Record<string, unknown>;
|
|
35
35
|
};
|
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import type { AxiosRequestConfig } from 'axios';
|
|
10
|
+
type UpdateRecordActionParams = {
|
|
11
|
+
assignedValues?: unknown;
|
|
12
|
+
requestConfig?: AxiosRequestConfig;
|
|
13
|
+
};
|
|
9
14
|
export declare function refreshLinkageRulesAfterUpdate(ctx: any): Promise<void>;
|
|
10
|
-
export declare function applyUpdateRecordAction(ctx: any, params:
|
|
15
|
+
export declare function applyUpdateRecordAction(ctx: any, params: UpdateRecordActionParams, options?: {
|
|
11
16
|
settingsFlowKey?: string;
|
|
12
|
-
}): Promise<
|
|
17
|
+
}): Promise<boolean>;
|
|
18
|
+
export {};
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { FlowModel } from '@nocobase/flow-engine';
|
|
10
|
+
import type { DefaultStructure, FlowModelOptions } from '@nocobase/flow-engine';
|
|
10
11
|
import type { ButtonProps } from 'antd/es/button';
|
|
11
12
|
import React from 'react';
|
|
12
13
|
export declare function ActionWithoutPermission(props: any): React.JSX.Element;
|
|
@@ -30,6 +31,7 @@ export declare class ActionModel<T extends DefaultStructure = DefaultStructure>
|
|
|
30
31
|
enableEditTooltip: boolean;
|
|
31
32
|
enableEditTitle: boolean;
|
|
32
33
|
enableEditIcon: boolean;
|
|
34
|
+
enableEditIconOnly: boolean;
|
|
33
35
|
enableEditType: boolean;
|
|
34
36
|
enableEditDanger: boolean;
|
|
35
37
|
enableEditColor: boolean;
|
|
@@ -40,10 +42,12 @@ export declare class ActionModel<T extends DefaultStructure = DefaultStructure>
|
|
|
40
42
|
static _getScene(): any[];
|
|
41
43
|
static _isScene(scene: ActionSceneType): boolean;
|
|
42
44
|
getAclActionName(): any;
|
|
43
|
-
onInit(options:
|
|
45
|
+
onInit(options: FlowModelOptions<T>): void;
|
|
46
|
+
serialize(): Record<string, any>;
|
|
44
47
|
getInputArgs(): Record<string, any>;
|
|
45
48
|
onClick(event: any): void;
|
|
46
49
|
getTitle(): string;
|
|
50
|
+
getTitleFieldDescription(): any;
|
|
47
51
|
getIcon(): React.ReactNode;
|
|
48
52
|
renderButton(): React.JSX.Element;
|
|
49
53
|
render(): React.JSX.Element;
|
|
@@ -11,8 +11,11 @@ import React from 'react';
|
|
|
11
11
|
import { FilterManager } from '../blocks/filter-manager/FilterManager';
|
|
12
12
|
import { GridModel } from './GridModel';
|
|
13
13
|
export declare class BlockGridModel extends GridModel {
|
|
14
|
+
private viewActivatedListener?;
|
|
14
15
|
dragOverlayConfig: DragOverlayConfig;
|
|
15
16
|
onInit(options: any): void;
|
|
17
|
+
onMount(): void;
|
|
18
|
+
protected onUnmount(): void;
|
|
16
19
|
get subModelBaseClasses(): string[];
|
|
17
20
|
get filterManager(): FilterManager;
|
|
18
21
|
get addBlockItems(): SubModelItemsType | undefined;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { BaseRecordResource, Collection, CollectionField, DataSource, DefaultStructure, FlowModelContext, MultiRecordResource, SingleRecordResource } from '@nocobase/flow-engine';
|
|
10
|
+
import React from 'react';
|
|
10
11
|
import { DataBlockModel } from './DataBlockModel';
|
|
11
12
|
export interface ResourceSettingsInitParams {
|
|
12
13
|
dataSourceKey: string;
|
|
@@ -66,6 +67,8 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
|
|
|
66
67
|
onInit(options: any): void;
|
|
67
68
|
createResource(ctx: any, params: any): SingleRecordResource | MultiRecordResource;
|
|
68
69
|
refresh(): Promise<void>;
|
|
70
|
+
isExternalDataSource(): boolean;
|
|
71
|
+
render(): React.JSX.Element;
|
|
69
72
|
protected defaultBlockTitle(): string;
|
|
70
73
|
addAppends(fieldPath: string, refresh?: boolean): void;
|
|
71
74
|
}
|
|
@@ -26,11 +26,23 @@ export declare class PageModel extends FlowModel<PageModelStructure> {
|
|
|
26
26
|
private dirtyRefreshScheduled;
|
|
27
27
|
private unmounted;
|
|
28
28
|
private documentTitleUpdateVersion;
|
|
29
|
+
private implicitActiveKey?;
|
|
30
|
+
private locallyCommittedTabTransition?;
|
|
29
31
|
/**
|
|
30
32
|
* 根页面标签页开关以路由表为准,避免 flow model 里的旧配置覆盖路由管理设置。
|
|
31
33
|
*/
|
|
32
34
|
private getEnableTabs;
|
|
35
|
+
private getAllTabs;
|
|
36
|
+
private getUnhiddenTabs;
|
|
37
|
+
private getRequestedTabKey;
|
|
38
|
+
private resolveTabActiveState;
|
|
33
39
|
private getActiveTabKey;
|
|
40
|
+
private getTabActiveKeySyncDependency;
|
|
41
|
+
private requestDocumentTitleUpdate;
|
|
42
|
+
private rememberImplicitActiveKey;
|
|
43
|
+
private commitTabActiveKey;
|
|
44
|
+
private consumeLocallyCommittedTabTransition;
|
|
45
|
+
private synchronizeTabActiveKey;
|
|
34
46
|
private scheduleActiveLifecycleRefresh;
|
|
35
47
|
activateCurrentTab(forceRefresh?: boolean): void;
|
|
36
48
|
deactivateCurrentTab(): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { Tabs } from 'antd';
|
|
10
|
+
import type { TabsProps } from 'antd';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
export declare const NO_ACTIVE_PAGE_TAB_KEY = "__no_active_page_tab__";
|
|
13
|
+
type RenderTabBar = NonNullable<React.ComponentProps<typeof Tabs>['renderTabBar']>;
|
|
14
|
+
type PageTabItem = NonNullable<TabsProps['items']>[number];
|
|
15
|
+
type FilteredPageTabBarProps = {
|
|
16
|
+
hiddenTabKeys: Set<string>;
|
|
17
|
+
hiddenActiveTabLabel?: React.ReactNode;
|
|
18
|
+
items: PageTabItem[];
|
|
19
|
+
tabBarProps: Parameters<RenderTabBar>[0];
|
|
20
|
+
};
|
|
21
|
+
export declare function FilteredPageTabBar({ hiddenTabKeys, hiddenActiveTabLabel, items, tabBarProps, }: FilteredPageTabBarProps): React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -22,9 +22,21 @@ export declare class BasePageTabModel extends FlowModel<{
|
|
|
22
22
|
render(): React.JSX.Element;
|
|
23
23
|
}
|
|
24
24
|
export declare class RootPageTabModel extends BasePageTabModel {
|
|
25
|
+
private persistedLinkageRulesHydrated;
|
|
26
|
+
private persistedLinkageRulesHydrating?;
|
|
27
|
+
onInit(options: any): void;
|
|
28
|
+
private hasExplicitLinkageRulesStep;
|
|
29
|
+
private shouldHydratePersistedLinkageRules;
|
|
30
|
+
private fetchPersistedAnchor;
|
|
31
|
+
private performPersistedLinkageRulesHydrate;
|
|
32
|
+
private hydratePersistedLinkageRules;
|
|
33
|
+
openFlowSettings(options?: Parameters<FlowModel['openFlowSettings']>[0]): Promise<boolean>;
|
|
25
34
|
renderChildren(): React.JSX.Element;
|
|
26
35
|
saveStepParams(): Promise<void>;
|
|
27
36
|
save(): Promise<void>;
|
|
37
|
+
private buildAnchorPayload;
|
|
38
|
+
private persistLinkageRulesToAnchor;
|
|
39
|
+
private syncPersistedPageTabFlowModelMarker;
|
|
28
40
|
destroy(): Promise<boolean>;
|
|
29
41
|
}
|
|
30
42
|
export declare class ChildPageTabModel extends BasePageTabModel {
|
|
@@ -39,3 +39,6 @@ export declare class DetailsBlockModel extends CollectionBlockModel<{
|
|
|
39
39
|
renderConfigureActions(): React.JSX.Element;
|
|
40
40
|
renderComponent(): React.JSX.Element;
|
|
41
41
|
}
|
|
42
|
+
export declare const DetailsPagination: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<{
|
|
43
|
+
model: DetailsBlockModel;
|
|
44
|
+
}>>;
|
|
@@ -28,6 +28,7 @@ export declare class FilterFormGridModel extends GridModel {
|
|
|
28
28
|
readonly loading: {
|
|
29
29
|
value: boolean;
|
|
30
30
|
};
|
|
31
|
+
private isRecordSelectFilterField;
|
|
31
32
|
private getAssociationFilterTargetKey;
|
|
32
33
|
private normalizeFilterFormLayout;
|
|
33
34
|
private normalizeStoredFullLayout;
|
|
@@ -10,6 +10,8 @@ import type { ButtonProps } from 'antd/es/button';
|
|
|
10
10
|
import { FilterFormActionModel } from './FilterFormActionModel';
|
|
11
11
|
export declare class FilterFormSubmitActionModel extends FilterFormActionModel {
|
|
12
12
|
defaultProps: ButtonProps;
|
|
13
|
-
|
|
13
|
+
private getLifecycleAction;
|
|
14
|
+
private syncAutoTriggerFilter;
|
|
15
|
+
onMount(): void;
|
|
14
16
|
onUnmount(): void;
|
|
15
17
|
}
|
|
@@ -24,8 +24,15 @@ type DefaultCollectionBlockModelStructure = {
|
|
|
24
24
|
type CustomFormBlockModelClassesEnum = {};
|
|
25
25
|
export declare class FormBlockModel<T extends DefaultCollectionBlockModelStructure = DefaultCollectionBlockModelStructure> extends CollectionBlockModel<T> {
|
|
26
26
|
formValueRuntime?: FormValueRuntime;
|
|
27
|
+
serialize(): {
|
|
28
|
+
variableContractType: {
|
|
29
|
+
type: string;
|
|
30
|
+
use: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
27
33
|
private userModifiedTopLevelFields;
|
|
28
34
|
get form(): FormInstance<any>;
|
|
35
|
+
submitFromRunJs(): void;
|
|
29
36
|
_defaultCustomModelClasses: {
|
|
30
37
|
FormActionGroupModel: string;
|
|
31
38
|
FormItemModel: string;
|
|
@@ -18,6 +18,12 @@ export type DefaultFormGridStructure = {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
export declare class FormGridModel<T extends DefaultFormGridStructure = DefaultFormGridStructure> extends GridModel<T> {
|
|
21
|
+
serialize(): {
|
|
22
|
+
variableContractType: {
|
|
23
|
+
type: string;
|
|
24
|
+
use: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
21
27
|
itemFallback: React.JSX.Element;
|
|
22
28
|
itemSettingsMenuLevel: number;
|
|
23
29
|
itemFlowSettings: {
|
|
@@ -11,6 +11,21 @@ import React from 'react';
|
|
|
11
11
|
export declare const QUICK_EDIT_POPOVER_MAX_HEIGHT = "calc(100vh - 96px)";
|
|
12
12
|
export declare const QUICK_EDIT_FORM_MAX_HEIGHT = "calc(100vh - 160px)";
|
|
13
13
|
export declare const QUICK_EDIT_MARKDOWN_HEIGHT = "min(480px, calc(100vh - 320px))";
|
|
14
|
+
type QuickEditViewBeforeClosePayload = {
|
|
15
|
+
result?: unknown;
|
|
16
|
+
force?: boolean;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
type QuickEditViewBeforeCloseHandler = (payload: QuickEditViewBeforeClosePayload) => Promise<boolean | void> | boolean | void;
|
|
20
|
+
type QuickEditViewUpdateConfig = {
|
|
21
|
+
preventClose?: boolean;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
type QuickEditViewContainer = {
|
|
25
|
+
close: (result?: unknown, force?: boolean) => Promise<boolean | void> | boolean | void;
|
|
26
|
+
update?: (newConfig: QuickEditViewUpdateConfig) => unknown;
|
|
27
|
+
beforeClose?: QuickEditViewBeforeCloseHandler;
|
|
28
|
+
};
|
|
14
29
|
export declare function getQuickEditFieldProps(collectionField: CollectionField, fieldProps?: Record<string, any>): {
|
|
15
30
|
[x: string]: any;
|
|
16
31
|
};
|
|
@@ -18,8 +33,7 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
18
33
|
fieldPath: string;
|
|
19
34
|
resource: SingleRecordResource;
|
|
20
35
|
collection: Collection;
|
|
21
|
-
|
|
22
|
-
viewContainer: any;
|
|
36
|
+
viewContainer: QuickEditViewContainer;
|
|
23
37
|
__onSubmitSuccess: any;
|
|
24
38
|
_fieldProps: any;
|
|
25
39
|
_onOk: any;
|
|
@@ -42,3 +56,4 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
42
56
|
addAppends(fieldPath: string, refresh?: boolean): void;
|
|
43
57
|
render(): React.JSX.Element;
|
|
44
58
|
}
|
|
59
|
+
export {};
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import type { FlowModelOptions } from '@nocobase/flow-engine';
|
|
9
10
|
import React from 'react';
|
|
10
11
|
import { TableCustomColumnModel } from './TableCustomColumnModel';
|
|
11
12
|
export declare class JSColumnModel extends TableCustomColumnModel {
|
|
12
13
|
private _RenderComponent?;
|
|
14
|
+
onInit(options: FlowModelOptions): void;
|
|
13
15
|
renderHiddenInConfig(): React.JSX.Element;
|
|
14
16
|
getInputArgs(): {};
|
|
15
17
|
getColumnProps(): {
|
|
@@ -36,6 +36,7 @@ export declare class TableBlockModel extends CollectionBlockModel<TableBlockMode
|
|
|
36
36
|
};
|
|
37
37
|
customModelClasses: CustomTableBlockModelClassesEnum;
|
|
38
38
|
get resource(): MultiRecordResource<any>;
|
|
39
|
+
resetAfterFilterChange(): void;
|
|
39
40
|
private readonly columns;
|
|
40
41
|
private disposeAutorun;
|
|
41
42
|
onMount(): void;
|
|
@@ -7,9 +7,19 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { DisplayItemModel, FlowModelContext, ModelRenderMode } from '@nocobase/flow-engine';
|
|
10
|
+
import type { FlowModel } from '@nocobase/flow-engine';
|
|
10
11
|
import { TableColumnProps } from 'antd';
|
|
11
12
|
import React from 'react';
|
|
12
13
|
export declare function FieldDeletePlaceholder(props: any): React.JSX.Element;
|
|
14
|
+
type FieldPermissionPlaceholderModel = FlowModel & {
|
|
15
|
+
fieldPath?: string;
|
|
16
|
+
forbidden?: {
|
|
17
|
+
actionName?: string;
|
|
18
|
+
} | null;
|
|
19
|
+
};
|
|
20
|
+
export declare function FieldWithoutPermissionPlaceholder({ targetModel, }?: {
|
|
21
|
+
targetModel?: FieldPermissionPlaceholderModel;
|
|
22
|
+
}): React.JSX.Element;
|
|
13
23
|
export declare const TABLE_COLUMN_MIN_WIDTH = 10;
|
|
14
24
|
export declare function normalizeTableColumnWidth(width: number | null | undefined): number;
|
|
15
25
|
export declare const CustomWidth: ({ setOpen, t, handleChange, defaultValue }: {
|
|
@@ -23,9 +33,11 @@ export declare class TableColumnModel extends DisplayItemModel {
|
|
|
23
33
|
afterAddAsSubModel(): Promise<void>;
|
|
24
34
|
renderHiddenInConfig(): React.ReactNode | undefined;
|
|
25
35
|
static defineChildren(ctx: FlowModelContext): any;
|
|
36
|
+
canQuickEdit(record: Record<string, unknown>): boolean;
|
|
26
37
|
getColumnProps(): TableColumnProps & {
|
|
27
38
|
sortField?: string;
|
|
28
39
|
};
|
|
29
40
|
onInit(options: any): void;
|
|
30
41
|
renderItem(): any;
|
|
31
42
|
}
|
|
43
|
+
export {};
|
|
@@ -3,6 +3,7 @@ export declare function extractIndex(str: any): string;
|
|
|
3
3
|
export declare function adjustColumnOrder(columns: any): any[];
|
|
4
4
|
export declare function setNestedValue(data: any, recordIndex: any, value: any): void;
|
|
5
5
|
export declare function extractIds(data: any): any[];
|
|
6
|
+
export declare function extractRowKeys(data: Record<string, unknown>[], key: string | string[]): any;
|
|
6
7
|
/**
|
|
7
8
|
* 生成表格行唯一 key
|
|
8
9
|
* @param record 当前行数据
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { CollectionField, FlowModel } from '@nocobase/flow-engine';
|
|
9
|
+
import { CollectionField, MultiRecordResource, FlowModel } from '@nocobase/flow-engine';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { FieldModel } from '../../base/FieldModel';
|
|
12
12
|
import { type ItemChain } from './itemChain';
|
|
@@ -45,6 +45,7 @@ export declare function RecordPickerContent({ model, toOne }: {
|
|
|
45
45
|
toOne?: boolean;
|
|
46
46
|
}): React.JSX.Element;
|
|
47
47
|
export declare class RecordPickerFieldModel extends FieldModel {
|
|
48
|
+
resource: MultiRecordResource;
|
|
48
49
|
selectedRows: {
|
|
49
50
|
value: any[];
|
|
50
51
|
};
|
|
@@ -9,22 +9,6 @@
|
|
|
9
9
|
import { CollectionField, MultiRecordResource } from '@nocobase/flow-engine';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { AssociationFieldModel } from './AssociationFieldModel';
|
|
12
|
-
import { type AssociationOption, type LazySelectProps } from './recordSelectShared';
|
|
13
|
-
type HydrateStatus = 'pending' | 'done';
|
|
14
|
-
type HydrationCandidate = {
|
|
15
|
-
item: AssociationOption;
|
|
16
|
-
tk: any;
|
|
17
|
-
tkKey: string;
|
|
18
|
-
};
|
|
19
|
-
export declare function collectAssociationHydrationCandidates(options: {
|
|
20
|
-
value: LazySelectProps['value'];
|
|
21
|
-
isMultiple: boolean;
|
|
22
|
-
valueKey: string;
|
|
23
|
-
labelKey: string;
|
|
24
|
-
statusMap: Map<string, HydrateStatus>;
|
|
25
|
-
}): HydrationCandidate[];
|
|
26
|
-
export declare function getAssociationHydrationNamePath(model: any): any;
|
|
27
|
-
export declare function getAssociationHydrationSetterContext(model: any): any;
|
|
28
12
|
export declare function CreateContent({ model, toOne }: {
|
|
29
13
|
model: any;
|
|
30
14
|
toOne?: boolean;
|
|
@@ -45,4 +29,3 @@ export declare class RecordSelectFieldModel extends AssociationFieldModel {
|
|
|
45
29
|
change(value: any): void;
|
|
46
30
|
render(): React.JSX.Element;
|
|
47
31
|
}
|
|
48
|
-
export {};
|