Skip to content

Commit 41dd0c9

Browse files
committed
fix(material-experimental/mdc-slider): fixup
* moved SliderAdapter to a separate file * omitted empty SliderAdapter constructor * change all s to just
1 parent 33cc33c commit 41dd0c9

File tree

2 files changed

+132
-136
lines changed

2 files changed

+132
-136
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
import {SpecificEventListener, EventType} from '@material/base';
2+
import {MDCSliderAdapter, Thumb, TickMark} from '@material/slider';
3+
4+
export class SliderAdapter implements MDCSliderAdapter {
5+
hasClass(className: string): boolean {
6+
throw Error('Method not implemented.');
7+
}
8+
addClass(className: string): void {
9+
throw Error('Method not implemented.');
10+
}
11+
removeClass(className: string): void {
12+
throw Error('Method not implemented.');
13+
}
14+
getAttribute(attribute: string): string | null {
15+
throw Error('Method not implemented.');
16+
}
17+
addThumbClass(className: string, thumb: Thumb): void {
18+
throw Error('Method not implemented.');
19+
}
20+
removeThumbClass(className: string, thumb: Thumb): void {
21+
throw Error('Method not implemented.');
22+
}
23+
getInputValue(thumb: Thumb): string {
24+
throw Error('Method not implemented.');
25+
}
26+
setInputValue(value: string, thumb: Thumb): void {
27+
throw Error('Method not implemented.');
28+
}
29+
getInputAttribute(attribute: string, thumb: Thumb): string | null {
30+
throw Error('Method not implemented.');
31+
}
32+
setInputAttribute(attribute: string, value: string, thumb: Thumb): void {
33+
throw Error('Method not implemented.');
34+
}
35+
removeInputAttribute(attribute: string, thumb: Thumb): void {
36+
throw Error('Method not implemented.');
37+
}
38+
focusInput(thumb: Thumb): void {
39+
throw Error('Method not implemented.');
40+
}
41+
isInputFocused(thumb: Thumb): boolean {
42+
throw Error('Method not implemented.');
43+
}
44+
getThumbKnobWidth(thumb: Thumb): number {
45+
throw Error('Method not implemented.');
46+
}
47+
getThumbBoundingClientRect(thumb: Thumb): ClientRect {
48+
throw Error('Method not implemented.');
49+
}
50+
getBoundingClientRect(): ClientRect {
51+
throw Error('Method not implemented.');
52+
}
53+
isRTL(): boolean {
54+
throw Error('Method not implemented.');
55+
}
56+
setThumbStyleProperty(propertyName: string, value: string, thumb: Thumb): void {
57+
throw Error('Method not implemented.');
58+
}
59+
removeThumbStyleProperty(propertyName: string, thumb: Thumb): void {
60+
throw Error('Method not implemented.');
61+
}
62+
setTrackActiveStyleProperty(propertyName: string, value: string): void {
63+
throw Error('Method not implemented.');
64+
}
65+
removeTrackActiveStyleProperty(propertyName: string): void {
66+
throw Error('Method not implemented.');
67+
}
68+
setValueIndicatorText(value: number, thumb: Thumb): void {
69+
throw Error('Method not implemented.');
70+
}
71+
getValueToAriaValueTextFn(): ((value: number) => string) | null {
72+
throw Error('Method not implemented.');
73+
}
74+
updateTickMarks(tickMarks: TickMark[]): void {
75+
throw Error('Method not implemented.');
76+
}
77+
setPointerCapture(pointerId: number): void {
78+
throw Error('Method not implemented.');
79+
}
80+
emitChangeEvent(value: number, thumb: Thumb): void {
81+
throw Error('Method not implemented.');
82+
}
83+
emitInputEvent(value: number, thumb: Thumb): void {
84+
throw Error('Method not implemented.');
85+
}
86+
emitDragStartEvent(value: number, thumb: Thumb): void {
87+
throw Error('Method not implemented.');
88+
}
89+
emitDragEndEvent(value: number, thumb: Thumb): void {
90+
throw Error('Method not implemented.');
91+
}
92+
registerEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void {
93+
throw Error('Method not implemented.');
94+
}
95+
deregisterEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void {
96+
throw Error('Method not implemented.');
97+
}
98+
registerThumbEventHandler<K extends EventType>
99+
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
100+
throw Error('Method not implemented.');
101+
}
102+
deregisterThumbEventHandler<K extends EventType>
103+
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
104+
throw Error('Method not implemented.');
105+
}
106+
registerInputEventHandler<K extends EventType>
107+
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
108+
throw Error('Method not implemented.');
109+
}
110+
deregisterInputEventHandler<K extends EventType>
111+
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
112+
throw Error('Method not implemented.');
113+
}
114+
registerBodyEventHandler<K extends EventType>
115+
(evtType: K, handler: SpecificEventListener<K>): void {
116+
throw Error('Method not implemented.');
117+
}
118+
deregisterBodyEventHandler<K extends EventType>
119+
(evtType: K, handler: SpecificEventListener<K>): void {
120+
throw Error('Method not implemented.');
121+
}
122+
registerWindowEventHandler<K extends EventType>
123+
(evtType: K, handler: SpecificEventListener<K>): void {
124+
throw Error('Method not implemented.');
125+
}
126+
deregisterWindowEventHandler<K extends EventType>
127+
(evtType: K, handler: SpecificEventListener<K>): void {
128+
throw Error('Method not implemented.');
129+
}
130+
}

src/material-experimental/mdc-slider/slider.ts

