@atlaskit/contextual-survey 2.2.15 → 2.2.17
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 +157 -55
- package/afm-jira/tsconfig.json +45 -0
- package/dist/cjs/components/FeedbackAcknowledgement.js +2 -0
- package/dist/cjs/components/FeedbackScoreButtons.js +42 -6
- package/dist/cjs/components/SignUpPrompt.js +6 -1
- package/dist/cjs/components/SignUpSuccess.js +2 -0
- package/dist/cjs/components/SuccessContainer.js +11 -4
- package/dist/cjs/components/SurveyContainer.js +17 -4
- package/dist/cjs/components/SurveyForm.js +4 -0
- package/dist/cjs/components/SurveyMarshal.js +7 -0
- package/dist/es2019/components/FeedbackAcknowledgement.js +2 -0
- package/dist/es2019/components/FeedbackScoreButtons.js +41 -36
- package/dist/es2019/components/SignUpPrompt.js +6 -1
- package/dist/es2019/components/SignUpSuccess.js +2 -0
- package/dist/es2019/components/SuccessContainer.js +11 -8
- package/dist/es2019/components/SurveyContainer.js +17 -12
- package/dist/es2019/components/SurveyForm.js +4 -0
- package/dist/es2019/components/SurveyMarshal.js +6 -0
- package/dist/esm/components/FeedbackAcknowledgement.js +2 -0
- package/dist/esm/components/FeedbackScoreButtons.js +41 -6
- package/dist/esm/components/SignUpPrompt.js +6 -1
- package/dist/esm/components/SignUpSuccess.js +2 -0
- package/dist/esm/components/SuccessContainer.js +11 -4
- package/dist/esm/components/SurveyContainer.js +17 -4
- package/dist/esm/components/SurveyForm.js +4 -0
- package/dist/esm/components/SurveyMarshal.js +6 -0
- package/dist/types/components/ContextualSurvey.d.ts +1 -1
- package/dist/types/components/SurveyForm.d.ts +3 -3
- package/dist/types/components/SurveyMarshal.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/ContextualSurvey.d.ts +1 -1
- package/dist/types-ts4.5/components/SurveyForm.d.ts +3 -3
- package/dist/types-ts4.5/components/SurveyMarshal.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/docs/0-intro.tsx +33 -31
- package/package.json +73 -75
- package/report.api.md +33 -32
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { OnSubmitHandler } from '@atlaskit/form';
|
|
3
|
-
import { FormValues } from '../types';
|
|
2
|
+
import { type OnSubmitHandler } from '@atlaskit/form';
|
|
3
|
+
import { type FormValues } from '../types';
|
|
4
4
|
interface Props {
|
|
5
5
|
question: string;
|
|
6
6
|
statement?: string;
|
|
@@ -8,5 +8,5 @@ interface Props {
|
|
|
8
8
|
textLabel: string;
|
|
9
9
|
onSubmit: OnSubmitHandler<FormValues>;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit
|
|
11
|
+
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit }: Props) => jsx.JSX.Element;
|
|
12
12
|
export default _default;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as ContextualSurvey, DismissTrigger
|
|
1
|
+
export { default as ContextualSurvey, DismissTrigger } from './components/ContextualSurvey';
|
|
2
2
|
export type { OnDismissArgs } from './components/ContextualSurvey';
|
|
3
3
|
export { default as SurveyMarshal } from './components/SurveyMarshal';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { OnSubmitHandler } from '@atlaskit/form';
|
|
3
|
-
import { FormValues } from '../types';
|
|
2
|
+
import { type OnSubmitHandler } from '@atlaskit/form';
|
|
3
|
+
import { type FormValues } from '../types';
|
|
4
4
|
interface Props {
|
|
5
5
|
question: string;
|
|
6
6
|
statement?: string;
|
|
@@ -8,5 +8,5 @@ interface Props {
|
|
|
8
8
|
textLabel: string;
|
|
9
9
|
onSubmit: OnSubmitHandler<FormValues>;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit
|
|
11
|
+
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit }: Props) => jsx.JSX.Element;
|
|
12
12
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as ContextualSurvey, DismissTrigger
|
|
1
|
+
export { default as ContextualSurvey, DismissTrigger } from './components/ContextualSurvey';
|
|
2
2
|
export type { OnDismissArgs } from './components/ContextualSurvey';
|
|
3
3
|
export { default as SurveyMarshal } from './components/SurveyMarshal';
|
package/docs/0-intro.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
AtlassianInternalWarning,
|
|
5
|
+
code,
|
|
6
|
+
DevPreviewWarning,
|
|
7
|
+
Example,
|
|
8
|
+
md,
|
|
9
|
+
Props,
|
|
10
10
|
} from '@atlaskit/docs';
|
|
11
11
|
import { token } from '@atlaskit/tokens';
|
|
12
12
|
|
|
@@ -14,15 +14,17 @@ const BasicExample = require('../examples/00-usage').default;
|
|
|
14
14
|
|
|
15
15
|
export default md`
|
|
16
16
|
${(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
<>
|
|
18
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
|
|
19
|
+
<div style={{ marginBottom: token('space.100', '0.5rem') }}>
|
|
20
|
+
<AtlassianInternalWarning />
|
|
21
|
+
</div>
|
|
22
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
|
|
23
|
+
<div style={{ marginTop: token('space.100', '0.5rem') }}>
|
|
24
|
+
<DevPreviewWarning />
|
|
25
|
+
</div>
|
|
26
|
+
</>
|
|
27
|
+
)}
|
|
26
28
|
|
|
27
29
|
This component is used to ask for feedback from the user, without affecting their usage of the page. It is styled similar to a \`flag\`.
|
|
28
30
|
|
|
@@ -92,25 +94,25 @@ export default md`
|
|
|
92
94
|
${code`import { ContextualSurvey, SurveyMarshal } from '@atlaskit/avatar';`}
|
|
93
95
|
|
|
94
96
|
${(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
<Example
|
|
98
|
+
packageName="@atlaskit/contextual-survey"
|
|
99
|
+
Component={() => <BasicExample height="500px" />}
|
|
100
|
+
title="Basic example"
|
|
101
|
+
source={require('!!raw-loader!../examples/00-usage')}
|
|
102
|
+
/>
|
|
103
|
+
)}
|
|
102
104
|
|
|
103
105
|
${(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
<Props
|
|
107
|
+
heading="Contextual Survey Props"
|
|
108
|
+
props={require('!!extract-react-types-loader!../src/components/ContextualSurvey')}
|
|
109
|
+
/>
|
|
110
|
+
)}
|
|
109
111
|
|
|
110
112
|
${(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
<Props
|
|
114
|
+
heading="Survey Marshal Props"
|
|
115
|
+
props={require('!!extract-react-types-loader!../src/components/SurveyMarshal')}
|
|
116
|
+
/>
|
|
115
117
|
)}
|
|
116
118
|
`;
|
package/package.json
CHANGED
|
@@ -1,76 +1,74 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
76
|
-
}
|
|
2
|
+
"name": "@atlaskit/contextual-survey",
|
|
3
|
+
"version": "2.2.17",
|
|
4
|
+
"description": "A React component used to ask the user for feedback",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"module:es2019": "dist/es2019/index.js",
|
|
14
|
+
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"atlaskit:src": "src/index.ts",
|
|
25
|
+
"af:exports": {
|
|
26
|
+
".": "./src/index.ts",
|
|
27
|
+
"./constants": "./src/constants.ts",
|
|
28
|
+
"./types": "./src/types.ts"
|
|
29
|
+
},
|
|
30
|
+
"atlassian": {
|
|
31
|
+
"team": "Personalization",
|
|
32
|
+
"releaseModel": "continuous",
|
|
33
|
+
"website": {
|
|
34
|
+
"name": "Contextual Survey"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@atlaskit/button": "^18.0.0",
|
|
39
|
+
"@atlaskit/checkbox": "^13.5.0",
|
|
40
|
+
"@atlaskit/form": "^10.4.0",
|
|
41
|
+
"@atlaskit/icon": "^22.4.0",
|
|
42
|
+
"@atlaskit/textarea": "^5.5.0",
|
|
43
|
+
"@atlaskit/theme": "^12.11.0",
|
|
44
|
+
"@atlaskit/tokens": "^1.52.0",
|
|
45
|
+
"@atlaskit/tooltip": "^18.5.0",
|
|
46
|
+
"@babel/runtime": "^7.0.0",
|
|
47
|
+
"@emotion/react": "^11.7.1",
|
|
48
|
+
"react-transition-group": "^4.4.1"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"react": "^16.8.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@testing-library/react": "^12.1.5",
|
|
55
|
+
"@types/react-transition-group": "^2.0.6",
|
|
56
|
+
"typescript": "~5.4.2"
|
|
57
|
+
},
|
|
58
|
+
"keywords": [
|
|
59
|
+
"atlaskit",
|
|
60
|
+
"react",
|
|
61
|
+
"ui"
|
|
62
|
+
],
|
|
63
|
+
"techstack": {
|
|
64
|
+
"@atlassian/frontend": {
|
|
65
|
+
"import-structure": "atlassian-conventions"
|
|
66
|
+
},
|
|
67
|
+
"@repo/internal": {
|
|
68
|
+
"design-tokens": [
|
|
69
|
+
"color",
|
|
70
|
+
"spacing"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/contextual-survey"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -21,56 +22,56 @@ import { ReactNode } from 'react';
|
|
|
21
22
|
|
|
22
23
|
// @public (undocumented)
|
|
23
24
|
export const ContextualSurvey: ({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
question,
|
|
26
|
+
statement,
|
|
27
|
+
onDismiss,
|
|
28
|
+
onSubmit,
|
|
29
|
+
onMailingListAnswer,
|
|
30
|
+
getUserHasAnsweredMailingList,
|
|
31
|
+
textLabel,
|
|
32
|
+
textPlaceholder,
|
|
32
33
|
}: Props) => JSX.Element;
|
|
33
34
|
|
|
34
35
|
// @public (undocumented)
|
|
35
36
|
export enum DismissTrigger {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
// (undocumented)
|
|
38
|
+
AutoDismiss = 'AUTO_DISMISS',
|
|
39
|
+
// (undocumented)
|
|
40
|
+
Finished = 'FINISHED',
|
|
41
|
+
// (undocumented)
|
|
42
|
+
Manual = 'MANUAL',
|
|
43
|
+
// (undocumented)
|
|
44
|
+
Unmount = 'UNMOUNT',
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
// @public (undocumented)
|
|
47
48
|
type FormValues = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
feedbackScore: number;
|
|
50
|
+
canContact: boolean;
|
|
51
|
+
writtenFeedback: string;
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
// @public (undocumented)
|
|
54
55
|
export type OnDismissArgs = {
|
|
55
|
-
|
|
56
|
+
trigger: DismissTrigger;
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
// @public (undocumented)
|
|
59
60
|
interface Props {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
getUserHasAnsweredMailingList: () => Promise<boolean>;
|
|
62
|
+
onDismiss: (args: OnDismissArgs) => void;
|
|
63
|
+
onMailingListAnswer: (answer: boolean) => Promise<void>;
|
|
64
|
+
onSubmit: (formValues: FormValues) => Promise<void>;
|
|
65
|
+
question: string;
|
|
66
|
+
statement?: string;
|
|
67
|
+
textLabel?: string;
|
|
68
|
+
textPlaceholder?: string;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
// @public (undocumented)
|
|
71
72
|
type Props_2 = {
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
shouldShow: boolean;
|
|
74
|
+
children: () => ReactNode;
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
// @public (undocumented)
|
|
@@ -87,7 +88,7 @@ export function SurveyMarshal(props: Props_2): JSX.Element;
|
|
|
87
88
|
|
|
88
89
|
```json
|
|
89
90
|
{
|
|
90
|
-
|
|
91
|
+
"react": "^16.8.0"
|
|
91
92
|
}
|
|
92
93
|
```
|
|
93
94
|
|