1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
/*
import {
SELECT_TYPES, ALIGNMENTS,
REQUIRED_KEYS,
IMAGE_TILE_STYLES, VIDEO_STYLES,
TEXT_FONT_FAMILIES, TEXT_FONT_STYLES,
CURSORS, UNITS,
NO_LINK, EXTERNAL_LINK, OPEN_POPUP_LINK, CLOSE_POPUP_LINK,
PAGE_LIST_TOP_OPTIONS,
NO_POPUP, POPUP_LIST_TOP_OPTIONS,
} from 'app/constants'
*/
export const SELECT_TYPES = [
"image", "text", "video", "link", "gradient", "script",
].map(s => ({ name: s, label: s }))
export const ALIGNMENTS = [
"top_left", "top_center", "top_right",
"center_left", "center_center", "center_right",
"bottom_left", "bottom_center", "bottom_right",
].map(align => ({
name: align,
label: align === 'center_center'
? 'center'
: align.replace('_', ' ')
}))
export const REQUIRED_KEYS = {
image: ['url'],
video: ['url'],
text: ['content'],
link: [],
gradient: [],
script: [],
}
export const IMAGE_TILE_STYLES = [
'tile', 'cover', 'contain', 'contain no-repeat'
].map(style => ({ name: style, label: style }))
export const VIDEO_STYLES = [
'normal', 'cover', 'contain',
].map(style => ({ name: style, label: style }))
export const TEXT_FONT_FAMILIES = [
'sans-serif', 'serif', 'fantasy', 'monospace', 'cursive',
].map(style => ({ name: style, label: style }))
export const TEXT_FONT_STYLES = [
'normal', 'bold', 'italic', 'bold-italic',
].map(style => ({ name: style, label: style }))
export const CURSORS = [
{ name: 'none', label: 'None', },
{ name: 'hand_up', label: 'Up', },
{ name: 'hand_down', label: 'Down', },
{ name: 'hand_left', label: 'Left', },
{ name: 'hand_right', label: 'Right', },
{ name: 'unclickable', label: 'Unclickable', },
{ name: 'custom', label: 'Custom', }
]
export const MARQUEE_DIRECTIONS = [
{ name: 'left', label: 'Left', },
{ name: 'right', label: 'Right', },
// { name: 'up', label: 'Up', },
// { name: 'down', label: 'Down', },
]
export const UNITS = [
{ name: 'px', label: 'pixels' },
{ name: '%', label: 'percent' },
{ name: 'video', label: 'video' },
{ name: 'vmin', label: 'screen min' },
{ name: 'vmax', label: 'screen max' },
]
export const NO_LINK = 0
export const EXTERNAL_LINK = -1
export const OPEN_POPUP_LINK = -2
export const CLOSE_POPUP_LINK = -3
export const PAGE_LIST_TOP_OPTIONS = [
{ name: NO_LINK, label: 'No link' },
{ name: EXTERNAL_LINK, label: 'External link' },
{ name: OPEN_POPUP_LINK, label: 'Open popup' },
{ name: CLOSE_POPUP_LINK, label: 'Close popup' },
{ name: -99, label: '──────────', disabled: true },
]
export const NO_POPUP = 0
export const POPUP_LIST_TOP_OPTIONS = [
{ name: NO_POPUP, label: 'Select a popup group' },
{ name: -99, label: '──────────', disabled: true },
]
|