@coorpacademy/components 11.40.18-react18.12 → 11.40.18-react18.13
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/battle-opponent/index.js +2 -4
- package/es/atom/battle-opponent/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +2 -2
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/gradient/index.native.js.map +1 -1
- package/es/atom/icon/index.js.map +1 -1
- package/es/organism/mobile-navigation/index.native.js.map +1 -1
- package/es/organism/review-slide/index.native.js +1 -1
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/template/mobile-login/confirm-email-sent/index.native.js.map +1 -1
- package/es/template/mobile-login/welcome/index.native.js.map +1 -1
- package/lib/atom/battle-opponent/index.js +2 -4
- package/lib/atom/battle-opponent/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +2 -2
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/gradient/index.native.js.map +1 -1
- package/lib/atom/icon/index.js.map +1 -1
- package/lib/organism/mobile-navigation/index.native.js.map +1 -1
- package/lib/organism/review-slide/index.native.js +1 -1
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/template/mobile-login/confirm-email-sent/index.native.js.map +1 -1
- package/lib/template/mobile-login/welcome/index.native.js.map +1 -1
- package/package.json +5 -5
|
@@ -28,17 +28,15 @@ const BattleOpponent = ({
|
|
|
28
28
|
const buttonRef = useRef(null);
|
|
29
29
|
const handleMouseOver = useCallback(() => {
|
|
30
30
|
mouseLeaveTimer && clearTimeout(mouseLeaveTimer);
|
|
31
|
-
// @ts-expect-error (error: focus does not exists on type never)
|
|
32
31
|
/* istanbul ignore next */
|
|
33
|
-
has(['current', 'focus'], buttonRef) && buttonRef.current
|
|
32
|
+
has(['current', 'focus'], buttonRef) && buttonRef.current?.focus();
|
|
34
33
|
setToolTipIsVisible(true);
|
|
35
34
|
}, [mouseLeaveTimer]);
|
|
36
35
|
const handleMouseLeave = useCallback(() => {
|
|
37
36
|
setMouseLeaveTimer(setTimeout(() => {
|
|
38
37
|
setToolTipIsVisible(false);
|
|
39
|
-
// @ts-expect-error (error: blur does not exists on type never)
|
|
40
38
|
/* istanbul ignore next */
|
|
41
|
-
has(['current', 'blur'], buttonRef) && buttonRef.current
|
|
39
|
+
has(['current', 'blur'], buttonRef) && buttonRef.current?.blur();
|
|
42
40
|
}, 500));
|
|
43
41
|
}, []);
|
|
44
42
|
const handleKeyPress = useCallback(event => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","opponentCard","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","createElement","_extends","onMouseOver","onMouseLeave","className","tabIndex","avatar","src","alt","Fragment","ref","type","tooltipIconContainer","onKeyDown","informationIcon","width","height","toolTipWrapper","fontSize","anchorId","closeToolTipInformationTextAriaLabel","rightArrow","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style.opponentCard, isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","opponentCard","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","createElement","_extends","onMouseOver","onMouseLeave","className","tabIndex","avatar","src","alt","Fragment","ref","type","tooltipIconContainer","onKeyDown","informationIcon","width","height","toolTipWrapper","fontSize","anchorId","closeToolTipInformationTextAriaLabel","rightArrow","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style.opponentCard, isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) &&\n (buttonRef.current as HTMLButtonElement | null)?.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) &&\n (buttonRef.current as HTMLButtonElement | null)?.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <span className={style.toolTipWrapper}>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </span>\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAO,OAAO;AACnE,OAAOC,UAAU,MAAM,YAAY;AACnC,SAAQC,EAAE,IAAIC,MAAM,QAAO,MAAM;AACjC,OAAOC,GAAG,MAAM,eAAe;AAC/B,SACEC,mCAAmC,IAAIC,UAAU,EACjDC,0CAA0C,IAAIC,eAAe,QACxD,0BAA0B;AACjC,OAAOC,OAAO,IAAGC,qBAAqB,QAAO,YAAY;AACzD,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,aAAa;AAE7D,OAAOC,SAAS,MAA6B,cAAc;AAC3D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,cAAc,GAAGA,CACrB;EACEC,gBAAgB;EAChBC,QAAQ;EACRC,aAAa;EACbC,OAAO;EACPC,WAAW;EACXC,WAAW;EACX,YAAY,EAAEC;AACK,CAAC,EACtBC,aAA+B,KAC5B;EACH,MAAMC,SAAkD,GAAGZ,uBAAuB,CAACW,aAAa,CAAC;EACjG,MAAME,iBAAiB,GAAG3B,OAAO,CAC/B,MAAMG,UAAU,CAACa,KAAK,CAACY,IAAI,EAAEZ,KAAK,CAACa,YAAY,EAAEV,QAAQ,GAAGH,KAAK,CAACc,MAAM,GAAG,IAAI,CAAC,EAChF,CAACX,QAAQ,CACX,CAAC;EAED,MAAMY,qBAAqB,GAAG/B,OAAO,CACnC,MAAMG,UAAU,CAACa,KAAK,CAACgB,IAAI,EAAEd,gBAAgB,GAAGF,KAAK,CAACiB,cAAc,GAAG,IAAI,CAAC,EAC5E,CAACf,gBAAgB,CACnB,CAAC;EAED,MAAM,CAACgB,eAAe,EAAEC,kBAAkB,CAAC,GAAGlC,QAAQ,CAAqBmC,SAAS,CAAC;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AACsD;EAAe,gBACpCxE,KAAA,CAAAuD,aAAA,CAAC1C,OAAO;IACN4D,QAAQ,EAAE,EAAG;IACbC,QAAQ,EAAEjC,oBAAqB;IAC/BF,gBAAgB,EAAEA,gBAAiB;IACnCc,cAAc,EAAEA,cAAe;IAC/BsB,oCAAoC,EAAE/C,SAAS,CAAC,2BAA2B;EAAE,CAC9E,CACG,CACN,CAAC,gBAEH5B,KAAA,CAAAuD,aAAA,CAAC7C,UAAU;IAACiD,SAAS,EAAEzC,KAAK,CAAC0D,UAAW;IAACN,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE;EAAG,CAAE,CAEjE,CAAC;AAET,CAAC;AAEDpD,cAAc,CAACF,SAAS,GAAA4D,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG9D,SAAS;AAEpCE,cAAc,CAAC6D,YAAY,GAAG;EAC5BpD,SAAS,EAAEb,QAAQ,CAACkE,iBAAiB,CAACrD;AACxC,CAAC;AAED,eAAeT,cAAc","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ICONS } from '../../util/button-icons';
|
|
4
4
|
import Tag from '../tag';
|
|
@@ -75,7 +75,7 @@ export declare type ButtonLinkProps = {
|
|
|
75
75
|
type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';
|
|
76
76
|
usage?: 'button' | 'submit' | 'reset';
|
|
77
77
|
label?: string;
|
|
78
|
-
content?:
|
|
78
|
+
content?: React.ReactNode;
|
|
79
79
|
'aria-label'?: string;
|
|
80
80
|
tooltipText?: string;
|
|
81
81
|
tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["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AQ,GAAG,QAAQ,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,GAAG,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC;CACxC,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","ICONS","faIconPropTypes","name","string","isRequired","color","backgroundColor","size","number","customStyle","object","iconPropTypes","position","oneOf","type","_keys","faIcon","shape","propTypes","usage","label","content","node","tooltipText","tooltipPlacement","icon","oneOfType","arrayOf","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","contentCustomStyle","useTitle","customLabelClassName"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\nimport Tag from '../tag';\n\nconst faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.object\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.shape(faIconPropTypes)\n};\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.oneOfType([\n PropTypes.shape(iconPropTypes),\n PropTypes.arrayOf(PropTypes.shape(iconPropTypes))\n ]),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.object,\n contentCustomStyle: PropTypes.object,\n useTitle: PropTypes.bool,\n customLabelClassName: PropTypes.string\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: React.CSSProperties;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIconType;\n};\n\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?:
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","ICONS","faIconPropTypes","name","string","isRequired","color","backgroundColor","size","number","customStyle","object","iconPropTypes","position","oneOf","type","_keys","faIcon","shape","propTypes","usage","label","content","node","tooltipText","tooltipPlacement","icon","oneOfType","arrayOf","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","contentCustomStyle","useTitle","customLabelClassName"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\nimport Tag from '../tag';\n\nconst faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.object\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.shape(faIconPropTypes)\n};\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.oneOfType([\n PropTypes.shape(iconPropTypes),\n PropTypes.arrayOf(PropTypes.shape(iconPropTypes))\n ]),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.object,\n contentCustomStyle: PropTypes.object,\n useTitle: PropTypes.bool,\n customLabelClassName: PropTypes.string\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: React.CSSProperties;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIconType;\n};\n\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType | IconType[];\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: React.CSSProperties;\n contentCustomStyle?: React.CSSProperties;\n useTitle?: boolean;\n customLabelClassName?: string;\n tag?: React.ComponentProps<typeof Tag>;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AACA,OAAOA,SAAS,MAAM,YAAY;AAElC,SAAQC,KAAK,QAAO,yBAAyB;AAG7C,MAAMC,eAAe,GAAG;EACtBC,IAAI,EAAEH,SAAS,CAACI,MAAM,CAACC,UAAU;EACjCC,KAAK,EAAEN,SAAS,CAACI,MAAM;EACvBG,eAAe,EAAEP,SAAS,CAACI,MAAM;EACjCI,IAAI,EAAER,SAAS,CAACS,MAAM;EACtBC,WAAW,EAAEV,SAAS,CAACW;AACzB,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,QAAQ,EAAEb,SAAS,CAACc,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;EAC5CC,IAAI,EAAEf,SAAS,CAACc,KAAK,CAACE,KAAA,CAAKf,KAAK,CAAC,CAAC;EAClCgB,MAAM,EAAEjB,SAAS,CAACkB,KAAK,CAAChB,eAAe;AACzC,CAAC;AAED,MAAMiB,SAAS,GAAG;EAChBJ,IAAI,EAAEf,SAAS,CAACc,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;EAChFM,KAAK,EAAEpB,SAAS,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C,CAAC;AA+CD,eAAee,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","View","StyleSheet","Platform","Color","Gradient","children","colors","transparencyPosition","height","style","testID","pointerEvents","validColors","filter","c","length","console","warn","createElement","Fragment","calculatedColors","raw","transparent","to","alpha","toString","_style","push","gradientString","join","gradientStyle","select","default","experimental_backgroundImage","web","backgroundImage","combinedStyle","flatten"],"sources":["../../../src/atom/gradient/index.native.tsx"],"sourcesContent":["import React, {ReactNode} from 'react';\nimport {View, ViewStyle, StyleSheet, Platform} from 'react-native';\nimport Color from 'colorjs.io';\n\nexport type Props = {\n children?: ReactNode;\n colors: Array<string>;\n transparencyPosition?: 'top' | 'bottom';\n height?: number;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only' | undefined;\n};\n\nconst Gradient = ({\n children,\n colors,\n transparencyPosition = 'top',\n height,\n style,\n testID,\n pointerEvents\n}: Props) => {\n // Validate colors array - ensure all values are valid strings\n const validColors = colors?.filter(c => c && typeof c === 'string') || [];\n\n // Fallback if no valid colors provided\n if (validColors.length === 0) {\n console.warn('Gradient: No valid colors provided, using transparent fallback');\n return <>{children}</>;\n }\n\n let calculatedColors = validColors;\n if (validColors.length === 1) {\n const [raw] = validColors;\n const transparent = new Color(raw).to('srgb');\n transparent.alpha = 0;\n\n calculatedColors =\n transparencyPosition === 'top'\n ? [transparent.toString(), raw, raw]\n : [raw, raw, transparent.toString()];\n }\n\n const _style: ViewStyle[] = [];\n\n if (style) {\n _style.push(style as ViewStyle);\n }\n if (height) {\n _style.push({height});\n }\n\n // Build CSS gradient string (vertical by default)\n const gradientString = `linear-gradient(180deg, ${calculatedColors.join(', ')})`;\n\n const gradientStyle
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","View","StyleSheet","Platform","Color","Gradient","children","colors","transparencyPosition","height","style","testID","pointerEvents","validColors","filter","c","length","console","warn","createElement","Fragment","calculatedColors","raw","transparent","to","alpha","toString","_style","push","gradientString","join","gradientStyle","select","default","experimental_backgroundImage","web","backgroundImage","combinedStyle","flatten"],"sources":["../../../src/atom/gradient/index.native.tsx"],"sourcesContent":["import React, {ReactNode} from 'react';\nimport {View, ViewStyle, StyleSheet, Platform} from 'react-native';\nimport Color from 'colorjs.io';\n\nexport type Props = {\n children?: ReactNode;\n colors: Array<string>;\n transparencyPosition?: 'top' | 'bottom';\n height?: number;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only' | undefined;\n};\n\nconst Gradient = ({\n children,\n colors,\n transparencyPosition = 'top',\n height,\n style,\n testID,\n pointerEvents\n}: Props) => {\n // Validate colors array - ensure all values are valid strings\n const validColors = colors?.filter(c => c && typeof c === 'string') || [];\n\n // Fallback if no valid colors provided\n if (validColors.length === 0) {\n console.warn('Gradient: No valid colors provided, using transparent fallback');\n return <>{children}</>;\n }\n\n let calculatedColors = validColors;\n if (validColors.length === 1) {\n const [raw] = validColors;\n const transparent = new Color(raw).to('srgb');\n transparent.alpha = 0;\n\n calculatedColors =\n transparencyPosition === 'top'\n ? [transparent.toString(), raw, raw]\n : [raw, raw, transparent.toString()];\n }\n\n const _style: ViewStyle[] = [];\n\n if (style) {\n _style.push(style as ViewStyle);\n }\n if (height) {\n _style.push({height});\n }\n\n // Build CSS gradient string (vertical by default)\n const gradientString = `linear-gradient(180deg, ${calculatedColors.join(', ')})`;\n\n const gradientStyle = Platform.select({\n default: {\n // @ts-ignore - experimental_backgroundImage is not yet in types\n experimental_backgroundImage: gradientString\n },\n web: {\n // @ts-ignore\n backgroundImage: gradientString\n }\n });\n\n const combinedStyle = StyleSheet.flatten([gradientStyle as ViewStyle, ..._style]);\n\n return (\n <View style={combinedStyle} pointerEvents={pointerEvents} testID={testID}>\n {children}\n </View>\n );\n};\n\nexport default Gradient;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAmB,OAAO;AACt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,cAAc,GAAG,2BAA2BR,gBAAgB,CAACS,IAAI,CAAC,IAAI,CAAC,GAAG;EAEhF,MAAMC,aAAa,GAAG5B,QAAQ,CAAC6B,MAAM,CAAC;IACpCC,OAAO,EAAE;MACP;MACAC,4BAA4B,EAAEL;IAChC,CAAC;IACDM,GAAG,EAAE;MACH;MACAC,eAAe,EAAEP;IACnB;EACF,CAAC,CAAC;EAEF,MAAMQ,aAAa,GAAGnC,UAAU,CAACoC,OAAO,CAAC,CAACP,aAAa,EAAe,GAAGJ,MAAM,CAAC,CAAC;EAEjF,oBACE3B,KAAA,CAAAmB,aAAA,CAAClB,IAAI;IAACS,KAAK,EAAE2B,aAAc;IAACzB,aAAa,EAAEA,aAAc;IAACD,MAAM,EAAEA;EAAO,GACtEL,QACG,CAAC;AAEX,CAAC;AAED,eAAeD,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","createGradientBackground","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","getForegroundColor","backgroundColor","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","Icon","iconName","iconColor","gradientBackground","borderRadius","preset","size","customStyle","effectiveIconColor","effectiveSize","hasBackground","createElement","icon","color","fontSize","iconWrapperStyle","background","width","height","padding","className","iconWrapper","propTypes","string","isRequired","bool","oneOf","shape","number","objectOf","oneOfType","process","env","NODE_ENV"],"sources":["../../../src/atom/icon/index.tsx"],"sourcesContent":["import React, {CSSProperties} from 'react';\nimport PropTypes from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/free-solid-svg-icons';\nimport {IconName, library} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport {convert} from 'css-color-function';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nexport const DEFAULT_PRESET = 'm';\nexport const ICON_LUMINOSITY = 32;\nexport const DEFAULT_WRAPPER_SIZE = 40;\nexport const ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nexport interface IconSize {\n faSize: number;\n wrapperSize: number;\n}\n\nexport interface IconProps {\n iconName: string;\n iconColor?: string;\n backgroundColor?: string;\n gradientBackground?: boolean;\n borderRadius?: string;\n preset?: string;\n size?: IconSize;\n customStyle?: CSSProperties;\n}\n\nexport function getForegroundColor(backgroundColor: string): string {\n return convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);\n}\n\nconst SIZE_CONFIGS: Record<'s' | 'm' | 'xl', IconSize> = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nconst Icon: React.FC<IconProps> = ({\n iconName,\n iconColor,\n backgroundColor,\n gradientBackground,\n borderRadius,\n preset = DEFAULT_PRESET,\n size,\n customStyle\n}) => {\n const effectiveIconColor =\n iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const hasBackground = backgroundColor || gradientBackground;\n if (!hasBackground) {\n return (\n <FontAwesomeIcon\n icon={`fa-${iconName}` as IconName}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n style={customStyle}\n />\n );\n }\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n const iconWrapperStyle: CSSProperties = {\n background: gradientBackground\n ? createGradientBackground(effectiveIconColor, '81%', '91%')\n : backgroundColor,\n borderRadius,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={{...iconWrapperStyle, ...customStyle}}>\n <FontAwesomeIcon\n icon={`fa-${iconName}` as IconName}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n};\n\nexport const propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n gradientBackground: PropTypes.bool,\n borderRadius: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: PropTypes.number.isRequired,\n wrapperSize: PropTypes.number.isRequired\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\n// const MemoizedIcon = React.memo(Icon) as React.MemoExoticComponent<React.FC<IconProps>> & {\n// propTypes?: React.WeakValidationMap<IconProps>;\n// defaultProps?: Partial<IconProps>;\n// };\n\nIcon.propTypes = propTypes
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","createGradientBackground","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","getForegroundColor","backgroundColor","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","Icon","iconName","iconColor","gradientBackground","borderRadius","preset","size","customStyle","effectiveIconColor","effectiveSize","hasBackground","createElement","icon","color","fontSize","iconWrapperStyle","background","width","height","padding","className","iconWrapper","propTypes","string","isRequired","bool","oneOf","shape","number","objectOf","oneOfType","process","env","NODE_ENV"],"sources":["../../../src/atom/icon/index.tsx"],"sourcesContent":["import React, {CSSProperties} from 'react';\nimport PropTypes from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/free-solid-svg-icons';\nimport {IconName, library, IconPack} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport {convert} from 'css-color-function';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport style from './style.css';\n\nlibrary.add(fas as IconPack);\n\nexport const DEFAULT_PRESET = 'm';\nexport const ICON_LUMINOSITY = 32;\nexport const DEFAULT_WRAPPER_SIZE = 40;\nexport const ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nexport interface IconSize {\n faSize: number;\n wrapperSize: number;\n}\n\nexport interface IconProps {\n iconName: string;\n iconColor?: string;\n backgroundColor?: string;\n gradientBackground?: boolean;\n borderRadius?: string;\n preset?: string;\n size?: IconSize;\n customStyle?: CSSProperties;\n}\n\nexport function getForegroundColor(backgroundColor: string): string {\n return convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);\n}\n\nconst SIZE_CONFIGS: Record<'s' | 'm' | 'xl', IconSize> = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nconst Icon: React.FC<IconProps> = ({\n iconName,\n iconColor,\n backgroundColor,\n gradientBackground,\n borderRadius,\n preset = DEFAULT_PRESET,\n size,\n customStyle\n}) => {\n const effectiveIconColor =\n iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const hasBackground = backgroundColor || gradientBackground;\n if (!hasBackground) {\n return (\n <FontAwesomeIcon\n icon={`fa-${iconName}` as IconName}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n style={customStyle}\n />\n );\n }\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n const iconWrapperStyle: CSSProperties = {\n background: gradientBackground\n ? createGradientBackground(effectiveIconColor, '81%', '91%')\n : backgroundColor,\n borderRadius,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={{...iconWrapperStyle, ...customStyle}}>\n <FontAwesomeIcon\n icon={`fa-${iconName}` as IconName}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n};\n\nexport const propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n gradientBackground: PropTypes.bool,\n borderRadius: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: PropTypes.number.isRequired,\n wrapperSize: PropTypes.number.isRequired\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\n// const MemoizedIcon = React.memo(Icon) as React.MemoExoticComponent<React.FC<IconProps>> & {\n// propTypes?: React.WeakValidationMap<IconProps>;\n// defaultProps?: Partial<IconProps>;\n// };\n\nIcon.propTypes = propTypes as React.WeakValidationMap<IconProps>;\n// MemoizedIcon.propTypes = Icon.propTypes;\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAuB,OAAO;AAC1C,OAAOC,SAAS,MAAM,YAAY;AAClC,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,SAAQC,GAAG,QAAO,mCAAmC;AACrD,SAAkBC,OAAO,QAAiB,mCAAmC;AAC7E,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAAQC,OAAO,QAAO,oBAAoB;AAC1C,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,KAAK,MAAM,aAAa;AAE/BN,OAAO,CAACO,GAAG,CAACR,GAAe,CAAC;AAE5B,OAAO,MAAMS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W,EAAE/B,SAAS,CAACqD,QAAQ,CAACrD,SAAS,CAACsD,SAAS,CAAC,CAACtD,SAAS,CAAC+C,MAAM,EAAE/C,SAAS,CAACoD,MAAM,CAAC,CAAC;AAC3F,CAAC;;AAED;AACA;AACA;AACA;;AAEA5B,IAAI,CAACsB,SAAS,GAAAS,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGX,SAAS;AAC1B;;AAEA,eAAetB,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","View","StyleSheet","Text","Platform","BlurView","NovaCompositionNavigationNavBar","BlurredShadow","useTemplateContext","Touchable","createStyleSheet","theme","create","container","position","bottom","paddingTop","paddingBottom","paddingHorizontal","width","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","elevation","blur","top","left","right","navbar","flexDirection","justifyContent","alignSelf","overflow","borderRadius","backgroundColor","OS","colors","gray","light","button","alignItems","flex","maxWidth","marginTop","spacing","small","buttonText","fontSize","lineHeight","color","text","primary","dot","cta","dotShadow","transform","rotateX","scaleX","Button","testID","title","selected","Icon","styles","onPress","createElement","style","NavigationBar","items","selectedItemIndex","templateContext","styleSheet","setStylesheet","_stylesheet","blurAmount","blurType","map","prop","index","handlePress","action","key","label","icon"],"sources":["../../../src/organism/mobile-navigation/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, FC} from 'react';\nimport {\n View,\n StyleSheet,\n Text,\n ViewStyle,\n TextStyle,\n GestureResponderEvent,\n Platform\n} from 'react-native';\nimport {BlurView} from '@react-native-community/blur';\n\nimport {NovaCompositionNavigationNavBar as BlurredShadow} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Theme} from '../../variables/theme.native';\n\ninterface ButtonProps {\n title: string;\n testID: string;\n selected: boolean;\n Icon: FC<{height: number; width: number; color?: string}>;\n styles: StyleSheetType;\n theme: Theme;\n onPress: (event: GestureResponderEvent) => void;\n}\n\nexport type NavItemType = {\n label: string;\n icon: ButtonProps['Icon'];\n action: (event: GestureResponderEvent) => void;\n};\n\nexport interface Props {\n testID?: string;\n items: Array<NavItemType>;\n selectedItemIndex: number;\n}\n\ntype StyleSheetType = {\n container: ViewStyle;\n navbar: ViewStyle;\n blur: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n dot: ViewStyle;\n dotShadow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme)
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","View","StyleSheet","Text","Platform","BlurView","NovaCompositionNavigationNavBar","BlurredShadow","useTemplateContext","Touchable","createStyleSheet","theme","create","container","position","bottom","paddingTop","paddingBottom","paddingHorizontal","width","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","elevation","blur","top","left","right","navbar","flexDirection","justifyContent","alignSelf","overflow","borderRadius","backgroundColor","OS","colors","gray","light","button","alignItems","flex","maxWidth","marginTop","spacing","small","buttonText","fontSize","lineHeight","color","text","primary","dot","cta","dotShadow","transform","rotateX","scaleX","Button","testID","title","selected","Icon","styles","onPress","createElement","style","NavigationBar","items","selectedItemIndex","templateContext","styleSheet","setStylesheet","_stylesheet","blurAmount","blurType","map","prop","index","handlePress","action","key","label","icon"],"sources":["../../../src/organism/mobile-navigation/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, FC} from 'react';\nimport {\n View,\n StyleSheet,\n Text,\n ViewStyle,\n TextStyle,\n GestureResponderEvent,\n Platform\n} from 'react-native';\nimport {BlurView} from '@react-native-community/blur';\n\nimport {NovaCompositionNavigationNavBar as BlurredShadow} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Theme} from '../../variables/theme.native';\n\ninterface ButtonProps {\n title: string;\n testID: string;\n selected: boolean;\n Icon: FC<{height: number; width: number; color?: string}>;\n styles: StyleSheetType;\n theme: Theme;\n onPress: (event: GestureResponderEvent) => void;\n}\n\nexport type NavItemType = {\n label: string;\n icon: ButtonProps['Icon'];\n action: (event: GestureResponderEvent) => void;\n};\n\nexport interface Props {\n testID?: string;\n items: Array<NavItemType>;\n selectedItemIndex: number;\n}\n\ntype StyleSheetType = {\n container: ViewStyle;\n navbar: ViewStyle;\n blur: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n dot: ViewStyle;\n dotShadow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme) =>\n StyleSheet.create({\n container: {\n position: 'absolute',\n bottom: 0,\n paddingTop: 10,\n paddingBottom: 34,\n paddingHorizontal: 20,\n width: '100%',\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2\n },\n shadowOpacity: 0.15,\n shadowRadius: 3,\n elevation: 4\n },\n blur: {\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n },\n navbar: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignSelf: 'center',\n overflow: 'hidden',\n height: 66,\n borderRadius: 12,\n backgroundColor: Platform.OS === 'ios' ? theme.colors.gray.light : '#edededee'\n },\n button: {\n alignItems: 'center',\n flex: 1,\n height: '100%',\n maxWidth: 110,\n marginTop: theme.spacing.small\n },\n buttonText: {\n fontSize: theme.fontSize.small,\n lineHeight: 26,\n // height: 11,\n color: theme.colors.text.primary\n },\n dot: {\n width: 8,\n height: 8,\n borderRadius: 8,\n backgroundColor: theme.colors.cta,\n marginTop: 3,\n position: 'absolute',\n alignSelf: 'center'\n },\n dotShadow: {\n marginTop: -87,\n width: 200,\n height: 100,\n position: 'absolute',\n alignSelf: 'center',\n transform: [{rotateX: '180deg'}, {scaleX: 0.7}]\n }\n });\n\nconst Button = ({testID, title, selected, Icon, styles, theme, onPress}: ButtonProps) => (\n <Touchable testID={testID} style={styles.button} onPress={onPress}>\n <View style={{alignItems: 'center'}}>\n <Icon\n height={16}\n width={16}\n color={selected ? theme.colors.cta : theme.colors.text.primary}\n />\n <Text style={styles.buttonText}>{title}</Text>\n </View>\n {selected ? (\n <View>\n <View style={styles.dot} />\n <BlurredShadow color={theme.colors.cta} style={styles.dotShadow} />\n </View>\n ) : null}\n </Touchable>\n);\n\nconst NavigationBar = ({items, selectedItemIndex}: Props) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme) as StyleSheetType;\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.container}>\n <View style={styleSheet.navbar}>\n {Platform.OS === 'ios' ? (\n <BlurView style={styleSheet.blur} blurAmount={75} blurType=\"xlight\" />\n ) : null}\n {items.map((prop, index) => {\n const handlePress = prop.action;\n return (\n <Button\n key={`button-${prop.label}`}\n title={prop.label}\n Icon={prop.icon}\n onPress={handlePress}\n selected={index === selectedItemIndex}\n testID={`navigationButton_${index}`}\n styles={styleSheet}\n theme={theme}\n />\n );\n })}\n </View>\n </View>\n );\n};\n\nexport default NavigationBar;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,QAAQ,EAAEC,SAAS,QAAW,OAAO;AACpD,SACEC,IAAI,EACJC,UAAU,EACVC,IAAI,EAIJC,QAAQ,QACH,cAAc;AACrB,SAAQC,QAAQ,QAAO,8BAA8B;AAErD,SAAQC,+BAA+B,IAAIC,aAAa,QAAO,0BAA0B;AAEzF,SAAQC,kBAAkB,QAAO,4CAA4C;AAC7E,OAAOC,SAAS,MAAM,kCAAkC;AAmCxD,MAAMC,gBAAgB,GAAIC,KAAY,IACpCT,UAAU,CAACU,MAAM,CAAC;EAChBC,SAAS,EAAE;IACTC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC;IACTC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,EAAE;IACrBC,KAAK,EAAE,MAAM;IACbC,WAAW,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AAE,oBAAoBmB,KAAK,EAAG;MACpCf,MAAM,EAAEQ,UAAW;MACnB9D,KAAK,EAAEA;IAAM,CACd,CAAC;EAEN,CAAC,CACG,CACF,CAAC;AAEX,CAAC;AAED,eAAe0D,aAAa","ignoreList":[]}
|
|
@@ -77,7 +77,7 @@ const CorrectionPopin = ({
|
|
|
77
77
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
78
|
useEffect(() => translateUp.start(), []);
|
|
79
79
|
if (!showCorrectionPopin) return null;
|
|
80
|
-
const klf =
|
|
80
|
+
const klf = correctionPopinProps.klf;
|
|
81
81
|
const information = getOr({
|
|
82
82
|
label: '',
|
|
83
83
|
message: ''
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useMemo","useState","Animated","Easing","Image","Keyboard","ScrollView","StyleSheet","useWindowDimensions","View","get","getOr","useTranslateY","Answer","ReviewCorrectionPopin","useTemplateContext","Button","TYPE_AUDIO","TYPE_IMAGE","TYPE_VIDEO","Video","Html","useMobileKeyboardVisibility","styles","create","mediaContainer","alignItems","justifyContent","width","height","borderRadius","overflow","image","flex","correctionPopinWrapper","position","bottom","MediaView","media","autoplay","type","createElement","style","uri","url","split","source","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateUp","fromValue","toValue","duration","easing","bezier","start","klf","undefined","information","label","message","next","onClick","_correctionPopinProps","resultLabel","animatedStyle","createQuestionStyle","theme","questionHeading","questionOriginContainer","marginBottom","spacing","tiny","marginTop","small","questionOrigin","fontSize","lineHeight","color","colors","text","primary","textAlign","questionTextContainer","marginVertical","questionText","fontWeight","questionHelpContainer","questionHelp","gray","medium","choicesScrollView","choicesScrollContent","flexGrow","padding","Question","props","answerUI","isKeyboardVisible","autoplayMedia","setStyle","questionStyle","hasVideoOrImage","includes","Fragment","isTextCentered","contentContainerStyle","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","createSlideStyle","num","screenWidth","slideWidth","hiddenBackgroundToLockActions","left","right","top","backgroundColor","slide","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","Slide","validateButton","isValidated","setValidated","handleValidatePress","dismiss","setTimeout","slideStyle","isFirstSlide","loading","parentContentTitle","pointerEvents","key","disabled","submitValue","onPress","testID"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useMemo, useState} from 'react';\n\nimport {\n Animated,\n Easing,\n Image,\n Keyboard,\n ScrollView,\n StyleSheet,\n TextStyle,\n useWindowDimensions,\n View,\n ViewStyle\n} from 'react-native';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport {useTranslateY} from '@coorpacademy/react-native-animation';\nimport Answer from '../../molecule/answer/index.native';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Button from '../../atom/button/index.native';\nimport {TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from '../../molecule/answer/prop-types';\nimport Video from '../../molecule/video-player-mobile/index.native';\nimport {Media} from '../../molecule/questions/types';\nimport Html from '../../atom/html/index.native';\nimport useMobileKeyboardVisibility from '../../util/use-mobile-keyboard-visibility';\nimport {PopinProps, ReviewSlideProps, SlideProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n mediaContainer: {\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: 200,\n borderRadius: 10,\n overflow: 'hidden'\n },\n image: {\n flex: 1,\n width: '100%'\n },\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst MediaView = ({media, autoplay}: {media?: Media; autoplay: boolean}) => {\n if (!media) {\n return null;\n }\n\n switch (media.type) {\n case TYPE_VIDEO:\n return (\n <View style={styles.mediaContainer}>\n <Video media={media} autoplay={autoplay} />\n </View>\n );\n case TYPE_IMAGE: {\n const uri = `https://${media.url?.split('//')[1]}`;\n return <Image style={[styles.mediaContainer, styles.image]} source={{uri}} />;\n }\n case TYPE_AUDIO:\n default:\n return null;\n }\n};\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateUp = useTranslateY({\n fromValue: 500,\n toValue: 0,\n duration: 500,\n easing: Easing.bezier(0.34, 1.36, 0.64, 1)\n });\n\n // the translation is required only once on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => translateUp.start(), []);\n\n if (!showCorrectionPopin) return null;\n\n const klf = getOr(undefined, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n const style = animateCorrectionPopin\n ? [styles.correctionPopinWrapper, translateUp.animatedStyle]\n : styles.correctionPopinWrapper;\n\n return (\n <Animated.View style={style}>\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOriginContainer: ViewStyle;\n questionOrigin: TextStyle;\n questionTextContainer: TextStyle;\n questionText: TextStyle;\n questionHelpContainer: ViewStyle;\n questionHelp: TextStyle;\n choicesScrollView: ViewStyle;\n choicesScrollContent: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between',\n alignItems: 'center'\n },\n questionOriginContainer: {\n marginBottom: theme.spacing.tiny,\n marginTop: theme.spacing.small\n },\n questionOrigin: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.text.primary,\n textAlign: 'center'\n },\n questionTextContainer: {\n marginVertical: 4,\n textAlign: 'center'\n },\n questionText: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: '700',\n color: theme.colors.text.primary\n },\n questionHelpContainer: {\n marginVertical: 4\n },\n questionHelp: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.gray.medium,\n marginBottom: 0,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n choicesScrollView: {\n marginTop: 20,\n width: '100%'\n },\n choicesScrollContent: {\n flexGrow: 1,\n justifyContent: 'space-around',\n padding: 10\n }\n });\n\ntype QuestionProps = {\n autoplayMedia: boolean;\n answerUI: SlideProps['answerUI'];\n isKeyboardVisible: boolean;\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {\n answerUI,\n questionText,\n questionOrigin = '',\n isKeyboardVisible,\n autoplayMedia = false\n } = props;\n const {theme} = useTemplateContext();\n const [style, setStyle] = useState<StyleSheetType>();\n\n useEffect(() => {\n const questionStyle = createQuestionStyle(theme);\n setStyle(questionStyle);\n }, [theme]);\n\n if (!answerUI || !questionText || !style) return null;\n\n const hasVideoOrImage =\n answerUI.media?.type && [TYPE_VIDEO, TYPE_IMAGE].includes(answerUI.media.type);\n\n return (\n <>\n <View style={style.questionHeading}>\n <View style={style.questionOriginContainer}>\n <Html style={style.questionOrigin} isTextCentered>\n {questionOrigin}\n </Html>\n </View>\n <View style={style.questionTextContainer}>\n <Html style={style.questionText} isTextCentered>\n {questionText}\n </Html>\n </View>\n <View style={style.questionHelpContainer}>\n <Html style={style.questionHelp}>{get('help', answerUI)}</Html>\n </View>\n </View>\n <ScrollView\n style={style.choicesScrollView}\n contentContainerStyle={style.choicesScrollContent}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n >\n {!isKeyboardVisible && hasVideoOrImage ? (\n <MediaView media={answerUI.media} autoplay={autoplayMedia} />\n ) : null}\n <View\n style={{\n marginTop: hasVideoOrImage ? 30 : 0\n }}\n >\n <Answer {...answerUI} />\n </View>\n </ScrollView>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n hiddenBackgroundToLockActions: ViewStyle;\n};\n\nconst createSlideStyle = (\n num: number,\n screenWidth: number,\n isKeyboardVisible: boolean\n): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n hiddenBackgroundToLockActions: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n backgroundColor: '#00000000'\n },\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: (isKeyboardVisible ? 5 : 34) + num * 5,\n backgroundColor: '#fff', // theme.colors.white\n height: '90%',\n width: slideWidth,\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 25,\n shadowColor: '#000',\n shadowOffset: {width: 0, height: -1},\n shadowOpacity: 0.05,\n shadowRadius: 16,\n elevation: 10 - num * 1,\n borderRadius: 16\n }\n });\n};\n\nconst Slide = (props: ReviewSlideProps) => {\n const {animatedStyle, slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n const [isValidated, setValidated] = useState<boolean>(false);\n\n const isKeyboardVisible = useMobileKeyboardVisibility();\n\n const handleValidatePress = useCallback(() => {\n Keyboard.dismiss();\n setValidated(true);\n\n // calling the onclick later, after react has rerendered, to display the locking BG as soon as possible\n setTimeout(() => {\n validateButton.onClick();\n }, 20);\n\n // only to create on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const {width} = useWindowDimensions();\n const slideStyle = useMemo(\n () => createSlideStyle(num, width, isKeyboardVisible),\n [num, width, isKeyboardVisible]\n );\n const isFirstSlide = num === 1;\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n if (loading) {\n return <View style={slideStyle.slide} pointerEvents={isFirstSlide ? 'auto' : 'none'} />;\n }\n\n return (\n <Animated.View\n style={[slideStyle.slide, animatedStyle]}\n pointerEvents={isFirstSlide ? 'auto' : 'none'}\n >\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n autoplayMedia={isFirstSlide}\n isKeyboardVisible={isKeyboardVisible}\n key=\"question-container\"\n />\n {isKeyboardVisible ? null : (\n <Button\n disabled={isValidated || validateButton.disabled}\n submitValue={validateButton.label}\n onPress={handleValidatePress}\n testID={`slide-validate-button-${slideIndex}`}\n />\n )}\n {isValidated ? <View style={slideStyle.hiddenBackgroundToLockActions} /> : null}\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </Animated.View>\n );\n};\n\nexport default Slide;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAO,OAAO;AAEtE,SACEC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,QAAQ,EACRC,UAAU,EACVC,UAAU,EAEVC,mBAAmB,EACnBC,IAAI,QAEC,cAAc;AACrB,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAAQC,aAAa,QAAO,sCAAsC;AAClE,OAAOC,MAAM,MAAM,oCAAoC;AACvD,OAAOC,qBAAqB,MAAM,qDAAqD;AACvF,SAAQC,kBAAkB,QAAO,4CAA4C;AAE7E,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAAQC,UAAU,EAAEC,UAAU,EAAEC,UAAU,QAAO,kCAAkC;AACnF,OAAOC,KAAK,MAAM,iDAAiD;AAEnE,OAAOC,IAAI,MAAM,8BAA8B;AAC/C,OAAOC,2BAA2B,MAAM,2CAA2C;AAGnF,MAAMC,MAAM,GAAGhB,UAAU,CAACiB,MAAM,CAAC;EAC/BC,cAAc,EAAE;IACdC,UAAU,EAAE,QAAQ;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,EAAE4F,UAAU,CAAClB;EAA8B,CAAE,CAAC,GAAG,IAAI,EAC9EpE,oBAAoB,gBACnBnD,KAAA,CAAA4C,aAAA,CAACM,eAAe;IACdC,oBAAoB,EAAEA,oBAAqB;IAC3CC,UAAU,EAAEA,UAAW;IACvBC,mBAAmB,EAAEA,mBAAoB;IACzCC,sBAAsB,EAAEA,sBAAuB;IAC/CwF,GAAG,EAAC;EAAkB,CACvB,CAAC,GACA,IACS,CAAC;AAEpB,CAAC;AAED,eAAeZ,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useCallback","useEffect","useMemo","useState","Animated","Easing","Image","Keyboard","ScrollView","StyleSheet","useWindowDimensions","View","get","getOr","useTranslateY","Answer","ReviewCorrectionPopin","useTemplateContext","Button","TYPE_AUDIO","TYPE_IMAGE","TYPE_VIDEO","Video","Html","useMobileKeyboardVisibility","styles","create","mediaContainer","alignItems","justifyContent","width","height","borderRadius","overflow","image","flex","correctionPopinWrapper","position","bottom","MediaView","media","autoplay","type","createElement","style","uri","url","split","source","CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","translateUp","fromValue","toValue","duration","easing","bezier","start","klf","information","label","message","next","onClick","_correctionPopinProps","resultLabel","animatedStyle","createQuestionStyle","theme","questionHeading","questionOriginContainer","marginBottom","spacing","tiny","marginTop","small","questionOrigin","fontSize","lineHeight","color","colors","text","primary","textAlign","questionTextContainer","marginVertical","questionText","fontWeight","questionHelpContainer","questionHelp","gray","medium","choicesScrollView","choicesScrollContent","flexGrow","padding","Question","props","answerUI","isKeyboardVisible","autoplayMedia","setStyle","questionStyle","hasVideoOrImage","includes","Fragment","isTextCentered","contentContainerStyle","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","createSlideStyle","num","screenWidth","slideWidth","hiddenBackgroundToLockActions","left","right","top","backgroundColor","slide","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","Slide","validateButton","isValidated","setValidated","handleValidatePress","dismiss","setTimeout","slideStyle","isFirstSlide","loading","parentContentTitle","pointerEvents","key","disabled","submitValue","onPress","testID"],"sources":["../../../src/organism/review-slide/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useMemo, useState} from 'react';\n\nimport {\n Animated,\n Easing,\n Image,\n Keyboard,\n ScrollView,\n StyleSheet,\n TextStyle,\n useWindowDimensions,\n View,\n ViewStyle\n} from 'react-native';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport {useTranslateY} from '@coorpacademy/react-native-animation';\nimport Answer from '../../molecule/answer/index.native';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Button from '../../atom/button/index.native';\nimport {TYPE_AUDIO, TYPE_IMAGE, TYPE_VIDEO} from '../../molecule/answer/prop-types';\nimport Video from '../../molecule/video-player-mobile/index.native';\nimport {Media} from '../../molecule/questions/types';\nimport Html from '../../atom/html/index.native';\nimport useMobileKeyboardVisibility from '../../util/use-mobile-keyboard-visibility';\nimport {PopinProps, ReviewSlideProps, SlideProps} from './prop-types';\n\nconst styles = StyleSheet.create({\n mediaContainer: {\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: 200,\n borderRadius: 10,\n overflow: 'hidden'\n },\n image: {\n flex: 1,\n width: '100%'\n },\n correctionPopinWrapper: {\n position: 'absolute',\n bottom: 16,\n width: '105%'\n }\n});\n\nconst MediaView = ({media, autoplay}: {media?: Media; autoplay: boolean}) => {\n if (!media) {\n return null;\n }\n\n switch (media.type) {\n case TYPE_VIDEO:\n return (\n <View style={styles.mediaContainer}>\n <Video media={media} autoplay={autoplay} />\n </View>\n );\n case TYPE_IMAGE: {\n const uri = `https://${media.url?.split('//')[1]}`;\n return <Image style={[styles.mediaContainer, styles.image]} source={{uri}} />;\n }\n case TYPE_AUDIO:\n default:\n return null;\n }\n};\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}: PopinProps) => {\n const translateUp = useTranslateY({\n fromValue: 500,\n toValue: 0,\n duration: 500,\n easing: Easing.bezier(0.34, 1.36, 0.64, 1)\n });\n\n // the translation is required only once on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => translateUp.start(), []);\n\n if (!showCorrectionPopin) return null;\n\n const klf = correctionPopinProps.klf;\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n const style = animateCorrectionPopin\n ? [styles.correctionPopinWrapper, translateUp.animatedStyle]\n : styles.correctionPopinWrapper;\n\n return (\n <Animated.View style={style}>\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </Animated.View>\n );\n};\n\ntype StyleSheetType = {\n questionHeading: ViewStyle;\n questionOriginContainer: ViewStyle;\n questionOrigin: TextStyle;\n questionTextContainer: TextStyle;\n questionText: TextStyle;\n questionHelpContainer: ViewStyle;\n questionHelp: TextStyle;\n choicesScrollView: ViewStyle;\n choicesScrollContent: ViewStyle;\n};\n\nconst createQuestionStyle = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n questionHeading: {\n justifyContent: 'space-between',\n alignItems: 'center'\n },\n questionOriginContainer: {\n marginBottom: theme.spacing.tiny,\n marginTop: theme.spacing.small\n },\n questionOrigin: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.text.primary,\n textAlign: 'center'\n },\n questionTextContainer: {\n marginVertical: 4,\n textAlign: 'center'\n },\n questionText: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: '700',\n color: theme.colors.text.primary\n },\n questionHelpContainer: {\n marginVertical: 4\n },\n questionHelp: {\n fontSize: 12,\n lineHeight: 16,\n color: theme.colors.gray.medium,\n marginBottom: 0,\n marginTop: theme.spacing.small,\n textAlign: 'center'\n },\n choicesScrollView: {\n marginTop: 20,\n width: '100%'\n },\n choicesScrollContent: {\n flexGrow: 1,\n justifyContent: 'space-around',\n padding: 10\n }\n });\n\ntype QuestionProps = {\n autoplayMedia: boolean;\n answerUI: SlideProps['answerUI'];\n isKeyboardVisible: boolean;\n questionText: SlideProps['questionText'];\n questionOrigin: SlideProps['parentContentTitle'];\n};\n\nconst Question = (props: QuestionProps) => {\n const {\n answerUI,\n questionText,\n questionOrigin = '',\n isKeyboardVisible,\n autoplayMedia = false\n } = props;\n const {theme} = useTemplateContext();\n const [style, setStyle] = useState<StyleSheetType>();\n\n useEffect(() => {\n const questionStyle = createQuestionStyle(theme);\n setStyle(questionStyle);\n }, [theme]);\n\n if (!answerUI || !questionText || !style) return null;\n\n const hasVideoOrImage =\n answerUI.media?.type && [TYPE_VIDEO, TYPE_IMAGE].includes(answerUI.media.type);\n\n return (\n <>\n <View style={style.questionHeading}>\n <View style={style.questionOriginContainer}>\n <Html style={style.questionOrigin} isTextCentered>\n {questionOrigin}\n </Html>\n </View>\n <View style={style.questionTextContainer}>\n <Html style={style.questionText} isTextCentered>\n {questionText}\n </Html>\n </View>\n <View style={style.questionHelpContainer}>\n <Html style={style.questionHelp}>{get('help', answerUI)}</Html>\n </View>\n </View>\n <ScrollView\n style={style.choicesScrollView}\n contentContainerStyle={style.choicesScrollContent}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n >\n {!isKeyboardVisible && hasVideoOrImage ? (\n <MediaView media={answerUI.media} autoplay={autoplayMedia} />\n ) : null}\n <View\n style={{\n marginTop: hasVideoOrImage ? 30 : 0\n }}\n >\n <Answer {...answerUI} />\n </View>\n </ScrollView>\n </>\n );\n};\n\ntype SlideStyle = {\n slide: ViewStyle;\n hiddenBackgroundToLockActions: ViewStyle;\n};\n\nconst createSlideStyle = (\n num: number,\n screenWidth: number,\n isKeyboardVisible: boolean\n): SlideStyle => {\n const slideWidth = screenWidth - 40 - num * 8;\n\n return StyleSheet.create({\n hiddenBackgroundToLockActions: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n backgroundColor: '#00000000'\n },\n slide: {\n position: 'absolute',\n left: 20 + num * 4,\n bottom: (isKeyboardVisible ? 5 : 34) + num * 5,\n backgroundColor: '#fff', // theme.colors.white\n height: '90%',\n width: slideWidth,\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 25,\n shadowColor: '#000',\n shadowOffset: {width: 0, height: -1},\n shadowOpacity: 0.05,\n shadowRadius: 16,\n elevation: 10 - num * 1,\n borderRadius: 16\n }\n });\n};\n\nconst Slide = (props: ReviewSlideProps) => {\n const {animatedStyle, slide, correctionPopinProps, validateButton, num, slideIndex = '0'} = props;\n const [isValidated, setValidated] = useState<boolean>(false);\n\n const isKeyboardVisible = useMobileKeyboardVisibility();\n\n const handleValidatePress = useCallback(() => {\n Keyboard.dismiss();\n setValidated(true);\n\n // calling the onclick later, after react has rerendered, to display the locking BG as soon as possible\n setTimeout(() => {\n validateButton.onClick();\n }, 20);\n\n // only to create on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const {width} = useWindowDimensions();\n const slideStyle = useMemo(\n () => createSlideStyle(num, width, isKeyboardVisible),\n [num, width, isKeyboardVisible]\n );\n const isFirstSlide = num === 1;\n\n const {\n loading,\n parentContentTitle,\n questionText,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n if (loading) {\n return <View style={slideStyle.slide} pointerEvents={isFirstSlide ? 'auto' : 'none'} />;\n }\n\n return (\n <Animated.View\n style={[slideStyle.slide, animatedStyle]}\n pointerEvents={isFirstSlide ? 'auto' : 'none'}\n >\n <Question\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n autoplayMedia={isFirstSlide}\n isKeyboardVisible={isKeyboardVisible}\n key=\"question-container\"\n />\n {isKeyboardVisible ? null : (\n <Button\n disabled={isValidated || validateButton.disabled}\n submitValue={validateButton.label}\n onPress={handleValidatePress}\n testID={`slide-validate-button-${slideIndex}`}\n />\n )}\n {isValidated ? <View style={slideStyle.hiddenBackgroundToLockActions} /> : null}\n {correctionPopinProps ? (\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n ) : null}\n </Animated.View>\n );\n};\n\nexport default Slide;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAO,OAAO;AAEtE,SACEC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,QAAQ,EACRC,UAAU,EACVC,UAAU,EAEVC,mBAAmB,EACnBC,IAAI,QAEC,cAAc;AACrB,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAAQC,aAAa,QAAO,sCAAsC;AAClE,OAAOC,MAAM,MAAM,oCAAoC;AACvD,OAAOC,qBAAqB,MAAM,qDAAqD;AACvF,SAAQC,kBAAkB,QAAO,4CAA4C;AAE7E,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAAQC,UAAU,EAAEC,UAAU,EAAEC,UAAU,QAAO,kCAAkC;AACnF,OAAOC,KAAK,MAAM,iDAAiD;AAEnE,OAAOC,IAAI,MAAM,8BAA8B;AAC/C,OAAOC,2BAA2B,MAAM,2CAA2C;AAGnF,MAAMC,MAAM,GAAGhB,UAAU,CAACiB,MAAM,CAAC;EAC/BC,cAAc,EAAE;IACdC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,GAAG;IACXC,YAAY,EAAE,EAAE;IAChBC,QAAQ,EAAE;EACZ,C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AEA,UAAW;IACvBC,mBAAmB,EAAEA,mBAAoB;IACzCC,sBAAsB,EAAEA,sBAAuB;IAC/CuF,GAAG,EAAC;EAAkB,CACvB,CAAC,GACA,IACS,CAAC;AAEpB,CAAC;AAED,eAAeZ,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Dimensions","StyleSheet","View","Platform","NovaSolidStatusClose","CloseIcon","NovaCompositionCoorpacademyCheck","CheckIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","SCREEN","get","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","backButton","position","closeIcon","fill","width","height","gradients","gradient","opacity","transform","rotate","gradient2","content","checkIconWrapper","backgroundColor","marginVertical","borderRadius","checkIconInnerWrapper","padding","checkIcon","title","color","fontWeight","textAlign","fontSize","lineHeight","paddingVertical","description","ctaWrapper","ctaOpenInbox","flexDirection","overflow","colors","cta","ctaOpenInboxText","marginLeft","mailIcon","ConfirmEmailSent","props","locales","onClose","onOpenInbox","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","fadeInContent","property","_stylesheet","start","createElement","style","animatedStyle","select","default","experimental_backgroundImage","web","backgroundImage","successTitle","successDescription","onPress","testID","successCta"],"sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Dimensions, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\nimport {\n NovaSolidStatusClose as CloseIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport Text from '../../../atom/text/index.native';\n\nconst SCREEN = Dimensions.get('screen');\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n content: ViewStyle;\n backButton: ViewStyle;\n closeIcon: ViewStyle & {fill?: string};\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n ctaWrapper: ViewStyle;\n ctaOpenInbox: ViewStyle;\n ctaOpenInboxText: TextStyle;\n mailIcon: ViewStyle & {fill?: string};\n checkIconWrapper: ViewStyle;\n checkIconInnerWrapper: ViewStyle;\n checkIcon: ViewStyle & {fill?: string};\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n backButton: {\n position: 'absolute',\n top: 60,\n left: 30\n },\n closeIcon: {\n fill: '#515161',\n width: 20,\n height: 20\n } as ViewStyle & {fill?: string},\n gradients: {\n position: 'absolute',\n top: 0,\n height: SCREEN.height,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -80,\n bottom: 400,\n left: -180,\n right: -180,\n opacity: 1,\n transform: [{rotate: '15deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -30,\n bottom: 0,\n left: 0,\n right: 0,\n opacity: 0.6\n },\n content: {\n width: '100%',\n justifyContent: 'space-around',\n alignItems: 'center'\n },\n checkIconWrapper: {\n backgroundColor: '#E8FCF8',\n width: 64,\n height: 64,\n marginVertical: 12,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIconInnerWrapper: {\n backgroundColor: '#18BB98',\n width: 24,\n height: 24,\n padding: 4,\n borderRadius: 50,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIcon: {\n fill: '#fff',\n width: 12,\n height: 12\n } as ViewStyle & {fill?: string},\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n textAlign: 'center',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n textAlign: 'center',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n ctaWrapper: {\n position: 'absolute',\n width: '100%',\n bottom: 60\n },\n ctaOpenInbox: {\n paddingVertical: 12,\n marginVertical: 4,\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden',\n backgroundColor: theme.colors.cta\n },\n ctaOpenInboxText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string}\n });\n\nexport type Props = {\n onClose: () => void;\n onOpenInbox: () => void;\n locales: {\n successTitle: string;\n successDescription: string;\n successCta: string;\n };\n};\n\nconst ConfirmEmailSent = (props: Props) => {\n const {locales, onClose, onOpenInbox} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 50,\n toValue: -SCREEN.height * 0.4,\n duration: 250,\n delay: 650\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n translateGradients.start();\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Animated.View style={styleSheet.wrapper}>\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n }\n })\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n }\n })\n ]}\n />\n </Animated.View>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <View style={styleSheet.checkIconWrapper}>\n <View style={styleSheet.checkIconInnerWrapper}>\n <CheckIcon style={styleSheet.checkIcon} />\n </View>\n </View>\n <Text style={styleSheet.title}>{locales.successTitle}</Text>\n <Text style={styleSheet.description}>{locales.successDescription}</Text>\n </Animated.View>\n\n <Touchable style={styleSheet.backButton} onPress={onClose} testID=\"close-button\">\n <CloseIcon style={styleSheet.closeIcon} />\n </Touchable>\n\n <Animated.View style={[styleSheet.ctaWrapper, fadeInContent.animatedStyle]}>\n <Touchable style={styleSheet.ctaOpenInbox} onPress={onOpenInbox} testID=\"open-inbox-button\">\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaOpenInboxText}>{locales.successCta}</Text>\n </Touchable>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default ConfirmEmailSent;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,QAAQ,QAAO,OAAO;AAChD,SAAQC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAaC,IAAI,EAAaC,QAAQ,QAAO,cAAc;AACnG,SACEC,oBAAoB,IAAIC,SAAS,EACjCC,gCAAgC,IAAIC,SAAS,EAC7CC,gCAAgC,IAAIC,QAAQ,QACvC,0BAA0B;AACjC,SAAQC,cAAc,EAAEC,aAAa,QAAO,sCAAsC;AAClF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,SAAQC,kBAAkB,QAAO,mCAAmC;AAEpE,OA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AAC,eACPpD,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACtB;EAAM,GAAEmB,OAAO,CAACsB,YAAmB,CAAC,eAC5D9F,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACf;EAAY,GAAEY,OAAO,CAACuB,kBAAyB,CAC1D,CAAC,eAEhB/F,KAAA,CAAAsF,aAAA,CAACtE,SAAS;IAACuE,KAAK,EAAEZ,UAAU,CAAC1C,UAAW;IAAC+D,OAAO,EAAEvB,OAAQ;IAACwB,MAAM,EAAC;EAAc,gBAC9EjG,KAAA,CAAAsF,aAAA,CAAC7E,SAAS;IAAC8E,KAAK,EAAEZ,UAAU,CAACxC;EAAU,CAAE,CAChC,CAAC,eAEZnC,KAAA,CAAAsF,aAAA,CAACnF,QAAQ,CAACG,IAAI;IAACiF,KAAK,EAAE,CAACZ,UAAU,CAACd,UAAU,EAAEqB,aAAa,CAACM,aAAa;EAAE,gBACzExF,KAAA,CAAAsF,aAAA,CAACtE,SAAS;IAACuE,KAAK,EAAEZ,UAAU,CAACb,YAAa;IAACkC,OAAO,EAAEtB,WAAY;IAACuB,MAAM,EAAC;EAAmB,gBACzFjG,KAAA,CAAAsF,aAAA,CAACzE,QAAQ;IAAC0E,KAAK,EAAEZ,UAAU,CAACN;EAAS,CAAE,CAAC,eACxCrE,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACR;EAAiB,GAAEK,OAAO,CAAC0B,UAAiB,CAC3D,CACE,CACF,CAAC;AAEpB,CAAC;AAED,eAAe5B,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useState","Animated","Dimensions","StyleSheet","View","Platform","NovaSolidStatusClose","CloseIcon","NovaCompositionCoorpacademyCheck","CheckIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","SCREEN","get","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","backButton","position","closeIcon","fill","width","height","gradients","gradient","opacity","transform","rotate","gradient2","content","checkIconWrapper","backgroundColor","marginVertical","borderRadius","checkIconInnerWrapper","padding","checkIcon","title","color","fontWeight","textAlign","fontSize","lineHeight","paddingVertical","description","ctaWrapper","ctaOpenInbox","flexDirection","overflow","colors","cta","ctaOpenInboxText","marginLeft","mailIcon","ConfirmEmailSent","props","locales","onClose","onOpenInbox","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","fadeInContent","property","_stylesheet","start","createElement","style","animatedStyle","select","default","experimental_backgroundImage","web","backgroundImage","successTitle","successDescription","onPress","testID","successCta"],"sources":["../../../../src/template/mobile-login/confirm-email-sent/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Dimensions, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\nimport {\n NovaSolidStatusClose as CloseIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport Text from '../../../atom/text/index.native';\n\nconst SCREEN = Dimensions.get('screen');\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n content: ViewStyle;\n backButton: ViewStyle;\n closeIcon: ViewStyle & {fill?: string};\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n ctaWrapper: ViewStyle;\n ctaOpenInbox: ViewStyle;\n ctaOpenInboxText: TextStyle;\n mailIcon: ViewStyle & {fill?: string};\n checkIconWrapper: ViewStyle;\n checkIconInnerWrapper: ViewStyle;\n checkIcon: ViewStyle & {fill?: string};\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n backButton: {\n position: 'absolute',\n top: 60,\n left: 30\n },\n closeIcon: {\n fill: '#515161',\n width: 20,\n height: 20\n } as ViewStyle & {fill?: string},\n gradients: {\n position: 'absolute',\n top: 0,\n height: SCREEN.height,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -80,\n bottom: 400,\n left: -180,\n right: -180,\n opacity: 1,\n transform: [{rotate: '15deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -30,\n bottom: 0,\n left: 0,\n right: 0,\n opacity: 0.6\n },\n content: {\n width: '100%',\n justifyContent: 'space-around',\n alignItems: 'center'\n },\n checkIconWrapper: {\n backgroundColor: '#E8FCF8',\n width: 64,\n height: 64,\n marginVertical: 12,\n borderRadius: 16,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIconInnerWrapper: {\n backgroundColor: '#18BB98',\n width: 24,\n height: 24,\n padding: 4,\n borderRadius: 50,\n justifyContent: 'center',\n alignItems: 'center'\n },\n checkIcon: {\n fill: '#fff',\n width: 12,\n height: 12\n } as ViewStyle & {fill?: string},\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n textAlign: 'center',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n textAlign: 'center',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n ctaWrapper: {\n position: 'absolute',\n width: '100%',\n bottom: 60\n },\n ctaOpenInbox: {\n paddingVertical: 12,\n marginVertical: 4,\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden',\n backgroundColor: theme.colors.cta\n },\n ctaOpenInboxText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string}\n });\n\nexport type Props = {\n onClose: () => void;\n onOpenInbox: () => void;\n locales: {\n successTitle: string;\n successDescription: string;\n successCta: string;\n };\n};\n\nconst ConfirmEmailSent = (props: Props) => {\n const {locales, onClose, onOpenInbox} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 50,\n toValue: -SCREEN.height * 0.4,\n duration: 250,\n delay: 650\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n translateGradients.start();\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Animated.View style={styleSheet.wrapper}>\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #179c57 0%, #fff0 50%)'\n }\n }) as ViewStyle\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #18BB98 0%, #18BB9800 100%)'\n }\n }) as ViewStyle\n ]}\n />\n </Animated.View>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <View style={styleSheet.checkIconWrapper}>\n <View style={styleSheet.checkIconInnerWrapper}>\n <CheckIcon style={styleSheet.checkIcon} />\n </View>\n </View>\n <Text style={styleSheet.title}>{locales.successTitle}</Text>\n <Text style={styleSheet.description}>{locales.successDescription}</Text>\n </Animated.View>\n\n <Touchable style={styleSheet.backButton} onPress={onClose} testID=\"close-button\">\n <CloseIcon style={styleSheet.closeIcon} />\n </Touchable>\n\n <Animated.View style={[styleSheet.ctaWrapper, fadeInContent.animatedStyle]}>\n <Touchable style={styleSheet.ctaOpenInbox} onPress={onOpenInbox} testID=\"open-inbox-button\">\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaOpenInboxText}>{locales.successCta}</Text>\n </Touchable>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default ConfirmEmailSent;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,QAAQ,QAAO,OAAO;AAChD,SAAQC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAaC,IAAI,EAAaC,QAAQ,QAAO,cAAc;AACnG,SACEC,oBAAoB,IAAIC,SAAS,EACjCC,gCAAgC,IAAIC,SAAS,EAC7CC,gCAAgC,IAAIC,QAAQ,QACvC,0BAA0B;AACjC,SAAQC,cAAc,EAAEC,aAAa,QAAO,sCAAsC;AAClF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,SAAQC,kBAAkB,QAAO,mCAAmC;AAEpE,OAAOC,IAAI,MAAM,iCAAiC;AAElD,MAAMC,MAAM,GAAGf,UAAU,CAACgB,GAAG,CAAC,QAAQ,CAAC;AAqBvC,MAAMC,gBAAgB,GAAIC,KAAY,IACpCjB,UAAU,CAACkB,MAAM,CAAiB;EAChCC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB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,MAAM,EAAC;EAAc,gBAC9EjG,KAAA,CAAAsF,aAAA,CAAC7E,SAAS;IAAC8E,KAAK,EAAEZ,UAAU,CAACxC;EAAU,CAAE,CAChC,CAAC,eAEZnC,KAAA,CAAAsF,aAAA,CAACnF,QAAQ,CAACG,IAAI;IAACiF,KAAK,EAAE,CAACZ,UAAU,CAACd,UAAU,EAAEqB,aAAa,CAACM,aAAa;EAAE,gBACzExF,KAAA,CAAAsF,aAAA,CAACtE,SAAS;IAACuE,KAAK,EAAEZ,UAAU,CAACb,YAAa;IAACkC,OAAO,EAAEtB,WAAY;IAACuB,MAAM,EAAC;EAAmB,gBACzFjG,KAAA,CAAAsF,aAAA,CAACzE,QAAQ;IAAC0E,KAAK,EAAEZ,UAAU,CAACN;EAAS,CAAE,CAAC,eACxCrE,KAAA,CAAAsF,aAAA,CAACpE,IAAI;IAACqE,KAAK,EAAEZ,UAAU,CAACR;EAAiB,GAAEK,OAAO,CAAC0B,UAAiB,CAC3D,CACE,CACF,CAAC;AAEpB,CAAC;AAED,eAAe5B,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useEffect","useMemo","useState","Animated","StyleSheet","View","Platform","NovaCompositionCoorpacademyLogoCoorp","LogoCoorp","NovaCompositionCoorpacademyQrCode","QrCodeIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","COLORS","cm_primary_blue","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","translateContent","fadeInContent","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","Value","interpolateScale","interpolate","inputRange","outputRange","_stylesheet","start","animatedScale","timing","useNativeDriver","createElement","style","animatedStyle","testID","select","default","experimental_backgroundImage","web","backgroundImage","onLongPress","scale","onPress"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useMemo, useRef, useState} from 'react';\nimport {Animated, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport Text from '../../../atom/text/index.native';\nimport {COLORS} from '../../../variables/colors';\n\nconst {cm_primary_blue} = COLORS;\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle & {fill?: string};\n mailIcon: ViewStyle & {fill?: string};\n ctaQrCode: ViewStyle;\n ctaQrCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQrCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQrCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string},\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n } as ViewStyle & {fill?: string},\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n } as ViewStyle & {textDecorationLine: string}\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onHelpPress: () => void;\n onQRCodeButtonPress: () => void;\n onReceiveEmailButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQrCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onQRCodeButtonPress, onHelpPress, onReceiveEmailButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useMemo(() => new Animated.Value(0), []);\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n },\n web: {\n // @ts-ignore\n backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n }\n })\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n }\n })\n ]}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,OAAO,EAAUC,QAAQ,QAAO,OAAO;AACjE,SAAQC,QAAQ,EAAEC,UAAU,EAAaC,IAAI,EAAaC,QAAQ,QAAO,cAAc;AACvF,SACEC,oCAAoC,IAAIC,SAAS,EACjDC,iCAAiC,IAAIC,UAAU,EAC/CC,gCAAgC,IAAIC,QAAQ,QACvC,0BAA0B;AACjC,SAAQC,cAAc,EAAEC,aAAa,QAAO,sCAAsC;AAClF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,SAAQC,kBAAkB,QAAO,mCAAmC;AAEpE,OAAOC,IAAI,MAAM,iCAAiC;AAClD,SAAQC,MAAM,QAAO,2BAA2B;AAEhD,MAAM;EAACC;AAAe,CAAC,GAAGD,MAAM;AA4BhC,MAAME,gBAAgB,GAAIC,KAAY,IACpCjB,UAAU,CAACkB,MAAM,CAAiB;EAChCC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,cAAc;IAC9BC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE;EAC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AC0F,KAAK,EAAExB,UAAU,CAAClB;EAAc,GAAEa,OAAO,CAAChB,SAAgB,CACvD,CAAC,eACZ/D,KAAA,CAAA2G,aAAA,CAAC3F,SAAS;IACR4F,KAAK,EAAE,CAACxB,UAAU,CAAC1B,MAAM,EAAE0B,UAAU,CAACd,cAAc,CAAE;IACtDgD,OAAO,EAAEnC,yBAA0B;IACnC2B,MAAM,EAAC;EAAsB,gBAE7B9G,KAAA,CAAA2G,aAAA,CAAC9F,QAAQ;IAAC+F,KAAK,EAAExB,UAAU,CAACZ;EAAS,CAAE,CAAC,eACxCxE,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACb;EAAmB,GAAEQ,OAAO,CAACT,cAAqB,CACjE,CACP,CAAC,eACPtE,KAAA,CAAA2G,aAAA,CAAC3F,SAAS;IAACsG,OAAO,EAAEpC,WAAY;IAAC0B,KAAK,EAAExB,UAAU,CAACX;EAAK,gBACtDzE,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACV;EAAU,GAAEK,OAAO,CAACL,SAAgB,CAAC,eAC7D1E,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACT;EAAQ,GAAEI,OAAO,CAACJ,OAAc,CAC/C,CACP,CACO,CACF,CAAC;AAEpB,CAAC;AAED,eAAeE,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useEffect","useMemo","useState","Animated","StyleSheet","View","Platform","NovaCompositionCoorpacademyLogoCoorp","LogoCoorp","NovaCompositionCoorpacademyQrCode","QrCodeIcon","NovaCompositionCoorpacademyEmail","MailIcon","useAnimateProp","useTranslateY","Touchable","useTemplateContext","Text","COLORS","cm_primary_blue","createStyleSheet","theme","create","wrapper","top","bottom","left","right","flex","justifyContent","alignItems","paddingHorizontal","content","width","gradients","position","gradient","opacity","transform","rotate","gradient2","animatedLogoWrapper","animatedLogo","height","logo","padding","logoBG","backgroundColor","title","color","fontWeight","fontSize","lineHeight","paddingVertical","description","actions","buttons","button","marginVertical","flexDirection","borderRadius","overflow","ctaQrCode","colors","cta","ctaQrCodeText","marginLeft","qrCodeIcon","fill","ctaReceiveMail","ctaReceiveMailText","mailIcon","help","titleHelp","ctaHelp","textDecorationLine","Welcome","props","locales","onDemoPress","onQRCodeButtonPress","onHelpPress","onReceiveEmailButtonPress","styleSheet","setStylesheet","translateGradients","fromValue","toValue","duration","delay","translateContent","fadeInContent","property","fadeOutStartLogo","fadeInFinalLogo","scaleAnim","Value","interpolateScale","interpolate","inputRange","outputRange","_stylesheet","start","animatedScale","timing","useNativeDriver","createElement","style","animatedStyle","testID","select","default","experimental_backgroundImage","web","backgroundImage","onLongPress","scale","onPress"],"sources":["../../../../src/template/mobile-login/welcome/index.native.tsx"],"sourcesContent":["import React, {useEffect, useMemo, useRef, useState} from 'react';\nimport {Animated, StyleSheet, TextStyle, View, ViewStyle, Platform} from 'react-native';\nimport {\n NovaCompositionCoorpacademyLogoCoorp as LogoCoorp,\n NovaCompositionCoorpacademyQrCode as QrCodeIcon,\n NovaCompositionCoorpacademyEmail as MailIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp, useTranslateY} from '@coorpacademy/react-native-animation';\nimport Touchable from '../../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport Text from '../../../atom/text/index.native';\nimport {COLORS} from '../../../variables/colors';\n\nconst {cm_primary_blue} = COLORS;\n\ntype StyleSheetType = {\n wrapper: ViewStyle;\n animatedLogoWrapper: ViewStyle;\n animatedLogo: ViewStyle;\n logo: ViewStyle;\n logoBG: ViewStyle;\n content: ViewStyle;\n gradients: ViewStyle;\n gradient: ViewStyle;\n gradient2: ViewStyle;\n title: TextStyle;\n description: TextStyle;\n actions: ViewStyle;\n buttons: ViewStyle;\n button: ViewStyle;\n qrCodeIcon: ViewStyle & {fill?: string};\n mailIcon: ViewStyle & {fill?: string};\n ctaQrCode: ViewStyle;\n ctaQrCodeText: TextStyle;\n ctaReceiveMail: ViewStyle;\n ctaReceiveMailText: TextStyle;\n help: ViewStyle;\n titleHelp: TextStyle;\n ctaHelp: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create<StyleSheetType>({\n wrapper: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n flex: 1,\n justifyContent: 'space-around',\n alignItems: 'center',\n paddingHorizontal: 24\n },\n content: {\n width: '100%',\n alignItems: 'flex-start'\n },\n gradients: {\n position: 'absolute',\n top: 400,\n bottom: 400,\n left: 0,\n right: 0,\n flex: 1\n },\n gradient: {\n position: 'absolute',\n top: -730,\n bottom: 0,\n left: -380,\n right: -380,\n opacity: 1,\n transform: [{rotate: '35deg'}]\n },\n gradient2: {\n position: 'absolute',\n top: -630,\n bottom: -200,\n left: -300,\n right: -400,\n opacity: 0.6,\n transform: [{rotate: '-35deg'}]\n },\n animatedLogoWrapper: {\n alignItems: 'center'\n },\n animatedLogo: {\n position: 'absolute',\n width: 77,\n height: 100\n },\n logo: {\n padding: 100\n },\n logoBG: {\n backgroundColor: '#fff',\n top: 20,\n width: 60,\n height: 60\n },\n title: {\n color: '#1D1D2B',\n fontWeight: '600',\n fontSize: 28,\n lineHeight: 36,\n paddingVertical: 8\n },\n description: {\n color: '#1D1D2B',\n fontWeight: '400',\n fontSize: 17,\n lineHeight: 24,\n paddingVertical: 8\n },\n actions: {\n width: '100%'\n },\n buttons: {\n paddingVertical: 20,\n alignItems: 'center'\n },\n button: {\n paddingVertical: 12,\n marginVertical: 4,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n borderRadius: 12,\n alignItems: 'center',\n overflow: 'hidden'\n },\n ctaQrCode: {\n backgroundColor: theme.colors.cta\n },\n ctaQrCodeText: {\n marginLeft: 8,\n color: '#fff',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n qrCodeIcon: {\n fill: '#fff',\n height: 14,\n width: 14\n } as ViewStyle & {fill?: string},\n ctaReceiveMail: {\n backgroundColor: '#eaeaeb'\n },\n ctaReceiveMailText: {\n marginLeft: 8,\n color: '#1D1D2B',\n fontWeight: '700',\n fontSize: 14,\n lineHeight: 24\n },\n mailIcon: {\n fill: '#1D1D2B',\n height: 12,\n width: 16\n } as ViewStyle & {fill?: string},\n help: {\n flexDirection: 'row',\n justifyContent: 'center'\n },\n titleHelp: {\n color: '#9999A8'\n },\n ctaHelp: {\n marginLeft: 5,\n textDecorationLine: 'underline',\n color: '#9999A8'\n } as ViewStyle & {textDecorationLine: string}\n });\n\nexport type Props = {\n onDemoPress: () => void;\n onHelpPress: () => void;\n onQRCodeButtonPress: () => void;\n onReceiveEmailButtonPress: () => void;\n locales: {\n title: string;\n description: string;\n ctaQrCode: string;\n ctaReceiveMail: string;\n titleHelp: string;\n ctaHelp: string;\n };\n};\n\nconst Welcome = (props: Props) => {\n const {locales, onDemoPress, onQRCodeButtonPress, onHelpPress, onReceiveEmailButtonPress} = props;\n const {theme} = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n const translateGradients = useTranslateY({\n fromValue: 0,\n toValue: -200,\n duration: 300,\n delay: 750\n });\n\n const translateContent = useTranslateY({\n fromValue: 170,\n toValue: 0,\n duration: 450,\n delay: 750\n });\n\n const fadeInContent = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 650,\n delay: 750\n });\n\n const fadeOutStartLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n duration: 450,\n delay: 1000\n });\n\n const fadeInFinalLogo = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n duration: 250,\n delay: 900\n });\n\n const scaleAnim = useMemo(() => new Animated.Value(0), []);\n const interpolateScale = scaleAnim.interpolate({\n inputRange: [0, 0.4, 0.5, 0.6, 1],\n outputRange: [1, 1.7, 1.7, 1.7, 1]\n });\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n fadeInContent.start();\n fadeInFinalLogo.start();\n fadeOutStartLogo.start();\n translateContent.start();\n translateGradients.start();\n\n const animatedScale = Animated.timing(scaleAnim, {\n toValue: 1,\n duration: 1000,\n useNativeDriver: true\n });\n\n animatedScale.start();\n\n // on mount only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n return (\n <Animated.View style={[styleSheet.wrapper, translateContent.animatedStyle]} testID=\"welcome\">\n <Animated.View style={[styleSheet.gradients, translateGradients.animatedStyle]}>\n <View\n style={[\n styleSheet.gradient,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n },\n web: {\n // @ts-ignore\n backgroundImage: `linear-gradient(180deg, ${cm_primary_blue} 0%, #fff 95%)`\n }\n }) as ViewStyle\n ]}\n />\n <View\n style={[\n styleSheet.gradient2,\n Platform.select({\n default: {\n // @ts-ignore\n experimental_backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n },\n web: {\n // @ts-ignore\n backgroundImage: 'linear-gradient(180deg, #2199AB 0%, #fff 95%)'\n }\n }) as ViewStyle\n ]}\n />\n </Animated.View>\n\n <Touchable onLongPress={onDemoPress} style={styleSheet.logo}>\n <Animated.View\n style={[styleSheet.animatedLogoWrapper, {transform: [{scale: interpolateScale}]}]}\n >\n <Animated.View style={[styleSheet.logoBG, fadeInFinalLogo.animatedStyle]} />\n <Animated.View style={[styleSheet.animatedLogo, fadeInFinalLogo.animatedStyle]}>\n <LogoCoorp fill=\"#0061FF\" />\n </Animated.View>\n <Animated.View style={[styleSheet.animatedLogo, fadeOutStartLogo.animatedStyle]}>\n <LogoCoorp fill=\"#fff\" />\n </Animated.View>\n </Animated.View>\n </Touchable>\n <Animated.View style={[styleSheet.content, fadeInContent.animatedStyle]}>\n <Text style={styleSheet.title}>{locales.title}</Text>\n <Text style={styleSheet.description}>{locales.description}</Text>\n\n <View style={styleSheet.actions}>\n <View style={styleSheet.buttons}>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaQrCode]}\n onPress={onQRCodeButtonPress}\n testID=\"qr-code-button\"\n >\n <QrCodeIcon style={styleSheet.qrCodeIcon} />\n <Text style={styleSheet.ctaQrCodeText}>{locales.ctaQrCode}</Text>\n </Touchable>\n <Touchable\n style={[styleSheet.button, styleSheet.ctaReceiveMail]}\n onPress={onReceiveEmailButtonPress}\n testID=\"receive-email-button\"\n >\n <MailIcon style={styleSheet.mailIcon} />\n <Text style={styleSheet.ctaReceiveMailText}>{locales.ctaReceiveMail}</Text>\n </Touchable>\n </View>\n <Touchable onPress={onHelpPress} style={styleSheet.help}>\n <Text style={styleSheet.titleHelp}>{locales.titleHelp}</Text>\n <Text style={styleSheet.ctaHelp}>{locales.ctaHelp}</Text>\n </Touchable>\n </View>\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Welcome;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,OAAO,EAAUC,QAAQ,QAAO,OAAO;AACjE,SAAQC,QAAQ,EAAEC,UAAU,EAAaC,IAAI,EAAaC,QAAQ,QAAO,cAAc;AACvF,SACEC,oCAAoC,IAAIC,SAAS,EACjDC,iCAAiC,IAAIC,UAAU,EAC/CC,gCAAgC,IAAIC,QAAQ,QACvC,0BAA0B;AACjC,SAAQC,cAAc,EAAEC,aAAa,QAAO,sCAAsC;AAClF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,SAAQC,kBAAkB,QAAO,mCAAmC;AAEpE,OAAOC,IAAI,MAAM,iCAAiC;AAClD,SAAQC,MAAM,QAAO,2BAA2B;AAEhD,MAAM;EAACC;AAAe,CAAC,GAAGD,MAAM;AA4BhC,MAAME,gBAAgB,GAAIC,KAAY,IACpCjB,UAAU,CAACkB,MAAM,CAA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AACrB,SAAS,CAAE;IACjDuD,OAAO,EAAErC,mBAAoB;IAC7B6B,MAAM,EAAC;EAAgB,gBAEvB9G,KAAA,CAAA2G,aAAA,CAAChG,UAAU;IAACiG,KAAK,EAAExB,UAAU,CAAChB;EAAW,CAAE,CAAC,eAC5CpE,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAAClB;EAAc,GAAEa,OAAO,CAAChB,SAAgB,CACvD,CAAC,eACZ/D,KAAA,CAAA2G,aAAA,CAAC3F,SAAS;IACR4F,KAAK,EAAE,CAACxB,UAAU,CAAC1B,MAAM,EAAE0B,UAAU,CAACd,cAAc,CAAE;IACtDgD,OAAO,EAAEnC,yBAA0B;IACnC2B,MAAM,EAAC;EAAsB,gBAE7B9G,KAAA,CAAA2G,aAAA,CAAC9F,QAAQ;IAAC+F,KAAK,EAAExB,UAAU,CAACZ;EAAS,CAAE,CAAC,eACxCxE,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACb;EAAmB,GAAEQ,OAAO,CAACT,cAAqB,CACjE,CACP,CAAC,eACPtE,KAAA,CAAA2G,aAAA,CAAC3F,SAAS;IAACsG,OAAO,EAAEpC,WAAY;IAAC0B,KAAK,EAAExB,UAAU,CAACX;EAAK,gBACtDzE,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACV;EAAU,GAAEK,OAAO,CAACL,SAAgB,CAAC,eAC7D1E,KAAA,CAAA2G,aAAA,CAACzF,IAAI;IAAC0F,KAAK,EAAExB,UAAU,CAACT;EAAQ,GAAEI,OAAO,CAACJ,OAAc,CAC/C,CACP,CACO,CACF,CAAC;AAEpB,CAAC;AAED,eAAeE,OAAO","ignoreList":[]}
|
|
@@ -35,17 +35,15 @@ const BattleOpponent = ({
|
|
|
35
35
|
const buttonRef = (0, _react.useRef)(null);
|
|
36
36
|
const handleMouseOver = (0, _react.useCallback)(() => {
|
|
37
37
|
mouseLeaveTimer && clearTimeout(mouseLeaveTimer);
|
|
38
|
-
// @ts-expect-error (error: focus does not exists on type never)
|
|
39
38
|
/* istanbul ignore next */
|
|
40
|
-
(0, _has.default)(['current', 'focus'], buttonRef) && buttonRef.current
|
|
39
|
+
(0, _has.default)(['current', 'focus'], buttonRef) && buttonRef.current?.focus();
|
|
41
40
|
setToolTipIsVisible(true);
|
|
42
41
|
}, [mouseLeaveTimer]);
|
|
43
42
|
const handleMouseLeave = (0, _react.useCallback)(() => {
|
|
44
43
|
setMouseLeaveTimer(setTimeout(() => {
|
|
45
44
|
setToolTipIsVisible(false);
|
|
46
|
-
// @ts-expect-error (error: blur does not exists on type never)
|
|
47
45
|
/* istanbul ignore next */
|
|
48
|
-
(0, _has.default)(['current', 'blur'], buttonRef) && buttonRef.current
|
|
46
|
+
(0, _has.default)(['current', 'blur'], buttonRef) && buttonRef.current?.blur();
|
|
49
47
|
}, 500));
|
|
50
48
|
}, []);
|
|
51
49
|
const handleKeyPress = (0, _react.useCallback)(event => {
|