File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ import * as api from 'src/utils/4.api.js' ;
2+ import Constant from './constant.js' ;
3+
4+ export default class Priority extends Constant {
5+ static FIRST = new Priority ( 'first' , 'top' ) ;
6+ static HIGHEST = new Priority ( 'highest' ) ;
7+ static HIGH = new Priority ( 'high' ) ;
8+ static NORMAL = new Priority ( 'normal' ) ;
9+ static LOW = new Priority ( 'low' ) ;
10+ static LOWEST = new Priority ( 'lowest' ) ;
11+ static LAST = new Priority ( 'last' , 'bottom' ) ;
12+
13+ static get ( value ) {
14+ if ( value instanceof Priority ) return value ;
15+ // eslint-disable-next-line no-use-before-define
16+ return values . find ( ( v ) => v . equals ( value ) ) ;
17+ }
18+ }
19+
20+ const values = Object . values ( Priority ) ;
21+
22+ api . mod . priorities = Object . fromEntries ( Object . entries ( Priority ) ) ;
You can’t perform that action at this time.
0 commit comments