@semcore/feedback-form 6.38.1 → 6.38.4-prerelease.0
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/CHANGELOG.md +18 -0
- package/lib/cjs/FeedbackForm.js +7 -7
- package/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
- package/lib/cjs/component/feedback-rating/FeedbackRating.js +14 -9
- package/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/lib/cjs/component/feedback-rating/FeedbackRating.type.js.map +1 -1
- package/lib/cjs/component/slider-rating/SliderRating.js +7 -7
- package/lib/es6/FeedbackForm.js +7 -7
- package/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
- package/lib/es6/component/feedback-rating/FeedbackRating.js +14 -9
- package/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/lib/es6/component/feedback-rating/FeedbackRating.type.js.map +1 -1
- package/lib/es6/component/slider-rating/SliderRating.js +7 -7
- package/lib/types/component/feedback-rating/FeedbackRating.type.d.ts +3 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [6.38.4] - 2025-02-05
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [4.56.0 ~> 4.57.0], `@semcore/button` [5.41.0 ~> 5.41.1], `@semcore/notice` [5.44.0 ~> 5.44.1]).
|
|
10
|
+
|
|
11
|
+
## [6.38.3] - 2025-01-27
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `notificationTitle` prop to `FeedbackRating`.
|
|
16
|
+
|
|
17
|
+
## [6.38.2] - 2024-01-21
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- type `email` for config in `FeedbackRating.Item`.
|
|
22
|
+
|
|
5
23
|
## [6.38.1] - 2024-12-19
|
|
6
24
|
|
|
7
25
|
### Added
|
package/lib/cjs/FeedbackForm.js
CHANGED
|
@@ -28,13 +28,13 @@ var _FeedbackItem = require("./component/feedback-item/FeedbackItem");
|
|
|
28
28
|
var _SubmitButton = require("./component/submit-button/SubmitButton");
|
|
29
29
|
var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"];
|
|
30
30
|
/*__reshadow-styles__:"./style/feedback-form.shadow.css"*/
|
|
31
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
32
|
-
"__SFeedbackForm": "
|
|
33
|
-
"__SSubmit": "
|
|
34
|
-
"__SCancel": "
|
|
35
|
-
"__SNotice": "
|
|
36
|
-
"__SSuccess": "
|
|
37
|
-
"__SEmail": "
|
|
31
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SFeedbackForm_17gn6_gg_{max-width:320px}.___SCancel_17gn6_gg_,.___SSubmit_17gn6_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_17gn6_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);border-width:1px 0 0;border-top-style:solid;border-radius:0 0 var(--intergalactic-surface-rounded, 6px) var(--intergalactic-surface-rounded, 6px)}.___SSuccess_17gn6_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_17gn6_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));width:80px;height:80px;background-image:url(\"data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345E0A8'/%3E%3Cpath d='M29 45.2852L29.2 45.6352C35.39 42.1852 53.39 31.9652 56.73 35.1052C55.6 32.0052 39.7 35.4352 29 45.2852Z' fill='white'/%3E%3Cpath d='M28.44 31.6343C26.63 37.6343 19.23 56.1043 15 61.9443L18 62.8543L19.58 61.5343C23.8 51.9843 29.58 35.5343 29.89 30.0743C29.39 29.8143 28.93 30.2143 28.44 31.6343Z' fill='white'/%3E%3Cpath d='M15 62.0078C19.23 56.1678 26.63 37.7378 28.44 31.6678C30.25 25.5978 33.49 37.6678 31.67 42.7878' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 45.9424C38.68 35.5824 55.27 31.9424 56.43 35.1024C57.12 36.9924 43 41.3624 38.02 47.4224' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44.45 21.93C41.21 20.77 35.86 19.04 33 18.24C37.12 16.41 70 4.24 72.67 3C71.75 7.11 67.75 21.28 65.96 27.93C61.13 26.25 56.23 24.78 53.03 23.74C51.0298 26.3907 49.2219 29.1812 47.62 32.09C46.44 28.23 45.29 23.77 44.45 21.93Z' fill='white' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M45 22.08L61.74 11' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M53 23.73L72.64 3' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48 32.58L55.86 25' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.23 30.77L51.69 25.13L52.66 24L54.73 24.61L55.16 24.48L51.8 27.91L49.33 30.18L48 31.29L48.23 30.77Z' fill='black'/%3E%3Cpath d='M33.81 22L23 27.12' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M40.89 23L34 27.37' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M62.04 29L58 38.85' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M46.68 41C50.29 43.42 44.81 49.52 43 51.12' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47.17 44C51.31 46.09 48.33 51.76 46 54.6' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.86 49C54.37 53.48 36.31 72.72 35 73.78' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cmask id='mask0_11950_117175' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='4' y='6' width='73' height='73'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345DFA7'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_11950_117175)'%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' fill='black'/%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A\")}" /*__inner_css_end__*/, "17gn6_gg_") /*__reshadow_css_end__*/, {
|
|
32
|
+
"__SFeedbackForm": "___SFeedbackForm_17gn6_gg_",
|
|
33
|
+
"__SSubmit": "___SSubmit_17gn6_gg_",
|
|
34
|
+
"__SCancel": "___SCancel_17gn6_gg_",
|
|
35
|
+
"__SNotice": "___SNotice_17gn6_gg_",
|
|
36
|
+
"__SSuccess": "___SSuccess_17gn6_gg_",
|
|
37
|
+
"__SEmail": "___SEmail_17gn6_gg_"
|
|
38
38
|
});
|
|
39
39
|
var FeedbackForm = /*#__PURE__*/function (_Component) {
|
|
40
40
|
(0, _inherits2["default"])(FeedbackForm, _Component);
|
|
@@ -20,9 +20,9 @@ var _flexBox = require("@semcore/flex-box");
|
|
|
20
20
|
var _checkbox = _interopRequireDefault(require("@semcore/checkbox"));
|
|
21
21
|
var _excluded = ["styles", "id", "label", "type", "focused"];
|
|
22
22
|
/*__reshadow-styles__:"../../style/checkbox-button.shadow.css"*/
|
|
23
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
24
|
-
"__SCheckboxButton": "
|
|
25
|
-
"_checked": "
|
|
23
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SCheckboxButton_f0k01_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_f0k01_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_f0k01_gg_.__checked_f0k01_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_f0k01_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_f0k01_gg_.__checked_f0k01_gg_:hover{background-color:rgba(0,143,248,.2)}}" /*__inner_css_end__*/, "f0k01_gg_") /*__reshadow_css_end__*/, {
|
|
24
|
+
"__SCheckboxButton": "___SCheckboxButton_f0k01_gg_",
|
|
25
|
+
"_checked": "__checked_f0k01_gg_"
|
|
26
26
|
});
|
|
27
27
|
var CheckboxButtonRoot = /*#__PURE__*/function (_Component) {
|
|
28
28
|
(0, _inherits2["default"])(CheckboxButtonRoot, _Component);
|
|
@@ -39,10 +39,10 @@ var _CheckboxButton = _interopRequireDefault(require("../checkbox-button/Checkbo
|
|
|
39
39
|
var _input = _interopRequireDefault(require("@semcore/input"));
|
|
40
40
|
var _intergalacticDynamicLocales = require("../../translations/__intergalactic-dynamic-locales");
|
|
41
41
|
var _noticeBubble = require("@semcore/notice-bubble");
|
|
42
|
-
var _excluded = ["header", "submitText", "formConfig", "notificationText", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"];
|
|
42
|
+
var _excluded = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"];
|
|
43
43
|
/*__reshadow-styles__:"../../style/feedback-rating.shadow.css"*/
|
|
44
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
45
|
-
"__SFeedbackRating": "
|
|
44
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SFeedbackRating_apau8_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_apau8_gg_ li{list-style:none}" /*__inner_css_end__*/, "apau8_gg_") /*__reshadow_css_end__*/, {
|
|
45
|
+
"__SFeedbackRating": "___SFeedbackRating_apau8_gg_"
|
|
46
46
|
});
|
|
47
47
|
var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
48
48
|
(0, _inherits2["default"])(FeedbackRatingRoot, _Component);
|
|
@@ -122,7 +122,11 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
122
122
|
id: config.key
|
|
123
123
|
}));
|
|
124
124
|
}
|
|
125
|
-
if (config.type === 'input') {
|
|
125
|
+
if (config.type === 'input' || config.type === 'email') {
|
|
126
|
+
if (config.type === 'email') {
|
|
127
|
+
input.autoComplete = 'email';
|
|
128
|
+
input.type = 'email';
|
|
129
|
+
}
|
|
126
130
|
return /*#__PURE__*/_react["default"].createElement(_input["default"], {
|
|
127
131
|
state: input.state
|
|
128
132
|
}, /*#__PURE__*/_react["default"].createElement(_input["default"].Value, (0, _extends2["default"])({}, input, {
|
|
@@ -210,6 +214,7 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
210
214
|
submitText = _this$asProps2.submitText,
|
|
211
215
|
formConfig = _this$asProps2.formConfig,
|
|
212
216
|
notificationText = _this$asProps2.notificationText,
|
|
217
|
+
notificationTitle = _this$asProps2.notificationTitle,
|
|
213
218
|
learnMoreLink = _this$asProps2.learnMoreLink,
|
|
214
219
|
Children = _this$asProps2.Children,
|
|
215
220
|
styles = _this$asProps2.styles,
|
|
@@ -231,20 +236,20 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
231
236
|
return item.type === 'checkbox';
|
|
232
237
|
});
|
|
233
238
|
var textFields = formConfig.filter(function (item) {
|
|
234
|
-
return item.type === 'textarea' || item.type === 'input';
|
|
239
|
+
return item.type === 'textarea' || item.type === 'input' || item.type === 'email';
|
|
235
240
|
});
|
|
236
241
|
var notificationId = this.getNoticeTextId();
|
|
237
242
|
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(_flexBox.Box, (0, _core.assignProps)({}, _ref2), /*#__PURE__*/_react["default"].createElement(_notice["default"], _ref4.cn("Notice", {
|
|
238
243
|
"visible": notificationVisible,
|
|
239
244
|
"aria-label": getI18nText('leaveFeedback'),
|
|
240
245
|
"tag": _flexBox.Flex,
|
|
241
|
-
"alignItems": 'center'
|
|
246
|
+
"alignItems": notificationTitle ? 'flex-start' : 'center'
|
|
242
247
|
}), /*#__PURE__*/_react["default"].createElement(_notice["default"].Label, {
|
|
243
248
|
mr: 3,
|
|
244
249
|
"aria-hidden": true
|
|
245
|
-
}, /*#__PURE__*/_react["default"].createElement(_Feedback["default"], _ref4.cn("FeedbackIllustration", {}))), /*#__PURE__*/_react["default"].createElement(_notice["default"].Content, {
|
|
250
|
+
}, /*#__PURE__*/_react["default"].createElement(_Feedback["default"], _ref4.cn("FeedbackIllustration", {}))), /*#__PURE__*/_react["default"].createElement(_notice["default"].Content, null, notificationTitle ? /*#__PURE__*/_react["default"].createElement(_notice["default"].Title, null, notificationTitle) : null, /*#__PURE__*/_react["default"].createElement(_notice["default"].Text, {
|
|
246
251
|
tag: _flexBox.Flex,
|
|
247
|
-
alignItems: 'center'
|
|
252
|
+
alignItems: notificationTitle ? 'flex-start' : 'center'
|
|
248
253
|
}, /*#__PURE__*/_react["default"].createElement(_typography.Text, _ref4.cn("Text", {
|
|
249
254
|
"mr": 3,
|
|
250
255
|
"id": notificationId
|
|
@@ -257,7 +262,7 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
257
262
|
}))), learnMoreLink && /*#__PURE__*/_react["default"].createElement(_link["default"], _ref4.cn("Link", {
|
|
258
263
|
"ml": 3,
|
|
259
264
|
"href": learnMoreLink
|
|
260
|
-
}), getI18nText('learnMore'))), /*#__PURE__*/_react["default"].createElement(_notice["default"].Close, {
|
|
265
|
+
}), getI18nText('learnMore')))), /*#__PURE__*/_react["default"].createElement(_notice["default"].Close, {
|
|
261
266
|
onClick: onNotificationClose
|
|
262
267
|
})), /*#__PURE__*/_react["default"].createElement(SFeedbackRating, _ref4.cn("SFeedbackRating", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
263
268
|
"visible": visible,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_reactFinalForm","_finalFormFocus","_spinContainer","_i18nEnhance","_uniqueID","_notice","_m","_m2","_typography","_Feedback","_link","_SliderRating","_modal","_textarea","_flexBox","_FeedbackItem","_SubmitButton","_CheckboxButton","_input","_intergalacticDynamicLocales","_noticeBubble","_excluded","style","_index","sstyled","insert","FeedbackRatingRoot","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","error","NoticeBubbleManager","createFocusDecorator","rating","asProps","onVisibleChange","fn","value","e","config","index","initialValue","props","initialValues","key","createElement","Field","name","type","_ref7","input","FeedbackRating","Checkbox","_extends2","id","label","onChange","_checked","focused","_config$description","Text","mb","size","isDescriptionReactFragment","description","React","Fragment","Flex","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","_ref8","h","handleChange","state","Value","Box","color","_createClass2","get","uid","getHeaderProps","headerId","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","_this2","_this$asProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","_this3","_this$asProps2","header","submitText","formConfig","notificationText","learnMoreLink","Children","styles","forwardRef","theme","background","visible","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","other","_objectWithoutProperties2","SFeedbackRating","Modal","checkboxFields","filter","item","textFields","notificationId","assignProps","cn","Label","mr","Content","alignItems","Actions","handleChangeRating","Close","onClick","_objectSpread2","handelCloseModal","Form","focusDecorator","api","_ref5","submitting","Header","handleSubmit","_ref9","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","NoticeBubbleContainer","Component","i18nEnhance","localizedMessages","uniqueIDEnhancement","onSubmit","i18n","locale","words","split","symbols","join","Boolean","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","createComponent","FeedbackItem","CheckboxButton","SubmitButton","_default","exports"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\nimport SpinContainer from '@semcore/spin-container';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport Notice from '@semcore/notice';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport { Text } from '@semcore/typography';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Link from '@semcore/link';\nimport SliderRating from '../slider-rating/SliderRating';\nimport Modal from '@semcore/modal';\nimport Textarea from '@semcore/textarea';\nimport { Box, Flex } from '@semcore/flex-box';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport { SubmitButton } from '../submit-button/SubmitButton';\nimport { FeedbackRatingProps, FeedbackRatingType, FormConfigItem } from './FeedbackRating.type';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport Input from '@semcore/input';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport style from '../../style/feedback-rating.shadow.css';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n {},\n State,\n typeof FeedbackRatingRoot.enhance\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static validate = {\n description: (error: Error | string) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (Boolean(value) && (symbols.length < 10 || words.length < 3)) {\n return error;\n }\n },\n email: (error: Error | string) => (value = '') => {\n if (Boolean(value) && !/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n state: State = {\n error: false,\n };\n\n manager = new NoticeBubbleManager();\n\n private focusDecorator = createFocusDecorator<Record<string, any>>();\n\n get headerId() {\n const { uid } = this.asProps;\n\n return `${uid}-feedback-rating-header`;\n }\n\n getHeaderProps() {\n return {\n id: this.headerId,\n };\n }\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n getNoticeTextId() {\n const { uid } = this.asProps;\n return `${uid}-feedback-rating-notice`;\n }\n\n handleChangeRating = (rating: number) => {\n this.asProps.onVisibleChange(true, rating);\n };\n\n handelCloseModal = () => {\n this.asProps.onVisibleChange(false, this.asProps.rating);\n };\n\n handleChange =\n (fn: (e: React.SyntheticEvent) => void) => (value: any, e: React.SyntheticEvent) => {\n fn(e);\n };\n\n componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>) {\n const { status, getI18nText } = this.asProps;\n\n if (prevProps.status !== status) {\n this.setState({ error: false });\n\n if (status === 'success') {\n // showing notice with delay for SR, less than 100ms is not enough\n setTimeout(() => {\n this.manager.add({\n icon: <CheckM color='green-400' />,\n children: getI18nText('successMessage'),\n initialAnimation: true,\n duration: 5000,\n });\n }, 300);\n } else if (status === 'error') {\n this.setState({ error: true });\n }\n }\n }\n\n renderCheckbox = (config: FormConfigItem, index: number) => {\n const initialValue = this.props.initialValues[config.key];\n\n return (\n <Field name={config.key} initialValue={initialValue} type={'checkbox'} key={config.key}>\n {({ input }) => (\n <FeedbackRating.Checkbox\n {...input}\n id={config.key}\n label={config.label}\n onChange={(_checked, e) => input.onChange(e)}\n focused={index === 0}\n />\n )}\n </Field>\n );\n };\n\n renderTextField = (config: FormConfigItem) => {\n const initialValue = this.props.initialValues[config.key];\n\n const label =\n typeof config.label === 'string' ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n ) : (\n (config.label as unknown as JSX.Element)\n );\n\n const isDescriptionReactFragment =\n (config.description as ReactElement)?.type === React.Fragment;\n\n return (\n <Flex direction='column'>\n <Flex tag='label' mt={4} htmlFor={config.key} key={config.key}>\n {label}\n </Flex>\n\n <FeedbackRating.Item\n name={config.key}\n validate={config.validate}\n initialValue={initialValue}\n placement='left-start'\n flip={{\n fallbackPlacements: ['right-start', 'bottom'],\n }}\n aria-describedby={config.description ? config.key + '-description' : undefined}\n >\n {({ input }) => {\n if (config.type === 'textarea') {\n return (\n <Textarea\n {...input}\n h={80}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n );\n }\n if (config.type === 'input') {\n return (\n <Input state={input.state}>\n <Input.Value\n {...input}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n </Input>\n );\n }\n return null;\n }}\n </FeedbackRating.Item>\n {config.description && (\n <Box mt={2}>\n {typeof config.description === 'string' || isDescriptionReactFragment ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n ) : (\n config.description\n )}\n </Box>\n )}\n </Flex>\n );\n };\n\n render() {\n const {\n header,\n submitText,\n formConfig,\n notificationText,\n learnMoreLink,\n Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n ...other\n } = this.asProps;\n\n const SFeedbackRating = Root;\n const checkboxFields = formConfig.filter((item) => item.type === 'checkbox');\n const textFields = formConfig.filter(\n (item) => item.type === 'textarea' || item.type === 'input',\n );\n const notificationId = this.getNoticeTextId();\n\n return sstyled(styles)(\n <Root render={Box}>\n <Notice\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={'center'}\n >\n <Notice.Label mr={3} aria-hidden={true}>\n <FeedbackIllustration />\n </Notice.Label>\n <Notice.Content tag={Flex} alignItems={'center'}>\n <Text mr={3} id={notificationId}>\n {notificationText}\n </Text>\n <Notice.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </Notice.Actions>\n {learnMoreLink && (\n <Link ml={3} href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </Notice.Content>\n <Notice.Close onClick={onNotificationClose} />\n </Notice>\n\n <SFeedbackRating\n render={Modal}\n visible={visible}\n onClose={this.handelCloseModal}\n p={0}\n use:w={modalWidth ?? 440}\n aria-labelledby={this.headerId}\n >\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n p={1}\n m={9}\n >\n <Flex justifyContent='center'>\n <SliderRating value={rating} readonly={true} />\n </Flex>\n\n {(header as ReactElement)?.type === FeedbackRating.Header ? (\n header\n ) : (\n <FeedbackRating.Header>{header}</FeedbackRating.Header>\n )}\n\n <Box\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n >\n <Field name={'rating'} initialValue={rating}>\n {({ input }) => <input {...input} type='hidden' />}\n </Field>\n\n <div role={'group'} aria-labelledby={this.headerId}>\n {checkboxFields.map((formConfigItem, index) =>\n this.renderCheckbox(formConfigItem, index),\n )}\n </div>\n\n {textFields.map((formConfigItem) => this.renderTextField(formConfigItem))}\n\n {this.state.error && (\n <Notice theme={'warning'} mt={4} mb={4}>\n <Notice.Label>\n <WarnM />\n </Notice.Label>\n <Notice.Content>\n {getI18nText('errorMessage', { email: errorFeedbackEmail })}\n </Notice.Content>\n </Notice>\n )}\n\n <Flex mt={4} justifyContent={'center'}>\n <FeedbackRating.Submit\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n size={'l'}\n >\n {submitText ?? getI18nText('submitButton')}\n </FeedbackRating.Submit>\n </Flex>\n </Box>\n </SpinContainer>,\n )\n }\n </Form>\n </SFeedbackRating>\n\n <NoticeBubbleContainer manager={this.manager} />\n </Root>,\n );\n }\n}\n\nfunction Header(props: any) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(\n <SHeader render={Text} size={300} tag='h2' mb={4} mt={4} textAlign={'center'} />,\n );\n}\n\nconst FeedbackRating: typeof FeedbackRatingType & { validate: typeof FeedbackRatingRoot.validate } =\n createComponent(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n });\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,cAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,OAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,EAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,GAAA,GAAAR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AI4J,OAAO,CAAC3I,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC4I,IAAI,CAACC,MAAM,CAAC7I,KAAK,CAAC,CAAC8I,WAAW,EAAE,CAAC,EAAE;QACrE,OAAOrJ,KAAK;MACd;IACF,CAAC;EAAA;AACH,CAAC;AA8SH,SAAS4H,MAAMA,CAAChH,KAAU,EAAE;EAAA,IAAA0I,KAAA,GAAAC,YAAA;IAAAC,KAAA;EAC1B,IAAQ/D,MAAM,GAAK7E,KAAK,CAAhB6E,MAAM;EACd,IAAMgE,OAAO,GAEM3H,gBAAI;EADvB,OAAA0H,KAAA,GAAO,IAAA5K,aAAO,EAAC6G,MAAM,CAAC,eACpBvI,MAAA,YAAA6D,aAAA,CAAC0I,OAAO,EAAAD,KAAA,CAAA5C,EAAA,gBAAAS,cAAA,qBAAAtK,KAAA,CAAA4J,WAAA;IAAA,QAAqB,GAAG;IAAA,OAAM,IAAI;IAAA,MAAK,CAAC;IAAA,MAAM,CAAC;IAAA,aAAa;EAAQ,GAAA2C,KAAA,IAAI;AAEpF;AAEA,IAAMjI,cAA4F,GAChG,IAAAqI,gBAAe,EAAC5K,kBAAkB,EAAE;EAClC8I,MAAM,EAANA,MAAM;EACNlF,IAAI,EAAEiH,0BAAY;EAClBrI,QAAQ,EAAEsI,0BAAc;EACxBxB,MAAM,EAAEyB;AACV,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEUzI,cAAc;AAAA0I,OAAA,cAAAD,QAAA"}
|
|
1
|
+
{"version":3,"file":"FeedbackRating.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_reactFinalForm","_finalFormFocus","_spinContainer","_i18nEnhance","_uniqueID","_notice","_m","_m2","_typography","_Feedback","_link","_SliderRating","_modal","_textarea","_flexBox","_FeedbackItem","_SubmitButton","_CheckboxButton","_input","_intergalacticDynamicLocales","_noticeBubble","_excluded","style","_index","sstyled","insert","FeedbackRatingRoot","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","error","NoticeBubbleManager","createFocusDecorator","rating","asProps","onVisibleChange","fn","value","e","config","index","initialValue","props","initialValues","key","createElement","Field","name","type","_ref7","input","FeedbackRating","Checkbox","_extends2","id","label","onChange","_checked","focused","_config$description","Text","mb","size","isDescriptionReactFragment","description","React","Fragment","Flex","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","_ref8","h","handleChange","autoComplete","state","Value","Box","color","_createClass2","get","uid","getHeaderProps","headerId","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","_this2","_this$asProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","_this3","_this$asProps2","header","submitText","formConfig","notificationText","notificationTitle","learnMoreLink","Children","styles","forwardRef","theme","background","visible","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","other","_objectWithoutProperties2","SFeedbackRating","Modal","checkboxFields","filter","item","textFields","notificationId","assignProps","cn","Label","mr","Content","Title","alignItems","Actions","handleChangeRating","Close","onClick","_objectSpread2","handelCloseModal","Form","focusDecorator","api","_ref5","submitting","Header","handleSubmit","_ref9","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","NoticeBubbleContainer","Component","i18nEnhance","localizedMessages","uniqueIDEnhancement","onSubmit","i18n","locale","words","split","symbols","join","Boolean","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","createComponent","FeedbackItem","CheckboxButton","SubmitButton","_default","exports"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\nimport SpinContainer from '@semcore/spin-container';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport Notice from '@semcore/notice';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport { Text } from '@semcore/typography';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Link from '@semcore/link';\nimport SliderRating from '../slider-rating/SliderRating';\nimport Modal from '@semcore/modal';\nimport Textarea from '@semcore/textarea';\nimport { Box, Flex } from '@semcore/flex-box';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport { SubmitButton } from '../submit-button/SubmitButton';\nimport { FeedbackRatingProps, FeedbackRatingType, FormConfigItem } from './FeedbackRating.type';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport Input from '@semcore/input';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport style from '../../style/feedback-rating.shadow.css';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n {},\n State,\n typeof FeedbackRatingRoot.enhance\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static validate = {\n description: (error: Error | string) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (Boolean(value) && (symbols.length < 10 || words.length < 3)) {\n return error;\n }\n },\n email: (error: Error | string) => (value = '') => {\n if (Boolean(value) && !/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n state: State = {\n error: false,\n };\n\n manager = new NoticeBubbleManager();\n\n private focusDecorator = createFocusDecorator<Record<string, any>>();\n\n get headerId() {\n const { uid } = this.asProps;\n\n return `${uid}-feedback-rating-header`;\n }\n\n getHeaderProps() {\n return {\n id: this.headerId,\n };\n }\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n getNoticeTextId() {\n const { uid } = this.asProps;\n return `${uid}-feedback-rating-notice`;\n }\n\n handleChangeRating = (rating: number) => {\n this.asProps.onVisibleChange(true, rating);\n };\n\n handelCloseModal = () => {\n this.asProps.onVisibleChange(false, this.asProps.rating);\n };\n\n handleChange =\n (fn: (e: React.SyntheticEvent) => void) => (value: any, e: React.SyntheticEvent) => {\n fn(e);\n };\n\n componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>) {\n const { status, getI18nText } = this.asProps;\n\n if (prevProps.status !== status) {\n this.setState({ error: false });\n\n if (status === 'success') {\n // showing notice with delay for SR, less than 100ms is not enough\n setTimeout(() => {\n this.manager.add({\n icon: <CheckM color='green-400' />,\n children: getI18nText('successMessage'),\n initialAnimation: true,\n duration: 5000,\n });\n }, 300);\n } else if (status === 'error') {\n this.setState({ error: true });\n }\n }\n }\n\n renderCheckbox = (config: FormConfigItem, index: number) => {\n const initialValue = this.props.initialValues[config.key];\n\n return (\n <Field name={config.key} initialValue={initialValue} type={'checkbox'} key={config.key}>\n {({ input }) => (\n <FeedbackRating.Checkbox\n {...input}\n id={config.key}\n label={config.label}\n onChange={(_checked, e) => input.onChange(e)}\n focused={index === 0}\n />\n )}\n </Field>\n );\n };\n\n renderTextField = (config: FormConfigItem) => {\n const initialValue = this.props.initialValues[config.key];\n\n const label =\n typeof config.label === 'string' ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n ) : (\n (config.label as unknown as JSX.Element)\n );\n\n const isDescriptionReactFragment =\n (config.description as ReactElement)?.type === React.Fragment;\n\n return (\n <Flex direction='column'>\n <Flex tag='label' mt={4} htmlFor={config.key} key={config.key}>\n {label}\n </Flex>\n\n <FeedbackRating.Item\n name={config.key}\n validate={config.validate}\n initialValue={initialValue}\n placement='left-start'\n flip={{\n fallbackPlacements: ['right-start', 'bottom'],\n }}\n aria-describedby={config.description ? config.key + '-description' : undefined}\n >\n {({ input }) => {\n if (config.type === 'textarea') {\n return (\n <Textarea\n {...input}\n h={80}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n );\n }\n if (config.type === 'input' || config.type === 'email') {\n if (config.type === 'email') {\n input.autoComplete = 'email';\n input.type = 'email';\n }\n\n return (\n <Input state={input.state}>\n <Input.Value\n {...input}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n </Input>\n );\n }\n return null;\n }}\n </FeedbackRating.Item>\n {config.description && (\n <Box mt={2}>\n {typeof config.description === 'string' || isDescriptionReactFragment ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n ) : (\n config.description\n )}\n </Box>\n )}\n </Flex>\n );\n };\n\n render() {\n const {\n header,\n submitText,\n formConfig,\n notificationText,\n notificationTitle,\n learnMoreLink,\n Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n ...other\n } = this.asProps;\n\n const SFeedbackRating = Root;\n const checkboxFields = formConfig.filter((item) => item.type === 'checkbox');\n const textFields = formConfig.filter(\n (item) => item.type === 'textarea' || item.type === 'input' || item.type === 'email',\n );\n const notificationId = this.getNoticeTextId();\n\n return sstyled(styles)(\n <Root render={Box}>\n <Notice\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={notificationTitle ? 'flex-start' : 'center'}\n >\n <Notice.Label mr={3} aria-hidden={true}>\n <FeedbackIllustration />\n </Notice.Label>\n <Notice.Content>\n {notificationTitle ? <Notice.Title>{notificationTitle}</Notice.Title> : null}\n <Notice.Text tag={Flex} alignItems={notificationTitle ? 'flex-start' : 'center'}>\n <Text mr={3} id={notificationId}>\n {notificationText}\n </Text>\n <Notice.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </Notice.Actions>\n {learnMoreLink && (\n <Link ml={3} href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </Notice.Text>\n </Notice.Content>\n <Notice.Close onClick={onNotificationClose} />\n </Notice>\n\n <SFeedbackRating\n render={Modal}\n visible={visible}\n onClose={this.handelCloseModal}\n p={0}\n use:w={modalWidth ?? 440}\n aria-labelledby={this.headerId}\n >\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n p={1}\n m={9}\n >\n <Flex justifyContent='center'>\n <SliderRating value={rating} readonly={true} />\n </Flex>\n\n {(header as ReactElement)?.type === FeedbackRating.Header ? (\n header\n ) : (\n <FeedbackRating.Header>{header}</FeedbackRating.Header>\n )}\n\n <Box\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n >\n <Field name={'rating'} initialValue={rating}>\n {({ input }) => <input {...input} type='hidden' />}\n </Field>\n\n <div role={'group'} aria-labelledby={this.headerId}>\n {checkboxFields.map((formConfigItem, index) =>\n this.renderCheckbox(formConfigItem, index),\n )}\n </div>\n\n {textFields.map((formConfigItem) => this.renderTextField(formConfigItem))}\n\n {this.state.error && (\n <Notice theme={'warning'} mt={4} mb={4}>\n <Notice.Label>\n <WarnM />\n </Notice.Label>\n <Notice.Content>\n {getI18nText('errorMessage', { email: errorFeedbackEmail })}\n </Notice.Content>\n </Notice>\n )}\n\n <Flex mt={4} justifyContent={'center'}>\n <FeedbackRating.Submit\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n size={'l'}\n >\n {submitText ?? getI18nText('submitButton')}\n </FeedbackRating.Submit>\n </Flex>\n </Box>\n </SpinContainer>,\n )\n }\n </Form>\n </SFeedbackRating>\n\n <NoticeBubbleContainer manager={this.manager} />\n </Root>,\n );\n }\n}\n\nfunction Header(props: any) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(\n <SHeader render={Text} size={300} tag='h2' mb={4} mt={4} textAlign={'center'} />,\n );\n}\n\nconst FeedbackRating: typeof FeedbackRatingType & { validate: typeof FeedbackRatingRoot.validate } =\n createComponent(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n });\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,cAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,OAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,EAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,GAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,KAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,aAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,MAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,SAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,QAAA,GAAAjB,OAAA;AACA,IAAAkB,aAAA,GAAAlB,OAAA;AACA,IAAAmB,aAAA,GAAAnB,OAAA;AAEA,IAAAoB,eAAA,GAAAlB,sBAAA,CAAAF,OAAA;AACA,IAAAqB,MAAA,GAAAnB,sBAAA,CAAAF,OAAA;AACA,IAAAsB,4BAAA,GAAAtB,OAAA;AACA,IAAAuB,aAAA,GAAAvB,OAAA;AAAoF,IAAAwB,SAAA;AAAA;AAAA,IAAAC,KAAA,+BAAA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,CAACiJ,WAAW,EAAE,CAAC,EAAE;QACrE,OAAOxJ,KAAK;MACd;IACF,CAAC;EAAA;AACH,CAAC;AAuTH,SAAS+H,MAAMA,CAACnH,KAAU,EAAE;EAAA,IAAA6I,KAAA,GAAAC,YAAA;IAAAC,KAAA;EAC1B,IAAQhE,MAAM,GAAK/E,KAAK,CAAhB+E,MAAM;EACd,IAAMiE,OAAO,GAEM9H,gBAAI;EADvB,OAAA6H,KAAA,GAAO,IAAA/K,aAAO,EAAC+G,MAAM,CAAC,eACpBzI,MAAA,YAAA6D,aAAA,CAAC6I,OAAO,EAAAD,KAAA,CAAA7C,EAAA,gBAAAU,cAAA,qBAAAzK,KAAA,CAAA8J,WAAA;IAAA,QAAqB,GAAG;IAAA,OAAM,IAAI;IAAA,MAAK,CAAC;IAAA,MAAM,CAAC;IAAA,aAAa;EAAQ,GAAA4C,KAAA,IAAI;AAEpF;AAEA,IAAMpI,cAA4F,GAChG,IAAAwI,gBAAe,EAAC/K,kBAAkB,EAAE;EAClCiJ,MAAM,EAANA,MAAM;EACNrF,IAAI,EAAEoH,0BAAY;EAClBxI,QAAQ,EAAEyI,0BAAc;EACxBxB,MAAM,EAAEyB;AACV,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEU5I,cAAc;AAAA6I,OAAA,cAAAD,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import React from 'react';\nimport { FeedbackFormProps } from '../../index';\nimport { FieldProps } from 'react-final-form';\n\nimport { Intergalactic } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Text } from '@semcore/typography';\nimport Checkbox, { CheckboxProps } from '@semcore/checkbox';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** flag for show/hide notification */\n notificationVisible: boolean;\n /** */\n onNotificationClose: () => void;\n /** text in notification panel */\n notificationText: string;\n /** optional link in notification panel */\n learnMoreLink?: string;\n /** rating value */\n rating: number;\n /** visible modal form flag */\n visible: boolean;\n\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** width for modal with form */\n modalWidth?: number | string;\n\n /** header of modal with form */\n header: React.ReactNode;\n /** text for submit button of form */\n submitText?: string;\n /** config for form fields */\n formConfig: FormConfigItem[];\n\n initialValues: Record<string, any> & { rating: number };\n\n errorFeedbackEmail: string;\n\n locale?: string;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<CheckboxProps, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\ndeclare const FeedbackRatingType: Intergalactic.Component<'form', FeedbackRatingProps> & {\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\nexport { FeedbackRatingType };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import React from 'react';\nimport { FeedbackFormProps } from '../../index';\nimport { FieldProps } from 'react-final-form';\n\nimport { Intergalactic } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Text } from '@semcore/typography';\nimport Checkbox, { CheckboxProps } from '@semcore/checkbox';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea' | 'email';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** flag for show/hide notification */\n notificationVisible: boolean;\n /** */\n onNotificationClose: () => void;\n /** text in notification panel */\n notificationText: string;\n /** title in notification panel */\n notificationTitle?: string;\n /** optional link in notification panel */\n learnMoreLink?: string;\n /** rating value */\n rating: number;\n /** visible modal form flag */\n visible: boolean;\n\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** width for modal with form */\n modalWidth?: number | string;\n\n /** header of modal with form */\n header: React.ReactNode;\n /** text for submit button of form */\n submitText?: string;\n /** config for form fields */\n formConfig: FormConfigItem[];\n\n initialValues: Record<string, any> & { rating: number };\n\n errorFeedbackEmail: string;\n\n locale?: string;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<CheckboxProps, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\ndeclare const FeedbackRatingType: Intergalactic.Component<'form', FeedbackRatingProps> & {\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\nexport { FeedbackRatingType };\n"],"mappings":""}
|
|
@@ -22,13 +22,13 @@ var _uniqueID = _interopRequireDefault(require("@semcore/utils/lib/uniqueID"));
|
|
|
22
22
|
var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
|
|
23
23
|
var _intergalacticDynamicLocales = require("../../translations/__intergalactic-dynamic-locales");
|
|
24
24
|
/*__reshadow-styles__:"../../style/slider-rating.shadow.css"*/
|
|
25
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
26
|
-
"__SSliderRating": "
|
|
27
|
-
"__SStar": "
|
|
28
|
-
"_keyboardFocused": "
|
|
29
|
-
"_hovered": "
|
|
30
|
-
"_readonly": "
|
|
31
|
-
"_filled": "
|
|
25
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SSliderRating_11inn_gg_ .___SStar_11inn_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_11inn_gg_.__keyboardFocused_11inn_gg_ .___SStar_11inn_gg_.__hovered_11inn_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_11inn_gg_ .___SStar_11inn_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_11inn_gg_.__keyboardFocused_11inn_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}@media (hover:hover){.___SSliderRating_11inn_gg_.__readonly_11inn_gg_ .___SStar_11inn_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_11inn_gg_.__filled_11inn_gg_:active{animation:wobble .8s ease-in-out}.___SStar_11inn_gg_ path{fill:transparent;stroke:var(--intergalactic-slider-rating-normal, #a9abb6);stroke-width:2}.___SStar_11inn_gg_.__filled_11inn_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}" /*__inner_css_end__*/, "11inn_gg_") /*__reshadow_css_end__*/, {
|
|
26
|
+
"__SSliderRating": "___SSliderRating_11inn_gg_",
|
|
27
|
+
"__SStar": "___SStar_11inn_gg_",
|
|
28
|
+
"_keyboardFocused": "__keyboardFocused_11inn_gg_",
|
|
29
|
+
"_hovered": "__hovered_11inn_gg_",
|
|
30
|
+
"_readonly": "__readonly_11inn_gg_",
|
|
31
|
+
"_filled": "__filled_11inn_gg_"
|
|
32
32
|
});
|
|
33
33
|
var MIN = 1;
|
|
34
34
|
var MAX = 5;
|
package/lib/es6/FeedbackForm.js
CHANGED
|
@@ -23,13 +23,13 @@ import { Box } from '@semcore/flex-box';
|
|
|
23
23
|
import { FeedbackItem } from './component/feedback-item/FeedbackItem';
|
|
24
24
|
import { SubmitButton } from './component/submit-button/SubmitButton';
|
|
25
25
|
/*__reshadow-styles__:"./style/feedback-form.shadow.css"*/
|
|
26
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
27
|
-
"__SFeedbackForm": "
|
|
28
|
-
"__SSubmit": "
|
|
29
|
-
"__SCancel": "
|
|
30
|
-
"__SNotice": "
|
|
31
|
-
"__SSuccess": "
|
|
32
|
-
"__SEmail": "
|
|
26
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SFeedbackForm_17gn6_gg_{max-width:320px}.___SCancel_17gn6_gg_,.___SSubmit_17gn6_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_17gn6_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);border-width:1px 0 0;border-top-style:solid;border-radius:0 0 var(--intergalactic-surface-rounded, 6px) var(--intergalactic-surface-rounded, 6px)}.___SSuccess_17gn6_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_17gn6_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));width:80px;height:80px;background-image:url(\"data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345E0A8'/%3E%3Cpath d='M29 45.2852L29.2 45.6352C35.39 42.1852 53.39 31.9652 56.73 35.1052C55.6 32.0052 39.7 35.4352 29 45.2852Z' fill='white'/%3E%3Cpath d='M28.44 31.6343C26.63 37.6343 19.23 56.1043 15 61.9443L18 62.8543L19.58 61.5343C23.8 51.9843 29.58 35.5343 29.89 30.0743C29.39 29.8143 28.93 30.2143 28.44 31.6343Z' fill='white'/%3E%3Cpath d='M15 62.0078C19.23 56.1678 26.63 37.7378 28.44 31.6678C30.25 25.5978 33.49 37.6678 31.67 42.7878' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 45.9424C38.68 35.5824 55.27 31.9424 56.43 35.1024C57.12 36.9924 43 41.3624 38.02 47.4224' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44.45 21.93C41.21 20.77 35.86 19.04 33 18.24C37.12 16.41 70 4.24 72.67 3C71.75 7.11 67.75 21.28 65.96 27.93C61.13 26.25 56.23 24.78 53.03 23.74C51.0298 26.3907 49.2219 29.1812 47.62 32.09C46.44 28.23 45.29 23.77 44.45 21.93Z' fill='white' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M45 22.08L61.74 11' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M53 23.73L72.64 3' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48 32.58L55.86 25' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.23 30.77L51.69 25.13L52.66 24L54.73 24.61L55.16 24.48L51.8 27.91L49.33 30.18L48 31.29L48.23 30.77Z' fill='black'/%3E%3Cpath d='M33.81 22L23 27.12' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M40.89 23L34 27.37' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M62.04 29L58 38.85' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M46.68 41C50.29 43.42 44.81 49.52 43 51.12' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47.17 44C51.31 46.09 48.33 51.76 46 54.6' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.86 49C54.37 53.48 36.31 72.72 35 73.78' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cmask id='mask0_11950_117175' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='4' y='6' width='73' height='73'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345DFA7'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_11950_117175)'%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' fill='black'/%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A\")}" /*__inner_css_end__*/, "17gn6_gg_") /*__reshadow_css_end__*/, {
|
|
27
|
+
"__SFeedbackForm": "___SFeedbackForm_17gn6_gg_",
|
|
28
|
+
"__SSubmit": "___SSubmit_17gn6_gg_",
|
|
29
|
+
"__SCancel": "___SCancel_17gn6_gg_",
|
|
30
|
+
"__SNotice": "___SNotice_17gn6_gg_",
|
|
31
|
+
"__SSuccess": "___SSuccess_17gn6_gg_",
|
|
32
|
+
"__SEmail": "___SEmail_17gn6_gg_"
|
|
33
33
|
});
|
|
34
34
|
var FeedbackForm = /*#__PURE__*/function (_Component) {
|
|
35
35
|
_inherits(FeedbackForm, _Component);
|
|
@@ -12,9 +12,9 @@ import React from 'react';
|
|
|
12
12
|
import createComponent, { Component, Root, sstyled } from '@semcore/core';
|
|
13
13
|
import { Box } from '@semcore/flex-box';
|
|
14
14
|
/*__reshadow-styles__:"../../style/checkbox-button.shadow.css"*/
|
|
15
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
16
|
-
"__SCheckboxButton": "
|
|
17
|
-
"_checked": "
|
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCheckboxButton_f0k01_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_f0k01_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_f0k01_gg_.__checked_f0k01_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_f0k01_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_f0k01_gg_.__checked_f0k01_gg_:hover{background-color:rgba(0,143,248,.2)}}" /*__inner_css_end__*/, "f0k01_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SCheckboxButton": "___SCheckboxButton_f0k01_gg_",
|
|
17
|
+
"_checked": "__checked_f0k01_gg_"
|
|
18
18
|
});
|
|
19
19
|
import Checkbox from '@semcore/checkbox';
|
|
20
20
|
var CheckboxButtonRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -11,7 +11,7 @@ import { sstyled as _sstyled } from "@semcore/utils/lib/core/index";
|
|
|
11
11
|
import { assignProps as _assignProps3 } from "@semcore/core";
|
|
12
12
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
13
13
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
14
|
-
var _excluded = ["header", "submitText", "formConfig", "notificationText", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"];
|
|
14
|
+
var _excluded = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"];
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import createComponent, { Component, sstyled, Root } from '@semcore/core';
|
|
17
17
|
import { Field, Form } from 'react-final-form';
|
|
@@ -36,8 +36,8 @@ import Input from '@semcore/input';
|
|
|
36
36
|
import { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';
|
|
37
37
|
import { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';
|
|
38
38
|
/*__reshadow-styles__:"../../style/feedback-rating.shadow.css"*/
|
|
39
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
40
|
-
"__SFeedbackRating": "
|
|
39
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SFeedbackRating_apau8_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_apau8_gg_ li{list-style:none}" /*__inner_css_end__*/, "apau8_gg_") /*__reshadow_css_end__*/, {
|
|
40
|
+
"__SFeedbackRating": "___SFeedbackRating_apau8_gg_"
|
|
41
41
|
});
|
|
42
42
|
var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
43
43
|
_inherits(FeedbackRatingRoot, _Component);
|
|
@@ -117,7 +117,11 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
117
117
|
id: config.key
|
|
118
118
|
}));
|
|
119
119
|
}
|
|
120
|
-
if (config.type === 'input') {
|
|
120
|
+
if (config.type === 'input' || config.type === 'email') {
|
|
121
|
+
if (config.type === 'email') {
|
|
122
|
+
input.autoComplete = 'email';
|
|
123
|
+
input.type = 'email';
|
|
124
|
+
}
|
|
121
125
|
return /*#__PURE__*/React.createElement(Input, {
|
|
122
126
|
state: input.state
|
|
123
127
|
}, /*#__PURE__*/React.createElement(Input.Value, _extends({}, input, {
|
|
@@ -205,6 +209,7 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
205
209
|
submitText = _this$asProps2.submitText,
|
|
206
210
|
formConfig = _this$asProps2.formConfig,
|
|
207
211
|
notificationText = _this$asProps2.notificationText,
|
|
212
|
+
notificationTitle = _this$asProps2.notificationTitle,
|
|
208
213
|
learnMoreLink = _this$asProps2.learnMoreLink,
|
|
209
214
|
Children = _this$asProps2.Children,
|
|
210
215
|
styles = _this$asProps2.styles,
|
|
@@ -226,20 +231,20 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
226
231
|
return item.type === 'checkbox';
|
|
227
232
|
});
|
|
228
233
|
var textFields = formConfig.filter(function (item) {
|
|
229
|
-
return item.type === 'textarea' || item.type === 'input';
|
|
234
|
+
return item.type === 'textarea' || item.type === 'input' || item.type === 'email';
|
|
230
235
|
});
|
|
231
236
|
var notificationId = this.getNoticeTextId();
|
|
232
237
|
return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(Box, _assignProps2({}, _ref2), /*#__PURE__*/React.createElement(Notice, _ref4.cn("Notice", {
|
|
233
238
|
"visible": notificationVisible,
|
|
234
239
|
"aria-label": getI18nText('leaveFeedback'),
|
|
235
240
|
"tag": Flex,
|
|
236
|
-
"alignItems": 'center'
|
|
241
|
+
"alignItems": notificationTitle ? 'flex-start' : 'center'
|
|
237
242
|
}), /*#__PURE__*/React.createElement(Notice.Label, {
|
|
238
243
|
mr: 3,
|
|
239
244
|
"aria-hidden": true
|
|
240
|
-
}, /*#__PURE__*/React.createElement(FeedbackIllustration, _ref4.cn("FeedbackIllustration", {}))), /*#__PURE__*/React.createElement(Notice.Content, {
|
|
245
|
+
}, /*#__PURE__*/React.createElement(FeedbackIllustration, _ref4.cn("FeedbackIllustration", {}))), /*#__PURE__*/React.createElement(Notice.Content, null, notificationTitle ? /*#__PURE__*/React.createElement(Notice.Title, null, notificationTitle) : null, /*#__PURE__*/React.createElement(Notice.Text, {
|
|
241
246
|
tag: Flex,
|
|
242
|
-
alignItems: 'center'
|
|
247
|
+
alignItems: notificationTitle ? 'flex-start' : 'center'
|
|
243
248
|
}, /*#__PURE__*/React.createElement(Text, _ref4.cn("Text", {
|
|
244
249
|
"mr": 3,
|
|
245
250
|
"id": notificationId
|
|
@@ -252,7 +257,7 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
|
252
257
|
}))), learnMoreLink && /*#__PURE__*/React.createElement(Link, _ref4.cn("Link", {
|
|
253
258
|
"ml": 3,
|
|
254
259
|
"href": learnMoreLink
|
|
255
|
-
}), getI18nText('learnMore'))), /*#__PURE__*/React.createElement(Notice.Close, {
|
|
260
|
+
}), getI18nText('learnMore')))), /*#__PURE__*/React.createElement(Notice.Close, {
|
|
256
261
|
onClick: onNotificationClose
|
|
257
262
|
})), /*#__PURE__*/React.createElement(SFeedbackRating, _ref4.cn("SFeedbackRating", _objectSpread({}, _assignProps({
|
|
258
263
|
"visible": visible,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.js","names":["React","createComponent","Component","sstyled","Root","Field","Form","createFocusDecorator","SpinContainer","i18nEnhance","uniqueIDEnhancement","Notice","CheckM","WarnM","Text","FeedbackIllustration","Link","SliderRating","Modal","Textarea","Box","Flex","FeedbackItem","SubmitButton","CheckboxButton","Input","localizedMessages","NoticeBubbleContainer","NoticeBubbleManager","style","_sstyled","insert","FeedbackRatingRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","error","rating","asProps","onVisibleChange","fn","value","e","config","index","initialValue","props","initialValues","key","createElement","name","type","_ref7","input","FeedbackRating","Checkbox","_extends","id","label","onChange","_checked","focused","_config$description","mb","size","isDescriptionReactFragment","description","Fragment","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","_ref8","h","handleChange","state","Value","color","_createClass","get","uid","getHeaderProps","headerId","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","_this2","_this$asProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","_this3","_this$asProps2","header","submitText","formConfig","notificationText","learnMoreLink","Children","styles","forwardRef","theme","background","visible","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","other","_objectWithoutProperties","_excluded","SFeedbackRating","checkboxFields","filter","item","textFields","notificationId","_assignProps2","cn","Label","mr","Content","alignItems","Actions","handleChangeRating","Close","onClick","_objectSpread","_assignProps","handelCloseModal","focusDecorator","api","_ref5","submitting","Header","handleSubmit","_ref9","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","onSubmit","i18n","locale","words","split","symbols","join","Boolean","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","_assignProps3"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\nimport SpinContainer from '@semcore/spin-container';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport Notice from '@semcore/notice';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport { Text } from '@semcore/typography';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Link from '@semcore/link';\nimport SliderRating from '../slider-rating/SliderRating';\nimport Modal from '@semcore/modal';\nimport Textarea from '@semcore/textarea';\nimport { Box, Flex } from '@semcore/flex-box';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport { SubmitButton } from '../submit-button/SubmitButton';\nimport { FeedbackRatingProps, FeedbackRatingType, FormConfigItem } from './FeedbackRating.type';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport Input from '@semcore/input';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport style from '../../style/feedback-rating.shadow.css';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n {},\n State,\n typeof FeedbackRatingRoot.enhance\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static validate = {\n description: (error: Error | string) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (Boolean(value) && (symbols.length < 10 || words.length < 3)) {\n return error;\n }\n },\n email: (error: Error | string) => (value = '') => {\n if (Boolean(value) && !/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n state: State = {\n error: false,\n };\n\n manager = new NoticeBubbleManager();\n\n private focusDecorator = createFocusDecorator<Record<string, any>>();\n\n get headerId() {\n const { uid } = this.asProps;\n\n return `${uid}-feedback-rating-header`;\n }\n\n getHeaderProps() {\n return {\n id: this.headerId,\n };\n }\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n getNoticeTextId() {\n const { uid } = this.asProps;\n return `${uid}-feedback-rating-notice`;\n }\n\n handleChangeRating = (rating: number) => {\n this.asProps.onVisibleChange(true, rating);\n };\n\n handelCloseModal = () => {\n this.asProps.onVisibleChange(false, this.asProps.rating);\n };\n\n handleChange =\n (fn: (e: React.SyntheticEvent) => void) => (value: any, e: React.SyntheticEvent) => {\n fn(e);\n };\n\n componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>) {\n const { status, getI18nText } = this.asProps;\n\n if (prevProps.status !== status) {\n this.setState({ error: false });\n\n if (status === 'success') {\n // showing notice with delay for SR, less than 100ms is not enough\n setTimeout(() => {\n this.manager.add({\n icon: <CheckM color='green-400' />,\n children: getI18nText('successMessage'),\n initialAnimation: true,\n duration: 5000,\n });\n }, 300);\n } else if (status === 'error') {\n this.setState({ error: true });\n }\n }\n }\n\n renderCheckbox = (config: FormConfigItem, index: number) => {\n const initialValue = this.props.initialValues[config.key];\n\n return (\n <Field name={config.key} initialValue={initialValue} type={'checkbox'} key={config.key}>\n {({ input }) => (\n <FeedbackRating.Checkbox\n {...input}\n id={config.key}\n label={config.label}\n onChange={(_checked, e) => input.onChange(e)}\n focused={index === 0}\n />\n )}\n </Field>\n );\n };\n\n renderTextField = (config: FormConfigItem) => {\n const initialValue = this.props.initialValues[config.key];\n\n const label =\n typeof config.label === 'string' ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n ) : (\n (config.label as unknown as JSX.Element)\n );\n\n const isDescriptionReactFragment =\n (config.description as ReactElement)?.type === React.Fragment;\n\n return (\n <Flex direction='column'>\n <Flex tag='label' mt={4} htmlFor={config.key} key={config.key}>\n {label}\n </Flex>\n\n <FeedbackRating.Item\n name={config.key}\n validate={config.validate}\n initialValue={initialValue}\n placement='left-start'\n flip={{\n fallbackPlacements: ['right-start', 'bottom'],\n }}\n aria-describedby={config.description ? config.key + '-description' : undefined}\n >\n {({ input }) => {\n if (config.type === 'textarea') {\n return (\n <Textarea\n {...input}\n h={80}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n );\n }\n if (config.type === 'input') {\n return (\n <Input state={input.state}>\n <Input.Value\n {...input}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n </Input>\n );\n }\n return null;\n }}\n </FeedbackRating.Item>\n {config.description && (\n <Box mt={2}>\n {typeof config.description === 'string' || isDescriptionReactFragment ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n ) : (\n config.description\n )}\n </Box>\n )}\n </Flex>\n );\n };\n\n render() {\n const {\n header,\n submitText,\n formConfig,\n notificationText,\n learnMoreLink,\n Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n ...other\n } = this.asProps;\n\n const SFeedbackRating = Root;\n const checkboxFields = formConfig.filter((item) => item.type === 'checkbox');\n const textFields = formConfig.filter(\n (item) => item.type === 'textarea' || item.type === 'input',\n );\n const notificationId = this.getNoticeTextId();\n\n return sstyled(styles)(\n <Root render={Box}>\n <Notice\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={'center'}\n >\n <Notice.Label mr={3} aria-hidden={true}>\n <FeedbackIllustration />\n </Notice.Label>\n <Notice.Content tag={Flex} alignItems={'center'}>\n <Text mr={3} id={notificationId}>\n {notificationText}\n </Text>\n <Notice.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </Notice.Actions>\n {learnMoreLink && (\n <Link ml={3} href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </Notice.Content>\n <Notice.Close onClick={onNotificationClose} />\n </Notice>\n\n <SFeedbackRating\n render={Modal}\n visible={visible}\n onClose={this.handelCloseModal}\n p={0}\n use:w={modalWidth ?? 440}\n aria-labelledby={this.headerId}\n >\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n p={1}\n m={9}\n >\n <Flex justifyContent='center'>\n <SliderRating value={rating} readonly={true} />\n </Flex>\n\n {(header as ReactElement)?.type === FeedbackRating.Header ? (\n header\n ) : (\n <FeedbackRating.Header>{header}</FeedbackRating.Header>\n )}\n\n <Box\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n >\n <Field name={'rating'} initialValue={rating}>\n {({ input }) => <input {...input} type='hidden' />}\n </Field>\n\n <div role={'group'} aria-labelledby={this.headerId}>\n {checkboxFields.map((formConfigItem, index) =>\n this.renderCheckbox(formConfigItem, index),\n )}\n </div>\n\n {textFields.map((formConfigItem) => this.renderTextField(formConfigItem))}\n\n {this.state.error && (\n <Notice theme={'warning'} mt={4} mb={4}>\n <Notice.Label>\n <WarnM />\n </Notice.Label>\n <Notice.Content>\n {getI18nText('errorMessage', { email: errorFeedbackEmail })}\n </Notice.Content>\n </Notice>\n )}\n\n <Flex mt={4} justifyContent={'center'}>\n <FeedbackRating.Submit\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n size={'l'}\n >\n {submitText ?? getI18nText('submitButton')}\n </FeedbackRating.Submit>\n </Flex>\n </Box>\n </SpinContainer>,\n )\n }\n </Form>\n </SFeedbackRating>\n\n <NoticeBubbleContainer manager={this.manager} />\n </Root>,\n );\n }\n}\n\nfunction Header(props: any) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(\n <SHeader render={Text} size={300} tag='h2' mb={4} mt={4} textAlign={'center'} />,\n );\n}\n\nconst FeedbackRating: typeof FeedbackRatingType & { validate: typeof FeedbackRatingRoot.validate } =\n createComponent(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n });\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAwB,OAAO;AAC3C,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAC9C,OAAOC,oBAAoB,MAAM,kBAAkB;AACnD,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,WAAW,MAAM,yCAAyC;AACjE,OAAOC,mBAAmB,MAAM,6BAA6B;AAC7D,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,yBAAyB;AAC3C,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,oBAAoB,MAAM,gCAAgC;AACjE,OAAOC,IAAI,MAAM,eAAe;AAChC,OAAOC,YAAY,MAAM,+BAA+B;AACxD,OAAOC,KAAK,MAAM,gBAAgB;AAClC,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAC7C,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,YAAY,QAAQ,+BAA+B;AAE5D,OAAOC,cAAc,MAA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C,KAAK+H,OAAO,CAAC7I,MAAM,GAAG,EAAE,IAAI2I,KAAK,CAAC3I,MAAM,GAAG,CAAC,CAAC,EAAE;QAC/D,OAAOS,KAAK;MACd;IACF,CAAC;EAAA;EACD4H,KAAK,EAAE,SAAAA,MAAC5H,KAAqB;IAAA,OAAK,YAAgB;MAAA,IAAfK,KAAK,GAAAf,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAmD,SAAA,GAAAnD,SAAA,MAAG,EAAE;MAC3C,IAAIgJ,OAAO,CAACjI,KAAK,CAAC,IAAI,CAAC,YAAY,CAACkI,IAAI,CAACC,MAAM,CAACnI,KAAK,CAAC,CAACoI,WAAW,EAAE,CAAC,EAAE;QACrE,OAAOzI,KAAK;MACd;IACF,CAAC;EAAA;AACH,CAAC;AA8SH,SAASqH,MAAMA,CAAC3G,KAAU,EAAE;EAAA,IAAAgI,KAAA,GAAAC,YAAA;IAAAC,KAAA;EAC1B,IAAQ1D,MAAM,GAAKxE,KAAK,CAAhBwE,MAAM;EACd,IAAM2D,OAAO,GAEMjL,IAAI;EADvB,OAAAgL,KAAA,GAAO3L,OAAO,CAACiI,MAAM,CAAC,eACpBpI,KAAA,CAAA+D,aAAA,CAACgI,OAAO,EAAAD,KAAA,CAAAvC,EAAA,YAAAS,aAAA,KAAAgC,aAAA;IAAA,QAAqB,GAAG;IAAA,OAAM,IAAI;IAAA,MAAK,CAAC;IAAA,MAAM,CAAC;IAAA,aAAa;EAAQ,GAAAJ,KAAA,IAAI;AAEpF;AAEA,IAAMxH,cAA4F,GAChGnE,eAAe,CAAC+B,kBAAkB,EAAE;EAClCuI,MAAM,EAANA,MAAM;EACNjF,IAAI,EAAEhE,YAAY;EAClB+C,QAAQ,EAAE7C,cAAc;EACxBuJ,MAAM,EAAExJ;AACV,CAAC,CAAC;AAEJ,eAAe6C,cAAc"}
|
|
1
|
+
{"version":3,"file":"FeedbackRating.js","names":["React","createComponent","Component","sstyled","Root","Field","Form","createFocusDecorator","SpinContainer","i18nEnhance","uniqueIDEnhancement","Notice","CheckM","WarnM","Text","FeedbackIllustration","Link","SliderRating","Modal","Textarea","Box","Flex","FeedbackItem","SubmitButton","CheckboxButton","Input","localizedMessages","NoticeBubbleContainer","NoticeBubbleManager","style","_sstyled","insert","FeedbackRatingRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","error","rating","asProps","onVisibleChange","fn","value","e","config","index","initialValue","props","initialValues","key","createElement","name","type","_ref7","input","FeedbackRating","Checkbox","_extends","id","label","onChange","_checked","focused","_config$description","mb","size","isDescriptionReactFragment","description","Fragment","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","_ref8","h","handleChange","autoComplete","state","Value","color","_createClass","get","uid","getHeaderProps","headerId","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","_this2","_this$asProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","_this3","_this$asProps2","header","submitText","formConfig","notificationText","notificationTitle","learnMoreLink","Children","styles","forwardRef","theme","background","visible","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","other","_objectWithoutProperties","_excluded","SFeedbackRating","checkboxFields","filter","item","textFields","notificationId","_assignProps2","cn","Label","mr","Content","Title","alignItems","Actions","handleChangeRating","Close","onClick","_objectSpread","_assignProps","handelCloseModal","focusDecorator","api","_ref5","submitting","Header","handleSubmit","_ref9","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","onSubmit","i18n","locale","words","split","symbols","join","Boolean","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","_assignProps3"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\nimport SpinContainer from '@semcore/spin-container';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport Notice from '@semcore/notice';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport { Text } from '@semcore/typography';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Link from '@semcore/link';\nimport SliderRating from '../slider-rating/SliderRating';\nimport Modal from '@semcore/modal';\nimport Textarea from '@semcore/textarea';\nimport { Box, Flex } from '@semcore/flex-box';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport { SubmitButton } from '../submit-button/SubmitButton';\nimport { FeedbackRatingProps, FeedbackRatingType, FormConfigItem } from './FeedbackRating.type';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport Input from '@semcore/input';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport style from '../../style/feedback-rating.shadow.css';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n {},\n State,\n typeof FeedbackRatingRoot.enhance\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static validate = {\n description: (error: Error | string) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (Boolean(value) && (symbols.length < 10 || words.length < 3)) {\n return error;\n }\n },\n email: (error: Error | string) => (value = '') => {\n if (Boolean(value) && !/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n state: State = {\n error: false,\n };\n\n manager = new NoticeBubbleManager();\n\n private focusDecorator = createFocusDecorator<Record<string, any>>();\n\n get headerId() {\n const { uid } = this.asProps;\n\n return `${uid}-feedback-rating-header`;\n }\n\n getHeaderProps() {\n return {\n id: this.headerId,\n };\n }\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n getNoticeTextId() {\n const { uid } = this.asProps;\n return `${uid}-feedback-rating-notice`;\n }\n\n handleChangeRating = (rating: number) => {\n this.asProps.onVisibleChange(true, rating);\n };\n\n handelCloseModal = () => {\n this.asProps.onVisibleChange(false, this.asProps.rating);\n };\n\n handleChange =\n (fn: (e: React.SyntheticEvent) => void) => (value: any, e: React.SyntheticEvent) => {\n fn(e);\n };\n\n componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>) {\n const { status, getI18nText } = this.asProps;\n\n if (prevProps.status !== status) {\n this.setState({ error: false });\n\n if (status === 'success') {\n // showing notice with delay for SR, less than 100ms is not enough\n setTimeout(() => {\n this.manager.add({\n icon: <CheckM color='green-400' />,\n children: getI18nText('successMessage'),\n initialAnimation: true,\n duration: 5000,\n });\n }, 300);\n } else if (status === 'error') {\n this.setState({ error: true });\n }\n }\n }\n\n renderCheckbox = (config: FormConfigItem, index: number) => {\n const initialValue = this.props.initialValues[config.key];\n\n return (\n <Field name={config.key} initialValue={initialValue} type={'checkbox'} key={config.key}>\n {({ input }) => (\n <FeedbackRating.Checkbox\n {...input}\n id={config.key}\n label={config.label}\n onChange={(_checked, e) => input.onChange(e)}\n focused={index === 0}\n />\n )}\n </Field>\n );\n };\n\n renderTextField = (config: FormConfigItem) => {\n const initialValue = this.props.initialValues[config.key];\n\n const label =\n typeof config.label === 'string' ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n ) : (\n (config.label as unknown as JSX.Element)\n );\n\n const isDescriptionReactFragment =\n (config.description as ReactElement)?.type === React.Fragment;\n\n return (\n <Flex direction='column'>\n <Flex tag='label' mt={4} htmlFor={config.key} key={config.key}>\n {label}\n </Flex>\n\n <FeedbackRating.Item\n name={config.key}\n validate={config.validate}\n initialValue={initialValue}\n placement='left-start'\n flip={{\n fallbackPlacements: ['right-start', 'bottom'],\n }}\n aria-describedby={config.description ? config.key + '-description' : undefined}\n >\n {({ input }) => {\n if (config.type === 'textarea') {\n return (\n <Textarea\n {...input}\n h={80}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n );\n }\n if (config.type === 'input' || config.type === 'email') {\n if (config.type === 'email') {\n input.autoComplete = 'email';\n input.type = 'email';\n }\n\n return (\n <Input state={input.state}>\n <Input.Value\n {...input}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n </Input>\n );\n }\n return null;\n }}\n </FeedbackRating.Item>\n {config.description && (\n <Box mt={2}>\n {typeof config.description === 'string' || isDescriptionReactFragment ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n ) : (\n config.description\n )}\n </Box>\n )}\n </Flex>\n );\n };\n\n render() {\n const {\n header,\n submitText,\n formConfig,\n notificationText,\n notificationTitle,\n learnMoreLink,\n Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n ...other\n } = this.asProps;\n\n const SFeedbackRating = Root;\n const checkboxFields = formConfig.filter((item) => item.type === 'checkbox');\n const textFields = formConfig.filter(\n (item) => item.type === 'textarea' || item.type === 'input' || item.type === 'email',\n );\n const notificationId = this.getNoticeTextId();\n\n return sstyled(styles)(\n <Root render={Box}>\n <Notice\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={notificationTitle ? 'flex-start' : 'center'}\n >\n <Notice.Label mr={3} aria-hidden={true}>\n <FeedbackIllustration />\n </Notice.Label>\n <Notice.Content>\n {notificationTitle ? <Notice.Title>{notificationTitle}</Notice.Title> : null}\n <Notice.Text tag={Flex} alignItems={notificationTitle ? 'flex-start' : 'center'}>\n <Text mr={3} id={notificationId}>\n {notificationText}\n </Text>\n <Notice.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </Notice.Actions>\n {learnMoreLink && (\n <Link ml={3} href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </Notice.Text>\n </Notice.Content>\n <Notice.Close onClick={onNotificationClose} />\n </Notice>\n\n <SFeedbackRating\n render={Modal}\n visible={visible}\n onClose={this.handelCloseModal}\n p={0}\n use:w={modalWidth ?? 440}\n aria-labelledby={this.headerId}\n >\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n p={1}\n m={9}\n >\n <Flex justifyContent='center'>\n <SliderRating value={rating} readonly={true} />\n </Flex>\n\n {(header as ReactElement)?.type === FeedbackRating.Header ? (\n header\n ) : (\n <FeedbackRating.Header>{header}</FeedbackRating.Header>\n )}\n\n <Box\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n >\n <Field name={'rating'} initialValue={rating}>\n {({ input }) => <input {...input} type='hidden' />}\n </Field>\n\n <div role={'group'} aria-labelledby={this.headerId}>\n {checkboxFields.map((formConfigItem, index) =>\n this.renderCheckbox(formConfigItem, index),\n )}\n </div>\n\n {textFields.map((formConfigItem) => this.renderTextField(formConfigItem))}\n\n {this.state.error && (\n <Notice theme={'warning'} mt={4} mb={4}>\n <Notice.Label>\n <WarnM />\n </Notice.Label>\n <Notice.Content>\n {getI18nText('errorMessage', { email: errorFeedbackEmail })}\n </Notice.Content>\n </Notice>\n )}\n\n <Flex mt={4} justifyContent={'center'}>\n <FeedbackRating.Submit\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n size={'l'}\n >\n {submitText ?? getI18nText('submitButton')}\n </FeedbackRating.Submit>\n </Flex>\n </Box>\n </SpinContainer>,\n )\n }\n </Form>\n </SFeedbackRating>\n\n <NoticeBubbleContainer manager={this.manager} />\n </Root>,\n );\n }\n}\n\nfunction Header(props: any) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(\n <SHeader render={Text} size={300} tag='h2' mb={4} mt={4} textAlign={'center'} />,\n );\n}\n\nconst FeedbackRating: typeof FeedbackRatingType & { validate: typeof FeedbackRatingRoot.validate } =\n createComponent(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n });\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAwB,OAAO;AAC3C,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAC9C,OAAOC,oBAAoB,MAAM,kBAAkB;AACnD,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,WAAW,MAAM,yCAAyC;AACjE,OAAOC,mBAAmB,MAAM,6BAA6B;AAC7D,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,yBAAyB;AAC3C,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,oBAAoB,MAAM,gCAAgC;AACjE,OAAOC,IAAI,MAAM,eAAe;AAChC,OAAOC,YAAY,MAAM,+BAA+B;AACxD,OAAOC,KAAK,MAAM,gBAAgB;AAClC,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAC7C,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,YAAY,QAAQ,+BAA+B;AAE5D,OAAOC,cAAc,MAAM,mCAAmC;AAC9D,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,iBAAiB,QAAQ,oDAAoD;AACtF,SAASC,qBAAqB,EAAEC,mBAAmB,QAAQ,wBAAwB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;AAA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;AAEA,IAAM3H,cAA4F,GAChGnE,eAAe,CAAC+B,kBAAkB,EAAE;EAClC0I,MAAM,EAANA,MAAM;EACNpF,IAAI,EAAEhE,YAAY;EAClB+C,QAAQ,EAAE7C,cAAc;EACxB0J,MAAM,EAAE3J;AACV,CAAC,CAAC;AAEJ,eAAe6C,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import React from 'react';\nimport { FeedbackFormProps } from '../../index';\nimport { FieldProps } from 'react-final-form';\n\nimport { Intergalactic } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Text } from '@semcore/typography';\nimport Checkbox, { CheckboxProps } from '@semcore/checkbox';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** flag for show/hide notification */\n notificationVisible: boolean;\n /** */\n onNotificationClose: () => void;\n /** text in notification panel */\n notificationText: string;\n /** optional link in notification panel */\n learnMoreLink?: string;\n /** rating value */\n rating: number;\n /** visible modal form flag */\n visible: boolean;\n\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** width for modal with form */\n modalWidth?: number | string;\n\n /** header of modal with form */\n header: React.ReactNode;\n /** text for submit button of form */\n submitText?: string;\n /** config for form fields */\n formConfig: FormConfigItem[];\n\n initialValues: Record<string, any> & { rating: number };\n\n errorFeedbackEmail: string;\n\n locale?: string;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<CheckboxProps, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\ndeclare const FeedbackRatingType: Intergalactic.Component<'form', FeedbackRatingProps> & {\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\nexport { FeedbackRatingType };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import React from 'react';\nimport { FeedbackFormProps } from '../../index';\nimport { FieldProps } from 'react-final-form';\n\nimport { Intergalactic } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Text } from '@semcore/typography';\nimport Checkbox, { CheckboxProps } from '@semcore/checkbox';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea' | 'email';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** flag for show/hide notification */\n notificationVisible: boolean;\n /** */\n onNotificationClose: () => void;\n /** text in notification panel */\n notificationText: string;\n /** title in notification panel */\n notificationTitle?: string;\n /** optional link in notification panel */\n learnMoreLink?: string;\n /** rating value */\n rating: number;\n /** visible modal form flag */\n visible: boolean;\n\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** width for modal with form */\n modalWidth?: number | string;\n\n /** header of modal with form */\n header: React.ReactNode;\n /** text for submit button of form */\n submitText?: string;\n /** config for form fields */\n formConfig: FormConfigItem[];\n\n initialValues: Record<string, any> & { rating: number };\n\n errorFeedbackEmail: string;\n\n locale?: string;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<CheckboxProps, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\ndeclare const FeedbackRatingType: Intergalactic.Component<'form', FeedbackRatingProps> & {\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\nexport { FeedbackRatingType };\n"],"mappings":""}
|
|
@@ -13,13 +13,13 @@ import React from 'react';
|
|
|
13
13
|
import createComponent, { Component, Root, sstyled } from '@semcore/core';
|
|
14
14
|
import { Flex, Box } from '@semcore/flex-box';
|
|
15
15
|
/*__reshadow-styles__:"../../style/slider-rating.shadow.css"*/
|
|
16
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
17
|
-
"__SSliderRating": "
|
|
18
|
-
"__SStar": "
|
|
19
|
-
"_keyboardFocused": "
|
|
20
|
-
"_hovered": "
|
|
21
|
-
"_readonly": "
|
|
22
|
-
"_filled": "
|
|
16
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SSliderRating_11inn_gg_ .___SStar_11inn_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_11inn_gg_.__keyboardFocused_11inn_gg_ .___SStar_11inn_gg_.__hovered_11inn_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_11inn_gg_ .___SStar_11inn_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_11inn_gg_.__keyboardFocused_11inn_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}@media (hover:hover){.___SSliderRating_11inn_gg_.__readonly_11inn_gg_ .___SStar_11inn_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_11inn_gg_.__filled_11inn_gg_:active{animation:wobble .8s ease-in-out}.___SStar_11inn_gg_ path{fill:transparent;stroke:var(--intergalactic-slider-rating-normal, #a9abb6);stroke-width:2}.___SStar_11inn_gg_.__filled_11inn_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}" /*__inner_css_end__*/, "11inn_gg_") /*__reshadow_css_end__*/, {
|
|
17
|
+
"__SSliderRating": "___SSliderRating_11inn_gg_",
|
|
18
|
+
"__SStar": "___SStar_11inn_gg_",
|
|
19
|
+
"_keyboardFocused": "__keyboardFocused_11inn_gg_",
|
|
20
|
+
"_hovered": "__hovered_11inn_gg_",
|
|
21
|
+
"_readonly": "__readonly_11inn_gg_",
|
|
22
|
+
"_filled": "__filled_11inn_gg_"
|
|
23
23
|
});
|
|
24
24
|
import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
25
25
|
import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
|
|
@@ -8,7 +8,7 @@ import Checkbox, { CheckboxProps } from '@semcore/checkbox';
|
|
|
8
8
|
export type FormConfigItem = {
|
|
9
9
|
key: string;
|
|
10
10
|
label: React.ReactNode;
|
|
11
|
-
type: 'input' | 'checkbox' | 'textarea';
|
|
11
|
+
type: 'input' | 'checkbox' | 'textarea' | 'email';
|
|
12
12
|
description?: React.ReactNode;
|
|
13
13
|
validate?: (value: any) => Error | string | undefined;
|
|
14
14
|
};
|
|
@@ -21,6 +21,8 @@ export type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<Fe
|
|
|
21
21
|
onNotificationClose: () => void;
|
|
22
22
|
/** text in notification panel */
|
|
23
23
|
notificationText: string;
|
|
24
|
+
/** title in notification panel */
|
|
25
|
+
notificationTitle?: string;
|
|
24
26
|
/** optional link in notification panel */
|
|
25
27
|
learnMoreLink?: string;
|
|
26
28
|
/** rating value */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/feedback-form",
|
|
3
3
|
"description": "Semrush Feedback Form Component",
|
|
4
|
-
"version": "6.38.
|
|
4
|
+
"version": "6.38.4-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,22 +9,22 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/checkbox": "7.
|
|
13
|
-
"@semcore/notice-bubble": "5.
|
|
14
|
-
"@semcore/typography": "5.
|
|
15
|
-
"@semcore/link": "5.
|
|
16
|
-
"@semcore/modal": "4.
|
|
17
|
-
"@semcore/illustration": "2.
|
|
18
|
-
"@semcore/icon": "4.
|
|
19
|
-
"@semcore/textarea": "5.
|
|
20
|
-
"@semcore/input": "4.
|
|
12
|
+
"@semcore/checkbox": "7.43.0",
|
|
13
|
+
"@semcore/notice-bubble": "5.51.0-prerelease.0",
|
|
14
|
+
"@semcore/typography": "5.51.0-prerelease.0",
|
|
15
|
+
"@semcore/link": "5.43.0",
|
|
16
|
+
"@semcore/modal": "4.53.0-prerelease.0",
|
|
17
|
+
"@semcore/illustration": "2.42.0",
|
|
18
|
+
"@semcore/icon": "4.57.0-prerelease.0",
|
|
19
|
+
"@semcore/textarea": "5.39.0",
|
|
20
|
+
"@semcore/input": "4.41.0",
|
|
21
21
|
"final-form": "4.20.7",
|
|
22
|
-
"@semcore/button": "5.
|
|
23
|
-
"@semcore/flex-box": "5.
|
|
24
|
-
"@semcore/notice": "5.
|
|
25
|
-
"@semcore/spin-container": "7.40.
|
|
26
|
-
"@semcore/tooltip": "6.47.
|
|
27
|
-
"@semcore/utils": "4.
|
|
22
|
+
"@semcore/button": "5.41.1-prerelease.0",
|
|
23
|
+
"@semcore/flex-box": "5.40.0",
|
|
24
|
+
"@semcore/notice": "5.44.1-prerelease.0",
|
|
25
|
+
"@semcore/spin-container": "7.40.3",
|
|
26
|
+
"@semcore/tooltip": "6.47.2",
|
|
27
|
+
"@semcore/utils": "4.45.0",
|
|
28
28
|
"final-form-focus": "1.1.2",
|
|
29
29
|
"react-final-form": "6.5.9"
|
|
30
30
|
},
|