@atlaskit/contextual-survey 2.1.3 → 2.1.4

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,11 @@
1
1
  # @atlaskit/contextual-survey
2
2
 
3
+ ## 2.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
8
+
3
9
  ## 2.1.3
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import React, { useCallback, useEffect, useRef, useState } from 'react';
5
5
  import FeedbackAcknowledgement from './FeedbackAcknowledgement';
6
6
  import SignUpPrompt from './SignUpPrompt';
@@ -1,10 +1,11 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
4
 
6
5
  var _templateObject, _templateObject2;
7
6
 
7
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
8
+
8
9
  /** @jsx jsx */
9
10
  import { useCallback, useState } from 'react';
10
11
  import { css, jsx } from '@emotion/core';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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.3",
3
+ "version": "2.1.4",
4
4
  "description": "A React component used to ask the user for feedback",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/docs": "*",
44
44
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
45
45
  "@testing-library/react": "^8.0.1",
46
- "typescript": "4.2.4"
46
+ "typescript": "4.3.5"
47
47
  },
48
48
  "keywords": [
49
49
  "atlaskit",
package/report.api.md ADDED
@@ -0,0 +1,80 @@
1
+ ## API Report File for "@atlaskit/contextual-survey".
2
+
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
+
7
+ ```ts
8
+ /// <reference types="react" />
9
+
10
+ import { ReactNode } from 'react';
11
+
12
+ export declare const ContextualSurvey: ({
13
+ question,
14
+ statement,
15
+ onDismiss,
16
+ onSubmit,
17
+ onMailingListAnswer,
18
+ getUserHasAnsweredMailingList,
19
+ textLabel,
20
+ textPlaceholder,
21
+ }: Props) => JSX.Element;
22
+
23
+ export declare enum DismissTrigger {
24
+ AutoDismiss = 'AUTO_DISMISS',
25
+ Manual = 'MANUAL',
26
+ Finished = 'FINISHED',
27
+ Unmount = 'UNMOUNT',
28
+ }
29
+
30
+ declare type FormValues = {
31
+ feedbackScore: number;
32
+ canContact: boolean;
33
+ writtenFeedback: string;
34
+ };
35
+
36
+ export declare type OnDismissArgs = {
37
+ trigger: DismissTrigger;
38
+ };
39
+
40
+ declare interface Props {
41
+ /** Optional statement, to be used in conjunction with the question for the survey
42
+ * Example: "How strongly do you agree or disagree with this statement"
43
+ */
44
+ statement?: string;
45
+ /** Question used for the survey
46
+ * Example: "It is easy to find what I am looking for in Jira"
47
+ */
48
+ question: string;
49
+ /** Accessible label text for the survey text area */
50
+ textLabel?: string;
51
+ /** Text placeholder for the survey text area
52
+ * Example: "Tell us why"
53
+ */
54
+ textPlaceholder?: string;
55
+ /** Callback that is triggered when the survey should be dismissed */
56
+ onDismiss: (args: OnDismissArgs) => void;
57
+ /** Gets whether user has already signed up to the Atlassian Research Group list.
58
+ * If `true` is returned then the user will not be prompted to sign up to the Research Group.
59
+ */
60
+ getUserHasAnsweredMailingList: () => Promise<boolean>;
61
+ /** Callback that is triggered when the survey is submitted, it will get the survey data as a parameter */
62
+ onSubmit: (formValues: FormValues) => Promise<void>;
63
+ /** Callback that is triggered when the user clicks 'Yes' or 'No' to sign up to the Atlassian Research Group */
64
+ onMailingListAnswer: (answer: boolean) => Promise<void>;
65
+ }
66
+
67
+ declare type Props_2 = {
68
+ /** Whether the form should be rendered */
69
+ shouldShow: boolean;
70
+ /** A function that returns Node to be rendered (`<ContextualSurvey/>`)
71
+ * Using a function as child so that the child node does
72
+ * not need to be evaluated if it is not mounted
73
+ */
74
+ children: () => ReactNode;
75
+ };
76
+
77
+ export declare function SurveyMarshal(props: Props_2): JSX.Element;
78
+
79
+ export {};
80
+ ```