import { FilterSet } from "../Filter"; import { Color, TagColor } from "../Color"; import { ViewColumn } from "../View"; import { InputExpression } from "../interfaces/input-expression.interface"; export declare const ColumnTypeCn: { text: string; multilineText: string; select: string; multiSelect: string; date: string; attachment: string; checkbox: string; collaborator: string; formula: string; number: string; percent: string; url: string; currency: string; autoNumber: string; foreignKey: string; createdAt: string; lastModifiedTime: string; createdBy: string; lastModifiedBy: string; computation: string; multiCollaborator: string; rollup: string; lookup: string; cascade: string; multiCascade: string; geolocation: string; button: string; dataStatus: string; department: string; subTable: string; }; export declare enum ColumnValueType { text = "string", multilineText = "string", select = "string", multiSelect = "string[]", date = "Date", attachment = "file[]", checkbox = "boolean", collaborator = "number", formula = "string", number = "number", url = "string", currency = "number", percent = "number", autoNumber = "number", foreignKey = "Object[]", createdAt = "Date", lastModifiedTime = "Date", createdBy = "number", lastModifiedBy = "number", computation = "", multiCollaborator = "number[]", rollup = "any[]", lookup = "any[]", cascade = "string[]", multiCascade = "string[]", geolocation = "number[]", button = "null", dataStatus = "string", department = "Object[]", subTable = "Object[]" } export declare enum ColumnTypeDesc { text = "\u9002\u7528\u4E8E\u7B80\u77ED\u4E0D\u6362\u884C\u7B26\u7684\u6587\u5B57\u4FE1\u606F\uFF0C\u4F8B\u5982\u59D3\u540D\u3001\u6587\u7AE0\u6807\u9898\u7B49", multilineText = "\u9002\u7528\u4E8E\u591A\u884C\u8BE6\u7EC6\u63CF\u8FF0\u6587\u672C\uFF0C\u4F8B\u5982\u6587\u7AE0\u5185\u5BB9\u7B49", select = "\u9009\u62E9\u5355\u4E2A\u9009\u9879\u7684\u5B57\u6BB5", multiSelect = "\u53EF\u9009\u5355\u4E2A\u6216\u591A\u4E2A\u9009\u9879\u7684\u5B57\u6BB5", date = "\u9009\u62E9\u65E5\u671F\u548C\u65F6\u95F4\u7684\u5B57\u6BB5", attachment = "\u7528\u6765\u5C55\u793A\u4E00\u4E2A\u6216\u4E00\u4E9B\u6587\u4EF6\u7684\u5B57\u6BB5", checkbox = "\u8868\u793A\u4E24\u79CD\u72B6\u6001\u4E4B\u95F4\u5207\u6362\u7684\u5B57\u6BB5", collaborator = "\u5355\u9009\u6210\u5458\u5B57\u6BB5", formula = "\u901A\u8FC7\u516C\u5F0F\u548C\u51FD\u6570\u8FD0\u7B97\u540E\u7684\u7ED3\u679C", number = "\u6570\u503C\u7684\u5B57\u6BB5", url = "URL \u5730\u5740", percent = "\u767E\u5206\u6BD4\u6570\u503C\u5B57\u6BB5", currency = "\u91D1\u989D\u6570\u503C\u5B57\u6BB5", autoNumber = "\u521B\u5EFA\u8BB0\u5F55\u65F6\u81EA\u52A8\u4E3A\u6570\u636E\u751F\u6210\u552F\u4E00\u7684\u7F16\u53F7\uFF0C\u4E0D\u652F\u6301\u624B\u52A8\u5199\u5165", foreignKey = "", createdAt = "\u521B\u5EFA\u6B64\u8BB0\u5F55\u7684\u65E5\u671F\u548C\u65F6\u95F4", lastModifiedTime = "\u6700\u540E\u66F4\u65B0\u6B64\u8BB0\u5F55\u7684\u65E5\u671F\u548C\u65F6\u95F4", createdBy = "\u521B\u5EFA\u6B64\u8BB0\u5F55\u7684\u6210\u5458", lastModifiedBy = "\u6700\u540E\u4FEE\u6539\u6B64\u8BB0\u5F55\u7684\u6210\u5458", computation = "", multiCollaborator = "\u591A\u9009\u6210\u5458\u5B57\u6BB5", rollup = "\u805A\u5408\u5B57\u6BB5", lookup = "\u5728\u5916\u952E\u8BB0\u5F55\u4E0A\u67E5\u627E\u5B57\u6BB5", cascade = "\u4F7F\u7528\u7EA7\u8054\u9009\u9879\u7684\u9009\u62E9\u5B57\u6BB5", multiCascade = "\u4F7F\u7528\u7EA7\u8054\u9009\u9879\u7684\u9009\u62E9\u5B57\u6BB5", geolocation = "\u5730\u7406\u4F4D\u7F6E", button = "\u6309\u94AE", dataStatus = "\u6570\u636E\u72B6\u6001", department = "\u90E8\u95E8\u5B57\u6BB5", subTable = "\u5B50\u8868\u5B57\u6BB5" } export declare enum ColumnType { Text = "text", MultilineText = "multilineText", Checkbox = "checkbox", Date = "date", Select = "select", MultiSelect = "multiSelect", Url = "url", Number = "number", Percent = "percent", Attachment = "attachment", ForeignKey = "foreignKey", Formula = "formula", Currency = "currency", CreatedAt = "createdAt", LastModifiedTime = "lastModifiedTime", CreatedBy = "createdBy", LastModifiedBy = "lastModifiedBy", Collaborator = "collaborator", MultiCollaborator = "multiCollaborator", Computation = "computation", AutoNumber = "autoNumber", Rollup = "rollup", Lookup = "lookup", Cascade = "cascade", MultiCascade = "multiCascade", GeoLocation = "geolocation", Button = "button", DataStatus = "dataStatus", Department = "department", SubTable = "subTable" } /** * @description: 允许导入的excel数据类型 */ export declare const AcceptableExcelColumnTypes: ColumnType[]; export declare const PrimaryKeyCandidateColumnTypes: ColumnType[]; export declare const BasicColumnTypes: ColumnType[]; export declare const AdvencedColumnTypes: ColumnType[]; export declare const UserRelatedColumnTypes: ColumnType[]; export declare const KanbanGroupableColumnTypes: ColumnType[]; export declare const StaticColumnTypes: ColumnType[]; export declare const textAggregationFunction: { none: string; count: string; empty: string; filled: string; unique: string; percentEmpty: string; percentFilled: string; percentUnique: string; }; export declare const foreignKeyAggregationFunction: { none: string; empty: string; filled: string; percentEmpty: string; percentFilled: string; }; export declare const checkboxAggregationFunction: { none: string; count: string; unchecked: string; checked: string; percentUnchecked: string; percentChecked: string; }; export declare const dateAggregationFunction: { earliestDate: string; latestDate: string; dateRangeByDate: string; dateRangeByMonth: string; none: string; count: string; empty: string; filled: string; unique: string; percentEmpty: string; percentFilled: string; percentUnique: string; }; export declare const attachmentAggregationFunction: { none: string; count: string; empty: string; filled: string; percentEmpty: string; percentFilled: string; totalFileSize: string; }; export declare const numberAggregationFunction: { none: string; sum: string; average: string; median: string; min: string; max: string; range: string; standardDeviation: string; count: string; empty: string; filled: string; unique: string; percentEmpty: string; percentFilled: string; percentUnique: string; }; export declare type TextAggregationFunction = keyof typeof textAggregationFunction; export declare type SingleSelectAggregationFunction = keyof typeof textAggregationFunction; export declare type CheckboxAggregationFunction = keyof typeof checkboxAggregationFunction; export declare type MultiSelectAggregationFunction = keyof typeof textAggregationFunction; export declare type DateAggregationFunction = keyof typeof dateAggregationFunction; export declare type AttachmentAggregationFunction = keyof typeof attachmentAggregationFunction; export declare type NumberAggregationFunction = keyof typeof numberAggregationFunction; export declare type ColumnAggregationFunction = SingleSelectAggregationFunction | CheckboxAggregationFunction | MultiSelectAggregationFunction | DateAggregationFunction | AttachmentAggregationFunction | NumberAggregationFunction; export declare type OptionalExceptFor = Partial & Pick; export declare class TextOptions { validatorName?: "url"; } export interface MultilineTextOptions { richText: boolean; } export interface NumberOptions { format: "decimal" | "integer" | "currency" | "percent"; precision: number; defaultValue?: number; negative: boolean; backgroundColor?: string; symbol?: string; } export interface CheckboxOptions { color: Color; icon: CheckboxIcon; } export declare type RollupOptions = Partial & { formulaTextParsed: string; formulaText?: string; relationColumnId: string; foreignTableRollupColumnId: string; resultType: FormulaResultType; }; export interface ForeignKeyOptions { relationship: "one" | "many"; foreignTableId: string; unreversed: boolean; viewIdForRecordSelection: string; createNewForeignTable?: boolean; nameForNewForeignTable?: string; foreignViewId?: string; foreignFilter?: FilterSet; } export declare class FormulaDependencies { invalidColumnIds?: string[]; referencedColumnIdsForValue: string[]; referencedColumnIdsForModification?: string[]; dependsOnAllColumnModifications?: boolean; } export declare type FormulaOptions = Partial & { format: "decimal" | "integer" | "currency" | "percent" | "duration"; precision?: number; negative: boolean; symbol?: string; durationFormat: "h:mm" | "h:mm:ss" | "h:mm:ss.s" | "h:mm:ss.ss" | "h:mm:ss.sss"; formulaTextParsed?: string; formulaText?: string; formulaError?: string; dependencies: FormulaDependencies; resultIsArray: boolean; resultType: FormulaResultType; }; export interface CollaboratorOptions { shouldNotify: boolean; } export interface SelectOption { id: string; name: string; color: TagColor; } export declare enum SelectGroupStyle { Dropdown = "dropdown", Flat = "flat" } export interface SelectOptions { optionOrder: string[]; options: { [optionId: string]: SelectOption; }; disableColors: boolean; groupStyle?: SelectGroupStyle; } export declare class CascadeOption { id: string; name: string; parentId?: string; titleId: string; rank: number; } export interface CascadeOptions { titles: { id: string; name: string; }[]; multiple: boolean; checkStrictly: boolean; options: CascadeOption[]; } export interface ButtonOptions { label: { type: "static"; staticText: string; }; variant: { type: "static"; staticVariant: string; }; actionType: ButtonActionType; formulaText: string; codeBlockInput?: InputExpression; codeBlockScript?: string; codeBlockOutput?: Record; } export declare enum DepartmentDefaultValueType { UseCurrentUser = "useCurrentUser", useCustomValue = "useCustomValue" } export declare class DepartmentOptions { useCustomRange: boolean; customRange?: { range: number[]; includeSub: boolean; }; showHierarchy?: boolean; defaultValue?: { type: DepartmentDefaultValueType; customValue?: number[]; }; } export declare enum ButtonActionType { openUrl = "openUrl", RunCodeBlock = "runCodeBlock" } export interface MultiSelectOptions extends SelectOptions { } export interface AutoNumberOptions { } export interface DateOptions { dateFormat: "Local" | "Friendly" | "US" | "European" | "ISO"; isDateTime: boolean; isDate: boolean; timeFormat: "12hour" | "24hour"; timeZone: "UTC" | "GMT" | 'client'; } export interface CreatedByOptions { computationType: ColumnType.CreatedBy; } export interface LastModifiedByOptions { computationType: ColumnType.LastModifiedBy; computationParams: { allColumns: boolean; columnIds: string[]; }; } export interface SubTableTypeOptions { subTableId: string; allowAddRow: boolean; allowDeleteRow: boolean; defaultRowsCount: number; hideColumnName: boolean; } export interface CreatedAtOptions extends DateOptions { formulaText: "CREATED_TIME()"; formulaTextParsed: "{column_modification_created_at_all}"; resultType: FormulaResultType; dependencies: { invalidColumnIds: string[]; referencedColumnIdsForValue: string[]; }; } export interface LastModifiedTimeOptions extends DateOptions { formulaText: "LAST_MODIFIED_TIME()"; formulaTextParsed: "{column_modification_updated_at_all}"; resultType: FormulaResultType; dependencies: { invalidColumnIds: string[]; referencedColumnIdsForValue: string[]; }; } export declare enum GeolocationInputType { mobile = "mobile" } export interface GeolocationOptions { inputType?: GeolocationInputType; } export interface AttachmentOptions { maxAllowedNumber?: number; } export declare type FormulaResultType = ColumnType.Text | ColumnType.Date | ColumnType.Number; export declare type LookupOptions = { relationColumnId: string; foreignTableRollupColumnId: string; resultType: FormulaResultType; resultIsArray: boolean; choices?: Record; choiceOrder: string[]; } & NumberOptions & CollaboratorOptions & MultiSelectOptions & SelectOptions & DateOptions & TextOptions; export declare type ColumnTypeOptions = AttachmentOptions | CollaboratorOptions | TextOptions | MultilineTextOptions | CheckboxOptions | SelectOptions | MultiSelectOptions | DateOptions | CreatedAtOptions | LastModifiedTimeOptions | CreatedByOptions | LastModifiedByOptions | AutoNumberOptions | RollupOptions | CascadeOptions | ButtonOptions | DepartmentOptions | SubTableTypeOptions; export interface TableColumn { id: string; name: string; type: ColumnType; typeOptions: ColumnTypeOptions; } export declare type Column = TableColumn & ViewColumn; export declare enum CheckboxIcon { Check = "check", Star = "star", Heart = "heart", ThumbsUp = "thumbsUp", Flag = "flag" } export declare enum FormulaParamType { CellValue = "column_value", CreatedTime = "column_modification_created_at", CreatedTimeForAll = "column_modification_created_at_all", UpdatedTime = "column_modification_updated_at", UpdatedTimeForAll = "column_modification_updated_at_all" }