@bigbinary/neeto-molecules 1.19.4 → 1.19.6

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.
@@ -19,7 +19,7 @@ var DEFAULT_EDITOR_PROPS = {
19
19
  addons: []
20
20
  };
21
21
 
22
- var css = "@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:768px!important}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:24px 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:42px;font-weight:700;line-height:48px;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:36px}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:12px auto}.neeto-molecules-document__wrapper .ProseMirror{max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-left:none;border-right:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:6px}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:868px;padding:0 8px}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto;padding:0 16px}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:12px 16px 0!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:12px auto 0;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.editor-content__wrapper.neeto-editor{padding:0 16px}.editor-content__wrapper.neeto-editor h1{font-size:var(--neeto-ui-text-h1);margin:2rem 0 .25rem}.editor-content__wrapper.neeto-editor h2{font-size:var(--neeto-ui-text-h2);margin:1.5rem 0 .25rem}.editor-content__wrapper.neeto-editor h3{font-size:var(--neeto-ui-text-h3);margin:1rem 0 .25rem}.editor-content__wrapper.neeto-editor h4{font-size:var(--neeto-ui-text-h4);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h5{font-size:var(--neeto-ui-text-h5);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h6{font-size:var(--neeto-ui-text-h6);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h1,.editor-content__wrapper.neeto-editor h2,.editor-content__wrapper.neeto-editor h3,.editor-content__wrapper.neeto-editor h4,.editor-content__wrapper.neeto-editor h5,.editor-content__wrapper.neeto-editor h6{font-weight:var(--neeto-ui-font-semibold)}.editor-content__wrapper.neeto-editor p{font-size:var(--neeto-ui-text-body1);line-height:var(--neeto-ui-leading-normal)}.editor-content__wrapper.neeto-editor ol,.editor-content__wrapper.neeto-editor ul{margin-bottom:1rem;padding-left:24px}.editor-content__wrapper.neeto-editor ol li,.editor-content__wrapper.neeto-editor ul li{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor ol li p,.editor-content__wrapper.neeto-editor ul li p{margin-bottom:0}.editor-content__wrapper.neeto-editor ol li:last-child,.editor-content__wrapper.neeto-editor ul li:last-child{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor .neeto-editor-table{margin:8px 0 0}.editor-content__wrapper.neeto-editor .neeto-editor-table table{border-radius:0}.editor-content__wrapper.neeto-editor .neeto-editor-table p{margin-bottom:0}.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-row{visibility:hidden}.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-row{visibility:visible}ins{background-color:#c1f4cb!important;text-decoration:none!important}del{background-color:#faa!important}";
22
+ var css = "@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:768px!important}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:24px 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:42px;font-weight:700;line-height:48px;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:36px}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:12px auto}.neeto-molecules-document__wrapper .ProseMirror{max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-left:none;border-right:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:6px}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:868px}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:12px 16px 0!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:12px auto 0;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.editor-content__wrapper.neeto-editor{padding:0 16px}.editor-content__wrapper.neeto-editor h1{font-size:var(--neeto-ui-text-h1);margin:2rem 0 .25rem}.editor-content__wrapper.neeto-editor h2{font-size:var(--neeto-ui-text-h2);margin:1.5rem 0 .25rem}.editor-content__wrapper.neeto-editor h3{font-size:var(--neeto-ui-text-h3);margin:1rem 0 .25rem}.editor-content__wrapper.neeto-editor h4{font-size:var(--neeto-ui-text-h4);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h5{font-size:var(--neeto-ui-text-h5);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h6{font-size:var(--neeto-ui-text-h6);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h1,.editor-content__wrapper.neeto-editor h2,.editor-content__wrapper.neeto-editor h3,.editor-content__wrapper.neeto-editor h4,.editor-content__wrapper.neeto-editor h5,.editor-content__wrapper.neeto-editor h6{font-weight:var(--neeto-ui-font-semibold)}.editor-content__wrapper.neeto-editor p{font-size:var(--neeto-ui-text-body1);line-height:var(--neeto-ui-leading-normal)}.editor-content__wrapper.neeto-editor ol,.editor-content__wrapper.neeto-editor ul{margin-bottom:1rem;padding-left:24px}.editor-content__wrapper.neeto-editor ol li,.editor-content__wrapper.neeto-editor ul li{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor ol li p,.editor-content__wrapper.neeto-editor ul li p{margin-bottom:0}.editor-content__wrapper.neeto-editor ol li:last-child,.editor-content__wrapper.neeto-editor ul li:last-child{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor .neeto-editor-table{margin:8px 0 0}.editor-content__wrapper.neeto-editor .neeto-editor-table table{border-radius:0}.editor-content__wrapper.neeto-editor .neeto-editor-table p{margin-bottom:0}.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-row{visibility:hidden}.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-row{visibility:visible}ins{background-color:#c1f4cb!important;text-decoration:none!important}del{background-color:#faa!important}";
23
23
  n(css,{});
24
24
 
