chore: format all frontend files (#430)

This commit is contained in:
tecvan
2025-07-31 23:15:48 +08:00
committed by GitHub
parent 8b078ff013
commit 6995cec404
8787 changed files with 11975 additions and 10924 deletions

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { SelectFieldsButton } from './select-fields-button';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect } from 'react';
import { useNodeTestId, type DatabaseField } from '@coze-workflow/base';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseCondition, useNodeTestId } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n';
import { IconCozPlus } from '@coze-arch/coze-design/icons';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseCondition, ConditionLogic } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCallback, useEffect, useMemo } from 'react';
import {
@@ -60,8 +60,8 @@ export const ConditionItemField = withField(
const rightFieldDataType = useMemo(
() =>
['IN', 'NOT_IN'].includes(operator || '')
? (leftTypeToListTypeMaps?.[dataType as ViewVariableType] ??
ViewVariableType.ArrayString)
? leftTypeToListTypeMaps?.[dataType as ViewVariableType] ??
ViewVariableType.ArrayString
: dataType,
[operator, dataType],
);

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseConditionLeft, useNodeTestId } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseCondition } from '@coze-workflow/base';
import { useFieldArray, FieldArrayList } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ConditionLogic, useNodeTestId } from '@coze-workflow/base';
import { withField, useField, type FieldProps } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
type ViewVariableType,
type DatabaseConditionOperator,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
type DatabaseConditionRight,
type DatabaseConditionOperator,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ViewVariableType } from '@coze-workflow/base';
import { type ConditionOperator } from '@coze-workflow/base';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { ConditionField } from './condition-field';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseCondition } from '@coze-workflow/base';
import { useCurrentDatabaseQuery } from '@/hooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useState, useEffect } from 'react';
import { useNodeTestId, type WorkflowDatabase } from '@coze-workflow/base';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { SelectAndSetFieldsField } from './select-and-set-fields-field';
export { DatabaseSelectField } from './database-select';
export { OutputsField } from './outputs';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { nanoid } from 'nanoid';
import { ViewVariableType } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { SelectAndSetFieldsField } from './select-and-set-fields-field';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseSettingField } from '@coze-workflow/base';
import { useCurrentDatabaseQuery } from '@/hooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { ColumnTitles } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createContext, useContext } from 'react';
import { type DatabaseField } from '@coze-workflow/base';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseField } from '@coze-workflow/base';
import { withFieldArray, type FieldProps } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseSettingField } from '@coze-workflow/base';
import { ValueExpressionInputField } from '@/node-registries/common/fields';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DatabaseSettingField } from '@coze-workflow/base';
import { FieldArrayList, useFieldArray } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type PropsWithChildren } from 'react';
import { type DatabaseSettingField } from '@coze-workflow/base';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SelectAndSetFieldsSection } from './select-and-set-fields-section';
import { SelectAndSetFieldsList } from './select-and-set-fields-list';
import { SelectAndSetFieldsColumnsTitle } from './select-and-set-fields-columns-title';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { useCurrentDatabaseField } from './use-current-database-field';
export { useResetSelectAndSetFields } from './use-reset-select-and-set-fields';
export { useResetCondition } from './use-reset-condition';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCurrentDatabaseQuery } from '@/hooks';
export function useCurrentDatabaseField(fieldID?: number) {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ConditionLogic } from '@coze-workflow/base';
import { useCurrentDatabaseQuery } from '@/hooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCurrentDatabaseQuery } from '@/hooks';
import { useForm } from '@/form';

View File

