@availity/feedback 6.2.10 → 6.2.14-alpha.3

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/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2017-present Availity, LLC
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2017-present Availity, LLC
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,7 +1,25 @@
1
- # @availity/feedback
2
-
3
- > Availity feedback with smiley faces react component.
4
-
5
- [![Version](https://img.shields.io/npm/v/@availity/feedback.svg?style=for-the-badge)](https://www.npmjs.com/package/@availity/feedback)
6
-
7
- ## [Documentation](https://availity.github.io/availity-react/components/feedback/index)
1
+ # @availity/feedback
2
+
3
+ > Availity feedback with smiley faces react component.
4
+
5
+ [![Version](https://img.shields.io/npm/v/@availity/feedback.svg?style=for-the-badge)](https://www.npmjs.com/package/@availity/feedback)
6
+ [![NPM Downloads](https://img.shields.io/npm/dt/@availity/feedback.svg?style=for-the-badge)](https://www.npmjs.com/package/@availity/feedback)
7
+ [![Dependecy Status](https://img.shields.io/librariesio/release/npm/@availity/feedback?style=for-the-badge)](https://github.com/Availity/availity-react/blob/master/packages/feedback/package.json)
8
+
9
+ ## Installation
10
+
11
+ ### NPM
12
+
13
+ ```bash
14
+ npm install @availity/feedback
15
+ ```
16
+
17
+ ### Yarn
18
+
19
+ ```bash
20
+ yarn add @availity/feedback
21
+ ```
22
+
23
+ ## Documentation
24
+
25
+ Check out more documentation at [availity.github.io](https://availity.github.io/availity-react/components/feedback/index)
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { default } from './src/Feedback';
2
- export { default as FeedbackForm } from './src/FeedbackForm';
3
- export { default as FeedbackModal } from './src/FeedbackModal';
1
+ export { default } from './src/Feedback';
2
+ export { default as FeedbackForm } from './src/FeedbackForm';
3
+ export { default as FeedbackModal } from './src/FeedbackModal';
package/package.json CHANGED
@@ -1,28 +1,31 @@
1
1
  {
2
2
  "name": "@availity/feedback",
3
- "version": "6.2.10",
3
+ "version": "6.2.14-alpha.3+7af25f07",
4
4
  "description": "Availity feedback with smiley faces react component.",
5
5
  "keywords": [
6
6
  "react",
7
- "availity"
7
+ "availity",
8
+ "feedback"
8
9
  ],
10
+ "homepage": "https://availity.github.io/availity-react/components/feedback/index",
9
11
  "bugs": {
10
12
  "url": "https://github.com/Availity/availity-react/issues"
11
13
  },
12
14
  "repository": {
13
15
  "type": "git",
14
- "url": "https://github.com/Availity/availity-react.git"
16
+ "url": "https://github.com/Availity/availity-react.git",
17
+ "directory": "packages/feedback"
15
18
  },
16
19
  "license": "MIT",
17
20
  "author": "Evan Sharp <evan.sharp@availity.com>",
18
21
  "main": "index.js",
19
22
  "types": "index.d.ts",
20
23
  "dependencies": {
21
- "@availity/form": "^1.2.2",
22
- "@availity/hooks": "^3.1.1",
23
- "@availity/icon": "^0.10.1",
24
+ "@availity/form": "^1.2.3",
25
+ "@availity/hooks": "^3.1.2",
26
+ "@availity/icon": "^0.10.2",
24
27
  "@availity/native-form": "^4.0.5",
25
- "@availity/select": "^2.3.1",
28
+ "@availity/select": "^2.4.1-alpha.5+7af25f07",
26
29
  "prop-types": "^15.7.2"
27
30
  },
28
31
  "devDependencies": {
@@ -47,5 +50,5 @@
47
50
  "publishConfig": {
48
51
  "access": "public"
49
52
  },
50
- "gitHead": "9c6598bc46384f57279e6998de4a4a85fac04b27"
53
+ "gitHead": "7af25f07162c9d725ea2c394eb95b40958e680db"
51
54
  }
package/src/Feedback.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- import { DropdownProps } from 'reactstrap';
2
-
3
- export interface AnalyticsType {
4
- [key: string]: any;
5
- info: (data: any) => Promise<void>;
6
- }
7
-
8
- export interface FeedbackProps extends DropdownProps {
9
- appName?: string;
10
- modal?: boolean;
11
- zIndex?: number | string;
12
- outline?: boolean;
13
- color?: string;
14
- analytics?: AnalyticsType;
15
- formProps?: { [key: string]: any };
16
- prompt?: React.ReactType;
17
- onFeedbackSent?: (feedback?: { [key: string]: any }) => void;
18
- onModalOpenChange?: (isOpen: boolean) => void;
19
- showSupport?: boolean;
20
- supportZIndex?: number | string;
21
- }
22
-
23
- declare const Feedback: React.FC<FeedbackProps>;
24
-
25
- export default Feedback;
1
+ import { DropdownProps } from 'reactstrap';
2
+
3
+ export interface AnalyticsType {
4
+ [key: string]: any;
5
+ info: (data: any) => Promise<void>;
6
+ }
7
+
8
+ export interface FeedbackProps extends DropdownProps {
9
+ appName?: string;
10
+ modal?: boolean;
11
+ zIndex?: number | string;
12
+ outline?: boolean;
13
+ color?: string;
14
+ analytics?: AnalyticsType;
15
+ formProps?: { [key: string]: any };
16
+ prompt?: React.ReactType;
17
+ onFeedbackSent?: (feedback?: { [key: string]: any }) => void;
18
+ onModalOpenChange?: (isOpen: boolean) => void;
19
+ showSupport?: boolean;
20
+ supportZIndex?: number | string;
21
+ }
22
+
23
+ declare const Feedback: React.FC<FeedbackProps>;
24
+
25
+ export default Feedback;
package/src/Feedback.js CHANGED
@@ -1,102 +1,102 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Dropdown, DropdownToggle } from 'reactstrap';
4
- import { avLogMessagesApi } from '@availity/api-axios';
5
- import { useToggle } from '@availity/hooks';
6
- import FeedbackDropdown from './FeedbackDropdown';
7
- import FeedbackModal from './FeedbackModal';
8
-
9
- const Feedback = ({
10
- appName,
11
- modal,
12
- zIndex,
13
- supportZIndex,
14
- children,
15
- analytics,
16
- className,
17
- outline,
18
- color,
19
- formProps,
20
- prompt,
21
- onFeedbackSent,
22
- showSupport,
23
- onModalOpenChange,
24
- ...props
25
- }) => {
26
- const [feedbackIsOpen, feedbackToggle] = useToggle(false);
27
-
28
- const handleFeedbackToggle = () => {
29
- feedbackToggle();
30
- onModalOpenChange(!feedbackIsOpen);
31
- };
32
-
33
- return (
34
- <Dropdown
35
- isOpen={feedbackIsOpen && !modal}
36
- toggle={handleFeedbackToggle}
37
- className={`${className} hidden-print`}
38
- {...props}
39
- >
40
- <DropdownToggle color={color} outline={outline}>
41
- {children || showSupport ? 'Feedback & Support' : 'Give Feedback'}
42
- </DropdownToggle>
43
- {modal ? (
44
- <FeedbackModal
45
- onFeedbackSent={onFeedbackSent}
46
- prompt={prompt}
47
- isOpen={feedbackIsOpen}
48
- zIndex={zIndex}
49
- toggle={handleFeedbackToggle}
50
- name={appName}
51
- analytics={analytics}
52
- showSupport={showSupport}
53
- supportZIndex={supportZIndex}
54
- feedbackToggle={feedbackToggle}
55
- {...formProps}
56
- />
57
- ) : (
58
- <FeedbackDropdown
59
- onFeedbackSent={onFeedbackSent}
60
- feedbackToggle={feedbackToggle}
61
- prompt={prompt}
62
- analytics={analytics}
63
- toggle={handleFeedbackToggle}
64
- name={appName}
65
- showSupport={showSupport}
66
- supportZIndex={supportZIndex}
67
- modal={modal}
68
- {...formProps}
69
- />
70
- )}
71
- </Dropdown>
72
- );
73
- };
74
-
75
- Feedback.propTypes = {
76
- appName: PropTypes.string,
77
- modal: PropTypes.bool,
78
- zIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
79
- supportZIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
80
- children: PropTypes.node,
81
- className: PropTypes.string,
82
- outline: PropTypes.bool,
83
- color: PropTypes.string,
84
- formProps: PropTypes.object,
85
- prompt: PropTypes.string,
86
- onFeedbackSent: PropTypes.func,
87
- onModalOpenChange: PropTypes.func,
88
- analytics: PropTypes.shape({
89
- info: PropTypes.func.isRequired,
90
- }),
91
- showSupport: PropTypes.bool,
92
- };
93
-
94
- Feedback.defaultProps = {
95
- modal: false,
96
- color: 'secondary',
97
- analytics: avLogMessagesApi,
98
- showSupport: false,
99
- onModalOpenChange: Object,
100
- };
101
-
102
- export default Feedback;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Dropdown, DropdownToggle } from 'reactstrap';
4
+ import { avLogMessagesApi } from '@availity/api-axios';
5
+ import { useToggle } from '@availity/hooks';
6
+ import FeedbackDropdown from './FeedbackDropdown';
7
+ import FeedbackModal from './FeedbackModal';
8
+
9
+ const Feedback = ({
10
+ appName,
11
+ modal,
12
+ zIndex,
13
+ supportZIndex,
14
+ children,
15
+ analytics,
16
+ className,
17
+ outline,
18
+ color,
19
+ formProps,
20
+ prompt,
21
+ onFeedbackSent,
22
+ showSupport,
23
+ onModalOpenChange,
24
+ ...props
25
+ }) => {
26
+ const [feedbackIsOpen, feedbackToggle] = useToggle(false);
27
+
28
+ const handleFeedbackToggle = () => {
29
+ feedbackToggle();
30
+ onModalOpenChange(!feedbackIsOpen);
31
+ };
32
+
33
+ return (
34
+ <Dropdown
35
+ isOpen={feedbackIsOpen && !modal}
36
+ toggle={handleFeedbackToggle}
37
+ className={`${className} hidden-print`}
38
+ {...props}
39
+ >
40
+ <DropdownToggle color={color} outline={outline}>
41
+ {children || showSupport ? 'Feedback & Support' : 'Give Feedback'}
42
+ </DropdownToggle>
43
+ {modal ? (
44
+ <FeedbackModal
45
+ onFeedbackSent={onFeedbackSent}
46
+ prompt={prompt}
47
+ isOpen={feedbackIsOpen}
48
+ zIndex={zIndex}
49
+ toggle={handleFeedbackToggle}
50
+ name={appName}
51
+ analytics={analytics}
52
+ showSupport={showSupport}
53
+ supportZIndex={supportZIndex}
54
+ feedbackToggle={feedbackToggle}
55
+ {...formProps}
56
+ />
57
+ ) : (
58
+ <FeedbackDropdown
59
+ onFeedbackSent={onFeedbackSent}
60
+ feedbackToggle={feedbackToggle}
61
+ prompt={prompt}
62
+ analytics={analytics}
63
+ toggle={handleFeedbackToggle}
64
+ name={appName}
65
+ showSupport={showSupport}
66
+ supportZIndex={supportZIndex}
67
+ modal={modal}
68
+ {...formProps}
69
+ />
70
+ )}
71
+ </Dropdown>
72
+ );
73
+ };
74
+
75
+ Feedback.propTypes = {
76
+ appName: PropTypes.string,
77
+ modal: PropTypes.bool,
78
+ zIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
79
+ supportZIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
80
+ children: PropTypes.node,
81
+ className: PropTypes.string,
82
+ outline: PropTypes.bool,
83
+ color: PropTypes.string,
84
+ formProps: PropTypes.object,
85
+ prompt: PropTypes.string,
86
+ onFeedbackSent: PropTypes.func,
87
+ onModalOpenChange: PropTypes.func,
88
+ analytics: PropTypes.shape({
89
+ info: PropTypes.func.isRequired,
90
+ }),
91
+ showSupport: PropTypes.bool,
92
+ };
93
+
94
+ Feedback.defaultProps = {
95
+ modal: false,
96
+ color: 'secondary',
97
+ analytics: avLogMessagesApi,
98
+ showSupport: false,
99
+ onModalOpenChange: Object,
100
+ };
101
+
102
+ export default Feedback;
@@ -1,10 +1,10 @@
1
- export interface FeedbackButtonProps {
2
- onClick?: Function;
3
- icon?: string;
4
- active?: string;
5
- children?: React.ReactType;
6
- }
7
-
8
- declare const FeedbackButton: React.ComponentType<FeedbackButtonProps>;
9
-
1
+ export interface FeedbackButtonProps {
2
+ onClick?: Function;
3
+ icon?: string;
4
+ active?: string;
5
+ children?: React.ReactType;
6
+ }
7
+
8
+ declare const FeedbackButton: React.ComponentType<FeedbackButtonProps>;
9
+
10
10
  export default FeedbackButton;
@@ -1,14 +1,14 @@
1
- export interface FeedbackProps {
2
- appName: string;
3
- className?: string;
4
- prompt?: string;
5
- color?: string;
6
- outline?: boolean;
7
- formProps?: object;
8
- children?: React.ReactType;
9
- onFeedbackSent: Function;
10
- }
11
-
12
- declare const Feedback: React.StatelessComponent<FeedbackProps>;
13
-
14
- export default Feedback;
1
+ export interface FeedbackProps {
2
+ appName: string;
3
+ className?: string;
4
+ prompt?: string;
5
+ color?: string;
6
+ outline?: boolean;
7
+ formProps?: object;
8
+ children?: React.ReactType;
9
+ onFeedbackSent: Function;
10
+ }
11
+
12
+ declare const Feedback: React.StatelessComponent<FeedbackProps>;
13
+
14
+ export default Feedback;
@@ -1,31 +1,31 @@
1
- import { ModalHeaderProps } from 'reactstrap';
2
- import { AnalyticsType } from './Feedback';
3
-
4
- type FaceOption = {
5
- icon?: string;
6
- description?: string;
7
- };
8
-
9
- type AboutOption = {
10
- icon?: string;
11
- label?: React.ReactNode;
12
- };
13
-
14
- export interface FeedbackFormProps {
15
- name: string;
16
- onFeedbackSent?: (feedback?: { [key: string]: any }) => void;
17
- faceOptions?: FaceOption[];
18
- aboutOptions?: AboutOption[];
19
- aboutLabel?: string;
20
- analytics?: AnalyticsType;
21
- prompt?: string;
22
- staticFields?: object;
23
- modalHeaderProps?: ModalHeaderProps;
24
- showSupport: boolean;
25
- setSupportIsActive: Function;
26
- autoFocusFeedbackButton?: Boolean;
27
- }
28
-
29
- declare const FeedbackForm: React.FC<FeedbackFormProps>;
30
-
31
- export default FeedbackForm;
1
+ import { ModalHeaderProps } from 'reactstrap';
2
+ import { AnalyticsType } from './Feedback';
3
+
4
+ type FaceOption = {
5
+ icon?: string;
6
+ description?: string;
7
+ };
8
+
9
+ type AboutOption = {
10
+ icon?: string;
11
+ label?: React.ReactNode;
12
+ };
13
+
14
+ export interface FeedbackFormProps {
15
+ name: string;
16
+ onFeedbackSent?: (feedback?: { [key: string]: any }) => void;
17
+ faceOptions?: FaceOption[];
18
+ aboutOptions?: AboutOption[];
19
+ aboutLabel?: string;
20
+ analytics?: AnalyticsType;
21
+ prompt?: string;
22
+ staticFields?: object;
23
+ modalHeaderProps?: ModalHeaderProps;
24
+ showSupport: boolean;
25
+ setSupportIsActive: Function;
26
+ autoFocusFeedbackButton?: Boolean;
27
+ }
28
+
29
+ declare const FeedbackForm: React.FC<FeedbackFormProps>;
30
+
31
+ export default FeedbackForm;
@@ -1,9 +1,9 @@
1
- export interface FeedbackModalProps {
2
- isOpen: boolean;
3
- toggle: Function;
4
- zIndex?: number | string;
5
- }
6
-
7
- declare const FeedbackModal: React.FC<FeedbackModalProps>;
8
-
9
- export default FeedbackModal;
1
+ export interface FeedbackModalProps {
2
+ isOpen: boolean;
3
+ toggle: Function;
4
+ zIndex?: number | string;
5
+ }
6
+
7
+ declare const FeedbackModal: React.FC<FeedbackModalProps>;
8
+
9
+ export default FeedbackModal;