Commit graph

1,833 commits

Author SHA1 Message Date
Xon
bef1adfa91 Update CHANGELOG.md 2024-09-02 10:27:42 +08:00
Xon
438b16b22f
Merge pull request #1193 from ifad/bugfix/style-export
Fix regression where webpack doesn't permit importing scss/css
2024-09-02 10:21:04 +08:00
Geremia Taglialatela
5721e9a9ae
Add missing webpack exports
Add some entries to `package.json` to improve compatibility with webpack

- Add default `style` and `sass` exports as per webpack requirements
- Add `public/assets/styles/*` exports for CSS files
- Add `src/styles/*` exports for Scss files. Extension can be omitted
  to prevent linting issues with `stylelint`
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import styles with the same syntax
of v10 to prevent a breaking change in webpack based applications

Refs:
- https://webpack.js.org/guides/package-exports/
- https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension/README.md

Close #1184
2024-09-01 10:45:59 +02:00
Xon
1801a04ae0 Suppress import cycle between templates/options 2024-08-31 18:00:02 +08:00
Xon
59525d263a Pass getClassNames as the 3rd argument to callbackOnCreateTemplates callback 2024-08-31 17:49:59 +08:00
Xon
240f35923a Compile JS files 2024-08-31 07:22:55 +08:00
Xon
b58a6861e1 Byte shaving _initStore method 2024-08-31 07:21:04 +08:00
Xon
b402a00a2a Tests for no choices besides the current selected 2024-08-31 07:03:25 +08:00
Xon
73b9c25f89 Fix regression "no choices to choose from" notice not triggering when no selectable choices exist for select-one. [#1185](https://github.com/Choices-js/Choices/issues/1185) 2024-08-31 07:03:25 +08:00
Xon
66dce43e54 Adjust "within form" tests to have a 2nd selectable item to avoid no choices exist notice 2024-08-31 07:03:25 +08:00
Xon
3c86fbe2e1 Document previous pre-v10 behavior of noChoicesText 2024-08-31 07:03:25 +08:00
Xon
1e74f779ee Fix choice disable state wasn't considered when showing the "no choices to choose from" notice 2024-08-31 07:03:25 +08:00
Xon
8985311117 Move comment around disabled/selected/active flags from reducer to the choice object 2024-08-31 07:03:25 +08:00
Xon
f09dbee953 Add missing 'multiple' attribute to "no press to select" test 2024-08-31 07:03:25 +08:00
Xon
7b7c1c7b18 Chore: add e2e tests for "no choices" behavior to match v10 2024-08-31 06:19:24 +08:00
Xon
e73f7e50f3 Update pages deployment to use node 20, and update various actions to no longer use out of date node versions 2024-08-30 05:34:02 +08:00
Xon
e97f338267 Adjust github actions to work on main branch instead of master branch 2024-08-30 04:42:06 +08:00
Xon
69b3ed7348 Release prep v11.0.1 2024-08-30 04:35:08 +08:00
Xon
1e741fbdd9 Use helper function for add/remove classes, standardize adding/setting classnames for elements. Also shaves ~180 bytes off the compressed bundle 2024-08-30 04:25:11 +08:00
Xon
c4521b893c Update CHANGELOG.md 2024-08-30 03:14:02 +08:00
Xon
609bcf8cd2 Revert "Adjust e2e testing matrix"
This reverts commit 1ba4f81b951e5523c69ccfdaac8f64c39a49b8ae.
2024-08-29 16:38:01 +08:00
Xon
2f5e007b94 Linting fix 2024-08-29 16:38:01 +08:00
Xon
652a4b6427 Rewrite e2e paste to avoid javascript APIs 2024-08-29 16:38:01 +08:00
Xon
9e70971408 Ensure timers can trigger for copy & paste tests 2024-08-29 16:38:01 +08:00
Xon
5f7cb7cd20 Additional paste & search tests 2024-08-29 16:38:01 +08:00
Xon
4939cddc5b Add serialization locks around copy/paste to workaround a lack of clipboard isolation 2024-08-29 16:38:01 +08:00
Xon
336bbd392d Additional e2e tests for copy & paste support 2024-08-29 16:38:01 +08:00
Xon
345e59507d Adjust e2e testing matrix 2024-08-29 16:38:01 +08:00
Xon
78682c5d53 Merge branch 'fix-clearStore' 2024-08-29 16:36:33 +08:00
Xon
6efcc13501 Force merge reports 2024-08-29 16:36:11 +08:00
Xon
c435932291 Update CHANGELOG.md 2024-08-29 16:33:01 +08:00
Xon
2111d60cb7 Fix unit test & e2e test 2024-08-29 16:24:46 +08:00
Xon
5ecc6fdda1 Compile JS files 2024-08-29 16:18:47 +08:00
Xon
b6bd5ae3ed Fix refresh() did not reset the backing select's options attributes when "deselectAll" argument was true
Fix clearStore() did not remove selected item from the items list
2024-08-29 15:33:29 +08:00
Xon
daa67f4545 Add e2e test for reset button 2024-08-29 15:05:46 +08:00
Xon
f00aedd910 Avoid iterating the active choices list multiple times 2024-08-29 14:37:23 +08:00
Xon
d224a09b64
Update bug_report.md 2024-08-28 07:18:01 +08:00
Xon
b7a6c32d6f release prep v11.0.0 2024-08-28 06:37:36 +08:00
Xon
f534235d49 Appease linter 2024-08-27 21:30:57 +08:00
Xon
6e72240c70 Cleanup appending group label to choices 2024-08-27 21:25:10 +08:00
Xon
b6e9809f0e Update CHANGELOG.md 2024-08-27 20:55:48 +08:00
Xon
9e60d6e0a0 Commit lint fixed file 2024-08-27 20:53:06 +08:00
Xon
d3028c7177 Cleanup unused import 2024-08-27 20:50:47 +08:00
Xon
f6b54f7c30 Compile JS files 2024-08-27 20:50:40 +08:00
Xon
63653f0bde Update tests 2024-08-27 20:48:45 +08:00
Xon
f1c317085e Cleanup unused function and redundant variable assignment 2024-08-27 20:45:39 +08:00
Xon
5f5a057a9c Revert & add some variable hoisting as it compressed better 2024-08-27 20:45:39 +08:00
Xon
b5b6c8e1fb Invalidate cached choice when an item is added/removed & fix renderSelectedChoices === 'always' with select-multiple 2024-08-27 20:45:26 +08:00
Xon
dfb15a70d7 Add e2e test for renderSelectedChoices flag 2024-08-27 17:46:35 +08:00
Xon
c7ab1340b7 Allow renderSelectedChoices to be a direct boolean to simplify internal logic 2024-08-27 17:37:06 +08:00