25
25
  var useEditor = function useEditor(_ref) {
package/dist/Insights.js CHANGED
@@ -203,6 +203,7 @@ var MetricItem = function MetricItem(_ref) {
203
203
  className: "flex items-end"
204
204
  }, isTime ? renderTime(value) : /*#__PURE__*/React__default.createElement(Typography, {
205
205
  className: "mr-1",
206
+ "data-cy": "insights-count",
206
207
  "data-testid": "insights-count",
207
208
  style: "h1",
208
209
  weight: "semibold"
@@ -1 +1 @@
1
- {"version":3,"file":"Insights.js","sources":["../src/components/Insights/constants.js","../src/components/Insights/MetaInfo/PercentageBar.jsx","../src/components/Insights/MetaInfo/MetaInfoItem.jsx","../src/components/Insights/MetaInfo/DataDistribution.jsx","../src/components/Insights/utils.js","../src/components/Insights/MetaInfo/index.jsx","../src/components/Insights/TimeItem.jsx","../src/components/Insights/MetricItem.jsx","../src/components/Insights/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nexport const DEFAULT_DEVICES = [\n {\n label: t(\"neetoMolecules.insights.labels.devices.desktop\"),\n value: \"desktop\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.devices.mobile\"),\n value: \"smartphone\",\n },\n];\n\nexport const DEFAULT_OS = [\n { label: t(\"neetoMolecules.insights.labels.os.macos\"), value: \"mac\" },\n {\n label: t(\"neetoMolecules.insights.labels.os.windows\"),\n value: \"windows\",\n },\n];\n\nexport const DEFAULT_BROWSERS = [\n {\n label: t(\"neetoMolecules.insights.labels.browsers.chrome\"),\n value: \"chrome\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.browsers.safari\"),\n value: \"safari\",\n },\n];\n\nexport const INITIAL_TIME_PERIOD_VALUE = {\n label: t(\"neetoMolecules.insights.labels.allTime\"),\n value: { startDate: null, endDate: null, rangeType: \"all\" },\n};\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst PercentageBar = ({ value }) => (\n <>\n {value && (\n <div\n className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2\"\n style={{ width: `${value}%` }}\n />\n )}\n <Typography style=\"body3\">{value}%</Typography>\n </>\n);\n\nexport default memo(PercentageBar);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport PercentageBar from \"./PercentageBar\";\n\nconst MetaInfoItem = ({ name, value }) => (\n <>\n <Typography style=\"body2\" textTransform=\"capitalize\">\n {name}\n </Typography>\n <div className=\"col-span-3 flex items-center gap-2\">\n <PercentageBar {...{ value }} />\n </div>\n </>\n);\n\nexport default memo(MetaInfoItem);\n","import React from \"react\";\n\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nconst DataDistribution = ({ data }) => (\n <div className=\"grid grid-cols-4 gap-2\">\n {data.map(({ name, value }) => (\n <MetaInfoItem {...{ name, value }} key={name} />\n ))}\n </div>\n);\n\nexport default DataDistribution;\n","import { existsBy } from \"neetocist\";\n\nconst getSum = (data, searchKey) => {\n let sum = 0;\n for (const key in data) {\n if (key.includes(searchKey)) sum += data[key];\n }\n\n return sum;\n};\n\nexport const transformInsights = (data, defaultItems) => {\n const othersData = Object.keys(data)\n .filter(key => !existsBy({ value: key }, defaultItems))\n .map(key => ({ name: key, value: data[key] }));\n\n const defaultData = defaultItems.map(({ label, value }) => ({\n name: label,\n value: getSum(data, value) || 0,\n }));\n\n return { defaultData, othersData };\n};\n","import React, { memo } from \"react\";\n\nimport { Tooltip, Typography } from \"neetoui\";\nimport { pluck, sum, values } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DataDistribution from \"./DataDistribution\";\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nimport { transformInsights } from \"../utils\";\n\nconst MetaInfo = ({ type, data, defaultItems }) => {\n const { t } = useTranslation();\n const { defaultData, othersData } = transformInsights(data, defaultItems);\n\n const othersSum = sum(values(pluck(\"value\", othersData)));\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-rounded p-4\">\n <Typography\n className=\"mb-4\"\n style=\"h6\"\n textTransform=\"uppercase\"\n weight=\"bold\"\n >\n {type}\n </Typography>\n <DataDistribution data={defaultData} />\n <Tooltip\n content={<DataDistribution data={othersData} />}\n disabled={!othersSum}\n position=\"bottom\"\n >\n <div className=\"mt-2 grid grid-cols-4 gap-2\">\n <MetaInfoItem\n name={t(\"neetoMolecules.insights.others\")}\n value={othersSum}\n />\n </div>\n </Tooltip>\n </div>\n );\n};\n\nexport default memo(MetaInfo);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst TimeItem = ({ value, suffix }) => (\n <div className=\"flex items-end\" data-testid=\"time-item\">\n <Typography className=\"mr-1\" style=\"h1\" weight=\"semibold\">\n {value}\n </Typography>\n <Typography lineHeight=\"loose\" style=\"body2\">\n {suffix}\n </Typography>\n </div>\n);\n\nexport default memo(TimeItem);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport HelpPopover from \"components/HelpPopover\";\n\nimport TimeItem from \"./TimeItem\";\n\nconst MetricItem = ({ metric, value, helpText, isTime, isPercentage }) => {\n const renderTime = value => {\n const { h: hours, m: minutes, s: seconds } = value;\n const showSeconds = !hours && !minutes;\n\n return (\n <div className=\"flex gap-2\">\n {!!hours && <TimeItem suffix=\"H\" value={hours} />}\n {!!minutes && <TimeItem suffix=\"M\" value={minutes} />}\n {(!!seconds || showSeconds) && <TimeItem suffix=\"S\" value={seconds} />}\n </div>\n );\n };\n\n return (\n <div className=\"nf-insights__metric-item neeto-ui-border-gray-200 border-b pb-4\">\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex items-end\">\n {isTime ? (\n renderTime(value)\n ) : (\n <Typography\n className=\"mr-1\"\n data-testid=\"insights-count\"\n style=\"h1\"\n weight=\"semibold\"\n >\n {value || 0}\n {isPercentage ? \"%\" : \"\"}\n </Typography>\n )}\n </div>\n {helpText && (\n <div>\n <HelpPopover description={helpText} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-700\"\n data-cy=\"insights-type\"\n style=\"body2\"\n >\n {metric}\n </Typography>\n </div>\n );\n};\n\nexport default memo(MetricItem);\n","import React from \"react\";\n\nimport { Warning } from \"neetoicons\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DateRangeFilter from \"components/DateRangeFilter\";\nimport PageLoader from \"components/PageLoader\";\n\nimport { DEFAULT_DEVICES, DEFAULT_BROWSERS, DEFAULT_OS } from \"./constants\";\nimport MetaInfo from \"./MetaInfo\";\nimport MetricItem from \"./MetricItem\";\n\nconst Insights = ({\n insightsData,\n isLoading,\n timePeriod,\n setTimePeriod,\n helpTexts = {},\n showWarningMessage = false,\n}) => {\n const { t } = useTranslation();\n\n const {\n visitCount,\n startCount,\n submissionCount,\n completionRate,\n averageSubmissionTime,\n devices,\n operatingSystems,\n browsers,\n } = insightsData;\n\n if (isLoading) return <PageLoader />;\n\n return (\n <div className=\"mx-auto pt-10\" data-testid=\"insights\">\n <div className=\"mb-11 flex w-full items-center \">\n <Typography data-cy=\"submissions-insights-title\" style=\"h2\">\n {t(\"neetoMolecules.insights.title\")}\n </Typography>\n {showWarningMessage && (\n <Tooltip\n content={t(\"neetoMolecules.insights.dataInaccuracyWarning\")}\n position=\"right\"\n >\n <span className=\"ml-3\">\n <Warning\n className=\"neeto-ui-text-warning-500\"\n data-testid=\"insights-warning\"\n size={20}\n />\n </span>\n </Tooltip>\n )}\n <span className=\"ml-auto\">\n <DateRangeFilter {...{ setTimePeriod, timePeriod }} />\n </span>\n </div>\n <div className=\"mb-8 flex flex-wrap justify-between\">\n <MetricItem\n helpText={helpTexts[\"visitCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.visits\")}\n value={visitCount}\n />\n <MetricItem\n helpText={helpTexts[\"startCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.starts\")}\n value={startCount}\n />\n <MetricItem\n helpText={helpTexts[\"submissions\"]}\n metric={t(\"neetoMolecules.insights.metrics.submissions\")}\n value={submissionCount}\n />\n <MetricItem\n isPercentage\n helpText={helpTexts[\"completionRate\"]}\n metric={t(\"neetoMolecules.insights.metrics.completionRate\")}\n value={completionRate}\n />\n <MetricItem\n isTime\n helpText={helpTexts[\"averageSubmissionTime\"]}\n metric={t(\"neetoMolecules.insights.metrics.avgTimeToComplete\")}\n timeSuffix={t(\"neetoMolecules.insights.mins\")}\n value={averageSubmissionTime}\n />\n </div>\n <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3\">\n <MetaInfo\n data={devices}\n defaultItems={DEFAULT_DEVICES}\n type={t(\"neetoMolecules.insights.devices\")}\n />\n <MetaInfo\n data={operatingSystems}\n defaultItems={DEFAULT_OS}\n type={t(\"neetoMolecules.insights.os\")}\n />\n <MetaInfo\n data={browsers}\n defaultItems={DEFAULT_BROWSERS}\n type={t(\"neetoMolecules.insights.browsers\")}\n />\n </div>\n </div>\n );\n};\n\nInsights.propTypes = {\n /**\n * Object containing metrics and statistics for insights\n */\n insightsData: PropTypes.shape({\n visitCount: PropTypes.number,\n startCount: PropTypes.number,\n submissionCount: PropTypes.number,\n completionRate: PropTypes.number,\n averageSubmissionTime: PropTypes.shape({\n h: PropTypes.number,\n m: PropTypes.number,\n s: PropTypes.number,\n }),\n devices: PropTypes.shape({\n desktop: PropTypes.number,\n smartphone: PropTypes.number,\n }),\n operatingSystems: PropTypes.shape({\n mac: PropTypes.number,\n windows: PropTypes.number,\n }),\n browsers: PropTypes.shape({\n chrome: PropTypes.number,\n safari: PropTypes.number,\n }),\n }),\n /**\n * Indicates whether insights data is currently being fetched from an API\n */\n isLoading: PropTypes.bool,\n /**\n * The state corresponding to the currently selected date range.\n */\n timePeriod: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.object,\n }),\n /**\n * The setter method for `timePeriod` state.\n */\n setTimePeriod: PropTypes.func,\n /**\n * Object containing explanatory text for each metric, providing additional context that can help users understand the significance of the metrics displayed.\n */\n helpTexts: PropTypes.shape({\n visitCount: PropTypes.string,\n startCount: PropTypes.string,\n submissions: PropTypes.string,\n completionRate: PropTypes.string,\n averageSubmissionTime: PropTypes.string,\n }),\n /**\n * Displays a warning to indicate that the insights may not be accurate, as the insights integration occurred after the record's creation.\n */\n showWarningMessage: PropTypes.bool,\n};\n\nexport default Insights;\n"],"names":["DEFAULT_DEVICES","label","t","value","DEFAULT_OS","DEFAULT_BROWSERS","startDate","endDate","rangeType","PercentageBar","_ref","React","createElement","Fragment","className","style","width","concat","Typography","memo","MetaInfoItem","name","textTransform","DataDistribution","data","map","_ref2","key","getSum","searchKey","sum","includes","transformInsights","defaultItems","othersData","Object","keys","filter","existsBy","defaultData","MetaInfo","type","_useTranslation","useTranslation","_transformInsights","othersSum","values","pluck","weight","Tooltip","content","disabled","position","TimeItem","suffix","lineHeight","MetricItem","metric","helpText","isTime","isPercentage","renderTime","hours","h","minutes","m","seconds","s","showSeconds","HelpPopover","description","Insights","insightsData","isLoading","timePeriod","setTimePeriod","_ref$helpTexts","helpTexts","_ref$showWarningMessa","showWarningMessage","visitCount","startCount","submissionCount","completionRate","averageSubmissionTime","devices","operatingSystems","browsers","PageLoader","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YAAY,EAAE5B,gBAAiB;IAC/BoC,IAAI,EAAEvC,CAAC,CAAC,kCAAkC,CAAA;GAC3C,CACE,CACF,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Insights.js","sources":["../src/components/Insights/constants.js","../src/components/Insights/MetaInfo/PercentageBar.jsx","../src/components/Insights/MetaInfo/MetaInfoItem.jsx","../src/components/Insights/MetaInfo/DataDistribution.jsx","../src/components/Insights/utils.js","../src/components/Insights/MetaInfo/index.jsx","../src/components/Insights/TimeItem.jsx","../src/components/Insights/MetricItem.jsx","../src/components/Insights/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nexport const DEFAULT_DEVICES = [\n {\n label: t(\"neetoMolecules.insights.labels.devices.desktop\"),\n value: \"desktop\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.devices.mobile\"),\n value: \"smartphone\",\n },\n];\n\nexport const DEFAULT_OS = [\n { label: t(\"neetoMolecules.insights.labels.os.macos\"), value: \"mac\" },\n {\n label: t(\"neetoMolecules.insights.labels.os.windows\"),\n value: \"windows\",\n },\n];\n\nexport const DEFAULT_BROWSERS = [\n {\n label: t(\"neetoMolecules.insights.labels.browsers.chrome\"),\n value: \"chrome\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.browsers.safari\"),\n value: \"safari\",\n },\n];\n\nexport const INITIAL_TIME_PERIOD_VALUE = {\n label: t(\"neetoMolecules.insights.labels.allTime\"),\n value: { startDate: null, endDate: null, rangeType: \"all\" },\n};\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst PercentageBar = ({ value }) => (\n <>\n {value && (\n <div\n className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2\"\n style={{ width: `${value}%` }}\n />\n )}\n <Typography style=\"body3\">{value}%</Typography>\n </>\n);\n\nexport default memo(PercentageBar);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport PercentageBar from \"./PercentageBar\";\n\nconst MetaInfoItem = ({ name, value }) => (\n <>\n <Typography style=\"body2\" textTransform=\"capitalize\">\n {name}\n </Typography>\n <div className=\"col-span-3 flex items-center gap-2\">\n <PercentageBar {...{ value }} />\n </div>\n </>\n);\n\nexport default memo(MetaInfoItem);\n","import React from \"react\";\n\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nconst DataDistribution = ({ data }) => (\n <div className=\"grid grid-cols-4 gap-2\">\n {data.map(({ name, value }) => (\n <MetaInfoItem {...{ name, value }} key={name} />\n ))}\n </div>\n);\n\nexport default DataDistribution;\n","import { existsBy } from \"neetocist\";\n\nconst getSum = (data, searchKey) => {\n let sum = 0;\n for (const key in data) {\n if (key.includes(searchKey)) sum += data[key];\n }\n\n return sum;\n};\n\nexport const transformInsights = (data, defaultItems) => {\n const othersData = Object.keys(data)\n .filter(key => !existsBy({ value: key }, defaultItems))\n .map(key => ({ name: key, value: data[key] }));\n\n const defaultData = defaultItems.map(({ label, value }) => ({\n name: label,\n value: getSum(data, value) || 0,\n }));\n\n return { defaultData, othersData };\n};\n","import React, { memo } from \"react\";\n\nimport { Tooltip, Typography } from \"neetoui\";\nimport { pluck, sum, values } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DataDistribution from \"./DataDistribution\";\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nimport { transformInsights } from \"../utils\";\n\nconst MetaInfo = ({ type, data, defaultItems }) => {\n const { t } = useTranslation();\n const { defaultData, othersData } = transformInsights(data, defaultItems);\n\n const othersSum = sum(values(pluck(\"value\", othersData)));\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-rounded p-4\">\n <Typography\n className=\"mb-4\"\n style=\"h6\"\n textTransform=\"uppercase\"\n weight=\"bold\"\n >\n {type}\n </Typography>\n <DataDistribution data={defaultData} />\n <Tooltip\n content={<DataDistribution data={othersData} />}\n disabled={!othersSum}\n position=\"bottom\"\n >\n <div className=\"mt-2 grid grid-cols-4 gap-2\">\n <MetaInfoItem\n name={t(\"neetoMolecules.insights.others\")}\n value={othersSum}\n />\n </div>\n </Tooltip>\n </div>\n );\n};\n\nexport default memo(MetaInfo);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst TimeItem = ({ value, suffix }) => (\n <div className=\"flex items-end\" data-testid=\"time-item\">\n <Typography className=\"mr-1\" style=\"h1\" weight=\"semibold\">\n {value}\n </Typography>\n <Typography lineHeight=\"loose\" style=\"body2\">\n {suffix}\n </Typography>\n </div>\n);\n\nexport default memo(TimeItem);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport HelpPopover from \"components/HelpPopover\";\n\nimport TimeItem from \"./TimeItem\";\n\nconst MetricItem = ({ metric, value, helpText, isTime, isPercentage }) => {\n const renderTime = value => {\n const { h: hours, m: minutes, s: seconds } = value;\n const showSeconds = !hours && !minutes;\n\n return (\n <div className=\"flex gap-2\">\n {!!hours && <TimeItem suffix=\"H\" value={hours} />}\n {!!minutes && <TimeItem suffix=\"M\" value={minutes} />}\n {(!!seconds || showSeconds) && <TimeItem suffix=\"S\" value={seconds} />}\n </div>\n );\n };\n\n return (\n <div className=\"nf-insights__metric-item neeto-ui-border-gray-200 border-b pb-4\">\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex items-end\">\n {isTime ? (\n renderTime(value)\n ) : (\n <Typography\n className=\"mr-1\"\n data-cy=\"insights-count\"\n data-testid=\"insights-count\"\n style=\"h1\"\n weight=\"semibold\"\n >\n {value || 0}\n {isPercentage ? \"%\" : \"\"}\n </Typography>\n )}\n </div>\n {helpText && (\n <div>\n <HelpPopover description={helpText} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-700\"\n data-cy=\"insights-type\"\n style=\"body2\"\n >\n {metric}\n </Typography>\n </div>\n );\n};\n\nexport default memo(MetricItem);\n","import React from \"react\";\n\nimport { Warning } from \"neetoicons\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DateRangeFilter from \"components/DateRangeFilter\";\nimport PageLoader from \"components/PageLoader\";\n\nimport { DEFAULT_DEVICES, DEFAULT_BROWSERS, DEFAULT_OS } from \"./constants\";\nimport MetaInfo from \"./MetaInfo\";\nimport MetricItem from \"./MetricItem\";\n\nconst Insights = ({\n insightsData,\n isLoading,\n timePeriod,\n setTimePeriod,\n helpTexts = {},\n showWarningMessage = false,\n}) => {\n const { t } = useTranslation();\n\n const {\n visitCount,\n startCount,\n submissionCount,\n completionRate,\n averageSubmissionTime,\n devices,\n operatingSystems,\n browsers,\n } = insightsData;\n\n if (isLoading) return <PageLoader />;\n\n return (\n <div className=\"mx-auto pt-10\" data-testid=\"insights\">\n <div className=\"mb-11 flex w-full items-center \">\n <Typography data-cy=\"submissions-insights-title\" style=\"h2\">\n {t(\"neetoMolecules.insights.title\")}\n </Typography>\n {showWarningMessage && (\n <Tooltip\n content={t(\"neetoMolecules.insights.dataInaccuracyWarning\")}\n position=\"right\"\n >\n <span className=\"ml-3\">\n <Warning\n className=\"neeto-ui-text-warning-500\"\n data-testid=\"insights-warning\"\n size={20}\n />\n </span>\n </Tooltip>\n )}\n <span className=\"ml-auto\">\n <DateRangeFilter {...{ setTimePeriod, timePeriod }} />\n </span>\n </div>\n <div className=\"mb-8 flex flex-wrap justify-between\">\n <MetricItem\n helpText={helpTexts[\"visitCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.visits\")}\n value={visitCount}\n />\n <MetricItem\n helpText={helpTexts[\"startCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.starts\")}\n value={startCount}\n />\n <MetricItem\n helpText={helpTexts[\"submissions\"]}\n metric={t(\"neetoMolecules.insights.metrics.submissions\")}\n value={submissionCount}\n />\n <MetricItem\n isPercentage\n helpText={helpTexts[\"completionRate\"]}\n metric={t(\"neetoMolecules.insights.metrics.completionRate\")}\n value={completionRate}\n />\n <MetricItem\n isTime\n helpText={helpTexts[\"averageSubmissionTime\"]}\n metric={t(\"neetoMolecules.insights.metrics.avgTimeToComplete\")}\n timeSuffix={t(\"neetoMolecules.insights.mins\")}\n value={averageSubmissionTime}\n />\n </div>\n <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3\">\n <MetaInfo\n data={devices}\n defaultItems={DEFAULT_DEVICES}\n type={t(\"neetoMolecules.insights.devices\")}\n />\n <MetaInfo\n data={operatingSystems}\n defaultItems={DEFAULT_OS}\n type={t(\"neetoMolecules.insights.os\")}\n />\n <MetaInfo\n data={browsers}\n defaultItems={DEFAULT_BROWSERS}\n type={t(\"neetoMolecules.insights.browsers\")}\n />\n </div>\n </div>\n );\n};\n\nInsights.propTypes = {\n /**\n * Object containing metrics and statistics for insights\n */\n insightsData: PropTypes.shape({\n visitCount: PropTypes.number,\n startCount: PropTypes.number,\n submissionCount: PropTypes.number,\n completionRate: PropTypes.number,\n averageSubmissionTime: PropTypes.shape({\n h: PropTypes.number,\n m: PropTypes.number,\n s: PropTypes.number,\n }),\n devices: PropTypes.shape({\n desktop: PropTypes.number,\n smartphone: PropTypes.number,\n }),\n operatingSystems: PropTypes.shape({\n mac: PropTypes.number,\n windows: PropTypes.number,\n }),\n browsers: PropTypes.shape({\n chrome: PropTypes.number,\n safari: PropTypes.number,\n }),\n }),\n /**\n * Indicates whether insights data is currently being fetched from an API\n */\n isLoading: PropTypes.bool,\n /**\n * The state corresponding to the currently selected date range.\n */\n timePeriod: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.object,\n }),\n /**\n * The setter method for `timePeriod` state.\n */\n setTimePeriod: PropTypes.func,\n /**\n * Object containing explanatory text for each metric, providing additional context that can help users understand the significance of the metrics displayed.\n */\n helpTexts: PropTypes.shape({\n visitCount: PropTypes.string,\n startCount: PropTypes.string,\n submissions: PropTypes.string,\n completionRate: PropTypes.string,\n averageSubmissionTime: PropTypes.string,\n }),\n /**\n * Displays a warning to indicate that the insights may not be accurate, as the insights integration occurred after the record's creation.\n */\n showWarningMessage: PropTypes.bool,\n};\n\nexport default Insights;\n"],"names":["DEFAULT_DEVICES","label","t","value","DEFAULT_OS","DEFAULT_BROWSERS","startDate","endDate","rangeType","PercentageBar","_ref","React","createElement","Fragment","className","style","width","concat","Typography","memo","MetaInfoItem","name","textTransform","DataDistribution","data","map","_ref2","key","getSum","searchKey","sum","includes","transformInsights","defaultItems","othersData","Object","keys","filter","existsBy","defaultData","MetaInfo","type","_useTranslation","useTranslation","_transformInsights","othersSum","values","pluck","weight","Tooltip","content","disabled","position","TimeItem","suffix","lineHeight","MetricItem","metric","helpText","isTime","isPercentage","renderTime","hours","h","minutes","m","seconds","s","showSeconds","HelpPopover","description","Insights","insightsData","isLoading","timePeriod","setTimePeriod","_ref$helpTexts","helpTexts","_ref$showWarningMessa","showWarningMessage","visitCount","startCount","submissionCount","completionRate","averageSubmissionTime","devices","operatingSystems","browsers","PageLoader","Warning","size","DateRangeFilter","timeSuffix"],"mappings":";;;;;;;;;;;;;;;;;;AAEO,IAAMA,eAAe,GAAG,CAC7B;AACEC,EAAAA,KAAK,EAAEC,CAAC,CAAC,gDAAgD,CAAC;AAC1DC,EAAAA,KAAK,EAAE,SAAA;AACT,CAAC,EACD;AACEF,EAAAA,KAAK,EAAEC,CAAC,CAAC,+CAA+C,CAAC;AACzDC,EAAAA,KAAK,EAAE,YAAA;AACT,CAAC,CACF,CAAA;AAEM,IAAMC,UAAU,GAAG,CACxB;AAAEH,EAAAA,KAAK,EAAEC,CAAC,CAAC,yCAAyC,CAAC;AAAEC,EAAAA,KAAK,EAAE,KAAA;AAAM,CAAC,EACrE;AACEF,EAAAA,KAAK,EAAEC,CAAC,CAAC,2CAA2C,CAAC;AACrDC,EAAAA,KAAK,EAAE,SAAA;AACT,CAAC,CACF,CAAA;AAEM,IAAME,gBAAgB,GAAG,CAC9B;AACEJ,EAAAA,KAAK,EAAEC,CAAC,CAAC,gDAAgD,CAAC;AAC1DC,EAAAA,KAAK,EAAE,QAAA;AACT,CAAC,EACD;AACEF,EAAAA,KAAK,EAAEC,CAAC,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AAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKE,IAAAA,SAAS,EAAC,sDAAA;AAAsD,GAAA,eACnEH,cAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE6D,OAAQ;AACdpD,IAAAA,YAAY,EAAEjC,eAAgB;IAC9ByC,IAAI,EAAEvC,CAAC,CAAC,iCAAiC,CAAA;AAAE,GAC5C,CAAC,eACFS,cAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE8D,gBAAiB;AACvBrD,IAAAA,YAAY,EAAE7B,UAAW;IACzBqC,IAAI,EAAEvC,CAAC,CAAC,4BAA4B,CAAA;AAAE,GACvC,CAAC,eACFS,cAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE+D,QAAS;AACftD,IAAAA,YAAY,EAAE5B,gBAAiB;IAC/BoC,IAAI,EAAEvC,CAAC,CAAC,kCAAkC,CAAA;GAC3C,CACE,CACF,CAAC,CAAA;AAEV;;;;"}
@@ -1,4 +1,5 @@
1
- import React__default, { useMemo } from 'react';
1
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
+ import React__default, { useMemo, useState } from 'react';
2
3
  import classnames from 'classnames';
3
4
  import { noop } from '@bigbinary/neeto-cist';
4
5
  import { Typography, Button, Stepper } from '@bigbinary/neetoui';
@@ -42,7 +43,7 @@ var CompletedScreen = withT(function (_ref) {
42
43
  }, completeButtonProps)));
43
44
  });
