@elice/material-quiz 1.240718.0-trasncript.0 → 1.240718.0-trasncript.2

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.
Files changed (127) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +423 -0
  2. package/cjs/components/eb-sortable/EbDraggable.js +42 -33
  3. package/cjs/components/eb-sortable/EbDroppable.js +27 -20
  4. package/cjs/components/markdown-editor/index.d.ts +1 -2
  5. package/cjs/components/markdown-editor/index.js +19 -10
  6. package/cjs/components/material-quiz/MaterialQuiz.js +114 -83
  7. package/cjs/components/material-quiz/MaterialQuizAnswerExplanation.js +36 -29
  8. package/cjs/components/material-quiz/MaterialQuizInfo.js +151 -149
  9. package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +175 -127
  10. package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +360 -286
  11. package/cjs/components/material-quiz/MaterialQuizSelectOne.js +172 -126
  12. package/cjs/components/material-quiz/MaterialQuizShimmer.js +46 -39
  13. package/cjs/components/material-quiz/MaterialQuizText.js +163 -115
  14. package/cjs/components/material-quiz/QuizResultBadge.js +32 -22
  15. package/cjs/components/material-quiz/QuizSubmitStatusText.js +21 -16
  16. package/cjs/components/material-quiz/constants/color.js +5 -5
  17. package/cjs/components/material-quiz/context/MaterialQuizContext.d.ts +1 -1
  18. package/cjs/components/material-quiz/context/MaterialQuizContext.js +156 -93
  19. package/cjs/components/material-quiz/index.js +9 -0
  20. package/cjs/components/material-quiz/locales/index.js +13 -0
  21. package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +259 -161
  22. package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +134 -100
  23. package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +130 -101
  24. package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +64 -52
  25. package/cjs/components/material-quiz/material-quiz-group/context/context.js +5 -1
  26. package/cjs/components/material-quiz-edit/MaterialQuizEdit.js +47 -36
  27. package/cjs/components/material-quiz-edit/MaterialQuizEditContent.js +280 -232
  28. package/cjs/components/material-quiz-edit/context.js +8 -2
  29. package/cjs/components/material-quiz-edit/index.js +7 -0
  30. package/cjs/components/material-quiz-edit/locales/index.js +13 -0
  31. package/cjs/components/material-quiz-edit/options/OptionEditor.js +70 -46
  32. package/cjs/components/material-quiz-edit/options/OptionSelectMultiple.js +174 -148
  33. package/cjs/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +175 -149
  34. package/cjs/components/material-quiz-edit/options/OptionSelectOne.js +164 -144
  35. package/cjs/components/material-quiz-edit/options/OptionText.js +90 -82
  36. package/cjs/components/material-quiz-edit/options/options-group/OptionGroup.js +9 -8
  37. package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +156 -112
  38. package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +288 -196
  39. package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +88 -75
  40. package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +108 -92
  41. package/cjs/components/material-quiz-edit/utils/checkTwoDimensionArray.js +5 -1
  42. package/cjs/components/material-quiz-edit/utils/editValue.js +21 -12
  43. package/cjs/components/shared/QuestionBox.js +198 -165
  44. package/cjs/components/shared/QuizDraggbleDroppedOption.js +11 -12
  45. package/cjs/components/shared/QuizDraggbleDummyOption.js +23 -16
  46. package/cjs/components/shared/QuizDraggbleOption.js +65 -59
  47. package/cjs/components/shared/StyledMarkdown.js +5 -1
  48. package/cjs/components/shared/index.js +19 -0
  49. package/cjs/components/shared/question-checkbox/QuestionCheckbox.js +13 -7
  50. package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
  51. package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.js +24 -17
  52. package/cjs/components/shared/question-checkbox/QuestionCheckboxOption.js +59 -68
  53. package/cjs/components/shared/question-radio/QuestionRadio.js +13 -7
  54. package/cjs/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
  55. package/cjs/components/shared/question-radio/QuestionRadioContext.js +24 -17
  56. package/cjs/components/shared/question-radio/QuestionRadioOption.js +52 -59
  57. package/cjs/components/shared/utils/getQuestionStatusStyle.js +7 -9
  58. package/cjs/components/shared/utils/mergeRefs.js +15 -6
  59. package/cjs/constant/element.js +3 -3
  60. package/cjs/constant/index.js +9 -0
  61. package/cjs/helpers/index.js +8 -10
  62. package/cjs/hooks/index.js +7 -0
  63. package/cjs/hooks/useCaculatePassage.js +21 -20
  64. package/es/_virtual/_rollupPluginBabelHelpers.js +408 -0
  65. package/es/components/eb-sortable/EbDraggable.js +37 -33
  66. package/es/components/eb-sortable/EbDroppable.js +22 -20
  67. package/es/components/markdown-editor/index.d.ts +1 -2
  68. package/es/components/markdown-editor/index.js +15 -10
  69. package/es/components/material-quiz/MaterialQuiz.js +109 -83
  70. package/es/components/material-quiz/MaterialQuizAnswerExplanation.js +32 -29
  71. package/es/components/material-quiz/MaterialQuizInfo.js +148 -150
  72. package/es/components/material-quiz/MaterialQuizSelectMultiple.js +171 -127
  73. package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +356 -287
  74. package/es/components/material-quiz/MaterialQuizSelectOne.js +168 -126
  75. package/es/components/material-quiz/MaterialQuizShimmer.js +42 -39
  76. package/es/components/material-quiz/MaterialQuizText.js +158 -115
  77. package/es/components/material-quiz/QuizResultBadge.js +27 -22
  78. package/es/components/material-quiz/QuizSubmitStatusText.js +17 -16
  79. package/es/components/material-quiz/constants/color.js +5 -5
  80. package/es/components/material-quiz/context/MaterialQuizContext.d.ts +1 -1
  81. package/es/components/material-quiz/context/MaterialQuizContext.js +153 -94
  82. package/es/components/material-quiz/index.js +2 -0
  83. package/es/components/material-quiz/locales/index.js +4 -0
  84. package/es/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +253 -161
  85. package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +129 -100
  86. package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +125 -101
  87. package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +60 -52
  88. package/es/components/material-quiz/material-quiz-group/context/context.js +1 -1
  89. package/es/components/material-quiz-edit/MaterialQuizEdit.js +43 -36
  90. package/es/components/material-quiz-edit/MaterialQuizEditContent.js +272 -229
  91. package/es/components/material-quiz-edit/context.js +4 -2
  92. package/es/components/material-quiz-edit/index.js +1 -0
  93. package/es/components/material-quiz-edit/locales/index.js +4 -0
  94. package/es/components/material-quiz-edit/options/OptionEditor.js +64 -46
  95. package/es/components/material-quiz-edit/options/OptionSelectMultiple.js +170 -148
  96. package/es/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +171 -149
  97. package/es/components/material-quiz-edit/options/OptionSelectOne.js +159 -144
  98. package/es/components/material-quiz-edit/options/OptionText.js +86 -82
  99. package/es/components/material-quiz-edit/options/options-group/OptionGroup.js +9 -8
  100. package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +151 -112
  101. package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +283 -197
  102. package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +83 -75
  103. package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +103 -92
  104. package/es/components/material-quiz-edit/utils/checkTwoDimensionArray.js +5 -1
  105. package/es/components/material-quiz-edit/utils/editValue.js +17 -12
  106. package/es/components/shared/QuestionBox.js +192 -165
  107. package/es/components/shared/QuizDraggbleDroppedOption.js +11 -12
  108. package/es/components/shared/QuizDraggbleDummyOption.js +19 -16
  109. package/es/components/shared/QuizDraggbleOption.js +61 -59
  110. package/es/components/shared/StyledMarkdown.js +1 -1
  111. package/es/components/shared/index.js +7 -0
  112. package/es/components/shared/question-checkbox/QuestionCheckbox.js +9 -7
  113. package/es/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
  114. package/es/components/shared/question-checkbox/QuestionCheckboxContext.js +20 -17
  115. package/es/components/shared/question-checkbox/QuestionCheckboxOption.js +54 -68
  116. package/es/components/shared/question-radio/QuestionRadio.js +9 -7
  117. package/es/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
  118. package/es/components/shared/question-radio/QuestionRadioContext.js +20 -17
  119. package/es/components/shared/question-radio/QuestionRadioOption.js +47 -59
  120. package/es/components/shared/utils/getQuestionStatusStyle.js +7 -9
  121. package/es/components/shared/utils/mergeRefs.js +15 -6
  122. package/es/constant/element.js +3 -3
  123. package/es/constant/index.js +1 -0
  124. package/es/helpers/index.js +8 -10
  125. package/es/hooks/index.js +1 -0
  126. package/es/hooks/useCaculatePassage.js +21 -20
  127. package/package.json +12 -15
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
3
  import { useFormContext, useFieldArray, useWatch, Controller } from 'react-hook-form';
