Skip to content

Commit 462b6a4

Browse files
committed
refactor: removed cash-dom from dependencies
1 parent af05341 commit 462b6a4

10 files changed

+86
-271
lines changed

docs/js/materialize.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
},
9191
"dependencies": {
9292
"animejs": "^3.2.1",
93-
"cash-dom": "^8.1.3",
9493
"node-waves": "^0.7.6"
9594
}
9695
}

src/autocomplete.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class Autocomplete extends Component {
4242
private _handleContainerMousedownAndTouchstartBound: any;
4343
private _handleContainerMouseupAndTouchendBound: any;
4444
container: HTMLElement;
45-
dropdown: any;
45+
dropdown: Dropdown;
4646
static _keydown: boolean;
4747
selectedValues: any[];
4848
menuItems: any[];
@@ -389,7 +389,7 @@ export class Autocomplete extends Component {
389389
}
390390

391391
_triggerChanged() {
392-
this.$el.trigger('change');
392+
this.el.dispatchEvent(new Event('change'));
393393
// Trigger Autocomplete Event
394394
if (typeof this.options.onAutocomplete === 'function')
395395
this.options.onAutocomplete.call(this, this.selectedValues);

src/buttons.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ import anim from "animejs";
159159
duration: 175,
160160
easing: 'easeOutQuad',
161161
complete: () => {
162-
this.$el.removeClass('active');
162+
this.el.classList.remove('active');
163163
}
164164
});
165165
});

src/component.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import cash from "cash-dom";
21

32
export class Component {
4-
$el: any;
53

64
constructor(classDef, protected el: Element, protected options) {
75
// Display error if el is valid HTML Element
@@ -14,7 +12,6 @@ export class Component {
1412
ins.destroy();
1513
}
1614
this.el = el;
17-
this.$el = cash(el);
1815
}
1916

2017
static init(classDef, els, options) {

src/dropdown.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import anim from "animejs";
3737
private _handleTriggerKeydownBound: any;
3838
private _handleMouseEnterBound: any;
3939
private _handleMouseLeaveBound: any;
40-
private _handleClickBound: any;
40+
_handleClickBound: any;
4141
filterTimeout: NodeJS.Timeout;
4242

4343
constructor(el, options) {

0 commit comments

Comments
 (0)