44
45
 
45
- var css = ".neeto-molecules-onboarding__wrapper{align-items:center;display:flex;flex-direction:column;flex-grow:1;height:100vh;overflow-y:auto;padding:15vh 32px 32px;width:100%}.neeto-molecules-onboarding__container{display:flex;flex-direction:column;height:100vh;overflow-y:auto;position:relative;width:100%}.neeto-molecules-onboarding__stepper-wrapper{background-color:rgb(var(--neeto-ui-white));border-bottom:1px solid rgb(var(--neeto-ui-gray-200));display:flex;flex-shrink:0;padding:8px 16px;width:100%}@media (min-width:1024px){.neeto-molecules-onboarding__stepper-wrapper{justify-content:center}}.neeto-molecules-onboarding__content{flex-grow:1;min-height:0;overflow-y:auto;width:100%}";
46
+ var css = ".neeto-molecules-onboarding__wrapper{align-items:center;display:flex;flex-direction:column;flex-grow:1;height:100vh;overflow-y:auto;padding:15vh 32px 32px;width:100%}.neeto-molecules-onboarding__container{display:flex;flex-direction:column;height:100vh;overflow-y:auto;position:relative;width:100%}.neeto-molecules-onboarding__stepper-wrapper{background-color:rgb(var(--neeto-ui-white));border-bottom:1px solid rgb(var(--neeto-ui-gray-200));display:flex;flex-shrink:0;padding:8px 16px;width:100%}@media (min-width:1024px){.neeto-molecules-onboarding__stepper-wrapper{justify-content:center}}.neeto-molecules-onboarding__content{flex-grow:1;min-height:0;overflow-y:auto;width:100%}.neeto-molecules-onboarding__content--forward{animation:slideInRight .4s ease backwards}.neeto-molecules-onboarding__content--backward{animation:slideInLeft .4s ease backwards}@keyframes slideInRight{0%{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}";
46
47
  n(css,{});
47
48
 
48
49
  var HelpScreen = function HelpScreen(_ref) {
@@ -141,7 +142,6 @@ var WelcomeScreen = withT(function (_ref) {
141
142
  });
142
143
 
143
144
  var Onboarding = function Onboarding(_ref) {
144
- var _steps;
145
145
  var _ref$currentStep = _ref.currentStep,
146
146
  currentStep = _ref$currentStep === void 0 ? 0 : _ref$currentStep,
147
147
  _ref$setCurrentStep = _ref.setCurrentStep,
@@ -151,10 +151,16 @@ var Onboarding = function Onboarding(_ref) {
151
151
  _ref$completeButtonPr = _ref.completeButtonProps,
152
152
  completeButtonProps = _ref$completeButtonPr === void 0 ? {} : _ref$completeButtonPr,
153
153
  _ref$helpScreenClassN = _ref.helpScreenClassName,
154
- helpScreenClassName = _ref$helpScreenClassN === void 0 ? "" : _ref$helpScreenClassN;
154
+ helpScreenClassName = _ref$helpScreenClassN === void 0 ? "" : _ref$helpScreenClassN,
155
+ _ref$isAnimated = _ref.isAnimated,
156
+ isAnimated = _ref$isAnimated === void 0 ? true : _ref$isAnimated;
155
157
  var steps = useMemo(function () {
156
158
  return createSteps(onboardingSteps, setCurrentStep, currentStep, helpScreenClassName);
157
159
  }, [onboardingSteps]);
160
+ var _useState = useState(""),
161
+ _useState2 = _slicedToArray(_useState, 2),
162
+ direction = _useState2[0],
163
+ setDirection = _useState2[1];
158
164
  if (currentStep === 0) {
159
165
  return /*#__PURE__*/React__default.createElement(WelcomeScreen, {
160
166
  currentStep: currentStep,
@@ -167,7 +173,9 @@ var Onboarding = function Onboarding(_ref) {
167
173
  });
168
174
  }
169
175
  var handleStepChange = function handleStepChange(index) {
170
- return setCurrentStep(index + 1);
176
+ var nextStep = index + 1;
177
+ setDirection(currentStep > nextStep ? "backward" : "forward");
178
+ setCurrentStep(nextStep);
171
179
  };
172
180
  var isStepperVisible = steps.length > 1;
173
181
  return /*#__PURE__*/React__default.createElement("div", {
@@ -180,9 +188,16 @@ var Onboarding = function Onboarding(_ref) {
180
188
  steps: steps,
181
189
  activeIndex: currentStep - 1,
182
190
  setActiveIndex: handleStepChange
183
- })), /*#__PURE__*/React__default.createElement("div", {
184
- className: "neeto-molecules-onboarding__content"
185
- }, (_steps = steps[currentStep - 1]) === null || _steps === void 0 ? void 0 : _steps.element));
191
+ })), steps.map(function (step, index) {
192
+ return /*#__PURE__*/React__default.createElement("div", {
193
+ key: index,
194
+ className: classnames("neeto-molecules-onboarding__content", {
195
+ "neeto-molecules-onboarding__content--forward overflow-x-hidden": isAnimated && direction === "forward",
196
+ "neeto-molecules-onboarding__content--backward overflow-x-hidden": isAnimated && direction === "backward",
197
+ hidden: currentStep - 1 !== index
198
+ })
199
+ }, step === null || step === void 0 ? void 0 : step.element);
200
+ }));
186
201
  };
187
202
 
