@campxdev/shared 1.10.54 → 1.10.56
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
|
import { Done } from '@mui/icons-material'
|
|
2
2
|
import { alpha, Box, styled, Typography } from '@mui/material'
|
|
3
|
-
import { useEffect, useState } from 'react'
|
|
3
|
+
import { CSSProperties, useEffect, useState } from 'react'
|
|
4
4
|
|
|
5
5
|
export const StyledStepsContainer = styled(Box)(({ theme }) => ({
|
|
6
6
|
padding: '10px 0',
|
|
@@ -14,7 +14,7 @@ export const StyledStep = styled(Box, {
|
|
|
14
14
|
!['active', 'disableHover'].includes(prop as string),
|
|
15
15
|
})<{ active: boolean; disableHover: boolean }>(
|
|
16
16
|
({ theme, active, disableHover }) => ({
|
|
17
|
-
|
|
17
|
+
width: '100px',
|
|
18
18
|
position: 'relative',
|
|
19
19
|
display: 'grid',
|
|
20
20
|
gridTemplateRows: '50px 1fr',
|
|
@@ -70,6 +70,8 @@ interface StepsHeaderProps {
|
|
|
70
70
|
onChange: (step: number) => void
|
|
71
71
|
activeStep?: number
|
|
72
72
|
disableClick?: boolean
|
|
73
|
+
containerStyles?: CSSProperties
|
|
74
|
+
stepStyles?: CSSProperties
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
export default function StepsHeader({
|
|
@@ -77,6 +79,8 @@ export default function StepsHeader({
|
|
|
77
79
|
onChange,
|
|
78
80
|
activeStep: _activeStep = 0,
|
|
79
81
|
disableClick = false,
|
|
82
|
+
containerStyles,
|
|
83
|
+
stepStyles,
|
|
80
84
|
}: StepsHeaderProps) {
|
|
81
85
|
const [activeStep, setActiveStep] = useState(0)
|
|
82
86
|
|
|
@@ -88,9 +92,8 @@ export default function StepsHeader({
|
|
|
88
92
|
useEffect(() => {
|
|
89
93
|
setActiveStep(_activeStep)
|
|
90
94
|
}, [_activeStep])
|
|
91
|
-
|
|
92
95
|
return (
|
|
93
|
-
<StyledStepsContainer>
|
|
96
|
+
<StyledStepsContainer sx={{ ...containerStyles }}>
|
|
94
97
|
{steps?.map((item) => (
|
|
95
98
|
<StyledStep
|
|
96
99
|
active={activeStep > item?.step - 1}
|
|
@@ -100,6 +103,7 @@ export default function StepsHeader({
|
|
|
100
103
|
handleClick(item.step)
|
|
101
104
|
}}
|
|
102
105
|
key={item?.step}
|
|
106
|
+
sx={{ ...stepStyles }}
|
|
103
107
|
>
|
|
104
108
|
<StyledCircle active={activeStep > item?.step - 1}>
|
|
105
109
|
{activeStep > item?.step - 1 && <Done color="success" />}
|
|
@@ -307,6 +307,12 @@ export enum SquarePermissions {
|
|
|
307
307
|
CAN_FORM_BUILDER_EDIT = 'can_form_builder_edit',
|
|
308
308
|
CAN_FORM_BUILDER_ADD = 'can_form_builder_add',
|
|
309
309
|
CAN_FORM_BUILDER_DELETE = 'can_form_builder_delete',
|
|
310
|
+
|
|
311
|
+
// Surveys
|
|
312
|
+
CAN_SURVEYS_VIEW = 'can_surveys_view',
|
|
313
|
+
CAN_SURVEYS_EDIT = 'can_surveys_edit',
|
|
314
|
+
CAN_SURVEYS_ADD = 'can_surveys_add',
|
|
315
|
+
CAN_SURVEYS_DELETE = 'can_surveys_delete',
|
|
310
316
|
}
|
|
311
317
|
|
|
312
318
|
export enum EnrollPermissions {
|
|
@@ -772,6 +778,7 @@ export enum Permission {
|
|
|
772
778
|
CAN_INSTITUTION_CONFIGURATION_EDIT = 'can_institution_configuration_edit',
|
|
773
779
|
|
|
774
780
|
// Infrastructure
|
|
781
|
+
CAN_INFRASTRUCTURE_VIEW = 'can_infrastructure_view',
|
|
775
782
|
CAN_INFRASTRUCTURE_BUILDINGS_ADD = 'can_infrastructure_buildings_add',
|
|
776
783
|
CAN_INFRASTRUCTURE_BUILDINGS_EDIT = 'can_infrastructure_buildings_edit',
|
|
777
784
|
CAN_INFRASTRUCTURE_BUILDINGS_VIEW = 'can_infrastructure_buildings_view',
|
|
@@ -897,6 +904,12 @@ export enum Permission {
|
|
|
897
904
|
CAN_FORM_BUILDER_ADD = 'can_form_builder_add',
|
|
898
905
|
CAN_FORM_BUILDER_DELETE = 'can_form_builder_delete',
|
|
899
906
|
|
|
907
|
+
// Surveys
|
|
908
|
+
CAN_SURVEYS_VIEW = 'can_surveys_view',
|
|
909
|
+
CAN_SURVEYS_EDIT = 'can_surveys_edit',
|
|
910
|
+
CAN_SURVEYS_ADD = 'can_surveys_add',
|
|
911
|
+
CAN_SURVEYS_DELETE = 'can_surveys_delete',
|
|
912
|
+
|
|
900
913
|
// Enroll X
|
|
901
914
|
|
|
902
915
|
// manage exams profile_permissions
|