Commit graph

392 commits

Author SHA1 Message Date
Xon
9108736808 Support enabling/disable fuse via build feature flag in favor of a simple prefix search
ie running;
npm run js:build-dev -- --environment SEARCH_FUSE:null
2024-08-08 16:00:20 +08:00
Xon
cdb94986a7 Remove old comments 2024-08-08 13:08:45 +08:00
Xon
d75369888d Update to Fuse 7.0.0 2024-08-08 13:08:45 +08:00
Xon
43a9cfb8a3 Update highlightItem/unhighlightItem tests 2024-08-08 10:22:58 +08:00
Xon
8e1f99500d Remove console.log statements, and minor code cleanup 2024-08-08 09:42:43 +08:00
Xon
f6273d10bd Refactor remove choice API and add tests 2024-08-08 09:38:46 +08:00
Xon
d67b6e12fa Harden methods which take an item/choice from being passed nothing 2024-08-07 23:26:46 +08:00
Xon
299abf4264 Fix search would suggest it can be disabled for multiple select mode. This functionality is hard-coded enabled 2024-08-07 23:16:25 +08:00
Xon
7161382135 Update cloneObject to handled undefined for tests 2024-08-07 21:59:46 +08:00
Xon
b0199538a8 Re-apply linting & recompile css/js 2024-08-07 19:12:50 +08:00
Xon
243b958767 Switch from webpack to rollup, and setup build process to make umd/cjs/es builds. Remove d.ts.map files. rollup manages to save ~1kb off the gzip'ed bunddle size 2024-08-07 16:21:17 +08:00
Xon
a2f5632829 Remove tests types from distribution files 2024-08-07 15:07:51 +08:00
Xon
937cdcbb07 Fix disabling placeholder didn't disable extracting potential placeholder from <select> options. 2024-08-06 19:28:37 +08:00
Xon
a801021386 Fix disabled options where skipped from being rendered 2024-08-06 13:20:12 +08:00
Xon
f8205f2677 Remove out of date comment 2024-08-06 11:14:01 +08:00
Xon
e873925538 Split Templates into interface and implementation & resolve dependency cycles. 2024-08-06 10:06:01 +08:00
Xon
84a61cad1d Fix various linting issues 2024-08-06 09:30:27 +08:00
Xon
8c11e56efe Remove some unused functions from the store interface, and be more robust about returning active choices/items 2024-08-06 00:13:49 +08:00
Xon
74edda11b0 Fix placeholderChoice would apply for select-one even when configured to use a static string 2024-08-06 00:13:49 +08:00
Xon
95bd50e0c6 Cleanup components to reduce exports & remove dead-code 2024-08-06 00:13:49 +08:00
Xon
9e130b8dde Cleanup components to reduce exports & remove dead-code, and simplify code as much as possible 2024-08-06 00:13:49 +08:00
Xon
461aa229f6 Fix <select> did not have it's value attribute set 2024-08-06 00:13:49 +08:00
Xon
05bee42748 Handle custom properties being a simple string, and reduce exports of unneeded functions 2024-08-06 00:13:49 +08:00
Xon
b3aaf1812e Cleanup utils to reduce exports, and simplify code as much as possible 2024-08-06 00:13:46 +08:00
Xon
581224d5e9 Fix aria-describedby was being assigned when it shouldn't be 2024-08-06 00:13:35 +08:00
Xon
8f1b0fb02c Fix extending classNames did not work 2024-08-04 21:39:10 +08:00
Xon
45ebf76789 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. 2024-08-04 20:57:12 +08:00
Xon
c487ab51b7 Fix select-one not autoclosing after entering a new item 2024-08-04 19:23:15 +08:00
Xon
ec17d775e2 Fix allowHtmlUserInput being disabled practically didn't do anything 2024-08-04 19:21:12 +08:00
Xon
2f7c399a50 Fix text element now showing message or prep-populated items 2024-08-04 19:04:22 +08:00
Xon
60eb9ecc71 activeItems is not really a concept any more, and didn't really do anything meaningful. 2024-08-04 18:19:41 +08:00
Xon
aca49f7f37 Fix when adding choices, "Press Enter to add..." would not render if the dropdown had partially matching search results 2024-08-04 18:16:21 +08:00
Xon
2e66138a4c Fix invalid css selectors being generated for configurable css class-names with multiple css classes for an element 2024-08-04 17:49:58 +08:00
Xon
f3774061f9 Fix failing to add an item would close the dropdown 2024-08-04 15:37:56 +08:00
Xon
e1fb276264 Fix noResults/noChoices classes could not be set to a list of classes 2024-08-04 15:37:54 +08:00
Xon
ce4c07b2fa Update defaults for classnames 2024-08-04 15:37:39 +08:00
Xon
e877338f3f Fix search did not trigger to copy&paste events, and might not exit the search state correctly 2024-08-04 15:36:16 +08:00
Xon
4b486d6b4f ChoiceFull.keyCode is only used in one spot, remove from primary in-memory store 2024-08-04 07:11:17 +08:00
Xon
adf8daa3d2 Refactor _getChoiceForEvent into _getChoiceForOutput to generate an exportable choice format 2024-08-04 07:10:24 +08:00
Xon
02156c76f3 Fix adding items for select boxes would not give the max item messages reliably 2024-08-03 02:19:54 +08:00
Xon
90d0cf67bc Fix various methods using "active items" instead of "all items" when computing add/remove related actions 2024-08-03 02:19:54 +08:00
Xon
1467aef0d7 Fix destroy/init would not load choices from the underlying <select> as expected 2024-08-03 02:19:53 +08:00
Xon
1bbf3330ca Fix error when using backspace when no items are selected after adding an item 2024-08-02 23:29:30 +08:00
Xon
b5571eb7e3 Tweak _render loop to avoid duplicating has-changed checks 2024-08-02 21:56:16 +08:00
Xon
5e274a0782 Avoid pushing a search to fuse.js which is just additional whitespace to the existing search terms 2024-08-02 21:54:44 +08:00
Xon
67df709051 Simplify labelClass/labelDescription checks during rendering as input validation parses these into the expected states 2024-08-02 21:54:44 +08:00
Xon
aae851d55f Prune pointless type checks 2024-08-02 21:54:44 +08:00
Xon
a324fdf8ff Drop deadcode 2024-08-02 21:54:44 +08:00
Xon
2c64a9e617 Use constant enum instead of repeating strings and type information 2024-08-02 21:54:44 +08:00
Xon
15de31bd26 Merge branch 'shadow-dom' into main 2024-08-02 17:34:09 +08:00