Skip to content

Commit 0ed44b4

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 0ed44b4

File tree

2 files changed

+140
-136
lines changed

2 files changed

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

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)