188
203
  export { Onboarding as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Onboarding.js","sources":["../src/components/Onboarding/CompletedScreen.jsx","../src/components/Onboarding/HelpScreen.jsx","../src/components/Onboarding/utils.jsx","../src/components/Onboarding/WelcomeScreen.jsx","../src/components/Onboarding/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { Button, Typography } from \"neetoui\";\n\nconst CompletedScreen = withT(({ t, completeButtonProps }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-congratulations-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-emoji\"\n style=\"h1\"\n >\n 🎉\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-title\"\n data-testid=\"onboarding-congratulations-title\"\n style=\"h1\"\n >\n <span className=\"neeto-ui-text-success-500\">\n {t(\"neetoMolecules.onboarding.congratulations\")}\n </span>\n <br />\n {t(\"neetoMolecules.onboarding.readyToUse\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-congratulations-button\"\n data-testid=\"onboarding-congratulations-button\"\n label={t(\"neetoMolecules.onboarding.helpScreen.startUsingButton\", {\n appName: globalProps.appName,\n })}\n {...completeButtonProps}\n />\n </div>\n));\n\nexport default CompletedScreen;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst HelpScreen = ({ setCurrentStep, currentStep, helpScreenClassName }) => {\n const { t } = useTranslation();\n const { isSize } = useBreakpoints();\n\n return (\n <div\n className={classNames(\n \"mx-auto w-full max-w-2xl space-y-6 p-4\",\n helpScreenClassName\n )}\n >\n <div className=\"space-y-3\">\n <Typography\n component=\"h1\"\n data-cy=\"onboarding-help-title\"\n data-testid=\"onboarding-help-title\"\n style=\"h2\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.title\")}\n </Typography>\n <Typography\n data-cy=\"onboarding-help-description\"\n data-testid=\"onboarding-help-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.description\")}\n </Typography>\n <div className=\"w-full\">\n {isSize(\"mobile\") ? (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-mobile_FpB8LKYj4.svg\"\n />\n ) : (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-desktop_aVe6ENdX97.svg\"\n />\n )}\n </div>\n </div>\n <Button\n data-cy=\"onboarding-help-button\"\n data-testid=\"onboarding-help-button\"\n icon={RightArrow}\n iconPosition=\"right\"\n label={t(\"neetoMolecules.onboarding.helpScreen.continueButton\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n );\n};\n\nexport default HelpScreen;\n","import React from \"react\";\n\nimport { t } from \"i18next\";\n\nimport HelpScreen from \"./HelpScreen\";\n\nexport const createSteps = (\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n) => {\n const helpStep = {\n label: t(\"neetoMolecules.onboarding.helpLabel\"),\n element: (\n <HelpScreen {...{ currentStep, helpScreenClassName, setCurrentStep }} />\n ),\n };\n\n return onboardingSteps\n .concat(helpStep)\n .map((step, idx) => ({ ...step, id: idx + 1 }));\n};\n","import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nconst WelcomeScreen = withT(({ t, setCurrentStep, currentStep }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-welcome-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-title\"\n data-testid=\"onboarding-welcome-title\"\n style=\"h1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.welcomeToTitle\", {\n appName: globalProps.appName,\n })}\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-description\"\n data-testid=\"onboarding-welcome-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.letUsCustomize\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-welcome-button\"\n data-testid=\"onboarding-welcome-button\"\n icon={RightArrow}\n label={t(\"neetoMolecules.onboarding.getStarted\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n));\n\nexport default WelcomeScreen;\n","import React, { useMemo } from \"react\";\n\nimport classNames from \"classnames\";\nimport { noop } from \"neetocist\";\nimport { Stepper } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport CompletedScreen from \"./CompletedScreen\";\nimport \"./onboarding.scss\";\nimport { createSteps } from \"./utils\";\nimport WelcomeScreen from \"./WelcomeScreen\";\n\nconst Onboarding = ({\n currentStep = 0,\n setCurrentStep = noop,\n onboardingSteps = [],\n completeButtonProps = {},\n helpScreenClassName = \"\",\n}) => {\n const steps = useMemo(\n () =>\n createSteps(\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n ),\n [onboardingSteps]\n );\n\n if (currentStep === 0) {\n return <WelcomeScreen {...{ currentStep, setCurrentStep }} />;\n }\n\n if (currentStep === steps.length + 1) {\n return <CompletedScreen {...{ completeButtonProps }} />;\n }\n\n const handleStepChange = index => setCurrentStep(index + 1);\n\n const isStepperVisible = steps.length > 1;\n\n return (\n <div\n className={classNames(\"neeto-molecules-onboarding__container\", {\n \"neeto-molecules-onboarding__wrapper\": !isStepperVisible,\n })}\n >\n {isStepperVisible && (\n <div className=\"neeto-molecules-onboarding__stepper-wrapper\">\n <Stepper\n {...{ steps }}\n activeIndex={currentStep - 1}\n setActiveIndex={handleStepChange}\n />\n </div>\n )}\n <div className=\"neeto-molecules-onboarding__content\">\n {steps[currentStep - 1]?.element}\n </div>\n </div>\n );\n};\n\nOnboarding.propTypes = {\n /**\n * To specify the current step of the onboarding\n */\n currentStep: PropTypes.number,\n /**\n * List of Custom components for the onboarding\n */\n onboardingSteps: PropTypes.array,\n /**\n * Props for the complete button\n */\n completeButtonProps: PropTypes.object,\n /**\n * To set the step of the onboarding\n */\n setCurrentStep: PropTypes.func,\n /**\n * To pass additional classes to the help screen\n */\n helpScreenClassName: PropTypes.string,\n};\n\nexport default Onboarding;\n"],"names":["CompletedScreen","withT","_ref","t","completeButtonProps","React","createElement","className","Typography","style","appName","globalProps","Button","_extends","label","HelpScreen","setCurrentStep","currentStep","helpScreenClassName","_useTranslation","useTranslation","_useBreakpoints","useBreakpoints","isSize","classNames","component","lineHeight","alt","src","icon","RightArrow","iconPosition","onClick","createSteps","onboardingSteps","helpStep","element","concat","map","step","idx","_objectSpread","id","WelcomeScreen","Onboarding","_steps","_ref$currentStep","_ref$setCurrentStep","noop","_ref$onboardingSteps","_ref$completeButtonPr","_ref$helpScreenClassN","steps","useMemo","length","handleStepChange","index","isStepperVisible","Stepper","activeIndex","setActiveIndex"],"mappings":";;;;;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,KAAK,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAEC,mBAAmB,GAAAF,IAAA,CAAnBE,mBAAmB,CAAA;EAAA,oBACrDC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,qCAAqC;IAC/C,aAAY,EAAA,oCAAA;GAEZF,eAAAA,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,yCAAA;AAAyC,GAAA,eACtDF,cAAA,CAAAC,aAAA,CAACE,UAAU,EAAA;AACTD,IAAAA,SAAS,EAAC,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AAC,CAAA;AAAA,GAAA,CAAA;AAE3D,EAAA,IAAMC,gBAAgB,GAAGL,KAAK,CAACE,MAAM,GAAG,CAAC,CAAA;EAEzC,oBACEjD,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAEiB,UAAU,CAAC,uCAAuC,EAAE;AAC7D,MAAA,qCAAqC,EAAE,CAACiC,gBAAAA;KACzC,CAAA;AAAE,GAAA,EAEFA,gBAAgB,iBACfpD,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,6CAAA;AAA6C,GAAA,eAC1DF,cAAA,CAAAC,aAAA,CAACoD,OAAO,EAAA;AACAN,IAAAA,KAAK,EAALA,KAAK;IACXO,WAAW,EAAE1C,WAAW,GAAG,CAAE;AAC7B2C,IAAAA,cAAc,EAAEL,gBAAAA;AAAiB,GAClC,CACE,CACN,eACDlD,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,qCAAA;AAAqC,GAAA,EAAA,CAAAsC,MAAA,GACjDO,KAAK,CAACnC,WAAW,GAAG,CAAC,CAAC,MAAA,IAAA,IAAA4B,MAAA,KAAtBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAA,CAAwBT,OACtB,CACF,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Onboarding.js","sources":["../src/components/Onboarding/CompletedScreen.jsx","../src/components/Onboarding/HelpScreen.jsx","../src/components/Onboarding/utils.jsx","../src/components/Onboarding/WelcomeScreen.jsx","../src/components/Onboarding/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { Button, Typography } from \"neetoui\";\n\nconst CompletedScreen = withT(({ t, completeButtonProps }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-congratulations-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-emoji\"\n style=\"h1\"\n >\n 🎉\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-title\"\n data-testid=\"onboarding-congratulations-title\"\n style=\"h1\"\n >\n <span className=\"neeto-ui-text-success-500\">\n {t(\"neetoMolecules.onboarding.congratulations\")}\n </span>\n <br />\n {t(\"neetoMolecules.onboarding.readyToUse\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-congratulations-button\"\n data-testid=\"onboarding-congratulations-button\"\n label={t(\"neetoMolecules.onboarding.helpScreen.startUsingButton\", {\n appName: globalProps.appName,\n })}\n {...completeButtonProps}\n />\n </div>\n));\n\nexport default CompletedScreen;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst HelpScreen = ({ setCurrentStep, currentStep, helpScreenClassName }) => {\n const { t } = useTranslation();\n const { isSize } = useBreakpoints();\n\n return (\n <div\n className={classNames(\n \"mx-auto w-full max-w-2xl space-y-6 p-4\",\n helpScreenClassName\n )}\n >\n <div className=\"space-y-3\">\n <Typography\n component=\"h1\"\n data-cy=\"onboarding-help-title\"\n data-testid=\"onboarding-help-title\"\n style=\"h2\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.title\")}\n </Typography>\n <Typography\n data-cy=\"onboarding-help-description\"\n data-testid=\"onboarding-help-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.description\")}\n </Typography>\n <div className=\"w-full\">\n {isSize(\"mobile\") ? (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-mobile_FpB8LKYj4.svg\"\n />\n ) : (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-desktop_aVe6ENdX97.svg\"\n />\n )}\n </div>\n </div>\n <Button\n data-cy=\"onboarding-help-button\"\n data-testid=\"onboarding-help-button\"\n icon={RightArrow}\n iconPosition=\"right\"\n label={t(\"neetoMolecules.onboarding.helpScreen.continueButton\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n );\n};\n\nexport default HelpScreen;\n","import React from \"react\";\n\nimport { t } from \"i18next\";\n\nimport HelpScreen from \"./HelpScreen\";\n\nexport const createSteps = (\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n) => {\n const helpStep = {\n label: t(\"neetoMolecules.onboarding.helpLabel\"),\n element: (\n <HelpScreen {...{ currentStep, helpScreenClassName, setCurrentStep }} />\n ),\n };\n\n return onboardingSteps\n .concat(helpStep)\n .map((step, idx) => ({ ...step, id: idx + 1 }));\n};\n","import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nconst WelcomeScreen = withT(({ t, setCurrentStep, currentStep }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-welcome-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-title\"\n data-testid=\"onboarding-welcome-title\"\n style=\"h1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.welcomeToTitle\", {\n appName: globalProps.appName,\n })}\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-description\"\n data-testid=\"onboarding-welcome-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.letUsCustomize\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-welcome-button\"\n data-testid=\"onboarding-welcome-button\"\n icon={RightArrow}\n label={t(\"neetoMolecules.onboarding.getStarted\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n));\n\nexport default WelcomeScreen;\n","import React, { useMemo, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { noop } from \"neetocist\";\nimport { Stepper } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport CompletedScreen from \"./CompletedScreen\";\nimport \"./onboarding.scss\";\nimport { createSteps } from \"./utils\";\nimport WelcomeScreen from \"./WelcomeScreen\";\n\nconst Onboarding = ({\n currentStep = 0,\n setCurrentStep = noop,\n onboardingSteps = [],\n completeButtonProps = {},\n helpScreenClassName = \"\",\n isAnimated = true,\n}) => {\n const steps = useMemo(\n () =>\n createSteps(\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n ),\n [onboardingSteps]\n );\n const [direction, setDirection] = useState(\"\");\n\n if (currentStep === 0) {\n return <WelcomeScreen {...{ currentStep, setCurrentStep }} />;\n }\n\n if (currentStep === steps.length + 1) {\n return <CompletedScreen {...{ completeButtonProps }} />;\n }\n\n const handleStepChange = index => {\n const nextStep = index + 1;\n setDirection(currentStep > nextStep ? \"backward\" : \"forward\");\n setCurrentStep(nextStep);\n };\n\n const isStepperVisible = steps.length > 1;\n\n return (\n <div\n className={classNames(\"neeto-molecules-onboarding__container\", {\n \"neeto-molecules-onboarding__wrapper\": !isStepperVisible,\n })}\n >\n {isStepperVisible && (\n <div className=\"neeto-molecules-onboarding__stepper-wrapper\">\n <Stepper\n {...{ steps }}\n activeIndex={currentStep - 1}\n setActiveIndex={handleStepChange}\n />\n </div>\n )}\n {steps.map((step, index) => (\n <div\n key={index}\n className={classNames(\"neeto-molecules-onboarding__content\", {\n \"neeto-molecules-onboarding__content--forward overflow-x-hidden\":\n isAnimated && direction === \"forward\",\n \"neeto-molecules-onboarding__content--backward overflow-x-hidden\":\n isAnimated && direction === \"backward\",\n hidden: currentStep - 1 !== index,\n })}\n >\n {step?.element}\n </div>\n ))}\n </div>\n );\n};\n\nOnboarding.propTypes = {\n /**\n * To specify the current step of the onboarding\n */\n currentStep: PropTypes.number,\n /**\n * List of Custom components for the onboarding\n */\n onboardingSteps: PropTypes.array,\n /**\n * Props for the complete button\n */\n completeButtonProps: PropTypes.object,\n /**\n * To set the step of the onboarding\n */\n setCurrentStep: PropTypes.func,\n /**\n * To pass additional classes to the help screen\n */\n helpScreenClassName: PropTypes.string,\n /**\n * A boolean value to enable or disable the animation for the stepper.\n */\n isAnimated: PropTypes.bool,\n};\n\nexport default Onboarding;\n"],"names":["CompletedScreen","withT","_ref","t","completeButtonProps","React","createElement","className","Typography","style","appName","globalProps","Button","_extends","label","HelpScreen","setCurrentStep","currentStep","helpScreenClassName","_useTranslation","useTranslation","_useBreakpoints","useBreakpoints","isSize","classNames","component","lineHeight","alt","src","icon","RightArrow","iconPosition","onClick","createSteps","onboardingSteps","helpStep","element","concat","map","step","idx","_objectSpread","id","WelcomeScreen","Onboarding","_ref$currentStep","_ref$setCurrentStep","noop","_ref$onboardingSteps","_ref$completeButtonPr","_ref$helpScreenClassN","_ref$isAnimated","isAnimated","steps","useMemo","_useState","useState","_useState2","_slicedToArray","direction","setDirection","length","handleStepChange","index","nextStep","isStepperVisible","Stepper","activeIndex","setActiveIndex","key","hidden"],"mappings":";;;;;;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,KAAK,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAEC,mBAAmB,GAAAF,IAAA,CAAnBE,mBAAmB,CAAA;EAAA,oBACrDC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,qCAAqC;IAC/C,aAAY,EAAA,oCAAA;GAEZF,eAAAA,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,yCAAA;AAAyC,GAAA,eACtDF,cAAA,CAAAC,aAAA,CAACE,UA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A,gEAAgE,EAC9D4B,UAAU,IAAIO,SAAS,KAAK,SAAS;AACvC,QAAA,iEAAiE,EAC/DP,UAAU,IAAIO,SAAS,KAAK,UAAU;AACxCW,QAAAA,MAAM,EAAErD,WAAW,GAAG,CAAC,KAAK8C,KAAAA;OAC7B,CAAA;AAAE,KAAA,EAEFxB,IAAI,KAAJA,IAAAA,IAAAA,IAAI,uBAAJA,IAAI,CAAEH,OACJ,CAAC,CAAA;AAAA,GACP,CACE,CAAC,CAAA;AAEV;;;;"}
@@ -30,7 +30,7 @@ var DEFAULT_EDITOR_PROPS = {
30
30
  addons: []
31
31
  };
32
32
 
33
- var css = "@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:768px!important}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:24px 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:42px;font-weight:700;line-height:48px;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:36px}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:12px auto}.neeto-molecules-document__wrapper .ProseMirror{max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-left:none;border-right:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:6px}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:868px;padding:0 8px}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto;padding:0 16px}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:12px 16px 0!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:12px auto 0;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.editor-content__wrapper.neeto-editor{padding:0 16px}.editor-content__wrapper.neeto-editor h1{font-size:var(--neeto-ui-text-h1);margin:2rem 0 .25rem}.editor-content__wrapper.neeto-editor h2{font-size:var(--neeto-ui-text-h2);margin:1.5rem 0 .25rem}.editor-content__wrapper.neeto-editor h3{font-size:var(--neeto-ui-text-h3);margin:1rem 0 .25rem}.editor-content__wrapper.neeto-editor h4{font-size:var(--neeto-ui-text-h4);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h5{font-size:var(--neeto-ui-text-h5);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h6{font-size:var(--neeto-ui-text-h6);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h1,.editor-content__wrapper.neeto-editor h2,.editor-content__wrapper.neeto-editor h3,.editor-content__wrapper.neeto-editor h4,.editor-content__wrapper.neeto-editor h5,.editor-content__wrapper.neeto-editor h6{font-weight:var(--neeto-ui-font-semibold)}.editor-content__wrapper.neeto-editor p{font-size:var(--neeto-ui-text-body1);line-height:var(--neeto-ui-leading-normal)}.editor-content__wrapper.neeto-editor ol,.editor-content__wrapper.neeto-editor ul{margin-bottom:1rem;padding-left:24px}.editor-content__wrapper.neeto-editor ol li,.editor-content__wrapper.neeto-editor ul li{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor ol li p,.editor-content__wrapper.neeto-editor ul li p{margin-bottom:0}.editor-content__wrapper.neeto-editor ol li:last-child,.editor-content__wrapper.neeto-editor ul li:last-child{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor .neeto-editor-table{margin:8px 0 0}.editor-content__wrapper.neeto-editor .neeto-editor-table table{border-radius:0}.editor-content__wrapper.neeto-editor .neeto-editor-table p{margin-bottom:0}.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-row{visibility:hidden}.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-row{visibility:visible}ins{background-color:#c1f4cb!important;text-decoration:none!important}del{background-color:#faa!important}";
33
+ var css = "@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:768px!important}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:24px 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:42px;font-weight:700;line-height:48px;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:36px}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:12px auto}.neeto-molecules-document__wrapper .ProseMirror{max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-left:none;border-right:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:6px}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:868px}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:12px 16px 0!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:12px auto 0;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:768px!important;padding-left:16px;padding-right:16px}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.editor-content__wrapper.neeto-editor{padding:0 16px}.editor-content__wrapper.neeto-editor h1{font-size:var(--neeto-ui-text-h1);margin:2rem 0 .25rem}.editor-content__wrapper.neeto-editor h2{font-size:var(--neeto-ui-text-h2);margin:1.5rem 0 .25rem}.editor-content__wrapper.neeto-editor h3{font-size:var(--neeto-ui-text-h3);margin:1rem 0 .25rem}.editor-content__wrapper.neeto-editor h4{font-size:var(--neeto-ui-text-h4);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h5{font-size:var(--neeto-ui-text-h5);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h6{font-size:var(--neeto-ui-text-h6);margin:.75rem 0 .25rem}.editor-content__wrapper.neeto-editor h1,.editor-content__wrapper.neeto-editor h2,.editor-content__wrapper.neeto-editor h3,.editor-content__wrapper.neeto-editor h4,.editor-content__wrapper.neeto-editor h5,.editor-content__wrapper.neeto-editor h6{font-weight:var(--neeto-ui-font-semibold)}.editor-content__wrapper.neeto-editor p{font-size:var(--neeto-ui-text-body1);line-height:var(--neeto-ui-leading-normal)}.editor-content__wrapper.neeto-editor ol,.editor-content__wrapper.neeto-editor ul{margin-bottom:1rem;padding-left:24px}.editor-content__wrapper.neeto-editor ol li,.editor-content__wrapper.neeto-editor ul li{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor ol li p,.editor-content__wrapper.neeto-editor ul li p{margin-bottom:0}.editor-content__wrapper.neeto-editor ol li:last-child,.editor-content__wrapper.neeto-editor ul li:last-child{margin-bottom:.5rem}.editor-content__wrapper.neeto-editor .neeto-editor-table{margin:8px 0 0}.editor-content__wrapper.neeto-editor .neeto-editor-table table{border-radius:0}.editor-content__wrapper.neeto-editor .neeto-editor-table p{margin-bottom:0}.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table .neeto-editor-table__add-row{visibility:hidden}.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-column,.editor-content__wrapper.neeto-editor .neeto-editor-table:hover .neeto-editor-table__add-row{visibility:visible}ins{background-color:#c1f4cb!important;text-decoration:none!important}del{background-color:#faa!important}";
34
34
  injectCss.n(css,{});
35
35
 
