@atlaskit/contextual-survey 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/constants/package.json +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/ContextualSurvey.d.ts +1 -1
- package/dist/types/components/SurveyMarshal.d.ts +1 -1
- package/dist/types/components/useEscapeToDismiss.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/components/ContextualSurvey.d.ts +40 -0
- package/dist/types-ts4.5/components/FeedbackAcknowledgement.d.ts +3 -0
- package/dist/types-ts4.5/components/FeedbackScoreButtons.d.ts +7 -0
- package/dist/types-ts4.5/components/SignUpPrompt.d.ts +6 -0
- package/dist/types-ts4.5/components/SignUpSuccess.d.ts +5 -0
- package/dist/types-ts4.5/components/SuccessContainer.d.ts +6 -0
- package/dist/types-ts4.5/components/SurveyContainer.d.ts +7 -0
- package/dist/types-ts4.5/components/SurveyForm.d.ts +12 -0
- package/dist/types-ts4.5/components/SurveyMarshal.d.ts +13 -0
- package/dist/types-ts4.5/components/useEscapeToDismiss.d.ts +6 -0
- package/dist/types-ts4.5/constants.d.ts +2 -0
- package/dist/types-ts4.5/index.d.ts +3 -0
- package/dist/types-ts4.5/types.d.ts +5 -0
- package/package.json +13 -5
- package/tmp/api-report-tmp.d.ts +61 -0
- package/types/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/contextual-survey
|
|
2
2
|
|
|
3
|
+
## 2.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
8
|
+
|
|
9
|
+
## 2.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
14
|
+
|
|
3
15
|
## 2.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/constants/package.json
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormValues } from '../types';
|
|
3
|
+
export declare enum DismissTrigger {
|
|
4
|
+
AutoDismiss = "AUTO_DISMISS",
|
|
5
|
+
Manual = "MANUAL",
|
|
6
|
+
Finished = "FINISHED",
|
|
7
|
+
Unmount = "UNMOUNT"
|
|
8
|
+
}
|
|
9
|
+
export type OnDismissArgs = {
|
|
10
|
+
trigger: DismissTrigger;
|
|
11
|
+
};
|
|
12
|
+
interface Props {
|
|
13
|
+
/** Optional statement, to be used in conjunction with the question for the survey
|
|
14
|
+
* Example: "How strongly do you agree or disagree with this statement"
|
|
15
|
+
*/
|
|
16
|
+
statement?: string;
|
|
17
|
+
/** Question used for the survey
|
|
18
|
+
* Example: "It is easy to find what I am looking for in Jira"
|
|
19
|
+
*/
|
|
20
|
+
question: string;
|
|
21
|
+
/** Accessible label text for the survey text area */
|
|
22
|
+
textLabel?: string;
|
|
23
|
+
/** Text placeholder for the survey text area
|
|
24
|
+
* Example: "Tell us why"
|
|
25
|
+
*/
|
|
26
|
+
textPlaceholder?: string;
|
|
27
|
+
/** Callback that is triggered when the survey should be dismissed */
|
|
28
|
+
onDismiss: (args: OnDismissArgs) => void;
|
|
29
|
+
/** Gets whether user has already signed up to the Atlassian Research Group list.
|
|
30
|
+
* If `true` is returned then the user will not be prompted to sign up to the Research Group.
|
|
31
|
+
*/
|
|
32
|
+
getUserHasAnsweredMailingList: () => Promise<boolean>;
|
|
33
|
+
/** Callback that is triggered when the survey is submitted, it will get the survey data as a parameter */
|
|
34
|
+
onSubmit: (formValues: FormValues) => Promise<void>;
|
|
35
|
+
/** Callback that is triggered when the user clicks 'Yes' or 'No' to sign up to the Atlassian Research Group */
|
|
36
|
+
onMailingListAnswer: (answer: boolean) => Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export declare const AUTO_DISAPPEAR_DURATION: number;
|
|
39
|
+
declare const _default: ({ question, statement, onDismiss, onSubmit, onMailingListAnswer, getUserHasAnsweredMailingList, textLabel, textPlaceholder, }: Props) => JSX.Element;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OnSubmitHandler } from '@atlaskit/form';
|
|
3
|
+
import { FormValues } from '../types';
|
|
4
|
+
interface Props {
|
|
5
|
+
question: string;
|
|
6
|
+
statement?: string;
|
|
7
|
+
textPlaceholder: string;
|
|
8
|
+
textLabel: string;
|
|
9
|
+
onSubmit: OnSubmitHandler<FormValues>;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => JSX.Element;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
/** Whether the form should be rendered */
|
|
5
|
+
shouldShow: boolean;
|
|
6
|
+
/** A function that returns Node to be rendered (`<ContextualSurvey/>`)
|
|
7
|
+
* Using a function as child so that the child node does
|
|
8
|
+
* not need to be evaluated if it is not mounted
|
|
9
|
+
*/
|
|
10
|
+
children: () => ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export default function SurveyMarshal(props: Props): JSX.Element;
|
|
13
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/contextual-survey",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "A React component used to ask the user for feedback",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
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
|
+
},
|
|
15
23
|
"sideEffects": false,
|
|
16
24
|
"atlaskit:src": "src/index.ts",
|
|
17
25
|
"atlassian": {
|
|
@@ -24,12 +32,12 @@
|
|
|
24
32
|
},
|
|
25
33
|
"dependencies": {
|
|
26
34
|
"@atlaskit/button": "^16.7.0",
|
|
27
|
-
"@atlaskit/checkbox": "^12.
|
|
35
|
+
"@atlaskit/checkbox": "^12.6.0",
|
|
28
36
|
"@atlaskit/form": "^8.11.0",
|
|
29
37
|
"@atlaskit/icon": "^21.12.0",
|
|
30
38
|
"@atlaskit/textarea": "^4.6.0",
|
|
31
39
|
"@atlaskit/theme": "^12.5.0",
|
|
32
|
-
"@atlaskit/tokens": "^1.
|
|
40
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
33
41
|
"@atlaskit/tooltip": "^17.8.0",
|
|
34
42
|
"@babel/runtime": "^7.0.0",
|
|
35
43
|
"@emotion/core": "^10.0.9",
|
|
@@ -39,11 +47,11 @@
|
|
|
39
47
|
"react": "^16.8.0"
|
|
40
48
|
},
|
|
41
49
|
"devDependencies": {
|
|
42
|
-
"@atlaskit/checkbox": "^12.
|
|
50
|
+
"@atlaskit/checkbox": "^12.6.0",
|
|
43
51
|
"@atlaskit/docs": "*",
|
|
44
52
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
45
53
|
"@testing-library/react": "^12.1.5",
|
|
46
|
-
"typescript": "4.
|
|
54
|
+
"typescript": "~4.9.5"
|
|
47
55
|
},
|
|
48
56
|
"keywords": [
|
|
49
57
|
"atlaskit",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/contextual-survey"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import { ReactNode } from 'react';
|
|
10
|
+
|
|
11
|
+
// @public (undocumented)
|
|
12
|
+
export const ContextualSurvey: ({ question, statement, onDismiss, onSubmit, onMailingListAnswer, getUserHasAnsweredMailingList, textLabel, textPlaceholder, }: Props) => JSX.Element;
|
|
13
|
+
|
|
14
|
+
// @public (undocumented)
|
|
15
|
+
export enum DismissTrigger {
|
|
16
|
+
// (undocumented)
|
|
17
|
+
AutoDismiss = "AUTO_DISMISS",
|
|
18
|
+
// (undocumented)
|
|
19
|
+
Finished = "FINISHED",
|
|
20
|
+
// (undocumented)
|
|
21
|
+
Manual = "MANUAL",
|
|
22
|
+
// (undocumented)
|
|
23
|
+
Unmount = "UNMOUNT"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
type FormValues = {
|
|
28
|
+
feedbackScore: number;
|
|
29
|
+
canContact: boolean;
|
|
30
|
+
writtenFeedback: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
export type OnDismissArgs = {
|
|
35
|
+
trigger: DismissTrigger;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// @public (undocumented)
|
|
39
|
+
interface Props {
|
|
40
|
+
getUserHasAnsweredMailingList: () => Promise<boolean>;
|
|
41
|
+
onDismiss: (args: OnDismissArgs) => void;
|
|
42
|
+
onMailingListAnswer: (answer: boolean) => Promise<void>;
|
|
43
|
+
onSubmit: (formValues: FormValues) => Promise<void>;
|
|
44
|
+
question: string;
|
|
45
|
+
statement?: string;
|
|
46
|
+
textLabel?: string;
|
|
47
|
+
textPlaceholder?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
type Props_2 = {
|
|
52
|
+
shouldShow: boolean;
|
|
53
|
+
children: () => ReactNode;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// @public (undocumented)
|
|
57
|
+
export function SurveyMarshal(props: Props_2): JSX.Element;
|
|
58
|
+
|
|
59
|
+
// (No @packageDocumentation comment for this package)
|
|
60
|
+
|
|
61
|
+
```
|