@selfcommunity/react-ui 0.7.50-events.71 → 0.7.50-events.76
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/lib/cjs/assets/onBoarding/Android.d.ts +1 -0
- package/lib/cjs/assets/onBoarding/Android.js +7 -0
- package/lib/cjs/assets/onBoarding/CategoryA.d.ts +1 -0
- package/lib/cjs/assets/onBoarding/CategoryA.js +7 -0
- package/lib/cjs/assets/onBoarding/CategoryB.d.ts +1 -0
- package/lib/cjs/assets/onBoarding/CategoryB.js +7 -0
- package/lib/cjs/assets/onBoarding/Header.d.ts +1 -0
- package/lib/cjs/assets/onBoarding/Header.js +7 -0
- package/lib/cjs/assets/onBoarding/Ios.d.ts +1 -0
- package/lib/cjs/assets/onBoarding/Ios.js +7 -0
- package/lib/cjs/components/Feed/Feed.d.ts +1 -0
- package/lib/cjs/components/Feed/Feed.js +3 -0
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.d.ts +19 -0
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +209 -0
- package/lib/cjs/components/OnBoardingWidget/Skeleton.d.ts +1 -0
- package/lib/cjs/components/OnBoardingWidget/Skeleton.js +24 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/App/App.d.ts +18 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +74 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/App/index.d.ts +3 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/App/index.js +5 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.d.ts +13 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +226 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/index.d.ts +3 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/index.js +5 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/reducer.d.ts +15 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/reducer.js +42 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.d.ts +18 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +81 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/index.d.ts +3 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/index.js +5 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Content/Content.d.ts +18 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Content/Content.js +51 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Content/index.d.ts +3 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Content/index.js +5 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Invite/Invite.d.ts +13 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Invite/Invite.js +54 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Invite/index.d.ts +3 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Invite/index.js +5 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Profile/Profile.d.ts +25 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Profile/Profile.js +94 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Profile/index.d.ts +3 -0
- package/lib/cjs/components/OnBoardingWidget/Steps/Profile/index.js +5 -0
- package/lib/cjs/components/OnBoardingWidget/constants.d.ts +1 -0
- package/lib/cjs/components/OnBoardingWidget/constants.js +4 -0
- package/lib/cjs/components/OnBoardingWidget/index.d.ts +4 -0
- package/lib/cjs/components/OnBoardingWidget/index.js +8 -0
- package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/cjs/components/PlatformWidget/constants.js +5 -1
- package/lib/cjs/index.d.ts +3 -1
- package/lib/cjs/index.js +8 -3
- package/lib/cjs/shared/ProgressBar/index.d.ts +23 -0
- package/lib/cjs/shared/ProgressBar/index.js +25 -0
- package/lib/cjs/utils/onBoarding.d.ts +2 -0
- package/lib/cjs/utils/onBoarding.js +20 -0
- package/lib/esm/assets/onBoarding/Android.d.ts +1 -0
- package/lib/esm/assets/onBoarding/Android.js +4 -0
- package/lib/esm/assets/onBoarding/CategoryA.d.ts +1 -0
- package/lib/esm/assets/onBoarding/CategoryA.js +4 -0
- package/lib/esm/assets/onBoarding/CategoryB.d.ts +1 -0
- package/lib/esm/assets/onBoarding/CategoryB.js +4 -0
- package/lib/esm/assets/onBoarding/Header.d.ts +1 -0
- package/lib/esm/assets/onBoarding/Header.js +4 -0
- package/lib/esm/assets/onBoarding/Ios.d.ts +1 -0
- package/lib/esm/assets/onBoarding/Ios.js +4 -0
- package/lib/esm/components/Feed/Feed.d.ts +1 -0
- package/lib/esm/components/Feed/Feed.js +3 -0
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.d.ts +19 -0
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +207 -0
- package/lib/esm/components/OnBoardingWidget/Skeleton.d.ts +1 -0
- package/lib/esm/components/OnBoardingWidget/Skeleton.js +20 -0
- package/lib/esm/components/OnBoardingWidget/Steps/App/App.d.ts +18 -0
- package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +70 -0
- package/lib/esm/components/OnBoardingWidget/Steps/App/index.d.ts +3 -0
- package/lib/esm/components/OnBoardingWidget/Steps/App/index.js +2 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.d.ts +13 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +223 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/index.d.ts +3 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/index.js +2 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/reducer.d.ts +15 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/reducer.js +37 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.d.ts +18 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +77 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Category/index.d.ts +3 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Category/index.js +2 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Content/Content.d.ts +18 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Content/Content.js +47 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Content/index.d.ts +3 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Content/index.js +2 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Invite/Invite.d.ts +13 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Invite/Invite.js +50 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Invite/index.d.ts +3 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Invite/index.js +2 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Profile/Profile.d.ts +25 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Profile/Profile.js +91 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Profile/index.d.ts +3 -0
- package/lib/esm/components/OnBoardingWidget/Steps/Profile/index.js +2 -0
- package/lib/esm/components/OnBoardingWidget/constants.d.ts +1 -0
- package/lib/esm/components/OnBoardingWidget/constants.js +1 -0
- package/lib/esm/components/OnBoardingWidget/index.d.ts +4 -0
- package/lib/esm/components/OnBoardingWidget/index.js +4 -0
- package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/esm/components/PlatformWidget/constants.js +4 -0
- package/lib/esm/index.d.ts +3 -1
- package/lib/esm/index.js +5 -3
- package/lib/esm/shared/ProgressBar/index.d.ts +23 -0
- package/lib/esm/shared/ProgressBar/index.js +22 -0
- package/lib/esm/utils/onBoarding.d.ts +2 -0
- package/lib/esm/utils/onBoarding.js +15 -0
- package/lib/umd/920.js +2 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +181 -180
- package/lib/umd/224.js +0 -2
- /package/lib/umd/{224.js.LICENSE.txt → 920.js.LICENSE.txt} +0 -0
|
@@ -16,6 +16,7 @@ export declare type FeedSidebarProps = StickyBoxProps;
|
|
|
16
16
|
export declare type FeedRef = {
|
|
17
17
|
addFeedData: (obj: any, syncPagination?: boolean) => void;
|
|
18
18
|
refresh: () => void;
|
|
19
|
+
getCurrentFeedObjectIds: () => number[];
|
|
19
20
|
};
|
|
20
21
|
export interface FeedProps {
|
|
21
22
|
/**
|
|
@@ -392,6 +392,9 @@ const Feed = (inProps, ref) => {
|
|
|
392
392
|
},
|
|
393
393
|
refresh: () => {
|
|
394
394
|
refresh();
|
|
395
|
+
},
|
|
396
|
+
getCurrentFeedObjectIds: () => {
|
|
397
|
+
return feedDataObject.results.map((o) => o[o.type].id);
|
|
395
398
|
}
|
|
396
399
|
}));
|
|
397
400
|
const InnerItem = (0, react_1.useMemo)(() => ({ state: savedState, onHeightChange, onStateChange, children: item }) => {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CategoryProps } from './Steps/Category';
|
|
2
|
+
import { AppearanceProps } from './Steps/Appearance';
|
|
3
|
+
import { ProfileProps } from './Steps/Profile';
|
|
4
|
+
import { InviteProps } from './Steps/Invite';
|
|
5
|
+
import { AppProps } from './Steps/App';
|
|
6
|
+
import { ContentProps } from './Steps/Content';
|
|
7
|
+
import { StartStepParams } from '@selfcommunity/api-services';
|
|
8
|
+
export interface OnBoardingWidgetProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
CategoryProps?: CategoryProps;
|
|
11
|
+
ContentProps?: ContentProps;
|
|
12
|
+
AppearanceProps?: AppearanceProps;
|
|
13
|
+
ProfileProps?: ProfileProps;
|
|
14
|
+
InviteProps?: InviteProps;
|
|
15
|
+
AppProps: AppProps;
|
|
16
|
+
generateContentsParams?: StartStepParams;
|
|
17
|
+
}
|
|
18
|
+
declare const OnBoardingWidget: (inProps: OnBoardingWidgetProps) => JSX.Element;
|
|
19
|
+
export default OnBoardingWidget;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const react_intl_1 = require("react-intl");
|
|
8
|
+
const styles_1 = require("@mui/material/styles");
|
|
9
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
|
+
const system_1 = require("@mui/system");
|
|
11
|
+
const Category_1 = tslib_1.__importDefault(require("./Steps/Category"));
|
|
12
|
+
const constants_1 = require("./constants");
|
|
13
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
14
|
+
const Appearance_1 = tslib_1.__importDefault(require("./Steps/Appearance"));
|
|
15
|
+
const Profile_1 = tslib_1.__importDefault(require("./Steps/Profile"));
|
|
16
|
+
const Invite_1 = tslib_1.__importDefault(require("./Steps/Invite"));
|
|
17
|
+
const App_1 = tslib_1.__importDefault(require("./Steps/App"));
|
|
18
|
+
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
19
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
20
|
+
const Content_1 = tslib_1.__importDefault(require("./Steps/Content"));
|
|
21
|
+
const Header_1 = tslib_1.__importDefault(require("../../assets/onBoarding/Header"));
|
|
22
|
+
const Errors_1 = require("../../constants/Errors");
|
|
23
|
+
const api_services_1 = require("@selfcommunity/api-services");
|
|
24
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
25
|
+
const types_1 = require("@selfcommunity/types");
|
|
26
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
27
|
+
const notistack_1 = require("notistack");
|
|
28
|
+
const constants_2 = require("../PlatformWidget/constants");
|
|
29
|
+
const classes = {
|
|
30
|
+
root: `${constants_1.PREFIX}-root`,
|
|
31
|
+
accordionRoot: `${constants_1.PREFIX}-accordion-root`,
|
|
32
|
+
logo: `${constants_1.PREFIX}-logo`,
|
|
33
|
+
intro: `${constants_1.PREFIX}-intro`,
|
|
34
|
+
steps: `${constants_1.PREFIX}-steps`,
|
|
35
|
+
stepsMobile: `${constants_1.PREFIX}-steps-mobile`,
|
|
36
|
+
stepContent: `${constants_1.PREFIX}-step-content`
|
|
37
|
+
};
|
|
38
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
39
|
+
name: constants_1.PREFIX,
|
|
40
|
+
slot: 'Root',
|
|
41
|
+
overridesResolver: (props, styles) => styles.root
|
|
42
|
+
})(() => ({}));
|
|
43
|
+
const AccordionRoot = (0, styles_1.styled)(material_1.Accordion, {
|
|
44
|
+
name: constants_1.PREFIX,
|
|
45
|
+
slot: 'AccordionRoot',
|
|
46
|
+
overridesResolver: (props, styles) => styles.accordionRoot
|
|
47
|
+
})(() => ({}));
|
|
48
|
+
const OnBoardingWidget = (inProps) => {
|
|
49
|
+
// PROPS
|
|
50
|
+
const props = (0, system_1.useThemeProps)({
|
|
51
|
+
props: inProps,
|
|
52
|
+
name: constants_1.PREFIX
|
|
53
|
+
});
|
|
54
|
+
const { className, AppearanceProps = {}, ProfileProps = {}, CategoryProps = {}, InviteProps = {}, AppProps = {}, ContentProps = {}, generateContentsParams = {} } = props, rest = tslib_1.__rest(props, ["className", "AppearanceProps", "ProfileProps", "CategoryProps", "InviteProps", "AppProps", "ContentProps", "generateContentsParams"]);
|
|
55
|
+
// STATE
|
|
56
|
+
const [isLoading, setIsLoading] = (0, react_1.useState)(true);
|
|
57
|
+
const [steps, setSteps] = (0, react_1.useState)([]);
|
|
58
|
+
const currentStep = (0, react_1.useMemo)(() => {
|
|
59
|
+
const step = steps === null || steps === void 0 ? void 0 : steps.find((step) => step.status === 'in_progress' || step.status === 'not_started');
|
|
60
|
+
return step || (steps === null || steps === void 0 ? void 0 : steps[0]);
|
|
61
|
+
}, [steps]);
|
|
62
|
+
const allStepsDone = (0, react_1.useMemo)(() => {
|
|
63
|
+
return steps === null || steps === void 0 ? void 0 : steps.every((step) => step.status === types_1.SCOnBoardingStepStatusType.COMPLETED);
|
|
64
|
+
}, [steps]);
|
|
65
|
+
const [expanded, setExpanded] = (0, react_1.useState)(!allStepsDone);
|
|
66
|
+
const [_step, setStep] = (0, react_1.useState)(currentStep);
|
|
67
|
+
const prevStep = (0, react_core_1.usePreviousValue)(_step);
|
|
68
|
+
// CONTEXT
|
|
69
|
+
const scUserContext = (0, react_core_1.useSCUser)();
|
|
70
|
+
const scContext = (0, react_core_1.useSCContext)();
|
|
71
|
+
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
72
|
+
const isStage = scContext.settings.portal.includes('stage');
|
|
73
|
+
const [isGenerating, setIsGenerating] = (0, react_1.useState)(false);
|
|
74
|
+
// HOOKS
|
|
75
|
+
const theme = (0, material_1.useTheme)();
|
|
76
|
+
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
77
|
+
// HANDLERS
|
|
78
|
+
const completeStep = (s) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
79
|
+
if (s.status !== types_1.SCOnBoardingStepStatusType.COMPLETED) {
|
|
80
|
+
yield api_services_1.OnBoardingService.completeAStep(s.id)
|
|
81
|
+
.then(() => {
|
|
82
|
+
setSteps((prev) => prev.map((item) => {
|
|
83
|
+
if (item.id === s.id) {
|
|
84
|
+
return Object.assign(Object.assign({}, item), { status: types_1.SCOnBoardingStepStatusType.COMPLETED, completion_percentage: 100 });
|
|
85
|
+
}
|
|
86
|
+
return item;
|
|
87
|
+
}));
|
|
88
|
+
})
|
|
89
|
+
.catch((error) => {
|
|
90
|
+
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
const showSuccessAlert = (step) => {
|
|
95
|
+
setIsGenerating(false);
|
|
96
|
+
enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.onBoardingWidget.step.${step.step}.success`, defaultMessage: `ui.onBoardingWidget.step.${step.step}.success` }), {
|
|
97
|
+
action: (snackbarId) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [step.step === types_1.SCOnBoardingStepType.CATEGORIES && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ sx: { textTransform: 'uppercase', color: 'white' }, size: "small", variant: "text", href: isStage ? constants_2.CONSOLE_STAGE : constants_2.CONSOLE_PROD, target: "_blank" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.categories.success.link", defaultMessage: "ui.onBoardingWidget.step.categories.success.link" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ sx: { color: 'white' }, onClick: () => (0, notistack_1.closeSnackbar)(snackbarId) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] })),
|
|
98
|
+
variant: 'success',
|
|
99
|
+
autoHideDuration: 7000
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
const getSteps = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
+
yield api_services_1.OnBoardingService.getAllSteps()
|
|
104
|
+
.then((res) => {
|
|
105
|
+
setIsGenerating(res.results.some((step) => step.status === 'in_progress'));
|
|
106
|
+
setSteps(res.results);
|
|
107
|
+
setIsLoading(false);
|
|
108
|
+
})
|
|
109
|
+
.catch((error) => {
|
|
110
|
+
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
111
|
+
setIsLoading(false);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
const handleChange = (newStep) => {
|
|
115
|
+
setStep(newStep);
|
|
116
|
+
};
|
|
117
|
+
const handleExpand = () => {
|
|
118
|
+
setExpanded(!expanded);
|
|
119
|
+
};
|
|
120
|
+
const generateContent = (stepId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
121
|
+
yield api_services_1.OnBoardingService.startAStep(stepId, generateContentsParams)
|
|
122
|
+
.then(() => {
|
|
123
|
+
setIsGenerating(true);
|
|
124
|
+
})
|
|
125
|
+
.catch((error) => {
|
|
126
|
+
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
127
|
+
enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.common.error.action", defaultMessage: "ui.common.error.action" }), {
|
|
128
|
+
variant: 'error',
|
|
129
|
+
autoHideDuration: 3000
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
// EFFECTS
|
|
134
|
+
(0, react_1.useEffect)(() => {
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
if ((prevStep === null || prevStep === void 0 ? void 0 : prevStep.status) === types_1.SCOnBoardingStepStatusType.IN_PROGRESS && (_step === null || _step === void 0 ? void 0 : _step.status) === types_1.SCOnBoardingStepStatusType.NOT_STARTED) {
|
|
138
|
+
showSuccessAlert(prevStep);
|
|
139
|
+
}
|
|
140
|
+
}, [_step, prevStep]);
|
|
141
|
+
(0, react_1.useEffect)(() => {
|
|
142
|
+
setStep(currentStep);
|
|
143
|
+
}, [currentStep, steps]);
|
|
144
|
+
(0, react_1.useEffect)(() => {
|
|
145
|
+
setExpanded(!allStepsDone);
|
|
146
|
+
}, [allStepsDone]);
|
|
147
|
+
(0, react_1.useEffect)(() => {
|
|
148
|
+
getSteps();
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
150
|
+
const intervalId = setInterval(getSteps, isGenerating ? 3000 : 3 * 60 * 1000);
|
|
151
|
+
return () => clearInterval(intervalId);
|
|
152
|
+
}, [scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user, isGenerating]);
|
|
153
|
+
/**
|
|
154
|
+
* Render _step content section
|
|
155
|
+
*/
|
|
156
|
+
const getStepContent = () => {
|
|
157
|
+
const stepObj = _step;
|
|
158
|
+
let content;
|
|
159
|
+
switch (stepObj === null || stepObj === void 0 ? void 0 : stepObj.step) {
|
|
160
|
+
case types_1.SCOnBoardingStepType.CONTENTS:
|
|
161
|
+
content = (0, jsx_runtime_1.jsx)(Content_1.default, Object.assign({ step: stepObj, handleContentCreation: () => generateContent(stepObj.id) }, ContentProps));
|
|
162
|
+
break;
|
|
163
|
+
case types_1.SCOnBoardingStepType.CATEGORIES:
|
|
164
|
+
content = (0, jsx_runtime_1.jsx)(Category_1.default, Object.assign({ step: stepObj, handleCategoriesCreation: () => generateContent(stepObj.id) }, CategoryProps));
|
|
165
|
+
break;
|
|
166
|
+
case types_1.SCOnBoardingStepType.APPEARANCE:
|
|
167
|
+
content = (0, jsx_runtime_1.jsx)(Appearance_1.default, Object.assign({ onCompleteAction: () => completeStep(stepObj) }, AppearanceProps));
|
|
168
|
+
break;
|
|
169
|
+
case types_1.SCOnBoardingStepType.PROFILE:
|
|
170
|
+
content = (0, jsx_runtime_1.jsx)(Profile_1.default, Object.assign({ onCompleteAction: () => completeStep(stepObj) }, ProfileProps));
|
|
171
|
+
break;
|
|
172
|
+
case types_1.SCOnBoardingStepType.INVITE:
|
|
173
|
+
content = (0, jsx_runtime_1.jsx)(Invite_1.default, Object.assign({ onCompleteAction: () => completeStep(stepObj) }, InviteProps));
|
|
174
|
+
break;
|
|
175
|
+
case types_1.SCOnBoardingStepType.APP:
|
|
176
|
+
content = (0, jsx_runtime_1.jsx)(App_1.default, Object.assign({ step: stepObj, onCompleteAction: () => completeStep(stepObj) }, AppProps));
|
|
177
|
+
break;
|
|
178
|
+
default:
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
return content;
|
|
182
|
+
};
|
|
183
|
+
if (!(scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user)) {
|
|
184
|
+
return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
|
|
185
|
+
}
|
|
186
|
+
return ((0, jsx_runtime_1.jsxs)(AccordionRoot, Object.assign({ defaultExpanded: true, onChange: handleExpand, className: classes.accordionRoot, expanded: expanded }, { children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, Object.assign({ expandIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium" }, { children: "expand_more" })), "aria-controls": "accordion", id: "onBoarding-accordion" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: expanded ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isMobile ? ((0, jsx_runtime_1.jsx)(material_1.CardMedia, Object.assign({ className: classes.logo, component: "div" }, { children: (0, jsx_runtime_1.jsx)(Header_1.default, {}) }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", textAlign: "center" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.accordion.expanded.title.mobile", defaultMessage: "ui.onBoardingWidget.accordion.expanded.title.mobile", values: {
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
188
|
+
// @ts-ignore
|
|
189
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }),
|
|
190
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
icon: (...chunks) => ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "secondary", fontSize: "medium" }, { children: chunks })))
|
|
193
|
+
} }) }))), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.intro }, { children: [!isMobile && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.accordion.expanded.title", defaultMessage: "ui.onBoardingWidget.accordion.expanded.title" }) }))), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: !isMobile ? 'h5' : 'subtitle1' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.accordion.expanded.subtitle", defaultMessage: "ui.onBoardingWidget.accordion.expanded.subtitle" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.accordion.expanded.summary", defaultMessage: "ui.onBoardingWidget.accordion.expanded.summary", values: {
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
195
|
+
// @ts-ignore
|
|
196
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }),
|
|
197
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
198
|
+
// @ts-ignore
|
|
199
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks })
|
|
200
|
+
} }) })] }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.accordion.collapsed", defaultMessage: "ui.onBoardingWidget.accordion.collapsed", values: {
|
|
201
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
202
|
+
// @ts-ignore
|
|
203
|
+
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }),
|
|
204
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
205
|
+
// @ts-ignore
|
|
206
|
+
icon: (...chunks) => ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "secondary", fontSize: "medium" }, { children: chunks })))
|
|
207
|
+
} }) }))) }) })), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { elevation: 0 }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ className: isMobile ? classes.stepsMobile : classes.steps }, { children: steps === null || steps === void 0 ? void 0 : steps.map((step) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.Chip, { size: "small", disabled: isGenerating && ((_step === null || _step === void 0 ? void 0 : _step.step) === types_1.SCOnBoardingStepType.CATEGORIES || (_step === null || _step === void 0 ? void 0 : _step.step) === types_1.SCOnBoardingStepType.CONTENTS), label: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.onBoardingWidget.${step.step}`, defaultMessage: `ui.onBoardingWidget.${step.step}` }), ' ', step.status === types_1.SCOnBoardingStepStatusType.COMPLETED && ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: step.status === types_1.SCOnBoardingStepStatusType.COMPLETED && step.step !== _step.step ? 'success' : 'inherit' }, { children: "check" })))] }), onClick: () => handleChange(step), variant: step.step === _step.step ? 'filled' : 'outlined', color: step.status === types_1.SCOnBoardingStepStatusType.COMPLETED ? 'success' : 'default' })) : ((0, jsx_runtime_1.jsxs)(material_1.ListItemButton, Object.assign({ onClick: () => handleChange(step), selected: (step === null || step === void 0 ? void 0 : step.step) === (_step === null || _step === void 0 ? void 0 : _step.step), disabled: isGenerating && ((_step === null || _step === void 0 ? void 0 : _step.step) === types_1.SCOnBoardingStepType.CATEGORIES || (_step === null || _step === void 0 ? void 0 : _step.step) === types_1.SCOnBoardingStepType.CONTENTS) }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { edge: "start", checked: step.status === types_1.SCOnBoardingStepStatusType.COMPLETED, tabIndex: -1, disableRipple: true, inputProps: { 'aria-labelledby': step.step }, size: 'small' }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.onBoardingWidget.${step.step}`, defaultMessage: `ui.onBoardingWidget.${step.step}` }) })] }))) }, step.id))) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.stepContent }, { children: (0, jsx_runtime_1.jsx)(material_1.Fade, Object.assign({ in: true, timeout: 2400 }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { children: getStepContent() }) })) }))] })) })) })] })));
|
|
208
|
+
};
|
|
209
|
+
exports.default = OnBoardingWidget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function OnBoardingWidgetSkeleton(): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const Skeleton_1 = tslib_1.__importDefault(require("@mui/material/Skeleton"));
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
const classes = {
|
|
10
|
+
root: `${constants_1.PREFIX}-skeleton-root`,
|
|
11
|
+
menu: `${constants_1.PREFIX}-skeleton-menu`,
|
|
12
|
+
content: `${constants_1.PREFIX}-skeleton-content`
|
|
13
|
+
};
|
|
14
|
+
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
15
|
+
name: constants_1.PREFIX,
|
|
16
|
+
slot: 'SkeletonRoot'
|
|
17
|
+
})(() => ({}));
|
|
18
|
+
function OnBoardingWidgetSkeleton() {
|
|
19
|
+
const theme = (0, material_1.useTheme)();
|
|
20
|
+
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
21
|
+
const steps = Array(isMobile ? 3 : 5).fill(null);
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.menu }, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', justifyContent: 'space-evenly' } }, { children: steps.map((_, index) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "text", width: 80 }), variant: "outlined" }, index))) }))) : ((0, jsx_runtime_1.jsx)(material_1.List, { children: steps.map((_, index) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsxs)(material_1.ListItemButton, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "rectangular", width: 20, height: 20 }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "text", width: 100 }) })] }) }, index))) })) })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "text", width: '20%', height: 40 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "text", width: '80%', height: 20 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "text", width: '70%', height: 20 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "text", width: '60%', height: 20 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { variant: "rectangular", width: 100, height: 36, style: { borderRadius: '20px', alignSelf: 'center', marginTop: 24 } })] }))] })));
|
|
23
|
+
}
|
|
24
|
+
exports.default = OnBoardingWidgetSkeleton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SCStepType } from '@selfcommunity/types';
|
|
2
|
+
export interface AppProps {
|
|
3
|
+
/**
|
|
4
|
+
* The content step
|
|
5
|
+
*/
|
|
6
|
+
step: SCStepType;
|
|
7
|
+
/**
|
|
8
|
+
* Overrides or extends the styles applied to the component.
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Callback triggered on complete action click
|
|
14
|
+
* @default null
|
|
15
|
+
*/
|
|
16
|
+
onCompleteAction: () => void;
|
|
17
|
+
}
|
|
18
|
+
export default function App(inProps: AppProps): JSX.Element;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const Box_1 = tslib_1.__importDefault(require("@mui/material/Box"));
|
|
8
|
+
const system_1 = require("@mui/system");
|
|
9
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
|
+
const constants_1 = require("../../constants");
|
|
11
|
+
const material_1 = require("@mui/material");
|
|
12
|
+
const react_intl_1 = require("react-intl");
|
|
13
|
+
const Ios_1 = tslib_1.__importDefault(require("../../../../assets/onBoarding/Ios"));
|
|
14
|
+
const Android_1 = tslib_1.__importDefault(require("../../../../assets/onBoarding/Android"));
|
|
15
|
+
const types_1 = require("@selfcommunity/types");
|
|
16
|
+
const classes = {
|
|
17
|
+
root: `${constants_1.PREFIX}-app-root`,
|
|
18
|
+
title: `${constants_1.PREFIX}-app-title`,
|
|
19
|
+
tabs: `${constants_1.PREFIX}-app-tabs`,
|
|
20
|
+
tabContent: `${constants_1.PREFIX}-app-tab-content`,
|
|
21
|
+
summary: `${constants_1.PREFIX}-app-summary`,
|
|
22
|
+
image: `${constants_1.PREFIX}-app-image`,
|
|
23
|
+
action: `${constants_1.PREFIX}-app-action`,
|
|
24
|
+
button: `${constants_1.PREFIX}-app-button`
|
|
25
|
+
};
|
|
26
|
+
const Root = (0, styles_1.styled)(Box_1.default, {
|
|
27
|
+
name: constants_1.PREFIX,
|
|
28
|
+
slot: 'AppRoot'
|
|
29
|
+
})(() => ({}));
|
|
30
|
+
function App(inProps) {
|
|
31
|
+
// PROPS
|
|
32
|
+
const props = (0, system_1.useThemeProps)({
|
|
33
|
+
props: inProps,
|
|
34
|
+
name: constants_1.PREFIX
|
|
35
|
+
});
|
|
36
|
+
//PROPS
|
|
37
|
+
const { className, step, onCompleteAction } = props;
|
|
38
|
+
// STATE
|
|
39
|
+
const [tab, setTab] = (0, react_1.useState)(0);
|
|
40
|
+
// HANDLERS
|
|
41
|
+
const handleChange = (event, newValue) => {
|
|
42
|
+
setTab(newValue);
|
|
43
|
+
};
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.title", defaultMessage: "ui.onBoardingWidget.step.app.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.summary", defaultMessage: "ui.onBoardingWidget.step.app.summary" }) })), (0, jsx_runtime_1.jsxs)(material_1.Tabs, Object.assign({ className: classes.tabs, value: tab, onChange: handleChange, centered: true, variant: "fullWidth", indicatorColor: "primary" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Tab, { label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.tab.ios", defaultMessage: "ui.onBoardingWidget.step.app.tab.ios" }) }), (0, jsx_runtime_1.jsx)(material_1.Tab, { label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.tab.android", defaultMessage: "ui.onBoardingWidget.step.app.tab.android" }) })] })), (0, jsx_runtime_1.jsxs)(Box_1.default, Object.assign({ className: classes.tabContent }, { children: [tab === 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.ios", defaultMessage: "ui.onBoardingWidget.step.app.ios" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.ios.a", defaultMessage: "ui.onBoardingWidget.step.app.ios.a", values: {
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
b: (...chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
|
|
51
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.ios.b", defaultMessage: "ui.onBoardingWidget.step.app.ios.b", values: {
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
b: (...chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
|
|
58
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.CardMedia, Object.assign({ className: classes.image, component: "div" }, { children: (0, jsx_runtime_1.jsx)(Ios_1.default, {}) }))] })), tab === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.android", defaultMessage: "ui.onBoardingWidget.step.app.android" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.android.a", defaultMessage: "ui.onBoardingWidget.step.app.android.a", values: {
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
b: (...chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
|
|
65
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", className: classes.summary }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.onBoardingWidget.step.app.android.b", defaultMessage: "ui.onBoardingWidget.step.app.android.b", values: {
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
b: (...chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
|
|
72
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.CardMedia, Object.assign({ className: classes.image, component: "div" }, { children: (0, jsx_runtime_1.jsx)(Android_1.default, {}) }))] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.button, size: "small", variant: "outlined", color: "secondary", onClick: onCompleteAction, disabled: (step === null || step === void 0 ? void 0 : step.status) === types_1.SCOnBoardingStepStatusType.COMPLETED || (step === null || step === void 0 ? void 0 : step.status) === types_1.SCOnBoardingStepStatusType.IN_PROGRESS }, { children: "Ok!" }))] }))] })));
|
|
73
|
+
}
|
|
74
|
+
exports.default = App;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface AppearanceProps {
|
|
2
|
+
/**
|
|
3
|
+
* Overrides or extends the styles applied to the component.
|
|
4
|
+
* @default null
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Callback triggered on complete action click
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
onCompleteAction: () => void;
|
|
12
|
+
}
|
|
13
|
+
export default function Appearance(inProps: AppearanceProps): JSX.Element;
|