@openmrs/esm-user-onboarding-app 4.0.1-pre.88 → 4.0.1-pre.96

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 (156) hide show
  1. package/.tx/config +11 -0
  2. package/dist/1119.js +1 -0
  3. package/dist/1197.js +1 -0
  4. package/dist/2146.js +1 -0
  5. package/dist/2690.js +1 -0
  6. package/dist/282.js +2 -0
  7. package/dist/282.js.LICENSE.txt +32 -0
  8. package/dist/282.js.map +1 -0
  9. package/dist/3099.js +1 -0
  10. package/dist/3184.js +2 -0
  11. package/dist/3184.js.LICENSE.txt +14 -0
  12. package/dist/3184.js.map +1 -0
  13. package/dist/3584.js +1 -0
  14. package/dist/4055.js +1 -0
  15. package/dist/4132.js +1 -0
  16. package/dist/4300.js +1 -0
  17. package/dist/4335.js +1 -0
  18. package/dist/4353.js +1 -0
  19. package/dist/4353.js.map +1 -0
  20. package/dist/4618.js +1 -0
  21. package/dist/4652.js +1 -0
  22. package/dist/4944.js +1 -0
  23. package/dist/5059.js +1 -0
  24. package/dist/5059.js.map +1 -0
  25. package/dist/5173.js +1 -0
  26. package/dist/5241.js +1 -0
  27. package/dist/5324.js +2 -0
  28. package/dist/5324.js.LICENSE.txt +24 -0
  29. package/dist/5324.js.map +1 -0
  30. package/dist/5442.js +1 -0
  31. package/dist/553.js +2 -0
  32. package/dist/{534.js.LICENSE.txt → 553.js.LICENSE.txt} +7 -13
  33. package/dist/553.js.map +1 -0
  34. package/dist/5661.js +1 -0
  35. package/dist/6022.js +1 -0
  36. package/dist/6399.js +1 -0
  37. package/dist/6399.js.map +1 -0
  38. package/dist/6468.js +1 -0
  39. package/dist/6540.js +2 -0
  40. package/dist/6540.js.map +1 -0
  41. package/dist/6679.js +1 -0
  42. package/dist/6840.js +1 -0
  43. package/dist/6859.js +1 -0
  44. package/dist/6920.js +1 -0
  45. package/dist/6920.js.map +1 -0
  46. package/dist/7097.js +1 -0
  47. package/dist/7159.js +1 -0
  48. package/dist/723.js +1 -0
  49. package/dist/7617.js +1 -0
  50. package/dist/795.js +1 -0
  51. package/dist/8163.js +1 -0
  52. package/dist/8349.js +1 -0
  53. package/dist/844.js +1 -0
  54. package/dist/844.js.map +1 -0
  55. package/dist/8618.js +1 -0
  56. package/dist/8690.js +1 -0
  57. package/dist/8690.js.map +1 -0
  58. package/dist/890.js +1 -0
  59. package/dist/9214.js +1 -0
  60. package/dist/9538.js +1 -0
  61. package/dist/9569.js +1 -0
  62. package/dist/961.js +2 -0
  63. package/dist/961.js.LICENSE.txt +19 -0
  64. package/dist/961.js.map +1 -0
  65. package/dist/986.js +1 -0
  66. package/dist/9879.js +1 -0
  67. package/dist/9895.js +1 -0
  68. package/dist/9900.js +1 -0
  69. package/dist/9913.js +1 -0
  70. package/dist/main.js +1 -1
  71. package/dist/main.js.map +1 -1
  72. package/dist/openmrs-esm-user-onboarding-app.js +1 -1
  73. package/dist/openmrs-esm-user-onboarding-app.js.buildmanifest.json +982 -110
  74. package/dist/openmrs-esm-user-onboarding-app.js.map +1 -1
  75. package/dist/routes.json +1 -1
  76. package/e2e/README.md +9 -7
  77. package/e2e/core/test.ts +1 -1
  78. package/e2e/fixtures/api.ts +1 -1
  79. package/e2e/pages/home-page.ts +2 -2
  80. package/e2e/specs/onboarding-test.spec.ts +9 -28
  81. package/jest.config.js +2 -2
  82. package/package.json +8 -7
  83. package/src/config-schema.ts +251 -127
  84. package/src/declarations.d.ts +2 -0
  85. package/src/root.component.tsx +26 -17
  86. package/src/tooltip/tooltip.component.tsx +35 -30
  87. package/src/tooltip/tooltip.scss +52 -23
  88. package/src/tutorial/modal.component.tsx +11 -6
  89. package/src/tutorial/{modal.component.test.tsx → modal.test.tsx} +10 -8
  90. package/src/tutorial/styles.scss +35 -1
  91. package/src/tutorial/tutorial.tsx +1 -0
  92. package/src/types.ts +2 -2
  93. package/tools/update-openmrs-deps.mjs +43 -0
  94. package/translations/am.json +9 -1
  95. package/translations/ar.json +9 -0
  96. package/translations/ar_SY.json +9 -0
  97. package/translations/bn.json +9 -0
  98. package/translations/de.json +9 -0
  99. package/translations/en_US.json +9 -0
  100. package/translations/es.json +9 -1
  101. package/translations/es_MX.json +9 -0
  102. package/translations/fr.json +9 -1
  103. package/translations/he.json +9 -1
  104. package/translations/hi.json +9 -0
  105. package/translations/hi_IN.json +9 -0
  106. package/translations/id.json +9 -0
  107. package/translations/it.json +9 -0
  108. package/translations/ka.json +9 -0
  109. package/translations/km.json +9 -1
  110. package/translations/ku.json +9 -0
  111. package/translations/ky.json +9 -0
  112. package/translations/lg.json +9 -0
  113. package/translations/ne.json +9 -0
  114. package/translations/pl.json +9 -0
  115. package/translations/pt.json +9 -0
  116. package/translations/pt_BR.json +9 -0
  117. package/translations/qu.json +9 -0
  118. package/translations/ro_RO.json +9 -0
  119. package/translations/ru_RU.json +9 -0
  120. package/translations/si.json +9 -0
  121. package/translations/sw.json +9 -0
  122. package/translations/sw_KE.json +9 -0
  123. package/translations/tr.json +9 -0
  124. package/translations/tr_TR.json +9 -0
  125. package/translations/uk.json +9 -0
  126. package/translations/uz.json +9 -0
  127. package/translations/uz@Latn.json +9 -0
  128. package/translations/uz_UZ.json +9 -0
  129. package/translations/vi.json +9 -0
  130. package/translations/zh.json +9 -0
  131. package/translations/zh_CN.json +9 -0
  132. package/tsconfig.json +2 -1
  133. package/dist/151.js +0 -2
  134. package/dist/151.js.LICENSE.txt +0 -3
  135. package/dist/151.js.map +0 -1
  136. package/dist/197.js +0 -1
  137. package/dist/300.js +0 -1
  138. package/dist/335.js +0 -1
  139. package/dist/422.js +0 -1
  140. package/dist/422.js.map +0 -1
  141. package/dist/438.js +0 -1
  142. package/dist/438.js.map +0 -1
  143. package/dist/534.js +0 -2
  144. package/dist/534.js.map +0 -1
  145. package/dist/540.js +0 -2
  146. package/dist/540.js.map +0 -1
  147. package/dist/55.js +0 -1
  148. package/dist/570.js +0 -1
  149. package/dist/570.js.map +0 -1
  150. package/dist/652.js +0 -1
  151. package/dist/743.js +0 -1
  152. package/dist/743.js.map +0 -1
  153. package/dist/917.js +0 -1
  154. package/dist/917.js.map +0 -1
  155. package/dist/99.js +0 -1
  156. /package/dist/{540.js.LICENSE.txt → 6540.js.LICENSE.txt} +0 -0
