From 48b5655d97b8f64caa5f63080a071ff666b83ef7 Mon Sep 17 00:00:00 2001 From: Adam Baker Date: Tue, 8 Nov 2022 10:19:09 -0500 Subject: [PATCH 1/3] Update power select types --- CHANGELOG.md | 240 +++++++++--------- package.json | 2 +- .../ember-power-select-infinity/options.d.ts | 9 - .../power-select-infinity.d.ts | 134 ---------- .../power-select-infinity/for-model.d.ts | 71 ------ .../basic-dropdown-content.d.ts} | 16 +- .../basic-dropdown-trigger.d.ts} | 16 +- .../basic-dropdown.d.ts} | 42 ++- .../utils/calculate-position.d.ts | 28 ++ .../components/power-select-multiple.d.ts | 15 ++ .../power-select-multiple/trigger.d.ts | 22 ++ .../components/power-select.d.ts | 93 +++++++ .../power-select/after-options.d.ts | 9 - .../power-select/before-options.d.ts | 30 ++- .../components/power-select/options.d.ts | 38 ++- .../components/power-select/trigger.d.ts | 36 ++- types/ember-power-select/index.d.ts | 39 --- .../power-select-multiple.d.ts | 63 ----- .../power-select-multiple/trigger.d.ts | 40 --- types/ember-power-select/power-select.d.ts | 112 -------- .../power-select/options.d.ts | 33 --- .../test-support/helpers.d.ts | 1 - .../ember-power-select/utils/group-utils.d.ts | 1 + yarn.lock | 18 +- 24 files changed, 386 insertions(+), 722 deletions(-) delete mode 100644 types/@gavant/ember-power-select-infinity/options.d.ts delete mode 100644 types/@gavant/ember-power-select-infinity/power-select-infinity.d.ts delete mode 100644 types/@gavant/ember-power-select-infinity/power-select-infinity/for-model.d.ts rename types/ember-basic-dropdown/{content.d.ts => components/basic-dropdown-content.d.ts} (68%) rename types/ember-basic-dropdown/{trigger.d.ts => components/basic-dropdown-trigger.d.ts} (74%) rename types/ember-basic-dropdown/{dropdown.d.ts => components/basic-dropdown.d.ts} (60%) create mode 100644 types/ember-basic-dropdown/utils/calculate-position.d.ts create mode 100644 types/ember-power-select/components/power-select-multiple.d.ts create mode 100644 types/ember-power-select/components/power-select-multiple/trigger.d.ts create mode 100644 types/ember-power-select/components/power-select.d.ts delete mode 100644 types/ember-power-select/components/power-select/after-options.d.ts delete mode 100644 types/ember-power-select/index.d.ts delete mode 100644 types/ember-power-select/power-select-multiple.d.ts delete mode 100644 types/ember-power-select/power-select-multiple/trigger.d.ts delete mode 100644 types/ember-power-select/power-select.d.ts delete mode 100644 types/ember-power-select/power-select/options.d.ts delete mode 100644 types/ember-power-select/test-support/helpers.d.ts create mode 100644 types/ember-power-select/utils/group-utils.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e776d..5f6d12d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,293 +6,293 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### [v0.2.4](https://github.com/Gavant/glint-template-types/compare/v0.2.3...v0.2.4) -- Changing types for ember-table cell and header components [`2589b74`](https://github.com/Gavant/glint-template-types/commit/2589b741fcb7b735a59b710e48c59a99e24c2e34) +- Changing types for ember-table cell and header components [`2589b74`](https://github.com/Gavant/glint-template-types/commit/2589b741fcb7b735a59b710e48c59a99e24c2e34) #### [v0.2.3](https://github.com/Gavant/glint-template-types/compare/v0.2.2...v0.2.3) > 28 October 2022 -- Adding exports for ember-table [`aa0ef80`](https://github.com/Gavant/glint-template-types/commit/aa0ef80eef8562d3200e2b7cf75c7954b4d890f2) -- chore: release 0.2.3 [`1c688cf`](https://github.com/Gavant/glint-template-types/commit/1c688cf305878bad7a723eb04a097a302a15bc0c) +- Adding exports for ember-table [`aa0ef80`](https://github.com/Gavant/glint-template-types/commit/aa0ef80eef8562d3200e2b7cf75c7954b4d890f2) +- chore: release 0.2.3 [`1c688cf`](https://github.com/Gavant/glint-template-types/commit/1c688cf305878bad7a723eb04a097a302a15bc0c) #### [v0.2.2](https://github.com/Gavant/glint-template-types/compare/v0.2.1...v0.2.2) > 28 October 2022 -- Fixing body cell types [`#58`](https://github.com/Gavant/glint-template-types/pull/58) -- chore: release 0.2.2 [`8c95e62`](https://github.com/Gavant/glint-template-types/commit/8c95e62e79b184f50df775b0aeb337af20554b51) +- Fixing body cell types [`#58`](https://github.com/Gavant/glint-template-types/pull/58) +- chore: release 0.2.2 [`8c95e62`](https://github.com/Gavant/glint-template-types/commit/8c95e62e79b184f50df775b0aeb337af20554b51) #### [v0.2.1](https://github.com/Gavant/glint-template-types/compare/v0.2.0...v0.2.1) > 27 October 2022 -- Fixing wrong type [`#57`](https://github.com/Gavant/glint-template-types/pull/57) -- chore: release 0.2.1 [`de84f73`](https://github.com/Gavant/glint-template-types/commit/de84f734e54382c4528d5351e24bb06397497b62) +- Fixing wrong type [`#57`](https://github.com/Gavant/glint-template-types/pull/57) +- chore: release 0.2.1 [`de84f73`](https://github.com/Gavant/glint-template-types/commit/de84f734e54382c4528d5351e24bb06397497b62) #### [v0.2.0](https://github.com/Gavant/glint-template-types/compare/v0.1.8...v0.2.0) > 27 October 2022 -- Improving ember table types and upgrading glint/typescript [`#56`](https://github.com/Gavant/glint-template-types/pull/56) -- Fixing lint [`6f8bbe7`](https://github.com/Gavant/glint-template-types/commit/6f8bbe72b505df6e1ba56e432cfda4f7de63f935) -- chore: release 0.2.0 [`31e8609`](https://github.com/Gavant/glint-template-types/commit/31e860917af09ced1c3793fe08e9c1399b29e486) +- Improving ember table types and upgrading glint/typescript [`#56`](https://github.com/Gavant/glint-template-types/pull/56) +- Fixing lint [`6f8bbe7`](https://github.com/Gavant/glint-template-types/commit/6f8bbe72b505df6e1ba56e432cfda4f7de63f935) +- chore: release 0.2.0 [`31e8609`](https://github.com/Gavant/glint-template-types/commit/31e860917af09ced1c3793fe08e9c1399b29e486) #### [v0.1.8](https://github.com/Gavant/glint-template-types/compare/v0.1.7...v0.1.8) > 21 October 2022 -- Fixing types for ember table [`#55`](https://github.com/Gavant/glint-template-types/pull/55) -- chore: release 0.1.8 [`802a8e9`](https://github.com/Gavant/glint-template-types/commit/802a8e9593b24932fe8bb2827edb8dccfc395500) +- Fixing types for ember table [`#55`](https://github.com/Gavant/glint-template-types/pull/55) +- chore: release 0.1.8 [`802a8e9`](https://github.com/Gavant/glint-template-types/commit/802a8e9593b24932fe8bb2827edb8dccfc395500) #### [v0.1.7](https://github.com/Gavant/glint-template-types/compare/v0.1.6...v0.1.7) > 20 October 2022 -- footervaluePath optional [`#54`](https://github.com/Gavant/glint-template-types/pull/54) -- chore: release 0.1.7 [`72b88d5`](https://github.com/Gavant/glint-template-types/commit/72b88d5c97d447b3df7197f6d44d837fb3e0e407) +- footervaluePath optional [`#54`](https://github.com/Gavant/glint-template-types/pull/54) +- chore: release 0.1.7 [`72b88d5`](https://github.com/Gavant/glint-template-types/commit/72b88d5c97d447b3df7197f6d44d837fb3e0e407) #### [v0.1.6](https://github.com/Gavant/glint-template-types/compare/v0.1.5...v0.1.6) > 20 October 2022 -- Adding ember table types [`#53`](https://github.com/Gavant/glint-template-types/pull/53) -- chore: release 0.1.6 [`e4ce650`](https://github.com/Gavant/glint-template-types/commit/e4ce65039586ed65b657dd4ef4b4cfec91a906bb) -- Modifying row meta [`6fab6db`](https://github.com/Gavant/glint-template-types/commit/6fab6dbe2b657eefe884637bbec8dd2e7fc489ef) +- Adding ember table types [`#53`](https://github.com/Gavant/glint-template-types/pull/53) +- chore: release 0.1.6 [`e4ce650`](https://github.com/Gavant/glint-template-types/commit/e4ce65039586ed65b657dd4ef4b4cfec91a906bb) +- Modifying row meta [`6fab6db`](https://github.com/Gavant/glint-template-types/commit/6fab6dbe2b657eefe884637bbec8dd2e7fc489ef) #### [v0.1.5](https://github.com/Gavant/glint-template-types/compare/v0.1.4...v0.1.5) > 9 June 2022 -- chore: release 0.1.5 [`8fbf769`](https://github.com/Gavant/glint-template-types/commit/8fbf76925f08c4cfae63690410f72685b5250db3) -- Merge pull request #49 from Gavant/fl-select-fix [`ac68e3a`](https://github.com/Gavant/glint-template-types/commit/ac68e3a627d70f8ea319edf5ce51e7f9ce55b9d5) -- Fix changelog [`4de0889`](https://github.com/Gavant/glint-template-types/commit/4de08895e9eeed00b850a7b9cf52698d4dd5854d) +- chore: release 0.1.5 [`8fbf769`](https://github.com/Gavant/glint-template-types/commit/8fbf76925f08c4cfae63690410f72685b5250db3) +- Merge pull request #49 from Gavant/fl-select-fix [`ac68e3a`](https://github.com/Gavant/glint-template-types/commit/ac68e3a627d70f8ea319edf5ce51e7f9ce55b9d5) +- Fix changelog [`4de0889`](https://github.com/Gavant/glint-template-types/commit/4de08895e9eeed00b850a7b9cf52698d4dd5854d) #### [v0.1.4](https://github.com/Gavant/glint-template-types/compare/v0.1.3...v0.1.4) > 9 June 2022 -- chore: release 0.1.4 [`bdc1c1b`](https://github.com/Gavant/glint-template-types/commit/bdc1c1b164fcab78e6bfc81d67779097a3c1e027) -- Merge pull request #48 from Gavant/remove-base-signature [`c4c8a4d`](https://github.com/Gavant/glint-template-types/commit/c4c8a4df5a64fb87546807b9fcfbff05875c3394) -- Remove base signature as optional elements dont seem to agree with glint anymore [`51175f9`](https://github.com/Gavant/glint-template-types/commit/51175f921d507be6827fcae020c9132e73612b55) +- chore: release 0.1.4 [`bdc1c1b`](https://github.com/Gavant/glint-template-types/commit/bdc1c1b164fcab78e6bfc81d67779097a3c1e027) +- Merge pull request #48 from Gavant/remove-base-signature [`c4c8a4d`](https://github.com/Gavant/glint-template-types/commit/c4c8a4df5a64fb87546807b9fcfbff05875c3394) +- Remove base signature as optional elements dont seem to agree with glint anymore [`51175f9`](https://github.com/Gavant/glint-template-types/commit/51175f921d507be6827fcae020c9132e73612b55) #### [v0.1.3](https://github.com/Gavant/glint-template-types/compare/v0.1.2...v0.1.3) > 6 June 2022 -- chore: release 0.1.3 [`ce3dc17`](https://github.com/Gavant/glint-template-types/commit/ce3dc17fcf28440500761d889227567b11bf272b) -- Merge pull request #47 from Gavant/update-gavant-addons [`c7541b9`](https://github.com/Gavant/glint-template-types/commit/c7541b987408ae91dbfd3b81ed66b1c20427ef8d) -- Update gavant addons to newest [`bd4238e`](https://github.com/Gavant/glint-template-types/commit/bd4238ec8b1de3e065ce5900eb48eb983a609662) +- chore: release 0.1.3 [`ce3dc17`](https://github.com/Gavant/glint-template-types/commit/ce3dc17fcf28440500761d889227567b11bf272b) +- Merge pull request #47 from Gavant/update-gavant-addons [`c7541b9`](https://github.com/Gavant/glint-template-types/commit/c7541b987408ae91dbfd3b81ed66b1c20427ef8d) +- Update gavant addons to newest [`bd4238e`](https://github.com/Gavant/glint-template-types/commit/bd4238ec8b1de3e065ce5900eb48eb983a609662) #### [v0.1.2](https://github.com/Gavant/glint-template-types/compare/v0.1.1...v0.1.2) > 13 May 2022 -- fix form validator submit method + vertical-collection staticHeight arg [`#46`](https://github.com/Gavant/glint-template-types/pull/46) -- chore: release 0.1.2 [`5ef6bed`](https://github.com/Gavant/glint-template-types/commit/5ef6bed06302ea7f644e809ec6ddaea823a70154) -- run prettier on CHANGELOG [`435b417`](https://github.com/Gavant/glint-template-types/commit/435b4172dc8ea13343c7ce704e57e9314a903c7c) +- fix form validator submit method + vertical-collection staticHeight arg [`#46`](https://github.com/Gavant/glint-template-types/pull/46) +- chore: release 0.1.2 [`5ef6bed`](https://github.com/Gavant/glint-template-types/commit/5ef6bed06302ea7f644e809ec6ddaea823a70154) +- run prettier on CHANGELOG [`435b417`](https://github.com/Gavant/glint-template-types/commit/435b4172dc8ea13343c7ce704e57e9314a903c7c) #### [v0.1.1](https://github.com/Gavant/glint-template-types/compare/v0.1.0...v0.1.1) > 28 April 2022 -- Fix positional args and related issues [`#45`](https://github.com/Gavant/glint-template-types/pull/45) -- chore: release 0.1.1 [`cd845c0`](https://github.com/Gavant/glint-template-types/commit/cd845c0929b75991f279e9da27fb5d066c0df604) -- Run prettier on the CHANGELOG [`59754a8`](https://github.com/Gavant/glint-template-types/commit/59754a8dbcc61067149ba59cff82ec30225bb467) +- Fix positional args and related issues [`#45`](https://github.com/Gavant/glint-template-types/pull/45) +- chore: release 0.1.1 [`cd845c0`](https://github.com/Gavant/glint-template-types/commit/cd845c0929b75991f279e9da27fb5d066c0df604) +- Run prettier on the CHANGELOG [`59754a8`](https://github.com/Gavant/glint-template-types/commit/59754a8dbcc61067149ba59cff82ec30225bb467) #### [v0.1.0](https://github.com/Gavant/glint-template-types/compare/v0.0.21...v0.1.0) > 26 April 2022 -- Upgrade Glint [`#44`](https://github.com/Gavant/glint-template-types/pull/44) -- Run prettier [`#43`](https://github.com/Gavant/glint-template-types/pull/43) -- Upgrade to latest Glint [`f502697`](https://github.com/Gavant/glint-template-types/commit/f50269737ba15c245868689c840b8b5dc744bd98) -- chore: release 0.1.0 [`89ef479`](https://github.com/Gavant/glint-template-types/commit/89ef479b6704a17fc8c576f270a1440799687d04) +- Upgrade Glint [`#44`](https://github.com/Gavant/glint-template-types/pull/44) +- Run prettier [`#43`](https://github.com/Gavant/glint-template-types/pull/43) +- Upgrade to latest Glint [`f502697`](https://github.com/Gavant/glint-template-types/commit/f50269737ba15c245868689c840b8b5dc744bd98) +- chore: release 0.1.0 [`89ef479`](https://github.com/Gavant/glint-template-types/commit/89ef479b6704a17fc8c576f270a1440799687d04) #### [v0.0.21](https://github.com/Gavant/glint-template-types/compare/v0.0.20...v0.0.21) > 26 October 2021 -- Bump gavant ember table [`#42`](https://github.com/Gavant/glint-template-types/pull/42) -- chore: release 0.0.21 [`870f56c`](https://github.com/Gavant/glint-template-types/commit/870f56c527bdfb2882b43b59baa93ffefe999c33) +- Bump gavant ember table [`#42`](https://github.com/Gavant/glint-template-types/pull/42) +- chore: release 0.0.21 [`870f56c`](https://github.com/Gavant/glint-template-types/commit/870f56c527bdfb2882b43b59baa93ffefe999c33) #### [v0.0.20](https://github.com/Gavant/glint-template-types/compare/v0.0.19...v0.0.20) > 13 October 2021 -- Adding power select types [`#41`](https://github.com/Gavant/glint-template-types/pull/41) -- animated-each yields the item and the item's index [`#38`](https://github.com/Gavant/glint-template-types/pull/38) -- Type cleanup [`e0e97d7`](https://github.com/Gavant/glint-template-types/commit/e0e97d7b33013a5990ccacf22046ec5365643ee0) -- Making power select api readonly [`b5bf13a`](https://github.com/Gavant/glint-template-types/commit/b5bf13a68f31412986bf6829f7104a7c218745f9) -- chore: release 0.0.20 [`46d97b8`](https://github.com/Gavant/glint-template-types/commit/46d97b89c0463db79f1f1c7584cb5db9d7cbfd5a) +- Adding power select types [`#41`](https://github.com/Gavant/glint-template-types/pull/41) +- animated-each yields the item and the item's index [`#38`](https://github.com/Gavant/glint-template-types/pull/38) +- Type cleanup [`e0e97d7`](https://github.com/Gavant/glint-template-types/commit/e0e97d7b33013a5990ccacf22046ec5365643ee0) +- Making power select api readonly [`b5bf13a`](https://github.com/Gavant/glint-template-types/commit/b5bf13a68f31412986bf6829f7104a7c218745f9) +- chore: release 0.0.20 [`46d97b8`](https://github.com/Gavant/glint-template-types/commit/46d97b89c0463db79f1f1c7584cb5db9d7cbfd5a) #### [v0.0.19](https://github.com/Gavant/glint-template-types/compare/v0.0.18...v0.0.19) > 2 August 2021 -- add ember-power-select initial work [`#40`](https://github.com/Gavant/glint-template-types/pull/40) -- add gavant ember PS infinity [`0a574f1`](https://github.com/Gavant/glint-template-types/commit/0a574f1f4515b62403b0d14e66da79d491eaa30f) -- fix types [`972dbae`](https://github.com/Gavant/glint-template-types/commit/972dbae796000fbe96819bd44d67b02a3c870199) -- MR updates [`bb0a8ce`](https://github.com/Gavant/glint-template-types/commit/bb0a8ce7087217bcb180f6364e1a9e05caafcd16) +- add ember-power-select initial work [`#40`](https://github.com/Gavant/glint-template-types/pull/40) +- add gavant ember PS infinity [`0a574f1`](https://github.com/Gavant/glint-template-types/commit/0a574f1f4515b62403b0d14e66da79d491eaa30f) +- fix types [`972dbae`](https://github.com/Gavant/glint-template-types/commit/972dbae796000fbe96819bd44d67b02a3c870199) +- MR updates [`bb0a8ce`](https://github.com/Gavant/glint-template-types/commit/bb0a8ce7087217bcb180f6364e1a9e05caafcd16) #### [v0.0.18](https://github.com/Gavant/glint-template-types/compare/v0.0.17...v0.0.18) > 8 July 2021 -- Update types for gavant table [`#39`](https://github.com/Gavant/glint-template-types/pull/39) -- chore: release 0.0.18 [`19a9579`](https://github.com/Gavant/glint-template-types/commit/19a95791e6eaf90cc6f7814370813953786d6022) +- Update types for gavant table [`#39`](https://github.com/Gavant/glint-template-types/pull/39) +- chore: release 0.0.18 [`19a9579`](https://github.com/Gavant/glint-template-types/commit/19a95791e6eaf90cc6f7814370813953786d6022) #### [v0.0.17](https://github.com/Gavant/glint-template-types/compare/v0.0.16...v0.0.17) > 16 June 2021 -- add interface for form validator yielded hash [`#37`](https://github.com/Gavant/glint-template-types/pull/37) -- chore: release 0.0.17 [`03350f7`](https://github.com/Gavant/glint-template-types/commit/03350f72651a89660e9e0d15be01917f370de07c) +- add interface for form validator yielded hash [`#37`](https://github.com/Gavant/glint-template-types/pull/37) +- chore: release 0.0.17 [`03350f7`](https://github.com/Gavant/glint-template-types/commit/03350f72651a89660e9e0d15be01917f370de07c) #### [v0.0.16](https://github.com/Gavant/glint-template-types/compare/v0.0.15...v0.0.16) > 20 May 2021 -- Adding index to vertical collection [`#36`](https://github.com/Gavant/glint-template-types/pull/36) -- chore: release 0.0.16 [`6726a85`](https://github.com/Gavant/glint-template-types/commit/6726a8553053082f7b609698e7768865ea48b55d) +- Adding index to vertical collection [`#36`](https://github.com/Gavant/glint-template-types/pull/36) +- chore: release 0.0.16 [`6726a85`](https://github.com/Gavant/glint-template-types/commit/6726a8553053082f7b609698e7768865ea48b55d) #### [v0.0.15](https://github.com/Gavant/glint-template-types/compare/v0.0.14...v0.0.15) > 10 May 2021 -- Add repository to package.json [`#34`](https://github.com/Gavant/glint-template-types/pull/34) -- Adding in types for gavant-ember-table [`#33`](https://github.com/Gavant/glint-template-types/pull/33) -- Upgrade to latest table [`8085b4e`](https://github.com/Gavant/glint-template-types/commit/8085b4eac19d79e6748e357a9dfbb5c9e875af24) -- chore: release 0.0.15 [`5a2eb05`](https://github.com/Gavant/glint-template-types/commit/5a2eb0518139a9f4f4073cec90ecc09267743f1a) -- Upgrade types to latest table [`bd285da`](https://github.com/Gavant/glint-template-types/commit/bd285dacb2e68c10d93022c276cf841f5afaae82) +- Add repository to package.json [`#34`](https://github.com/Gavant/glint-template-types/pull/34) +- Adding in types for gavant-ember-table [`#33`](https://github.com/Gavant/glint-template-types/pull/33) +- Upgrade to latest table [`8085b4e`](https://github.com/Gavant/glint-template-types/commit/8085b4eac19d79e6748e357a9dfbb5c9e875af24) +- chore: release 0.0.15 [`5a2eb05`](https://github.com/Gavant/glint-template-types/commit/5a2eb0518139a9f4f4073cec90ecc09267743f1a) +- Upgrade types to latest table [`bd285da`](https://github.com/Gavant/glint-template-types/commit/bd285dacb2e68c10d93022c276cf841f5afaae82) #### [v0.0.14](https://github.com/Gavant/glint-template-types/compare/v0.0.13...v0.0.14) > 3 May 2021 -- Fixing element case [`#32`](https://github.com/Gavant/glint-template-types/pull/32) -- chore: release 0.0.14 [`9e009d9`](https://github.com/Gavant/glint-template-types/commit/9e009d922252b7797609ab5755248544d2900cd1) +- Fixing element case [`#32`](https://github.com/Gavant/glint-template-types/pull/32) +- chore: release 0.0.14 [`9e009d9`](https://github.com/Gavant/glint-template-types/commit/9e009d922252b7797609ab5755248544d2900cd1) #### [v0.0.13](https://github.com/Gavant/glint-template-types/compare/v0.0.12...v0.0.13) > 3 May 2021 -- Fixing gavant ember validation Element types [`#31`](https://github.com/Gavant/glint-template-types/pull/31) -- Add ember content placeholder types [`#30`](https://github.com/Gavant/glint-template-types/pull/30) -- Removing error log [`e0fd42d`](https://github.com/Gavant/glint-template-types/commit/e0fd42de531b8524f5c201d8bb2d9f1ad51e37ac) -- chore: release 0.0.13 [`da03c1f`](https://github.com/Gavant/glint-template-types/commit/da03c1f6bb465e41856ce37ef4b7b14637464d67) -- Fixing changeset input type [`79fff63`](https://github.com/Gavant/glint-template-types/commit/79fff63035e895c9cb0e4da24b68c2b095e7a484) +- Fixing gavant ember validation Element types [`#31`](https://github.com/Gavant/glint-template-types/pull/31) +- Add ember content placeholder types [`#30`](https://github.com/Gavant/glint-template-types/pull/30) +- Removing error log [`e0fd42d`](https://github.com/Gavant/glint-template-types/commit/e0fd42de531b8524f5c201d8bb2d9f1ad51e37ac) +- chore: release 0.0.13 [`da03c1f`](https://github.com/Gavant/glint-template-types/commit/da03c1f6bb465e41856ce37ef4b7b14637464d67) +- Fixing changeset input type [`79fff63`](https://github.com/Gavant/glint-template-types/commit/79fff63035e895c9cb0e4da24b68c2b095e7a484) #### [v0.0.12](https://github.com/Gavant/glint-template-types/compare/v0.0.11...v0.0.12) > 29 April 2021 -- Add ember responsive types [`#27`](https://github.com/Gavant/glint-template-types/pull/27) -- Add CI [`#29`](https://github.com/Gavant/glint-template-types/pull/29) -- Add types for ember-click-outside [`#26`](https://github.com/Gavant/glint-template-types/pull/26) -- Add missing types for dev [`fd31254`](https://github.com/Gavant/glint-template-types/commit/fd31254df5e8c5ccf41eb7a1148cfd636f86ed1f) -- Add support for dynamic element for animated-container [`6c095c1`](https://github.com/Gavant/glint-template-types/commit/6c095c18669cdcd4d4af35ae36d71d45fd53f835) -- chore: release 0.0.12 [`ebcdd0d`](https://github.com/Gavant/glint-template-types/commit/ebcdd0d84acc4b69b08c861135081ad0b02b2b2d) +- Add ember responsive types [`#27`](https://github.com/Gavant/glint-template-types/pull/27) +- Add CI [`#29`](https://github.com/Gavant/glint-template-types/pull/29) +- Add types for ember-click-outside [`#26`](https://github.com/Gavant/glint-template-types/pull/26) +- Add missing types for dev [`fd31254`](https://github.com/Gavant/glint-template-types/commit/fd31254df5e8c5ccf41eb7a1148cfd636f86ed1f) +- Add support for dynamic element for animated-container [`6c095c1`](https://github.com/Gavant/glint-template-types/commit/6c095c18669cdcd4d4af35ae36d71d45fd53f835) +- chore: release 0.0.12 [`ebcdd0d`](https://github.com/Gavant/glint-template-types/commit/ebcdd0d84acc4b69b08c861135081ad0b02b2b2d) #### [v0.0.11](https://github.com/Gavant/glint-template-types/compare/v0.0.10...v0.0.11) > 23 April 2021 -- fix validated changeset errors type [`#25`](https://github.com/Gavant/glint-template-types/pull/25) -- chore: release 0.0.11 [`f037efc`](https://github.com/Gavant/glint-template-types/commit/f037efc1690fb07fc526ff70645f09fefc7915c7) +- fix validated changeset errors type [`#25`](https://github.com/Gavant/glint-template-types/pull/25) +- chore: release 0.0.11 [`f037efc`](https://github.com/Gavant/glint-template-types/commit/f037efc1690fb07fc526ff70645f09fefc7915c7) #### [v0.0.10](https://github.com/Gavant/glint-template-types/compare/v0.0.9...v0.0.10) > 22 April 2021 -- Standardize component names [`#24`](https://github.com/Gavant/glint-template-types/pull/24) -- add fl components, start form validator [`#22`](https://github.com/Gavant/glint-template-types/pull/22) -- Adding vertical collection [`#23`](https://github.com/Gavant/glint-template-types/pull/23) -- fix fl args, add form-validators [`0aff3d3`](https://github.com/Gavant/glint-template-types/commit/0aff3d361e239702d07ae94d5fd773a33d828f28) -- PR updates [`bea1ce4`](https://github.com/Gavant/glint-template-types/commit/bea1ce4efdc635d59e5bb77664ff47d064171916) -- form validator types [`7729339`](https://github.com/Gavant/glint-template-types/commit/7729339852033be2e68ad1a95328809a0eed25d2) +- Standardize component names [`#24`](https://github.com/Gavant/glint-template-types/pull/24) +- add fl components, start form validator [`#22`](https://github.com/Gavant/glint-template-types/pull/22) +- Adding vertical collection [`#23`](https://github.com/Gavant/glint-template-types/pull/23) +- fix fl args, add form-validators [`0aff3d3`](https://github.com/Gavant/glint-template-types/commit/0aff3d361e239702d07ae94d5fd773a33d828f28) +- PR updates [`bea1ce4`](https://github.com/Gavant/glint-template-types/commit/bea1ce4efdc635d59e5bb77664ff47d064171916) +- form validator types [`7729339`](https://github.com/Gavant/glint-template-types/commit/7729339852033be2e68ad1a95328809a0eed25d2) #### [v0.0.9](https://github.com/Gavant/glint-template-types/compare/v0.0.8...v0.0.9) > 22 April 2021 -- Fixing params by making them optional [`#21`](https://github.com/Gavant/glint-template-types/pull/21) -- Correctly configure optional args for ember-cli-showdown [`#20`](https://github.com/Gavant/glint-template-types/pull/20) -- Allow id for ember-attacher components [`#19`](https://github.com/Gavant/glint-template-types/pull/19) -- chore: release 0.0.9 [`6d5f4d0`](https://github.com/Gavant/glint-template-types/commit/6d5f4d0567c0a0bdd30c77e07c38287ace6f9559) +- Fixing params by making them optional [`#21`](https://github.com/Gavant/glint-template-types/pull/21) +- Correctly configure optional args for ember-cli-showdown [`#20`](https://github.com/Gavant/glint-template-types/pull/20) +- Allow id for ember-attacher components [`#19`](https://github.com/Gavant/glint-template-types/pull/19) +- chore: release 0.0.9 [`6d5f4d0`](https://github.com/Gavant/glint-template-types/commit/6d5f4d0567c0a0bdd30c77e07c38287ace6f9559) #### [v0.0.8](https://github.com/Gavant/glint-template-types/compare/v0.0.7...v0.0.8) > 21 April 2021 -- Add ember-svg-jar [`#18`](https://github.com/Gavant/glint-template-types/pull/18) -- Ember concurrency [`#17`](https://github.com/Gavant/glint-template-types/pull/17) -- Add ember-cli-showdown [`#13`](https://github.com/Gavant/glint-template-types/pull/13) -- Add ember burger menu types [`#15`](https://github.com/Gavant/glint-template-types/pull/15) -- Move support files to -private [`#16`](https://github.com/Gavant/glint-template-types/pull/16) -- Add ember-on-helper [`#14`](https://github.com/Gavant/glint-template-types/pull/14) -- Add types for ember-cli-clipboard [`#12`](https://github.com/Gavant/glint-template-types/pull/12) -- Add ember-async-await-helper [`#10`](https://github.com/Gavant/glint-template-types/pull/10) -- Add ember-animated types [`#5`](https://github.com/Gavant/glint-template-types/pull/5) -- Add ember-attacher [`#11`](https://github.com/Gavant/glint-template-types/pull/11) -- Add ember-truth-helpers [`#7`](https://github.com/Gavant/glint-template-types/pull/7) -- Standardize imports [`#9`](https://github.com/Gavant/glint-template-types/pull/9) -- Support both named and default exports for ember-render-modifiers [`#8`](https://github.com/Gavant/glint-template-types/pull/8) -- Improve ember-render-modifiers and add will-destroy [`#4`](https://github.com/Gavant/glint-template-types/pull/4) -- Modal dialogs [`#3`](https://github.com/Gavant/glint-template-types/pull/3) -- Adding in ember-modal-dialog and our modal dialog wrapper [`753466b`](https://github.com/Gavant/glint-template-types/commit/753466bfa33b59ae3be7e667e4207e88632414fb) -- add bm types [`237b99c`](https://github.com/Gavant/glint-template-types/commit/237b99cee6156332ee65889d6293b025e5311675) -- Add ember-concurrency [`433ce0e`](https://github.com/Gavant/glint-template-types/commit/433ce0e23034a9cbd6d9dfc06a23443c114bc610) +- Add ember-svg-jar [`#18`](https://github.com/Gavant/glint-template-types/pull/18) +- Ember concurrency [`#17`](https://github.com/Gavant/glint-template-types/pull/17) +- Add ember-cli-showdown [`#13`](https://github.com/Gavant/glint-template-types/pull/13) +- Add ember burger menu types [`#15`](https://github.com/Gavant/glint-template-types/pull/15) +- Move support files to -private [`#16`](https://github.com/Gavant/glint-template-types/pull/16) +- Add ember-on-helper [`#14`](https://github.com/Gavant/glint-template-types/pull/14) +- Add types for ember-cli-clipboard [`#12`](https://github.com/Gavant/glint-template-types/pull/12) +- Add ember-async-await-helper [`#10`](https://github.com/Gavant/glint-template-types/pull/10) +- Add ember-animated types [`#5`](https://github.com/Gavant/glint-template-types/pull/5) +- Add ember-attacher [`#11`](https://github.com/Gavant/glint-template-types/pull/11) +- Add ember-truth-helpers [`#7`](https://github.com/Gavant/glint-template-types/pull/7) +- Standardize imports [`#9`](https://github.com/Gavant/glint-template-types/pull/9) +- Support both named and default exports for ember-render-modifiers [`#8`](https://github.com/Gavant/glint-template-types/pull/8) +- Improve ember-render-modifiers and add will-destroy [`#4`](https://github.com/Gavant/glint-template-types/pull/4) +- Modal dialogs [`#3`](https://github.com/Gavant/glint-template-types/pull/3) +- Adding in ember-modal-dialog and our modal dialog wrapper [`753466b`](https://github.com/Gavant/glint-template-types/commit/753466bfa33b59ae3be7e667e4207e88632414fb) +- add bm types [`237b99c`](https://github.com/Gavant/glint-template-types/commit/237b99cee6156332ee65889d6293b025e5311675) +- Add ember-concurrency [`433ce0e`](https://github.com/Gavant/glint-template-types/commit/433ce0e23034a9cbd6d9dfc06a23443c114bc610) #### [v0.0.7](https://github.com/Gavant/glint-template-types/compare/v0.0.6...v0.0.7) > 16 April 2021 -- Add @gavant/ember-button-basic, @gavant/ember-button-spinner, @gavant… [`#2`](https://github.com/Gavant/glint-template-types/pull/2) -- Add @gavant/ember-button-basic, @gavant/ember-button-spinner, @gavant/ember-bootstrap-dropdown, ember-basic-dropdown, and ember-intl translation helper [`2f74964`](https://github.com/Gavant/glint-template-types/commit/2f7496456cea6134ece56904f7b176a6f34f9caf) -- Update readme [`6a9890f`](https://github.com/Gavant/glint-template-types/commit/6a9890f142efec4b4288ec8eb11d4ea6dc2b1879) -- chore: release 0.0.7 [`9c48619`](https://github.com/Gavant/glint-template-types/commit/9c48619b06ddc0cdee8d5622b6fbe2e9b36cf7ec) +- Add @gavant/ember-button-basic, @gavant/ember-button-spinner, @gavant… [`#2`](https://github.com/Gavant/glint-template-types/pull/2) +- Add @gavant/ember-button-basic, @gavant/ember-button-spinner, @gavant/ember-bootstrap-dropdown, ember-basic-dropdown, and ember-intl translation helper [`2f74964`](https://github.com/Gavant/glint-template-types/commit/2f7496456cea6134ece56904f7b176a6f34f9caf) +- Update readme [`6a9890f`](https://github.com/Gavant/glint-template-types/commit/6a9890f142efec4b4288ec8eb11d4ea6dc2b1879) +- chore: release 0.0.7 [`9c48619`](https://github.com/Gavant/glint-template-types/commit/9c48619b06ddc0cdee8d5622b6fbe2e9b36cf7ec) #### [v0.0.6](https://github.com/Gavant/glint-template-types/compare/v0.0.5...v0.0.6) > 14 April 2021 -- Adding FaIcon class [`#1`](https://github.com/Gavant/glint-template-types/pull/1) -- Update README.md [`a577e05`](https://github.com/Gavant/glint-template-types/commit/a577e0573e80a5808a628621aacd9b87ec8ad87c) -- chore: release 0.0.6 [`b15bfbd`](https://github.com/Gavant/glint-template-types/commit/b15bfbdecdb7910d47bf86ed53c3a35ebc6c66b4) -- Adding alternate version [`cc91036`](https://github.com/Gavant/glint-template-types/commit/cc9103602407c1c7abd7928efd0e75a0a2a20f8a) +- Adding FaIcon class [`#1`](https://github.com/Gavant/glint-template-types/pull/1) +- Update README.md [`a577e05`](https://github.com/Gavant/glint-template-types/commit/a577e0573e80a5808a628621aacd9b87ec8ad87c) +- chore: release 0.0.6 [`b15bfbd`](https://github.com/Gavant/glint-template-types/commit/b15bfbdecdb7910d47bf86ed53c3a35ebc6c66b4) +- Adding alternate version [`cc91036`](https://github.com/Gavant/glint-template-types/commit/cc9103602407c1c7abd7928efd0e75a0a2a20f8a) #### [v0.0.5](https://github.com/Gavant/glint-template-types/compare/v0.0.4...v0.0.5) > 14 April 2021 -- Work on getting types to autocomplete [`979ac87`](https://github.com/Gavant/glint-template-types/commit/979ac8756f33c7a3aab8aa2b3ef403c16270f298) -- chore: release 0.0.5 [`c3d93ee`](https://github.com/Gavant/glint-template-types/commit/c3d93ee20a6f44f214566fd6e1d8619f69f5947e) +- Work on getting types to autocomplete [`979ac87`](https://github.com/Gavant/glint-template-types/commit/979ac8756f33c7a3aab8aa2b3ef403c16270f298) +- chore: release 0.0.5 [`c3d93ee`](https://github.com/Gavant/glint-template-types/commit/c3d93ee20a6f44f214566fd6e1d8619f69f5947e) #### [v0.0.4](https://github.com/Gavant/glint-template-types/compare/v0.0.3...v0.0.4) > 14 April 2021 -- Getting the types to automatically work [`edbd69e`](https://github.com/Gavant/glint-template-types/commit/edbd69ee0e7df03fc07dd3982f62fcf3146d75bd) -- chore: release 0.0.4 [`ee79688`](https://github.com/Gavant/glint-template-types/commit/ee79688e9498fd034cc7e9b4b2e450338f3b6619) +- Getting the types to automatically work [`edbd69e`](https://github.com/Gavant/glint-template-types/commit/edbd69ee0e7df03fc07dd3982f62fcf3146d75bd) +- chore: release 0.0.4 [`ee79688`](https://github.com/Gavant/glint-template-types/commit/ee79688e9498fd034cc7e9b4b2e450338f3b6619) #### [v0.0.3](https://github.com/Gavant/glint-template-types/compare/v0.0.2...v0.0.3) > 14 April 2021 -- chore: release 0.0.3 [`ca5cf10`](https://github.com/Gavant/glint-template-types/commit/ca5cf109fa4cdc78ef90955ea4cb235054067aac) -- Move index declaration file [`440d69c`](https://github.com/Gavant/glint-template-types/commit/440d69c0bdd98bb36783cbde09373b290ccfe77c) +- chore: release 0.0.3 [`ca5cf10`](https://github.com/Gavant/glint-template-types/commit/ca5cf109fa4cdc78ef90955ea4cb235054067aac) +- Move index declaration file [`440d69c`](https://github.com/Gavant/glint-template-types/commit/440d69c0bdd98bb36783cbde09373b290ccfe77c) #### [v0.0.2](https://github.com/Gavant/glint-template-types/compare/v0.0.1...v0.0.2) > 14 April 2021 -- chore: release 0.0.2 [`e4e8c5e`](https://github.com/Gavant/glint-template-types/commit/e4e8c5e478c72042b41a3e546b7b9ac59c40fffb) -- Updating name of ember-render-modifier [`da7d575`](https://github.com/Gavant/glint-template-types/commit/da7d575adf8878e2e3461faec2d234f72163937c) +- chore: release 0.0.2 [`e4e8c5e`](https://github.com/Gavant/glint-template-types/commit/e4e8c5e478c72042b41a3e546b7b9ac59c40fffb) +- Updating name of ember-render-modifier [`da7d575`](https://github.com/Gavant/glint-template-types/commit/da7d575adf8878e2e3461faec2d234f72163937c) #### v0.0.1 > 14 April 2021 -- Adding in prettier and start of readme [`a44a600`](https://github.com/Gavant/glint-template-types/commit/a44a60013e4fc19e018c8f7c7b21086268cdb3ef) -- Initial commit [`3c4b460`](https://github.com/Gavant/glint-template-types/commit/3c4b460957abc9dd9170283896c9cbaa1351bfa5) -- Adding release it config [`2276baa`](https://github.com/Gavant/glint-template-types/commit/2276baae3f383921cd07809b7271ce16d4428008) +- Adding in prettier and start of readme [`a44a600`](https://github.com/Gavant/glint-template-types/commit/a44a60013e4fc19e018c8f7c7b21086268cdb3ef) +- Initial commit [`3c4b460`](https://github.com/Gavant/glint-template-types/commit/3c4b460957abc9dd9170283896c9cbaa1351bfa5) +- Adding release it config [`2276baa`](https://github.com/Gavant/glint-template-types/commit/2276baae3f383921cd07809b7271ce16d4428008) diff --git a/package.json b/package.json index df10e39..d16380a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/ember__template": "^4.0.0", "auto-changelog": "^2.4.0", "ember-animated": "^1.0.0", - "ember-basic-dropdown": "^6.0.0", + "ember-basic-dropdown": "^6.0.1", "ember-concurrency": "^2.0.3", "ember-concurrency-async": "^1.0.0", "ember-concurrency-ts": "^0.3.0", diff --git a/types/@gavant/ember-power-select-infinity/options.d.ts b/types/@gavant/ember-power-select-infinity/options.d.ts deleted file mode 100644 index 867d814..0000000 --- a/types/@gavant/ember-power-select-infinity/options.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Options from 'ember-power-select/addon/components/power-select/options'; - -export default class PowerSelectInfinityOptions extends Options {} - -declare module '@glint/environment-ember-loose/registry' { - export default interface Registry { - PowerSelectInfinityOptions: typeof PowerSelectInfinityOptions; - } -} diff --git a/types/@gavant/ember-power-select-infinity/power-select-infinity.d.ts b/types/@gavant/ember-power-select-infinity/power-select-infinity.d.ts deleted file mode 100644 index c96a6f3..0000000 --- a/types/@gavant/ember-power-select-infinity/power-select-infinity.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -import Component from '@ember/component'; -import { Select } from 'ember-power-select/addon/components/power-select'; - -import { PowerSelectArgs } from '@gavant/glint-template-types/types/ember-power-select/power-select'; - -export interface PowerSelectInfinityArgs extends PowerSelectArgs { - beforeOptionsComponent?: string; - /** - * Used by ember-vertical-collection for occlusion rendering. - * - * @type {number} - * @argument bufferSize - */ - bufferSize?: number; - /** - * Allow/disallow loading of more options when scrolling. - * - * @type {boolean} - * @argument canLoadMore - */ - canLoadMore: boolean; - /** - * Method used to clear the options. - * - * This should be passed in when using `triggerIsSearch` - * - * @type {() => any} - * @argument clearOptions - */ - clearOptions?: () => any; - /** - * Whether to clear the search text on blur or not. - * - * Defaults to `true` when `triggerIsSearch` is `true`. - * - * @type {boolean} - * @argument clearSearchOnBlur - */ - clearSearchOnBlur?: boolean; - /** - * The class for the dropdown options - * - * @type {string} - * @argument dropdownClass - */ - dropdownClass?: string; - /** - * Used by ember-vertical-collection for occlusion rendering. - * - * @type {number} - * @argument estimateHeight - */ - estimateHeight?: number; - /** - * The method invoked when `canLoadMore` is true and - * the bottom of the list is reached. - * - * @type {(keyword: string | null) => T[]} - * @argument loadMore - */ - loadMore: (keyword: string | null) => Promise; - /** - * The message shown when no options are returned. - * - * @type {string} - * @argument noMatchesMessage - */ - noMatchesMessage?: string; - /** - * The method invoked onBlur - * - * @type {(select: Select, event: FocusEvent) => void} - * @argument onBlur - */ - onBlur?: (select: Select, event: FocusEvent) => void; - /** - * The options displayed in the dropdown - * - * @type {T[]} - * @argument options - */ - options: T[]; - /** - * The method invoked when searching. - * - * @type {(keyword: string | null) => T[]} - * @argument search - * - */ - search: (keyword: string | null) => Promise; - /** - * The delay for invoking the `@search` method - * when typing. - * - * @type {number} - * @argument searchDebounceDelay - */ - searchDebounceDelay?: number; - /** - * Used by ember-vertical-collection for occlusion rendering. - * - * @type {boolean} - * @argument staticHeight - */ - staticHeight?: boolean; - /** - * The trigger-component for the power-select - * - * @type {string} - * @argument triggerComponent - */ - triggerComponent?: string; - /** - * Toggles the search being within the dropdown trigger. - * - * @type {boolean} - * @argument triggerIsSearch - */ - triggerIsSearch?: boolean; - /** - * Determines whether the search box renders inside the options or not. - */ - searchBelow?: boolean; -} - -export interface PowerSelectInfinitySignature { - Args: PowerSelectInfinityArgs; - Blocks: { - default?: [T, Select]; - }; - Element: HTMLDivElement; -} - -export default class PowerSelectInfinity extends Component> {} diff --git a/types/@gavant/ember-power-select-infinity/power-select-infinity/for-model.d.ts b/types/@gavant/ember-power-select-infinity/power-select-infinity/for-model.d.ts deleted file mode 100644 index 7a9465a..0000000 --- a/types/@gavant/ember-power-select-infinity/power-select-infinity/for-model.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import Component from '@ember/component'; -import { Select } from 'ember-power-select/addon/components/power-select'; - -import { PowerSelectInfinityArgs } from '@gavant/glint-template-types/types/@gavant/ember-power-select-infinity/power-select-infinity'; - -export interface PowerSelectInfinityForModelArgs extends PowerSelectInfinityArgs { - /** - * An object containing additional query filters. - * - * @type {{ [x: string]: any }} - * @argument filters - */ - filters?: { [x: string]: any }; - /** - * The name of the ember-data model to query. - * - * @type {string} - * @argument modelName - */ - modelName: string; - /** - * The limit used for queries - * - * @type {number} - * @argument pageSize [25] - */ - pageSize?: number; - /** - * The method used to process the query params - * - * @type {(...args: any[]) => { [x: string]: any }} - * @argument processQueryParams - */ - processQueryParams?: (...args: any[]) => { [x: string]: any }; - /** - * The query-param used for string searches - * - * @type {string} - * @argument searchParamKey [keyword] - */ - searchParamKey?: string; - /** - * Whether or not to use the string search parameter. - * - * @type {boolean} - * @argument useSearchParamFilter [true] - */ - useSearchParamFilter?: boolean; - /** - * Whether or not the dropdown options are loaded on component render - * - * @type {boolean} - */ - loadOptionsOnRender?: boolean; - /** - * A string array for requesting included models when using - * JSON api - * @type {string[]} - */ - include?: string[]; -} - -export interface PowerSelectInfinityForModelSignature { - Args: PowerSelectInfinityForModelArgs; - Blocks: { - default?: [T, Select]; - }; - Element: HTMLDivElement; -} - -export default class PowerSelectInfinityForModel extends Component> {} diff --git a/types/ember-basic-dropdown/content.d.ts b/types/ember-basic-dropdown/components/basic-dropdown-content.d.ts similarity index 68% rename from types/ember-basic-dropdown/content.d.ts rename to types/ember-basic-dropdown/components/basic-dropdown-content.d.ts index e4cabff..e9b6fc0 100644 --- a/types/ember-basic-dropdown/content.d.ts +++ b/types/ember-basic-dropdown/components/basic-dropdown-content.d.ts @@ -1,16 +1,14 @@ import Component from '@glimmer/component'; -import { Dropdown } from 'ember-basic-dropdown/addon/components/basic-dropdown'; +import { Dropdown, RepositionChanges } from './basic-dropdown'; -export interface DropdownContentArgs { +interface Args { transitioningInClass?: string; transitionedInClass?: string; transitioningOutClass?: string; isTouchDevice?: boolean; destination: string; dropdown: Dropdown; - hPosition: string; - vPosition: string; renderInPlace: boolean; preventScroll?: boolean; rootEventType: 'click' | 'mousedown'; @@ -24,16 +22,18 @@ export interface DropdownContentArgs { onFocusOut?: (dropdown?: Dropdown, event?: FocusEvent) => void; onMouseEnter?: (dropdown?: Dropdown, event?: MouseEvent) => void; onMouseLeave?: (dropdown?: Dropdown, event?: MouseEvent) => void; - shouldReposition?: (mutations: MutationRecord[], dropdown: Dropdown) => boolean; + shouldReposition: (mutations: MutationRecord[], dropdown: Dropdown) => boolean; + hPosition: RepositionChanges['hPosition']; + vPosition: RepositionChanges['vPosition']; } +type RootMouseDownHandler = (ev: MouseEvent | TouchEvent) => void; export interface DropdownContentSignature { Element: HTMLElement; - Args: DropdownContentArgs; + Args: Args; Blocks: { default?: []; }; } -export class DropdownContent extends Component {} -export default DropdownContent; +export default class BasicDropdownContent extends Component {} diff --git a/types/ember-basic-dropdown/trigger.d.ts b/types/ember-basic-dropdown/components/basic-dropdown-trigger.d.ts similarity index 74% rename from types/ember-basic-dropdown/trigger.d.ts rename to types/ember-basic-dropdown/components/basic-dropdown-trigger.d.ts index 100ca3d..52b9736 100644 --- a/types/ember-basic-dropdown/trigger.d.ts +++ b/types/ember-basic-dropdown/components/basic-dropdown-trigger.d.ts @@ -1,15 +1,11 @@ import Component from '@glimmer/component'; -import { Dropdown } from 'ember-basic-dropdown/addon/components/basic-dropdown'; +import { Dropdown, RepositionChanges } from './basic-dropdown'; -export interface DropdownTriggerArgs { +interface Args { dropdown: Dropdown; eventType: 'click' | 'mousedown'; stopPropagation: boolean; - hPosition: string; - renderInPlace: boolean; - vPosition: string; - htmlTag?: string; onBlur?: (dropdown?: Dropdown, event?: FocusEvent) => void; onClick?: (dropdown?: Dropdown, event?: MouseEvent) => void; onFocus?: (dropdown?: Dropdown, event?: FocusEvent) => void; @@ -20,15 +16,17 @@ export interface DropdownTriggerArgs { onMouseEnter?: (dropdown?: Dropdown, event?: MouseEvent) => void; onMouseLeave?: (dropdown?: Dropdown, event?: MouseEvent) => void; onTouchEnd?: (dropdown?: Dropdown, event?: TouchEvent) => void; + hPosition: RepositionChanges['hPosition']; + vPosition: RepositionChanges['vPosition']; + renderInPlace: boolean; } export interface DropdownTriggerSignature { Element: HTMLElement; - Args: DropdownTriggerArgs; + Args: Args; Blocks: { default: []; }; } -export class DropdownTrigger extends Component {} -export default DropdownTrigger; +export default class BasicDropdownTrigger extends Component {} diff --git a/types/ember-basic-dropdown/dropdown.d.ts b/types/ember-basic-dropdown/components/basic-dropdown.d.ts similarity index 60% rename from types/ember-basic-dropdown/dropdown.d.ts rename to types/ember-basic-dropdown/components/basic-dropdown.d.ts index 9bc7f65..a7d4445 100644 --- a/types/ember-basic-dropdown/dropdown.d.ts +++ b/types/ember-basic-dropdown/components/basic-dropdown.d.ts @@ -1,14 +1,26 @@ +import { action } from '@ember/object'; import Component from '@glimmer/component'; -import { DropdownActions } from 'ember-basic-dropdown/addon/components/basic-dropdown'; -import { CalculatePosition } from 'ember-basic-dropdown/addon/utils/calculate-position'; +import { WithBoundArgs } from '@glint/template'; -import { DropdownContent } from '@gavant/glint-template-types/types/ember-basic-dropdown/content'; -import { DropdownTrigger } from '@gavant/glint-template-types/types/ember-basic-dropdown/trigger'; +import { CalculatePosition } from '../utils/calculate-position'; +import DropdownContent from './basic-dropdown-content'; +import DropdownTrigger from './basic-dropdown-trigger'; -import { WithBoundArgs } from '@glint/template'; +export interface DropdownActions { + toggle: (e?: Event) => void; + close: (e?: Event, skipFocus?: boolean) => void; + open: (e?: Event) => void; + reposition: (...args: any[]) => undefined | RepositionChanges; +} +export interface Dropdown { + uniqueId: string; + disabled: boolean; + isOpen: boolean; + actions: DropdownActions; +} -export interface DropdownArgs { +interface Args { initiallyOpened?: boolean; renderInPlace?: boolean; verticalPosition?: string; @@ -24,9 +36,20 @@ export interface DropdownArgs { calculatePosition?: CalculatePosition; } -export interface DropdownSignature { +type RepositionChanges = { + hPosition: string; + vPosition: string; + otherStyles: Record; + top?: string; + left?: string; + right?: string; + width?: string; + height?: string; +}; + +export interface BasicDropdownSignature { Element: HTMLDivElement; - Args: DropdownArgs; + Args: Args; Blocks: { default: [ { @@ -59,5 +82,4 @@ export interface DropdownSignature { }; } -export class Dropdown extends Component {} -export default Dropdown; +export default class BasicDropdown extends Component {} diff --git a/types/ember-basic-dropdown/utils/calculate-position.d.ts b/types/ember-basic-dropdown/utils/calculate-position.d.ts new file mode 100644 index 0000000..a33097d --- /dev/null +++ b/types/ember-basic-dropdown/utils/calculate-position.d.ts @@ -0,0 +1,28 @@ +interface CalculatePositionOptions { + horizontalPosition: string; + verticalPosition: string; + matchTriggerWidth: boolean; + previousHorizontalPosition?: string; + previousVerticalPosition?: string; + renderInPlace: boolean; + dropdown: any; +} +export type CalculatePositionResultStyle = { + top?: number; + left?: number; + right?: number; + width?: number; + height?: number; + [key: string]: string | number | undefined; +}; +export type CalculatePositionResult = { + horizontalPosition: string; + verticalPosition: string; + style: CalculatePositionResultStyle; +}; +export type CalculatePosition = ( + trigger: Element, + content: HTMLElement, + destination: HTMLElement, + options: CalculatePositionOptions +) => CalculatePositionResult; diff --git a/types/ember-power-select/components/power-select-multiple.d.ts b/types/ember-power-select/components/power-select-multiple.d.ts new file mode 100644 index 0000000..4ca9052 --- /dev/null +++ b/types/ember-power-select/components/power-select-multiple.d.ts @@ -0,0 +1,15 @@ +import Component from '@glimmer/component'; + +import { PowerSelectArgs, PromiseProxy, Select } from './power-select'; + +interface PowerSelectMultipleArgs extends Omit, 'selected'> { + selected: O[] | PromiseProxy; +} +export interface PowerSelectMultipleSignature { + Element: HTMLDivElement; + Args: PowerSelectArgs; + Blocks: { + default: [O, Select]; + }; +} +export default class PowerSelectMultiple extends Component> {} diff --git a/types/ember-power-select/components/power-select-multiple/trigger.d.ts b/types/ember-power-select/components/power-select-multiple/trigger.d.ts new file mode 100644 index 0000000..3aa2924 --- /dev/null +++ b/types/ember-power-select/components/power-select-multiple/trigger.d.ts @@ -0,0 +1,22 @@ +import Component from '@glimmer/component'; + +import { Select } from '../power-select'; + +interface PowerSelectMultipleTriggerArgs { + select: Select; + placeholder?: string; + searchField: string; + onInput?: (e: InputEvent) => boolean; + onKeydown?: (e: KeyboardEvent) => boolean; + buildSelection: (lastSelection: O, select: Select) => any[]; +} + +export interface PowerSelectTriggerSignature { + Args: PowerSelectMultipleTriggerArgs; + Blocks: { + default?: [O, Select]; + }; + Element: HTMLUListElement; +} + +export default class Trigger extends Component> {} diff --git a/types/ember-power-select/components/power-select.d.ts b/types/ember-power-select/components/power-select.d.ts new file mode 100644 index 0000000..cdb68e3 --- /dev/null +++ b/types/ember-power-select/components/power-select.d.ts @@ -0,0 +1,93 @@ +import Component from '@glimmer/component'; + +import { Dropdown, DropdownActions } from '../../ember-basic-dropdown/components/basic-dropdown'; + +import { MatcherFn } from '../utils/group-utils'; + +interface SelectActions extends DropdownActions { + search: (term: string) => void; + highlight: (option: any) => void; + select: (selected: any, e?: Event) => void; + choose: (selected: any, e?: Event) => void; + scrollTo: (option: any) => void; +} +export interface Select extends Dropdown { + selected: any; + highlighted: any; + options: any[]; + results: any[]; + resultsCount: number; + loading: boolean; + isActive: boolean; + searchText: string; + lastSearchedText: string; + actions: SelectActions; +} +interface PromiseProxy extends Promise { + content: any; +} +interface CancellablePromise extends Promise { + cancel: () => void; +} +interface Arrayable { + toArray(): T[]; +} +interface Performable { + perform: (...args: any[]) => void; +} +// Some args are not listed here because they are only accessed from the template. Should I list them? +export interface PowerSelectArgs { + allowClear?: boolean; + ariaLabel?: string; + ariaLabelledBy?: string; + highlightOnHover?: boolean; + placeholderComponent?: string; + placeholder?: string; + searchMessage?: string; + searchMessageComponent?: string; + noMatchesMessage?: string; + noMatchesMessageComponent?: string; + matchTriggerWidth?: boolean; + options: O[] | PromiseProxy; + selected: O | PromiseProxy; + closeOnSelect?: boolean; + defaultHighlighted?: any; + searchField?: string; + searchEnabled?: boolean; + tabindex?: number | string; + triggerComponent?: string; + beforeOptionsComponent?: string; + optionsComponent?: string; + groupComponent?: string; + searchPlaceholder?: string; + loadingMessage?: string; + selectedItemComponent?: string; + extra?: any; + matcher?: MatcherFn; + initiallyOpened?: boolean; + typeAheadOptionMatcher?: MatcherFn; + buildSelection?: (selected: O, select: Select) => any; + onChange: (selection: O, select: Select, event?: Event) => void; + search?: (term: string, select: Select) => O[] | PromiseProxy; + onOpen?: (select: Select, e: Event) => boolean | undefined; + onClose?: (select: Select, e: Event) => boolean | undefined; + onInput?: (term: string, select: Select, e: Event) => string | false | void; + onKeydown?: (select: Select, e: KeyboardEvent) => boolean | undefined; + onFocus?: (select: Select, event: FocusEvent) => void; + onBlur?: (select: Select, event: FocusEvent) => void; + scrollTo?: (option: O, select: Select) => void; + registerAPI?: (select: Select) => void; +} + +export interface PowerSelectSignature { + Element: HTMLDivElement; + Args: PowerSelectArgs; + Blocks: { + default: [O, Select]; + }; +} + +export default class PowerSelect extends Component> { + ariaActiveDescendant?: string; + listboxId: string; +} diff --git a/types/ember-power-select/components/power-select/after-options.d.ts b/types/ember-power-select/components/power-select/after-options.d.ts deleted file mode 100644 index 68a250d..0000000 --- a/types/ember-power-select/components/power-select/after-options.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Select } from 'ember-power-select/addon/components/power-select'; - -import { PowerSelectArgs } from '@gavant/glint-template-types/types/ember-power-select/power-select'; - -declare module 'ember-power-select/components/power-select/after-options' { - export type PowerSelectAfterOptionsArgs = Pick, 'extra'> & { - select: Select; - }; -} diff --git a/types/ember-power-select/components/power-select/before-options.d.ts b/types/ember-power-select/components/power-select/before-options.d.ts index 547f3e6..4136a35 100644 --- a/types/ember-power-select/components/power-select/before-options.d.ts +++ b/types/ember-power-select/components/power-select/before-options.d.ts @@ -1,17 +1,19 @@ -import { Select } from 'ember-power-select/addon/components/power-select'; +import Component from '@glimmer/component'; -import { PowerSelectArgs } from '@gavant/glint-template-types/types/ember-power-select/power-select'; +import PowerSelect, { PowerSelectArgs, Select } from '../power-select'; -declare module 'ember-power-select/components/power-select/before-options' { - export type PowerSelectBeforeOptionsArgs = Pick< - PowerSelectArgs, - 'searchEnabled' | 'placeholder' | 'extra' | 'selectedItemComponent' | 'searchPlaceholder' - > & { - listboxId: string; - select: Select; - onFocus: (event: Event) => void; - onBlur: (select: Select, event: Event) => void; - onInput: (event: Event) => void; - onKeydown: (event: Event) => boolean; - }; +interface Args + extends Pick< + PowerSelectArgs, + 'searchEnabled' | 'searchPlaceholder' | 'ariaLabel' | 'ariaLabelledBy' | 'onInput' | 'onFocus' | 'onBlur' + >, + Pick, 'ariaActiveDescendant' | 'listboxId'> { + select: Select; + onKeydown: (e: Event) => false | void; + autofocus?: boolean; } +export interface BeforeOptionsSignature { + Args: Args; +} + +export default class BeforeOptions extends Component> {} diff --git a/types/ember-power-select/components/power-select/options.d.ts b/types/ember-power-select/components/power-select/options.d.ts index 51f37de..8508a75 100644 --- a/types/ember-power-select/components/power-select/options.d.ts +++ b/types/ember-power-select/components/power-select/options.d.ts @@ -1,28 +1,20 @@ import Component from '@glimmer/component'; -import { Select } from 'ember-power-select/addon/components/power-select'; -import { PowerSelectAPI } from 'ember-power-select/types/power-select-api'; -import { PowerSelectArgs } from '@gavant/glint-template-types/types/ember-power-select/power-select'; +import { PowerSelectArgs, Select } from '../power-select'; -declare module 'ember-power-select/components/power-select/options' { - export type PowerSelectOptionsArgs = Pick< - PowerSelectArgs, - 'loadingMessage' | 'options' | 'optionsComponent' | 'extra' | 'highlightOnHover' | 'groupComponent' - > & { - groupIndex?: ''; - listboxId: string; - select: Select; - extra: E; - }; +interface PowerSelectOptionsArgs + extends Pick, 'loadingMessage' | 'groupComponent' | 'optionsComponent' | 'options' | 'extra'> { + select: Select; + highlightOnHover?: boolean; + options: O[]; + groupIndex: ''; +} - export interface PowerSelectOptionsSignature { - Element: HTMLUListElement; - Args: PowerSelectOptionsArgs; - Blocks: { - default: [T, PowerSelectAPI]; - }; - } - export default class OptionsComponent extends Component> { - addHandlers: () => void; - } +export interface PowerSelectOptionsSignature { + Args: PowerSelectOptionsArgs; + Blocks: { + default?: [O, Select]; + }; + Element: HTMLUListElement; } +export default class Options extends Component> {} diff --git a/types/ember-power-select/components/power-select/trigger.d.ts b/types/ember-power-select/components/power-select/trigger.d.ts index 457ff96..fce3971 100644 --- a/types/ember-power-select/components/power-select/trigger.d.ts +++ b/types/ember-power-select/components/power-select/trigger.d.ts @@ -1,25 +1,19 @@ -import { Select } from 'ember-power-select/addon/components/power-select'; +import Component from '@glimmer/component'; -import { PowerSelectArgs } from '@gavant/glint-template-types/types/ember-power-select/power-select'; +import { PowerSelectArgs, Select } from '../power-select'; -declare module 'ember-power-select/components/power-select/trigger' { - export type PowerSelectTriggerArgs = Pick< - PowerSelectArgs, - | 'allowClear' - | 'buildSelection' - | 'loadingMessage' - | 'selectedItemComponent' - | 'searchEnabled' - | 'searchField' - | 'extra' - | 'placeholder' - | 'placeholderComponent' - > & { - listboxId: string; - select: Select; - onFocus: (event: Event) => void; - onBlur: (select: Select, event: Event) => void; - onInput: (event: Event) => void; - onKeydown: (event: Event) => boolean; +interface Args + extends Pick< + PowerSelectArgs, + 'selectedItemComponent' | 'extra' | 'allowClear' | 'placeholderComponent' | 'placeholder' + > { + select: Select; +} + +export interface TriggerSignature { + Args: Args; + Blocks: { + default: [O, Select]; }; } +export default class Trigger extends Component> {} diff --git a/types/ember-power-select/index.d.ts b/types/ember-power-select/index.d.ts deleted file mode 100644 index ca077b5..0000000 --- a/types/ember-power-select/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -declare module 'ember-power-select/components/power-select-multiple/trigger'; - -declare module 'ember-power-select/types/power-select-api' { - export type RepositionChanges = { - hPosition: string; - vPosition: string; - otherStyles: Record; - top?: string; - left?: string; - right?: string; - width?: string; - height?: string; - }; - export class PowerSelectAPI { - readonly disabled: boolean; - readonly highlighted: T; - readonly isActive: boolean; - readonly isOpen: boolean; - readonly lastSearchedText: string; - readonly loading: boolean; - readonly options: T[]; - readonly results: T[]; - readonly resultsCount: number; - readonly searchText: string; - readonly selected: T; - readonly uniqueId: string; - readonly actions: { - choose(option: T, event: Event): void; - close(): void; - highlight(option: T): void; - open(): void; - reposition(): RepositionChanges | undefined; - scrollTo(option: T): void; - search(term: string): void; - select(option: T): void; - toggle(): void; - }; - } -} diff --git a/types/ember-power-select/power-select-multiple.d.ts b/types/ember-power-select/power-select-multiple.d.ts deleted file mode 100644 index 02d3632..0000000 --- a/types/ember-power-select/power-select-multiple.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { ComponentLike } from '@glint/template'; -import Component from '@glimmer/component'; -import { PowerSelectAPI } from 'ember-power-select/types/power-select-api'; - -type PowerSelectMultipleAPI = Omit, 'selected'> & { selected: T[] }; - -export interface PromiseProxy extends Promise { - content: any; -} -export type MatcherFn = (option: any, text: string) => number; -interface PowerSelectArgs { - placeholderComponent?: string; - searchMessage?: string; - noMatchesMessage?: string; - matchTriggerWidth?: boolean; - options: T[] | Promise; - selected: T[] | Promise; - closeOnSelect?: boolean; - defaultHighlighted?: any; - searchField?: string; - searchEnabled?: boolean; - tabindex?: number | string; - triggerComponent?: string; - matcher?: MatcherFn; - initiallyOpened?: boolean; - typeAheadOptionMatcher?: MatcherFn; - placeholder?: string; - searchPlaceholder?: string; - renderInPlace?: boolean; - disabled?: boolean; - loadingMessage?: boolean; - canLoadMore?: boolean; - allowClear?: boolean; - triggerClass?: string; - dropdownClass?: string; - optionsComponent?: string; - beforeOptionsComponent?: string; - extra?: any; - verticalPosition?: 'below' | 'above' | 'auto'; - selectedItemComponent?: ComponentLike; - loadMore?: (keyword?: string) => Promise; - buildSelection?: (selected: any, select: PowerSelectMultipleAPI) => any; - onChange: (selection: any, select: PowerSelectMultipleAPI, event?: Event) => void; - search?: (term: string, select: PowerSelectMultipleAPI) => any[] | Promise; - onOpen?: (select: PowerSelectMultipleAPI, e: Event) => boolean | undefined; - onClose?: (select: PowerSelectMultipleAPI, e: Event) => boolean | undefined; - onInput?: (term: string, select: PowerSelectMultipleAPI, e: Event) => string | false | void; - onKeydown?: (select: PowerSelectMultipleAPI, e: KeyboardEvent) => boolean | undefined; - onFocus?: (select: PowerSelectMultipleAPI, event: FocusEvent) => void; - onBlur?: (select: PowerSelectMultipleAPI, event: FocusEvent) => void; - scrollTo?: (option: any, select: PowerSelectMultipleAPI) => void; - registerAPI?: (select: PowerSelectMultipleAPI) => void; -} - -interface PowerSelectMultipleSignature { - Element: HTMLDivElement; - Args: PowerSelectArgs; - Blocks: { - default: [T, PowerSelectMultipleAPI]; - }; -} - -export declare class PowerSelectMultiple extends Component> {} diff --git a/types/ember-power-select/power-select-multiple/trigger.d.ts b/types/ember-power-select/power-select-multiple/trigger.d.ts deleted file mode 100644 index 0cdc384..0000000 --- a/types/ember-power-select/power-select-multiple/trigger.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import Component from '@glimmer/component'; -import { Select } from 'ember-power-select/addon/components/power-select'; - -export interface PowerSelectTriggerArgs { - select: Select; - placeholder?: string; - searchField?: string; - onInput?: (e: InputEvent) => boolean; - onKeydown?: (e: KeyboardEvent) => boolean; - buildSelection: (lastSelection: T, select: Select) => T[]; - listBoxId: number; - onBlur?(): void; - extra: { - [x: string]: any; - }; - allowClear?: boolean; - selectedItemComponent?: string; - onFocus(e: FocusEvent): void; - tabindex?: string; -} - -export interface PowerSelectTriggerSignature { - Args: PowerSelectTriggerArgs; - Blocks: { - default?: [T, Select]; - }; - Element: HTMLUListElement; -} - -export class PowerSelectTrigger extends Component> { - inputFont?: string; - readonly triggerMultipleInputStyle: string; - readonly maybePlaceholder: string; - openChanged(elemenet: Element, [isOpen]: [boolean]): void; - storeInputStyles(input: Element): void; - chooseOption(e: Event): void; - handleInput(e: InputEvent): void; - handleKeydown(e: KeyboardEvent): void | false; -} -export default PowerSelectTrigger; diff --git a/types/ember-power-select/power-select.d.ts b/types/ember-power-select/power-select.d.ts deleted file mode 100644 index e05f416..0000000 --- a/types/ember-power-select/power-select.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import Component from '@glimmer/component'; -import { PowerSelectArgs as PSArgs } from 'ember-power-select/addon/components/power-select'; -import { PowerSelectAPI } from 'ember-power-select/types/power-select-api'; - -export interface PromiseProxy extends Promise { - content: any; -} - -type modifiedPSArgs = Omit & { - search?: (term: string, select: PowerSelectAPI) => any[] | PromiseProxy | Promise; -}; - -export enum HorizontalPositions { - LEFT = 'left', - RIGHT = 'right', - CENTER = 'center', - AUTO = 'auto' -} - -export enum VerticalPositions { - ABOVE = 'above', - BELOW = 'below', - AUTO = 'auto' -} - -export interface PositionStyle { - top?: number; - left?: number; - right?: number; - width?: number; -} - -export interface CalculatePositionOptions { - previousHorizontalPosition: HorizontalPositions; - horizontalPosition: HorizontalPositions; - previousVerticalPosition: VerticalPositions; - verticalPosition: VerticalPositions; - matchTriggerWidth: boolean; - renderInPlace: boolean; -} - -interface PowerSelectArgs extends modifiedPSArgs { - ariaDescribedBy?: string; - ariaInvalid?: string; - ariaLabel?: string; - ariaLabelledBy?: string; - required?: boolean; - options: T[] | PromiseProxy; - selected: T | PromiseProxy; - placeholder?: string; - placeholderComponent?: string; - searchPlaceholder?: string; - renderInPlace?: boolean; - highlightOnHover?: boolean; - disabled?: boolean; - loadingMessage?: string; - allowClear?: boolean; - triggerClass?: string; - dropdownClass?: string; - triggerRole?: string; - title?: string; - triggerId?: string; - optionsComponent?: string; - beforeOptionsComponent?: string; - afterOptionsComponent?: string; - groupComponent?: string; - extra?: E; - preventScroll?: boolean; - verticalPosition?: VerticalPositions; - horizontalPosition?: HorizontalPositions; - destination?: string; - initiallyOpened?: boolean; - ebdTriggerComponent?: string; - ebdContentComponent?: string; - triggerComponent?: string; - tabindex?: number; - eventType?: string; - selectedItemComponent?: string; - searchEnabled?: boolean; - searchField?: string; - calculatePosition?: ( - trigger: HTMLElement, - content: HTMLElement, - destination: HTMLElement, - options: CalculatePositionOptions - ) => { - horizontalPosition: HorizontalPositions; - verticalPosition: VerticalPositions; - style: PositionStyle; - }; - buildSelection?: (selected: PowerSelectArgs['selected'], select: PowerSelectAPI) => any; - onChange: (selection: PowerSelectArgs['selected'], select: PowerSelectAPI, event?: Event) => void; - search?: (term: string, select: PowerSelectAPI) => any[] | PromiseProxy | Promise; - onOpen?: (select: PowerSelectAPI, e: Event) => boolean | undefined; - onClose?: (select: PowerSelectAPI, e: Event) => boolean | undefined; - onInput?: (term: string, select: PowerSelectAPI, e: Event) => string | false | void; - onKeydown?: (select: PowerSelectAPI, e: KeyboardEvent) => boolean | undefined; - onFocus?: (select: PowerSelectAPI, event: FocusEvent) => void; - onBlur?: (select: PowerSelectAPI, event: FocusEvent) => void; - scrollTo?: (option: PowerSelectArgs['selected'], select: PowerSelectAPI) => void; - registerAPI?: (select: PowerSelectAPI) => void; -} - -interface PowerSelectSignature> { - Element: HTMLDivElement; - Args: PowerSelectArgs; - Blocks: { - default: [T, PowerSelectAPI]; - }; -} - -export declare class PowerSelect> extends Component> {} diff --git a/types/ember-power-select/power-select/options.d.ts b/types/ember-power-select/power-select/options.d.ts deleted file mode 100644 index 0524f6f..0000000 --- a/types/ember-power-select/power-select/options.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import Component from '@glimmer/component'; -import { Select } from 'ember-power-select/addon/components/power-select'; - -export interface PowerSelectOptionsArgs { - select: Select; - loadingMessage?: string; - groupComponent?: string; - optionsComponent?: string; - items: T[]; - extra: { - [x: string]: any; - }; - highlightOnHover?: boolean; - optionsClass?: string; - options: T[]; - groupIndex?: string; -} - -export interface PowerSelectOptionsSignature { - Args: PowerSelectOptionsArgs; - Blocks: { - default?: [T, Select]; - }; - Element: HTMLUListElement; -} - -export class PowerSelectOptions extends Component> { - isTouchDevice: boolean; - hasMoved: boolean; - addHandlers(element: Element): void; - removeHandlers(element: Element): void; -} -export default PowerSelectOptions; diff --git a/types/ember-power-select/test-support/helpers.d.ts b/types/ember-power-select/test-support/helpers.d.ts deleted file mode 100644 index ca89ad7..0000000 --- a/types/ember-power-select/test-support/helpers.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function selectChoose(elementOrClass: Element | string, name: string): Promise; diff --git a/types/ember-power-select/utils/group-utils.d.ts b/types/ember-power-select/utils/group-utils.d.ts new file mode 100644 index 0000000..9311752 --- /dev/null +++ b/types/ember-power-select/utils/group-utils.d.ts @@ -0,0 +1 @@ +export type MatcherFn = (option: any, text: string) => number; diff --git a/yarn.lock b/yarn.lock index 8235007..1ee141a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4349,10 +4349,10 @@ ember-basic-dropdown@5.0.0: ember-style-modifier "^0.7.0" ember-truth-helpers "^2.1.0 || ^3.0.0" -ember-basic-dropdown@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/ember-basic-dropdown/-/ember-basic-dropdown-6.0.0.tgz#81407cba1df022750acc58d91dfd45251be8f1e3" - integrity sha512-DWdHItyTJqgrejvMzRQCexcoh8yO6+y+rvByB89ej8gAEEFOJ9ziLx7KgZ8bDs8woVOkwyohdbPbfKcasuaxJA== +ember-basic-dropdown@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ember-basic-dropdown/-/ember-basic-dropdown-6.0.1.tgz#9844b8b263033c916e193fb15b91517a00192db0" + integrity sha512-8cmqHvho7fToAv2pauzLd3y9fUVtMu0+eBwsevjiuTdWUPLvkIvn745NbT5aempVmxfMq0oQLhjzK8VUd4gxaw== dependencies: "@ember/render-modifiers" "^2.0.4" "@embroider/macros" "^1.2.0" @@ -4363,7 +4363,7 @@ ember-basic-dropdown@^6.0.0: ember-cli-htmlbars "^6.0.1" ember-cli-typescript "^4.2.1" ember-element-helper "^0.6.0" - ember-get-config "^1.0.2" + ember-get-config "^1.0.2 || ^2.0.0" ember-maybe-in-element "^2.0.3" ember-modifier "^3.2.7" ember-style-modifier "^0.8.0" @@ -4805,6 +4805,14 @@ ember-destroyable-polyfill@^2.0.2: "@embroider/macros" "^0.50.0 || ^1.0.0" ember-cli-babel "^7.26.6" +"ember-get-config@^1.0.2 || ^2.0.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/ember-get-config/-/ember-get-config-2.1.1.tgz#bede76c25d95dbefab8d30064abf7aa00bc19235" + integrity sha512-uNmv1cPG/4qsac8oIf5txJ2FZ8p88LEpG4P3dNcjsJS98Y8hd0GPMFwVqpnzI78Lz7VYRGQWY4jnE4qm5R3j4g== + dependencies: + "@embroider/macros" "^0.50.0 || ^1.0.0" + ember-cli-babel "^7.26.6" + ember-in-element-polyfill@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ember-in-element-polyfill/-/ember-in-element-polyfill-1.0.1.tgz#143504445bb4301656a2eaad42644d684f5164dd" From 32c41e1bad3756dd070a343d290357e0718c00cf Mon Sep 17 00:00:00 2001 From: Adam Baker Date: Tue, 8 Nov 2022 13:30:50 -0500 Subject: [PATCH 2/3] Selected is optional for power select --- types/ember-power-select/components/power-select.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ember-power-select/components/power-select.d.ts b/types/ember-power-select/components/power-select.d.ts index cdb68e3..7de039b 100644 --- a/types/ember-power-select/components/power-select.d.ts +++ b/types/ember-power-select/components/power-select.d.ts @@ -49,7 +49,7 @@ export interface PowerSelectArgs { noMatchesMessageComponent?: string; matchTriggerWidth?: boolean; options: O[] | PromiseProxy; - selected: O | PromiseProxy; + selected?: O | PromiseProxy | null; closeOnSelect?: boolean; defaultHighlighted?: any; searchField?: string; From ad4a56364277d32682846a91d46a2648193cf09f Mon Sep 17 00:00:00 2001 From: Adam Baker Date: Tue, 8 Nov 2022 13:39:05 -0500 Subject: [PATCH 3/3] Power select multiple selected options are optional as well --- types/ember-power-select/components/power-select-multiple.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ember-power-select/components/power-select-multiple.d.ts b/types/ember-power-select/components/power-select-multiple.d.ts index 4ca9052..5798850 100644 --- a/types/ember-power-select/components/power-select-multiple.d.ts +++ b/types/ember-power-select/components/power-select-multiple.d.ts @@ -3,7 +3,7 @@ import Component from '@glimmer/component'; import { PowerSelectArgs, PromiseProxy, Select } from './power-select'; interface PowerSelectMultipleArgs extends Omit, 'selected'> { - selected: O[] | PromiseProxy; + selected?: O[] | PromiseProxy; } export interface PowerSelectMultipleSignature { Element: HTMLDivElement;