@@ -13,4 +13,3 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { nanoid } from 'nanoid';
import { ViewVariableType } from '@coze-workflow/base';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { getOutputsDefaultValue } from './get-outputs-default-value';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { WorkflowNode } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { databaseSelectFieldName } from '@/constants/database-field-names';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { ValueExpressionService } from '@/services';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { createConditionValidator } from './create-condition-validator';
export { createDatabaseValidator } from './create-database-validator';
export { createSelectAndSetFieldsValidator } from './create-select-and-set-fields-validator';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export function transformOnInit(value) {
if (!value) {
return;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { I18n } from '@coze-arch/i18n';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNodeTestId } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { DATABASE_NODE_REGISTRY } from './node-registry';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
DEFAULT_NODE_META_PATH,
DEFAULT_NODE_SIZE,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';
import { generateParametersToProperties } from '@/test-run-kit';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ValidateTrigger } from '@flowgram-adapter/free-layout-editor';
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useResetSelectAndSetFields } from '@/node-registries/database/common/hooks';
import {
SelectAndSetFieldsField,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';
import { StandardNodeType } from '@coze-workflow/base';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { DATABASE_CREATE_NODE_REGISTRY } from './database-create-node-registry';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MemoryApi } from '@coze-arch/bot-api';
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ValidateTrigger } from '@flowgram-adapter/free-layout-editor';
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { useResetCondition } from '@/node-registries/database/common/hooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';
import { StandardNodeType } from '@coze-workflow/base';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { DATABASE_DELETE_NODE_REGISTRY } from './database-delete-node-registry';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';
import { generateParametersToProperties } from '@/test-run-kit';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ValidateTrigger } from '@flowgram-adapter/free-layout-editor';
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';
import { StandardNodeType } from '@coze-workflow/base';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { DATABASE_QUERY_NODE_REGISTRY } from './database-query-node-registry';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';
import { generateParametersToProperties } from '@/test-run-kit';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ViewVariableType, useNodeTestId } from '@coze-workflow/base';
import { SingleSelect } from '@coze-arch/coze-design';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { OrderByField } from './order-by-field';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SelectFieldsButton } from '@/node-registries/database/common/components';
import { useFieldArray } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FieldArray, type FieldProps } from '@/form';
import { OrderBy } from './order-by';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCurrentDatabaseField } from '@/node-registries/database/common/hooks';
import { DataTypeTag } from '@/node-registries/common/components';
import { Label, withField, useField } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
SortableList,
SortableItem,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type PropsWithChildren, useRef } from 'react';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useValidateOrderFields } from './use-validate-order-by-fields';
import { OrderBySection } from './order-by-section';
import { OrderByList } from './order-by-list';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface OrderByFieldSchema {
fieldID: number;
isAsc: boolean;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useQueryFieldIDs } from './use-query-field-ids';
// Currently, if the query field is empty, the sorting field is not displayed

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useWatch } from '@/form';
import { queryFieldsFieldName } from '@/constants/database-field-names';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCurrentDatabaseQuery } from '@/hooks';
import { useQueryFieldIDs } from './use-query-field-ids';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect } from 'react';
import { useFieldArray } from '@/form';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { QueryFieldsField } from './query-fields-field';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { nanoid } from 'nanoid';
import { cloneDeep, set } from 'lodash-es';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { ColumnTitles } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FieldArray, type FieldProps } from '@/form';
import { QueryFields } from './query-fields';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNodeTestId } from '@coze-workflow/base';
import { useCurrentDatabaseField } from '@/node-registries/database/common/hooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { FieldArrayList, useFieldArray } from '@/form';
import { type QueryFieldSchema } from './types';
@@ -24,7 +24,9 @@ export function QueryFieldsList() {
return (
<FieldArrayList>
{value?.map((item, index) => <QueryFieldsItem index={index} />)}
{value?.map((item, index) => (
<QueryFieldsItem index={index} />
))}
</FieldArrayList>
);
}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type PropsWithChildren, useRef } from 'react';
import { I18n } from '@coze-arch/i18n';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { QueryFieldsSection } from './query-fields-section';
import { QueryFieldsList } from './query-fields-list';
import { QueryFieldsColumnTitles } from './query-fields-column-titles';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface QueryFieldSchema {
fieldID: number;
isDistinct?: boolean;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { type FieldProps, InputNumberField, Section } from '@/form';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useResetCondition } from '@/node-registries/database/common/hooks';
import { useForm } from '@/form';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ValidateTrigger } from '@flowgram-adapter/free-layout-editor';
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { I18n } from '@coze-arch/i18n';
import { useResetCondition } from '@/node-registries/database/common/hooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type WorkflowNodeRegistry } from '@coze-workflow/nodes';
import { StandardNodeType } from '@coze-workflow/base';

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { DATABASE_UPDATE_NODE_REGISTRY } from './database-update-node-registry';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MemoryApi } from '@coze-arch/bot-api';
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useForm } from '@/form';
import { updateSelectAndSetFieldsFieldName } from '@/constants/database-field-names';