@micromag/screen-survey 0.4.89 → 0.4.90-alpha.1
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 +50 -31
- package/es/index.js +39 -30
- package/package.json +15 -15
package/es/index.d.ts
CHANGED
|
@@ -53,19 +53,20 @@ declare const _default: {
|
|
|
53
53
|
name: string;
|
|
54
54
|
type: string;
|
|
55
55
|
defaultValue: string;
|
|
56
|
+
isSection: boolean;
|
|
56
57
|
label: {
|
|
57
58
|
defaultMessage: string;
|
|
58
59
|
description: string;
|
|
59
60
|
};
|
|
60
61
|
theme?: undefined;
|
|
61
|
-
isList?: undefined;
|
|
62
62
|
fields?: undefined;
|
|
63
|
+
isList?: undefined;
|
|
63
64
|
} | {
|
|
64
65
|
name: string;
|
|
65
66
|
type: string;
|
|
67
|
+
isSection: boolean;
|
|
66
68
|
theme: {
|
|
67
69
|
textStyle: string;
|
|
68
|
-
label?: undefined;
|
|
69
70
|
badge?: undefined;
|
|
70
71
|
callToAction?: undefined;
|
|
71
72
|
};
|
|
@@ -74,42 +75,59 @@ declare const _default: {
|
|
|
74
75
|
description: string;
|
|
75
76
|
};
|
|
76
77
|
defaultValue?: undefined;
|
|
77
|
-
isList?: undefined;
|
|
78
78
|
fields?: undefined;
|
|
79
|
+
isList?: undefined;
|
|
79
80
|
} | {
|
|
80
|
-
name: string;
|
|
81
81
|
type: string;
|
|
82
|
-
|
|
83
|
-
label: {
|
|
84
|
-
textStyle: string;
|
|
85
|
-
};
|
|
86
|
-
textStyle?: undefined;
|
|
87
|
-
badge?: undefined;
|
|
88
|
-
callToAction?: undefined;
|
|
89
|
-
};
|
|
82
|
+
isSection: boolean;
|
|
90
83
|
label: {
|
|
91
84
|
defaultMessage: string;
|
|
92
85
|
description: string;
|
|
93
86
|
};
|
|
87
|
+
fields: ({
|
|
88
|
+
name: string;
|
|
89
|
+
type: string;
|
|
90
|
+
isSection: boolean;
|
|
91
|
+
theme: {
|
|
92
|
+
label: {
|
|
93
|
+
textStyle: string;
|
|
94
|
+
};
|
|
95
|
+
textStyle?: undefined;
|
|
96
|
+
};
|
|
97
|
+
defaultValue?: undefined;
|
|
98
|
+
label?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
name: string;
|
|
101
|
+
type: string;
|
|
102
|
+
defaultValue: boolean;
|
|
103
|
+
theme: {
|
|
104
|
+
textStyle: string;
|
|
105
|
+
label?: undefined;
|
|
106
|
+
};
|
|
107
|
+
isSection?: undefined;
|
|
108
|
+
label?: undefined;
|
|
109
|
+
} | {
|
|
110
|
+
name: string;
|
|
111
|
+
type: string;
|
|
112
|
+
theme: {
|
|
113
|
+
textStyle: string;
|
|
114
|
+
label?: undefined;
|
|
115
|
+
};
|
|
116
|
+
label: {
|
|
117
|
+
defaultMessage: string;
|
|
118
|
+
description: string;
|
|
119
|
+
};
|
|
120
|
+
isSection?: undefined;
|
|
121
|
+
defaultValue?: undefined;
|
|
122
|
+
})[];
|
|
123
|
+
name?: undefined;
|
|
94
124
|
defaultValue?: undefined;
|
|
125
|
+
theme?: undefined;
|
|
95
126
|
isList?: undefined;
|
|
96
|
-
fields?: undefined;
|
|
97
|
-
} | {
|
|
98
|
-
name: string;
|
|
99
|
-
type: string;
|
|
100
|
-
defaultValue: boolean;
|
|
101
|
-
isList: boolean;
|
|
102
|
-
theme: {
|
|
103
|
-
textStyle: string;
|
|
104
|
-
label?: undefined;
|
|
105
|
-
badge?: undefined;
|
|
106
|
-
callToAction?: undefined;
|
|
107
|
-
};
|
|
108
|
-
label?: undefined;
|
|
109
|
-
fields?: undefined;
|
|
110
127
|
} | {
|
|
111
128
|
type: string;
|
|
112
129
|
isList: boolean;
|
|
130
|
+
isSection: boolean;
|
|
113
131
|
label: {
|
|
114
132
|
defaultMessage: string;
|
|
115
133
|
description: string;
|
|
@@ -151,17 +169,19 @@ declare const _default: {
|
|
|
151
169
|
} | {
|
|
152
170
|
name: string;
|
|
153
171
|
type: string;
|
|
172
|
+
isSection: boolean;
|
|
154
173
|
label: {
|
|
155
174
|
defaultMessage: string;
|
|
156
175
|
description: string;
|
|
157
176
|
};
|
|
158
177
|
defaultValue?: undefined;
|
|
159
178
|
theme?: undefined;
|
|
160
|
-
isList?: undefined;
|
|
161
179
|
fields?: undefined;
|
|
180
|
+
isList?: undefined;
|
|
162
181
|
} | {
|
|
163
182
|
name: string;
|
|
164
183
|
type: string;
|
|
184
|
+
isSection: boolean;
|
|
165
185
|
label: {
|
|
166
186
|
defaultMessage: string;
|
|
167
187
|
description: string;
|
|
@@ -174,15 +194,15 @@ declare const _default: {
|
|
|
174
194
|
boxStyle: string;
|
|
175
195
|
};
|
|
176
196
|
textStyle?: undefined;
|
|
177
|
-
label?: undefined;
|
|
178
197
|
callToAction?: undefined;
|
|
179
198
|
};
|
|
180
199
|
defaultValue?: undefined;
|
|
181
|
-
isList?: undefined;
|
|
182
200
|
fields?: undefined;
|
|
201
|
+
isList?: undefined;
|
|
183
202
|
} | {
|
|
184
203
|
name: string;
|
|
185
204
|
type: string;
|
|
205
|
+
isSection: boolean;
|
|
186
206
|
label: {
|
|
187
207
|
defaultMessage: string;
|
|
188
208
|
description: string;
|
|
@@ -195,12 +215,11 @@ declare const _default: {
|
|
|
195
215
|
boxStyle: string;
|
|
196
216
|
};
|
|
197
217
|
textStyle?: undefined;
|
|
198
|
-
label?: undefined;
|
|
199
218
|
badge?: undefined;
|
|
200
219
|
};
|
|
201
220
|
defaultValue?: undefined;
|
|
202
|
-
isList?: undefined;
|
|
203
221
|
fields?: undefined;
|
|
222
|
+
isList?: undefined;
|
|
204
223
|
})[];
|
|
205
224
|
};
|
|
206
225
|
|
package/es/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import Text from '@micromag/element-text';
|
|
|
22
22
|
import TextInput from '@micromag/element-text-input';
|
|
23
23
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
24
24
|
|
|
25
|
-
var styles = {"container":"micromag-screen-survey-container","background":"micromag-screen-survey-background","content":"micromag-screen-survey-content","question":"micromag-screen-survey-question","answers":"micromag-screen-survey-answers","items":"micromag-screen-survey-items","header":"micromag-screen-survey-header","disabled":"micromag-screen-survey-disabled","footer":"micromag-screen-survey-footer","item":"micromag-screen-survey-item","
|
|
25
|
+
var styles = {"container":"micromag-screen-survey-container","background":"micromag-screen-survey-background","content":"micromag-screen-survey-content","question":"micromag-screen-survey-question","answers":"micromag-screen-survey-answers","items":"micromag-screen-survey-items","header":"micromag-screen-survey-header","disabled":"micromag-screen-survey-disabled","footer":"micromag-screen-survey-footer","item":"micromag-screen-survey-item","itemContent":"micromag-screen-survey-itemContent","resultBar":"micromag-screen-survey-resultBar","resultLabel":"micromag-screen-survey-resultLabel","resultText":"micromag-screen-survey-resultText","itemInner":"micromag-screen-survey-itemInner","button":"micromag-screen-survey-button","itemLabel":"micromag-screen-survey-itemLabel","itemText":"micromag-screen-survey-itemText","emptyQuestion":"micromag-screen-survey-emptyQuestion","emptyAnswer":"micromag-screen-survey-emptyAnswer","userAnswer":"micromag-screen-survey-userAnswer","input":"micromag-screen-survey-input","textInput":"micromag-screen-survey-textInput","confirm":"micromag-screen-survey-confirm","selected":"micromag-screen-survey-selected","submit":"micromag-screen-survey-submit","focused":"micromag-screen-survey-focused","filled":"micromag-screen-survey-filled","multiline":"micromag-screen-survey-multiline","icon":"micromag-screen-survey-icon","answered":"micromag-screen-survey-answered","withPercentage":"micromag-screen-survey-withPercentage","withBar":"micromag-screen-survey-withBar","inputFocused":"micromag-screen-survey-inputFocused","isPlaceholder":"micromag-screen-survey-isPlaceholder","layout":"micromag-screen-survey-layout","reset":"micromag-screen-survey-reset"};
|
|
26
26
|
|
|
27
27
|
function SurveyScreen({
|
|
28
28
|
id = null,
|
|
@@ -284,6 +284,7 @@ function SurveyScreen({
|
|
|
284
284
|
defaultMessage: "Question"
|
|
285
285
|
}),
|
|
286
286
|
emptyClassName: styles.emptyQuestion,
|
|
287
|
+
placeholderClassName: "mb-4",
|
|
287
288
|
isEmpty: !hasQuestion,
|
|
288
289
|
children: hasQuestion ? /*#__PURE__*/jsx(Transitions, {
|
|
289
290
|
transitions: transitions,
|
|
@@ -363,14 +364,12 @@ function SurveyScreen({
|
|
|
363
364
|
}]),
|
|
364
365
|
children: /*#__PURE__*/jsx(ScreenElement, {
|
|
365
366
|
placeholder: "surveyAnswer",
|
|
366
|
-
placeholderProps: {
|
|
367
|
-
className: styles.placeholderAnswer
|
|
368
|
-
},
|
|
369
367
|
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
370
368
|
id: "+Ok+7S",
|
|
371
369
|
defaultMessage: "Answer"
|
|
372
370
|
}),
|
|
373
371
|
emptyClassName: styles.emptyAnswer,
|
|
372
|
+
placeholderClassName: "mb-2",
|
|
374
373
|
isEmpty: !hasAnswerLabel,
|
|
375
374
|
children: hasAnswer ? /*#__PURE__*/jsx("div", {
|
|
376
375
|
className: styles.itemContent,
|
|
@@ -622,6 +621,7 @@ var definition = {
|
|
|
622
621
|
name: 'layout',
|
|
623
622
|
type: 'screen-layout',
|
|
624
623
|
defaultValue: 'top',
|
|
624
|
+
isSection: true,
|
|
625
625
|
label: defineMessage({
|
|
626
626
|
id: "4iBXj2",
|
|
627
627
|
defaultMessage: "Layout"
|
|
@@ -629,6 +629,7 @@ var definition = {
|
|
|
629
629
|
}, {
|
|
630
630
|
name: 'question',
|
|
631
631
|
type: 'heading-element',
|
|
632
|
+
isSection: true,
|
|
632
633
|
theme: {
|
|
633
634
|
textStyle: 'heading2'
|
|
634
635
|
},
|
|
@@ -637,38 +638,43 @@ var definition = {
|
|
|
637
638
|
defaultMessage: "Question"
|
|
638
639
|
})
|
|
639
640
|
}, {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
theme: {
|
|
643
|
-
label: {
|
|
644
|
-
textStyle: 'button'
|
|
645
|
-
}
|
|
646
|
-
},
|
|
641
|
+
type: 'fields',
|
|
642
|
+
isSection: true,
|
|
647
643
|
label: defineMessage({
|
|
648
644
|
id: "KHWeV7",
|
|
649
645
|
defaultMessage: "Answers"
|
|
650
|
-
})
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
646
|
+
}),
|
|
647
|
+
fields: [{
|
|
648
|
+
name: 'answers',
|
|
649
|
+
type: 'answers',
|
|
650
|
+
isSection: true,
|
|
651
|
+
theme: {
|
|
652
|
+
label: {
|
|
653
|
+
textStyle: 'button'
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}, {
|
|
657
|
+
name: 'customAnswer',
|
|
658
|
+
type: 'custom-answer',
|
|
659
|
+
defaultValue: false,
|
|
660
|
+
theme: {
|
|
661
|
+
textStyle: 'button'
|
|
662
|
+
}
|
|
663
|
+
}, {
|
|
664
|
+
name: 'result',
|
|
665
|
+
type: 'text-element',
|
|
666
|
+
theme: {
|
|
667
|
+
textStyle: 'text'
|
|
668
|
+
},
|
|
669
|
+
label: defineMessage({
|
|
670
|
+
id: "iQ5Uf7",
|
|
671
|
+
defaultMessage: "Default feedback"
|
|
672
|
+
})
|
|
673
|
+
}]
|
|
669
674
|
}, {
|
|
670
675
|
type: 'fields',
|
|
671
676
|
isList: true,
|
|
677
|
+
isSection: true,
|
|
672
678
|
label: defineMessage({
|
|
673
679
|
id: "R9DB4a",
|
|
674
680
|
defaultMessage: "Styles"
|
|
@@ -726,6 +732,7 @@ var definition = {
|
|
|
726
732
|
}, {
|
|
727
733
|
name: 'background',
|
|
728
734
|
type: 'background',
|
|
735
|
+
isSection: true,
|
|
729
736
|
label: defineMessage({
|
|
730
737
|
id: "+MPZRu",
|
|
731
738
|
defaultMessage: "Background"
|
|
@@ -733,6 +740,7 @@ var definition = {
|
|
|
733
740
|
}, {
|
|
734
741
|
name: 'header',
|
|
735
742
|
type: 'header',
|
|
743
|
+
isSection: true,
|
|
736
744
|
label: defineMessage({
|
|
737
745
|
id: "rhuDxI",
|
|
738
746
|
defaultMessage: "Header"
|
|
@@ -748,6 +756,7 @@ var definition = {
|
|
|
748
756
|
}, {
|
|
749
757
|
name: 'footer',
|
|
750
758
|
type: 'footer',
|
|
759
|
+
isSection: true,
|
|
751
760
|
label: defineMessage({
|
|
752
761
|
id: "g4nybp",
|
|
753
762
|
defaultMessage: "Footer"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-survey",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.90-alpha.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -65,19 +65,19 @@
|
|
|
65
65
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
66
66
|
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
67
67
|
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
68
|
-
"@micromag/core": "^0.4.
|
|
69
|
-
"@micromag/data": "^0.4.
|
|
70
|
-
"@micromag/element-background": "^0.4.
|
|
71
|
-
"@micromag/element-button": "^0.4.
|
|
72
|
-
"@micromag/element-container": "^0.4.
|
|
73
|
-
"@micromag/element-footer": "^0.4.
|
|
74
|
-
"@micromag/element-header": "^0.4.
|
|
75
|
-
"@micromag/element-heading": "^0.4.
|
|
76
|
-
"@micromag/element-layout": "^0.4.
|
|
77
|
-
"@micromag/element-scroll": "^0.4.
|
|
78
|
-
"@micromag/element-text": "^0.4.
|
|
79
|
-
"@micromag/element-text-input": "^0.4.
|
|
80
|
-
"@micromag/transforms": "^0.4.
|
|
68
|
+
"@micromag/core": "^0.4.90-alpha.1",
|
|
69
|
+
"@micromag/data": "^0.4.90-alpha.1",
|
|
70
|
+
"@micromag/element-background": "^0.4.90-alpha.1",
|
|
71
|
+
"@micromag/element-button": "^0.4.90-alpha.1",
|
|
72
|
+
"@micromag/element-container": "^0.4.90-alpha.1",
|
|
73
|
+
"@micromag/element-footer": "^0.4.90-alpha.1",
|
|
74
|
+
"@micromag/element-header": "^0.4.90-alpha.1",
|
|
75
|
+
"@micromag/element-heading": "^0.4.90-alpha.1",
|
|
76
|
+
"@micromag/element-layout": "^0.4.90-alpha.1",
|
|
77
|
+
"@micromag/element-scroll": "^0.4.90-alpha.1",
|
|
78
|
+
"@micromag/element-text": "^0.4.90-alpha.1",
|
|
79
|
+
"@micromag/element-text-input": "^0.4.90-alpha.1",
|
|
80
|
+
"@micromag/transforms": "^0.4.90-alpha.1",
|
|
81
81
|
"classnames": "^2.2.6",
|
|
82
82
|
"dompurify": "^3.2.6",
|
|
83
83
|
"lodash": "^4.17.23",
|
|
@@ -88,6 +88,6 @@
|
|
|
88
88
|
"access": "public",
|
|
89
89
|
"registry": "https://registry.npmjs.org/"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "a13dd2242ee733dc3b3663354783f0b4395f9926",
|
|
92
92
|
"types": "es/index.d.ts"
|
|
93
93
|
}
|