-
Notifications
You must be signed in to change notification settings - Fork 34
Upgrade dependencies #2162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Upgrade dependencies #2162
Changes from all commits
cedc38c
afb9c36
63e3e20
06b0558
fe1aa7d
6611f77
11757de
551cc02
22c1fa7
1d71452
0117a40
ec2078b
26aeb24
f9d88e8
601c305
e1eed09
bbead0d
b85dba5
99d0b16
f683706
466c652
cccb306
72774b8
8a0e373
aa78b23
fa76b3e
e285627
02af2b4
2ae95c1
e5d838e
f1a6ba3
94053db
9e5464c
36159c1
0b3a196
e493a9e
6e488bb
d3de943
310d74f
9b50f24
5f88caa
0409db8
45ee7d2
74dfed0
e2e285a
300c9a5
ec98ebc
a21eb1d
82506fb
4682468
daa063f
515fba7
2c73496
e771197
956288f
151c12a
be1a19e
2e2c39d
7066a9c
869def4
655d587
e7a0909
0bb2e20
dd0d38a
be7282a
ca15fc9
77f1287
fe510e9
24d8610
4779f13
44a6856
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import { Controller } from '@hotwired/stimulus'; | ||
|
|
||
| export default class extends Controller { | ||
|
|
||
| _orgLoad = null; | ||
| _tomselect = null; | ||
|
|
||
| initialize() { | ||
| this._onPreConnect = this._onPreConnect.bind(this); | ||
| this._onConnect = this._onConnect.bind(this); | ||
| this._onSearchLoad = this._onSearchLoad.bind(this); | ||
| } | ||
|
|
||
| connect() { | ||
| this.element.addEventListener('autocomplete:pre-connect', this._onPreConnect); | ||
| this.element.addEventListener('autocomplete:connect', this._onConnect); | ||
| } | ||
|
|
||
| disconnect() { | ||
| this.element.removeEventListener('autocomplete:connect', this._onConnect); | ||
| this.element.removeEventListener('autocomplete:pre-connect', this._onPreConnect); | ||
| } | ||
|
|
||
| _onPreConnect(event) { | ||
| this._orgLoad = event.detail.options.load; | ||
| event.detail.options.load = this._onSearchLoad; | ||
| } | ||
|
|
||
| _onConnect(event) { | ||
| this._tomselect = event.detail.tomSelect; | ||
| this._orgLoad = this._orgLoad.bind(this._tomselect); | ||
| } | ||
|
|
||
| _onSearchLoad(query, callback) { | ||
| this._tomselect.clear(); | ||
| this._tomselect.clearActiveItems(); | ||
| this._tomselect.clearActiveOption(); | ||
| this._tomselect.clearFilter(); | ||
| this._tomselect.clearOptions(); | ||
| this._tomselect.clearPagination(); | ||
| this._tomselect.clearCache(); | ||
|
|
||
| this._orgLoad(query, callback); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,7 @@ | ||
| // register any custom, 3rd party controllers here | ||
| // app.register('some_controller_name', SomeImportedController); | ||
| import { startStimulusApp } from '@symfony/stimulus-bridge'; | ||
|
|
||
| // Registers Stimulus controllers from controllers.json and in the controllers/ directory | ||
| export const app = startStimulusApp(require.context( | ||
| '@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | ||
| true, | ||
| /\.[jt]sx?$/, | ||
| )); | ||
| export const app = startStimulusApp(import.meta.webpackContext('@symfony/stimulus-bridge/lazy-controller-loader!./controllers', { | ||
| recursive: true, | ||
| regExp: /\.[jt]sx?$/, | ||
| })); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| @use 'breakpoints' as b; | ||
| @use '../mixins/mbin'; | ||
| @use '@fortawesome/fontawesome-free/scss/fontawesome' as fa; | ||
| @use '@fortawesome/fontawesome-free/scss/fa' as fa; | ||
| @use '@fortawesome/fontawesome-free/scss/solid' as faSolid; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is imported twice now
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I kept the former alias for compatibility. |
||
| // needed for the checkmark do render correctly even though it is not directly used | ||
| @use '@fortawesome/fontawesome-free/scss/solid' as faS; | ||
|
|
||
| .btn { | ||
| font-size: .85rem; | ||
|
|
@@ -135,6 +135,8 @@ input[type=radio] { | |
|
|
||
| input[type=checkbox], | ||
| input[type=radio] { | ||
| @include faSolid.icon(fa.$var-check); | ||
|
|
||
| -webkit-appearance: none; | ||
| appearance: none; | ||
| font-size: 0.9rem; | ||
|
|
@@ -147,8 +149,6 @@ input[type=radio] { | |
| align-content: center; | ||
| cursor: pointer; | ||
|
|
||
| @include fa.fa-icon-solid(fa.$fa-var-check); | ||
|
|
||
| &::before { | ||
| transform: scale(0); | ||
| transition: 100ms transform ease-in; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this come from a package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember right, I wrote this with the help of https://symfony.com/bundles/ux-autocomplete/current/index.html and https://tom-select.js.org/docs/#callbacks .