@semcore/feedback-form 17.2.1 → 17.2.2-prerelease.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/cjs/FeedbackForm.js +9 -11
- package/lib/cjs/FeedbackForm.js.map +1 -1
- package/lib/cjs/FeedbackForm.type.js +2 -0
- package/lib/cjs/FeedbackForm.type.js.map +1 -0
- package/lib/cjs/{component/feedback-rating/FeedbackRating.js → FeedbackRating.js} +11 -12
- package/lib/cjs/FeedbackRating.js.map +1 -0
- package/lib/cjs/FeedbackRating.type.js.map +1 -0
- package/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
- package/lib/cjs/component/checkbox-button/CheckboxButton.js.map +1 -1
- package/lib/cjs/component/checkbox-button/CheckboxButton.type.js +2 -0
- package/lib/cjs/component/checkbox-button/CheckboxButton.type.js.map +1 -0
- package/lib/cjs/component/feedback-item/FeedbackItem.js +26 -22
- package/lib/cjs/component/feedback-item/FeedbackItem.js.map +1 -1
- package/lib/cjs/component/feedback-item/FeedbackItem.type.js +2 -0
- package/lib/cjs/component/feedback-item/FeedbackItem.type.js.map +1 -0
- package/lib/cjs/component/slider-rating/SliderRating.js +6 -6
- package/lib/cjs/component/slider-rating/SliderRating.js.map +1 -1
- package/lib/cjs/component/slider-rating/SliderRating.type.js +2 -0
- package/lib/cjs/component/slider-rating/SliderRating.type.js.map +1 -0
- package/lib/cjs/component/submit-button/SubmitButton.js.map +1 -1
- package/lib/cjs/component/submit-button/SubmitButton.type.js +2 -0
- package/lib/cjs/component/submit-button/SubmitButton.type.js.map +1 -0
- package/lib/cjs/index.js +16 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/es6/FeedbackForm.js +9 -11
- package/lib/es6/FeedbackForm.js.map +1 -1
- package/lib/es6/FeedbackForm.type.js +2 -0
- package/lib/es6/FeedbackForm.type.js.map +1 -0
- package/lib/es6/{component/feedback-rating/FeedbackRating.js → FeedbackRating.js} +11 -12
- package/lib/es6/FeedbackRating.js.map +1 -0
- package/lib/es6/FeedbackRating.type.js.map +1 -0
- package/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
- package/lib/es6/component/checkbox-button/CheckboxButton.js.map +1 -1
- package/lib/es6/component/checkbox-button/CheckboxButton.type.js +2 -0
- package/lib/es6/component/checkbox-button/CheckboxButton.type.js.map +1 -0
- package/lib/es6/component/feedback-item/FeedbackItem.js +26 -22
- package/lib/es6/component/feedback-item/FeedbackItem.js.map +1 -1
- package/lib/es6/component/feedback-item/FeedbackItem.type.js +2 -0
- package/lib/es6/component/feedback-item/FeedbackItem.type.js.map +1 -0
- package/lib/es6/component/slider-rating/SliderRating.js +6 -6
- package/lib/es6/component/slider-rating/SliderRating.js.map +1 -1
- package/lib/es6/component/slider-rating/SliderRating.type.js +2 -0
- package/lib/es6/component/slider-rating/SliderRating.type.js.map +1 -0
- package/lib/es6/component/submit-button/SubmitButton.js.map +1 -1
- package/lib/es6/component/submit-button/SubmitButton.type.js +2 -0
- package/lib/es6/component/submit-button/SubmitButton.type.js.map +1 -0
- package/lib/es6/index.js +2 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/esm/FeedbackForm.mjs +10 -12
- package/lib/esm/FeedbackForm.type.mjs +1 -0
- package/lib/esm/{component/feedback-rating/FeedbackRating.mjs → FeedbackRating.mjs} +11 -13
- package/lib/esm/component/checkbox-button/CheckboxButton.mjs +4 -4
- package/lib/esm/component/feedback-item/FeedbackItem.mjs +26 -23
- package/lib/esm/component/slider-rating/SliderRating.mjs +7 -7
- package/lib/esm/index.mjs +2 -1
- package/lib/types/FeedbackForm.d.ts +8 -0
- package/lib/types/FeedbackForm.type.d.ts +53 -0
- package/lib/types/FeedbackRating.d.ts +8 -0
- package/lib/types/FeedbackRating.type.d.ts +93 -0
- package/lib/types/component/checkbox-button/CheckboxButton.d.ts +2 -2
- package/lib/types/component/checkbox-button/CheckboxButton.type.d.ts +11 -0
- package/lib/types/component/feedback-item/FeedbackItem.d.ts +5 -1
- package/lib/types/component/feedback-item/FeedbackItem.type.d.ts +22 -0
- package/lib/types/component/slider-rating/SliderRating.d.ts +2 -14
- package/lib/types/component/slider-rating/SliderRating.type.d.ts +28 -0
- package/lib/types/component/submit-button/SubmitButton.d.ts +3 -2
- package/lib/types/component/submit-button/SubmitButton.type.d.ts +5 -0
- package/lib/types/index.d.ts +3 -39
- package/package.json +8 -8
- package/vite.config.ts +1 -1
- package/vitest.config.mts +1 -1
- package/lib/cjs/component/feedback-rating/FeedbackRating.js.map +0 -1
- package/lib/cjs/component/feedback-rating/FeedbackRating.type.js.map +0 -1
- package/lib/cjs/index.d.js +0 -14
- package/lib/cjs/index.d.js.map +0 -1
- package/lib/es6/component/feedback-rating/FeedbackRating.js.map +0 -1
- package/lib/es6/component/feedback-rating/FeedbackRating.type.js.map +0 -1
- package/lib/es6/index.d.js +0 -3
- package/lib/es6/index.d.js.map +0 -1
- package/lib/types/component/feedback-rating/FeedbackRating.d.ts +0 -61
- package/lib/types/component/feedback-rating/FeedbackRating.type.d.ts +0 -73
- /package/lib/cjs/{component/feedback-rating/FeedbackRating.type.js → FeedbackRating.type.js} +0 -0
- /package/lib/es6/{component/feedback-rating/FeedbackRating.type.js → FeedbackRating.type.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.js","names":["_core","require","_baseComponents","_i18nEnhance","_interopRequireDefault","_uniqueID","_m","_m2","_Feedback","_input","_link","_modal","_notice","_noticeBubble","_spinContainer","_textarea","_typography","_finalFormFocus","_react","_reactFinalForm","_intergalacticDynamicLocales","_CheckboxButton","_FeedbackItem","_SliderRating","_SubmitButton","style","sstyled","insert","FeedbackRatingRoot","Component","constructor","args","_defineProperty2","default","error","NoticeBubbleManager","createFocusDecorator","rating","asProps","onVisibleChange","fn","_value","e","config","index","initialValue","props","initialValues","key","createElement","Field","name","type","input","FeedbackRating","Checkbox","_extends2","id","label","onChange","_checked","focused","Text","mb","size","isDescriptionReactFragment","description","React","Fragment","Flex","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","h","handleChange","autoComplete","state","Value","Box","color","headerId","uid","getHeaderProps","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","header","submitText","formConfig","notificationText","notificationTitle","learnMoreLink","Children","_Children","styles","forwardRef","theme","background","visible","_onVisibleChange","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","Illustration","Notice","NoticeComponent","other","SFeedbackRating","Modal","checkboxFields","filter","item","textFields","notificationId","assignProps","cn","Label","mr","Content","Title","gap","alignItems","Actions","handleChangeRating","Close","onClick","handelCloseModal","Form","focusDecorator","api","_ref5","submitting","Header","handleSubmit","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","NoticeBubbleContainer","i18nEnhance","localizedMessages","uniqueIDEnhancement","onSubmit","i18n","locale","FeedbackIllustration","SemcoreNotice","value","words","split","symbols","join","Boolean","length","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","createComponent","FeedbackItem","CheckboxButton","SubmitButton","_default","exports"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import { Box, Flex } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type Checkbox from '@semcore/checkbox';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { Intergalactic } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Input from '@semcore/input';\nimport Link from '@semcore/link';\nimport Modal from '@semcore/modal';\nimport { default as SemcoreNotice } from '@semcore/notice';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport SpinContainer from '@semcore/spin-container';\nimport Textarea from '@semcore/textarea';\nimport { Text } from '@semcore/typography';\nimport createFocusDecorator from 'final-form-focus';\nimport React, { type ReactElement } from 'react';\nimport { Field, Form } from 'react-final-form';\n\nimport type {\n FeedbackRatingCheckboxProps,\n FeedbackRatingItemProps,\n FeedbackRatingProps,\n FormConfigItem,\n FeedbackRatingDefaultProps,\n} from './FeedbackRating.type';\nimport style from '../../style/feedback-rating.shadow.css';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport SliderRating from '../slider-rating/SliderRating';\nimport { SubmitButton } from '../submit-button/SubmitButton';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n typeof FeedbackRatingRoot.enhance,\n {},\n {},\n State,\n FeedbackRatingDefaultProps\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps: FeedbackRatingDefaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n Illustration: FeedbackIllustration,\n Notice: SemcoreNotice,\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 if (rating > 0) {\n this.asProps.onVisibleChange(true, rating);\n }\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 ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n )\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 key={config.key} direction='column'>\n <Flex tag='label' mt={4} htmlFor={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 {/* @ts-ignore */}\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 ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n )\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: _Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange: _onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n Illustration,\n Notice: NoticeComponent,\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 <NoticeComponent\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={notificationTitle ? 'flex-start' : 'center'}\n >\n <NoticeComponent.Label mr={3} aria-hidden={true}>\n <Illustration />\n </NoticeComponent.Label>\n <NoticeComponent.Content>\n {notificationTitle ? <NoticeComponent.Title>{notificationTitle}</NoticeComponent.Title> : null}\n <NoticeComponent.Text gap={3} tag={Flex} alignItems={notificationTitle ? 'flex-start' : 'center'}>\n <Text id={notificationId}>\n {notificationText}\n </Text>\n <NoticeComponent.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </NoticeComponent.Actions>\n {learnMoreLink && (\n <Link href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </NoticeComponent.Text>\n </NoticeComponent.Content>\n <NoticeComponent.Close onClick={onNotificationClose} />\n </NoticeComponent>\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 ? (\n header\n )\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 <SemcoreNotice theme='warning' mt={4} mb={4}>\n <SemcoreNotice.Label>\n <WarnM />\n </SemcoreNotice.Label>\n <SemcoreNotice.Content>\n {getI18nText('errorMessage', {\n // todo: Brauer Ilia - think how to fix type\n // @ts-ignore\n email: (\n <Link href={`mailto:${errorFeedbackEmail}`}>\n {errorFeedbackEmail}\n </Link>\n ),\n })}\n </SemcoreNotice.Content>\n </SemcoreNotice>\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 </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={Modal.Title} />,\n );\n}\n\ntype FeedbackRatingComponent = Intergalactic.Component<'form', FeedbackRatingProps, {}, typeof FeedbackRatingRoot.enhance> & {\n validate: typeof FeedbackRatingRoot.validate;\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\n/**\n * FeedbackRating\n *\n * {@link https://developer.semrush.com/intergalactic/components/feedback-form/feedback-form-api#feedbackform-feedbackrating|API} | {@link https://developer.semrush.com/intergalactic/components/feedback-form/feedback-form-code/|Examples}\n */\nconst FeedbackRating = createComponent<\n FeedbackRatingComponent,\n typeof FeedbackRatingRoot\n>(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n});\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA,IAAAC,eAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,EAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,GAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,SAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,MAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,KAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,MAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,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AAE;EACpBgI,MAAM;EACNlF,IAAI,EAAEmH,0BAAY;EAClBtI,QAAQ,EAAEuI,uBAAc;EACxB3B,MAAM,EAAE4B;AACV,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhK,OAAA,GAEYqB,cAAc","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import type { NSCheckbox } from '@semcore/checkbox';\nimport type { Intergalactic } from '@semcore/core';\nimport type { IllustrationProps } from '@semcore/illustration';\nimport type Notice from '@semcore/notice';\nimport type React from 'react';\nimport type { FieldProps } from 'react-final-form';\n\nimport type { FeedbackFormProps } from '../../index';\nimport type { LocalizedMessages } from '../../translations/__intergalactic-dynamic-locales';\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 /** Notification close callback */\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 /** Visibility changes callback */\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 /** Initial form values including rating */\n initialValues: Record<string, any> & { rating: number };\n /** Email address shown in error messages */\n errorFeedbackEmail: string;\n /** Specifies the locale for i18n support */\n locale?: string;\n /** Illustration element */\n Illustration?: Intergalactic.Component<'svg', IllustrationProps>;\n /** Notice component */\n Notice?: typeof Notice;\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<NSCheckbox.Props, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\nexport type FeedbackRatingCheckboxComponent = Intergalactic.Component<'div', FeedbackRatingCheckboxProps>;\n\nexport type FeedbackRatingDefaultProps = {\n onSubmit: () => void;\n i18n: LocalizedMessages;\n locale: 'en';\n Illustration: FeedbackRatingProps['Illustration'];\n Notice: FeedbackRatingProps['Notice'];\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/cjs/index.d.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "FeedbackRating", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _FeedbackRating.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var _FeedbackRating = _interopRequireDefault(require("./component/feedback-rating/FeedbackRating"));
|
|
14
|
-
//# sourceMappingURL=index.d.js.map
|
package/lib/cjs/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":["_FeedbackRating","_interopRequireDefault","require"],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport type { NoticeSmart } from '@semcore/notice';\nimport type { FormProps, FieldProps, FieldInputProps, FieldMetaState } from 'react-final-form';\n\nimport { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';\n\nexport type FeedbackFormProps = FormProps & {\n /** The event is called when the form is submitted */\n onSubmit: (values: any, form: any, callback?: (errors?: {}) => void) => {} | Promise<{}> | void;\n /**\n * The property is in charge of the spinner showing\n * */\n loading?: boolean;\n /**\n * Color of container spinner; you can use your own color\n */\n background?: string;\n /** Spinner theme. There are several default themes or you can use your own color\n * @default dark\n **/\n theme?: 'dark' | 'invert' | string;\n};\n\ndeclare const FeedbackForm: Intergalactic.Component<'form', FeedbackFormProps> & {\n Item: Intergalactic.Component<\n 'div',\n FieldProps<any, any>,\n { input: FieldInputProps<any> & { state: 'normal' | 'invalid' }; meta: FieldMetaState<any> }\n >;\n Success: typeof Box;\n Submit: typeof Button;\n Cancel: typeof Button;\n Notice: typeof NoticeSmart;\n};\n\nexport default FeedbackForm;\n\nexport { FeedbackRating };\n"],"mappings":";;;;;;;;;;;;AAMA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.js","names":["Box","Flex","createComponent","Component","sstyled","Root","i18nEnhance","uniqueIDEnhancement","CheckM","WarnM","FeedbackIllustration","Input","Link","Modal","default","SemcoreNotice","NoticeBubbleContainer","NoticeBubbleManager","SpinContainer","Textarea","Text","createFocusDecorator","React","Field","Form","style","_sstyled","insert","localizedMessages","CheckboxButton","FeedbackItem","SliderRating","SubmitButton","FeedbackRatingRoot","constructor","args","_defineProperty","error","rating","asProps","onVisibleChange","fn","_value","e","config","index","initialValue","props","initialValues","key","createElement","name","type","input","FeedbackRating","Checkbox","_extends","id","label","onChange","_checked","focused","mb","size","isDescriptionReactFragment","description","Fragment","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","h","handleChange","autoComplete","state","Value","color","headerId","uid","getHeaderProps","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","header","submitText","formConfig","notificationText","notificationTitle","learnMoreLink","Children","_Children","styles","forwardRef","theme","background","visible","_onVisibleChange","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","Illustration","Notice","NoticeComponent","other","SFeedbackRating","checkboxFields","filter","item","textFields","notificationId","_assignProps2","cn","Label","mr","Content","Title","gap","alignItems","Actions","handleChangeRating","Close","onClick","_assignProps","handelCloseModal","focusDecorator","api","_ref5","submitting","Header","handleSubmit","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","onSubmit","i18n","locale","value","words","split","symbols","join","Boolean","length","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","_assignProps3"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import { Box, Flex } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type Checkbox from '@semcore/checkbox';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { Intergalactic } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Input from '@semcore/input';\nimport Link from '@semcore/link';\nimport Modal from '@semcore/modal';\nimport { default as SemcoreNotice } from '@semcore/notice';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport SpinContainer from '@semcore/spin-container';\nimport Textarea from '@semcore/textarea';\nimport { Text } from '@semcore/typography';\nimport createFocusDecorator from 'final-form-focus';\nimport React, { type ReactElement } from 'react';\nimport { Field, Form } from 'react-final-form';\n\nimport type {\n FeedbackRatingCheckboxProps,\n FeedbackRatingItemProps,\n FeedbackRatingProps,\n FormConfigItem,\n FeedbackRatingDefaultProps,\n} from './FeedbackRating.type';\nimport style from '../../style/feedback-rating.shadow.css';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport SliderRating from '../slider-rating/SliderRating';\nimport { SubmitButton } from '../submit-button/SubmitButton';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n typeof FeedbackRatingRoot.enhance,\n {},\n {},\n State,\n FeedbackRatingDefaultProps\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps: FeedbackRatingDefaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n Illustration: FeedbackIllustration,\n Notice: SemcoreNotice,\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 if (rating > 0) {\n this.asProps.onVisibleChange(true, rating);\n }\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 ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n )\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 key={config.key} direction='column'>\n <Flex tag='label' mt={4} htmlFor={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 {/* @ts-ignore */}\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 ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n )\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: _Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange: _onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n Illustration,\n Notice: NoticeComponent,\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 <NoticeComponent\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={notificationTitle ? 'flex-start' : 'center'}\n >\n <NoticeComponent.Label mr={3} aria-hidden={true}>\n <Illustration />\n </NoticeComponent.Label>\n <NoticeComponent.Content>\n {notificationTitle ? <NoticeComponent.Title>{notificationTitle}</NoticeComponent.Title> : null}\n <NoticeComponent.Text gap={3} tag={Flex} alignItems={notificationTitle ? 'flex-start' : 'center'}>\n <Text id={notificationId}>\n {notificationText}\n </Text>\n <NoticeComponent.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </NoticeComponent.Actions>\n {learnMoreLink && (\n <Link href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </NoticeComponent.Text>\n </NoticeComponent.Content>\n <NoticeComponent.Close onClick={onNotificationClose} />\n </NoticeComponent>\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 ? (\n header\n )\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 <SemcoreNotice theme='warning' mt={4} mb={4}>\n <SemcoreNotice.Label>\n <WarnM />\n </SemcoreNotice.Label>\n <SemcoreNotice.Content>\n {getI18nText('errorMessage', {\n // todo: Brauer Ilia - think how to fix type\n // @ts-ignore\n email: (\n <Link href={`mailto:${errorFeedbackEmail}`}>\n {errorFeedbackEmail}\n </Link>\n ),\n })}\n </SemcoreNotice.Content>\n </SemcoreNotice>\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 </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={Modal.Title} />,\n );\n}\n\ntype FeedbackRatingComponent = Intergalactic.Component<'form', FeedbackRatingProps, {}, typeof FeedbackRatingRoot.enhance> & {\n validate: typeof FeedbackRatingRoot.validate;\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\n/**\n * FeedbackRating\n *\n * {@link https://developer.semrush.com/intergalactic/components/feedback-form/feedback-form-api#feedbackform-feedbackrating|API} | {@link https://developer.semrush.com/intergalactic/components/feedback-form/feedback-form-code/|Examples}\n */\nconst FeedbackRating = createComponent<\n FeedbackRatingComponent,\n typeof FeedbackRatingRoot\n>(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n});\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;AAAA,SAASA,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AAGpD,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAEzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,yBAAyB;AAC3C,OAAOC,oBAAoB,MAAM,gCAAgC;AACjE,OAAOC,KAAK,MAAM,gBAAgB;AAClC,OAAOC,IAAI,MAAM,eAAe;AAChC,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,OAAO,IAAIC,aAAa,QAAQ,iBAAiB;AAC1D,SAASC,qBAAqB,EAAEC,mBAAmB,QAAQ,wBAAwB;AACnF,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,oBAAoB,MAAM,kBAAkB;AACnD,OAAOC,KAAK,MAA6B,OAAO;AAChD,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAAC;AAAA,MAA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G,CAAC,CAAC,EAAE;MAC/D,OAAOpI,KAAK;IACd;EACF,CAAC;EACDwH,KAAK,EAAGxH,KAAqB,IAAK,CAAC8H,KAAK,GAAG,EAAE,KAAK;IAChD,IAAIK,OAAO,CAACL,KAAK,CAAC,IAAI,CAAC,YAAY,CAACO,IAAI,CAACC,MAAM,CAACR,KAAK,CAAC,CAACS,WAAW,CAAC,CAAC,CAAC,EAAE;MACrE,OAAOvI,KAAK;IACd;EACF;AACF,CAAC;AAyUH,SAASkH,MAAMA,CAACxG,KAAU,EAAE;EAAA,IAAA8H,KAAA,GAAAC,YAAA;IAAAC,KAAA;EAC1B,MAAM;IAAE9D;EAAO,CAAC,GAAGlE,KAAK;EACxB,MAAMiI,OAAO,GAEMnK,KAAK,CAAC6H,KAAK;EAD9B,OAAAqC,KAAA,GAAO3K,OAAO,CAAC6G,MAAM,CAAC,eACpB3F,KAAA,CAAA4B,aAAA,CAAC8H,OAAO,EAAAD,KAAA,CAAAzC,EAAA;IAAA,GAAA2C,aAAA,KAAAJ,KAAA;EAAA,EAAuB,CAAC;AAEpC;AAUA;AACA;AACA;AACA;AACA;AACA,MAAMvH,cAAc,GAAGpD,eAAe,CAGpC+B,kBAAkB,EAAE;EACpBsH,MAAM;EACNhF,IAAI,EAAEzC,YAAY;EAClByB,QAAQ,EAAE1B,cAAc;EACxBiI,MAAM,EAAE9H;AACV,CAAC,CAAC;AAEF,eAAesB,cAAc","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import type { NSCheckbox } from '@semcore/checkbox';\nimport type { Intergalactic } from '@semcore/core';\nimport type { IllustrationProps } from '@semcore/illustration';\nimport type Notice from '@semcore/notice';\nimport type React from 'react';\nimport type { FieldProps } from 'react-final-form';\n\nimport type { FeedbackFormProps } from '../../index';\nimport type { LocalizedMessages } from '../../translations/__intergalactic-dynamic-locales';\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 /** Notification close callback */\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 /** Visibility changes callback */\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 /** Initial form values including rating */\n initialValues: Record<string, any> & { rating: number };\n /** Email address shown in error messages */\n errorFeedbackEmail: string;\n /** Specifies the locale for i18n support */\n locale?: string;\n /** Illustration element */\n Illustration?: Intergalactic.Component<'svg', IllustrationProps>;\n /** Notice component */\n Notice?: typeof Notice;\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<NSCheckbox.Props, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\nexport type FeedbackRatingCheckboxComponent = Intergalactic.Component<'div', FeedbackRatingCheckboxProps>;\n\nexport type FeedbackRatingDefaultProps = {\n onSubmit: () => void;\n i18n: LocalizedMessages;\n locale: 'en';\n Illustration: FeedbackRatingProps['Illustration'];\n Notice: FeedbackRatingProps['Notice'];\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/index.d.js
DELETED
package/lib/es6/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":["default","FeedbackRating"],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport type { NoticeSmart } from '@semcore/notice';\nimport type { FormProps, FieldProps, FieldInputProps, FieldMetaState } from 'react-final-form';\n\nimport { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';\n\nexport type FeedbackFormProps = FormProps & {\n /** The event is called when the form is submitted */\n onSubmit: (values: any, form: any, callback?: (errors?: {}) => void) => {} | Promise<{}> | void;\n /**\n * The property is in charge of the spinner showing\n * */\n loading?: boolean;\n /**\n * Color of container spinner; you can use your own color\n */\n background?: string;\n /** Spinner theme. There are several default themes or you can use your own color\n * @default dark\n **/\n theme?: 'dark' | 'invert' | string;\n};\n\ndeclare const FeedbackForm: Intergalactic.Component<'form', FeedbackFormProps> & {\n Item: Intergalactic.Component<\n 'div',\n FieldProps<any, any>,\n { input: FieldInputProps<any> & { state: 'normal' | 'invalid' }; meta: FieldMetaState<any> }\n >;\n Success: typeof Box;\n Submit: typeof Button;\n Cancel: typeof Button;\n Notice: typeof NoticeSmart;\n};\n\nexport default FeedbackForm;\n\nexport { FeedbackRating };\n"],"mappings":"AAMA,SAASA,OAAO,IAAIC,cAAc,QAAQ,4CAA4C;AAiCtF,SAASA,cAAc","ignoreList":[]}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type Button from '@semcore/button';
|
|
2
|
-
import type Checkbox from '@semcore/checkbox';
|
|
3
|
-
import { Component } from '@semcore/core';
|
|
4
|
-
import type { Intergalactic } from '@semcore/core';
|
|
5
|
-
import { NoticeBubbleManager } from '@semcore/notice-bubble';
|
|
6
|
-
import { Text } from '@semcore/typography';
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import type { FeedbackRatingCheckboxProps, FeedbackRatingItemProps, FeedbackRatingProps, FormConfigItem, FeedbackRatingDefaultProps } from './FeedbackRating.type';
|
|
9
|
-
type State = {
|
|
10
|
-
error: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare class FeedbackRatingRoot extends Component<FeedbackRatingProps, typeof FeedbackRatingRoot.enhance, {}, {}, State, FeedbackRatingDefaultProps> {
|
|
13
|
-
static displayName: string;
|
|
14
|
-
static style: {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
};
|
|
17
|
-
static enhance: readonly [(props: any) => {
|
|
18
|
-
getI18nText: ReturnType<(dictionary: import("@semcore/core/lib/utils/enhances/WithI18n").Dictionary, locale?: import("@semcore/core/lib/utils/enhances/WithI18n").LocaleKeys, fallbackDictionary?: import("@semcore/core/lib/utils/enhances/WithI18n").Dictionary) => (messageId: string, variables?: {
|
|
19
|
-
[key: string]: string | number | undefined;
|
|
20
|
-
}) => string>;
|
|
21
|
-
}, (props: any) => {
|
|
22
|
-
uid: ReturnType<typeof import("@semcore/core/lib/utils/uniqueID").useUID>;
|
|
23
|
-
}];
|
|
24
|
-
static defaultProps: FeedbackRatingDefaultProps;
|
|
25
|
-
static validate: {
|
|
26
|
-
description: (error: Error | string) => (value?: string) => string | Error | undefined;
|
|
27
|
-
email: (error: Error | string) => (value?: string) => string | Error | undefined;
|
|
28
|
-
};
|
|
29
|
-
state: State;
|
|
30
|
-
manager: NoticeBubbleManager;
|
|
31
|
-
private focusDecorator;
|
|
32
|
-
get headerId(): string;
|
|
33
|
-
getHeaderProps(): {
|
|
34
|
-
id: string;
|
|
35
|
-
};
|
|
36
|
-
getItemProps(): {
|
|
37
|
-
validateOnBlur: boolean | undefined;
|
|
38
|
-
};
|
|
39
|
-
getNoticeTextId(): string;
|
|
40
|
-
handleChangeRating: (rating: number) => void;
|
|
41
|
-
handelCloseModal: () => void;
|
|
42
|
-
handleChange: (fn: (e: React.SyntheticEvent) => void) => (_value: any, e: React.SyntheticEvent) => void;
|
|
43
|
-
componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>): void;
|
|
44
|
-
renderCheckbox: (config: FormConfigItem, index: number) => React.JSX.Element;
|
|
45
|
-
renderTextField: (config: FormConfigItem) => React.JSX.Element;
|
|
46
|
-
render(): React.ReactNode;
|
|
47
|
-
}
|
|
48
|
-
type FeedbackRatingComponent = Intergalactic.Component<'form', FeedbackRatingProps, {}, typeof FeedbackRatingRoot.enhance> & {
|
|
49
|
-
validate: typeof FeedbackRatingRoot.validate;
|
|
50
|
-
Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;
|
|
51
|
-
Submit: typeof Button;
|
|
52
|
-
Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;
|
|
53
|
-
Header: typeof Text;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* FeedbackRating
|
|
57
|
-
*
|
|
58
|
-
* {@link https://developer.semrush.com/intergalactic/components/feedback-form/feedback-form-api#feedbackform-feedbackrating|API} | {@link https://developer.semrush.com/intergalactic/components/feedback-form/feedback-form-code/|Examples}
|
|
59
|
-
*/
|
|
60
|
-
declare const FeedbackRating: FeedbackRatingComponent;
|
|
61
|
-
export default FeedbackRating;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { NSCheckbox } from '@semcore/checkbox';
|
|
2
|
-
import type { Intergalactic } from '@semcore/core';
|
|
3
|
-
import type { IllustrationProps } from '@semcore/illustration';
|
|
4
|
-
import type Notice from '@semcore/notice';
|
|
5
|
-
import type React from 'react';
|
|
6
|
-
import type { FieldProps } from 'react-final-form';
|
|
7
|
-
import type { FeedbackFormProps } from '../../index';
|
|
8
|
-
import type { LocalizedMessages } from '../../translations/__intergalactic-dynamic-locales';
|
|
9
|
-
export type FormConfigItem = {
|
|
10
|
-
key: string;
|
|
11
|
-
label: React.ReactNode;
|
|
12
|
-
type: 'input' | 'checkbox' | 'textarea' | 'email';
|
|
13
|
-
description?: React.ReactNode;
|
|
14
|
-
validate?: (value: any) => Error | string | undefined;
|
|
15
|
-
};
|
|
16
|
-
export type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<FeedbackFormProps, 'initialValues' | 'loading'> & {
|
|
17
|
-
/** Status of form */
|
|
18
|
-
status: 'default' | 'success' | 'error' | 'loading';
|
|
19
|
-
/** Flag for show/hide notification */
|
|
20
|
-
notificationVisible: boolean;
|
|
21
|
-
/** Notification close callback */
|
|
22
|
-
onNotificationClose: () => void;
|
|
23
|
-
/** Text in notification panel */
|
|
24
|
-
notificationText: string;
|
|
25
|
-
/** Title in notification panel */
|
|
26
|
-
notificationTitle?: string;
|
|
27
|
-
/** Optional link in notification panel */
|
|
28
|
-
learnMoreLink?: string;
|
|
29
|
-
/** Rating value */
|
|
30
|
-
rating: number;
|
|
31
|
-
/** Visible modal form flag */
|
|
32
|
-
visible: boolean;
|
|
33
|
-
/** Visibility changes callback */
|
|
34
|
-
onVisibleChange: (visible: boolean, rating: number) => void;
|
|
35
|
-
/** Width for modal with form */
|
|
36
|
-
modalWidth?: number | string;
|
|
37
|
-
/** Header of modal with form */
|
|
38
|
-
header: React.ReactNode;
|
|
39
|
-
/** Text for submit button of form */
|
|
40
|
-
submitText?: string;
|
|
41
|
-
/** Config for form fields */
|
|
42
|
-
formConfig: FormConfigItem[];
|
|
43
|
-
/** Initial form values including rating */
|
|
44
|
-
initialValues: Record<string, any> & {
|
|
45
|
-
rating: number;
|
|
46
|
-
};
|
|
47
|
-
/** Email address shown in error messages */
|
|
48
|
-
errorFeedbackEmail: string;
|
|
49
|
-
/** Specifies the locale for i18n support */
|
|
50
|
-
locale?: string;
|
|
51
|
-
/** Illustration element */
|
|
52
|
-
Illustration?: Intergalactic.Component<'svg', IllustrationProps>;
|
|
53
|
-
/** Notice component */
|
|
54
|
-
Notice?: typeof Notice;
|
|
55
|
-
};
|
|
56
|
-
export type FeedbackRatingItemProps = FieldProps<any, any> & {
|
|
57
|
-
/**
|
|
58
|
-
* Allows to override which passed props will be passed to the Tooltip component.
|
|
59
|
-
*/
|
|
60
|
-
tooltipProps?: string[];
|
|
61
|
-
};
|
|
62
|
-
export type FeedbackRatingCheckboxProps = Omit<NSCheckbox.Props, 'label'> & {
|
|
63
|
-
focused: boolean;
|
|
64
|
-
label: React.ReactNode;
|
|
65
|
-
};
|
|
66
|
-
export type FeedbackRatingCheckboxComponent = Intergalactic.Component<'div', FeedbackRatingCheckboxProps>;
|
|
67
|
-
export type FeedbackRatingDefaultProps = {
|
|
68
|
-
onSubmit: () => void;
|
|
69
|
-
i18n: LocalizedMessages;
|
|
70
|
-
locale: 'en';
|
|
71
|
-
Illustration: FeedbackRatingProps['Illustration'];
|
|
72
|
-
Notice: FeedbackRatingProps['Notice'];
|
|
73
|
-
};
|
/package/lib/cjs/{component/feedback-rating/FeedbackRating.type.js → FeedbackRating.type.js}
RENAMED
|
File without changes
|
/package/lib/es6/{component/feedback-rating/FeedbackRating.type.js → FeedbackRating.type.js}
RENAMED
|
File without changes
|