@micromag/screen-survey 0.4.70 → 0.4.71
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 +3 -1
- package/es/index.js +4 -2
- package/package.json +15 -15
package/es/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
2
3
|
import { TextElement, Answer, BoxStyle, TextStyle, Color, Header, Footer, BackgroundElement, Transitions } from '@micromag/core';
|
|
3
4
|
|
|
4
5
|
interface SurveyScreenProps {
|
|
@@ -27,9 +28,10 @@ interface SurveyScreenProps {
|
|
|
27
28
|
transitions?: Transitions | null;
|
|
28
29
|
resultTransitionDuration?: number;
|
|
29
30
|
type?: string | null;
|
|
31
|
+
mediaRef?: ForwardedRef<HTMLMediaElement> | null;
|
|
30
32
|
className?: string | null;
|
|
31
33
|
}
|
|
32
|
-
declare function SurveyScreen({ id, layout, question, answers, result, buttonsStyle, buttonsTextStyle, resultsStyle, spacing, header, footer, background, customAnswer, showCount, withoutPercentage, withoutBar, current, preload, transitions, resultTransitionDuration, type, className, }: SurveyScreenProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function SurveyScreen({ id, layout, question, answers, result, buttonsStyle, buttonsTextStyle, resultsStyle, spacing, header, footer, background, customAnswer, showCount, withoutPercentage, withoutBar, current, preload, transitions, resultTransitionDuration, type, mediaRef: customMediaRef, className, }: SurveyScreenProps): react_jsx_runtime.JSX.Element;
|
|
33
35
|
|
|
34
36
|
declare const _default: {
|
|
35
37
|
id: string;
|
package/es/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { useState, useMemo, useCallback, useEffect } from 'react';
|
|
|
12
12
|
import { ScreenElement, Transitions, CloseIcon } from '@micromag/core/components';
|
|
13
13
|
import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
|
|
14
14
|
import { useTrackScreenEvent, useDimensionObserver } from '@micromag/core/hooks';
|
|
15
|
-
import { isTextFilled, getLargestRemainderRound, isHeaderFilled, isFooterFilled, getFooterProps, getStyleFromColor } from '@micromag/core/utils';
|
|
15
|
+
import { isTextFilled, getLargestRemainderRound, isHeaderFilled, isFooterFilled, getFooterProps, getStyleFromColor, mergeRefs } from '@micromag/core/utils';
|
|
16
16
|
import { useQuizCreate, useQuiz } from '@micromag/data';
|
|
17
17
|
import Background from '@micromag/element-background';
|
|
18
18
|
import Button from '@micromag/element-button';
|
|
@@ -71,6 +71,8 @@ function SurveyScreen(_ref) {
|
|
|
71
71
|
resultTransitionDuration = _ref$resultTransition === void 0 ? 500 : _ref$resultTransition,
|
|
72
72
|
_ref$type = _ref.type,
|
|
73
73
|
type = _ref$type === void 0 ? null : _ref$type,
|
|
74
|
+
_ref$mediaRef = _ref.mediaRef,
|
|
75
|
+
customMediaRef = _ref$mediaRef === void 0 ? null : _ref$mediaRef,
|
|
74
76
|
_ref$className = _ref.className,
|
|
75
77
|
className = _ref$className === void 0 ? null : _ref$className;
|
|
76
78
|
var screenId = id || 'screen-id';
|
|
@@ -585,7 +587,7 @@ function SurveyScreen(_ref) {
|
|
|
585
587
|
playing: backgroundPlaying,
|
|
586
588
|
muted: muted,
|
|
587
589
|
shouldLoad: mediaShouldLoad,
|
|
588
|
-
mediaRef: mediaRef,
|
|
590
|
+
mediaRef: mergeRefs(mediaRef, customMediaRef),
|
|
589
591
|
withoutVideo: isPreview,
|
|
590
592
|
className: styles.background
|
|
591
593
|
}) : null]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-survey",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.71",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -64,19 +64,19 @@
|
|
|
64
64
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
65
65
|
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
66
66
|
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
67
|
-
"@micromag/core": "^0.4.
|
|
68
|
-
"@micromag/data": "^0.4.
|
|
69
|
-
"@micromag/element-background": "^0.4.
|
|
70
|
-
"@micromag/element-button": "^0.4.
|
|
71
|
-
"@micromag/element-container": "^0.4.
|
|
72
|
-
"@micromag/element-footer": "^0.4.
|
|
73
|
-
"@micromag/element-header": "^0.4.
|
|
74
|
-
"@micromag/element-heading": "^0.4.
|
|
75
|
-
"@micromag/element-layout": "^0.4.
|
|
76
|
-
"@micromag/element-scroll": "^0.4.
|
|
77
|
-
"@micromag/element-text": "^0.4.
|
|
78
|
-
"@micromag/element-text-input": "^0.4.
|
|
79
|
-
"@micromag/transforms": "^0.4.
|
|
67
|
+
"@micromag/core": "^0.4.71",
|
|
68
|
+
"@micromag/data": "^0.4.71",
|
|
69
|
+
"@micromag/element-background": "^0.4.71",
|
|
70
|
+
"@micromag/element-button": "^0.4.71",
|
|
71
|
+
"@micromag/element-container": "^0.4.71",
|
|
72
|
+
"@micromag/element-footer": "^0.4.71",
|
|
73
|
+
"@micromag/element-header": "^0.4.71",
|
|
74
|
+
"@micromag/element-heading": "^0.4.71",
|
|
75
|
+
"@micromag/element-layout": "^0.4.71",
|
|
76
|
+
"@micromag/element-scroll": "^0.4.71",
|
|
77
|
+
"@micromag/element-text": "^0.4.71",
|
|
78
|
+
"@micromag/element-text-input": "^0.4.71",
|
|
79
|
+
"@micromag/transforms": "^0.4.71",
|
|
80
80
|
"classnames": "^2.2.6",
|
|
81
81
|
"dompurify": "^3.2.6",
|
|
82
82
|
"lodash": "^4.17.23",
|
|
@@ -87,6 +87,6 @@
|
|
|
87
87
|
"access": "public",
|
|
88
88
|
"registry": "https://registry.npmjs.org/"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "9101554bc5761e32b4a002a10d26800608c69773",
|
|
91
91
|
"types": "es/index.d.ts"
|
|
92
92
|
}
|