-
-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
7 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,27 @@ | ||
import { orientationStrings } from "src/utils/orientation"; | ||
import { CriterionType } from "../types"; | ||
import { | ||
CriterionOption, | ||
StringCriterion, | ||
} from "./criterion"; | ||
import {CriterionModifier} from "../../../core/generated-graphql"; | ||
import { CriterionOption, StringCriterion } from "./criterion"; | ||
import { CriterionModifier } from "../../../core/generated-graphql"; | ||
|
||
export class OrientationCriterion extends StringCriterion { | ||
protected toCriterionInput(): string { | ||
return this.value; | ||
} | ||
} | ||
|
||
|
||
class BaseOrientationCriterionOption extends CriterionOption { | ||
constructor( | ||
value: CriterionType | ||
) { | ||
constructor(value: CriterionType) { | ||
super({ | ||
messageID: value, | ||
type: value, | ||
modifierOptions: [], | ||
options: orientationStrings, | ||
defaultModifier: CriterionModifier.Equals, | ||
makeCriterion: () => new OrientationCriterion(this) | ||
makeCriterion: () => new OrientationCriterion(this), | ||
}); | ||
} | ||
} | ||
|
||
|
||
export const OrientationCriterionOption = new BaseOrientationCriterionOption( | ||
"orientation", | ||
"orientation" | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters