-
Notifications
You must be signed in to change notification settings - Fork 2
feat(flow): split flow function node component,hook,i18n #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the flow function node feature by splitting components and hooks, adds comprehensive i18n support for rule functions, and introduces new utility functions.
- Extend
useLocaleto return an existence checker (te) and includeruleFunctionmessages. - Add general-purpose utilities (
waitAMoment,createRandomString,splitOnSymbol, etc.) and re-export them. - Restructure flow UI into standalone components, composables, and JSON definitions with updated dependencies and Vite config.
Reviewed Changes
Copilot reviewed 30 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/utils/lib/useLocale.ts | Extend locale hook with te and ruleFunction messages |
| packages/utils/lib/tools.ts | Introduce timing, random string, trimming, and split utils |
| packages/utils/lib/index.ts | Remove old rule exports, add tools export |
| packages/i18n/lib/zh/ruleFunction.ts | Add alias/validation messages in Chinese |
| packages/i18n/lib/zh/common.ts | Add common labels (field, alias, actions) in Chinese |
| packages/i18n/lib/ja/ruleFunction.ts | Add alias/validation messages in Japanese |
| packages/i18n/lib/ja/common.ts | Add common labels in Japanese |
| packages/i18n/lib/en/ruleFunction.ts | Add alias/validation messages in English |
| packages/i18n/lib/en/common.ts | Add common labels in English |
| packages/constants/constants.ts | Define regex constants for alias validation |
| packages/components/vite.config.ts | Mark @vue-flow/core as external with global |
| packages/components/package.json | Add async-validator and @vue-flow/core |
| packages/components/index.ts | Export new common and flow components/hooks |
| packages/components/flow/types.ts | Define enums and types for flow functions |
| packages/components/flow/json/ruleField.json | Remove deprecated server_unavailable field |
| packages/components/flow/index.ts | Register FunctionForm plugin and re-export flow modules |
| packages/components/flow/form/processing/OperatorTag.vue | Add OperatorTag UI component |
| packages/components/flow/form/processing/FunctionParamsColumnContent.vue | Add parameter inputs for function forms |
| packages/components/flow/form/processing/FunctionFuncColumnContent.vue | Add function selector for parameter forms |
| packages/components/flow/form/processing/FunctionForm.vue | Implement the full function form (Form/SQL toggle) |
| packages/components/flow/form/processing/FunctionFieldColumnContent.vue | Add field autocomplete input component |
| packages/components/flow/form/CommonFields.vue | Add shared field autocomplete component |
| packages/components/flow/composables/useRuleFunc.ts | Refactor rule function hook to use useFlowLocale |
| packages/components/flow/composables/useNodeForm.ts | New creators for function items and forms |
| packages/components/flow/composables/useHandleFlowDataUtils.ts | Convert form data to SQL expression |
| packages/components/flow/composables/useGenerateFlowDataUtils.ts | Parse SQL expression back to form data |
| packages/components/flow/composables/useFormRules.ts | Provide factory for required rules |
| packages/components/flow/composables/useFlowLocale.ts | Wrap useLocale to provide t, te, and locale |
| packages/components/common/CustomInputPassword.vue | Add custom password input with show/hide |
| packages/components/common/CustomFormItem.vue | Add custom form item wrapper supporting read-only display |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/utils/lib/tools.ts:30
- The comment is ambiguous—consider rephrasing to clarify that splitting should not occur inside quotes or brackets.
* do not support single/double quote and bracket
|
🐮🐮🐮 |
No description provided.