36
36
  var useEditor = function useEditor(_ref) {
@@ -209,6 +209,7 @@ var MetricItem = function MetricItem(_ref) {
209
209
  className: "flex items-end"
210
210
  }, isTime ? renderTime(value) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
211
211
  className: "mr-1",
212
+ "data-cy": "insights-count",
212
213
  "data-testid": "insights-count",
213
214
  style: "h1",
214
215
  weight: "semibold"
@@ -1 +1 @@
1
- {"version":3,"file":"Insights.js","sources":["../../src/components/Insights/constants.js","../../src/components/Insights/MetaInfo/PercentageBar.jsx","../../src/components/Insights/MetaInfo/MetaInfoItem.jsx","../../src/components/Insights/MetaInfo/DataDistribution.jsx","../../src/components/Insights/utils.js","../../src/components/Insights/MetaInfo/index.jsx","../../src/components/Insights/TimeItem.jsx","../../src/components/Insights/MetricItem.jsx","../../src/components/Insights/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nexport const DEFAULT_DEVICES = [\n {\n label: t(\"neetoMolecules.insights.labels.devices.desktop\"),\n value: \"desktop\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.devices.mobile\"),\n value: \"smartphone\",\n },\n];\n\nexport const DEFAULT_OS = [\n { label: t(\"neetoMolecules.insights.labels.os.macos\"), value: \"mac\" },\n {\n label: t(\"neetoMolecules.insights.labels.os.windows\"),\n value: \"windows\",\n },\n];\n\nexport const DEFAULT_BROWSERS = [\n {\n label: t(\"neetoMolecules.insights.labels.browsers.chrome\"),\n value: \"chrome\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.browsers.safari\"),\n value: \"safari\",\n },\n];\n\nexport const INITIAL_TIME_PERIOD_VALUE = {\n label: t(\"neetoMolecules.insights.labels.allTime\"),\n value: { startDate: null, endDate: null, rangeType: \"all\" },\n};\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst PercentageBar = ({ value }) => (\n <>\n {value && (\n <div\n className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2\"\n style={{ width: `${value}%` }}\n />\n )}\n <Typography style=\"body3\">{value}%</Typography>\n </>\n);\n\nexport default memo(PercentageBar);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport PercentageBar from \"./PercentageBar\";\n\nconst MetaInfoItem = ({ name, value }) => (\n <>\n <Typography style=\"body2\" textTransform=\"capitalize\">\n {name}\n </Typography>\n <div className=\"col-span-3 flex items-center gap-2\">\n <PercentageBar {...{ value }} />\n </div>\n </>\n);\n\nexport default memo(MetaInfoItem);\n","import React from \"react\";\n\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nconst DataDistribution = ({ data }) => (\n <div className=\"grid grid-cols-4 gap-2\">\n {data.map(({ name, value }) => (\n <MetaInfoItem {...{ name, value }} key={name} />\n ))}\n </div>\n);\n\nexport default DataDistribution;\n","import { existsBy } from \"neetocist\";\n\nconst getSum = (data, searchKey) => {\n let sum = 0;\n for (const key in data) {\n if (key.includes(searchKey)) sum += data[key];\n }\n\n return sum;\n};\n\nexport const transformInsights = (data, defaultItems) => {\n const othersData = Object.keys(data)\n .filter(key => !existsBy({ value: key }, defaultItems))\n .map(key => ({ name: key, value: data[key] }));\n\n const defaultData = defaultItems.map(({ label, value }) => ({\n name: label,\n value: getSum(data, value) || 0,\n }));\n\n return { defaultData, othersData };\n};\n","import React, { memo } from \"react\";\n\nimport { Tooltip, Typography } from \"neetoui\";\nimport { pluck, sum, values } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DataDistribution from \"./DataDistribution\";\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nimport { transformInsights } from \"../utils\";\n\nconst MetaInfo = ({ type, data, defaultItems }) => {\n const { t } = useTranslation();\n const { defaultData, othersData } = transformInsights(data, defaultItems);\n\n const othersSum = sum(values(pluck(\"value\", othersData)));\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-rounded p-4\">\n <Typography\n className=\"mb-4\"\n style=\"h6\"\n textTransform=\"uppercase\"\n weight=\"bold\"\n >\n {type}\n </Typography>\n <DataDistribution data={defaultData} />\n <Tooltip\n content={<DataDistribution data={othersData} />}\n disabled={!othersSum}\n position=\"bottom\"\n >\n <div className=\"mt-2 grid grid-cols-4 gap-2\">\n <MetaInfoItem\n name={t(\"neetoMolecules.insights.others\")}\n value={othersSum}\n />\n </div>\n </Tooltip>\n </div>\n );\n};\n\nexport default memo(MetaInfo);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst TimeItem = ({ value, suffix }) => (\n <div className=\"flex items-end\" data-testid=\"time-item\">\n <Typography className=\"mr-1\" style=\"h1\" weight=\"semibold\">\n {value}\n </Typography>\n <Typography lineHeight=\"loose\" style=\"body2\">\n {suffix}\n </Typography>\n </div>\n);\n\nexport default memo(TimeItem);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport HelpPopover from \"components/HelpPopover\";\n\nimport TimeItem from \"./TimeItem\";\n\nconst MetricItem = ({ metric, value, helpText, isTime, isPercentage }) => {\n const renderTime = value => {\n const { h: hours, m: minutes, s: seconds } = value;\n const showSeconds = !hours && !minutes;\n\n return (\n <div className=\"flex gap-2\">\n {!!hours && <TimeItem suffix=\"H\" value={hours} />}\n {!!minutes && <TimeItem suffix=\"M\" value={minutes} />}\n {(!!seconds || showSeconds) && <TimeItem suffix=\"S\" value={seconds} />}\n </div>\n );\n };\n\n return (\n <div className=\"nf-insights__metric-item neeto-ui-border-gray-200 border-b pb-4\">\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex items-end\">\n {isTime ? (\n renderTime(value)\n ) : (\n <Typography\n className=\"mr-1\"\n data-testid=\"insights-count\"\n style=\"h1\"\n weight=\"semibold\"\n >\n {value || 0}\n {isPercentage ? \"%\" : \"\"}\n </Typography>\n )}\n </div>\n {helpText && (\n <div>\n <HelpPopover description={helpText} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-700\"\n data-cy=\"insights-type\"\n style=\"body2\"\n >\n {metric}\n </Typography>\n </div>\n );\n};\n\nexport default memo(MetricItem);\n","import React from \"react\";\n\nimport { Warning } from \"neetoicons\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DateRangeFilter from \"components/DateRangeFilter\";\nimport PageLoader from \"components/PageLoader\";\n\nimport { DEFAULT_DEVICES, DEFAULT_BROWSERS, DEFAULT_OS } from \"./constants\";\nimport MetaInfo from \"./MetaInfo\";\nimport MetricItem from \"./MetricItem\";\n\nconst Insights = ({\n insightsData,\n isLoading,\n timePeriod,\n setTimePeriod,\n helpTexts = {},\n showWarningMessage = false,\n}) => {\n const { t } = useTranslation();\n\n const {\n visitCount,\n startCount,\n submissionCount,\n completionRate,\n averageSubmissionTime,\n devices,\n operatingSystems,\n browsers,\n } = insightsData;\n\n if (isLoading) return <PageLoader />;\n\n return (\n <div className=\"mx-auto pt-10\" data-testid=\"insights\">\n <div className=\"mb-11 flex w-full items-center \">\n <Typography data-cy=\"submissions-insights-title\" style=\"h2\">\n {t(\"neetoMolecules.insights.title\")}\n </Typography>\n {showWarningMessage && (\n <Tooltip\n content={t(\"neetoMolecules.insights.dataInaccuracyWarning\")}\n position=\"right\"\n >\n <span className=\"ml-3\">\n <Warning\n className=\"neeto-ui-text-warning-500\"\n data-testid=\"insights-warning\"\n size={20}\n />\n </span>\n </Tooltip>\n )}\n <span className=\"ml-auto\">\n <DateRangeFilter {...{ setTimePeriod, timePeriod }} />\n </span>\n </div>\n <div className=\"mb-8 flex flex-wrap justify-between\">\n <MetricItem\n helpText={helpTexts[\"visitCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.visits\")}\n value={visitCount}\n />\n <MetricItem\n helpText={helpTexts[\"startCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.starts\")}\n value={startCount}\n />\n <MetricItem\n helpText={helpTexts[\"submissions\"]}\n metric={t(\"neetoMolecules.insights.metrics.submissions\")}\n value={submissionCount}\n />\n <MetricItem\n isPercentage\n helpText={helpTexts[\"completionRate\"]}\n metric={t(\"neetoMolecules.insights.metrics.completionRate\")}\n value={completionRate}\n />\n <MetricItem\n isTime\n helpText={helpTexts[\"averageSubmissionTime\"]}\n metric={t(\"neetoMolecules.insights.metrics.avgTimeToComplete\")}\n timeSuffix={t(\"neetoMolecules.insights.mins\")}\n value={averageSubmissionTime}\n />\n </div>\n <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3\">\n <MetaInfo\n data={devices}\n defaultItems={DEFAULT_DEVICES}\n type={t(\"neetoMolecules.insights.devices\")}\n />\n <MetaInfo\n data={operatingSystems}\n defaultItems={DEFAULT_OS}\n type={t(\"neetoMolecules.insights.os\")}\n />\n <MetaInfo\n data={browsers}\n defaultItems={DEFAULT_BROWSERS}\n type={t(\"neetoMolecules.insights.browsers\")}\n />\n </div>\n </div>\n );\n};\n\nInsights.propTypes = {\n /**\n * Object containing metrics and statistics for insights\n */\n insightsData: PropTypes.shape({\n visitCount: PropTypes.number,\n startCount: PropTypes.number,\n submissionCount: PropTypes.number,\n completionRate: PropTypes.number,\n averageSubmissionTime: PropTypes.shape({\n h: PropTypes.number,\n m: PropTypes.number,\n s: PropTypes.number,\n }),\n devices: PropTypes.shape({\n desktop: PropTypes.number,\n smartphone: PropTypes.number,\n }),\n operatingSystems: PropTypes.shape({\n mac: PropTypes.number,\n windows: PropTypes.number,\n }),\n browsers: PropTypes.shape({\n chrome: PropTypes.number,\n safari: PropTypes.number,\n }),\n }),\n /**\n * Indicates whether insights data is currently being fetched from an API\n */\n isLoading: PropTypes.bool,\n /**\n * The state corresponding to the currently selected date range.\n */\n timePeriod: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.object,\n }),\n /**\n * The setter method for `timePeriod` state.\n */\n setTimePeriod: PropTypes.func,\n /**\n * Object containing explanatory text for each metric, providing additional context that can help users understand the significance of the metrics displayed.\n */\n helpTexts: PropTypes.shape({\n visitCount: PropTypes.string,\n startCount: PropTypes.string,\n submissions: PropTypes.string,\n completionRate: PropTypes.string,\n averageSubmissionTime: PropTypes.string,\n }),\n /**\n * Displays a warning to indicate that the insights may not be accurate, as the insights integration occurred after the record's creation.\n */\n showWarningMessage: PropTypes.bool,\n};\n\nexport default Insights;\n"],"names":["DEFAULT_DEVICES","label","t","value","DEFAULT_OS","DEFAULT_BROWSERS","startDate","endDate","rangeType","PercentageBar","_ref","React","createElement","Fragment","className","style","width","concat","Typography","memo","MetaInfoItem","name","textTransform","DataDistribution","data","map","_ref2","key","getSum","searchKey","sum","includes","transformInsights","defaultItems","othersData","Object","keys","filter","existsBy","defaultData","MetaInfo","type","_useTranslation","useTranslation","_transformInsights","othersSum","values","pluck","weight","Tooltip","content","disabled","position","TimeItem","suffix","lineHeight","MetricItem","metric","helpText","isTime","isPercentage","renderTime","hours","h","minutes","m","seconds","s","showSeconds","HelpPopover","description","Insights","insightsData","isLoading","timePeriod","setTimePeriod","_ref$helpTexts","helpTexts","_ref$showWarningMessa","showWarningMessage","visitCount","startCount","submissionCount","completionRate","averageSubmissionTime","devices","operatingSystems","browsers","PageLoader","Warning","size","DateRangeFilter","timeSuffix"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,eAAe,GAAG,CAC7B;AACEC,EAAAA,KAAK,EAAEC,SAAC,CAAC,gDAAgD,CAAC;AAC1DC,EAAAA,KAAK,EAAE,SAAA;AACT,CAAC,EACD;AACEF,EAAAA,KAAK,EAAEC,SAAC,CAAC,+CAA+C,CAAC;AACzDC,EAAAA,KAAK,EAAE,YAAA;AACT,CAAC,CACF,CAAA;AAEM,IAAMC,UAAU,GAAG,CACxB;AAAEH,EAAAA,KAAK,EAAEC,SAAC,CAAC,yCAAyC,CAAC;AAAEC,EAAAA,KAAK,EAAE,KAAA;AAAM,CAAC,EACrE;AACEF,EAAAA,KAAK,EAAEC,SAAC,CAAC,2CAA2C,CAAC;AACrDC,EAAAA,KAAK,EAAE,SAAA;AACT,CAAC,CACF,CAAA;AAEM,IAAME,gBAAgB,GAAG,CAC9B;AACEJ,EAAAA,KAAK,EAAEC,SAAC,CAAC,gDAAgD,CAAC;AAC1DC,EAAAA,KAAK,EAAE,QAAA;AACT,CAAC,EACD;AACEF,EAAAA,KAAK,EAAEC,SAAC,CAAC,gDAAgD,CAAC;AAC1DC,EAAAA,KAAK,EAAE,QAAA;AACT,CAAC,CACF,CAAA;CAEwC;AACvCF,EAAAA,KAAK,EAAEC,SAAC,CAAC,wCAAwC,CAAC;AAClDC,EAAAA,KAAK,EAAE;AAAEG,IAAAA,SAAS,EAAE,IAAI;AAAEC,IAAAA,OAAO,EAAE,IAAI;AAAEC,IAAAA,SAAS,EAAE,KAAA;AAAM,GAAA;AAC5D;;AC/BA,IAAMC,aAAa,GA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C,CAAC,eACFS,yBAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE8D,gBAAiB;AACvBrD,IAAAA,YAAY,EAAE7B,UAAW;IACzBqC,IAAI,EAAEvC,CAAC,CAAC,4BAA4B,CAAA;AAAE,GACvC,CAAC,eACFS,yBAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE+D,QAAS;AACftD,IAAAA,YAAY,EAAE5B,gBAAiB;IAC/BoC,IAAI,EAAEvC,CAAC,CAAC,kCAAkC,CAAA;GAC3C,CACE,CACF,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Insights.js","sources":["../../src/components/Insights/constants.js","../../src/components/Insights/MetaInfo/PercentageBar.jsx","../../src/components/Insights/MetaInfo/MetaInfoItem.jsx","../../src/components/Insights/MetaInfo/DataDistribution.jsx","../../src/components/Insights/utils.js","../../src/components/Insights/MetaInfo/index.jsx","../../src/components/Insights/TimeItem.jsx","../../src/components/Insights/MetricItem.jsx","../../src/components/Insights/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nexport const DEFAULT_DEVICES = [\n {\n label: t(\"neetoMolecules.insights.labels.devices.desktop\"),\n value: \"desktop\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.devices.mobile\"),\n value: \"smartphone\",\n },\n];\n\nexport const DEFAULT_OS = [\n { label: t(\"neetoMolecules.insights.labels.os.macos\"), value: \"mac\" },\n {\n label: t(\"neetoMolecules.insights.labels.os.windows\"),\n value: \"windows\",\n },\n];\n\nexport const DEFAULT_BROWSERS = [\n {\n label: t(\"neetoMolecules.insights.labels.browsers.chrome\"),\n value: \"chrome\",\n },\n {\n label: t(\"neetoMolecules.insights.labels.browsers.safari\"),\n value: \"safari\",\n },\n];\n\nexport const INITIAL_TIME_PERIOD_VALUE = {\n label: t(\"neetoMolecules.insights.labels.allTime\"),\n value: { startDate: null, endDate: null, rangeType: \"all\" },\n};\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst PercentageBar = ({ value }) => (\n <>\n {value && (\n <div\n className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2\"\n style={{ width: `${value}%` }}\n />\n )}\n <Typography style=\"body3\">{value}%</Typography>\n </>\n);\n\nexport default memo(PercentageBar);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport PercentageBar from \"./PercentageBar\";\n\nconst MetaInfoItem = ({ name, value }) => (\n <>\n <Typography style=\"body2\" textTransform=\"capitalize\">\n {name}\n </Typography>\n <div className=\"col-span-3 flex items-center gap-2\">\n <PercentageBar {...{ value }} />\n </div>\n </>\n);\n\nexport default memo(MetaInfoItem);\n","import React from \"react\";\n\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nconst DataDistribution = ({ data }) => (\n <div className=\"grid grid-cols-4 gap-2\">\n {data.map(({ name, value }) => (\n <MetaInfoItem {...{ name, value }} key={name} />\n ))}\n </div>\n);\n\nexport default DataDistribution;\n","import { existsBy } from \"neetocist\";\n\nconst getSum = (data, searchKey) => {\n let sum = 0;\n for (const key in data) {\n if (key.includes(searchKey)) sum += data[key];\n }\n\n return sum;\n};\n\nexport const transformInsights = (data, defaultItems) => {\n const othersData = Object.keys(data)\n .filter(key => !existsBy({ value: key }, defaultItems))\n .map(key => ({ name: key, value: data[key] }));\n\n const defaultData = defaultItems.map(({ label, value }) => ({\n name: label,\n value: getSum(data, value) || 0,\n }));\n\n return { defaultData, othersData };\n};\n","import React, { memo } from \"react\";\n\nimport { Tooltip, Typography } from \"neetoui\";\nimport { pluck, sum, values } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DataDistribution from \"./DataDistribution\";\nimport MetaInfoItem from \"./MetaInfoItem\";\n\nimport { transformInsights } from \"../utils\";\n\nconst MetaInfo = ({ type, data, defaultItems }) => {\n const { t } = useTranslation();\n const { defaultData, othersData } = transformInsights(data, defaultItems);\n\n const othersSum = sum(values(pluck(\"value\", othersData)));\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-rounded p-4\">\n <Typography\n className=\"mb-4\"\n style=\"h6\"\n textTransform=\"uppercase\"\n weight=\"bold\"\n >\n {type}\n </Typography>\n <DataDistribution data={defaultData} />\n <Tooltip\n content={<DataDistribution data={othersData} />}\n disabled={!othersSum}\n position=\"bottom\"\n >\n <div className=\"mt-2 grid grid-cols-4 gap-2\">\n <MetaInfoItem\n name={t(\"neetoMolecules.insights.others\")}\n value={othersSum}\n />\n </div>\n </Tooltip>\n </div>\n );\n};\n\nexport default memo(MetaInfo);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nconst TimeItem = ({ value, suffix }) => (\n <div className=\"flex items-end\" data-testid=\"time-item\">\n <Typography className=\"mr-1\" style=\"h1\" weight=\"semibold\">\n {value}\n </Typography>\n <Typography lineHeight=\"loose\" style=\"body2\">\n {suffix}\n </Typography>\n </div>\n);\n\nexport default memo(TimeItem);\n","import React, { memo } from \"react\";\n\nimport { Typography } from \"neetoui\";\n\nimport HelpPopover from \"components/HelpPopover\";\n\nimport TimeItem from \"./TimeItem\";\n\nconst MetricItem = ({ metric, value, helpText, isTime, isPercentage }) => {\n const renderTime = value => {\n const { h: hours, m: minutes, s: seconds } = value;\n const showSeconds = !hours && !minutes;\n\n return (\n <div className=\"flex gap-2\">\n {!!hours && <TimeItem suffix=\"H\" value={hours} />}\n {!!minutes && <TimeItem suffix=\"M\" value={minutes} />}\n {(!!seconds || showSeconds) && <TimeItem suffix=\"S\" value={seconds} />}\n </div>\n );\n };\n\n return (\n <div className=\"nf-insights__metric-item neeto-ui-border-gray-200 border-b pb-4\">\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex items-end\">\n {isTime ? (\n renderTime(value)\n ) : (\n <Typography\n className=\"mr-1\"\n data-cy=\"insights-count\"\n data-testid=\"insights-count\"\n style=\"h1\"\n weight=\"semibold\"\n >\n {value || 0}\n {isPercentage ? \"%\" : \"\"}\n </Typography>\n )}\n </div>\n {helpText && (\n <div>\n <HelpPopover description={helpText} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-700\"\n data-cy=\"insights-type\"\n style=\"body2\"\n >\n {metric}\n </Typography>\n </div>\n );\n};\n\nexport default memo(MetricItem);\n","import React from \"react\";\n\nimport { Warning } from \"neetoicons\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport DateRangeFilter from \"components/DateRangeFilter\";\nimport PageLoader from \"components/PageLoader\";\n\nimport { DEFAULT_DEVICES, DEFAULT_BROWSERS, DEFAULT_OS } from \"./constants\";\nimport MetaInfo from \"./MetaInfo\";\nimport MetricItem from \"./MetricItem\";\n\nconst Insights = ({\n insightsData,\n isLoading,\n timePeriod,\n setTimePeriod,\n helpTexts = {},\n showWarningMessage = false,\n}) => {\n const { t } = useTranslation();\n\n const {\n visitCount,\n startCount,\n submissionCount,\n completionRate,\n averageSubmissionTime,\n devices,\n operatingSystems,\n browsers,\n } = insightsData;\n\n if (isLoading) return <PageLoader />;\n\n return (\n <div className=\"mx-auto pt-10\" data-testid=\"insights\">\n <div className=\"mb-11 flex w-full items-center \">\n <Typography data-cy=\"submissions-insights-title\" style=\"h2\">\n {t(\"neetoMolecules.insights.title\")}\n </Typography>\n {showWarningMessage && (\n <Tooltip\n content={t(\"neetoMolecules.insights.dataInaccuracyWarning\")}\n position=\"right\"\n >\n <span className=\"ml-3\">\n <Warning\n className=\"neeto-ui-text-warning-500\"\n data-testid=\"insights-warning\"\n size={20}\n />\n </span>\n </Tooltip>\n )}\n <span className=\"ml-auto\">\n <DateRangeFilter {...{ setTimePeriod, timePeriod }} />\n </span>\n </div>\n <div className=\"mb-8 flex flex-wrap justify-between\">\n <MetricItem\n helpText={helpTexts[\"visitCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.visits\")}\n value={visitCount}\n />\n <MetricItem\n helpText={helpTexts[\"startCount\"]}\n metric={t(\"neetoMolecules.insights.metrics.starts\")}\n value={startCount}\n />\n <MetricItem\n helpText={helpTexts[\"submissions\"]}\n metric={t(\"neetoMolecules.insights.metrics.submissions\")}\n value={submissionCount}\n />\n <MetricItem\n isPercentage\n helpText={helpTexts[\"completionRate\"]}\n metric={t(\"neetoMolecules.insights.metrics.completionRate\")}\n value={completionRate}\n />\n <MetricItem\n isTime\n helpText={helpTexts[\"averageSubmissionTime\"]}\n metric={t(\"neetoMolecules.insights.metrics.avgTimeToComplete\")}\n timeSuffix={t(\"neetoMolecules.insights.mins\")}\n value={averageSubmissionTime}\n />\n </div>\n <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3\">\n <MetaInfo\n data={devices}\n defaultItems={DEFAULT_DEVICES}\n type={t(\"neetoMolecules.insights.devices\")}\n />\n <MetaInfo\n data={operatingSystems}\n defaultItems={DEFAULT_OS}\n type={t(\"neetoMolecules.insights.os\")}\n />\n <MetaInfo\n data={browsers}\n defaultItems={DEFAULT_BROWSERS}\n type={t(\"neetoMolecules.insights.browsers\")}\n />\n </div>\n </div>\n );\n};\n\nInsights.propTypes = {\n /**\n * Object containing metrics and statistics for insights\n */\n insightsData: PropTypes.shape({\n visitCount: PropTypes.number,\n startCount: PropTypes.number,\n submissionCount: PropTypes.number,\n completionRate: PropTypes.number,\n averageSubmissionTime: PropTypes.shape({\n h: PropTypes.number,\n m: PropTypes.number,\n s: PropTypes.number,\n }),\n devices: PropTypes.shape({\n desktop: PropTypes.number,\n smartphone: PropTypes.number,\n }),\n operatingSystems: PropTypes.shape({\n mac: PropTypes.number,\n windows: PropTypes.number,\n }),\n browsers: PropTypes.shape({\n chrome: PropTypes.number,\n safari: PropTypes.number,\n }),\n }),\n /**\n * Indicates whether insights data is currently being fetched from an API\n */\n isLoading: PropTypes.bool,\n /**\n * The state corresponding to the currently selected date range.\n */\n timePeriod: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.object,\n }),\n /**\n * The setter method for `timePeriod` state.\n */\n setTimePeriod: PropTypes.func,\n /**\n * Object containing explanatory text for each metric, providing additional context that can help users understand the significance of the metrics displayed.\n */\n helpTexts: PropTypes.shape({\n visitCount: PropTypes.string,\n startCount: PropTypes.string,\n submissions: PropTypes.string,\n completionRate: PropTypes.string,\n averageSubmissionTime: PropTypes.string,\n }),\n /**\n * Displays a warning to indicate that the insights may not be accurate, as the insights integration occurred after the record's creation.\n */\n showWarningMessage: PropTypes.bool,\n};\n\nexport default Insights;\n"],"names":["DEFAULT_DEVICES","label","t","value","DEFAULT_OS","DEFAULT_BROWSERS","startDate","endDate","rangeType","PercentageBar","_ref","React","createElement","Fragment","className","style","width","concat","Typography","memo","MetaInfoItem","name","textTransform","DataDistribution","data","map","_ref2","key","getSum","searchKey","sum","includes","transformInsights","defaultItems","othersData","Object","keys","filter","existsBy","defaultData","MetaInfo","type","_useTranslation","useTranslation","_transformInsights","othersSum","values","pluck","weight","Tooltip","content","disabled","position","TimeItem","suffix","lineHeight","MetricItem","metric","helpText","isTime","isPercentage","renderTime","hours","h","minutes","m","seconds","s","showSeconds","HelpPopover","description","Insights","insightsData","isLoading","timePeriod","setTimePeriod","_ref$helpTexts","helpTexts","_ref$showWarningMessa","showWarningMessage","visitCount","startCount","submissionCount","completionRate","averageSubmissionTime","devices","operatingSystems","browsers","PageLoader","Warning","size","DateRangeFilter","timeSuffix"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,eAAe,GAAG,CAC7B;AACEC,EAAAA,KAAK,EAAEC,SAAC,CAAC,gDAAgD,CAAC;AAC1DC,EAAAA,KAAK,EAAE,SAAA;AACT,CAAC,EACD;AACEF,EAAAA,KAAK,EAAEC,SAAC,CAAC,+CAA+C,CAAC;AACzDC,EAAAA,KAAK,EAAE,YAAA;AACT,CAAC,CACF,CAAA;AAEM,IAAMC,UAAU,GAAG,CACxB;AAAEH,EAAAA,KAAK,EAAEC,SAAC,CAAC,yCAAyC,CAAC;AAAEC,EAAAA,K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DAAgD,CAAE;AAC5DC,IAAAA,KAAK,EAAEgF,cAAAA;AAAe,GACvB,CAAC,eACFxE,yBAAA,CAAAC,aAAA,CAAC4C,YAAU,EAAA;IACTG,MAAM,EAAA,IAAA;AACND,IAAAA,QAAQ,EAAEmB,SAAS,CAAC,uBAAuB,CAAE;AAC7CpB,IAAAA,MAAM,EAAEvD,CAAC,CAAC,mDAAmD,CAAE;AAC/D0F,IAAAA,UAAU,EAAE1F,CAAC,CAAC,8BAA8B,CAAE;AAC9CC,IAAAA,KAAK,EAAEiF,qBAAAA;AAAsB,GAC9B,CACE,CAAC,eACNzE,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKE,IAAAA,SAAS,EAAC,sDAAA;AAAsD,GAAA,eACnEH,yBAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE6D,OAAQ;AACdpD,IAAAA,YAAY,EAAEjC,eAAgB;IAC9ByC,IAAI,EAAEvC,CAAC,CAAC,iCAAiC,CAAA;AAAE,GAC5C,CAAC,eACFS,yBAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE8D,gBAAiB;AACvBrD,IAAAA,YAAY,EAAE7B,UAAW;IACzBqC,IAAI,EAAEvC,CAAC,CAAC,4BAA4B,CAAA;AAAE,GACvC,CAAC,eACFS,yBAAA,CAAAC,aAAA,CAAC4B,UAAQ,EAAA;AACPhB,IAAAA,IAAI,EAAE+D,QAAS;AACftD,IAAAA,YAAY,EAAE5B,gBAAiB;IAC/BoC,IAAI,EAAEvC,CAAC,CAAC,kCAAkC,CAAA;GAC3C,CACE,CACF,CAAC,CAAA;AAEV;;;;"}
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
3
4
  var React = require('react');
4
5
  var classnames = require('classnames');
5
6
  var neetoCist = require('@bigbinary/neeto-cist');
@@ -16,6 +17,7 @@ var reactI18next = require('react-i18next');
16
17
 
17
18
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
19
 
20
+ var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
19
21
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
20
22
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
21
23
  var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
@@ -53,7 +55,7 @@ var CompletedScreen = withT__default["default"](function (_ref) {
53
55
  }, completeButtonProps)));
54
56
  });
55
57
 
56
- var css = ".neeto-molecules-onboarding__wrapper{align-items:center;display:flex;flex-direction:column;flex-grow:1;height:100vh;overflow-y:auto;padding:15vh 32px 32px;width:100%}.neeto-molecules-onboarding__container{display:flex;flex-direction:column;height:100vh;overflow-y:auto;position:relative;width:100%}.neeto-molecules-onboarding__stepper-wrapper{background-color:rgb(var(--neeto-ui-white));border-bottom:1px solid rgb(var(--neeto-ui-gray-200));display:flex;flex-shrink:0;padding:8px 16px;width:100%}@media (min-width:1024px){.neeto-molecules-onboarding__stepper-wrapper{justify-content:center}}.neeto-molecules-onboarding__content{flex-grow:1;min-height:0;overflow-y:auto;width:100%}";
58
+ var css = ".neeto-molecules-onboarding__wrapper{align-items:center;display:flex;flex-direction:column;flex-grow:1;height:100vh;overflow-y:auto;padding:15vh 32px 32px;width:100%}.neeto-molecules-onboarding__container{display:flex;flex-direction:column;height:100vh;overflow-y:auto;position:relative;width:100%}.neeto-molecules-onboarding__stepper-wrapper{background-color:rgb(var(--neeto-ui-white));border-bottom:1px solid rgb(var(--neeto-ui-gray-200));display:flex;flex-shrink:0;padding:8px 16px;width:100%}@media (min-width:1024px){.neeto-molecules-onboarding__stepper-wrapper{justify-content:center}}.neeto-molecules-onboarding__content{flex-grow:1;min-height:0;overflow-y:auto;width:100%}.neeto-molecules-onboarding__content--forward{animation:slideInRight .4s ease backwards}.neeto-molecules-onboarding__content--backward{animation:slideInLeft .4s ease backwards}@keyframes slideInRight{0%{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}";
57
59
  injectCss.n(css,{});
58
60
 
59
61
  var HelpScreen = function HelpScreen(_ref) {
@@ -152,7 +154,6 @@ var WelcomeScreen = withT__default["default"](function (_ref) {
152
154
  });
153
155
 
154
156
  var Onboarding = function Onboarding(_ref) {
155
- var _steps;
156
157
  var _ref$currentStep = _ref.currentStep,
157
158
  currentStep = _ref$currentStep === void 0 ? 0 : _ref$currentStep,
158
159
  _ref$setCurrentStep = _ref.setCurrentStep,
@@ -162,10 +163,16 @@ var Onboarding = function Onboarding(_ref) {
162
163
  _ref$completeButtonPr = _ref.completeButtonProps,
163
164
  completeButtonProps = _ref$completeButtonPr === void 0 ? {} : _ref$completeButtonPr,
164
165
  _ref$helpScreenClassN = _ref.helpScreenClassName,
165
- helpScreenClassName = _ref$helpScreenClassN === void 0 ? "" : _ref$helpScreenClassN;
166
+ helpScreenClassName = _ref$helpScreenClassN === void 0 ? "" : _ref$helpScreenClassN,
167
+ _ref$isAnimated = _ref.isAnimated,
168
+ isAnimated = _ref$isAnimated === void 0 ? true : _ref$isAnimated;
166
169
  var steps = React.useMemo(function () {
167
170
  return createSteps(onboardingSteps, setCurrentStep, currentStep, helpScreenClassName);
168
171
  }, [onboardingSteps]);
172
+ var _useState = React.useState(""),
173
+ _useState2 = _slicedToArray__default["default"](_useState, 2),
174
+ direction = _useState2[0],
175
+ setDirection = _useState2[1];
169
176
  if (currentStep === 0) {
170
177
  return /*#__PURE__*/React__default["default"].createElement(WelcomeScreen, {
171
178
  currentStep: currentStep,
@@ -178,7 +185,9 @@ var Onboarding = function Onboarding(_ref) {
178
185
  });
179
186
  }
180
187
  var handleStepChange = function handleStepChange(index) {
181
- return setCurrentStep(index + 1);
188
+ var nextStep = index + 1;
189
+ setDirection(currentStep > nextStep ? "backward" : "forward");
190
+ setCurrentStep(nextStep);
182
191
  };
183
192
  var isStepperVisible = steps.length > 1;
184
193
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -191,9 +200,16 @@ var Onboarding = function Onboarding(_ref) {
191
200
  steps: steps,
192
201
  activeIndex: currentStep - 1,
193
202
  setActiveIndex: handleStepChange
194
- })), /*#__PURE__*/React__default["default"].createElement("div", {
195
- className: "neeto-molecules-onboarding__content"
196
- }, (_steps = steps[currentStep - 1]) === null || _steps === void 0 ? void 0 : _steps.element));
203
+ })), steps.map(function (step, index) {
204
+ return /*#__PURE__*/React__default["default"].createElement("div", {
205
+ key: index,
206
+ className: classnames__default["default"]("neeto-molecules-onboarding__content", {
207
+ "neeto-molecules-onboarding__content--forward overflow-x-hidden": isAnimated && direction === "forward",
208
+ "neeto-molecules-onboarding__content--backward overflow-x-hidden": isAnimated && direction === "backward",
209
+ hidden: currentStep - 1 !== index
210
+ })
211
+ }, step === null || step === void 0 ? void 0 : step.element);
212
+ }));
197
213
  };