Lines changed: 2 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ import {
1111
Component,
1212
ViewEncapsulation,
1313
} from '@angular/core';
14-
import {SpecificEventListener, EventType} from '@material/base';
15-
import {
16-
MDCSliderAdapter,
17-
MDCSliderFoundation,
18-
Thumb,
19-
TickMark,
20-
} from '@material/slider';
14+
import {MDCSliderFoundation} from '@material/slider';
15+
import {SliderAdapter} from './slider-adapter';
2116

2217
/**
2318
* Allows users to select from a range of values by moving the slider thumb. It is similar in
@@ -37,132 +32,3 @@ export class MatSlider {
3732
// tslint:disable-next-line:no-unused-variable
3833
private _foundation = new MDCSliderFoundation(new SliderAdapter());
3934
}
40-
41-
class SliderAdapter implements MDCSliderAdapter {
42-
constructor() {}
43-
hasClass(className: string): boolean {
44-
throw new Error('Method not implemented.');
45-
}
46-
addClass(className: string): void {
47-
throw new Error('Method not implemented.');
48-
}
49-
removeClass(className: string): void {
50-
throw new Error('Method not implemented.');
51-
}
52-
getAttribute(attribute: string): string | null {
53-
throw new Error('Method not implemented.');
54-
}
55-
addThumbClass(className: string, thumb: Thumb): void {
56-
throw new Error('Method not implemented.');
57-
}
58-
removeThumbClass(className: string, thumb: Thumb): void {
59-
throw new Error('Method not implemented.');
60-
}
61-
getInputValue(thumb: Thumb): string {
62-
throw new Error('Method not implemented.');
63-
}
64-
setInputValue(value: string, thumb: Thumb): void {
65-
throw new Error('Method not implemented.');
66-
}
67-
getInputAttribute(attribute: string, thumb: Thumb): string | null {
68-
throw new Error('Method not implemented.');
69-
}
70-
setInputAttribute(attribute: string, value: string, thumb: Thumb): void {
71-
throw new Error('Method not implemented.');
72-
}
73-
removeInputAttribute(attribute: string, thumb: Thumb): void {
74-
throw new Error('Method not implemented.');
75-
}
76-
focusInput(thumb: Thumb): void {
77-
throw new Error('Method not implemented.');
78-
}
79-
isInputFocused(thumb: Thumb): boolean {
80-
throw new Error('Method not implemented.');
81-
}
82-
getThumbKnobWidth(thumb: Thumb): number {
83-
throw new Error('Method not implemented.');
84-
}
85-
getThumbBoundingClientRect(thumb: Thumb): ClientRect {
86-
throw new Error('Method not implemented.');
87-
}
88-
getBoundingClientRect(): ClientRect {
89-
throw new Error('Method not implemented.');
90-
}
91-
isRTL(): boolean {
92-
throw new Error('Method not implemented.');
93-
}
94-
setThumbStyleProperty(propertyName: string, value: string, thumb: Thumb): void {
95-
throw new Error('Method not implemented.');
96-
}
97-
removeThumbStyleProperty(propertyName: string, thumb: Thumb): void {
98-
throw new Error('Method not implemented.');
99-
}
100-
setTrackActiveStyleProperty(propertyName: string, value: string): void {
101-
throw new Error('Method not implemented.');
102-
}
103-
removeTrackActiveStyleProperty(propertyName: string): void {
104-
throw new Error('Method not implemented.');
105-
}
106-
setValueIndicatorText(value: number, thumb: Thumb): void {
107-
throw new Error('Method not implemented.');
108-
}
109-
getValueToAriaValueTextFn(): ((value: number) => string) | null {
110-
throw new Error('Method not implemented.');
111-
}
112-
updateTickMarks(tickMarks: TickMark[]): void {
113-
throw new Error('Method not implemented.');
114-
}
115-
setPointerCapture(pointerId: number): void {
116-
throw new Error('Method not implemented.');
117-
}
118-
emitChangeEvent(value: number, thumb: Thumb): void {
119-
throw new Error('Method not implemented.');
120-
}
121-
emitInputEvent(value: number, thumb: Thumb): void {
122-
throw new Error('Method not implemented.');
123-
}
124-
emitDragStartEvent(value: number, thumb: Thumb): void {
125-
throw new Error('Method not implemented.');
126-
}
127-
emitDragEndEvent(value: number, thumb: Thumb): void {
128-
throw new Error('Method not implemented.');
129-
}
130-
registerEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void {
131-
throw new Error('Method not implemented.');
132-
}
133-
deregisterEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void {
134-
throw new Error('Method not implemented.');
135-
}
136-
registerThumbEventHandler<K extends EventType>
137-
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
138-
throw new Error('Method not implemented.');
139-
}
140-
deregisterThumbEventHandler<K extends EventType>
141-
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
142-
throw new Error('Method not implemented.');
143-
}
144-
registerInputEventHandler<K extends EventType>
145-
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
146-
throw new Error('Method not implemented.');
147-
}
148-
deregisterInputEventHandler<K extends EventType>
149-
(thumb: Thumb, evtType: K, handler: SpecificEventListener<K>): void {
150-
throw new Error('Method not implemented.');
151-
}
152-
registerBodyEventHandler<K extends EventType>
153-
(evtType: K, handler: SpecificEventListener<K>): void {
154-
throw new Error('Method not implemented.');
155-
}
156-
deregisterBodyEventHandler<K extends EventType>
157-
(evtType: K, handler: SpecificEventListener<K>): void {
158-
throw new Error('Method not implemented.');
159-
}
160-
registerWindowEventHandler<K extends EventType>
161-
(evtType: K, handler: SpecificEventListener<K>): void {
162-
throw new Error('Method not implemented.');
163-
}
164-
deregisterWindowEventHandler<K extends EventType>
165-
(evtType: K, handler: SpecificEventListener<K>): void {
166-
throw new Error('Method not implemented.');
167-
}
168-
}

0 commit comments

Comments
 (0)