laravelio / laravel.io

The Laravel.io Community Portal.
https://laravel.io
MIT License
2.43k stars 643 forks source link

Bump choices.js from 10.2.0 to 11.0.1 #1127

Closed dependabot[bot] closed 4 days ago

dependabot[bot] commented 1 week ago

Bumps choices.js from 10.2.0 to 11.0.1.

Release notes

Sourced from choices.js's releases.

v11.0.1

🐛 Bug Fixes

🔧 Maintenance

Contributors

@​Xon

v11.0.0

⚠ BREAKING CHANGES (from v10.2.0)

  • allowHtml now defaults to false.
  • Update to using Fuse.js v7.0.0
  • Update choices.js package to be an ES module, and use 'subpath exports' to expose multiple versions (UMD, MTS bundles, can product CJS bundles but it is not enabled by default).
  • Provide "fuse full" (default choices.js, ~19.9KB), or "fuse basic" (choices.search-basic.js ~18.8KB) or "prefix filter" (choices.search-filter.js ~14.6KB) based on how much Fuse.js is included.
  • Templates/text functions now escape ' characters for display.
  • addItemText/uniqueItemText/customAddItemText are now called with the value argument already escaped.
  • For select-one and select-multiple, the placeholder value is pulled from config.placeholderValue="..." or <select data-placeholder="..."> before attempting to extract a placeholder from the options list. #912 #567 #843
  • enter key now consistently opens/closes the dropdown instead of the behavior varying depending on backing element or internal state of the highlighted choice
  • Mutation APIs setChoiceByValue/setChoices/setValue now throw an error if the Choices instance was not initialized or multiple choices instances where initialized on the same element. Prevents bad internal states from triggering unexpected errors #1129
  • Improve consistency of the choice event firing. choice event now occurs after the addItem event
  • Trigger a search event (with empty value and 0 resultCount) when search stops
  • Update polyfills to include Element.prototype.replaceChildren
  • A number of internal APIs have been extensively refactored, this includes typescript class names.
  • Typescript source mapping files .d.ts.map are no longer generated and various .test.d.ts files are no longer generated

🚀 Features

  • Improve performance of search/filtering with large number of choices.
  • Improve performance of rendering a large number of items or choices and adding/removing items.
    • Stopping a search or adding many items quickly may cause micro-stutters on lower end devices.
  • Add closeDropdownOnSelect option, controls how the dropdown is close after selection is made. #636 #973 #1012
  • Allow choices.js to be imported on nodejs, useful for tests and also server side rendering. As windows.document is by default not defined, the default template rendering will not function. The callbackOnCreateTemplates callback must be used. #861
  • config.classNames now accept arrays to support multiple classes. #1121 #1074 #907 #832
  • The original option list for the select is not destroyed, and all loaded choices are serialised to HTML for better compatibility with external javascript. #1053 #1023
  • New singleModeForMultiSelect feature to treat a select-single as if it was a select-multiple with a max item count of 1, and still auto-close the dropdown and swap the active item on selection.
  • Remove item text can be localized.
  • Allow user-created choices for selects. #1117 #1114
    • User input is escaped by default. At the risk of XSS attacks this can be disabled by allowHtmlUserInput.
  • Render options without a group even if groups are present. #615 #1110
  • Read data-labelclass/data-label-description from <option> HTML to drive adding a per-choice CSS label and description text when allowHtml: false.
  • Add removeItemButtonAlignLeft option, to control if the remove item button is at the start or the end of the item.
  • Add removeChoice method. Removes the choice from the choices.js object and any backing <option> HTML element
  • Add refresh method. Reloads choices from the backing <select>s options.
  • escapeForTemplate function is passed to the 2nd method of the callbackOnCreateTemplates callback.
  • When allowHtml is false, default templates now render escaped html to innerHtml writing to innerText.
    • This provides consistent rendering performance as innerText is quirky and slower than escaped html into innerHtml
  • Shadow DOM support #938
  • searchResultLimit can be set to -1 for no limit of search results to display.

... (truncated)

Changelog

Sourced from choices.js's changelog.

[11.0.1] (2024-08-30)

Bug Fixes (from 11.0.0)

  • Fix the rendered item list was not cleared when clearStore was called. This impacted the on-form-reset and refresh features.

Chore

  • Add e2e test for 'form reset' and 'on paste & search'.
  • Cleanup adding classes to generated elements.

[11.0.0] (2024-08-28)

⚠ BREAKING CHANGES

  • Update polyfills to include Element.prototype.replaceChildren
  • Number of internal APIs have changed
Commits
  • 69b3ed7 Release prep
  • 1e741fb Use helper function for add/remove classes, standardize adding/setting classn...
  • c4521b8 Update CHANGELOG.md
  • 609bcf8 Revert "Adjust e2e testing matrix"
  • 2f5e007 Linting fix
  • 652a4b6 Rewrite e2e paste to avoid javascript APIs
  • 9e70971 Ensure timers can trigger for copy & paste tests
  • 5f7cb7c Additional paste & search tests
  • 4939cdd Add serialization locks around copy/paste to workaround a lack of clipboard i...
  • 336bbd3 Additional e2e tests for copy & paste support
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 4 days ago

Superseded by #1129.