198
214
 
199
215
  module.exports = Onboarding;
@@ -1 +1 @@
1
- {"version":3,"file":"Onboarding.js","sources":["../../src/components/Onboarding/CompletedScreen.jsx","../../src/components/Onboarding/HelpScreen.jsx","../../src/components/Onboarding/utils.jsx","../../src/components/Onboarding/WelcomeScreen.jsx","../../src/components/Onboarding/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { Button, Typography } from \"neetoui\";\n\nconst CompletedScreen = withT(({ t, completeButtonProps }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-congratulations-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-emoji\"\n style=\"h1\"\n >\n 🎉\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-title\"\n data-testid=\"onboarding-congratulations-title\"\n style=\"h1\"\n >\n <span className=\"neeto-ui-text-success-500\">\n {t(\"neetoMolecules.onboarding.congratulations\")}\n </span>\n <br />\n {t(\"neetoMolecules.onboarding.readyToUse\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-congratulations-button\"\n data-testid=\"onboarding-congratulations-button\"\n label={t(\"neetoMolecules.onboarding.helpScreen.startUsingButton\", {\n appName: globalProps.appName,\n })}\n {...completeButtonProps}\n />\n </div>\n));\n\nexport default CompletedScreen;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst HelpScreen = ({ setCurrentStep, currentStep, helpScreenClassName }) => {\n const { t } = useTranslation();\n const { isSize } = useBreakpoints();\n\n return (\n <div\n className={classNames(\n \"mx-auto w-full max-w-2xl space-y-6 p-4\",\n helpScreenClassName\n )}\n >\n <div className=\"space-y-3\">\n <Typography\n component=\"h1\"\n data-cy=\"onboarding-help-title\"\n data-testid=\"onboarding-help-title\"\n style=\"h2\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.title\")}\n </Typography>\n <Typography\n data-cy=\"onboarding-help-description\"\n data-testid=\"onboarding-help-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.description\")}\n </Typography>\n <div className=\"w-full\">\n {isSize(\"mobile\") ? (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-mobile_FpB8LKYj4.svg\"\n />\n ) : (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-desktop_aVe6ENdX97.svg\"\n />\n )}\n </div>\n </div>\n <Button\n data-cy=\"onboarding-help-button\"\n data-testid=\"onboarding-help-button\"\n icon={RightArrow}\n iconPosition=\"right\"\n label={t(\"neetoMolecules.onboarding.helpScreen.continueButton\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n );\n};\n\nexport default HelpScreen;\n","import React from \"react\";\n\nimport { t } from \"i18next\";\n\nimport HelpScreen from \"./HelpScreen\";\n\nexport const createSteps = (\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n) => {\n const helpStep = {\n label: t(\"neetoMolecules.onboarding.helpLabel\"),\n element: (\n <HelpScreen {...{ currentStep, helpScreenClassName, setCurrentStep }} />\n ),\n };\n\n return onboardingSteps\n .concat(helpStep)\n .map((step, idx) => ({ ...step, id: idx + 1 }));\n};\n","import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nconst WelcomeScreen = withT(({ t, setCurrentStep, currentStep }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-welcome-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-title\"\n data-testid=\"onboarding-welcome-title\"\n style=\"h1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.welcomeToTitle\", {\n appName: globalProps.appName,\n })}\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-description\"\n data-testid=\"onboarding-welcome-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.letUsCustomize\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-welcome-button\"\n data-testid=\"onboarding-welcome-button\"\n icon={RightArrow}\n label={t(\"neetoMolecules.onboarding.getStarted\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n));\n\nexport default WelcomeScreen;\n","import React, { useMemo } from \"react\";\n\nimport classNames from \"classnames\";\nimport { noop } from \"neetocist\";\nimport { Stepper } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport CompletedScreen from \"./CompletedScreen\";\nimport \"./onboarding.scss\";\nimport { createSteps } from \"./utils\";\nimport WelcomeScreen from \"./WelcomeScreen\";\n\nconst Onboarding = ({\n currentStep = 0,\n setCurrentStep = noop,\n onboardingSteps = [],\n completeButtonProps = {},\n helpScreenClassName = \"\",\n}) => {\n const steps = useMemo(\n () =>\n createSteps(\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n ),\n [onboardingSteps]\n );\n\n if (currentStep === 0) {\n return <WelcomeScreen {...{ currentStep, setCurrentStep }} />;\n }\n\n if (currentStep === steps.length + 1) {\n return <CompletedScreen {...{ completeButtonProps }} />;\n }\n\n const handleStepChange = index => setCurrentStep(index + 1);\n\n const isStepperVisible = steps.length > 1;\n\n return (\n <div\n className={classNames(\"neeto-molecules-onboarding__container\", {\n \"neeto-molecules-onboarding__wrapper\": !isStepperVisible,\n })}\n >\n {isStepperVisible && (\n <div className=\"neeto-molecules-onboarding__stepper-wrapper\">\n <Stepper\n {...{ steps }}\n activeIndex={currentStep - 1}\n setActiveIndex={handleStepChange}\n />\n </div>\n )}\n <div className=\"neeto-molecules-onboarding__content\">\n {steps[currentStep - 1]?.element}\n </div>\n </div>\n );\n};\n\nOnboarding.propTypes = {\n /**\n * To specify the current step of the onboarding\n */\n currentStep: PropTypes.number,\n /**\n * List of Custom components for the onboarding\n */\n onboardingSteps: PropTypes.array,\n /**\n * Props for the complete button\n */\n completeButtonProps: PropTypes.object,\n /**\n * To set the step of the onboarding\n */\n setCurrentStep: PropTypes.func,\n /**\n * To pass additional classes to the help screen\n */\n helpScreenClassName: PropTypes.string,\n};\n\nexport default Onboarding;\n"],"names":["CompletedScreen","withT","_ref","t","completeButtonProps","React","createElement","className","Typography","style","appName","globalProps","Button","_extends","label","HelpScreen","setCurrentStep","currentStep","helpScreenClassName","_useTranslation","useTranslation","_useBreakpoints","useBreakpoints","isSize","classNames","component","lineHeight","alt","src","icon","RightArrow","iconPosition","onClick","createSteps","onboardingSteps","helpStep","element","concat","map","step","idx","_objectSpread","id","WelcomeScreen","Onboarding","_steps","_ref$currentStep","_ref$setCurrentStep","noop","_ref$onboardingSteps","_ref$completeButtonPr","_ref$helpScreenClassN","steps","useMemo","length","handleStepChange","index","isStepperVisible","Stepper","activeIndex","setActiveIndex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,yBAAK,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAEC,mBAAmB,GAAAF,IAAA,CAAnBE,mBAAmB,CAAA;EAAA,oBACrDC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,qCAAqC;IAC/C,aAAY,EAAA,oCAAA;GAEZF,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,yCAAA;AAAyC,GAAA,eACtDF,yBAAA,CAAAC,aAAA,CAACE,kBAAU,EAAA;AACTD,IAAAA,SAAS,EAAC,aAAa;AACvB,IAAA,SAAA,EAAQ,kCAAkC;AAC1CE,IAAAA,KAAK,EAAC,IAAA;AAAI,GAAA,EACX,cAEW,CAAC,eACbJ,yBAAA,CAAAC,aAAA,CAACE,kBAAU,EAAA;AACTD,IAAAA,SAAS,EAAC,aAAa;AACvB,IAAA,SAAA,EAAQ,kCAAkC;AAC1C,IAAA,aAAA,EAAY,kCAAkC;AAC9CE,IAAAA,KAAK,EAAC,IAAA;GAENJ,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMC,IAAAA,SAAS,EAAC,2BAAA;AAA2B,GAAA,EACxCJ,CAAC,CAAC,2CAA2C,CAC1C,CAAC,eACPE,yBAAA,CAAAC,aAAA,WAAK,CAAC,EACLH,CAAC,CAAC,sCAAsC,EAAE;IACzCO,OAAO,EAAE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XO,WAAW,EAAE1C,WAAW,GAAG,CAAE;AAC7B2C,IAAAA,cAAc,EAAEL,gBAAAA;AAAiB,GAClC,CACE,CACN,eACDlD,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,qCAAA;AAAqC,GAAA,EAAA,CAAAsC,MAAA,GACjDO,KAAK,CAACnC,WAAW,GAAG,CAAC,CAAC,MAAA,IAAA,IAAA4B,MAAA,KAAtBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAA,CAAwBT,OACtB,CACF,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Onboarding.js","sources":["../../src/components/Onboarding/CompletedScreen.jsx","../../src/components/Onboarding/HelpScreen.jsx","../../src/components/Onboarding/utils.jsx","../../src/components/Onboarding/WelcomeScreen.jsx","../../src/components/Onboarding/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { Button, Typography } from \"neetoui\";\n\nconst CompletedScreen = withT(({ t, completeButtonProps }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-congratulations-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-emoji\"\n style=\"h1\"\n >\n 🎉\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-congratulations-title\"\n data-testid=\"onboarding-congratulations-title\"\n style=\"h1\"\n >\n <span className=\"neeto-ui-text-success-500\">\n {t(\"neetoMolecules.onboarding.congratulations\")}\n </span>\n <br />\n {t(\"neetoMolecules.onboarding.readyToUse\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-congratulations-button\"\n data-testid=\"onboarding-congratulations-button\"\n label={t(\"neetoMolecules.onboarding.helpScreen.startUsingButton\", {\n appName: globalProps.appName,\n })}\n {...completeButtonProps}\n />\n </div>\n));\n\nexport default CompletedScreen;\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst HelpScreen = ({ setCurrentStep, currentStep, helpScreenClassName }) => {\n const { t } = useTranslation();\n const { isSize } = useBreakpoints();\n\n return (\n <div\n className={classNames(\n \"mx-auto w-full max-w-2xl space-y-6 p-4\",\n helpScreenClassName\n )}\n >\n <div className=\"space-y-3\">\n <Typography\n component=\"h1\"\n data-cy=\"onboarding-help-title\"\n data-testid=\"onboarding-help-title\"\n style=\"h2\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.title\")}\n </Typography>\n <Typography\n data-cy=\"onboarding-help-description\"\n data-testid=\"onboarding-help-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.description\")}\n </Typography>\n <div className=\"w-full\">\n {isSize(\"mobile\") ? (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-mobile_FpB8LKYj4.svg\"\n />\n ) : (\n <img\n alt=\"\"\n src=\"https://ik.imagekit.io/d9mvewbju/Commons/help-desktop_aVe6ENdX97.svg\"\n />\n )}\n </div>\n </div>\n <Button\n data-cy=\"onboarding-help-button\"\n data-testid=\"onboarding-help-button\"\n icon={RightArrow}\n iconPosition=\"right\"\n label={t(\"neetoMolecules.onboarding.helpScreen.continueButton\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n );\n};\n\nexport default HelpScreen;\n","import React from \"react\";\n\nimport { t } from \"i18next\";\n\nimport HelpScreen from \"./HelpScreen\";\n\nexport const createSteps = (\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n) => {\n const helpStep = {\n label: t(\"neetoMolecules.onboarding.helpLabel\"),\n element: (\n <HelpScreen {...{ currentStep, helpScreenClassName, setCurrentStep }} />\n ),\n };\n\n return onboardingSteps\n .concat(helpStep)\n .map((step, idx) => ({ ...step, id: idx + 1 }));\n};\n","import React from \"react\";\n\nimport { globalProps } from \"neetocommons/initializers\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { RightArrow } from \"neetoicons\";\nimport { Button, Typography } from \"neetoui\";\n\nconst WelcomeScreen = withT(({ t, setCurrentStep, currentStep }) => (\n <div\n className=\"neeto-molecules-onboarding__wrapper\"\n data-testid=\"onboarding-welcome-wrapper\"\n >\n <div className=\"mx-auto mb-6 w-full max-w-2xl space-y-2\">\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-title\"\n data-testid=\"onboarding-welcome-title\"\n style=\"h1\"\n >\n {t(\"neetoMolecules.onboarding.helpScreen.welcomeToTitle\", {\n appName: globalProps.appName,\n })}\n </Typography>\n <Typography\n className=\"text-center\"\n data-cy=\"onboarding-welcome-description\"\n data-testid=\"onboarding-welcome-description\"\n lineHeight=\"normal\"\n style=\"body1\"\n >\n {t(\"neetoMolecules.onboarding.letUsCustomize\", {\n appName: globalProps.appName,\n })}\n </Typography>\n </div>\n <Button\n data-cy=\"onboarding-welcome-button\"\n data-testid=\"onboarding-welcome-button\"\n icon={RightArrow}\n label={t(\"neetoMolecules.onboarding.getStarted\")}\n onClick={() => setCurrentStep(currentStep + 1)}\n />\n </div>\n));\n\nexport default WelcomeScreen;\n","import React, { useMemo, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { noop } from \"neetocist\";\nimport { Stepper } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport CompletedScreen from \"./CompletedScreen\";\nimport \"./onboarding.scss\";\nimport { createSteps } from \"./utils\";\nimport WelcomeScreen from \"./WelcomeScreen\";\n\nconst Onboarding = ({\n currentStep = 0,\n setCurrentStep = noop,\n onboardingSteps = [],\n completeButtonProps = {},\n helpScreenClassName = \"\",\n isAnimated = true,\n}) => {\n const steps = useMemo(\n () =>\n createSteps(\n onboardingSteps,\n setCurrentStep,\n currentStep,\n helpScreenClassName\n ),\n [onboardingSteps]\n );\n const [direction, setDirection] = useState(\"\");\n\n if (currentStep === 0) {\n return <WelcomeScreen {...{ currentStep, setCurrentStep }} />;\n }\n\n if (currentStep === steps.length + 1) {\n return <CompletedScreen {...{ completeButtonProps }} />;\n }\n\n const handleStepChange = index => {\n const nextStep = index + 1;\n setDirection(currentStep > nextStep ? \"backward\" : \"forward\");\n setCurrentStep(nextStep);\n };\n\n const isStepperVisible = steps.length > 1;\n\n return (\n <div\n className={classNames(\"neeto-molecules-onboarding__container\", {\n \"neeto-molecules-onboarding__wrapper\": !isStepperVisible,\n })}\n >\n {isStepperVisible && (\n <div className=\"neeto-molecules-onboarding__stepper-wrapper\">\n <Stepper\n {...{ steps }}\n activeIndex={currentStep - 1}\n setActiveIndex={handleStepChange}\n />\n </div>\n )}\n {steps.map((step, index) => (\n <div\n key={index}\n className={classNames(\"neeto-molecules-onboarding__content\", {\n \"neeto-molecules-onboarding__content--forward overflow-x-hidden\":\n isAnimated && direction === \"forward\",\n \"neeto-molecules-onboarding__content--backward overflow-x-hidden\":\n isAnimated && direction === \"backward\",\n hidden: currentStep - 1 !== index,\n })}\n >\n {step?.element}\n </div>\n ))}\n </div>\n );\n};\n\nOnboarding.propTypes = {\n /**\n * To specify the current step of the onboarding\n */\n currentStep: PropTypes.number,\n /**\n * List of Custom components for the onboarding\n */\n onboardingSteps: PropTypes.array,\n /**\n * Props for the complete button\n */\n completeButtonProps: PropTypes.object,\n /**\n * To set the step of the onboarding\n */\n setCurrentStep: PropTypes.func,\n /**\n * To pass additional classes to the help screen\n */\n helpScreenClassName: PropTypes.string,\n /**\n * A boolean value to enable or disable the animation for the stepper.\n */\n isAnimated: PropTypes.bool,\n};\n\nexport default Onboarding;\n"],"names":["CompletedScreen","withT","_ref","t","completeButtonProps","React","createElement","className","Typography","style","appName","globalProps","Button","_extends","label","HelpScreen","setCurrentStep","currentStep","helpScreenClassName","_useTranslation","useTranslation","_useBreakpoints","useBreakpoints","isSize","classNames","component","lineHeight","alt","src","icon","RightArrow","iconPosition","onClick","createSteps","onboardingSteps","helpStep","element","concat","map","step","idx","_objectSpread","id","WelcomeScreen","Onboarding","_ref$currentStep","_ref$setCurrentStep","noop","_ref$onboardingSteps","_ref$completeButtonPr","_ref$helpScreenClassN","_ref$isAnimated","isAnimated","steps","useMemo","_useState","useState","_useState2","_slicedToArray","direction","setDirection","length","handleStepChange","index","nextStep","isStepperVisible","Stepper","activeIndex","setActiveIndex","key","hidden"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,yBAAK,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAEC,mBAAmB,GAAAF,IAAA,CAAnBE,mBAAmB,CAAA;EAAA,oBACrDC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,qCAAqC;IAC/C,aAAY,EAAA,oCAAA;GAEZF,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,yCAAA;AAAyC,GAAA,eACtDF,yBAAA,CAAAC,aAAA,CAACE,kBAAU,EAAA;AACTD,IAAAA,SAAS,EAAC,aAAa;AACvB,IAAA,SAAA,EAAQ,kCAAkC;AAC1CE,IAAAA,KAAK,EAAC,IAAA;AAAI,GAAA,EACX,cAEW,CAAC,eACbJ,yBAAA,CAAAC,aAAA,CAACE,kBAAU,EAAA;AACTD,IAAAA,SAAS,EAAC,aAAa;AACvB,IAAA,SAAA,EAAQ,kCAAkC;AAC1C,IAAA,aAAA,EAAY,kCAAkC;AAC9CE,IAAAA,KAAK,EAAC,IAAA;GAENJ,eAAAA,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMC,IAAAA,SAAS,EAAC,2BAAA;AAA2B,GAAA,EACxCJ,CAAC,CAAC,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-molecules",
3
- "version": "1.19.4",
3
+ "version": "1.19.6",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -60,5 +60,6 @@ const Onboarding: React.FC<{
60
60
  setCurrentStep: React.Dispatch<React.SetStateAction<number>>;
61
61
  onboardingSteps?: OnboardingComponent[];
62
62
  helpScreenClassName?: string;
63
+ isAnimated?: boolean;
63
64
  }>;
64
65
  export default Onboarding;