@coorpacademy/components 11.32.0 → 11.32.1-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link/index.d.ts +1 -0
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +6 -5
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +3 -0
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +1 -0
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/chip/index.d.ts +1 -1
- package/es/atom/chip/index.d.ts.map +1 -1
- package/es/atom/chip/index.js +2 -6
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/chip/style.css +2 -2
- package/es/atom/icon/index.d.ts +1 -1
- package/es/atom/icon/index.d.ts.map +1 -1
- package/es/atom/icon/index.js +6 -4
- package/es/atom/icon/index.js.map +1 -1
- package/es/molecule/base-modal/index.d.ts +33 -0
- package/es/molecule/base-modal/index.d.ts.map +1 -0
- package/es/molecule/base-modal/index.js +142 -0
- package/es/molecule/base-modal/index.js.map +1 -0
- package/es/molecule/base-modal/style.css +125 -0
- package/es/molecule/cm-popin/types.d.ts +2 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.d.ts +2 -0
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.js +9 -4
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learning-profile-radar-chart/index.d.ts +1 -1
- package/es/molecule/learning-profile-radar-chart/index.d.ts.map +1 -1
- package/es/molecule/learning-profile-radar-chart/index.js +20 -11
- package/es/molecule/learning-profile-radar-chart/index.js.map +1 -1
- package/es/molecule/learning-profile-radar-chart/types.d.ts +7 -1
- package/es/molecule/learning-profile-radar-chart/types.d.ts.map +1 -1
- package/es/molecule/learning-profile-radar-chart/types.js.map +1 -1
- package/es/molecule/skill-picker-modal/index.d.ts +23 -0
- package/es/molecule/skill-picker-modal/index.d.ts.map +1 -0
- package/es/molecule/skill-picker-modal/index.js +138 -0
- package/es/molecule/skill-picker-modal/index.js.map +1 -0
- package/es/molecule/skill-picker-modal/style.css +28 -0
- package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/es/molecule/skills-chart-side-information-item/index.js +1 -1
- package/es/molecule/skills-chart-side-information-item/index.js.map +1 -1
- package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/es/molecule/skills-chart-side-information-panel/style.css +18 -9
- package/es/organism/list-items/index.d.ts +2 -0
- package/es/organism/setup-header/index.d.ts +4 -0
- package/es/organism/wizard-contents/index.d.ts +3 -0
- package/es/template/app-player/loading/index.d.ts +2 -0
- package/es/template/app-player/player/index.d.ts +4 -0
- package/es/template/app-player/player/slides/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +2 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +2 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +4 -0
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +4 -0
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +11 -0
- package/es/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +4 -0
- package/es/template/common/search-page/index.d.ts +2 -0
- package/es/template/external-course/index.d.ts +2 -0
- package/es/template/my-learning/index.d.ts +34 -0
- package/es/template/my-learning/index.d.ts.map +1 -0
- package/es/template/my-learning/index.js +352 -0
- package/es/template/my-learning/index.js.map +1 -0
- package/es/template/my-learning/style.css +196 -0
- package/lib/atom/button-link/index.d.ts +1 -0
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +6 -5
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +3 -0
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +1 -0
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/chip/index.d.ts +1 -1
- package/lib/atom/chip/index.d.ts.map +1 -1
- package/lib/atom/chip/index.js +3 -6
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/chip/style.css +2 -2
- package/lib/atom/icon/index.d.ts +1 -1
- package/lib/atom/icon/index.d.ts.map +1 -1
- package/lib/atom/icon/index.js +6 -4
- package/lib/atom/icon/index.js.map +1 -1
- package/lib/molecule/base-modal/index.d.ts +33 -0
- package/lib/molecule/base-modal/index.d.ts.map +1 -0
- package/lib/molecule/base-modal/index.js +158 -0
- package/lib/molecule/base-modal/index.js.map +1 -0
- package/lib/molecule/base-modal/style.css +125 -0
- package/lib/molecule/cm-popin/types.d.ts +2 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.d.ts +2 -0
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +9 -4
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/index.d.ts +1 -1
- package/lib/molecule/learning-profile-radar-chart/index.d.ts.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/index.js +20 -11
- package/lib/molecule/learning-profile-radar-chart/index.js.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/types.d.ts +7 -1
- package/lib/molecule/learning-profile-radar-chart/types.d.ts.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/types.js.map +1 -1
- package/lib/molecule/skill-picker-modal/index.d.ts +23 -0
- package/lib/molecule/skill-picker-modal/index.d.ts.map +1 -0
- package/lib/molecule/skill-picker-modal/index.js +156 -0
- package/lib/molecule/skill-picker-modal/index.js.map +1 -0
- package/lib/molecule/skill-picker-modal/style.css +28 -0
- package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.js +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.js.map +1 -1
- package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
- package/lib/molecule/skills-chart-side-information-panel/style.css +18 -9
- package/lib/organism/list-items/index.d.ts +2 -0
- package/lib/organism/setup-header/index.d.ts +4 -0
- package/lib/organism/wizard-contents/index.d.ts +3 -0
- package/lib/template/app-player/loading/index.d.ts +2 -0
- package/lib/template/app-player/player/index.d.ts +4 -0
- package/lib/template/app-player/player/slides/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +2 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +2 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +4 -0
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +4 -0
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +11 -0
- package/lib/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +4 -0
- package/lib/template/common/search-page/index.d.ts +2 -0
- package/lib/template/external-course/index.d.ts +2 -0
- package/lib/template/my-learning/index.d.ts +34 -0
- package/lib/template/my-learning/index.d.ts.map +1 -0
- package/lib/template/my-learning/index.js +373 -0
- package/lib/template/my-learning/index.js.map +1 -0
- package/lib/template/my-learning/style.css +196 -0
- package/locales/en/global.json +25 -0
- package/locales/sl/global.json +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["top","offset","x","y","alignment","margin","bottom","right","marginRight","left","marginLeft","BLACK","WHITE","DEFAULT_MAIN_COLOR","DEFAULT_COLORS","gradient","fill","stroke","percentage","color","background","label","CHART_CONFIGS","triangle","name","ticks","sideCount","quadrilateral","pentagon","hexagon","DOT_DEFAULT_PROPS","strokeWidth","strokeOpacity","r","pointerEvents","style","cursor","DOT_ACTIVE_PROPS","RADAR_DEFAULT_PROPS","fillOpacity","Gradient","type","colors","firstColor","secondColor","CustomTooltip","active","payload","length","tooltip","tooltipLabel","tooltipValue","value","CustomDot","cx","cy","onDotClick","activeDot","dataName","subject","onClick","e","stopPropagation","buildRadars","totalDataset","handleOnDotClick","index","datakey","dataset","buildCustomLabel","percentagesValues","chartType","formatedColors","isCurrentDotActive","offsetX","offsetY","rest","onLabelClick","classnames","tickWrapper","tickWrapperFocus","alignItems","textAlign","opacity","map","colorLabel","i","tickValue","tickLabel","CHART_CONFIGS_BY_SIDE_COUNT","formatValues","values_","val","formatData","legend","data_","ref","LearningProfileRadarChart","data","colorsProps","width","height","isMobile","setIsMobile","useState","setActiveDot","Object","assign","useMemo","gradients","userAgent","navigator","isMobile_","getIsMobile","setIsMobile_","useCallback","useEffect","handleClick","undefined","window","addEventListener","removeEventListener","formatedData","find","indexOf","skillRef","key","renderCustomLabel","currentData","ResponsiveLearningProfileRadarChart","props","propTypes","learningProfileRadarChartPropTypes"],"sources":["../../../src/molecule/learning-profile-radar-chart/index.tsx"],"sourcesContent":["import React, {Fragment, useCallback, useEffect, useMemo, useState} from 'react';\nimport {\n Radar,\n RadarChart,\n PolarGrid,\n PolarAngleAxis,\n ResponsiveContainer,\n Tooltip,\n PolarRadiusAxis\n} from 'recharts';\nimport {\n pipe,\n keyBy,\n mapValues,\n size,\n getOr,\n map,\n toPairs,\n values,\n isEmpty,\n omit,\n fromPairs,\n times,\n flatten,\n findKey\n} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {isMobile as getIsMobile} from '../../util/check-is-mobile';\nimport style from './style.css';\nimport {\n ActiveDotType,\n FormatedColorsType,\n FormatedDataType,\n LearningProfileRadarChartPropTypes,\n TickType,\n learningProfileRadarChartPropTypes\n} from './types';\n\ntype CHART_TYPE_TYPE = keyof typeof CHART_CONFIGS;\n\n/* TICK_POSITIONS */\nconst top: TickType = {offset: {x: -100, y: -65}, alignment: 'center', margin: 'auto'};\nconst bottom: TickType = {offset: {x: -100, y: 10}, alignment: 'center', margin: 'auto'};\nconst right: TickType = {offset: {x: 30, y: -10}, alignment: 'start', marginRight: 'auto'};\nconst left: TickType = {offset: {x: -230, y: -10}, alignment: 'end', marginLeft: 'auto'};\n\n/* CONSTANTS */\nconst BLACK = '#000000ff';\nconst WHITE = '#ffffffff';\nconst DEFAULT_MAIN_COLOR = '#0062ffff';\n\nconst DEFAULT_COLORS: FormatedColorsType = {\n gradient: {\n fill: [DEFAULT_MAIN_COLOR, DEFAULT_MAIN_COLOR],\n stroke: [DEFAULT_MAIN_COLOR, DEFAULT_MAIN_COLOR]\n },\n percentage: {\n color: BLACK,\n background: WHITE\n },\n label: {\n color: BLACK\n }\n};\n\nconst CHART_CONFIGS = {\n triangle: {\n name: 'triangle',\n ticks: [top, right, left],\n sideCount: 3\n },\n quadrilateral: {\n name: 'quadrilateral',\n ticks: [top, right, bottom, left],\n sideCount: 4\n },\n pentagon: {\n name: 'pentagon',\n ticks: [top, right, right, left, left],\n sideCount: 5\n },\n hexagon: {\n name: 'hexagon',\n ticks: [top, right, right, bottom, left, left],\n sideCount: 6\n }\n} as const;\n\nconst DOT_DEFAULT_PROPS = {\n strokeWidth: 4,\n strokeOpacity: 0.2,\n fill: '#fff',\n r: 8,\n pointerEvents: 'all',\n style: {cursor: 'pointer'}\n} as const;\n\nconst DOT_ACTIVE_PROPS = {\n fill: '#fff',\n r: 8,\n strokeWidth: 6,\n strokeOpacity: 0.5\n} as const;\n\nconst RADAR_DEFAULT_PROPS = {\n strokeWidth: 6,\n strokeOpacity: 0.2,\n fillOpacity: 0.2\n} as const;\n\n/* COMPONENTS */\nconst Gradient = ({type, colors: [firstColor, secondColor]}: {type: string; colors: string[]}) => (\n <defs>\n <linearGradient id={`gradient-${type}`} x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor={firstColor} />\n <stop offset=\"100%\" stopColor={secondColor} />\n </linearGradient>\n </defs>\n);\n\nconst CustomTooltip = ({\n active,\n payload,\n label\n}: {\n active?: boolean;\n payload?: {value: number}[];\n label?: string;\n}) =>\n active && !!payload?.length ? (\n <div className={style.tooltip}>\n <span className={style.tooltipLabel}>{label}</span>\n <span className={style.tooltipValue}>{payload[0].value}%</span>\n </div>\n ) : null;\n\nconst CustomDot = ({\n cx,\n cy,\n payload,\n onDotClick,\n stroke,\n activeDot,\n dataName\n}: {\n cx?: number;\n cy?: number;\n payload?: {payload: {subject: string} & {[datakey: string]: number}; name: string};\n onDotClick: (name: string) => void;\n dataKey: string;\n stroke: string;\n activeDot?: ActiveDotType;\n dataName: string;\n}) => (\n <circle\n {...{\n ...DOT_DEFAULT_PROPS,\n ...(payload?.payload.subject === activeDot?.label && DOT_ACTIVE_PROPS),\n stroke,\n cx,\n cy,\n onClick: e => {\n e.stopPropagation();\n\n if (!payload?.name) return;\n onDotClick(payload.name);\n },\n 'data-name': dataName\n }}\n />\n);\n\nconst buildRadars = (\n totalDataset: number,\n handleOnDotClick: (name: string) => void,\n activeDot?: ActiveDotType\n) =>\n times(index => {\n const datakey = `value${index + 1}`;\n const dataset = `dataset-${index + 1}`;\n\n return (\n <Radar\n {...RADAR_DEFAULT_PROPS}\n fill={`url(#gradient-fill-${index})`}\n stroke={`url(#gradient-stroke-${index})`}\n key={dataset}\n name={dataset}\n dataKey={datakey}\n activeDot={{\n ...DOT_ACTIVE_PROPS,\n stroke: `url(#gradient-stroke-${index})`\n }}\n // only on mobile\n // to handle dot style on hover (convert to click)\n // use with the tooltip component\n dot={\n <CustomDot\n onDotClick={handleOnDotClick}\n activeDot={activeDot}\n dataKey={datakey}\n stroke={`url(#gradient-stroke-${index})`}\n dataName={`dot-${dataset}`}\n />\n }\n />\n );\n }, totalDataset);\n\nconst buildCustomLabel = ({\n index,\n x,\n y,\n percentagesValues,\n label,\n activeDot,\n chartType,\n formatedColors,\n onClick\n}: {\n index: number;\n x: number;\n y: number;\n percentagesValues: number[];\n label: string;\n chartType: CHART_TYPE_TYPE;\n formatedColors: FormatedColorsType[];\n activeDot?: ActiveDotType;\n onClick: (name: string) => void;\n}) => {\n const isCurrentDotActive = activeDot?.label === label;\n const {\n offset: {x: offsetX, y: offsetY},\n alignment,\n ...rest\n } = CHART_CONFIGS[chartType].ticks[index];\n\n function onLabelClick(e: React.MouseEvent) {\n e.stopPropagation();\n onClick(label);\n }\n\n return (\n <g>\n <foreignObject x={x + offsetX} y={y + offsetY} width=\"200\" height=\"65\">\n <div\n data-name={label}\n onClick={onLabelClick}\n className={classnames(style.tickWrapper, isCurrentDotActive && style.tickWrapperFocus)}\n style={{\n ...rest,\n alignItems: alignment,\n textAlign: alignment,\n opacity: !isEmpty(activeDot) && !isCurrentDotActive ? 0.3 : 1\n }}\n >\n {formatedColors.map(\n ({percentage: {color, background}, label: {color: colorLabel}}, i) => (\n <Fragment key={i}>\n <span className={style.tickValue} style={{color, background}}>\n {percentagesValues[i]}\n </span>\n <span className={style.tickLabel} style={{color: colorLabel}}>\n {label}\n </span>\n </Fragment>\n )\n )}\n </div>\n </foreignObject>\n </g>\n );\n};\n\n/* UTILS */\nconst CHART_CONFIGS_BY_SIDE_COUNT = pipe(keyBy('sideCount'), mapValues('name'))(CHART_CONFIGS);\n\nconst formatValues: (values_: number | number[]) => Record<string, number> = pipe(\n values_ => flatten([values_]),\n values_ => values_.map((val: number, i: number): [string, number] => [`value${i + 1}`, val]),\n fromPairs\n);\n\n/* this convert incoming component data to rechart data structure */\nexport const formatData: (\n legend: {[ref: string]: string},\n data_: LearningProfileRadarChartPropTypes['data']\n) => FormatedDataType[] = (legend, data_) =>\n pipe(\n toPairs,\n map(([ref, values_]: [string, number | number[]]) => ({\n ...formatValues(values_),\n subject: legend[ref]\n }))\n )(data_);\n\nexport const LearningProfileRadarChart = ({\n data,\n legend,\n totalDataset,\n colors: colorsProps,\n onClick,\n width,\n height\n}: LearningProfileRadarChartPropTypes) => {\n const [isMobile, setIsMobile] = useState(false);\n const [activeDot, setActiveDot] = useState<ActiveDotType>();\n\n const formatedColors = times(i => {\n if (!colorsProps?.length) return DEFAULT_COLORS;\n\n const colors = colorsProps[i];\n return colors ? Object.assign({}, DEFAULT_COLORS, colors) : DEFAULT_COLORS;\n })(totalDataset);\n\n const chartType: CHART_TYPE_TYPE = useMemo(\n () => getOr('hexagon', size(data), CHART_CONFIGS_BY_SIDE_COUNT),\n [data]\n );\n\n const gradients = useMemo(\n () =>\n formatedColors.map(({gradient: {fill, stroke}}, index) => (\n <svg key={`gradient-${index}`}>\n <Gradient type={`fill-${index}`} colors={fill} />\n <Gradient type={`stroke-${index}`} colors={stroke} />\n </svg>\n )),\n [formatedColors]\n );\n\n const userAgent = navigator?.userAgent;\n const isMobile_ = useMemo(() => getIsMobile(userAgent), [userAgent]);\n\n const setIsMobile_ = useCallback(() => {\n setIsMobile(isMobile_);\n }, [isMobile_]);\n\n useEffect(() => setIsMobile_(), [setIsMobile_]);\n\n useEffect(() => {\n const handleClick = () => setActiveDot(undefined);\n\n !isEmpty(activeDot) && window.addEventListener('click', handleClick);\n\n return () => {\n window.removeEventListener('click', handleClick);\n };\n }, [activeDot]);\n\n function handleOnDotClick(label: string) {\n const payload = formatedData.find(({subject}) => subject === label);\n if (!payload) return;\n\n const index = formatedData.indexOf(payload);\n const datakey = `value${index + 1}`;\n const skillRef = findKey(val => val === payload?.subject, legend);\n\n if (skillRef) {\n setActiveDot({\n key: datakey,\n value: payload[datakey],\n label: payload.subject\n });\n onClick(skillRef);\n }\n }\n\n function renderCustomLabel({\n x,\n y,\n payload: {value: label},\n index\n }: {\n x: number;\n y: number;\n payload: {value: string};\n index: number;\n }) {\n const currentData = formatedData.find(({subject}) => subject === label);\n const percentagesValues: number[] = pipe(\n omit('subject'),\n mapValues(value => `${value}%`),\n values\n )(currentData);\n\n return buildCustomLabel({\n index,\n x,\n y,\n percentagesValues,\n label,\n activeDot,\n chartType,\n formatedColors,\n onClick: handleOnDotClick\n });\n }\n const formatedData = useMemo(() => formatData(legend, data), [legend, data]);\n\n return (\n <RadarChart\n width={width}\n height={height}\n cx=\"50%\"\n cy=\"50%\"\n outerRadius=\"80%\"\n data={formatedData}\n >\n {gradients}\n {buildRadars(totalDataset, handleOnDotClick, activeDot)}\n <PolarGrid strokeDasharray={15} strokeWidth={3} radialLines={false} />\n <PolarAngleAxis dataKey=\"subject\" tick={!isMobile && renderCustomLabel} />\n <PolarRadiusAxis tick={false} axisLine={false} domain={[0, 100]} />\n {isMobile ? <Tooltip cursor={false} content={<CustomTooltip />} /> : null}\n </RadarChart>\n );\n};\n\nconst ResponsiveLearningProfileRadarChart = (props: LearningProfileRadarChartPropTypes) => (\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LearningProfileRadarChart {...props} />\n </ResponsiveContainer>\n);\n\nLearningProfileRadarChart.propTypes = learningProfileRadarChartPropTypes;\nResponsiveLearningProfileRadarChart.propTypes = learningProfileRadarChartPropTypes;\n\nexport default ResponsiveLearningProfileRadarChart;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAyBA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAWA;AACA,MAAMA,GAAa,GAAG;EAACC,MAAM,EAAE;IAACC,CAAC,EAAE,CAAC,GAAL;IAAUC,CAAC,EAAE,CAAC;EAAd,CAAT;EAA4BC,SAAS,EAAE,QAAvC;EAAiDC,MAAM,EAAE;AAAzD,CAAtB;AACA,MAAMC,MAAgB,GAAG;EAACL,MAAM,EAAE;IAACC,CAAC,EAAE,CAAC,GAAL;IAAUC,CAAC,EAAE;EAAb,CAAT;EAA2BC,SAAS,EAAE,QAAtC;EAAgDC,MAAM,EAAE;AAAxD,CAAzB;AACA,MAAME,KAAe,GAAG;EAACN,MAAM,EAAE;IAACC,CAAC,EAAE,EAAJ;IAAQC,CAAC,EAAE,CAAC;EAAZ,CAAT;EAA0BC,SAAS,EAAE,OAArC;EAA8CI,WAAW,EAAE;AAA3D,CAAxB;AACA,MAAMC,IAAc,GAAG;EAACR,MAAM,EAAE;IAACC,CAAC,EAAE,CAAC,GAAL;IAAUC,CAAC,EAAE,CAAC;EAAd,CAAT;EAA4BC,SAAS,EAAE,KAAvC;EAA8CM,UAAU,EAAE;AAA1D,CAAvB;AAEA;;AACA,MAAMC,KAAK,GAAG,WAAd;AACA,MAAMC,KAAK,GAAG,WAAd;AACA,MAAMC,kBAAkB,GAAG,WAA3B;AAEA,MAAMC,cAAkC,GAAG;EACzCC,QAAQ,EAAE;IACRC,IAAI,EAAE,CAACH,kBAAD,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EK;IATa,CAAD,CAAvB;EAWD;;EACD,MAAMyD,YAAY,GAAG,IAAAd,cAAA,EAAQ,MAAMf,UAAU,CAACC,MAAD,EAASI,IAAT,CAAxB,EAAwC,CAACJ,MAAD,EAASI,IAAT,CAAxC,CAArB;EAEA,oBACE,6BAAC,oBAAD;IACE,KAAK,EAAEE,KADT;IAEE,MAAM,EAAEC,MAFV;IAGE,EAAE,EAAC,KAHL;IAIE,EAAE,EAAC,KAJL;IAKE,WAAW,EAAC,KALd;IAME,IAAI,EAAEqB;EANR,GAQGb,SARH,EASG9C,WAAW,CAACC,YAAD,EAAeC,gBAAf,EAAiCR,SAAjC,CATd,eAUE,6BAAC,mBAAD;IAAW,eAAe,EAAE,EAA5B;IAAgC,WAAW,EAAE,CAA7C;IAAgD,WAAW,EAAE;EAA7D,EAVF,eAWE,6BAAC,wBAAD;IAAgB,OAAO,EAAC,SAAxB;IAAkC,IAAI,EAAE,CAAC6C,QAAD,IAAayB;EAArD,EAXF,eAYE,6BAAC,yBAAD;IAAiB,IAAI,EAAE,KAAvB;IAA8B,QAAQ,EAAE,KAAxC;IAA+C,MAAM,EAAE,CAAC,CAAD,EAAI,GAAJ;EAAvD,EAZF,EAaGzB,QAAQ,gBAAG,6BAAC,iBAAD;IAAS,MAAM,EAAE,KAAjB;IAAwB,OAAO,eAAE,6BAAC,aAAD;EAAjC,EAAH,GAA4D,IAbvE,CADF;AAiBD,CAzHM;;;;AA2HP,MAAM2B,mCAAmC,GAAIC,KAAD,iBAC1C,6BAAC,6BAAD;EAAqB,KAAK,EAAC,MAA3B;EAAkC,MAAM,EAAC;AAAzC,gBACE,6BAAC,yBAAD,EAA+BA,KAA/B,CADF,CADF;;AAMAjC,yBAAyB,CAACkC,SAA1B,2CAAsCC,yCAAtC;AACAH,mCAAmC,CAACE,SAApC,2CAAgDC,yCAAhD;eAEeH,mC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["top","offset","x","y","alignment","margin","bottom","right","marginRight","left","marginLeft","BLACK","WHITE","DEFAULT_MAIN_COLOR","DEFAULT_COLORS","gradient","fill","stroke","percentage","color","background","label","CHART_CONFIGS","triangle","name","ticks","sideCount","quadrilateral","pentagon","hexagon","DOT_DEFAULT_PROPS","strokeWidth","strokeOpacity","r","pointerEvents","style","cursor","DOT_ACTIVE_PROPS","RADAR_DEFAULT_PROPS","fillOpacity","Gradient","type","colors","firstColor","secondColor","CustomTooltip","active","payload","length","tooltip","tooltipLabel","tooltipValue","value","CustomDot","cx","cy","onDotClick","activeDot","dataName","subject","onClick","e","stopPropagation","buildRadars","totalDataset","handleOnDotClick","index","datakey","dataset","buildCustomLabel","percentagesValues","chartType","formatedColors","isCurrentDotActive","offsetX","offsetY","rest","onLabelClick","classnames","tickWrapper","tickWrapperFocus","alignItems","textAlign","opacity","map","colorLabel","i","tickValue","tickLabel","CHART_CONFIGS_BY_SIDE_COUNT","formatValues","values_","val","formatData","legend","data_","ref","LearningProfileRadarChart","data","colorsProps","width","height","isMobile","setIsMobile","useState","setActiveDot","Object","assign","useMemo","gradients","userAgent","navigator","isMobile_","getIsMobile","setIsMobile_","useCallback","useEffect","handleClick","undefined","window","addEventListener","removeEventListener","formatedData","find","indexOf","skillRef","key","renderCustomLabel","currentData","ResponsiveLearningProfileRadarChart","props","propTypes","learningProfileRadarChartPropTypes"],"sources":["../../../src/molecule/learning-profile-radar-chart/index.tsx"],"sourcesContent":["import React, {Fragment, useCallback, useEffect, useMemo, useState} from 'react';\nimport {\n Radar,\n RadarChart,\n PolarGrid,\n PolarAngleAxis,\n ResponsiveContainer,\n Tooltip,\n PolarRadiusAxis\n} from 'recharts';\nimport {\n pipe,\n keyBy,\n mapValues,\n size,\n getOr,\n map,\n toPairs,\n values,\n isEmpty,\n omit,\n fromPairs,\n times,\n flatten,\n findKey\n} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {isMobile as getIsMobile} from '../../util/check-is-mobile';\nimport style from './style.css';\nimport {\n ActiveDotType,\n FormatedColorsType,\n FormatedDataType,\n LearningProfileRadarChartPropTypes,\n TickType,\n learningProfileRadarChartPropTypes\n} from './types';\n\ntype CHART_TYPE_TYPE = keyof typeof CHART_CONFIGS;\n\n/* TICK_POSITIONS */\nconst top: TickType = {offset: {x: -100, y: -65}, alignment: 'center', margin: 'auto'};\nconst bottom: TickType = {offset: {x: -100, y: 10}, alignment: 'center', margin: 'auto'};\nconst right: TickType = {offset: {x: 30, y: -10}, alignment: 'start', marginRight: 'auto'};\nconst left: TickType = {offset: {x: -230, y: -10}, alignment: 'end', marginLeft: 'auto'};\n\n/* CONSTANTS */\nconst BLACK = '#000000ff';\nconst WHITE = '#ffffffff';\nconst DEFAULT_MAIN_COLOR = '#0062ffff';\n\nconst DEFAULT_COLORS: FormatedColorsType = {\n gradient: {\n fill: [DEFAULT_MAIN_COLOR, DEFAULT_MAIN_COLOR],\n stroke: [DEFAULT_MAIN_COLOR, DEFAULT_MAIN_COLOR]\n },\n percentage: {\n color: BLACK,\n background: WHITE\n },\n label: {\n color: BLACK\n }\n};\n\nconst CHART_CONFIGS = {\n triangle: {\n name: 'triangle',\n ticks: [top, right, left],\n sideCount: 3\n },\n quadrilateral: {\n name: 'quadrilateral',\n ticks: [top, right, bottom, left],\n sideCount: 4\n },\n pentagon: {\n name: 'pentagon',\n ticks: [top, right, right, left, left],\n sideCount: 5\n },\n hexagon: {\n name: 'hexagon',\n ticks: [top, right, right, bottom, left, left],\n sideCount: 6\n }\n} as const;\n\nconst DOT_DEFAULT_PROPS = {\n strokeWidth: 2,\n strokeOpacity: 0.4,\n fill: '#fff',\n r: 4,\n pointerEvents: 'all',\n style: {cursor: 'pointer'}\n} as const;\n\nconst DOT_ACTIVE_PROPS = {\n fill: '#fff',\n r: 6,\n strokeWidth: 4,\n strokeOpacity: 0.6\n} as const;\n\nconst RADAR_DEFAULT_PROPS = {\n strokeWidth: 3,\n strokeOpacity: 0.2,\n fillOpacity: 0.2\n} as const;\n\n/* COMPONENTS */\nconst Gradient = ({type, colors: [firstColor, secondColor]}: {type: string; colors: string[]}) => (\n <defs>\n <linearGradient id={`gradient-${type}`} x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor={firstColor} />\n <stop offset=\"100%\" stopColor={secondColor} />\n </linearGradient>\n </defs>\n);\n\nconst CustomTooltip = ({\n active,\n payload,\n label\n}: {\n active?: boolean;\n payload?: {value: number}[];\n label?: string;\n}) =>\n active && !!payload?.length ? (\n <div className={style.tooltip}>\n <span className={style.tooltipLabel}>{label}</span>\n <span className={style.tooltipValue}>{payload[0].value}%</span>\n </div>\n ) : null;\n\nconst CustomDot = ({\n cx,\n cy,\n payload,\n onDotClick,\n stroke,\n activeDot,\n dataName\n}: {\n cx?: number;\n cy?: number;\n payload?: {payload: {subject: string} & {[datakey: string]: number}; name: string};\n onDotClick: (name: string) => void;\n dataKey: string;\n stroke: string;\n activeDot?: ActiveDotType;\n dataName: string;\n}) => (\n <circle\n {...{\n ...DOT_DEFAULT_PROPS,\n ...(payload?.payload.subject === activeDot?.label && DOT_ACTIVE_PROPS),\n stroke,\n cx,\n cy,\n onClick: e => {\n e.stopPropagation();\n\n if (!payload?.name) return;\n onDotClick(payload.name);\n },\n 'data-name': dataName\n }}\n />\n);\n\nconst buildRadars = (\n totalDataset: number,\n handleOnDotClick: (name: string) => void,\n activeDot?: ActiveDotType\n) =>\n times(index => {\n const datakey = `value${index + 1}`;\n const dataset = `dataset-${index + 1}`;\n\n return (\n <Radar\n {...RADAR_DEFAULT_PROPS}\n fill={`url(#gradient-fill-${index})`}\n stroke={`url(#gradient-stroke-${index})`}\n key={dataset}\n name={dataset}\n dataKey={datakey}\n activeDot={{\n ...DOT_ACTIVE_PROPS,\n stroke: `url(#gradient-stroke-${index})`\n }}\n // only on mobile\n // to handle dot style on hover (convert to click)\n // use with the tooltip component\n dot={\n <CustomDot\n onDotClick={handleOnDotClick}\n activeDot={activeDot}\n dataKey={datakey}\n stroke={`url(#gradient-stroke-${index})`}\n dataName={`dot-${dataset}`}\n />\n }\n />\n );\n }, totalDataset);\n\nconst buildCustomLabel = ({\n index,\n x,\n y,\n percentagesValues,\n label,\n activeDot,\n chartType,\n formatedColors,\n onClick\n}: {\n index: number;\n x: number;\n y: number;\n percentagesValues: number[];\n label: string;\n chartType: CHART_TYPE_TYPE;\n formatedColors: FormatedColorsType[];\n activeDot?: ActiveDotType;\n onClick: (name: string) => void;\n}) => {\n const isCurrentDotActive = activeDot?.label === label;\n const {\n offset: {x: offsetX, y: offsetY},\n alignment,\n ...rest\n } = CHART_CONFIGS[chartType].ticks[index];\n\n function onLabelClick(e: React.MouseEvent) {\n e.stopPropagation();\n onClick(label);\n }\n\n return (\n <g>\n <foreignObject x={x + offsetX} y={y + offsetY} width=\"200\" height=\"65\">\n <div\n data-name={label}\n onClick={onLabelClick}\n className={classnames(style.tickWrapper, isCurrentDotActive && style.tickWrapperFocus)}\n style={{\n ...rest,\n alignItems: alignment,\n textAlign: alignment,\n opacity: !isEmpty(activeDot) && !isCurrentDotActive ? 0.3 : 1\n }}\n >\n {formatedColors.map(\n ({percentage: {color, background}, label: {color: colorLabel}}, i) => (\n <Fragment key={i}>\n <span className={style.tickValue} style={{color, background}}>\n {percentagesValues[i]}\n </span>\n <span className={style.tickLabel} style={{color: colorLabel}}>\n {label}\n </span>\n </Fragment>\n )\n )}\n </div>\n </foreignObject>\n </g>\n );\n};\n\n/* UTILS */\nconst CHART_CONFIGS_BY_SIDE_COUNT = pipe(keyBy('sideCount'), mapValues('name'))(CHART_CONFIGS);\n\nconst formatValues: (values_: number | number[]) => Record<string, number> = pipe(\n values_ => flatten([values_]),\n values_ => values_.map((val: number, i: number): [string, number] => [`value${i + 1}`, val]),\n fromPairs\n);\n\n/* this convert incoming component data to rechart data structure */\nexport const formatData: (\n legend: {[ref: string]: string},\n data_: LearningProfileRadarChartPropTypes['data']\n) => FormatedDataType[] = (legend, data_) =>\n pipe(\n toPairs,\n map(([ref, values_]: [string, number | number[]]) => ({\n ...formatValues(values_),\n subject: legend[ref]\n }))\n )(data_);\n\nexport const LearningProfileRadarChart = ({\n data,\n legend,\n totalDataset,\n colors: colorsProps,\n onClick,\n width,\n height,\n margin\n}: LearningProfileRadarChartPropTypes) => {\n const [isMobile, setIsMobile] = useState(false);\n const [activeDot, setActiveDot] = useState<ActiveDotType>();\n\n const formatedColors = times(i => {\n if (!colorsProps?.length) return DEFAULT_COLORS;\n\n const colors = colorsProps[i];\n return colors ? Object.assign({}, DEFAULT_COLORS, colors) : DEFAULT_COLORS;\n })(totalDataset);\n\n const chartType: CHART_TYPE_TYPE = useMemo(\n () => getOr('hexagon', size(data), CHART_CONFIGS_BY_SIDE_COUNT),\n [data]\n );\n\n const gradients = useMemo(\n () =>\n formatedColors.map(({gradient: {fill, stroke}}, index) => (\n <svg key={`gradient-${index}`}>\n <Gradient type={`fill-${index}`} colors={fill} />\n <Gradient type={`stroke-${index}`} colors={stroke} />\n </svg>\n )),\n [formatedColors]\n );\n\n const userAgent = navigator?.userAgent;\n const isMobile_ = useMemo(() => getIsMobile(userAgent), [userAgent]);\n\n const setIsMobile_ = useCallback(() => {\n setIsMobile(isMobile_);\n }, [isMobile_]);\n\n useEffect(() => setIsMobile_(), [setIsMobile_]);\n\n useEffect(() => {\n const handleClick = () => {\n setActiveDot(undefined);\n onClick(undefined);\n };\n\n !isEmpty(activeDot) && window.addEventListener('click', handleClick);\n\n return () => {\n window.removeEventListener('click', handleClick);\n };\n }, [activeDot]);\n\n function handleOnDotClick(label: string) {\n const payload = formatedData.find(({subject}) => subject === label);\n if (!payload) return;\n\n const index = formatedData.indexOf(payload);\n const datakey = `value${index + 1}`;\n const skillRef = findKey(val => val === payload?.subject, legend);\n\n if (skillRef) {\n setActiveDot({\n key: datakey,\n value: payload[datakey],\n label: payload.subject\n });\n onClick(skillRef);\n }\n }\n\n function renderCustomLabel({\n x,\n y,\n payload: {value: label},\n index\n }: {\n x: number;\n y: number;\n payload: {value: string};\n index: number;\n }) {\n const currentData = formatedData.find(({subject}) => subject === label);\n const percentagesValues: number[] = pipe(\n omit('subject'),\n mapValues(value => `${value}%`),\n values\n )(currentData);\n\n return buildCustomLabel({\n index,\n x,\n y,\n percentagesValues,\n label,\n activeDot,\n chartType,\n formatedColors,\n onClick: handleOnDotClick\n });\n }\n const formatedData = useMemo(() => formatData(legend, data), [legend, data]);\n\n return (\n <RadarChart\n width={width}\n height={height}\n margin={margin ?? (isMobile ? {top: 80} : {top: 180})}\n cx=\"50%\"\n cy=\"50%\"\n outerRadius=\"80%\"\n data={formatedData}\n >\n {gradients}\n {buildRadars(totalDataset, handleOnDotClick, activeDot)}\n <PolarGrid strokeDasharray={10} strokeWidth={2} radialLines={false} />\n <PolarAngleAxis dataKey=\"subject\" tick={!isMobile && renderCustomLabel} />\n <PolarRadiusAxis tick={false} axisLine={false} domain={[0, 100]} />\n {isMobile ? <Tooltip cursor={false} content={<CustomTooltip />} /> : null}\n </RadarChart>\n );\n};\n\nconst ResponsiveLearningProfileRadarChart = (props: LearningProfileRadarChartPropTypes) => (\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LearningProfileRadarChart {...props} />\n </ResponsiveContainer>\n);\n\nLearningProfileRadarChart.propTypes = learningProfileRadarChartPropTypes;\nResponsiveLearningProfileRadarChart.propTypes = learningProfileRadarChartPropTypes;\n\nexport default ResponsiveLearningProfileRadarChart;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAyBA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAWA;AACA,MAAMA,GAAa,GAAG;EAACC,MAAM,EAAE;IAACC,CAAC,EAAE,CAAC,GAAL;IAAUC,CAAC,EAAE,CAAC;EAAd,CAAT;EAA4BC,SAAS,EAAE,QAAvC;EAAiDC,MAAM,EAAE;AAAzD,CAAtB;AACA,MAAMC,MAAgB,GAAG;EAACL,MAAM,EAAE;IAACC,CAAC,EAAE,CAAC,GAAL;IAAUC,CAAC,EAAE;EAAb,CAAT;EAA2BC,SAA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CAA7C;IAAgD,WAAW,EAAE;EAA7D,EAXF,eAYE,6BAAC,wBAAD;IAAgB,OAAO,EAAC,SAAxB;IAAkC,IAAI,EAAE,CAAC6C,QAAD,IAAayB;EAArD,EAZF,eAaE,6BAAC,yBAAD;IAAiB,IAAI,EAAE,KAAvB;IAA8B,QAAQ,EAAE,KAAxC;IAA+C,MAAM,EAAE,CAAC,CAAD,EAAI,GAAJ;EAAvD,EAbF,EAcGzB,QAAQ,gBAAG,6BAAC,iBAAD;IAAS,MAAM,EAAE,KAAjB;IAAwB,OAAO,eAAE,6BAAC,aAAD;EAAjC,EAAH,GAA4D,IAdvE,CADF;AAkBD,CA9HM;;;;AAgIP,MAAM2B,mCAAmC,GAAIC,KAAD,iBAC1C,6BAAC,6BAAD;EAAqB,KAAK,EAAC,MAA3B;EAAkC,MAAM,EAAC;AAAzC,gBACE,6BAAC,yBAAD,EAA+BA,KAA/B,CADF,CADF;;AAMAjC,yBAAyB,CAACkC,SAA1B,2CAAsCC,yCAAtC;AACAH,mCAAmC,CAACE,SAApC,2CAAgDC,yCAAhD;eAEeH,mC"}
|
|
@@ -73,10 +73,16 @@ export declare type LearningProfileRadarChartPropTypes = {
|
|
|
73
73
|
[ref: string]: string;
|
|
74
74
|
};
|
|
75
75
|
totalDataset: number;
|
|
76
|
-
onClick: (skillRef
|
|
76
|
+
onClick: (skillRef?: string) => void;
|
|
77
77
|
colors?: ColorType[];
|
|
78
78
|
width?: number;
|
|
79
79
|
height?: number;
|
|
80
|
+
margin?: {
|
|
81
|
+
top?: number;
|
|
82
|
+
right?: number;
|
|
83
|
+
bottom?: number;
|
|
84
|
+
left?: number;
|
|
85
|
+
};
|
|
80
86
|
};
|
|
81
87
|
export declare type CustomDotPropTypes = {
|
|
82
88
|
cx: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/learning-profile-radar-chart/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS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AAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["learningProfileRadarChartPropTypes","data","PropTypes","objectOf","oneOfType","arrayOf","number","isRequired","totalDataset","onDotClick","func","colors","shape","gradient","fill","string","stroke","percentage","color","background","label","width","height","customDotPropTypes","cx","cy","payload","value","subject","name","index","activeDot","key","dataKey","customTooltipPropTypes","active","bool","gradientPropTypes","type"],"sources":["../../../src/molecule/learning-profile-radar-chart/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\n// PROPTYPES\nexport const learningProfileRadarChartPropTypes = {\n data: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number])\n ).isRequired,\n totalDataset: PropTypes.number.isRequired,\n onDotClick: PropTypes.func,\n colors: PropTypes.arrayOf(\n PropTypes.shape({\n gradient: PropTypes.shape({\n fill: PropTypes.arrayOf(PropTypes.string),\n stroke: PropTypes.arrayOf(PropTypes.string)\n }),\n percentage: PropTypes.shape({\n color: PropTypes.string,\n background: PropTypes.string\n }),\n label: PropTypes.shape({\n color: PropTypes.string\n })\n })\n ),\n width: PropTypes.number,\n height: PropTypes.number\n};\n\nexport const customDotPropTypes = {\n cx: PropTypes.number,\n cy: PropTypes.number,\n payload: PropTypes.shape({\n payload: PropTypes.shape({\n value: PropTypes.number,\n subject: PropTypes.string\n }),\n name: PropTypes.string\n }),\n onDotClick: PropTypes.func,\n index: PropTypes.number,\n activeDot: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.number,\n key: PropTypes.string\n }),\n dataKey: PropTypes.string,\n stroke: PropTypes.string\n};\n\nexport const customTooltipPropTypes = {\n active: PropTypes.bool,\n payload: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.number\n })\n ),\n label: PropTypes.string\n};\n\nexport const gradientPropTypes = {\n type: PropTypes.string,\n colors: PropTypes.arrayOf(PropTypes.string)\n};\n\n// TYPES\nexport type ColorType = {\n gradient?: {\n fill?: string[];\n stroke?: string[];\n };\n percentage?: {\n color?: string;\n background?: string;\n };\n label?: {\n color?: string;\n };\n};\n\nexport type LearningProfileRadarChartPropTypes = {\n data: {\n [ref: string]: number | number[];\n };\n legend: {\n [ref: string]: string;\n };\n totalDataset: number;\n onClick: (skillRef
|
|
1
|
+
{"version":3,"file":"types.js","names":["learningProfileRadarChartPropTypes","data","PropTypes","objectOf","oneOfType","arrayOf","number","isRequired","totalDataset","onDotClick","func","colors","shape","gradient","fill","string","stroke","percentage","color","background","label","width","height","customDotPropTypes","cx","cy","payload","value","subject","name","index","activeDot","key","dataKey","customTooltipPropTypes","active","bool","gradientPropTypes","type"],"sources":["../../../src/molecule/learning-profile-radar-chart/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\n// PROPTYPES\nexport const learningProfileRadarChartPropTypes = {\n data: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number])\n ).isRequired,\n totalDataset: PropTypes.number.isRequired,\n onDotClick: PropTypes.func,\n colors: PropTypes.arrayOf(\n PropTypes.shape({\n gradient: PropTypes.shape({\n fill: PropTypes.arrayOf(PropTypes.string),\n stroke: PropTypes.arrayOf(PropTypes.string)\n }),\n percentage: PropTypes.shape({\n color: PropTypes.string,\n background: PropTypes.string\n }),\n label: PropTypes.shape({\n color: PropTypes.string\n })\n })\n ),\n width: PropTypes.number,\n height: PropTypes.number\n};\n\nexport const customDotPropTypes = {\n cx: PropTypes.number,\n cy: PropTypes.number,\n payload: PropTypes.shape({\n payload: PropTypes.shape({\n value: PropTypes.number,\n subject: PropTypes.string\n }),\n name: PropTypes.string\n }),\n onDotClick: PropTypes.func,\n index: PropTypes.number,\n activeDot: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.number,\n key: PropTypes.string\n }),\n dataKey: PropTypes.string,\n stroke: PropTypes.string\n};\n\nexport const customTooltipPropTypes = {\n active: PropTypes.bool,\n payload: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.number\n })\n ),\n label: PropTypes.string\n};\n\nexport const gradientPropTypes = {\n type: PropTypes.string,\n colors: PropTypes.arrayOf(PropTypes.string)\n};\n\n// TYPES\nexport type ColorType = {\n gradient?: {\n fill?: string[];\n stroke?: string[];\n };\n percentage?: {\n color?: string;\n background?: string;\n };\n label?: {\n color?: string;\n };\n};\n\nexport type LearningProfileRadarChartPropTypes = {\n data: {\n [ref: string]: number | number[];\n };\n legend: {\n [ref: string]: string;\n };\n totalDataset: number;\n onClick: (skillRef?: string) => void;\n colors?: ColorType[];\n width?: number;\n height?: number;\n margin?: {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n };\n};\n\nexport type CustomDotPropTypes = {\n cx: number;\n cy: number;\n payload: {\n payload: {\n value: number;\n subject: string;\n };\n name: string;\n };\n onDotClick: (name: string) => void;\n index: number;\n activeDot?: {\n label: string;\n value: number;\n key: string;\n };\n dataKey: string;\n stroke: string;\n};\n\nexport type CustomTooltipPropTypes = {\n active: boolean;\n payload: {\n value: number;\n }[];\n label: string;\n};\n\nexport type GradientPropTypes = {\n type: string;\n colors: string[];\n};\n\nexport type TickType = {\n offset: {x: number; y: number};\n alignment: 'center' | 'start' | 'end';\n margin?: 'auto';\n marginLeft?: 'auto';\n marginRight?: 'auto';\n};\n\nexport type FormatedColorsType = {\n gradient: {\n fill: string[];\n stroke: string[];\n };\n percentage: {\n color: string;\n background: string;\n };\n label: {\n color: string;\n };\n};\n\nexport type FormatedDataType = {\n subject: string;\n} & {\n [key: string]: number | string;\n};\n\nexport type ActiveDotType = {\n key: string;\n value: number | string;\n label: string;\n};\n"],"mappings":";;;;;AAAA;;;;AAEA;AACO,MAAMA,kCAAkC,GAAG;EAChDC,IAAI,EAAEC,kBAAA,CAAUC,QAAV,CACJD,kBAAA,CAAUE,SAAV,CAAoB,CAACF,kBAAA,CAAUG,OAAV,CAAkBH,kBAAA,CAA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CAAUQ,IAVU;EAWhCoB,KAAK,EAAE5B,kBAAA,CAAUI,MAXe;EAYhCyB,SAAS,EAAE7B,kBAAA,CAAUU,KAAV,CAAgB;IACzBQ,KAAK,EAAElB,kBAAA,CAAUa,MADQ;IAEzBY,KAAK,EAAEzB,kBAAA,CAAUI,MAFQ;IAGzB0B,GAAG,EAAE9B,kBAAA,CAAUa;EAHU,CAAhB,CAZqB;EAiBhCkB,OAAO,EAAE/B,kBAAA,CAAUa,MAjBa;EAkBhCC,MAAM,EAAEd,kBAAA,CAAUa;AAlBc,CAA3B;;AAqBA,MAAMmB,sBAAsB,GAAG;EACpCC,MAAM,EAAEjC,kBAAA,CAAUkC,IADkB;EAEpCV,OAAO,EAAExB,kBAAA,CAAUG,OAAV,CACPH,kBAAA,CAAUU,KAAV,CAAgB;IACde,KAAK,EAAEzB,kBAAA,CAAUI;EADH,CAAhB,CADO,CAF2B;EAOpCc,KAAK,EAAElB,kBAAA,CAAUa;AAPmB,CAA/B;;AAUA,MAAMsB,iBAAiB,GAAG;EAC/BC,IAAI,EAAEpC,kBAAA,CAAUa,MADe;EAE/BJ,MAAM,EAAET,kBAAA,CAAUG,OAAV,CAAkBH,kBAAA,CAAUa,MAA5B;AAFuB,CAA1B,C,CAKP"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default SkillPickerModal;
|
|
2
|
+
declare function SkillPickerModal(props: any, context: any): JSX.Element | null;
|
|
3
|
+
declare namespace SkillPickerModal {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
|
+
}
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
const skills: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
9
|
+
const selectedSkills: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
10
|
+
const skillsLocales: PropTypes.Requireable<{
|
|
11
|
+
[x: string]: string | null | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
const isOpen: PropTypes.Requireable<boolean>;
|
|
14
|
+
const isLoading: PropTypes.Requireable<boolean>;
|
|
15
|
+
const minSelectedSkills: PropTypes.Requireable<number>;
|
|
16
|
+
const maxSelectedSkills: PropTypes.Requireable<number>;
|
|
17
|
+
const onCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
const onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
const onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
import PropTypes from "prop-types";
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/skill-picker-modal/index.js"],"names":[],"mappings":";AAQA,gFAwHC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _baseModal = _interopRequireDefault(require("../base-modal"));
|
|
11
|
+
|
|
12
|
+
var _chip = _interopRequireDefault(require("../../atom/chip"));
|
|
13
|
+
|
|
14
|
+
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
15
|
+
|
|
16
|
+
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
17
|
+
|
|
18
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
const SkillPickerModal = (props, context) => {
|
|
27
|
+
const {
|
|
28
|
+
skills,
|
|
29
|
+
selectedSkills,
|
|
30
|
+
skillsLocales,
|
|
31
|
+
isOpen,
|
|
32
|
+
isLoading,
|
|
33
|
+
maxSelectedSkills = 6,
|
|
34
|
+
minSelectedSkills = 3,
|
|
35
|
+
onCancel,
|
|
36
|
+
onConfirm,
|
|
37
|
+
onClose
|
|
38
|
+
} = props;
|
|
39
|
+
const {
|
|
40
|
+
translate
|
|
41
|
+
} = context;
|
|
42
|
+
const [selectedSkillList, setSelectedSkillList] = (0, _react.useState)([...selectedSkills]);
|
|
43
|
+
console.log(selectedSkillList, skills);
|
|
44
|
+
const handleCancel = (0, _react.useCallback)(() => {
|
|
45
|
+
setSelectedSkillList(selectedSkills);
|
|
46
|
+
onCancel();
|
|
47
|
+
}, [setSelectedSkillList, selectedSkills, onCancel]);
|
|
48
|
+
const handleClose = (0, _react.useCallback)(() => {
|
|
49
|
+
setSelectedSkillList(selectedSkills);
|
|
50
|
+
onClose();
|
|
51
|
+
}, [setSelectedSkillList, selectedSkills, onClose]);
|
|
52
|
+
const skillList = (0, _react.useMemo)(() => {
|
|
53
|
+
return skills.map(skill => {
|
|
54
|
+
return {
|
|
55
|
+
skillTitle: skillsLocales[skill],
|
|
56
|
+
skillRef: skill,
|
|
57
|
+
focus: selectedSkillList.includes(skill)
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
}, [skills, selectedSkillList, skillsLocales]);
|
|
61
|
+
const isError = (0, _react.useMemo)(() => selectedSkillList.length > maxSelectedSkills, [selectedSkillList, maxSelectedSkills]);
|
|
62
|
+
const footer = (0, _react.useMemo)(() => {
|
|
63
|
+
const footerDescription = isError ? translate('skill_focus_footer_error_description', {
|
|
64
|
+
skillNumber: selectedSkillList.length - maxSelectedSkills
|
|
65
|
+
}) : translate('skill_focus_footer_description', {
|
|
66
|
+
skillNumber: minSelectedSkills - selectedSkillList.length
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
text: isLoading || selectedSkillList.length <= maxSelectedSkills && selectedSkillList.length >= minSelectedSkills ? '' : footerDescription.replace('.'),
|
|
70
|
+
isError,
|
|
71
|
+
cancelButton: {
|
|
72
|
+
onCancel: handleCancel,
|
|
73
|
+
label: translate('cancel'),
|
|
74
|
+
disabled: isLoading || isError
|
|
75
|
+
},
|
|
76
|
+
confirmButton: {
|
|
77
|
+
onConfirm: () => onConfirm(selectedSkillList),
|
|
78
|
+
label: translate('confirm'),
|
|
79
|
+
iconName: 'circle-check',
|
|
80
|
+
disabled: isLoading || isError
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}, [isError, handleCancel, onConfirm, translate, selectedSkillList, isLoading, maxSelectedSkills]);
|
|
84
|
+
if (!isLoading && !skills || !isOpen) return null;
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement(_baseModal.default, {
|
|
86
|
+
title: translate('skill_focus'),
|
|
87
|
+
description: translate('skill_focus_description'),
|
|
88
|
+
isOpen: isOpen,
|
|
89
|
+
onClose: handleClose,
|
|
90
|
+
footer: footer,
|
|
91
|
+
headerIcon: {
|
|
92
|
+
name: 'bullseye-arrow',
|
|
93
|
+
backgroundColor: '#DDD1FF'
|
|
94
|
+
}
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
className: _style.default.skillPickerContainer
|
|
97
|
+
}, isLoading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: _style.default.loaderContainer
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
100
|
+
className: _style.default.loader,
|
|
101
|
+
theme: "coorpmanager"
|
|
102
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
+
style: {
|
|
104
|
+
marginBottom: '16px'
|
|
105
|
+
}
|
|
106
|
+
}, `${selectedSkillList.length} ${translate('selected')}`), /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
style: {
|
|
108
|
+
display: 'flex',
|
|
109
|
+
gap: '16px',
|
|
110
|
+
flexWrap: 'wrap'
|
|
111
|
+
}
|
|
112
|
+
}, skillList.map((skill, index) => {
|
|
113
|
+
const {
|
|
114
|
+
skillTitle,
|
|
115
|
+
focus
|
|
116
|
+
} = skill;
|
|
117
|
+
|
|
118
|
+
function handleChipClick() {
|
|
119
|
+
let filteredSelectedSkillList = [...selectedSkillList];
|
|
120
|
+
|
|
121
|
+
if (selectedSkillList.includes(skill.skillRef)) {
|
|
122
|
+
filteredSelectedSkillList = filteredSelectedSkillList.filter(ref => ref !== skill.skillRef);
|
|
123
|
+
} else {
|
|
124
|
+
filteredSelectedSkillList.push(skill.skillRef);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
setSelectedSkillList(filteredSelectedSkillList);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return /*#__PURE__*/_react.default.createElement(_chip.default, {
|
|
131
|
+
text: skillTitle,
|
|
132
|
+
selected: focus,
|
|
133
|
+
onClick: handleChipClick,
|
|
134
|
+
key: index
|
|
135
|
+
});
|
|
136
|
+
})))));
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
SkillPickerModal.contextTypes = {
|
|
140
|
+
translate: _provider.default.childContextTypes.translate
|
|
141
|
+
};
|
|
142
|
+
SkillPickerModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
143
|
+
skills: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
144
|
+
selectedSkills: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
145
|
+
skillsLocales: _propTypes.default.objectOf(_propTypes.default.string),
|
|
146
|
+
isOpen: _propTypes.default.bool,
|
|
147
|
+
isLoading: _propTypes.default.bool,
|
|
148
|
+
minSelectedSkills: _propTypes.default.number,
|
|
149
|
+
maxSelectedSkills: _propTypes.default.number,
|
|
150
|
+
onCancel: _propTypes.default.func,
|
|
151
|
+
onConfirm: _propTypes.default.func,
|
|
152
|
+
onClose: _propTypes.default.func
|
|
153
|
+
} : {};
|
|
154
|
+
var _default = SkillPickerModal;
|
|
155
|
+
exports.default = _default;
|
|
156
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["SkillPickerModal","props","context","skills","selectedSkills","skillsLocales","isOpen","isLoading","maxSelectedSkills","minSelectedSkills","onCancel","onConfirm","onClose","translate","selectedSkillList","setSelectedSkillList","useState","console","log","handleCancel","useCallback","handleClose","skillList","useMemo","map","skill","skillTitle","skillRef","focus","includes","isError","length","footer","footerDescription","skillNumber","text","replace","cancelButton","label","disabled","confirmButton","iconName","name","backgroundColor","style","skillPickerContainer","loaderContainer","loader","marginBottom","display","gap","flexWrap","index","handleChipClick","filteredSelectedSkillList","filter","ref","push","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","string","objectOf","bool","number","func"],"sources":["../../../src/molecule/skill-picker-modal/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport BaseModal from '../base-modal';\nimport Chip from '../../atom/chip';\nimport Loader from '../../atom/loader';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst SkillPickerModal = (props, context) => {\n const {\n skills,\n selectedSkills,\n skillsLocales,\n isOpen,\n isLoading,\n maxSelectedSkills = 6,\n minSelectedSkills = 3,\n onCancel,\n onConfirm,\n onClose\n } = props;\n const {translate} = context;\n\n const [selectedSkillList, setSelectedSkillList] = useState([...selectedSkills]);\n\n console.log(selectedSkillList, skills)\n\n const handleCancel = useCallback(() => {\n setSelectedSkillList(selectedSkills);\n onCancel();\n }, [setSelectedSkillList, selectedSkills, onCancel]);\n\n const handleClose = useCallback(() => {\n setSelectedSkillList(selectedSkills);\n onClose();\n }, [setSelectedSkillList, selectedSkills, onClose]);\n\n const skillList = useMemo(() => {\n return skills.map(skill => {\n return {\n skillTitle: skillsLocales[skill],\n skillRef: skill,\n focus: selectedSkillList.includes(skill)\n };\n });\n }, [skills, selectedSkillList, skillsLocales])\n\n const isError = useMemo(\n () => selectedSkillList.length > maxSelectedSkills,\n [selectedSkillList, maxSelectedSkills]\n );\n\n const footer = useMemo(() => {\n const footerDescription = isError\n ? translate('skill_focus_footer_error_description', {\n skillNumber: selectedSkillList.length - maxSelectedSkills\n })\n : translate('skill_focus_footer_description', {\n skillNumber: minSelectedSkills - selectedSkillList.length\n });\n return {\n text:\n isLoading ||\n (selectedSkillList.length <= maxSelectedSkills && selectedSkillList.length >= minSelectedSkills)\n ? ''\n : footerDescription.replace('.'),\n isError,\n cancelButton: {\n onCancel: handleCancel,\n label: translate('cancel'),\n disabled: isLoading || isError\n },\n confirmButton: {\n onConfirm: () => onConfirm(selectedSkillList),\n label: translate('confirm'),\n iconName: 'circle-check',\n disabled: isLoading || isError\n }\n };\n }, [isError, handleCancel, onConfirm, translate, selectedSkillList, isLoading, maxSelectedSkills]);\n\n if ((!isLoading && !skills) || !isOpen) return null;\n\n return (\n <BaseModal\n title={translate('skill_focus')}\n description={translate('skill_focus_description')}\n isOpen={isOpen}\n onClose={handleClose}\n footer={footer}\n headerIcon={{\n name: 'bullseye-arrow',\n backgroundColor: '#DDD1FF'\n }}\n >\n <div className={style.skillPickerContainer}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <>\n <div style={{marginBottom: '16px'}}>\n {`${selectedSkillList.length} ${translate('selected')}`}\n </div>\n <div style={{display: 'flex', gap: '16px', flexWrap: 'wrap'}}>\n {skillList.map((skill, index) => {\n const {skillTitle, focus} = skill;\n function handleChipClick() {\n let filteredSelectedSkillList = [...selectedSkillList];\n if (selectedSkillList.includes(skill.skillRef)) {\n filteredSelectedSkillList = filteredSelectedSkillList.filter(ref => ref !== skill.skillRef);\n } else {\n filteredSelectedSkillList.push(skill.skillRef);\n }\n setSelectedSkillList(filteredSelectedSkillList);\n }\n\n return (\n <Chip text={skillTitle} selected={focus} onClick={handleChipClick} key={index} />\n );\n })}\n </div>\n </>\n )}\n </div>\n </BaseModal>\n );\n};\n\nSkillPickerModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nSkillPickerModal.propTypes = {\n skills: PropTypes.arrayOf(PropTypes.string),\n selectedSkills: PropTypes.arrayOf(PropTypes.string),\n skillsLocales: PropTypes.objectOf(PropTypes.string),\n isOpen: PropTypes.bool,\n isLoading: PropTypes.bool,\n minSelectedSkills: PropTypes.number,\n maxSelectedSkills: PropTypes.number,\n onCancel: PropTypes.func,\n onConfirm: PropTypes.func,\n onClose: PropTypes.func\n};\n\nexport default SkillPickerModal;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJC,MADI;IAEJC,cAFI;IAGJC,aAHI;IAIJC,MAJI;IAKJC,SALI;IAMJC,iBAAiB,GAAG,CANhB;IAOJC,iBAAiB,GAAG,CAPhB;IAQJC,QARI;IASJC,SATI;IAUJC;EAVI,IAWFX,KAXJ;EAYA,MAAM;IAACY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,MAAM,EAAE2D,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,MAA5B,CADmB;EAE3B5D,cAAc,EAAE0D,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,MAA5B,CAFW;EAG3B3D,aAAa,EAAEyD,kBAAA,CAAUG,QAAV,CAAmBH,kBAAA,CAAUE,MAA7B,CAHY;EAI3B1D,MAAM,EAAEwD,kBAAA,CAAUI,IAJS;EAK3B3D,SAAS,EAAEuD,kBAAA,CAAUI,IALM;EAM3BzD,iBAAiB,EAAEqD,kBAAA,CAAUK,MANF;EAO3B3D,iBAAiB,EAAEsD,kBAAA,CAAUK,MAPF;EAQ3BzD,QAAQ,EAAEoD,kBAAA,CAAUM,IARO;EAS3BzD,SAAS,EAAEmD,kBAAA,CAAUM,IATM;EAU3BxD,OAAO,EAAEkD,kBAAA,CAAUM;AAVQ,CAA7B;eAaepE,gB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
2
|
+
@value tablet from breakpoints;
|
|
3
|
+
@value mobile from breakpoints;
|
|
4
|
+
|
|
5
|
+
.skillPickerContainer {
|
|
6
|
+
height: 485px;
|
|
7
|
+
width: 596px;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.loaderContainer {
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
height: 100%;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.loader {
|
|
20
|
+
width: 40px;
|
|
21
|
+
height: 40px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media mobile {
|
|
25
|
+
.skillPickerContainer {
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -9,7 +9,7 @@ declare namespace SkillsChartSideInformationItem {
|
|
|
9
9
|
namespace propTypes {
|
|
10
10
|
const icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
11
11
|
const title: PropTypes.Requireable<string>;
|
|
12
|
-
const value: PropTypes.Requireable<
|
|
12
|
+
const value: PropTypes.Requireable<number>;
|
|
13
13
|
const legend: PropTypes.Requireable<string>;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -42,7 +42,7 @@ const SkillsChartSideInformationItem = ({
|
|
|
42
42
|
SkillsChartSideInformationItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
43
43
|
icon: _propTypes.default.shape(_icon.default.propTypes),
|
|
44
44
|
title: _propTypes.default.string,
|
|
45
|
-
value: _propTypes.default.
|
|
45
|
+
value: _propTypes.default.number,
|
|
46
46
|
legend: _propTypes.default.string
|
|
47
47
|
} : {};
|
|
48
48
|
var _default = SkillsChartSideInformationItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SkillsChartSideInformationItem","title","value","legend","icon","iconProps","style","InformationElement","titleContainer","defaults","preset","__html","propTypes","PropTypes","shape","Icon","string"],"sources":["../../../src/molecule/skills-chart-side-information-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport defaults from 'lodash/fp/defaults';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\n\nconst SkillsChartSideInformationItem = ({title, value, legend, icon: iconProps}) => (\n <div className={style.InformationElement}>\n <div className={style.titleContainer}>\n <Icon {...defaults({preset: 's'}, iconProps)} />\n <div className={style.title}>{title}</div>\n </div>\n <div className={style.value}>{value}</div>\n <div className={style.legend}>\n <span\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: legend}}\n />\n </div>\n </div>\n);\n\nSkillsChartSideInformationItem.propTypes = {\n icon: PropTypes.shape(Icon.propTypes),\n title: PropTypes.string,\n value: PropTypes.
|
|
1
|
+
{"version":3,"file":"index.js","names":["SkillsChartSideInformationItem","title","value","legend","icon","iconProps","style","InformationElement","titleContainer","defaults","preset","__html","propTypes","PropTypes","shape","Icon","string","number"],"sources":["../../../src/molecule/skills-chart-side-information-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport defaults from 'lodash/fp/defaults';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\n\nconst SkillsChartSideInformationItem = ({title, value, legend, icon: iconProps}) => (\n <div className={style.InformationElement}>\n <div className={style.titleContainer}>\n <Icon {...defaults({preset: 's'}, iconProps)} />\n <div className={style.title}>{title}</div>\n </div>\n <div className={style.value}>{value}</div>\n <div className={style.legend}>\n <span\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: legend}}\n />\n </div>\n </div>\n);\n\nSkillsChartSideInformationItem.propTypes = {\n icon: PropTypes.shape(Icon.propTypes),\n title: PropTypes.string,\n value: PropTypes.number,\n legend: PropTypes.string\n};\n\nexport default SkillsChartSideInformationItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,8BAA8B,GAAG,CAAC;EAACC,KAAD;EAAQC,KAAR;EAAeC,MAAf;EAAuBC,IAAI,EAAEC;AAA7B,CAAD,kBACrC;EAAK,SAAS,EAAEC,cAAA,CAAMC;AAAtB,gBACE;EAAK,SAAS,EAAED,cAAA,CAAME;AAAtB,gBACE,6BAAC,aAAD,EAAU,IAAAC,iBAAA,EAAS;EAACC,MAAM,EAAE;AAAT,CAAT,EAAwBL,SAAxB,CAAV,CADF,eAEE;EAAK,SAAS,EAAEC,cAAA,CAAML;AAAtB,GAA8BA,KAA9B,CAFF,CADF,eAKE;EAAK,SAAS,EAAEK,cAAA,CAAMJ;AAAtB,GAA8BA,KAA9B,CALF,eAME;EAAK,SAAS,EAAEI,cAAA,CAAMH;AAAtB,gBACE;EACE;EACA,uBAAuB,EAAE;IAACQ,MAAM,EAAER;EAAT;AAF3B,EADF,CANF,CADF;;AAgBAH,8BAA8B,CAACY,SAA/B,2CAA2C;EACzCR,IAAI,EAAES,kBAAA,CAAUC,KAAV,CAAgBC,aAAA,CAAKH,SAArB,CADmC;EAEzCX,KAAK,EAAEY,kBAAA,CAAUG,MAFwB;EAGzCd,KAAK,EAAEW,kBAAA,CAAUI,MAHwB;EAIzCd,MAAM,EAAEU,kBAAA,CAAUG;AAJuB,CAA3C;eAOehB,8B"}
|
|
@@ -7,7 +7,7 @@ declare namespace SkillsChartSideInformationPanel {
|
|
|
7
7
|
const sidePanelItems: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
8
8
|
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
9
9
|
title: PropTypes.Requireable<string>;
|
|
10
|
-
value: PropTypes.Requireable<
|
|
10
|
+
value: PropTypes.Requireable<number>;
|
|
11
11
|
legend: PropTypes.Requireable<string>;
|
|
12
12
|
}> | null | undefined)[]>;
|
|
13
13
|
}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
2
|
+
@value tablet from breakpoints;
|
|
3
|
+
@value mobile from breakpoints;
|
|
4
|
+
|
|
1
5
|
.sidePanel {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
display: flex;
|
|
7
|
+
width: 316px;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
gap: 16px;
|
|
12
|
+
align-self: stretch;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media mobile {
|
|
16
|
+
.sidePanel {
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -13,6 +13,7 @@ declare namespace ListItems {
|
|
|
13
13
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
14
|
type: PropTypes.Requireable<string>;
|
|
15
15
|
label: PropTypes.Requireable<string>;
|
|
16
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
16
17
|
'aria-label': PropTypes.Requireable<string>;
|
|
17
18
|
'data-name': PropTypes.Requireable<string>;
|
|
18
19
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -144,6 +145,7 @@ declare namespace ListItems {
|
|
|
144
145
|
componentType: PropTypes.Requireable<string>;
|
|
145
146
|
type: PropTypes.Requireable<string>;
|
|
146
147
|
label: PropTypes.Requireable<string>;
|
|
148
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
147
149
|
'aria-label': PropTypes.Requireable<string>;
|
|
148
150
|
'data-name': PropTypes.Requireable<string>;
|
|
149
151
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -6,6 +6,7 @@ declare namespace SetupHeader {
|
|
|
6
6
|
seeMyPlatform: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
7
|
type: PropTypes.Requireable<string>;
|
|
8
8
|
label: PropTypes.Requireable<string>;
|
|
9
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
10
|
'aria-label': PropTypes.Requireable<string>;
|
|
10
11
|
'data-name': PropTypes.Requireable<string>;
|
|
11
12
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -26,6 +27,7 @@ declare namespace SetupHeader {
|
|
|
26
27
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
27
28
|
type: PropTypes.Requireable<string>;
|
|
28
29
|
label: PropTypes.Requireable<string>;
|
|
30
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
31
|
'aria-label': PropTypes.Requireable<string>;
|
|
30
32
|
'data-name': PropTypes.Requireable<string>;
|
|
31
33
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -46,6 +48,7 @@ declare namespace SetupHeader {
|
|
|
46
48
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
49
|
type: PropTypes.Requireable<string>;
|
|
48
50
|
label: PropTypes.Requireable<string>;
|
|
51
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
49
52
|
'aria-label': PropTypes.Requireable<string>;
|
|
50
53
|
'data-name': PropTypes.Requireable<string>;
|
|
51
54
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -66,6 +69,7 @@ declare namespace SetupHeader {
|
|
|
66
69
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
67
70
|
type: PropTypes.Requireable<string>;
|
|
68
71
|
label: PropTypes.Requireable<string>;
|
|
72
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
69
73
|
'aria-label': PropTypes.Requireable<string>;
|
|
70
74
|
'data-name': PropTypes.Requireable<string>;
|
|
71
75
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -22,6 +22,7 @@ declare namespace WizardContents {
|
|
|
22
22
|
firstButtonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
23
|
type: PropTypes.Requireable<string>;
|
|
24
24
|
label: PropTypes.Requireable<string>;
|
|
25
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
25
26
|
'aria-label': PropTypes.Requireable<string>;
|
|
26
27
|
'data-name': PropTypes.Requireable<string>;
|
|
27
28
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -42,6 +43,7 @@ declare namespace WizardContents {
|
|
|
42
43
|
secondButtonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
43
44
|
type: PropTypes.Requireable<string>;
|
|
44
45
|
label: PropTypes.Requireable<string>;
|
|
46
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
45
47
|
'aria-label': PropTypes.Requireable<string>;
|
|
46
48
|
'data-name': PropTypes.Requireable<string>;
|
|
47
49
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -424,6 +426,7 @@ declare namespace WizardContents {
|
|
|
424
426
|
componentType: PropTypes.Requireable<string>;
|
|
425
427
|
type: PropTypes.Requireable<string>;
|
|
426
428
|
label: PropTypes.Requireable<string>;
|
|
429
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
427
430
|
'aria-label': PropTypes.Requireable<string>;
|
|
428
431
|
'data-name': PropTypes.Requireable<string>;
|
|
429
432
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -81,6 +81,7 @@ declare namespace PlayerLoading {
|
|
|
81
81
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
82
82
|
type: PropTypes.Requireable<string>;
|
|
83
83
|
label: PropTypes.Requireable<string>;
|
|
84
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
84
85
|
'aria-label': PropTypes.Requireable<string>;
|
|
85
86
|
'data-name': PropTypes.Requireable<string>;
|
|
86
87
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -212,6 +213,7 @@ declare namespace PlayerLoading {
|
|
|
212
213
|
componentType: PropTypes.Requireable<string>;
|
|
213
214
|
type: PropTypes.Requireable<string>;
|
|
214
215
|
label: PropTypes.Requireable<string>;
|
|
216
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
215
217
|
'aria-label': PropTypes.Requireable<string>;
|
|
216
218
|
'data-name': PropTypes.Requireable<string>;
|
|
217
219
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -132,6 +132,7 @@ declare namespace SlidePlayer {
|
|
|
132
132
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
133
133
|
type: PropTypes.Requireable<string>;
|
|
134
134
|
label: PropTypes.Requireable<string>;
|
|
135
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
135
136
|
'aria-label': PropTypes.Requireable<string>;
|
|
136
137
|
'data-name': PropTypes.Requireable<string>;
|
|
137
138
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -263,6 +264,7 @@ declare namespace SlidePlayer {
|
|
|
263
264
|
componentType: PropTypes.Requireable<string>;
|
|
264
265
|
type: PropTypes.Requireable<string>;
|
|
265
266
|
label: PropTypes.Requireable<string>;
|
|
267
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
266
268
|
'aria-label': PropTypes.Requireable<string>;
|
|
267
269
|
'data-name': PropTypes.Requireable<string>;
|
|
268
270
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -399,6 +401,7 @@ declare namespace SlidePlayer {
|
|
|
399
401
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
400
402
|
type: PropTypes.Requireable<string>;
|
|
401
403
|
label: PropTypes.Requireable<string>;
|
|
404
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
402
405
|
'aria-label': PropTypes.Requireable<string>;
|
|
403
406
|
'data-name': PropTypes.Requireable<string>;
|
|
404
407
|
'data-testid': PropTypes.Requireable<string>;
|
|
@@ -530,6 +533,7 @@ declare namespace SlidePlayer {
|
|
|
530
533
|
componentType: PropTypes.Requireable<string>;
|
|
531
534
|
type: PropTypes.Requireable<string>;
|
|
532
535
|
label: PropTypes.Requireable<string>;
|
|
536
|
+
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
533
537
|
'aria-label': PropTypes.Requireable<string>;
|
|
534
538
|
'data-name': PropTypes.Requireable<string>;
|
|
535
539
|
'data-testid': PropTypes.Requireable<string>;
|