Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

v1.2.6

Choose a tag to compare

@Thavarshan Thavarshan released this 08 Apr 16:47
· 4 commits to main since this release

Added

  • Utility Abstractions: Introduced several utility functions to improve modularity and testability:

    • createFormProxy (moved proxy logic out of class)
    • deepClone (replaces internal deepClone method)
    • prepareSubmissionData (encapsulates data transformation and file handling logic)
    • getDefaultHeaders (extracts CSRF token header logic)
    • createProgressObject (standardizes upload progress structure)
    • formatGeneralError and formatValidationErrors (modular error formatting)
    • createTimeout (abstracts timeout creation)
  • Debounce Time Configuration: Added optional debounceTime parameter to submitDebounced method for customizable delay duration.

Changed

  • Proxy Creation: Replaced inline proxy logic within the constructor with createFormProxy() helper.
  • Deep Cloning: Refactored cloning logic to use the deepClone() utility instead of a private method.
  • Data Preparation: Moved data transformation and file handling into prepareSubmissionData().
  • Header Management: Extracted CSRF token header logic into getDefaultHeaders().
  • Progress Tracking: Refactored updateProgress to use createProgressObject() for standardized formatting.
  • Error Handling: Replaced inline error formatting with formatValidationErrors() and formatGeneralError() for better readability and separation of concerns.
  • Timeout Management: Switched from window.setTimeout to createTimeout() for better control and consistency.
  • Cleaner Disposal: Updated dispose() to use Object.keys().forEach() for better clarity and reliability when clearing object keys.

Fixed

  • Potential Proxy Redundancy: Improved property fallback logic by moving proxy logic out, reducing chances of conflicts or duplication.
  • Error Object Casting: Made error response casting and fallback more robust using type-safe utilities.
  • Form Reset Edge Cases: Fixed edge case where resetting with specific fields might not deep clone defaults properly.
  • Timeout Cleanup: Ensured all timeouts (including debounce) are properly cleared in all scenarios, improving memory safety.