@@ -5,16 +5,25 @@ import { type TutorialContext } from './types';
5
5
  import CustomTooltip from './tooltip/tooltip.component';
6
6
 
7
7
  const RootComponent: React.FC = () => {
8
-
9
8
  const [showTutorial, setShowTutorial] = React.useState(false);
10
9
  const [steps, setSteps] = React.useState<Step[]>([]);
11
10
  const [stepIndex, setStepIndex] = React.useState(0);
12
11
 
12
+ // Set steps with default step options
13
+ const updateSteps = (newSteps: Step[]) => {
14
+ setSteps(
15
+ newSteps.map((step) => ({
16
+ ...step,
17
+ disableBeacon: true,
18
+ })),
19
+ );
20
+ };
21
+
13
22
  useDefineAppContext<TutorialContext>('tutorial-context', {
14
23
  showTutorial,
15
24
  steps,
16
25
  setShowTutorial: (showTutorial: boolean) => setShowTutorial(showTutorial),
17
- setSteps: (steps: Step[]) => setSteps(steps)
26
+ setSteps: updateSteps,
18
27
  });
19
28
 
20
29
  const onStepChange = (index: number) => {
@@ -22,7 +31,7 @@ const RootComponent: React.FC = () => {
22
31
  if (step.data && step.data.autoNextOn) {
23
32
  handleAutoNext(step.data.autoNextOn, index);
24
33
  }
25
- }
34
+ };
26
35
 
27
36
  const waitForTarget = (index: number) => {
28
37
  setShowTutorial(false);
@@ -33,7 +42,6 @@ const RootComponent: React.FC = () => {
33
42
  clearTimeout(interval);
34
43
  }
35
44
  }, 1000);
