@giteeteam/apps-team-components 0.3.12-202301301530 → 0.3.13
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/dist/cells/actors/BaseField.d.ts +1 -1
- package/dist/cells/assignee/index.d.ts +2 -2
- package/dist/cells/bind-workspace/BaseField.d.ts +1 -1
- package/dist/cells/checkbox/BaseField.d.ts +1 -1
- package/dist/cells/date/BaseField.d.ts +1 -1
- package/dist/cells/date/index.d.ts +1 -1
- package/dist/cells/date-range/BaseField.d.ts +1 -1
- package/dist/cells/date-range/index.d.ts +1 -1
- package/dist/cells/dropdown/BaseField.d.ts +1 -1
- package/dist/cells/editor/BaseField.d.ts +1 -1
- package/dist/cells/editor/plugins/ToolbarFont.d.ts +1 -1
- package/dist/cells/editor/plugins/ToolbarFontColor.d.ts +1 -1
- package/dist/cells/editor/plugins/ToolbarHistory.d.ts +1 -1
- package/dist/cells/editor/utils.d.ts +1 -1
- package/dist/cells/file/BaseField.d.ts +1 -1
- package/dist/cells/formula/BaseField.d.ts +1 -1
- package/dist/cells/long-text/BaseField.d.ts +1 -1
- package/dist/cells/number/BaseField.d.ts +1 -1
- package/dist/cells/radio/BaseField.d.ts +1 -1
- package/dist/cells/script/BaseField.d.ts +1 -1
- package/dist/cells/security-level/BaseField.d.ts +1 -1
- package/dist/cells/status/Field.d.ts +1 -1
- package/dist/cells/tag/BaseField.d.ts +1 -1
- package/dist/cells/text/BaseField.d.ts +1 -1
- package/dist/cells/text/index.d.ts +1 -1
- package/dist/cells/time/BaseField.d.ts +1 -1
- package/dist/cells/time/index.d.ts +1 -1
- package/dist/cells/time-range/BaseField.d.ts +1 -1
- package/dist/cells/time-range/index.d.ts +1 -1
- package/dist/cells/tree/BaseField.d.ts +1 -1
- package/dist/cells/user/BaseField.d.ts +2 -2
- package/dist/cells/user/index.d.ts +1 -1
- package/dist/common/FieldErrorBoundary.d.ts +2 -2
- package/dist/common/UploadFile.d.ts +1 -1
- package/dist/common/base-table/index.d.ts +3 -3
- package/dist/common/date/TimePicker.d.ts +2 -2
- package/dist/common/filters/filter-query/IqlExpression.d.ts +1 -1
- package/dist/common/form-field/FormField.d.ts +2 -2
- package/dist/common/plugin/PluginLoadComponent.d.ts +1 -1
- package/dist/common/status-selector/index.d.ts +1 -1
- package/dist/common/structure/hooks.d.ts +2 -2
- package/dist/common/structure/table-components/TableActionMenu.d.ts +3 -3
- package/dist/common/structure/table-components/useTableColumns.d.ts +1 -1
- package/dist/common/structure/table-components/useTableMenu.d.ts +4 -4
- package/dist/common/structure-table/components/DraggableRow.d.ts +1 -1
- package/dist/common/utils.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/apis/groups/index.d.ts +1 -1
- package/dist/lib/apis/roles/index.d.ts +1 -1
- package/dist/lib/apis/screen/fields.d.ts +1 -1
- package/dist/lib/apis/screen/index.d.ts +3 -3
- package/dist/lib/contexts/LibraryProvider.d.ts +1 -1
- package/dist/lib/contexts/currentUserAndRoles.d.ts +1 -1
- package/dist/lib/contexts/token.d.ts +1 -1
- package/dist/lib/contexts/users.d.ts +1 -1
- package/dist/lib/customFields/hooks.d.ts +1 -1
- package/dist/lib/dayjs.d.ts +1 -1
- package/dist/lib/error/log.d.ts +1 -1
- package/dist/lib/error/utils.d.ts +2 -2
- package/dist/lib/fetch.d.ts +1 -1
- package/dist/lib/forest.d.ts +6 -6
- package/dist/lib/hooks/index.d.ts +2 -2
- package/dist/lib/hooks/useCustomFields.d.ts +1 -1
- package/dist/lib/hooks/useFieldTypes.d.ts +1 -1
- package/dist/lib/hooks/useFields.d.ts +1 -1
- package/dist/lib/hooks/useItemsInfinite.d.ts +3 -3
- package/dist/lib/hooks/useRemoteComponents.d.ts +3 -3
- package/dist/lib/hooks/useTenants.d.ts +1 -1
- package/dist/lib/hooks/useWorkspaces.d.ts +1 -1
- package/dist/lib/i18n.d.ts +4 -4
- package/dist/lib/kanban/hooks.d.ts +1 -1
- package/dist/lib/usePluginManifest.d.ts +1 -1
- package/dist/lib/useUser.d.ts +3 -3
- package/dist/main.css.map +1 -1
- package/dist/osui/index.d.ts +1 -1
- package/package.json +1 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.global.less';
|
|
3
|
-
|
|
3
|
+
type selectUser = {
|
|
4
4
|
label: string;
|
|
5
5
|
nickname?: string;
|
|
6
6
|
value: string;
|
|
@@ -13,7 +13,7 @@ interface CellProps {
|
|
|
13
13
|
overlayClsName?: string;
|
|
14
14
|
onChange?: (value?: selectUser[]) => void;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
type userProps = {
|
|
17
17
|
nickname?: string;
|
|
18
18
|
username: string;
|
|
19
19
|
};
|
|
@@ -5,7 +5,7 @@ interface selectValue {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: string | number;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type BaseCheckboxProps = CheckboxProps & FieldProps & {
|
|
9
9
|
value?: [];
|
|
10
10
|
options?: selectValue[];
|
|
11
11
|
onChange?: (e: any) => void;
|
|
@@ -9,7 +9,7 @@ export declare enum DateType {
|
|
|
9
9
|
month = "month",
|
|
10
10
|
year = "year"
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type BaseFieldProps = DatePickerProps & FieldProps & {
|
|
13
13
|
pickerType?: 'dateTime' | 'date' | 'week' | 'month' | 'year';
|
|
14
14
|
value?: DateValue;
|
|
15
15
|
placeholder?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps } from '@/fields/base-component/types';
|
|
3
3
|
import { BaseFieldProps } from './BaseField';
|
|
4
|
-
|
|
4
|
+
type Props = BaseFieldProps & CellProps;
|
|
5
5
|
declare const DateCell: React.ForwardRefExoticComponent<Props & React.RefAttributes<any>>;
|
|
6
6
|
export default DateCell;
|
|
@@ -4,7 +4,7 @@ import { Dayjs } from 'dayjs';
|
|
|
4
4
|
import { DateValue } from '@/lib/types/dayjs.d';
|
|
5
5
|
import '@/common/field.global.less';
|
|
6
6
|
import { FieldProps } from '@/fields/base-component/types';
|
|
7
|
-
export
|
|
7
|
+
export type BaseFieldProps = RangePickerProps & FieldProps & {
|
|
8
8
|
width?: number;
|
|
9
9
|
pickerType?: 'dateTime' | 'date' | 'week' | 'month' | 'year';
|
|
10
10
|
value?: Dayjs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps } from '@/fields/base-component/types';
|
|
3
3
|
import { BaseFieldProps } from './BaseField';
|
|
4
|
-
|
|
4
|
+
type Props = BaseFieldProps & CellProps;
|
|
5
5
|
declare const DateCell: React.FC<Props>;
|
|
6
6
|
export default DateCell;
|
|
@@ -7,7 +7,7 @@ export interface selectValue {
|
|
|
7
7
|
value: string | number;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type BaseDropdownProps = SelectProps<any> & FieldProps & {
|
|
11
11
|
value?: string[] | number[];
|
|
12
12
|
options?: selectValue[];
|
|
13
13
|
placeholder?: string;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { TNode } from '@udecode/slate-plugins';
|
|
3
3
|
import { FieldProps } from '@/fields/base-component/types';
|
|
4
4
|
import '@/common/common.global.less';
|
|
5
|
-
export
|
|
5
|
+
export type BaseFieldProps = FieldProps & {
|
|
6
6
|
label?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
maxLength?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToolbarButtonProps } from '@udecode/slate-plugins';
|
|
3
|
-
|
|
3
|
+
type ButtonProps = ToolbarButtonProps & {
|
|
4
4
|
fontType: 'color' | 'backgroundColor';
|
|
5
5
|
};
|
|
6
6
|
declare const ToolbarFontColor: React.FC<ButtonProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToolbarButtonProps } from '@udecode/slate-plugins';
|
|
3
|
-
|
|
3
|
+
type ButtonProps = ToolbarButtonProps & {
|
|
4
4
|
historyType: 'undo' | 'redo';
|
|
5
5
|
};
|
|
6
6
|
declare const ToolbarFont: React.FC<ButtonProps>;
|
|
@@ -5,7 +5,7 @@ import { Descendant, Selection } from 'slate';
|
|
|
5
5
|
* 因为image目前在编译器为block元素,所以必定会在value的第一层,故一层循环即可
|
|
6
6
|
* 若之后更改为inline,这里需要改造成递归寻找path
|
|
7
7
|
**/
|
|
8
|
-
export
|
|
8
|
+
export type ImageDescendant = Descendant & {
|
|
9
9
|
key: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const getImagePathByKey: (value: ImageDescendant[], key: string) => Selection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UploadFile as UploadFileType } from 'antd/lib/upload/interface';
|
|
3
3
|
import { FieldProps } from '@/fields/base-component/types';
|
|
4
|
-
export
|
|
4
|
+
export type BaseFieldProps = FieldProps & {
|
|
5
5
|
value?: Array<UploadFileType>;
|
|
6
6
|
beforeUpload?: (file: any, fileList: any) => boolean | Promise<File>;
|
|
7
7
|
maxCount?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldProps } from '@/fields/base-component/types';
|
|
3
|
-
export
|
|
3
|
+
export type BaseFormulaProps = FieldProps & {
|
|
4
4
|
value?: string | number | boolean | undefined;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
addonBefore?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextAreaProps } from '@/osui';
|
|
3
3
|
import { FieldProps } from '@/fields/base-component/types';
|
|
4
|
-
export
|
|
4
|
+
export type BaseFieldProps = TextAreaProps & FieldProps & {
|
|
5
5
|
userData?: any;
|
|
6
6
|
label?: string;
|
|
7
7
|
placeholder?: string;
|
|
@@ -5,7 +5,7 @@ interface selectValue {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: string | number;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type BaseRadioProps = RadioProps & FieldProps & {
|
|
9
9
|
value?: string;
|
|
10
10
|
options?: selectValue[];
|
|
11
11
|
onChange?: (e: any) => void;
|
|
@@ -6,7 +6,7 @@ interface selectValue {
|
|
|
6
6
|
label: string;
|
|
7
7
|
value: string | number;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type BaseDropdownProps = SelectProps<any> & FieldProps & {
|
|
10
10
|
value?: string | number;
|
|
11
11
|
options?: selectValue[];
|
|
12
12
|
placeholder?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldProps } from '@/fields/base-component/types';
|
|
3
3
|
import 'components/common/field.global.less';
|
|
4
|
-
export
|
|
4
|
+
export type StatusProps = FieldProps & {
|
|
5
5
|
headerPosition?: boolean;
|
|
6
6
|
screenMode?: boolean;
|
|
7
7
|
itemId?: string;
|
|
@@ -5,7 +5,7 @@ interface optionsProp {
|
|
|
5
5
|
value: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const useItemsSelect: (options: optionsProp[]) => any;
|
|
8
|
-
export
|
|
8
|
+
export type BaseTagProps = FieldProps & {
|
|
9
9
|
value?: [];
|
|
10
10
|
options?: optionsProp[];
|
|
11
11
|
onChange?: (e: any) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputProps } from '@/osui';
|
|
3
3
|
import { FieldProps } from '@/fields/base-component/types';
|
|
4
|
-
export
|
|
4
|
+
export type BaseFieldProps = InputProps & FieldProps & {
|
|
5
5
|
userData?: any;
|
|
6
6
|
label?: string;
|
|
7
7
|
placeholder?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps } from '@/fields/base-component/types';
|
|
3
3
|
import { BaseFieldProps } from './BaseField';
|
|
4
|
-
export
|
|
4
|
+
export type TextProps = BaseFieldProps & CellProps;
|
|
5
5
|
declare const Text: React.ForwardRefExoticComponent<import("@/osui").InputProps & import("@/fields/base-component/types").FieldProps & {
|
|
6
6
|
userData?: any;
|
|
7
7
|
label?: string;
|
|
@@ -3,7 +3,7 @@ import { TimePickerProps } from 'antd/es/time-picker';
|
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
4
|
import { DateValue } from '@/lib/types/dayjs.d';
|
|
5
5
|
import { FieldProps } from '@/fields/base-component/types';
|
|
6
|
-
export
|
|
6
|
+
export type BaseFieldProps = TimePickerProps & FieldProps & {
|
|
7
7
|
value?: DateValue;
|
|
8
8
|
defaultValue?: any;
|
|
9
9
|
range?: Dayjs[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps } from '@/fields/base-component/types';
|
|
3
3
|
import { BaseFieldProps } from './BaseField';
|
|
4
|
-
|
|
4
|
+
type Props = BaseFieldProps & CellProps;
|
|
5
5
|
declare const TimeCell: React.FC<Props>;
|
|
6
6
|
export default TimeCell;
|
|
@@ -3,7 +3,7 @@ import { TimeRangePickerProps } from 'antd/es/time-picker';
|
|
|
3
3
|
import { DateValue } from '@/lib/types/dayjs.d';
|
|
4
4
|
import { FieldProps } from '@/fields/base-component/types';
|
|
5
5
|
import './index.less';
|
|
6
|
-
export
|
|
6
|
+
export type BaseFieldProps = TimeRangePickerProps & FieldProps & {
|
|
7
7
|
width?: number;
|
|
8
8
|
value?: any;
|
|
9
9
|
descPlacement?: string;
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { CellProps } from '@/fields/base-component/types';
|
|
3
3
|
import { BaseFieldProps } from './BaseField';
|
|
4
4
|
import './index.less';
|
|
5
|
-
|
|
5
|
+
type Props = BaseFieldProps & CellProps;
|
|
6
6
|
declare const TimeRangeCell: React.FC<Props>;
|
|
7
7
|
export default TimeRangeCell;
|
|
@@ -6,7 +6,7 @@ interface selectValue {
|
|
|
6
6
|
value: string | number;
|
|
7
7
|
title: string;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type BaseTreeProps = TreeSelectProps<any> & FieldProps & {
|
|
10
10
|
value?: string;
|
|
11
11
|
options?: selectValue[];
|
|
12
12
|
onChange?: (e: any) => void;
|
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { FieldProps } from '@/fields/base-component/types';
|
|
3
3
|
import { User as UserProps } from '@/lib/types/models';
|
|
4
4
|
import './index.less';
|
|
5
|
-
export
|
|
5
|
+
export type UserType = {
|
|
6
6
|
username: string;
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type BaseUserProps = FieldProps & {
|
|
11
11
|
workspaceId?: string;
|
|
12
12
|
fieldTypeKey?: string;
|
|
13
13
|
emptyChild?: React.ReactElement;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { CellProps } from '@/fields/base-component/types';
|
|
3
3
|
import { BaseUserProps } from './BaseField';
|
|
4
4
|
import './index.less';
|
|
5
|
-
export
|
|
5
|
+
export type UserProps = BaseUserProps & CellProps;
|
|
6
6
|
declare const User: React.ForwardRefExoticComponent<import("@/fields/base-component/types").FieldProps & {
|
|
7
7
|
workspaceId?: string;
|
|
8
8
|
fieldTypeKey?: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import BaseTable, { BaseTableProps } from 'react-base-table';
|
|
3
|
-
|
|
3
|
+
type CreateChildCardOptionParam = {
|
|
4
4
|
/** 控制缩进量 */
|
|
5
5
|
depth?: number;
|
|
6
6
|
itemTypeIds: string[];
|
|
7
7
|
onCardCreate: (cardInfo: Record<'name' | 'itemTypeId', string>) => void;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type BaseTableRefType<T = unknown> = BaseTable<T> & {
|
|
10
10
|
/** 快速创建子事项 */
|
|
11
11
|
createChildCard: (parentRowKey: string, option: CreateChildCardOptionParam) => void;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type AdvanceBaseTableProps = BaseTableProps;
|
|
14
14
|
declare const AdvanceBaseTable: React.ForwardRefExoticComponent<Pick<AdvanceBaseTableProps, keyof AdvanceBaseTableProps> & React.RefAttributes<BaseTableRefType<unknown>>>;
|
|
15
15
|
export default AdvanceBaseTable;
|
|
16
16
|
export * from 'react-base-table';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PickerTimeProps, RangePickerTimeProps } from 'antd/lib/date-picker/generatePicker';
|
|
3
3
|
import { Dayjs } from '@/lib/dayjs';
|
|
4
|
-
export
|
|
4
|
+
export type TimeRangePickerProps = RangePickerTimeProps<Dayjs>;
|
|
5
5
|
declare const RangePicker: React.ForwardRefExoticComponent<Omit<import("rc-picker/lib/RangePicker").RangePickerTimeProps<import("dayjs").Dayjs>, "locale" | "generateConfig" | "prevIcon" | "nextIcon" | "superPrevIcon" | "superNextIcon" | "hideHeader" | "components"> & {
|
|
6
6
|
locale?: import("antd/lib/date-picker/generatePicker").PickerLocale;
|
|
7
7
|
size?: import("antd/lib/button").ButtonSize;
|
|
@@ -12,7 +12,7 @@ export interface TimePickerProps extends Omit<PickerTimeProps<Dayjs>, 'picker'>
|
|
|
12
12
|
popupClassName?: string;
|
|
13
13
|
}
|
|
14
14
|
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<any>>;
|
|
15
|
-
|
|
15
|
+
type MergedTimePicker = typeof TimePicker & {
|
|
16
16
|
RangePicker: typeof RangePicker;
|
|
17
17
|
};
|
|
18
18
|
declare const _default: MergedTimePicker;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TextAreaProps } from 'antd/lib/input';
|
|
3
3
|
import { IQLExpressionProps } from '@/lib/types/iql';
|
|
4
|
-
|
|
4
|
+
type Props = Omit<TextAreaProps, 'onChange'> & IQLExpressionProps;
|
|
5
5
|
declare const IqlExpression: React.VFC<Props>;
|
|
6
6
|
export default IqlExpression;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './FormField.global.less';
|
|
3
|
-
|
|
3
|
+
type BaseFormFieldInterface = {
|
|
4
4
|
children: any;
|
|
5
5
|
name: string;
|
|
6
6
|
label?: React.ReactNode;
|
|
@@ -9,7 +9,7 @@ declare type BaseFormFieldInterface = {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
style?: any;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type FormFieldWithRest = BaseFormFieldInterface & Record<string, any>;
|
|
13
13
|
declare const FormField: ({ children, name, label, layout, required, style, className, ...rest }: FormFieldWithRest) => any;
|
|
14
14
|
export default FormField;
|
|
15
15
|
export * from './pure-field/FormikEnhance';
|
|
@@ -4,7 +4,7 @@ import { ContextMessage } from '@/lib/ParentMessage';
|
|
|
4
4
|
interface refProps {
|
|
5
5
|
setGlobalState?: (data: any) => void;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type PluginProps = ContextMessage & {
|
|
8
8
|
onRefreshContext?: () => void;
|
|
9
9
|
};
|
|
10
10
|
export declare enum PluginLoadType {
|
|
@@ -5,7 +5,7 @@ import { CustomField } from '@/lib/types/models';
|
|
|
5
5
|
export declare const useChildCardItemTypes: (hierarchy?: any[]) => {
|
|
6
6
|
getChildCardItemTypes(id: string, hierarchy?: ItemTypeSchemeHierarchy[]): ItemTypeSchemeHierarchy[] | undefined;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type UseCreateChildCardFields = (workSpace: string, customFields: any[]) => {
|
|
9
9
|
getFieldInfo: (itemType: string) => Promise<{
|
|
10
10
|
/** 界面方案关联字段 */
|
|
11
11
|
screenFields: CustomField[];
|
|
@@ -16,7 +16,7 @@ declare type UseCreateChildCardFields = (workSpace: string, customFields: any[])
|
|
|
16
16
|
};
|
|
17
17
|
/** 获取子事项创建所需要字段信息 */
|
|
18
18
|
export declare const useChildCardCreatedFields: UseCreateChildCardFields;
|
|
19
|
-
|
|
19
|
+
type UseCreateItem = (workspaceId: string) => {
|
|
20
20
|
createItem: (params: {
|
|
21
21
|
name: string;
|
|
22
22
|
values: Record<string, unknown>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ItemClickResponder } from '../view';
|
|
3
3
|
/** 菜单操作权限 */
|
|
4
|
-
|
|
4
|
+
type AccessType = 'canChildCardCreate';
|
|
5
5
|
/** 菜单操作类型 */
|
|
6
|
-
export
|
|
6
|
+
export type ActionType = 'view' | 'edit' | 'delete' | 'childCardCreate' | 'childCardInlineCreate';
|
|
7
7
|
/** 菜单操作权限判断 */
|
|
8
|
-
export
|
|
8
|
+
export type MenuAccess = Record<AccessType, boolean | (() => boolean)>;
|
|
9
9
|
export type { ItemClickResponder } from '../view';
|
|
10
10
|
interface MenuProps {
|
|
11
11
|
itemId?: string;
|
|
@@ -15,7 +15,7 @@ export interface VCObject extends Parse.Object {
|
|
|
15
15
|
name: string;
|
|
16
16
|
config: any;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type WorkspaceType = {
|
|
19
19
|
objectId: string;
|
|
20
20
|
};
|
|
21
21
|
declare const useTableColumns: (viewType: string, workspace: WorkspaceType) => Response;
|
|
@@ -2,16 +2,16 @@ import React from 'react';
|
|
|
2
2
|
import type { BaseTableRefType } from '@/common/base-table';
|
|
3
3
|
import { ActionType, MenuAccess } from './TableActionMenu';
|
|
4
4
|
/** 菜单处理函数 */
|
|
5
|
-
|
|
5
|
+
type ActionTypeHandlers<T> = Record<ActionType, (params: T) => Promise<void> | void>;
|
|
6
6
|
/** 弹窗菜单依赖 */
|
|
7
|
-
|
|
7
|
+
type UseTableMenuActionDeps = {
|
|
8
8
|
/** 工作空间 id */
|
|
9
9
|
workspaceId: string;
|
|
10
10
|
/** 刷新视图方法 */
|
|
11
11
|
mutate: () => void;
|
|
12
12
|
baseTableRef: React.MutableRefObject<BaseTableRefType>;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type pageProps = 'detail' | 'drawer';
|
|
15
15
|
/** 获取 Table menu actions 事件处理函数 */
|
|
16
16
|
export declare const useTableActionMenuHandlers: <Params extends {
|
|
17
17
|
itemId: string;
|
|
@@ -19,7 +19,7 @@ export declare const useTableActionMenuHandlers: <Params extends {
|
|
|
19
19
|
page?: pageProps;
|
|
20
20
|
}>(handlersReplacement: Partial<ActionTypeHandlers<Params>>, deps: UseTableMenuActionDeps) => ActionTypeHandlers<Params>;
|
|
21
21
|
/** 弹窗渲染依赖函数 */
|
|
22
|
-
|
|
22
|
+
type UseTableActionMenuConfig<T = unknown, ReturnVal = {
|
|
23
23
|
access?: MenuAccess;
|
|
24
24
|
extraData?: any;
|
|
25
25
|
}> = {
|
package/dist/common/utils.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare function asString(query: string | string[]): string;
|
|
|
15
15
|
export declare const getPopupContainerFun: (getPopupContainer: (node?: HTMLElement) => HTMLElement, apply: string, page?: string) => HTMLElement;
|
|
16
16
|
export declare const getOptionsByName: (name: string | RegExp, query: Parse.Query) => Promise<Record<'label' | 'value', string>[]>;
|
|
17
17
|
export declare const getOptionsByValues: (values: string[], query?: Parse.Query) => Promise<Record<'label' | 'value', string>[]>;
|
|
18
|
-
|
|
18
|
+
type optionsInitProps = {
|
|
19
19
|
name?: string;
|
|
20
20
|
objectId?: string;
|
|
21
21
|
label?: string;
|