This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Repository navigation
v1.2.6
Added
-
Utility Abstractions: Introduced several utility functions to improve modularity and testability:
createFormProxy(moved proxy logic out of class)deepClone(replaces internaldeepClonemethod)prepareSubmissionData(encapsulates data transformation and file handling logic)getDefaultHeaders(extracts CSRF token header logic)createProgressObject(standardizes upload progress structure)formatGeneralErrorandformatValidationErrors(modular error formatting)createTimeout(abstracts timeout creation)
-
Debounce Time Configuration: Added optional
debounceTimeparameter tosubmitDebouncedmethod 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
updateProgressto usecreateProgressObject()for standardized formatting. - Error Handling: Replaced inline error formatting with
formatValidationErrors()andformatGeneralError()for better readability and separation of concerns. - Timeout Management: Switched from
window.setTimeouttocreateTimeout()for better control and consistency. - Cleaner Disposal: Updated
dispose()to useObject.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.