3
4
  import { arrayMove } from 'react-sortable-hoc';
4
5
  import { Transition } from 'react-transition-group';
@@ -11,55 +12,56 @@ import { useMaterialQuizEditContext } from '../context.js';
11
12
  import { createRandomId } from '../utils/randomId.js';
12
13
  import OptionEditor from './OptionEditor.js';
13
14
 
14
- const MIN_OPTION_INFO_COUNT = 2;
15
- const MAX_OPTION_INFO_COUNT = 20;
16
- const StyledWrap = styled.div.withConfig({
15
+ var MIN_OPTION_INFO_COUNT = 2;
16
+ var MAX_OPTION_INFO_COUNT = 20;
17
+ var StyledWrap = styled.div.withConfig({
17
18
  componentId: "sc-1xufc1p-0"
18
19
  })(["& > ul{display:flex;flex-direction:column;gap:0.75rem;}"]);
19
- const StyledInputGroup = styled(SortableListGroup).withConfig({
20
+ var StyledInputGroup = styled(SortableListGroup).withConfig({
20
21
  componentId: "sc-1xufc1p-1"
21
22
  })(["width:100%;.em-option-editor{margin-bottom:0.5rem;&:last-of-type{margin-bottom:0;}}"]);
22
- const OptionSelectMultipleOrder = () => {
23
- const intl = useRawEliceIntl();
24
- const {
25
- disabled
26
- } = useMaterialQuizEditContext();
27
- const {
28
- control,
29
- getValues,
30
- setValue
31
- } = useFormContext();
32
- const {
33
- fields: optionInfoFields,
34
- append: appendOptionInfoFieldItem,
35
- remove: removeOptionInfoFieldItem,
36
- move: moveOptionInfoFieldItem
37
- } = useFieldArray({
38
- name: 'optionsDefault',
39
- keyName: 'id',
40
- shouldUnregister: true
41
- });
42
- const watchedAnswerInfo = useWatch({
43
- control,
23
+ var OptionSelectMultipleOrder = function OptionSelectMultipleOrder() {
24
+ var intl = useRawEliceIntl();
25
+ var _useMaterialQuizEditC = useMaterialQuizEditContext(),
26
+ disabled = _useMaterialQuizEditC.disabled;
27
+ var _useFormContext = useFormContext(),
28
+ control = _useFormContext.control,
29
+ getValues = _useFormContext.getValues,
30
+ setValue = _useFormContext.setValue;
31
+ var _useFieldArray = useFieldArray({
32
+ name: 'optionsDefault',
33
+ keyName: 'id',
34
+ shouldUnregister: true
35
+ }),
36
+ optionInfoFields = _useFieldArray.fields,
37
+ appendOptionInfoFieldItem = _useFieldArray.append,
38
+ removeOptionInfoFieldItem = _useFieldArray.remove,
39
+ moveOptionInfoFieldItem = _useFieldArray.move;
40
+ var watchedAnswerInfo = useWatch({
41
+ control: control,
44
42
  name: 'answerInfoDefault'
45
43
  });
46
- const watchedOptions = useWatch({
47
- control,
44
+ var watchedOptions = useWatch({
45
+ control: control,
48
46
  name: 'optionsDefault'
49
47
  });
50
48
  /**
51
49
  * Update answer info.
52
50
  */
53
- const updateAnswerInfo = option => {
54
- const prevAnswerInfo = getValues('answerInfoDefault');
51
+ var updateAnswerInfo = function updateAnswerInfo(option) {
52
+ var prevAnswerInfo = getValues('answerInfoDefault');
55
53
  if (!Array.isArray(prevAnswerInfo)) {
56
54
  return;
57
55
  }
58
- setValue('answerInfoDefault', !option.checked ? prevAnswerInfo.filter(answerIndex => answerIndex !== option.index).map(answerIndex => option.removed ?
59
- // if answer removed, re-calculate answer index
60
- answerIndex < option.index ? answerIndex : answerIndex - 1 :
61
- // or maintain current answer index
62
- answerIndex) : [...prevAnswerInfo, option.index], {
56
+ setValue('answerInfoDefault', !option.checked ? prevAnswerInfo.filter(function (answerIndex) {
57
+ return answerIndex !== option.index;
58
+ }).map(function (answerIndex) {
59
+ return option.removed ?
60
+ // if answer removed, re-calculate answer index
61
+ answerIndex < option.index ? answerIndex : answerIndex - 1 :
62
+ // or maintain current answer index
63
+ answerIndex;
64
+ }) : [].concat(_toConsumableArray(prevAnswerInfo), [option.index]), {
63
65
  shouldDirty: true,
64
66
  shouldValidate: true
65
67
  });
@@ -67,7 +69,7 @@ const OptionSelectMultipleOrder = () => {
67
69
  /**
68
70
  * Append option info.
69
71
  */
70
- const appendOptionInfo = () => {
72
+ var appendOptionInfo = function appendOptionInfo() {
71
73
  appendOptionInfoFieldItem({
72
74
  id: createRandomId(),
73
75
  title: '',
@@ -77,9 +79,9 @@ const OptionSelectMultipleOrder = () => {
77
79
  /**
78
80
  * Remove item from option info at index.
79
81
  */
80
- const removeOptionInfo = index => {
82
+ var removeOptionInfo = function removeOptionInfo(index) {
81
83
  updateAnswerInfo({
82
- index,
84
+ index: index,
83
85
  checked: false,
84
86
  removed: true
85
87
  });
@@ -88,15 +90,20 @@ const OptionSelectMultipleOrder = () => {
88
90
  /**
89
91
  * Sort options based on the old and new index.
90
92
  */
91
- const handleSortEnd = ({
92
- oldIndex,
93
- newIndex
94
- }) => {
95
- const prevOptions = cloneDeep(watchedOptions).map((option, index) => Object.assign(Object.assign({}, option), {
96
- originIndex: index
97
- }));
98
- const updatedOptions = arrayMove(prevOptions, oldIndex, newIndex);
99
- const updatedAnswerInfo = watchedAnswerInfo.map(answerIndex => updatedOptions.findIndex(option => option.originIndex === answerIndex));
93
+ var handleSortEnd = function handleSortEnd(_ref) {
94
+ var oldIndex = _ref.oldIndex,
95
+ newIndex = _ref.newIndex;
96
+ var prevOptions = cloneDeep(watchedOptions).map(function (option, index) {
97
+ return Object.assign(Object.assign({}, option), {
98
+ originIndex: index
99
+ });
100
+ });
101
+ var updatedOptions = arrayMove(prevOptions, oldIndex, newIndex);
102
+ var updatedAnswerInfo = watchedAnswerInfo.map(function (answerIndex) {
103
+ return updatedOptions.findIndex(function (option) {
104
+ return option.originIndex === answerIndex;
105
+ });
106
+ });
100
107
  setValue('answerInfoDefault', updatedAnswerInfo);
101
108
  moveOptionInfoFieldItem(oldIndex, newIndex);
102
109
  };
@@ -106,110 +113,125 @@ const OptionSelectMultipleOrder = () => {
106
113
  if (!Array.isArray(watchedAnswerInfo)) {
107
114
  return null;
108
115
  }
109
- return React.createElement(StyledWrap, null, React.createElement(Controller, {
110
- name: "answerInfoDefault",
111
- control: control,
112
- rules: {
113
- validate: v => {
114
- if (Array.isArray(v) && v.length < 1) {
115
- return intl.formatMessage({
116
- id: 'content.option.errorMessage.required'
117
- });
116
+ return jsxs(StyledWrap, {
117
+ children: [jsx(Controller, {
118
+ name: "answerInfoDefault",
119
+ control: control,
120
+ rules: {
121
+ validate: function validate(v) {
122
+ if (Array.isArray(v) && v.length < 1) {
123
+ return intl.formatMessage({
124
+ id: 'content.option.errorMessage.required'
125
+ });
126
+ }
127
+ return true;
118
128
  }
119
- return true;
120
- }
121
- },
122
- render: ({
123
- fieldState
124
- }) => {
125
- var _a;
126
- return React.createElement(Transition, {
127
- in: fieldState.invalid,
128
- timeout: 0,
129
- mountOnEnter: true,
130
- unmountOnExit: true
131
- }, React.createElement(React.Fragment, null, React.createElement(StatusText, {
132
- children: (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message,
133
- role: "danger"
134
- }), React.createElement(Vspace, {
135
- height: 0.5
136
- })));
137
- }
138
- }), React.createElement(StyledInputGroup, {
139
- useDragHandle: true,
140
- onSortEnd: handleSortEnd
141
- }, optionInfoFields.map(({
142
- id
143
- }, index) => React.createElement(Controller, {
144
- key: id,
145
- control: control,
146
- name: `optionsDefault.${index}.content`,
147
- rules: {
148
- required: {
149
- value: true,
150
- message: intl.formatMessage({
151
- id: 'option.common.select.errorMessage.required'
152
- })
153
- }
154
- },
155
- render: ({
156
- field,
157
- fieldState
158
- }) => {
159
- var _a;
160
- return React.createElement(OptionEditor, Object.assign({
161
- index: index,
162
- placeholder: intl.formatMessage({
163
- id: 'option.common.select.placeholder'
164
- }),
165
- prefix: React.createElement(Checkbox, {
166
- disabled: disabled,
167
- checked: watchedAnswerInfo.includes(index),
168
- altChar: watchedAnswerInfo.indexOf(index) + 1,
169
- onChange: checked => updateAnswerInfo({
170
- index,
171
- checked
129
+ },
130
+ render: function render(_ref2) {
131
+ var fieldState = _ref2.fieldState;
132
+ var _a;
133
+ return jsx(Transition, {
134
+ in: fieldState.invalid,
135
+ timeout: 0,
136
+ mountOnEnter: true,
137
+ unmountOnExit: true,
138
+ children: jsxs(Fragment, {
139
+ children: [jsx(StatusText, {
140
+ children: (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message,
141
+ role: "danger"
142
+ }), jsx(Vspace, {
143
+ height: 0.5
144
+ })]
172
145
  })
173
- }),
174
- suffix: React.createElement(Tooltip, {
175
- title: optionInfoFields.length <= MIN_OPTION_INFO_COUNT ? intl.formatMessage({
176
- id: 'option.common.select.tooltip.minOptionInfoItem'
177
- }) : undefined,
178
- placement: "top-start"
179
- }, React.createElement("span", null, React.createElement(IconButton, {
180
- icon: eilMathsignMultiplyBasic,
181
- size: "tiny",
182
- role: "grey9",
183
- border: false,
146
+ });
147
+ }
148
+ }), jsx(StyledInputGroup, {
149
+ useDragHandle: true,
150
+ onSortEnd: handleSortEnd,
151
+ children: optionInfoFields.map(function (_ref3, index) {
152
+ var id = _ref3.id;
153
+ return jsx(Controller, {
154
+ control: control,
155
+ name: "optionsDefault.".concat(index, ".content"),
156
+ rules: {
157
+ required: {
158
+ value: true,
159
+ message: intl.formatMessage({
160
+ id: 'option.common.select.errorMessage.required'
161
+ })
162
+ }
163
+ },
164
+ render: function render(_ref4) {
165
+ var field = _ref4.field,
166
+ fieldState = _ref4.fieldState;
167
+ var _a;
168
+ return jsx(OptionEditor, Object.assign({
169
+ index: index,
170
+ placeholder: intl.formatMessage({
171
+ id: 'option.common.select.placeholder'
172
+ }),
173
+ prefix: jsx(Checkbox, {
174
+ disabled: disabled,
175
+ checked: watchedAnswerInfo.includes(index),
176
+ altChar: watchedAnswerInfo.indexOf(index) + 1,
177
+ onChange: function onChange(checked) {
178
+ return updateAnswerInfo({
179
+ index: index,
180
+ checked: checked
181
+ });
182
+ }
183
+ }),
184
+ suffix: jsx(Tooltip, {
185
+ title: optionInfoFields.length <= MIN_OPTION_INFO_COUNT ? intl.formatMessage({
186
+ id: 'option.common.select.tooltip.minOptionInfoItem'
187
+ }) : undefined,
188
+ placement: "top-start",
189
+ children: jsx("span", {
190
+ children: jsx(IconButton, {
191
+ icon: eilMathsignMultiplyBasic,
192
+ size: "tiny",
193
+ role: "grey9",
194
+ border: false,
195
+ transparent: true,
196
+ disabled: optionInfoFields.length <= MIN_OPTION_INFO_COUNT || disabled,
197
+ onClick: function onClick() {
198
+ return removeOptionInfo(index);
199
+ }
200
+ })
201
+ })
202
+ }),
203
+ readOnly: disabled,
204
+ invalid: fieldState.invalid,
205
+ invalidText: (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message
206
+ }, field));
207
+ }
208
+ }, id);
209
+ })
210
+ }), jsx(Vspace, {
211
+ height: 0.5
212
+ }), jsx(Tooltip, {
213
+ title: optionInfoFields.length >= MAX_OPTION_INFO_COUNT ? intl.formatMessage({
214
+ id: 'option.common.select.tooltip.maxOptionInfoItem'
215
+ }) : undefined,
216
+ placement: "bottom",
217
+ children: jsx("span", {
218
+ children: jsx(Button, {
219
+ block: true,
220
+ size: "micro",
221
+ borderDashed: true,
184
222
  transparent: true,
185
- disabled: optionInfoFields.length <= MIN_OPTION_INFO_COUNT || disabled,
186
- onClick: () => removeOptionInfo(index)
187
- }))),
188
- readOnly: disabled,
189
- invalid: fieldState.invalid,
190
- invalidText: (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message
191
- }, field));
192
- }
193
- }))), React.createElement(Vspace, {
194
- height: 0.5
195
- }), React.createElement(Tooltip, {
196
- title: optionInfoFields.length >= MAX_OPTION_INFO_COUNT ? intl.formatMessage({
197
- id: 'option.common.select.tooltip.maxOptionInfoItem'
198
- }) : undefined,
199
- placement: "bottom"
200
- }, React.createElement("span", null, React.createElement(Button, {
201
- block: true,
202
- size: "micro",
203
- borderDashed: true,
204
- transparent: true,
205
- icon: React.createElement(Icon, {
206
- icon: eilMathsignAddCircle
207
- }),
208
- disabled: optionInfoFields.length >= MAX_OPTION_INFO_COUNT || disabled,
209
- onClick: appendOptionInfo
210
- }, intl.formatMessage({
211
- id: 'option.common.select.addButton'
212
- })))));
223
+ icon: jsx(Icon, {
224
+ icon: eilMathsignAddCircle
225
+ }),
226
+ disabled: optionInfoFields.length >= MAX_OPTION_INFO_COUNT || disabled,
227
+ onClick: appendOptionInfo,
228
+ children: intl.formatMessage({
229
+ id: 'option.common.select.addButton'
230
+ })
231
+ })
232
+ })
233
+ })]
234
+ });
213
235
  };
214
236
 
215
237
  export { OptionSelectMultipleOrder as default };