36
-
37
45
  };
38
46
 
39
47
  const handleAutoNext = (query: string, index: number) => {
@@ -44,15 +52,15 @@ const RootComponent: React.FC = () => {
44
52
  clearTimeout(interval);
45
53
  }
46
54
  }, 1000);
47
- }
55
+ };
48
56
 
49
- const currentStep = steps[stepIndex];
50
- const overlayStyles = currentStep?.disableOverlay
51
- ? { backgroundColor: 'transparent' }
52
- : { height: document.body.scrollHeight };
57
+ const currentStep = steps[stepIndex];
58
+ const overlayStyles = currentStep?.disableOverlay
59
+ ? { backgroundColor: 'transparent' }
60
+ : { height: document.body.scrollHeight };
53
61
 
54
62
  const handleJoyrideCallback = (data: CallBackProps) => {
55
- const {action, index, origin, status, type} = data;
63
+ const { action, index, origin, status, type } = data;
56
64
  switch (type) {
57
65
  case EVENTS.TOUR_START:
58
66
  // The target not found event is not triggered when the tour starts
@@ -68,30 +76,31 @@ const overlayStyles = currentStep?.disableOverlay
68
76
  waitForTarget(index);
69
77
  break;
70
78
  case EVENTS.TOUR_END:
71
- setStepIndex(0)
79
+ setStepIndex(0);
72
80
  setShowTutorial(false);
73
81
  break;
74
82
  }
75
- }
83
+ };
76
84
 
77
85
  return (
78
86
  <ReactJoyride
87
+ callback={handleJoyrideCallback}
79
88
  continuous
80
- debug
89
+ debug={false}
90
+ disableOverlayClose={true}
81
91
  disableScrolling
92
+ run={showTutorial}
82
93
  showProgress
83
94
  showSkipButton
84
- steps={steps}
85
95
  stepIndex={stepIndex}
86
- run={showTutorial}
87
- callback={handleJoyrideCallback}
88
- tooltipComponent={(props) => <CustomTooltip {...props} step={steps[props.index]} totalSteps={steps.length} />}
96
+ steps={steps}
89
97
  styles={{
90
98
  options: {
91
99
  zIndex: 10000,
92
100
  },
93
101
  overlay: overlayStyles,
94
102
  }}
103
+ tooltipComponent={(props) => <CustomTooltip {...props} step={steps[props.index]} totalSteps={steps.length} />}
95
104
  />
96
105
  );
97
106
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Button } from '@carbon/react';
3
- import { ArrowLeft, ArrowRight } from '@carbon/react/icons';
3
+ import { ArrowLeft, ArrowRight, Close } from '@carbon/react/icons';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import styles from './tooltip.scss';
6
6
 
