@campxdev/react-blueprint 1.0.6 → 1.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "main": "./export.ts",
5
5
  "private": false,
6
6
  "dependencies": {
package/public/index.html CHANGED
@@ -1,4 +1,4 @@
1
- <!doctype html>
1
+ <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
@@ -50,5 +50,29 @@
50
50
  To begin the development, run `npm start` or `yarn start`.
51
51
  To create a production bundle, use `npm run build` or `yarn build`.
52
52
  -->
53
+
54
+ <script
55
+ type="text/javascript"
56
+ src="https://campx.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/278rlr/b/9/c95134bc67d3a521bb3f4331beb9b804/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-GB&collectorId=82a807ed"
57
+ ></script>
58
+
59
+ <script type="text/javascript">
60
+ console.log(window, "window");
61
+ $(document).ready(function () {
62
+ window.ATL_JQ_PAGE_PROPS = {
63
+ triggerFunction: function (showCollectorDialog) {
64
+ var intId = setInterval(function () {
65
+ if ($("#jiraIssueCollector").length > 0) {
66
+ jQuery("#jiraIssueCollector").click(function (e) {
67
+ e.preventDefault();
68
+ showCollectorDialog();
69
+ });
70
+ clearInterval(intId);
71
+ }
72
+ }, 500);
73
+ },
74
+ };
75
+ });
76
+ </script>
53
77
  </body>
54
78
  </html>
@@ -8,6 +8,7 @@ export interface TutorialProps {
8
8
  steps: Step[];
9
9
  children?: ReactNode;
10
10
  tourName: string;
11
+ showProgress?: boolean;
11
12
  iconPosition?: "left" | "right";
12
13
  }
13
14
 
@@ -16,6 +17,7 @@ export const Tutorial = ({
16
17
  children,
17
18
  tourName,
18
19
  iconPosition = "right",
20
+ showProgress = true,
19
21
  }: TutorialProps) => {
20
22
  const [run, setRun] = useState(false);
21
23
  const userTours = localStorage.getItem("userTours") || "[]";
@@ -33,7 +35,7 @@ export const Tutorial = ({
33
35
 
34
36
  const handleJoyrideCallback = (data: CallBackProps) => {
35
37
  console.log(data);
36
- const { action, status, lifecycle, type } = data;
38
+ const { action, status, lifecycle, type, size } = data;
37
39
  const reqData = {
38
40
  tourName: tourName,
39
41
  skipped: false,
@@ -46,11 +48,15 @@ export const Tutorial = ({
46
48
  lifecycle === "complete" &&
47
49
  type === "tour:end"
48
50
  ) {
51
+ console.log("Tour is skipped");
49
52
  reqData.skipped = true;
53
+ } else if (action === ACTIONS.CLOSE) {
54
+ setRun(false);
50
55
  } else if (action === ACTIONS.RESET) {
56
+ console.log("Tour is reset");
51
57
  reqData.completed = true;
52
58
  }
53
-
59
+ console.log(reqData);
54
60
  if (reqData.skipped || reqData.completed) {
55
61
  setRun(false); // Stop the tour
56
62
  completeTour(reqData).catch((err) => {
@@ -97,10 +103,10 @@ export const Tutorial = ({
97
103
  continuous
98
104
  run={run}
99
105
  showSkipButton
100
- showProgress
106
+ showProgress={showProgress}
101
107
  spotlightPadding={5}
102
108
  locale={{
103
- last: "Finish",
109
+ last: "Got it",
104
110
  next: "Next",
105
111
  skip: "Skip",
106
112
  back: "Previous",
@@ -45,8 +45,19 @@ export const AppHeader = ({
45
45
  <HelpIcon size={20} />
46
46
  </a>
47
47
  </StyledIconButton> */}
48
- <Button variant="outlined" id="jiraIssueCollector">
49
- <Typography variant="button">Report an Issue</Typography>
48
+ <Button
49
+ variant="outlined"
50
+ id="jiraIssueCollector"
51
+ className="reportAnIssue"
52
+ >
53
+ <Typography
54
+ variant="button"
55
+ sx={{
56
+ fontWeight: "bold",
57
+ }}
58
+ >
59
+ Report an Issue
60
+ </Typography>
50
61
  </Button>
51
62
  <UserBox
52
63
  fullName={userFullName}
@@ -42,15 +42,17 @@ export const PrimaryTutorial: StoryObj<typeof Tutorial> = {
42
42
  ),
43
43
  args: {
44
44
  tourName: "Active Batches",
45
+ showProgress: false,
45
46
  steps: [
46
47
  {
47
48
  target: ".tutorial-target",
48
49
  content: "This is my first step",
50
+ disableBeacon: true,
49
51
  },
50
- {
51
- target: ".next-target",
52
- content: "This is the next step",
53
- },
52
+ // {
53
+ // target: ".next-target",
54
+ // content: "This is the next step",
55
+ // },
54
56
  ],
55
57
  },
56
58
  };