forked from juizi-com/volto-EmblaCarousel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema-base.js
More file actions
129 lines (128 loc) · 2.68 KB
/
schema-base.js
File metadata and controls
129 lines (128 loc) · 2.68 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
const emblaCarouselSchema = () => ({
title: 'Embla Carousel',
fieldsets: [
{
id: 'default',
title: 'Default',
fields: [
'slides',
'slidesToShow',
'displayMode',
'autoplay',
'autoplayDelay',
'alignment',
'isFullWidth',
'loop',
'hideArrows',
'hideDots',
'hideButtons',
'clickableSlides',
],
},
],
properties: {
slides: {
title: 'Slides',
widget: 'object_list',
schema: {
title: 'Slide',
titleField: 'heading',
fieldsets: [
{
id: 'default',
title: 'Default',
fields: ['heading', 'content', 'image', 'link', 'buttonText'],
},
],
properties: {
heading: {
title: 'Heading',
type: 'string',
},
content: {
title: 'Content',
type: 'text',
},
image: {
title: 'Image',
widget: 'object_browser',
mode: 'image',
allowExternals: false,
},
link: {
title: 'Link',
widget: 'object_browser',
mode: 'link',
allowExternals: true,
multi: false,
default: null,
},
buttonText: {
title: 'Button text',
type: 'string',
},
},
required: [],
},
},
displayMode: {
title: 'Display mode',
type: 'string',
choices: [
['full', 'Full (image + text)'],
['image-only', 'Image only'],
],
default: 'full',
},
alignment: {
title: 'Text alignment',
widget: 'align',
actions: ['left', 'center', 'right'],
default: 'left',
},
isFullWidth: {
title: 'Full width carousel',
type: 'boolean',
default: false,
},
loop: {
title: 'Loop infinitely',
type: 'boolean',
default: true,
},
slidesToShow: {
title: 'Slides to show',
type: 'number',
default: 1,
},
autoplay: {
title: 'Autoplay',
type: 'boolean',
},
autoplayDelay: {
title: 'Autoplay delay (ms)',
type: 'number',
default: 8000,
},
hideArrows: {
title: 'Hide arrows',
type: 'boolean',
},
hideDots: {
title: 'Hide dots',
type: 'boolean',
},
hideButtons: {
title: 'Hide buttons',
type: 'boolean',
default: false,
},
clickableSlides: {
title: 'Make slides clickable',
type: 'boolean',
default: false,
},
},
required: [],
});
export default emblaCarouselSchema;