@@ -9,7 +9,7 @@ interface CustomTooltipProps {
9
9
  index: number;
10
10
  step: any;
11
11
  backProps: any;
12
- closeProps: any;
12
+ skipProps: any;
13
13
  primaryProps: any;
14
14
  tooltipProps: any;
15
15
  totalSteps: number;
@@ -21,6 +21,7 @@ const CustomTooltip: React.FC<CustomTooltipProps> = ({
21
21
  step,
22
22
  backProps,
23
23
  primaryProps,
24
+ skipProps,
24
25
  tooltipProps,
25
26
  totalSteps,
26
27
  }) => {
@@ -30,36 +31,40 @@ const CustomTooltip: React.FC<CustomTooltipProps> = ({
30
31
  return (
31
32
  <div {...tooltipProps} className={styles.tooltipcontainer}>
32
33
  <div className={styles.tooltipheader}>
33
- <h4 className={styles.tooltiptitle}>{step.title}</h4>
34
- <span className={styles.tooltipstep}>{`${index + 1}/${totalSteps}`}</span>
34
+ <div className={styles.container}>
35
+ <h4 className={styles.tooltiptitle}>{step.title}</h4>
36
+ <div className={styles.tooltipcontent}>{step.content}</div>
37
+ </div>
38
+ <Button {...skipProps} size="sm" kind="ghost" className={styles.closeButton}>
39
+ <Close />
40
+ </Button>
35
41
  </div>
36
- <div className={styles.tooltipcontent}>{step.content}</div>
37
42
  <div className={styles.tooltipfooter}>
38
- {!step.hideBackButton && index > 0 && (
39
- <div {...backProps} size="sm" className={styles.buttonback}>
40
- <ArrowLeft style={{ marginRight: '8px' }} />
41
- {t('back', 'Back')}
42
- </div>
43
- )}
44
- {continuous && !step.hideNextButton && (
45
- <Button {...primaryProps} size="sm" className={styles.buttonnext}>
46
- {isLastStep ? (
47
- <>
48
- {t('finish', 'Finish')}
49
- <div className={styles.arrowContainer}>
50
- <ArrowRight />
51
- </div>
52
- </>
53
- ) : (
54
- <>
55
- {t('next', 'Next')}
56
- <div className={styles.arrowContainer}>
57
- <ArrowRight />
58
- </div>
59
- </>
60
- )}
61
- </Button>
62
- )}
43
+ <span className={styles.tooltipstep}>{`${index + 1} of ${totalSteps}`}</span>
44
+ <div className={styles.buttonContainer}>
45
+ {!step.hideBackButton && index > 0 && (
46
+ <Button {...backProps} size="sm" kind="ghost" className={styles.buttonback}>
47
+ <div className={styles.arrowLeft}>
48
+ <ArrowLeft />
49
+ </div>
50
+ {t('back', 'Back')}
51
+ </Button>
52
+ )}
53
+ {continuous && !step.hideNextButton && (
54
+ <Button {...primaryProps} size="sm" className={styles.buttonnext}>
55
+ {isLastStep ? (
56
+ <>{t('finish', 'Finish')}</>
57
+ ) : (
58
+ <>
59
+ {t('next', 'Next')}
60
+ <div className={styles.arrowContainer}>
61
+ <ArrowRight />
62
+ </div>
63
+ </>
64
+ )}
65
+ </Button>
66
+ )}
67
+ </div>
63
68
  </div>
64
69
  </div>
65
70
  );
@@ -1,6 +1,6 @@
1
1
  @use '@carbon/styles/scss/spacing';
2
2
  @use '@carbon/styles/scss/type';
3
- @import '~@openmrs/esm-styleguide/src/vars';
3
+ @use '@openmrs/esm-styleguide/src/vars' as *;
4
4
 
5
5
  .tooltipcontainer {
6
6
  background-color: $ui-02;
@@ -9,46 +9,75 @@
9
9
  max-width: 360px;
10
10
  border-radius: spacing.$spacing-02;
11
11
  gap: spacing.$spacing-04;
12
- background-color: $ui-02;
13
12
 
14
13
  .tooltipheader {
15
14
  display: flex;
16
15
  justify-content: space-between;
17
16
  align-items: center;
18
17
  margin-bottom: spacing.$spacing-01;
19
- .tooltiptitle {
20
- @include type.type-style('heading-02');
21
- }
22
- .tooltipstep {
23
- color: $color-gray-70;
24
- @include type.type-style('body-compact-01');
25
- }
18
+
19
+ .container {
20
+ display: flex;
21
+ flex-direction: column;
22
+ flex-grow: 1;
23
+ }
24
+
25
+ .tooltiptitle {
26
+ @include type.type-style('heading-02');
27
+ margin-bottom: spacing.$spacing-02;
26
28
  }
27
29
 
28
- .tooltipcontent {
30
+ .closeButton {
31
+ min-height: 16px;
32
+ padding: 0;
33
+ align-self: flex-start;
34
+ }
35
+ }
36
+
37
+ .tooltipcontent {
29
38
  color: $color-gray-70;
30
39
  @include type.type-style('body-compact-01');
31
- }
40
+ width: 100%;
41
+ margin-top: spacing.$spacing-01;
42
+ }
43
+
32
44
 
33
45
  .tooltipfooter {
34
- margin-top: spacing.$spacing-06;
46
+ margin-top: spacing.$spacing-03;
35
47
  display: flex;
36
48
  justify-content: space-between;
37
49
  align-items: center;
38
- .buttonback {
39
- color: $color-blue-60-2;
50
+
51
+ .tooltipstep {
52
+ color: $color-gray-70;
53
+ @include type.type-style('body-compact-01');
54
+ }
55
+
56
+ .buttonContainer {
57
+ display: flex;
58
+ gap: spacing.$spacing-03;
59
+
60
+ .buttonback,
61
+ .buttonnext {
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ padding: spacing.$spacing-02;
66
+ width: spacing.$spacing-12;
67
+
68
+ .arrowLeft,
69
+ .arrowContainer {
40
70
  display: flex;
41
71
  align-items: center;
72
+ justify-content: center;
73
+ margin-left: spacing.$spacing-02;
42
74
  }
43
- .buttonnext {
44
- margin-left: auto;
45
- width:spacing.$spacing-12;
46
- .arrowContainer {
47
- display: flex;
48
- align-items: center;
49
- justify-content: space-between;
50
- margin-left: spacing.$spacing-05;
51
- }
75
+
76
+ .arrowLeft svg {
77
+ fill: $color-blue-60-2 !important;
78
+ margin-right: spacing.$spacing-02;
52
79
  }
53
80
  }
54
81
  }
82
+ }
83
+ }
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
+ import { ArrowRight } from '@carbon/react/icons';
3
+ import { ModalHeader, ModalBody, Link } from '@carbon/react';
2
4
  import { useTranslation } from 'react-i18next';
3
5
  import { useConfig, useAppContext, navigate } from '@openmrs/esm-framework';
4
- import styles from './styles.scss';
5
6
  import { type TutorialContext } from '../types';
6
- import { ModalHeader, ModalBody, Button } from '@carbon/react';
7
+ import styles from './styles.scss';
7
8
 
8
9
  const TutorialModal = ({ open, onClose }) => {
9
10
  const { t } = useTranslation();
@@ -13,7 +14,7 @@ const TutorialModal = ({ open, onClose }) => {
13
14
 
14
15
  const handleWalkthroughClick = (index: number) => {
15
16
  const basePath = window.getOpenmrsSpaBase();
16
- const homePath = `${basePath}home`;
17
+ const homePath = `${basePath}home/service-queues`;
17
18
  const currentPath = window.location.pathname;
18
19
  const tutorial = tutorials[index];
19
20
 
@@ -39,7 +40,7 @@ const TutorialModal = ({ open, onClose }) => {
39
40
 
40
41
  return (
41
42
  <React.Fragment>
42
- <ModalHeader closeModal={onClose} title={t('tutorial', 'Tutorial')}>
43
+ <ModalHeader closeModal={onClose} title={t('tutorial', 'Tutorial')} className={styles.modalHeader}>
43
44
  <p className={styles.description}>
44
45
  {t('modalDescription', 'Find walkthroughs and video tutorials on some of the core features of OpenMRS.')}
45
46
  </p>
@@ -50,9 +51,13 @@ const TutorialModal = ({ open, onClose }) => {
50
51
  <li className={styles.tutorialItem} key={index}>
51
52
  <h3 className={styles.tutorialTitle}>{tutorial.title}</h3>
52
53
  <p className={styles.tutorialDescription}>{tutorial.description}</p>
53
- <Button kind="ghost" onClick={() => handleWalkthroughClick(index)}>
54
+ <Link
55
+ onClick={() => handleWalkthroughClick(index)}
56
+ className={styles.tutorialLink}
57
+ renderIcon={() => <ArrowRight aria-label="Arrow Right" />}
58
+ >
54
59
  {t('walkthrough', 'Walkthrough')}
55
- </Button>
60
+ </Link>
56
61
  </li>
57
62
  ))}
58
63
  </ul>
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import {render, screen, waitFor} from '@testing-library/react';
2
+ import userEvent from '@testing-library/user-event';
3
+ import { render, screen, waitFor } from '@testing-library/react';
4
+ import { useAppContext, useConfig, navigate } from '@openmrs/esm-framework';
3
5
  import TutorialModal from './modal.component';
4
- import {useAppContext, useConfig, navigate} from "@openmrs/esm-framework";
5
- import userEvent from '@testing-library/user-event'
6
6
 
7
7
  jest.mock('@openmrs/esm-framework', () => ({
8
8
  useConfig: jest.fn(),
@@ -57,7 +57,6 @@ mockUseAppContext.mockReturnValue({
57
57
 
58
58
  describe('TutorialModal', () => {
59
59
  afterEach(() => {
60
- jest.clearAllMocks();
61
60
  delete window.location;
62
61
  window.location = { pathname: '/patient-registration' } as any;
63
62
  });
@@ -72,14 +71,18 @@ describe('TutorialModal', () => {
72
71
  },
73
72
  });
74
73
 
75
- render(<TutorialModal open={true} onClose={jest.fn()}/>);
74
+ render(<TutorialModal open={true} onClose={jest.fn()} />);
76
75
 
77
76
  const walkthroughButton = screen.getAllByText('Walkthrough');
78
77
  await user.click(walkthroughButton[0]);
79
78
 
80
- expect(navigate).toHaveBeenCalledWith({ to: '/spa-base/home' });
79
+ expect(mockNavigate).toHaveBeenCalledWith(
80
+ expect.objectContaining({
81
+ to: expect.stringContaining('/spa-base/home/service-queues'),
82
+ }),
83
+ );
81
84
  Object.defineProperty(window.location, 'pathname', {
82
- value: '/spa-base/home',
85
+ value: '/spa-base/home/service-queues',
83
86
  });
84
87
 
85
88
  await waitFor(() => expect(setSteps).toHaveBeenCalledWith(mockTutorialData[0].steps));
@@ -95,4 +98,3 @@ describe('TutorialModal', () => {
95
98
  });
96
99
  });
97
100
  });
98
-
@@ -1,6 +1,7 @@
1
1
  @use '@carbon/styles/scss/spacing';
2
2
  @use '@carbon/styles/scss/type';
3
- @import '~@openmrs/esm-styleguide/src/vars';
3
+ @use '@carbon/layout';
4
+ @use '@openmrs/esm-styleguide/src/vars' as *;
4
5
 
5
6
  .description {
6
7
  margin-bottom: spacing.$spacing-04;
@@ -26,5 +27,38 @@
26
27
  @include type.type-style('body-compact-01');
27
28
  }
28
29
 
30
+ .tutorialLink {
31
+ margin-bottom: spacing.$spacing-04;
32
+ margin-top: spacing.$spacing-04;
33
+ cursor: pointer;
34
+ }
35
+ }
36
+ }
37
+
38
+ .modalHeader {
39
+ :global {
40
+ .cds--modal-close-button {
41
+ position: absolute;
42
+ inset-block-start: 0;
43
+ inset-inline-end: 0;
44
+ margin: 0;
45
+ margin-top: calc(-1 * #{layout.$spacing-05});
46
+ }
47
+
48
+ .cds--modal-close {
49
+ background-color: rgba(0, 0, 0, 0);
50
+
51
+ &:hover {
52
+ background-color: var(--cds-layer-hover);
53
+ }
54
+ }
55
+
56
+ .cds--popover--left > .cds--popover > .cds--popover-content {
57
+ transform: translate(-4rem, 0.85rem);
58
+ }
59
+
60
+ .cds--popover--left > .cds--popover > .cds--popover-caret {
61
+ transform: translate(-3.75rem, 1.25rem);
62
+ }
29
63
  }
30
64
  }
@@ -8,6 +8,7 @@ const Tutorial = () => {
8
8
  const handleOpenModal = () => {
9
9
  const dispose = showModal('tutorial-modal', {
10
10
  onClose: () => dispose(),
11
+ size: 'sm',
11
12
  });
12
13
  };
13
14
 
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {type Step} from "react-joyride";
1
+ import { type Step } from 'react-joyride';
2
2
 
3
3
  export interface Tutorial {
4
4
  title: string;
@@ -11,5 +11,5 @@ export interface TutorialContext {
11
11
  steps: Step[];
12
12
  setShowTutorial: (showTutorial: boolean) => void;
13
13
  setSteps: (steps: Step[]) => void;
14
+ [key: string | number | symbol]: unknown;
14
15
  }
15
-
@@ -0,0 +1,43 @@
1
+ import { execSync } from 'node:child_process';
2
+
3
+ try {
4
+ // NB for other places use '@openmrs/*@next'; here we want to ignore patient-common-lib
5
+ execSync(`yarn up --fixed '@openmrs/esm-framework@next' 'openmrs@next'`, {
6
+ stdio: ['ignore', 'inherit', 'inherit'],
7
+ windowsHide: true,
8
+ });
9
+ } catch (error) {
10
+ console.error(`Error while updating dependencies: ${error.message ?? error}`);
11
+ process.exit(1);
12
+ }
13
+
14
+ try {
15
+ execSync(`yarn dedupe`, {
16
+ stdio: ['ignore', 'inherit', 'inherit'],
17
+ windowsHide: true,
18
+ });
19
+ } catch (error) {
20
+ console.error(`Error while deduplicating dependencies: ${error.message ?? error}`);
21
+ process.exit(1);
22
+ }
23
+
24
+ try {
25
+ execSync(`git diff-index --quiet HEAD --`, {
26
+ stdio: 'ignore',
27
+ windowsHide: true,
28
+ });
29
+ process.exit(0);
30
+ } catch (error) {
31
+ // git diff-index --quite HEAD --
32
+ // exits with status 1 if there are changes; we only need to run yarn verify if there are changes
33
+ }
34
+
35
+ try {
36
+ execSync(`yarn verify`, {
37
+ stdio: ['ignore', 'inherit', 'inherit'],
38
+ windowsHide: true,
39
+ });
40
+ } catch (error) {
41
+ console.error(`Error while running yarn verify: ${error.message ?? error}. Updates require manual intervention.`);
42
+ process.exit(1);
43
+ }
@@ -1 +1,9 @@
1
- {}
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -1 +1,9 @@
1
- {}
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -1 +1,9 @@
1
- {}
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Vous trouverez des guides et des tutoriels vidéo sur certaines des principales fonctionnalités d'OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutoriels",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -1 +1,9 @@
1
- {}
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Kembali",
3
+ "finish": "Selesai",
4
+ "modalDescription": "Temukan panduan dan tutorial video tentang beberapa fitur inti OpenMRS.",
5
+ "next": "Berikutnya",
6
+ "tutorial": "Tutorial",
7
+ "walkthrough": "Panduan",
8
+ "welcome": "Selamat datang di OpenMRS!"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "back": "Back",
3
+ "finish": "Finish",
4
+ "modalDescription": "Find walkthroughs and video tutorials on some of the core features of OpenMRS.",
5
+ "next": "Next",
6
+ "tutorial": "Tutorials",
7
+ "walkthrough": "Walkthrough",
8
+ "welcome": "Welcome to OpenMRS!"
9
+ }