All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
0.7.4 (2022-02-21)
- New Controller: EqualizeController - For equalizing the heights of all connected elements to the max observed size, and scaling them responsively to resize and device rotation events (4ebcbee)
0.7.3 (2022-02-16)
- SignalVisibilityController: New hide/show events added in 0.7.2 should have included the nameValue. Now fixed. (00dd27b)
0.7.2 (2022-02-16)
- Controllers: New SignalDomChildrenController which emits signals when its children/descendants are added or removed (115ab44)
- Debugging: Display more and clearer information for event logging in debug mode (b9d4b95)
- SignalInputController: Dispatch an event to the DOM when the value changes (fccc822)
- SignalVisibilityController: Predicate and value information is now attached to the events fired to the DOM. Allows for easier debugging, and can be used in other controllers if desired. (fc02e05)
- Add event dispatch to SignalVisibilityController that other controllers can use to trigger actions when the element is shown/hidden (c62972b)
- SignalInputController: Add tiny 1ms debounce to event handlers so that change and input don't both fire for the same change (bb69d6b)
- Don't duplicate Stimulus-3 built in logging. (e2f64eb)
- Ensure that dispatched events always have the target in the details obj (07aa806)
- Fix bug in SignalControllers expression parsing logic where expressions operating on the value "0" were not detected as valid expressions (772ab33)
0.7.1 (2022-01-25)
- BaseController infinite loop when dispatching an event (6618122)
0.7.0 (2022-01-20)
- Support for Stimulus 3.
- AutoSubmitFormController - Removed default debounce interval
- Mixins: New mixin useTemporaryContent for setting content of an element temporarily and restoring it either on demand or after a set time (8f1d254)
- AutoSubmitFormController - Change eventModeValue to support multiple events. Backwards compatible with old syntax. (efaa124)
- AutoSubmitFormController - Removed default debounce interval (7d0aa0b)
- Renamed
this.dispatch
tothis.dispatchEvent
to avoid collision with Stimulus 3. Stimulus 3 only supports dispatch on the controller root element, while dispatchEvent can be fired on any element. (e7868e7) - Support for Stimulus 3. (60c84d8)
- Mixins: New mixin UseLocalstorage (c323e7f)
- Exclude Trix/ActionText editors from AutoSubmitFormController, fixes Trix hyperlink dialogue submitting forms (e0e2f52)
0.6.5 (2021-12-06)
- TableSortController - data-sort="false" property for preventing sort should be data-sortable="false" to avoid shadowing dataset property used internally to track current state of column (cbcadb4)
0.6.4 (2021-12-06)
- TableSortController - Allow columns to be ignored when data-sort="false" is specified. (8e71844)
- Mixins: useGeolocation - A mixin to enable a controller to subscribe to a device's location updates (47d485d)
- Improvements to DetectDirtyController and DetectDirtyController to better handle changes in radio button groups (c67bb05)
- New controller SignalActionController - A controller that receives value change updates from SignalInputController and can fire actions on other controllers. (06df0c0)
- SignalInputController now works as expected on radio button groups. Add some extra functionality to ensure that values sync up when the SignalInputController connects before the SignalVisibilityControllers. Add a configurable debounceIntervalValue to SignalInputController (018d5a8)
- Throw an error in Signal controllers if the right-hand side of an expression is blank (1d3eb68)
- Mixins: Fix case where default classes was ignored in Stimulus2 polyfill for plural fooClasses method (d949875)
- Fix regex in ephemeral controller for whitespace (8bd462f)
- Fix Signal expressions being stripped of spaces, breaking compatibility with text inputs. Added better handling of whitespace to compensate. (b0a494e)
0.6.3 (2021-11-19)
- New pair of controllers SignalInputController and SignalVisibilityController. SignalInputController is a controller that broadcasts changes to an input's value, and SignalVisibilityController is a controller that can live anywhere in the DOM and react to named input events to hide or show content based on whether the value of the input matches simple predicates expressions i.e.
>3 && <10
. (5e3db6c) - Controllers: New utility controller FullscreenController for toggling fullscreen for a page or element in response to an event/action (cad6d46)
- Mixins: New mixin useFullscreen for enabling controllers to toggle fullscreen for a page or element (533db5a)
- Add functionality to AsyncBlock, PollBlock, LazyBlock and LoadBlock controllers to allow them to retry fetching content a set number of times when network errors occur. (3368392)
- Add functionality to enable TrixModifierController to strip disallowed formatting from pasted text. (acfa0a7)
- AlertController - Small utility controller to fire alerts() in response to stimulus actions (ca23d76)
- AnchorSpyController - Add active and inactive classes to the controller element when the URL's hash matches, or doesnt match (5ad8dbc)
- CheckboxSelectAllController - Only tick checkboxes that are not readonly and not disabled (fe9d185)
- CheckboxXORController - Controller to make a group of checkboxes behave like a radio button group where only one can be checked at a time. (fb508bb)
- Controller for modifying ActionText/Trix behaviours. (0d9c0ef)
- NavigateFormErrorsController - Add current class to the element/error that is currently targeted by the controller (a5ac9eb)
- Mixins: New mixins useCollectionEventListeners and useCollectionEventListener for adding event listeners to entire collections of elements (f579b82)
- DurationController - Use new cleanup method for cleaning up event listeners early if errors occur during update (e5682f8)
- Fix to FormRCController sometimes not submitting when form could not be detected from submit event (cd29f13)
- PresenceController - Fix event name not matching documentation (0ab4011)
0.6.2 (2021-11-03)
- Export more internal utilities for HTML insertion and DOM manipulation (0c314e0)
0.6.1 (2021-11-03)
- Export internal utilities as part of the library. Element manipulation, EventBus, scroll helpers, and form submission helpers (d0b34d6)
0.6.0 (2021-11-03)
- Rename EnableInputsController and DisableInputsController to be CheckboxEnableInputsController and CheckboxDisableInputsController, to better describe the purpose of the controllers
- Mixins: Add mixins for injecting HTML that the controller needs, and auto-cleaning it up on disconnect (77fe03c)
- Add submitMode value to FormRCController to allow changing between calling .submit and .requestSubmit (7c057f1)
- AutosizeController - Fixed case when an autosize controller element starts life hidden, it will appear collased and incorrectly sized. It will now use an IntersectionObserver to resize on first appearance to the correct size. (715d720)
- EnableInputsController - Controller that provides an action that can enable/disable inputs (2d2a51d)
- Mixins - Created mixins useEventListener, useInterval, useTimeout, that can be called in controllers to install behaviours onto stimulus controllers and the behaviours will clean themselves up on disconnect. (6cbf7e0)
- Rename EnableInputsController and DisableInputsController to be CheckboxEnableInputsController and CheckboxDisableInputsController, to better describe the purpose of the controllers (1488469)
0.5.0 (2021-11-02)
- AutoSubmitForm controller - Added new value to control the mode the controller uses to monitor inputs for events. Add new 'debounced' mode. Adds new debounceIntervalValue to allow users to customise the debounce interval in debounced mode. Changed modeValue to be submitModeValue to allow other modes like the new eventModeValue.
- AutoSubmitForm controller - Added new value to control the mode the controller uses to monitor inputs for events. Add new 'debounced' mode. Adds new debounceIntervalValue to allow users to customise the debounce interval in debounced mode. Changed modeValue to be submitModeValue to allow other modes like the new eventModeValue. (f437706)
- FocusStealController - a controller to steal the users focus when a new input enters the page (3cf7967)
- PresenceController - Added an optional name value which if provided will be included in the presence event name so that other controllers can react to specific presence events if there are multiple in a given scope. (a069d7b)
- PrintController and PrintButtonController to enable buttons and actions to trigger the browser print dialogue (ab95de7)
0.4.1 (2021-10-09)
- FocusStealController - a controller to steal the users focus when a new input enters the page (3cf7967)
0.4.0 (2021-10-08)
- Change bundling setup to ViteJS. Outputs should be compatible, but releasing this as a breaking change for safety.
- Add data attribute to mark inputs as ignored for AutoSubmitFormController (bc64359)
- Add the controller instance to the debug logging for actions and events (0517f25)
- Allow FormRCController to submit a form found either via a CSS selector or via a target (d7c4ed4)
- Change bundling setup to ViteJS. Outputs should be compatible, but releasing this as a breaking change for safety. (6c7ff8f)
0.3.19 (2021-10-07)
- Change implementation of FormRCController to use requestSubmit, and requestReset to be close as possible to emulating a native button click. (eaf9f4c)
0.3.18 (2021-10-07)
- RemoteFormController - Add an event for
remote-form:replace
to signify a replace has occurred (c2663bb)
0.3.17 (2021-09-28)
- AutoSubmitFormController - Changes to the underlying implementation to help broaden browser compatibility. (cdc8099)
- Include src in npm published package so that sourcemaps work (1d03594)
0.3.16 (2021-09-17)
- Add RemoveController as an alias of DismissableController (cae00eb)
- BaseController now only builds a proxy to detect loggable events when in debug mode where logging happens (1e44a63)
- New controllers LoadBlockController and PollBlockController. (aa2598b)
0.3.15 (2021-08-13)
- TreeViewController - A controller that handles nested
ul
andol
lists, and enabled them to be collapsed and opened. (bd35e0a)
0.3.14 (2021-08-05)
- AutoSubmitFormController - don't trigger a synthetic 'submit' event when using
.requestSubmit()
as that fires it's own event unlike.submit()
(e40b09b) - ConfirmNavigationController - Message value was incorrectly configured in a previous refactor. (f316940)
0.3.13 (2021-08-05)
- AutoSubmitFormController - allow an optional
mode
config which determines whether to try submitting the form usingrequestSubmit
orsubmit
(f62c8d0)
0.3.12 (2021-07-19)
- EmptyDOMController - There is now an optional
container
target which can be observed instead of the root controller element for emptiness. (fbf785f)
0.3.11 (2021-07-15)
- NavigateFormErrorsController - only show "nextError" button when the error count is 1, if there is no "currentError" button (f6aae19)
0.3.10 (2021-07-15)
- NavigateFormErrorsController - setting indexValue to the same value does not trigger indexValueChanged. Manually call toggleButtons on firstClick events. (973225a)
0.3.9 (2021-07-15)
- NavigateFormErrorsController - add firstClick logic to toggleButtons check. Fixes bug where errorCount is 1, and both buttons are disabled on load. (d94875e)
0.3.8 (2021-07-07)
- NavigateFormErrorsController - The first click after the controller connects will just scroll to the first error, without advancing the count. Fixes bug where controller jumps straight to second error. (df39c5d)
0.3.7 (2021-07-07)
- ValueWarnController - A form controller to display a warning message (rather than an outright validation error), when the value of a numeric input exceeds a given min/max (2357660)
- Fix indexing bug in NavigateFormErrorsController causing previous/next to not always fire. (92d64e8)
0.3.6 (2021-07-05)
- Add optional
success
andfail
classes to FallbackImageController (2dfac90) - All controllers with
class
options now support multiple classes, as in utility-class framework environments. i.e. Tailwind (51587bb)
0.3.5 (2021-07-01)
0.3.4 (2021-05-27)
- DisableWithController - Re-enable buttons when a turbo(links) visit triggers (2895ed1)
0.3.3 (2021-05-21)
- NavigateFormErrors - Clamp error index so that "current error" works even when index is out of bounds (d09a66b)
0.3.2 (2021-05-21)
- BackLinkController - A controller to enable links to navigate back through the user's history to previous pages, falling back to a default href. (9d68ed6)
- ClockController - A visual controller to display the current time (ac122ae)
- DurationController - A controller to display the duration that has elapsed since a given timestamp. Similar to TimeDistanceController, but with numbers instead of words. (b634a3c)
- Prefetch Controller - A controller to preload links when they come into view, or the user hovers over them. (a27593f)
- ScrollContainerController - Controller to allow control over a scrollable container element (e953769)
0.3.1 (2021-05-14)
- TemporaryStateController - fix attributesValue check always throwing error (6b12aa5)
0.3.0 (2021-05-13)
- Rename AppearanceController as UserFocusController and tweak the event names.
- PresenceController - A utility controller to wire up other controllers when an element comes into or leaves the DOM (#26) (d3537d9)
- Rename AppearanceController as UserFocusController and tweak the event names. (0aa88ca)
- TabsController - A presentational controller to enabled tabbed views (db040e5)
- TemporaryStateController - A controller to temporarily apply a state to an attribute of an element, and restore it back after a given time. Closes #22 (#28) (427d0fa)
0.2.10 (2021-05-04)
- SyncInputsController - Inspired by Vue's v-bind and v-model. A controller to sync input vales to parts of the DOM, or the values of other inputs. (9d5e847)
- AutoSubmitFormController - allow controller to submit normal forms as well as UJS forms. (e1866e2)
- ScrollTopController/ScrollBottomController - fix controller behaviour when inside an overflow container and mode is "nearest". And more consistent behaviour when mode is document. (f36f9e6)
0.2.9 (2021-04-28)
- FallbackImageController - update the controller to support failing when the placeholder also fails. Also works more consistently in race-conditions when the image has already loaded when the controller mounts. (1fd682d)
0.2.8 (2021-04-26)
- CountdownController - A controller to visualise a countdown to a date/time (82c1bfe)
- NavigateFormErrorsController - A controller to enable smoothscroll navigation between form errors on a page (#23) (dcebaf1)
- TimeDistanceController - Controller that shows the distance in words between the current time and a specific UNIX timestamp. Updates intelligently according to time distance from current. (#24) (91269ea)
- CountdownController - When errors happen on tick, kill tick interval. (112039c)
- IntervalController - Throw exception when secondsValue is blank (0a45825)
0.2.7 (2021-04-24)
- Add event logging to debug logging (594553c)
- AnchorSpyController - Controller to write anchors to the URL when actions happen, and detect when the page loads with an anchor (#), and wire up other controllers. i.e. To reopen accordions/tabs when the page opens with the correct anchor. Closes #18 (#20) (de0be82)
- BaseController - An extendable controller that provides common useful behaviours and properties for all controllers that use it as a base (a12b101)
- EphemeralController - an extendable base controller that can cleanly uninstall controllers/targets/classes/values from DOM elements (34ebc58)
- IntervalController - a utility controller that fires an event every x seconds to wire up to other controllers (c31fc3b)
- MediaPlayerController - A thin stimulus controller wrapper around the native HTML5 video and audio tag controls (#21) (91bcf2b)
- TimeoutController - a utility controller that fires an event after x seconds to wire up to other controllers (9f0e0da)
- Missing sourceTarget in ClipboardController (da222a7)
0.2.6 (2021-04-23)
- AnchorSpyController - Controller to write anchors to the URL when actions happen, and detect when the page loads with an anchor (#), and wire up other controllers. i.e. To reopen accordions/tabs when the page opens with the correct anchor. Closes #18 (#20) (de0be82)
- MediaPlayerController - A thin stimulus controller wrapper around the native HTML5 video and audio tag controls (#21) (91bcf2b)
- Missing sourceTarget in ClipboardController (da222a7)
0.2.5 (2021-04-21)
- TableSortController - Allow sorting of tables by clicking on column headers (2ba2560)
- TableTruncateController - Allow the collapsing of long tables, down to a specified number of rows, and a button to expand the table to full-height. (c121cd7)
0.2.4 (2021-04-13)
- package.json pointing to incorrect Typescript output. Should be index.d.ts (68e22d8)
0.2.3 (2021-03-30)
- DetectDirtyFormController - A form controller that detects the dirty state of a whole form and any of its children. (e173932)
- Form RC Controller. Able to submit and reset a form from outside its child subtree. Closes #7 (0fa1df0)
0.2.2 (2021-03-26)
- Form RC Controller. Able to submit and reset a form from outside its child subtree. Closes #7 (0fa1df0)
0.2.1 (2021-03-11)
- ConfirmNavigationController - Support for Hotwire/Turbo and Turbolinks navigation events (f698920)
- DisableWithController - Controller to disable an element temporarily to prevent double clicks and submissions. Emulates UJS DisableWith for Hotwire applications. (#12) (1d675b0)
- ElementSaveController - save the state of a single element to localstorage. Closes #4 (#14) (5b39deb)
- RemoteFormController - Controller for handling UJS remote form responses (fdf0e5f)
- TurboFrameRefreshController - a controller to either manually or periodically refresh the contents of a turboframe's src (#13) (f4dfd98)
- Accidentally using type-guards for HTMLLinkElement instead of HTMLAnchorElement. (d3f2be9)
0.2.0 (2021-03-02)
- Remove lodash as a dependency
-
Fix bug in LimitedSelectionCheckboxesController where maxValue was being ignored (fc639f6)
-
Remove lodash as a dependency (d3990ea)
0.1.15 (2021-03-01)
- Add optional selector and error-message values to async-block and lazy-block controllers. Users can choose to extract sub-content from HTML responses, and provide their own error messages when fetch fails. (1c3be1e)
0.1.14 (2021-02-26)
- Fix NestedFormController - The ID generated by generateID needs to not have any decimal points. Math.random() gives a number between 0 and 1. Slice out decimal point (684e073)
0.1.13 (2021-02-26)
- Fix bug in Nested Form Controller where new class API was being used without the dot "." prefix in the selector (315b1cf)
0.1.12 (2021-02-11)
- AppearanceController - A utility controller to wire up Stimulus actions when the user focuses/minimises the page (e15fe82)
- IntersectionController - A utility controller to wire up Stimulus actions when an element moves in/out of the viewport (dbda74f)
0.1.11 (2021-02-10)
- StickyController - A controller to be able to style "sticky" elements depending on their "stuck" state. (ce598eb)
0.1.10 (2021-02-09)
- Fix bug in CheckboxSelectAllController preventing connect() from adding event listeners (db577a9)