@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.
Files changed (37) hide show
  1. package/CHANGELOG.md +157 -55
  2. package/afm-jira/tsconfig.json +45 -0
  3. package/dist/cjs/components/FeedbackAcknowledgement.js +2 -0
  4. package/dist/cjs/components/FeedbackScoreButtons.js +42 -6
  5. package/dist/cjs/components/SignUpPrompt.js +6 -1
  6. package/dist/cjs/components/SignUpSuccess.js +2 -0
  7. package/dist/cjs/components/SuccessContainer.js +11 -4
  8. package/dist/cjs/components/SurveyContainer.js +17 -4
  9. package/dist/cjs/components/SurveyForm.js +4 -0
  10. package/dist/cjs/components/SurveyMarshal.js +7 -0
  11. package/dist/es2019/components/FeedbackAcknowledgement.js +2 -0
  12. package/dist/es2019/components/FeedbackScoreButtons.js +41 -36
  13. package/dist/es2019/components/SignUpPrompt.js +6 -1
  14. package/dist/es2019/components/SignUpSuccess.js +2 -0
  15. package/dist/es2019/components/SuccessContainer.js +11 -8
  16. package/dist/es2019/components/SurveyContainer.js +17 -12
  17. package/dist/es2019/components/SurveyForm.js +4 -0
  18. package/dist/es2019/components/SurveyMarshal.js +6 -0
  19. package/dist/esm/components/FeedbackAcknowledgement.js +2 -0
  20. package/dist/esm/components/FeedbackScoreButtons.js +41 -6
  21. package/dist/esm/components/SignUpPrompt.js +6 -1
  22. package/dist/esm/components/SignUpSuccess.js +2 -0
  23. package/dist/esm/components/SuccessContainer.js +11 -4
  24. package/dist/esm/components/SurveyContainer.js +17 -4
  25. package/dist/esm/components/SurveyForm.js +4 -0
  26. package/dist/esm/components/SurveyMarshal.js +6 -0
  27. package/dist/types/components/ContextualSurvey.d.ts +1 -1
  28. package/dist/types/components/SurveyForm.d.ts +3 -3
  29. package/dist/types/components/SurveyMarshal.d.ts +1 -1
  30. package/dist/types/index.d.ts +1 -1
  31. package/dist/types-ts4.5/components/ContextualSurvey.d.ts +1 -1
  32. package/dist/types-ts4.5/components/SurveyForm.d.ts +3 -3
  33. package/dist/types-ts4.5/components/SurveyMarshal.d.ts +1 -1
  34. package/dist/types-ts4.5/index.d.ts +1 -1
  35. package/docs/0-intro.tsx +33 -31
  36. package/package.json +73 -75
  37. 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, }: Props) => jsx.JSX.Element;
11
+ declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit }: Props) => jsx.JSX.Element;
12
12
  export default _default;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  type Props = {
5
5
  /** Whether the form should be rendered */
@@ -1,3 +1,3 @@
1
- export { default as ContextualSurvey, DismissTrigger, } from './components/ContextualSurvey';
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,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FormValues } from '../types';
2
+ import { type FormValues } from '../types';
3
3
  export declare enum DismissTrigger {
4
4
  AutoDismiss = "AUTO_DISMISS",
5
5
  Manual = "MANUAL",
@@ -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, }: Props) => jsx.JSX.Element;
11
+ declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit }: Props) => jsx.JSX.Element;
12
12
  export default _default;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  type Props = {
5
5
  /** Whether the form should be rendered */
@@ -1,3 +1,3 @@
1
- export { default as ContextualSurvey, DismissTrigger, } from './components/ContextualSurvey';
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
- AtlassianInternalWarning,
5
- code,
6
- DevPreviewWarning,
7
- Example,
8
- md,
9
- Props,
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
- <div style={{ marginBottom: token('space.100', '0.5rem') }}>
19
- <AtlassianInternalWarning />
20
- </div>
21
- <div style={{ marginTop: token('space.100', '0.5rem') }}>
22
- <DevPreviewWarning />
23
- </div>
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
- <Example
96
- packageName="@atlaskit/contextual-survey"
97
- Component={() => <BasicExample height="500px" />}
98
- title="Basic example"
99
- source={require('!!raw-loader!../examples/00-usage')}
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
- <Props
105
- heading="Contextual Survey Props"
106
- props={require('!!extract-react-types-loader!../src/components/ContextualSurvey')}
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
- <Props
112
- heading="Survey Marshal Props"
113
- props={require('!!extract-react-types-loader!../src/components/SurveyMarshal')}
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
- "name": "@atlaskit/contextual-survey",
3
- "version": "2.2.15",
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": "^17.8.0",
39
- "@atlaskit/checkbox": "^13.1.0",
40
- "@atlaskit/form": "^9.1.0",
41
- "@atlaskit/icon": "^22.1.0",
42
- "@atlaskit/textarea": "^5.2.0",
43
- "@atlaskit/theme": "^12.7.0",
44
- "@atlaskit/tokens": "^1.42.0",
45
- "@atlaskit/tooltip": "^18.1.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
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
55
- "@testing-library/react": "^12.1.5",
56
- "@types/react-transition-group": "^2.0.6",
57
- "typescript": "~5.4.2"
58
- },
59
- "keywords": [
60
- "atlaskit",
61
- "react",
62
- "ui"
63
- ],
64
- "techstack": {
65
- "@atlassian/frontend": {
66
- "import-structure": "atlassian-conventions"
67
- },
68
- "@repo/internal": {
69
- "design-tokens": [
70
- "color",
71
- "spacing"
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 [API Extractor](https://api-extractor.com/).
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
- question,
25
- statement,
26
- onDismiss,
27
- onSubmit,
28
- onMailingListAnswer,
29
- getUserHasAnsweredMailingList,
30
- textLabel,
31
- textPlaceholder,
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
- // (undocumented)
37
- AutoDismiss = 'AUTO_DISMISS',
38
- // (undocumented)
39
- Finished = 'FINISHED',
40
- // (undocumented)
41
- Manual = 'MANUAL',
42
- // (undocumented)
43
- Unmount = 'UNMOUNT',
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
- feedbackScore: number;
49
- canContact: boolean;
50
- writtenFeedback: string;
49
+ feedbackScore: number;
50
+ canContact: boolean;
51
+ writtenFeedback: string;
51
52
  };
52
53
 
53
54
  // @public (undocumented)
54
55
  export type OnDismissArgs = {
55
- trigger: DismissTrigger;
56
+ trigger: DismissTrigger;
56
57
  };
57
58
 
58
59
  // @public (undocumented)
59
60
  interface Props {
60
- getUserHasAnsweredMailingList: () => Promise<boolean>;
61
- onDismiss: (args: OnDismissArgs) => void;
62
- onMailingListAnswer: (answer: boolean) => Promise<void>;
63
- onSubmit: (formValues: FormValues) => Promise<void>;
64
- question: string;
65
- statement?: string;
66
- textLabel?: string;
67
- textPlaceholder?: string;
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
- shouldShow: boolean;
73
- children: () => ReactNode;
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
- "react": "^16.8.0"
91
+ "react": "^16.8.0"
91
92
  }
92
93
  ```
93
94