@micromag/screen-timeline 0.4.71 → 0.4.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.d.ts +2 -2
- package/es/index.js +318 -461
- package/package.json +18 -17
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ForwardedRef } from 'react';
|
|
3
|
-
import { HeadingElement, TextElement, TextStyle, Color, Header, Footer, BackgroundElement, Alternatives } from '@micromag/core';
|
|
3
|
+
import { HeadingElement, TextElement, TextStyle, Color, Header, Footer, BackgroundElement, Alternatives, MediaElement } from '@micromag/core';
|
|
4
4
|
|
|
5
5
|
interface TimelineProps {
|
|
6
6
|
layout?: 'normal' | 'title-description-image' | 'title-image-description' | 'image-title-description';
|
|
@@ -23,7 +23,7 @@ interface TimelineProps {
|
|
|
23
23
|
active?: boolean;
|
|
24
24
|
preload?: boolean;
|
|
25
25
|
type?: string | null;
|
|
26
|
-
mediaRef?: ForwardedRef<
|
|
26
|
+
mediaRef?: ForwardedRef<MediaElement> | null;
|
|
27
27
|
className?: string | null;
|
|
28
28
|
}
|
|
29
29
|
declare function Timeline({ layout, title, items, itemTitleStyle, itemDescriptionStyle, withoutLine, bulletColor, lineColor, bulletShape, bulletFilled, illustrated, spacing: initialSpacing, itemBottomSpacing: initialItemBottomSpacing, header, footer, background, alternatives, current, active, preload, type, mediaRef: customMediaRef, className, }: TimelineProps): react_jsx_runtime.JSX.Element;
|
package/es/index.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { FormattedMessage, defineMessage } from 'react-intl';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
-
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
4
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
|
-
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
6
2
|
import classNames from 'classnames';
|
|
7
3
|
import { useMemo, useState, useEffect, useCallback } from 'react';
|
|
8
4
|
import { ScreenElement } from '@micromag/core/components';
|
|
9
|
-
import { useScreenSize, useViewerContext, useViewerWebView, useScreenRenderContext, usePlaybackContext, usePlaybackMediaRef,
|
|
10
|
-
import { useTrackScreenEvent,
|
|
5
|
+
import { useScreenSize, useViewerContext, useViewerWebView, useScreenRenderContext, usePlaybackContext, usePlaybackMediaRef, useViewerActivityDetected } from '@micromag/core/contexts';
|
|
6
|
+
import { useTrackScreenEvent, useDebounce, useTrackScreenMedia, useDimensionObserver } from '@micromag/core/hooks';
|
|
11
7
|
import { isTextFilled, getStyleFromColor, isHeaderFilled, isFooterFilled, getFooterProps, mergeRefs } from '@micromag/core/utils';
|
|
12
8
|
import Audio from '@micromag/element-audio';
|
|
13
9
|
import Background from '@micromag/element-background';
|
|
@@ -20,154 +16,122 @@ import Scroll from '@micromag/element-scroll';
|
|
|
20
16
|
import Text from '@micromag/element-text';
|
|
21
17
|
import Visual from '@micromag/element-visual';
|
|
22
18
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
23
|
-
import
|
|
24
|
-
import _extends from '@babel/runtime/helpers/extends';
|
|
19
|
+
import { c } from 'react/compiler-runtime';
|
|
25
20
|
|
|
26
21
|
var styles = {"container":"micromag-screen-timeline-container","background":"micromag-screen-timeline-background","content":"micromag-screen-timeline-content","empty":"micromag-screen-timeline-empty","emptyTitle":"micromag-screen-timeline-emptyTitle","item":"micromag-screen-timeline-item","element":"micromag-screen-timeline-element","hidden":"micromag-screen-timeline-hidden","body":"micromag-screen-timeline-body","timeline":"micromag-screen-timeline-timeline","line":"micromag-screen-timeline-line","bullet":"micromag-screen-timeline-bullet","title":"micromag-screen-timeline-title","description":"micromag-screen-timeline-description","imageContainer":"micromag-screen-timeline-imageContainer","image":"micromag-screen-timeline-image","video":"micromag-screen-timeline-video","callToAction":"micromag-screen-timeline-callToAction","disabled":"micromag-screen-timeline-disabled","isPlaceholder":"micromag-screen-timeline-isPlaceholder","scroll":"micromag-screen-timeline-scroll","circleBulletShape":"micromag-screen-timeline-circleBulletShape","withoutLines":"micromag-screen-timeline-withoutLines"};
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
function Timeline(
|
|
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
|
-
autoPlay = _ref3$autoPlay === void 0 ? false : _ref3$autoPlay,
|
|
115
|
-
_ref3$loop = _ref3.loop,
|
|
116
|
-
loop = _ref3$loop === void 0 ? false : _ref3$loop,
|
|
117
|
-
_ref3$media = _ref3.media,
|
|
118
|
-
audioAlternativeMedia = _ref3$media === void 0 ? null : _ref3$media,
|
|
119
|
-
_ref3$withSeekBar = _ref3.withSeekBar,
|
|
120
|
-
withSeekBar = _ref3$withSeekBar === void 0 ? false : _ref3$withSeekBar,
|
|
121
|
-
_ref3$withControls = _ref3.withControls,
|
|
122
|
-
withControls = _ref3$withControls === void 0 ? false : _ref3$withControls,
|
|
123
|
-
_ref3$color = _ref3.color,
|
|
124
|
-
color = _ref3$color === void 0 ? null : _ref3$color,
|
|
125
|
-
_ref3$progressColor = _ref3.progressColor,
|
|
126
|
-
progressColor = _ref3$progressColor === void 0 ? null : _ref3$progressColor;
|
|
127
|
-
var finalAudioAlternative = useMemo(function () {
|
|
128
|
-
return audioAlternative !== null ? _objectSpread(_objectSpread({}, audioAlternative), {}, {
|
|
129
|
-
autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
|
|
130
|
-
}) : null;
|
|
131
|
-
}, [audioAlternative, isPreview, isStatic, isCapture, autoPlay, current]);
|
|
132
|
-
var _useState = useState(false),
|
|
133
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
134
|
-
hasPlayed = _useState2[0],
|
|
135
|
-
setHasPlayed = _useState2[1];
|
|
136
|
-
var backgroundPlaying = current && (isView || isEdit) && (isCurrentMedia || !isView);
|
|
137
|
-
var audioPlaying = current && (isView || isEdit) && playing && (isCurrentMedia || !isView);
|
|
138
|
-
useEffect(function () {
|
|
23
|
+
const emptyItems = [null];
|
|
24
|
+
function Timeline({
|
|
25
|
+
layout = 'normal',
|
|
26
|
+
title = null,
|
|
27
|
+
items = emptyItems,
|
|
28
|
+
itemTitleStyle = null,
|
|
29
|
+
itemDescriptionStyle = null,
|
|
30
|
+
withoutLine = false,
|
|
31
|
+
bulletColor = null,
|
|
32
|
+
lineColor = null,
|
|
33
|
+
bulletShape = 'circle',
|
|
34
|
+
bulletFilled = true,
|
|
35
|
+
illustrated = false,
|
|
36
|
+
spacing: initialSpacing = null,
|
|
37
|
+
itemBottomSpacing: initialItemBottomSpacing = null,
|
|
38
|
+
header = null,
|
|
39
|
+
footer = null,
|
|
40
|
+
background = null,
|
|
41
|
+
alternatives = null,
|
|
42
|
+
current = true,
|
|
43
|
+
active = true,
|
|
44
|
+
preload = true,
|
|
45
|
+
// transitions,
|
|
46
|
+
// transitionStagger,
|
|
47
|
+
type = null,
|
|
48
|
+
mediaRef: customMediaRef = null,
|
|
49
|
+
className = null
|
|
50
|
+
}) {
|
|
51
|
+
const trackScreenEvent = useTrackScreenEvent(type);
|
|
52
|
+
const {
|
|
53
|
+
width,
|
|
54
|
+
height,
|
|
55
|
+
imageResolution,
|
|
56
|
+
resolution
|
|
57
|
+
} = useScreenSize();
|
|
58
|
+
const {
|
|
59
|
+
topHeight: viewerTopHeight,
|
|
60
|
+
bottomHeight: viewerBottomHeight,
|
|
61
|
+
bottomSidesWidth: viewerBottomSidesWidth
|
|
62
|
+
} = useViewerContext();
|
|
63
|
+
const {
|
|
64
|
+
open: openWebView
|
|
65
|
+
} = useViewerWebView();
|
|
66
|
+
const {
|
|
67
|
+
isView,
|
|
68
|
+
isPreview,
|
|
69
|
+
isPlaceholder,
|
|
70
|
+
isEdit,
|
|
71
|
+
isStatic,
|
|
72
|
+
isCapture
|
|
73
|
+
} = useScreenRenderContext();
|
|
74
|
+
const {
|
|
75
|
+
muted,
|
|
76
|
+
playing,
|
|
77
|
+
setControls,
|
|
78
|
+
setControlsSuggestPlay: _setControlsSuggestPlay,
|
|
79
|
+
setControlsTheme,
|
|
80
|
+
setPlaying,
|
|
81
|
+
controlsVisible: _controlsVisible,
|
|
82
|
+
showControls,
|
|
83
|
+
hideControls
|
|
84
|
+
} = usePlaybackContext();
|
|
85
|
+
const {
|
|
86
|
+
ref: mediaRef,
|
|
87
|
+
isCurrent: isCurrentMedia = false
|
|
88
|
+
} = usePlaybackMediaRef(current);
|
|
89
|
+
const {
|
|
90
|
+
audio: audioAlternative = null
|
|
91
|
+
} = alternatives || {};
|
|
92
|
+
const {
|
|
93
|
+
autoPlay = false,
|
|
94
|
+
loop = false,
|
|
95
|
+
media: audioAlternativeMedia = null,
|
|
96
|
+
withSeekBar = false,
|
|
97
|
+
withControls = false,
|
|
98
|
+
color = null,
|
|
99
|
+
progressColor = null
|
|
100
|
+
} = audioAlternative || {};
|
|
101
|
+
const finalAudioAlternative = useMemo(() => audioAlternative !== null ? {
|
|
102
|
+
...audioAlternative,
|
|
103
|
+
autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
|
|
104
|
+
} : null, [audioAlternative, isPreview, isStatic, isCapture, autoPlay, current]);
|
|
105
|
+
const [hasPlayed, setHasPlayed] = useState(false);
|
|
106
|
+
const backgroundPlaying = current && (isView || isEdit) && (isCurrentMedia || !isView);
|
|
107
|
+
const audioPlaying = current && (isView || isEdit) && playing && (isCurrentMedia || !isView);
|
|
108
|
+
useEffect(() => {
|
|
139
109
|
if (!current) {
|
|
140
|
-
return
|
|
110
|
+
return () => {};
|
|
141
111
|
}
|
|
142
112
|
setControlsTheme({
|
|
143
113
|
seekBarOnly: withSeekBar && !withControls,
|
|
144
|
-
color
|
|
145
|
-
progressColor
|
|
114
|
+
color,
|
|
115
|
+
progressColor
|
|
146
116
|
});
|
|
147
117
|
if (withControls || withSeekBar) {
|
|
148
118
|
setControls(true);
|
|
149
119
|
} else {
|
|
150
120
|
setControls(false);
|
|
151
121
|
}
|
|
152
|
-
return
|
|
122
|
+
return () => {
|
|
153
123
|
if (withControls || withSeekBar) {
|
|
154
124
|
setControls(false);
|
|
155
125
|
}
|
|
156
126
|
};
|
|
157
127
|
}, [current, withControls, setControls, withSeekBar, color, progressColor]);
|
|
158
|
-
useEffect(
|
|
128
|
+
useEffect(() => {
|
|
159
129
|
if (current && autoPlay) {
|
|
160
130
|
setPlaying(true);
|
|
161
131
|
}
|
|
162
132
|
}, [current, autoPlay]);
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
element: viewerContainer,
|
|
166
|
-
disabled: !isView,
|
|
167
|
-
timeout: 2000
|
|
168
|
-
}),
|
|
169
|
-
activityDetected = _useActivityDetector.detected;
|
|
170
|
-
var toggleControlsVisibility = useCallback(function () {
|
|
133
|
+
const activityDetected = useViewerActivityDetected();
|
|
134
|
+
const toggleControlsVisibility = useCallback(() => {
|
|
171
135
|
if (activityDetected) {
|
|
172
136
|
showControls();
|
|
173
137
|
} else {
|
|
@@ -175,95 +139,74 @@ function Timeline(_ref) {
|
|
|
175
139
|
}
|
|
176
140
|
}, [activityDetected, showControls, hideControls]);
|
|
177
141
|
useDebounce(toggleControlsVisibility, activityDetected, 1000);
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
var _useState5 = useState(null),
|
|
184
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
185
|
-
duration = _useState6[0],
|
|
186
|
-
setDuration = _useState6[1];
|
|
187
|
-
var _useState7 = useState(audioAlternativeMedia === null),
|
|
188
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
189
|
-
audioReady = _useState8[0],
|
|
190
|
-
setAudioReady = _useState8[1];
|
|
191
|
-
var onAudioReady = useCallback(function () {
|
|
142
|
+
const trackScreenMedia = useTrackScreenMedia('video');
|
|
143
|
+
const [_currentTime, setCurrentTime] = useState(null);
|
|
144
|
+
const [duration, setDuration] = useState(null);
|
|
145
|
+
const [audioReady, setAudioReady] = useState(audioAlternativeMedia === null);
|
|
146
|
+
const onAudioReady = useCallback(() => {
|
|
192
147
|
setAudioReady(true);
|
|
193
148
|
}, [setAudioReady]);
|
|
194
|
-
|
|
195
|
-
var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
149
|
+
const onAudioTimeUpdate = useCallback((time = null) => {
|
|
196
150
|
if (time !== null && typeof time.currentTarget !== 'undefined') {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
151
|
+
const {
|
|
152
|
+
currentTime: targetTime = 0
|
|
153
|
+
} = time.currentTarget || {};
|
|
200
154
|
setCurrentTime(targetTime);
|
|
201
155
|
} else {
|
|
202
156
|
setCurrentTime(0);
|
|
203
157
|
}
|
|
204
158
|
}, [duration, setCurrentTime]);
|
|
205
|
-
|
|
206
|
-
trackScreenMedia(audioAlternativeMedia,
|
|
159
|
+
const onAudioProgressStep = useCallback((step, meta) => {
|
|
160
|
+
trackScreenMedia(audioAlternativeMedia, `progress_${Math.round(step * 100, 10)}%`, meta);
|
|
207
161
|
}, [trackScreenMedia, audioAlternativeMedia]);
|
|
208
|
-
|
|
162
|
+
const onAudioDurationChange = useCallback(dur => {
|
|
209
163
|
setDuration(dur);
|
|
210
164
|
}, [setDuration]);
|
|
211
|
-
|
|
212
|
-
|
|
165
|
+
const onAudioPlay = useCallback(({
|
|
166
|
+
initial
|
|
167
|
+
}) => {
|
|
213
168
|
if (!hasPlayed) {
|
|
214
169
|
setHasPlayed(true);
|
|
215
170
|
}
|
|
216
171
|
trackScreenMedia(audioAlternativeMedia, initial ? 'play' : 'resume');
|
|
217
172
|
}, [trackScreenMedia, audioAlternativeMedia]);
|
|
218
|
-
|
|
219
|
-
|
|
173
|
+
const onAudioPause = useCallback(({
|
|
174
|
+
midway
|
|
175
|
+
}) => {
|
|
220
176
|
trackScreenMedia(audioAlternativeMedia, midway ? 'pause' : 'ended');
|
|
221
177
|
}, [trackScreenMedia, audioAlternativeMedia]);
|
|
222
|
-
|
|
223
|
-
if (
|
|
178
|
+
const onAudioSeeked = useCallback(time_0 => {
|
|
179
|
+
if (time_0 > 0) {
|
|
224
180
|
trackScreenMedia(audioAlternativeMedia, 'seek', {
|
|
225
|
-
currentTime:
|
|
181
|
+
currentTime: time_0
|
|
226
182
|
});
|
|
227
183
|
}
|
|
228
184
|
}, [trackScreenMedia, audioAlternativeMedia]);
|
|
229
|
-
|
|
185
|
+
const onAudioEnded = useCallback(() => {
|
|
230
186
|
if (current && !loop) {
|
|
231
187
|
setPlaying(false);
|
|
232
188
|
}
|
|
233
189
|
}, [loop, current]);
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
return isPlaceholder ? 4 : initialItemBottomSpacing !== null ? Math.max(0, initialItemBottomSpacing || 0) : 20;
|
|
245
|
-
}, [isPlaceholder, initialItemBottomSpacing]);
|
|
246
|
-
var itemsCount = finalItems !== null ? finalItems.length : 0;
|
|
247
|
-
var hasItems = finalItems !== null && itemsCount;
|
|
248
|
-
var imagesCount = hasItems ? finalItems.reduce(function (acc, curr) {
|
|
249
|
-
var _ref7 = curr || {},
|
|
250
|
-
_ref7$image = _ref7.image,
|
|
251
|
-
image = _ref7$image === void 0 ? null : _ref7$image;
|
|
190
|
+
const finalItems = useMemo(() => isPlaceholder ? [...new Array(5)].map(() => ({})) : items || [null], [isPlaceholder, items]);
|
|
191
|
+
const hasTitle = isTextFilled(title);
|
|
192
|
+
const spacing = useMemo(() => initialSpacing !== null ? Math.max(0, initialSpacing || 0) : 20, [initialSpacing]);
|
|
193
|
+
const itemBottomSpacing = useMemo(() => isPlaceholder ? 4 : initialItemBottomSpacing !== null ? Math.max(0, initialItemBottomSpacing || 0) : 20, [isPlaceholder, initialItemBottomSpacing]);
|
|
194
|
+
const itemsCount = finalItems !== null ? finalItems.length : 0;
|
|
195
|
+
const hasItems = finalItems !== null && itemsCount;
|
|
196
|
+
const imagesCount = hasItems ? finalItems.reduce((acc, curr) => {
|
|
197
|
+
const {
|
|
198
|
+
image = null
|
|
199
|
+
} = curr || {};
|
|
252
200
|
return acc + (image !== null ? 1 : 0);
|
|
253
201
|
}, 0) : 0;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
imagesLoaded = _useState0[0],
|
|
257
|
-
setImagesLoaded = _useState0[1];
|
|
258
|
-
var ready = imagesLoaded >= imagesCount && audioReady;
|
|
202
|
+
const [imagesLoaded, setImagesLoaded] = useState(0);
|
|
203
|
+
const ready = imagesLoaded >= imagesCount && audioReady;
|
|
259
204
|
// const transitionsPlaying = current && ready;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
setImagesLoaded(
|
|
265
|
-
return count + 1;
|
|
266
|
-
});
|
|
205
|
+
const transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
206
|
+
const scrollingDisabled = !isEdit && transitionDisabled || !current;
|
|
207
|
+
const mediaShouldLoad = current || preload;
|
|
208
|
+
const onImageLoaded = useCallback(() => {
|
|
209
|
+
setImagesLoaded(count => count + 1);
|
|
267
210
|
}, [setImagesLoaded]);
|
|
268
211
|
|
|
269
212
|
// const {
|
|
@@ -277,15 +220,15 @@ function Timeline(_ref) {
|
|
|
277
220
|
// const { width: firstLineWidth = null } = firstLineContentRect || {};
|
|
278
221
|
// const { width: firstContentWidth = null } = firstContentRect || {};
|
|
279
222
|
|
|
280
|
-
|
|
281
|
-
firstLineRef
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
firstContentRef
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
223
|
+
const {
|
|
224
|
+
ref: firstLineRef,
|
|
225
|
+
width: firstLineWidth = null
|
|
226
|
+
} = useDimensionObserver();
|
|
227
|
+
const {
|
|
228
|
+
ref: firstContentRef,
|
|
229
|
+
width: firstContentWidth = null
|
|
230
|
+
} = useDimensionObserver();
|
|
231
|
+
const imageWidth = (firstContentWidth ?? 0) - (firstLineWidth ?? 0);
|
|
289
232
|
|
|
290
233
|
// const firstLineRef = useRef(null);
|
|
291
234
|
// const firstContentRef = useRef(null);
|
|
@@ -307,33 +250,33 @@ function Timeline(_ref) {
|
|
|
307
250
|
// console.log('legacyImageWidth', legacyImageWidth);
|
|
308
251
|
// console.log('imageWidth', imageWidth);
|
|
309
252
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
var titleIndex = elementsTypes.indexOf('title');
|
|
323
|
-
var imageIndex = elementsTypes.indexOf('image');
|
|
253
|
+
const timelineElements = (finalItems || []).map((item, itemI) => {
|
|
254
|
+
const {
|
|
255
|
+
title: itemTitle = null,
|
|
256
|
+
description = null,
|
|
257
|
+
image: image_0 = null
|
|
258
|
+
} = item || {};
|
|
259
|
+
const hasItemTitle = isTextFilled(itemTitle);
|
|
260
|
+
const hasDescription = isTextFilled(description);
|
|
261
|
+
const hasImage = image_0 !== null;
|
|
262
|
+
const elementsTypes = (layout === 'normal' ? 'title-description-image' : layout).split('-');
|
|
263
|
+
const titleIndex = elementsTypes.indexOf('title');
|
|
264
|
+
const imageIndex = elementsTypes.indexOf('image');
|
|
324
265
|
if (!illustrated) {
|
|
325
266
|
elementsTypes.splice(imageIndex, 1);
|
|
326
267
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
titleTextStyle
|
|
330
|
-
|
|
331
|
-
|
|
268
|
+
const typesCount = elementsTypes.length;
|
|
269
|
+
const {
|
|
270
|
+
textStyle: titleTextStyle
|
|
271
|
+
} = itemTitle || {};
|
|
272
|
+
const {
|
|
273
|
+
textStyle: descriptionTextStyle
|
|
274
|
+
} = description || {};
|
|
332
275
|
return /*#__PURE__*/jsx("div", {
|
|
333
276
|
className: styles.item,
|
|
334
|
-
children: elementsTypes.map(
|
|
335
|
-
|
|
336
|
-
|
|
277
|
+
children: elementsTypes.map((elementType, typeI) => {
|
|
278
|
+
let elementContent = null;
|
|
279
|
+
let hasElement = false;
|
|
337
280
|
switch (elementType) {
|
|
338
281
|
case 'title':
|
|
339
282
|
hasElement = hasItemTitle;
|
|
@@ -343,16 +286,17 @@ function Timeline(_ref) {
|
|
|
343
286
|
placeholder: "title",
|
|
344
287
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
345
288
|
id: "bmO4Ss",
|
|
346
|
-
defaultMessage:
|
|
347
|
-
"type": 0,
|
|
348
|
-
"value": "Entry Title"
|
|
349
|
-
}]
|
|
289
|
+
defaultMessage: "Entry Title"
|
|
350
290
|
}),
|
|
351
291
|
emptyClassName: styles.empty,
|
|
352
292
|
isEmpty: !hasItemTitle,
|
|
353
|
-
children: hasItemTitle ? /*#__PURE__*/jsx(Heading,
|
|
354
|
-
|
|
355
|
-
|
|
293
|
+
children: hasItemTitle ? /*#__PURE__*/jsx(Heading, {
|
|
294
|
+
...itemTitle,
|
|
295
|
+
textStyle: {
|
|
296
|
+
...(itemTitleStyle || null),
|
|
297
|
+
...titleTextStyle
|
|
298
|
+
}
|
|
299
|
+
}) : null
|
|
356
300
|
})
|
|
357
301
|
});
|
|
358
302
|
break;
|
|
@@ -364,10 +308,7 @@ function Timeline(_ref) {
|
|
|
364
308
|
placeholder: "image",
|
|
365
309
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
366
310
|
id: "ebsPd4",
|
|
367
|
-
defaultMessage:
|
|
368
|
-
"type": 0,
|
|
369
|
-
"value": "Image"
|
|
370
|
-
}]
|
|
311
|
+
defaultMessage: "Image"
|
|
371
312
|
}),
|
|
372
313
|
emptyClassName: styles.empty,
|
|
373
314
|
isEmpty: !hasImage,
|
|
@@ -375,7 +316,7 @@ function Timeline(_ref) {
|
|
|
375
316
|
className: styles.image,
|
|
376
317
|
videoClassName: styles.video,
|
|
377
318
|
loadingMode: "lazy",
|
|
378
|
-
media:
|
|
319
|
+
media: image_0,
|
|
379
320
|
width: imageWidth,
|
|
380
321
|
resolution: resolution,
|
|
381
322
|
playing: backgroundPlaying,
|
|
@@ -395,16 +336,17 @@ function Timeline(_ref) {
|
|
|
395
336
|
placeholder: "text",
|
|
396
337
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
397
338
|
id: "507VAi",
|
|
398
|
-
defaultMessage:
|
|
399
|
-
"type": 0,
|
|
400
|
-
"value": "Description"
|
|
401
|
-
}]
|
|
339
|
+
defaultMessage: "Description"
|
|
402
340
|
}),
|
|
403
341
|
emptyClassName: styles.empty,
|
|
404
342
|
isEmpty: !hasDescription,
|
|
405
|
-
children: hasDescription ? /*#__PURE__*/jsx(Text,
|
|
406
|
-
|
|
407
|
-
|
|
343
|
+
children: hasDescription ? /*#__PURE__*/jsx(Text, {
|
|
344
|
+
...description,
|
|
345
|
+
textStyle: {
|
|
346
|
+
...(itemDescriptionStyle || null),
|
|
347
|
+
...descriptionTextStyle
|
|
348
|
+
}
|
|
349
|
+
}) : null
|
|
408
350
|
})
|
|
409
351
|
});
|
|
410
352
|
break;
|
|
@@ -412,26 +354,39 @@ function Timeline(_ref) {
|
|
|
412
354
|
elementContent = null;
|
|
413
355
|
hasElement = false;
|
|
414
356
|
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
357
|
+
const firstItem = itemI === 0;
|
|
358
|
+
const lastItem = itemI === itemsCount - 1;
|
|
359
|
+
const lastType = typeI === typesCount - 1;
|
|
360
|
+
const topLineHidden = firstItem && typeI <= titleIndex || lastItem && typeI > titleIndex;
|
|
361
|
+
const bottomLineHidden = firstItem && typeI < titleIndex || lastItem && typeI >= titleIndex;
|
|
420
362
|
return /*#__PURE__*/jsxs("div", {
|
|
421
|
-
className: classNames([styles.element, styles[
|
|
363
|
+
className: classNames([styles.element, styles[`element-${elementType}`], {
|
|
364
|
+
[styles.hidden]: (isView || isStatic) && !hasElement
|
|
365
|
+
}]),
|
|
422
366
|
ref: itemI === 0 ? firstContentRef : null,
|
|
423
367
|
children: [!withoutLine ? /*#__PURE__*/jsxs("div", {
|
|
424
368
|
className: styles.timeline,
|
|
425
369
|
ref: itemI === 0 ? firstLineRef : null,
|
|
426
370
|
children: [/*#__PURE__*/jsx("div", {
|
|
427
|
-
className: classNames([styles.line,
|
|
428
|
-
|
|
371
|
+
className: classNames([styles.line, {
|
|
372
|
+
[styles.hidden]: topLineHidden
|
|
373
|
+
}]),
|
|
374
|
+
style: {
|
|
375
|
+
...(!topLineHidden ? getStyleFromColor(lineColor, 'backgroundColor') : null)
|
|
376
|
+
}
|
|
429
377
|
}), elementType === 'title' ? /*#__PURE__*/jsx("div", {
|
|
430
378
|
className: styles.bullet,
|
|
431
|
-
style:
|
|
379
|
+
style: {
|
|
380
|
+
...getStyleFromColor(bulletColor, 'borderColor'),
|
|
381
|
+
...(bulletFilled ? getStyleFromColor(bulletColor, 'backgroundColor') : null)
|
|
382
|
+
}
|
|
432
383
|
}) : null, /*#__PURE__*/jsx("div", {
|
|
433
|
-
className: classNames([styles.line,
|
|
434
|
-
|
|
384
|
+
className: classNames([styles.line, {
|
|
385
|
+
[styles.hidden]: bottomLineHidden
|
|
386
|
+
}]),
|
|
387
|
+
style: {
|
|
388
|
+
...(!bottomLineHidden ? getStyleFromColor(lineColor, 'backgroundColor') : null)
|
|
389
|
+
}
|
|
435
390
|
})]
|
|
436
391
|
}) : null, /*#__PURE__*/jsx("div", {
|
|
437
392
|
className: styles.body,
|
|
@@ -440,49 +395,50 @@ function Timeline(_ref) {
|
|
|
440
395
|
},
|
|
441
396
|
children: elementContent
|
|
442
397
|
})]
|
|
443
|
-
},
|
|
398
|
+
}, `element-${elementType}`);
|
|
444
399
|
})
|
|
445
|
-
},
|
|
400
|
+
}, `item-${itemI}`);
|
|
446
401
|
});
|
|
447
402
|
|
|
448
403
|
// Call to Action
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
isView
|
|
453
|
-
current
|
|
454
|
-
openWebView
|
|
455
|
-
isPreview
|
|
404
|
+
const hasHeader = isHeaderFilled(header);
|
|
405
|
+
const hasFooter = isFooterFilled(footer);
|
|
406
|
+
const footerProps = getFooterProps(footer, {
|
|
407
|
+
isView,
|
|
408
|
+
current,
|
|
409
|
+
openWebView,
|
|
410
|
+
isPreview
|
|
456
411
|
});
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
var initial = _ref12.initial;
|
|
467
|
-
if (initial) {
|
|
412
|
+
const [scrolledBottom, setScrolledBottom] = useState(false);
|
|
413
|
+
const {
|
|
414
|
+
ref: footerRef,
|
|
415
|
+
height: footerHeight = 0
|
|
416
|
+
} = useDimensionObserver();
|
|
417
|
+
const onScrolledBottom = useCallback(({
|
|
418
|
+
initial: initial_0
|
|
419
|
+
}) => {
|
|
420
|
+
if (initial_0) {
|
|
468
421
|
trackScreenEvent('scroll', 'Screen');
|
|
469
422
|
}
|
|
470
423
|
setScrolledBottom(true);
|
|
471
424
|
}, [trackScreenEvent]);
|
|
472
|
-
|
|
425
|
+
const onScrolledNotBottom = useCallback(() => {
|
|
473
426
|
setScrolledBottom(false);
|
|
474
427
|
}, [setScrolledBottom]);
|
|
475
|
-
|
|
476
|
-
var trigger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
428
|
+
const onScrolledTrigger = useCallback((trigger = null) => {
|
|
477
429
|
if (trigger !== null) {
|
|
478
|
-
|
|
430
|
+
const scrollPercent = Math.round(trigger * 100);
|
|
479
431
|
trackScreenEvent('scroll', scrollPercent, {
|
|
480
|
-
scrollPercent
|
|
432
|
+
scrollPercent
|
|
481
433
|
});
|
|
482
434
|
}
|
|
483
435
|
}, [trackScreenEvent]);
|
|
484
436
|
return /*#__PURE__*/jsxs("div", {
|
|
485
|
-
className: classNames([styles.container, className,
|
|
437
|
+
className: classNames([styles.container, className, {
|
|
438
|
+
[styles.isPlaceholder]: isPlaceholder,
|
|
439
|
+
[styles[`${bulletShape}BulletShape`]]: bulletShape !== null,
|
|
440
|
+
[styles.withoutLines]: itemsCount < 2
|
|
441
|
+
}]),
|
|
486
442
|
"data-screen-ready": ready,
|
|
487
443
|
children: [/*#__PURE__*/jsxs(Container, {
|
|
488
444
|
width: width,
|
|
@@ -507,36 +463,41 @@ function Timeline(_ref) {
|
|
|
507
463
|
style: {
|
|
508
464
|
paddingBottom: spacing
|
|
509
465
|
},
|
|
510
|
-
children: /*#__PURE__*/jsx(Header,
|
|
466
|
+
children: /*#__PURE__*/jsx(Header, {
|
|
467
|
+
...header
|
|
468
|
+
})
|
|
511
469
|
}) : null, /*#__PURE__*/jsx(ScreenElement, {
|
|
512
470
|
placeholder: "Title",
|
|
513
471
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
514
472
|
id: "BSTWf8",
|
|
515
|
-
defaultMessage:
|
|
516
|
-
"type": 0,
|
|
517
|
-
"value": "Title"
|
|
518
|
-
}]
|
|
473
|
+
defaultMessage: "Title"
|
|
519
474
|
}),
|
|
520
475
|
emptyClassName: classNames([styles.empty, styles.emptyTitle]),
|
|
521
476
|
isEmpty: !hasTitle,
|
|
522
|
-
children: hasTitle ? /*#__PURE__*/jsx(Heading,
|
|
523
|
-
className: styles.title
|
|
524
|
-
|
|
477
|
+
children: hasTitle ? /*#__PURE__*/jsx(Heading, {
|
|
478
|
+
className: styles.title,
|
|
479
|
+
...title
|
|
480
|
+
}) : null
|
|
525
481
|
}), timelineElements]
|
|
526
482
|
})
|
|
527
483
|
}), !isPlaceholder && hasFooter ? /*#__PURE__*/jsx("div", {
|
|
528
484
|
ref: footerRef,
|
|
529
|
-
className: classNames([styles.callToAction,
|
|
485
|
+
className: classNames([styles.callToAction, {
|
|
486
|
+
[styles.disabled]: !scrolledBottom
|
|
487
|
+
}]),
|
|
530
488
|
style: {
|
|
531
|
-
transform: current && !isPreview ?
|
|
489
|
+
transform: current && !isPreview ? `translate(0, -${viewerBottomHeight}px)` : null,
|
|
532
490
|
paddingLeft: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
533
491
|
paddingRight: Math.max(spacing / 2, viewerBottomSidesWidth),
|
|
534
492
|
paddingTop: spacing / 2,
|
|
535
493
|
paddingBottom: spacing / 2
|
|
536
494
|
},
|
|
537
|
-
children: /*#__PURE__*/jsx(Footer,
|
|
495
|
+
children: /*#__PURE__*/jsx(Footer, {
|
|
496
|
+
...footerProps
|
|
497
|
+
})
|
|
538
498
|
}) : null]
|
|
539
|
-
}), audioAlternativeMedia !== null ? /*#__PURE__*/jsx(Audio,
|
|
499
|
+
}), audioAlternativeMedia !== null ? /*#__PURE__*/jsx(Audio, {
|
|
500
|
+
...finalAudioAlternative,
|
|
540
501
|
paused: !audioPlaying,
|
|
541
502
|
mediaRef: mergeRefs(mediaRef, customMediaRef),
|
|
542
503
|
muted: muted,
|
|
@@ -550,7 +511,7 @@ function Timeline(_ref) {
|
|
|
550
511
|
onDurationChange: onAudioDurationChange,
|
|
551
512
|
onSeeked: onAudioSeeked,
|
|
552
513
|
onEnded: onAudioEnded
|
|
553
|
-
})
|
|
514
|
+
}) : null, !isPlaceholder ? /*#__PURE__*/jsx(Background, {
|
|
554
515
|
background: background,
|
|
555
516
|
width: width,
|
|
556
517
|
height: height,
|
|
@@ -565,11 +526,30 @@ function Timeline(_ref) {
|
|
|
565
526
|
});
|
|
566
527
|
}
|
|
567
528
|
|
|
568
|
-
function TimelineIllustratedScreen(
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
529
|
+
function TimelineIllustratedScreen(t0) {
|
|
530
|
+
const $ = c(4);
|
|
531
|
+
let props;
|
|
532
|
+
if ($[0] !== t0) {
|
|
533
|
+
({
|
|
534
|
+
...props
|
|
535
|
+
} = t0);
|
|
536
|
+
$[0] = t0;
|
|
537
|
+
$[1] = props;
|
|
538
|
+
} else {
|
|
539
|
+
props = $[1];
|
|
540
|
+
}
|
|
541
|
+
let t1;
|
|
542
|
+
if ($[2] !== props) {
|
|
543
|
+
t1 = /*#__PURE__*/jsx(Timeline, {
|
|
544
|
+
...props,
|
|
545
|
+
illustrated: true
|
|
546
|
+
});
|
|
547
|
+
$[2] = props;
|
|
548
|
+
$[3] = t1;
|
|
549
|
+
} else {
|
|
550
|
+
t1 = $[3];
|
|
551
|
+
}
|
|
552
|
+
return t1;
|
|
573
553
|
}
|
|
574
554
|
|
|
575
555
|
var definition = [{
|
|
@@ -578,19 +558,13 @@ var definition = [{
|
|
|
578
558
|
group: {
|
|
579
559
|
label: defineMessage({
|
|
580
560
|
id: "cGItoy",
|
|
581
|
-
defaultMessage:
|
|
582
|
-
"type": 0,
|
|
583
|
-
"value": "List"
|
|
584
|
-
}]
|
|
561
|
+
defaultMessage: "List"
|
|
585
562
|
}),
|
|
586
563
|
order: 8
|
|
587
564
|
},
|
|
588
565
|
title: defineMessage({
|
|
589
566
|
id: "GzoKNb",
|
|
590
|
-
defaultMessage:
|
|
591
|
-
"type": 0,
|
|
592
|
-
"value": "Timeline"
|
|
593
|
-
}]
|
|
567
|
+
defaultMessage: "Timeline"
|
|
594
568
|
}),
|
|
595
569
|
component: Timeline,
|
|
596
570
|
layouts: ['normal'],
|
|
@@ -604,10 +578,7 @@ var definition = [{
|
|
|
604
578
|
},
|
|
605
579
|
label: defineMessage({
|
|
606
580
|
id: "N25iDO",
|
|
607
|
-
defaultMessage:
|
|
608
|
-
"type": 0,
|
|
609
|
-
"value": "Title"
|
|
610
|
-
}]
|
|
581
|
+
defaultMessage: "Title"
|
|
611
582
|
})
|
|
612
583
|
}, {
|
|
613
584
|
name: 'items',
|
|
@@ -622,10 +593,7 @@ var definition = [{
|
|
|
622
593
|
},
|
|
623
594
|
label: defineMessage({
|
|
624
595
|
id: "3ifj0j",
|
|
625
|
-
defaultMessage:
|
|
626
|
-
"type": 0,
|
|
627
|
-
"value": "Entries"
|
|
628
|
-
}]
|
|
596
|
+
defaultMessage: "Entries"
|
|
629
597
|
})
|
|
630
598
|
}, {
|
|
631
599
|
name: 'spacing',
|
|
@@ -634,19 +602,13 @@ var definition = [{
|
|
|
634
602
|
isHorizontal: true,
|
|
635
603
|
label: defineMessage({
|
|
636
604
|
id: "Zpl5bJ",
|
|
637
|
-
defaultMessage:
|
|
638
|
-
"type": 0,
|
|
639
|
-
"value": "Spacing"
|
|
640
|
-
}]
|
|
605
|
+
defaultMessage: "Spacing"
|
|
641
606
|
})
|
|
642
607
|
}, {
|
|
643
608
|
type: 'fields',
|
|
644
609
|
label: defineMessage({
|
|
645
610
|
id: "xac4z/",
|
|
646
|
-
defaultMessage:
|
|
647
|
-
"type": 0,
|
|
648
|
-
"value": "Entry styles"
|
|
649
|
-
}]
|
|
611
|
+
defaultMessage: "Entry styles"
|
|
650
612
|
}),
|
|
651
613
|
isList: true,
|
|
652
614
|
fields: [{
|
|
@@ -654,20 +616,14 @@ var definition = [{
|
|
|
654
616
|
type: 'text-style-form',
|
|
655
617
|
label: defineMessage({
|
|
656
618
|
id: "+AEVbJ",
|
|
657
|
-
defaultMessage:
|
|
658
|
-
"type": 0,
|
|
659
|
-
"value": "Title"
|
|
660
|
-
}]
|
|
619
|
+
defaultMessage: "Title"
|
|
661
620
|
})
|
|
662
621
|
}, {
|
|
663
622
|
name: 'itemDescriptionStyle',
|
|
664
623
|
type: 'text-style-form',
|
|
665
624
|
label: defineMessage({
|
|
666
625
|
id: "ZCe0r4",
|
|
667
|
-
defaultMessage:
|
|
668
|
-
"type": 0,
|
|
669
|
-
"value": "Description"
|
|
670
|
-
}]
|
|
626
|
+
defaultMessage: "Description"
|
|
671
627
|
})
|
|
672
628
|
}, {
|
|
673
629
|
name: 'itemBottomSpacing',
|
|
@@ -676,10 +632,7 @@ var definition = [{
|
|
|
676
632
|
isHorizontal: true,
|
|
677
633
|
label: defineMessage({
|
|
678
634
|
id: "Lp0bG4",
|
|
679
|
-
defaultMessage:
|
|
680
|
-
"type": 0,
|
|
681
|
-
"value": "Bottom spacing"
|
|
682
|
-
}]
|
|
635
|
+
defaultMessage: "Bottom spacing"
|
|
683
636
|
})
|
|
684
637
|
}]
|
|
685
638
|
}, {
|
|
@@ -690,27 +643,18 @@ var definition = [{
|
|
|
690
643
|
value: 'circle',
|
|
691
644
|
label: defineMessage({
|
|
692
645
|
id: "+uInZz",
|
|
693
|
-
defaultMessage:
|
|
694
|
-
"type": 0,
|
|
695
|
-
"value": "Circle"
|
|
696
|
-
}]
|
|
646
|
+
defaultMessage: "Circle"
|
|
697
647
|
})
|
|
698
648
|
}, {
|
|
699
649
|
value: 'square',
|
|
700
650
|
label: defineMessage({
|
|
701
651
|
id: "fusnxf",
|
|
702
|
-
defaultMessage:
|
|
703
|
-
"type": 0,
|
|
704
|
-
"value": "Square"
|
|
705
|
-
}]
|
|
652
|
+
defaultMessage: "Square"
|
|
706
653
|
})
|
|
707
654
|
}],
|
|
708
655
|
label: defineMessage({
|
|
709
656
|
id: "twTaAZ",
|
|
710
|
-
defaultMessage:
|
|
711
|
-
"type": 0,
|
|
712
|
-
"value": "Bullet shape"
|
|
713
|
-
}]
|
|
657
|
+
defaultMessage: "Bullet shape"
|
|
714
658
|
})
|
|
715
659
|
}, {
|
|
716
660
|
name: 'withoutLine',
|
|
@@ -718,10 +662,7 @@ var definition = [{
|
|
|
718
662
|
defaultValue: false,
|
|
719
663
|
label: defineMessage({
|
|
720
664
|
id: "N4lZhy",
|
|
721
|
-
defaultMessage:
|
|
722
|
-
"type": 0,
|
|
723
|
-
"value": "Without line"
|
|
724
|
-
}]
|
|
665
|
+
defaultMessage: "Without line"
|
|
725
666
|
})
|
|
726
667
|
}, {
|
|
727
668
|
name: 'bulletFilled',
|
|
@@ -729,10 +670,7 @@ var definition = [{
|
|
|
729
670
|
defaultValue: false,
|
|
730
671
|
label: defineMessage({
|
|
731
672
|
id: "YWcp4v",
|
|
732
|
-
defaultMessage:
|
|
733
|
-
"type": 0,
|
|
734
|
-
"value": "Bullet filled"
|
|
735
|
-
}]
|
|
673
|
+
defaultMessage: "Bullet filled"
|
|
736
674
|
})
|
|
737
675
|
}, {
|
|
738
676
|
name: 'bulletColor',
|
|
@@ -743,10 +681,7 @@ var definition = [{
|
|
|
743
681
|
},
|
|
744
682
|
label: defineMessage({
|
|
745
683
|
id: "uNpHnA",
|
|
746
|
-
defaultMessage:
|
|
747
|
-
"type": 0,
|
|
748
|
-
"value": "Bullet color"
|
|
749
|
-
}]
|
|
684
|
+
defaultMessage: "Bullet color"
|
|
750
685
|
})
|
|
751
686
|
}, {
|
|
752
687
|
name: 'lineColor',
|
|
@@ -757,40 +692,28 @@ var definition = [{
|
|
|
757
692
|
},
|
|
758
693
|
label: defineMessage({
|
|
759
694
|
id: "RHMS2f",
|
|
760
|
-
defaultMessage:
|
|
761
|
-
"type": 0,
|
|
762
|
-
"value": "Line color"
|
|
763
|
-
}]
|
|
695
|
+
defaultMessage: "Line color"
|
|
764
696
|
})
|
|
765
697
|
}, {
|
|
766
698
|
name: 'alternatives',
|
|
767
699
|
type: 'alternatives',
|
|
768
700
|
label: defineMessage({
|
|
769
701
|
id: "68NE9W",
|
|
770
|
-
defaultMessage:
|
|
771
|
-
"type": 0,
|
|
772
|
-
"value": "Alternatives"
|
|
773
|
-
}]
|
|
702
|
+
defaultMessage: "Alternatives"
|
|
774
703
|
})
|
|
775
704
|
}, {
|
|
776
705
|
name: 'background',
|
|
777
706
|
type: 'background',
|
|
778
707
|
label: defineMessage({
|
|
779
708
|
id: "+MPZRu",
|
|
780
|
-
defaultMessage:
|
|
781
|
-
"type": 0,
|
|
782
|
-
"value": "Background"
|
|
783
|
-
}]
|
|
709
|
+
defaultMessage: "Background"
|
|
784
710
|
})
|
|
785
711
|
}, {
|
|
786
712
|
name: 'header',
|
|
787
713
|
type: 'header',
|
|
788
714
|
label: defineMessage({
|
|
789
715
|
id: "rhuDxI",
|
|
790
|
-
defaultMessage:
|
|
791
|
-
"type": 0,
|
|
792
|
-
"value": "Header"
|
|
793
|
-
}]
|
|
716
|
+
defaultMessage: "Header"
|
|
794
717
|
}),
|
|
795
718
|
theme: {
|
|
796
719
|
badge: {
|
|
@@ -805,10 +728,7 @@ var definition = [{
|
|
|
805
728
|
type: 'footer',
|
|
806
729
|
label: defineMessage({
|
|
807
730
|
id: "g4nybp",
|
|
808
|
-
defaultMessage:
|
|
809
|
-
"type": 0,
|
|
810
|
-
"value": "Footer"
|
|
811
|
-
}]
|
|
731
|
+
defaultMessage: "Footer"
|
|
812
732
|
}),
|
|
813
733
|
theme: {
|
|
814
734
|
callToAction: {
|
|
@@ -825,19 +745,13 @@ var definition = [{
|
|
|
825
745
|
group: {
|
|
826
746
|
label: defineMessage({
|
|
827
747
|
id: "cGItoy",
|
|
828
|
-
defaultMessage:
|
|
829
|
-
"type": 0,
|
|
830
|
-
"value": "List"
|
|
831
|
-
}]
|
|
748
|
+
defaultMessage: "List"
|
|
832
749
|
}),
|
|
833
750
|
order: 8
|
|
834
751
|
},
|
|
835
752
|
title: defineMessage({
|
|
836
753
|
id: "33UbSd",
|
|
837
|
-
defaultMessage:
|
|
838
|
-
"type": 0,
|
|
839
|
-
"value": "Timeline with images"
|
|
840
|
-
}]
|
|
754
|
+
defaultMessage: "Timeline with images"
|
|
841
755
|
}),
|
|
842
756
|
component: TimelineIllustratedScreen,
|
|
843
757
|
layouts: ['title-image-description', 'title-description-image', 'image-title-description'],
|
|
@@ -850,10 +764,7 @@ var definition = [{
|
|
|
850
764
|
},
|
|
851
765
|
label: defineMessage({
|
|
852
766
|
id: "N25iDO",
|
|
853
|
-
defaultMessage:
|
|
854
|
-
"type": 0,
|
|
855
|
-
"value": "Title"
|
|
856
|
-
}]
|
|
767
|
+
defaultMessage: "Title"
|
|
857
768
|
})
|
|
858
769
|
}, {
|
|
859
770
|
name: 'layout',
|
|
@@ -861,10 +772,7 @@ var definition = [{
|
|
|
861
772
|
defaultValue: 'title-image-description',
|
|
862
773
|
label: defineMessage({
|
|
863
774
|
id: "4iBXj2",
|
|
864
|
-
defaultMessage:
|
|
865
|
-
"type": 0,
|
|
866
|
-
"value": "Layout"
|
|
867
|
-
}]
|
|
775
|
+
defaultMessage: "Layout"
|
|
868
776
|
})
|
|
869
777
|
}, {
|
|
870
778
|
name: 'items',
|
|
@@ -879,10 +787,7 @@ var definition = [{
|
|
|
879
787
|
},
|
|
880
788
|
label: defineMessage({
|
|
881
789
|
id: "3ifj0j",
|
|
882
|
-
defaultMessage:
|
|
883
|
-
"type": 0,
|
|
884
|
-
"value": "Entries"
|
|
885
|
-
}]
|
|
790
|
+
defaultMessage: "Entries"
|
|
886
791
|
})
|
|
887
792
|
}, {
|
|
888
793
|
name: 'spacing',
|
|
@@ -891,19 +796,13 @@ var definition = [{
|
|
|
891
796
|
isHorizontal: true,
|
|
892
797
|
label: defineMessage({
|
|
893
798
|
id: "Zpl5bJ",
|
|
894
|
-
defaultMessage:
|
|
895
|
-
"type": 0,
|
|
896
|
-
"value": "Spacing"
|
|
897
|
-
}]
|
|
799
|
+
defaultMessage: "Spacing"
|
|
898
800
|
})
|
|
899
801
|
}, {
|
|
900
802
|
type: 'fields',
|
|
901
803
|
label: defineMessage({
|
|
902
804
|
id: "xac4z/",
|
|
903
|
-
defaultMessage:
|
|
904
|
-
"type": 0,
|
|
905
|
-
"value": "Entry styles"
|
|
906
|
-
}]
|
|
805
|
+
defaultMessage: "Entry styles"
|
|
907
806
|
}),
|
|
908
807
|
isList: true,
|
|
909
808
|
fields: [{
|
|
@@ -911,20 +810,14 @@ var definition = [{
|
|
|
911
810
|
type: 'text-style-form',
|
|
912
811
|
label: defineMessage({
|
|
913
812
|
id: "+AEVbJ",
|
|
914
|
-
defaultMessage:
|
|
915
|
-
"type": 0,
|
|
916
|
-
"value": "Title"
|
|
917
|
-
}]
|
|
813
|
+
defaultMessage: "Title"
|
|
918
814
|
})
|
|
919
815
|
}, {
|
|
920
816
|
name: 'itemDescriptionStyle',
|
|
921
817
|
type: 'text-style-form',
|
|
922
818
|
label: defineMessage({
|
|
923
819
|
id: "ZCe0r4",
|
|
924
|
-
defaultMessage:
|
|
925
|
-
"type": 0,
|
|
926
|
-
"value": "Description"
|
|
927
|
-
}]
|
|
820
|
+
defaultMessage: "Description"
|
|
928
821
|
})
|
|
929
822
|
}, {
|
|
930
823
|
name: 'itemBottomSpacing',
|
|
@@ -933,10 +826,7 @@ var definition = [{
|
|
|
933
826
|
isHorizontal: true,
|
|
934
827
|
label: defineMessage({
|
|
935
828
|
id: "Lp0bG4",
|
|
936
|
-
defaultMessage:
|
|
937
|
-
"type": 0,
|
|
938
|
-
"value": "Bottom spacing"
|
|
939
|
-
}]
|
|
829
|
+
defaultMessage: "Bottom spacing"
|
|
940
830
|
})
|
|
941
831
|
}]
|
|
942
832
|
}, {
|
|
@@ -945,10 +835,7 @@ var definition = [{
|
|
|
945
835
|
defaultValue: false,
|
|
946
836
|
label: defineMessage({
|
|
947
837
|
id: "N4lZhy",
|
|
948
|
-
defaultMessage:
|
|
949
|
-
"type": 0,
|
|
950
|
-
"value": "Without line"
|
|
951
|
-
}]
|
|
838
|
+
defaultMessage: "Without line"
|
|
952
839
|
})
|
|
953
840
|
}, {
|
|
954
841
|
name: 'bulletShape',
|
|
@@ -958,27 +845,18 @@ var definition = [{
|
|
|
958
845
|
value: 'circle',
|
|
959
846
|
label: defineMessage({
|
|
960
847
|
id: "+uInZz",
|
|
961
|
-
defaultMessage:
|
|
962
|
-
"type": 0,
|
|
963
|
-
"value": "Circle"
|
|
964
|
-
}]
|
|
848
|
+
defaultMessage: "Circle"
|
|
965
849
|
})
|
|
966
850
|
}, {
|
|
967
851
|
value: 'square',
|
|
968
852
|
label: defineMessage({
|
|
969
853
|
id: "fusnxf",
|
|
970
|
-
defaultMessage:
|
|
971
|
-
"type": 0,
|
|
972
|
-
"value": "Square"
|
|
973
|
-
}]
|
|
854
|
+
defaultMessage: "Square"
|
|
974
855
|
})
|
|
975
856
|
}],
|
|
976
857
|
label: defineMessage({
|
|
977
858
|
id: "twTaAZ",
|
|
978
|
-
defaultMessage:
|
|
979
|
-
"type": 0,
|
|
980
|
-
"value": "Bullet shape"
|
|
981
|
-
}]
|
|
859
|
+
defaultMessage: "Bullet shape"
|
|
982
860
|
})
|
|
983
861
|
}, {
|
|
984
862
|
name: 'bulletFilled',
|
|
@@ -986,10 +864,7 @@ var definition = [{
|
|
|
986
864
|
defaultValue: false,
|
|
987
865
|
label: defineMessage({
|
|
988
866
|
id: "YWcp4v",
|
|
989
|
-
defaultMessage:
|
|
990
|
-
"type": 0,
|
|
991
|
-
"value": "Bullet filled"
|
|
992
|
-
}]
|
|
867
|
+
defaultMessage: "Bullet filled"
|
|
993
868
|
})
|
|
994
869
|
}, {
|
|
995
870
|
name: 'bulletColor',
|
|
@@ -1000,10 +875,7 @@ var definition = [{
|
|
|
1000
875
|
},
|
|
1001
876
|
label: defineMessage({
|
|
1002
877
|
id: "uNpHnA",
|
|
1003
|
-
defaultMessage:
|
|
1004
|
-
"type": 0,
|
|
1005
|
-
"value": "Bullet color"
|
|
1006
|
-
}]
|
|
878
|
+
defaultMessage: "Bullet color"
|
|
1007
879
|
})
|
|
1008
880
|
}, {
|
|
1009
881
|
name: 'lineColor',
|
|
@@ -1014,40 +886,28 @@ var definition = [{
|
|
|
1014
886
|
},
|
|
1015
887
|
label: defineMessage({
|
|
1016
888
|
id: "RHMS2f",
|
|
1017
|
-
defaultMessage:
|
|
1018
|
-
"type": 0,
|
|
1019
|
-
"value": "Line color"
|
|
1020
|
-
}]
|
|
889
|
+
defaultMessage: "Line color"
|
|
1021
890
|
})
|
|
1022
891
|
}, {
|
|
1023
892
|
name: 'alternatives',
|
|
1024
893
|
type: 'alternatives',
|
|
1025
894
|
label: defineMessage({
|
|
1026
895
|
id: "68NE9W",
|
|
1027
|
-
defaultMessage:
|
|
1028
|
-
"type": 0,
|
|
1029
|
-
"value": "Alternatives"
|
|
1030
|
-
}]
|
|
896
|
+
defaultMessage: "Alternatives"
|
|
1031
897
|
})
|
|
1032
898
|
}, {
|
|
1033
899
|
name: 'background',
|
|
1034
900
|
type: 'background',
|
|
1035
901
|
label: defineMessage({
|
|
1036
902
|
id: "+MPZRu",
|
|
1037
|
-
defaultMessage:
|
|
1038
|
-
"type": 0,
|
|
1039
|
-
"value": "Background"
|
|
1040
|
-
}]
|
|
903
|
+
defaultMessage: "Background"
|
|
1041
904
|
})
|
|
1042
905
|
}, {
|
|
1043
906
|
name: 'header',
|
|
1044
907
|
type: 'header',
|
|
1045
908
|
label: defineMessage({
|
|
1046
909
|
id: "rhuDxI",
|
|
1047
|
-
defaultMessage:
|
|
1048
|
-
"type": 0,
|
|
1049
|
-
"value": "Header"
|
|
1050
|
-
}]
|
|
910
|
+
defaultMessage: "Header"
|
|
1051
911
|
}),
|
|
1052
912
|
theme: {
|
|
1053
913
|
badge: {
|
|
@@ -1062,10 +922,7 @@ var definition = [{
|
|
|
1062
922
|
type: 'footer',
|
|
1063
923
|
label: defineMessage({
|
|
1064
924
|
id: "g4nybp",
|
|
1065
|
-
defaultMessage:
|
|
1066
|
-
"type": 0,
|
|
1067
|
-
"value": "Footer"
|
|
1068
|
-
}]
|
|
925
|
+
defaultMessage: "Footer"
|
|
1069
926
|
}),
|
|
1070
927
|
theme: {
|
|
1071
928
|
callToAction: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-timeline",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.74",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
38
38
|
"types": "./es/index.d.ts",
|
|
39
|
+
"style": "./assets/css/styles.css",
|
|
39
40
|
"import": "./es/index.js"
|
|
40
41
|
},
|
|
41
42
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -52,26 +53,26 @@
|
|
|
52
53
|
"build": "../../scripts/prepare-package.sh --types"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"react": "^
|
|
56
|
-
"react-dom": "^
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
59
|
-
"react": "^
|
|
60
|
-
"react-dom": "^
|
|
60
|
+
"react": "^19.0.0",
|
|
61
|
+
"react-dom": "^19.0.0"
|
|
61
62
|
},
|
|
62
63
|
"dependencies": {
|
|
63
64
|
"@babel/runtime": "^7.28.6",
|
|
64
|
-
"@micromag/core": "^0.4.
|
|
65
|
-
"@micromag/element-background": "^0.4.
|
|
66
|
-
"@micromag/element-container": "^0.4.
|
|
67
|
-
"@micromag/element-footer": "^0.4.
|
|
68
|
-
"@micromag/element-header": "^0.4.
|
|
69
|
-
"@micromag/element-heading": "^0.4.
|
|
70
|
-
"@micromag/element-layout": "^0.4.
|
|
71
|
-
"@micromag/element-scroll": "^0.4.
|
|
72
|
-
"@micromag/element-text": "^0.4.
|
|
73
|
-
"@micromag/element-visual": "^0.4.
|
|
74
|
-
"@micromag/transforms": "^0.4.
|
|
65
|
+
"@micromag/core": "^0.4.74",
|
|
66
|
+
"@micromag/element-background": "^0.4.74",
|
|
67
|
+
"@micromag/element-container": "^0.4.74",
|
|
68
|
+
"@micromag/element-footer": "^0.4.74",
|
|
69
|
+
"@micromag/element-header": "^0.4.74",
|
|
70
|
+
"@micromag/element-heading": "^0.4.74",
|
|
71
|
+
"@micromag/element-layout": "^0.4.74",
|
|
72
|
+
"@micromag/element-scroll": "^0.4.74",
|
|
73
|
+
"@micromag/element-text": "^0.4.74",
|
|
74
|
+
"@micromag/element-visual": "^0.4.74",
|
|
75
|
+
"@micromag/transforms": "^0.4.74",
|
|
75
76
|
"classnames": "^2.2.6",
|
|
76
77
|
"lodash": "^4.17.23",
|
|
77
78
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
@@ -81,6 +82,6 @@
|
|
|
81
82
|
"access": "public",
|
|
82
83
|
"registry": "https://registry.npmjs.org/"
|
|
83
84
|
},
|
|
84
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "fe510ee87845280d0760cb292aef9d2eb69e67c1",
|
|
85
86
|
"types": "es/index.d.ts"
|
|
86
87
|
}
|