@atlaskit/contextual-survey 2.1.5 → 2.1.7

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/contextual-survey
2
2
 
3
+ ## 2.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.1.6
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 2.1.5
4
16
 
5
17
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "A React component used to ask the user for feedback",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,13 +12,6 @@
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.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*"
19
- ]
20
- }
21
- },
22
15
  "sideEffects": false,
23
16
  "atlaskit:src": "src/index.ts",
24
17
  "atlassian": {
@@ -30,14 +23,14 @@
30
23
  }
31
24
  },
32
25
  "dependencies": {
33
- "@atlaskit/button": "^16.3.0",
34
- "@atlaskit/checkbox": "^12.1.0",
35
- "@atlaskit/form": "^8.5.0",
36
- "@atlaskit/icon": "^21.10.0",
37
- "@atlaskit/textarea": "^4.3.0",
26
+ "@atlaskit/button": "^16.5.0",
27
+ "@atlaskit/checkbox": "^12.4.0",
28
+ "@atlaskit/form": "^8.8.0",
29
+ "@atlaskit/icon": "^21.11.0",
30
+ "@atlaskit/textarea": "^4.5.0",
38
31
  "@atlaskit/theme": "^12.2.0",
39
- "@atlaskit/tokens": "^0.10.0",
40
- "@atlaskit/tooltip": "^17.5.0",
32
+ "@atlaskit/tokens": "^0.12.0",
33
+ "@atlaskit/tooltip": "^17.6.0",
41
34
  "@babel/runtime": "^7.0.0",
42
35
  "@emotion/core": "^10.0.9",
43
36
  "react-transition-group": "^4.4.1"
@@ -46,7 +39,7 @@
46
39
  "react": "^16.8.0"
47
40
  },
48
41
  "devDependencies": {
49
- "@atlaskit/checkbox": "^12.1.0",
42
+ "@atlaskit/checkbox": "^12.4.0",
50
43
  "@atlaskit/docs": "*",
51
44
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
52
45
  "@testing-library/react": "^12.1.5",
package/report.api.md CHANGED
@@ -1,12 +1,18 @@
1
+ <!-- API Report Version: 2.3 -->
2
+
1
3
  ## API Report File for "@atlaskit/contextual-survey"
2
4
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
4
12
 
5
- <!--
6
- Generated API Report version: 2.0
7
- -->
13
+ ### Main Entry Types
8
14
 
9
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
15
+ <!--SECTION START: Main Entry Types-->
10
16
 
11
17
  ```ts
12
18
  /// <reference types="react" />
@@ -72,3 +78,17 @@ export function SurveyMarshal(props: Props_2): JSX.Element;
72
78
 
73
79
  // (No @packageDocumentation comment for this package)
74
80
  ```
81
+
82
+ <!--SECTION END: Main Entry Types-->
83
+
84
+ ### Peer Dependencies
85
+
86
+ <!--SECTION START: Peer Dependencies-->
87
+
88
+ ```json
89
+ {
90
+ "react": "^16.8.0"
91
+ }
92
+ ```
93
+
94
+ <!--SECTION END: Peer Dependencies-->
@@ -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
+ ```
@@ -1,40 +0,0 @@
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 declare 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;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: () => JSX.Element;
3
- export default _default;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- interface Props {
3
- onChange: (value: number) => void;
4
- value: number | undefined;
5
- }
6
- declare const _default: ({ onChange, value }: Props) => JSX.Element;
7
- export default _default;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface Props {
3
- onAnswer: (answer: boolean) => Promise<void>;
4
- }
5
- declare const _default: ({ onAnswer }: Props) => JSX.Element;
6
- export default _default;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- interface Props {
3
- }
4
- declare const _default: ({}: Props) => JSX.Element;
5
- export default _default;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface Props {
3
- children: React.ReactNode;
4
- }
5
- declare const _default: ({ children }: Props) => JSX.Element;
6
- export default _default;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- interface Props {
3
- children: React.ReactNode;
4
- onDismiss: () => void;
5
- }
6
- declare const _default: ({ children, onDismiss }: Props) => JSX.Element;
7
- export default _default;
@@ -1,12 +0,0 @@
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;
@@ -1,13 +0,0 @@
1
- /** @jsx jsx */
2
- import { ReactNode } from 'react';
3
- declare 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 {};
@@ -1,6 +0,0 @@
1
- export declare const escape: number;
2
- declare type Args = {
3
- onDismiss: () => void;
4
- };
5
- export default function useEscapeToDismiss({ onDismiss }: Args): void;
6
- export {};
@@ -1,2 +0,0 @@
1
- export declare const surveyInnerWidth: number;
2
- export declare const surveyOffset: number;
@@ -1,3 +0,0 @@
1
- export { default as ContextualSurvey, DismissTrigger, } from './components/ContextualSurvey';
2
- export type { OnDismissArgs } from './components/ContextualSurvey';
3
- export { default as SurveyMarshal } from './components/SurveyMarshal';
@@ -1,5 +0,0 @@
1
- export declare type FormValues = {
2
- feedbackScore: number;
3
- canContact: boolean;
4
- writtenFeedback: string;
5
- };