@coorpacademy/components 11.14.10 → 11.14.11

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.
Files changed (72) hide show
  1. package/es/atom/button/index.native.d.ts.map +1 -1
  2. package/es/atom/button/index.native.js +6 -1
  3. package/es/atom/button/index.native.js.map +1 -1
  4. package/es/atom/button-link/index.d.ts.map +1 -1
  5. package/es/atom/button-link/index.js +1 -2
  6. package/es/atom/button-link/index.js.map +1 -1
  7. package/es/atom/html/index.native.js +2 -2
  8. package/es/atom/html/index.native.js.map +1 -1
  9. package/es/atom/select-modal/index.native.d.ts.map +1 -1
  10. package/es/atom/select-modal/index.native.js +4 -5
  11. package/es/atom/select-modal/index.native.js.map +1 -1
  12. package/es/atom/text/index.native.d.ts +3 -6
  13. package/es/atom/text/index.native.d.ts.map +1 -1
  14. package/es/atom/text/index.native.js +11 -11
  15. package/es/atom/text/index.native.js.map +1 -1
  16. package/es/hoc/modal/select-item/index.native.d.ts.map +1 -1
  17. package/es/hoc/modal/select-item/index.native.js +4 -2
  18. package/es/hoc/modal/select-item/index.native.js.map +1 -1
  19. package/es/molecule/external-content-button/index.d.ts.map +1 -1
  20. package/es/molecule/external-content-button/index.js +2 -1
  21. package/es/molecule/external-content-button/index.js.map +1 -1
  22. package/es/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
  23. package/es/molecule/questions/mobile/slider/index.native.js +6 -4
  24. package/es/molecule/questions/mobile/slider/index.native.js.map +1 -1
  25. package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  26. package/es/molecule/questions/qcm-graphic/index.js +1 -2
  27. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  28. package/es/template/mobile-login/qr-code-scanner/index.native.d.ts.map +1 -1
  29. package/es/template/mobile-login/qr-code-scanner/index.native.js +6 -5
  30. package/es/template/mobile-login/qr-code-scanner/index.native.js.map +1 -1
  31. package/es/template/mobile-login/receive-email/index.native.d.ts.map +1 -1
  32. package/es/template/mobile-login/receive-email/index.native.js +33 -21
  33. package/es/template/mobile-login/receive-email/index.native.js.map +1 -1
  34. package/es/template/mobile-login/welcome/index.native.d.ts.map +1 -1
  35. package/es/template/mobile-login/welcome/index.native.js +4 -3
  36. package/es/template/mobile-login/welcome/index.native.js.map +1 -1
  37. package/lib/atom/button/index.native.d.ts.map +1 -1
  38. package/lib/atom/button/index.native.js +6 -1
  39. package/lib/atom/button/index.native.js.map +1 -1
  40. package/lib/atom/button-link/index.d.ts.map +1 -1
  41. package/lib/atom/button-link/index.js.map +1 -1
  42. package/lib/atom/html/index.native.js +2 -2
  43. package/lib/atom/html/index.native.js.map +1 -1
  44. package/lib/atom/select-modal/index.native.d.ts.map +1 -1
  45. package/lib/atom/select-modal/index.native.js +4 -5
  46. package/lib/atom/select-modal/index.native.js.map +1 -1
  47. package/lib/atom/text/index.native.d.ts +3 -6
  48. package/lib/atom/text/index.native.d.ts.map +1 -1
  49. package/lib/atom/text/index.native.js +13 -17
  50. package/lib/atom/text/index.native.js.map +1 -1
  51. package/lib/hoc/modal/select-item/index.native.d.ts.map +1 -1
  52. package/lib/hoc/modal/select-item/index.native.js +4 -2
  53. package/lib/hoc/modal/select-item/index.native.js.map +1 -1
  54. package/lib/molecule/external-content-button/index.d.ts.map +1 -1
  55. package/lib/molecule/external-content-button/index.js +2 -1
  56. package/lib/molecule/external-content-button/index.js.map +1 -1
  57. package/lib/molecule/questions/mobile/slider/index.native.d.ts.map +1 -1
  58. package/lib/molecule/questions/mobile/slider/index.native.js +6 -4
  59. package/lib/molecule/questions/mobile/slider/index.native.js.map +1 -1
  60. package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  61. package/lib/molecule/questions/qcm-graphic/index.js +1 -2
  62. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  63. package/lib/template/mobile-login/qr-code-scanner/index.native.d.ts.map +1 -1
  64. package/lib/template/mobile-login/qr-code-scanner/index.native.js +13 -11
  65. package/lib/template/mobile-login/qr-code-scanner/index.native.js.map +1 -1
  66. package/lib/template/mobile-login/receive-email/index.native.d.ts.map +1 -1
  67. package/lib/template/mobile-login/receive-email/index.native.js +33 -21
  68. package/lib/template/mobile-login/receive-email/index.native.js.map +1 -1
  69. package/lib/template/mobile-login/welcome/index.native.d.ts.map +1 -1
  70. package/lib/template/mobile-login/welcome/index.native.js +10 -8
  71. package/lib/template/mobile-login/welcome/index.native.js.map +1 -1
  72. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["HtmlBase","props","Html","templateContext","useTemplateContext","isDisabledBaseFontStyleColor","disableBaseFontStyleColor","useState","theme","children","fontSize","containerStyle","imageStyle","style","testID","anchorTextColor","HTML_ANCHOR_TEXT_COLOR","isTextCentered","numberOfLines","styles","p","marginVertical","textAlign","u","textDecorationLine","i","fontStyle","b","fontWeight","bold","s","tagsStyles","h1","h2","h3","h4","h5","h6","a","color","img","baseFontStyle","useMemo","DEFAULT_TEXT_STYLE","colors","black","Array","isArray","styleObject","reduce","result","child","SpanRenderer","useCallback","htmlAttribs","_children","FontRenderer","replace","renderers","font","span","html","undefined"],"sources":["../../../src/atom/html/index.native.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport {View, ViewStyle, ImageStyle, TextStyle} from 'react-native';\nimport RenderHTML, {\n CustomRendererProps,\n MixedStyleRecord,\n RenderHTMLProps,\n TBlock\n} from 'react-native-render-html';\n\nimport {HTML_ANCHOR_TEXT_COLOR} from '../../variables/theme.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Text, {DEFAULT_STYLE as DEFAULT_TEXT_STYLE} from '../text/index.native';\n\ninterface CustomRenderHTMLProps extends RenderHTMLProps {\n baseFontStyle?: TextStyle;\n testID?: string;\n}\n\nconst HtmlBase = (props: CustomRenderHTMLProps) => {\n return <RenderHTML {...props} />;\n};\n\nexport type Props = {\n children: string;\n fontSize?: TextStyle['fontSize'];\n numberOfLines?: number;\n onLinkPress?: (url: string) => void;\n containerStyle?: ViewStyle;\n anchorTextColor?: string;\n imageStyle?: ImageStyle;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n isTextCentered?: boolean;\n};\n\ntype Styles = {\n p: {\n marginVertical: ViewStyle['marginVertical'];\n textAlign: TextStyle['textAlign'];\n };\n u: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n i: {\n fontStyle: TextStyle['fontStyle'];\n };\n b: {\n fontWeight: TextStyle['fontWeight'];\n };\n s: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n};\n\nconst Html = (props: Props) => {\n const templateContext = useTemplateContext();\n const [isDisabledBaseFontStyleColor, disableBaseFontStyleColor] = useState<boolean>(false);\n const {theme} = templateContext;\n const {\n children,\n fontSize,\n containerStyle,\n imageStyle,\n style,\n testID,\n anchorTextColor = HTML_ANCHOR_TEXT_COLOR,\n isTextCentered,\n numberOfLines\n } = props;\n\n // Don't use StyleSheet there, it's not a react style\n const styles: Styles = {\n p: {\n marginVertical: 0,\n textAlign: 'center'\n },\n u: {\n textDecorationLine: 'underline'\n },\n i: {\n fontStyle: 'italic'\n },\n b: {\n fontWeight: theme.fontWeight.bold\n },\n s: {\n textDecorationLine: 'line-through'\n }\n };\n\n const tagsStyles: MixedStyleRecord = {\n ...styles,\n h1: {fontSize},\n h2: {fontSize},\n h3: {fontSize},\n h4: {fontSize},\n h5: {fontSize},\n h6: {fontSize},\n a: {color: anchorTextColor},\n img: imageStyle || {}\n };\n\n let baseFontStyle: TextStyle = useMemo(\n () => ({...DEFAULT_TEXT_STYLE, fontSize, color: theme.colors.black}),\n [fontSize, theme]\n );\n\n if (style) {\n if (Array.isArray(style)) {\n const styleObject = style.reduce((result, child) => ({\n ...result,\n ...child\n }));\n baseFontStyle = {\n ...baseFontStyle,\n ...styleObject\n };\n } else {\n baseFontStyle = {\n ...baseFontStyle,\n ...style\n };\n }\n }\n\n const SpanRenderer = useCallback(\n (htmlAttribs: CustomRendererProps<TBlock>, _children: string) => (\n <Text numberOfLines={numberOfLines}>{_children}</Text>\n ),\n [numberOfLines]\n );\n\n interface HtmlAttrib extends CustomRendererProps<TBlock> {\n color?: string;\n }\n\n const FontRenderer = useCallback(\n (htmlAttribs: HtmlAttrib, _children: string) => {\n if (htmlAttribs.color) {\n disableBaseFontStyleColor(true);\n }\n\n return (\n <Text\n key={1}\n style={{\n ...baseFontStyle,\n color: htmlAttribs.color?.replace(/ /g, '')\n }}\n >\n {_children}\n </Text>\n );\n },\n [baseFontStyle]\n );\n\n const renderers = {\n font: FontRenderer,\n span: SpanRenderer\n };\n\n return (\n <View testID={testID} style={containerStyle}>\n <HtmlBase\n // to text-align center on android\n // we have to encapsulate between <p> tag\n // and use custom style define on <p>\n // definition in component style doesn't work\n source={{\n // eslint-disable-next-line no-nested-ternary\n html: isTextCentered\n ? `<p>${children}</p>`\n : numberOfLines\n ? `<span>${children}</span>`\n : `${children}`\n }}\n tagsStyles={tagsStyles}\n baseFontStyle={{\n ...baseFontStyle,\n color: isDisabledBaseFontStyleColor ? undefined : baseFontStyle.color\n }}\n renderers={renderers}\n // this is exceptionally for the onboarding course\n // is the only course that has a gif in the context but the img tag\n // comes with width & height attr and these makes this lib do not render the gif\n // so to avoid it, we decided to ignore these attr\n ignoredStyles={['width', 'height']}\n testID=\"html-base\"\n />\n </View>\n );\n};\n\nexport default Html;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,QAAQ,GAAIC,KAAD,IAAkC;EACjD,oBAAO,6BAAC,8BAAD,EAAgBA,KAAhB,CAAP;AACD,CAFD;;AAoCA,MAAMC,IAAI,GAAID,KAAD,IAAkB;EAC7B,MAAME,eAAe,GAAG,IAAAC,mCAAA,GAAxB;EACA,MAAM,CAACC,4BAAD,EAA+BC,yBAA/B,IAA4D,IAAAC,eAAA,EAAkB,KAAlB,CAAlE;EACA,MAAM;IAACC;EAAD,IAAUL,eAAhB;EACA,MAAM;IACJM,QADI;IAEJC,QAF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S,EAAEmB,SAlBb,CAmBE;IACA;IACA;IACA;IAtBF;IAuBE,aAAa,EAAE,CAAC,OAAD,EAAU,QAAV,CAvBjB;IAwBE,MAAM,EAAC;EAxBT,EADF,CADF;AA8BD,CA1ID;;eA4IexD,I"}
1
+ {"version":3,"file":"index.native.js","names":["HtmlBase","props","Html","templateContext","useTemplateContext","isDisabledBaseFontStyleColor","disableBaseFontStyleColor","useState","theme","children","fontSize","containerStyle","imageStyle","style","testID","anchorTextColor","HTML_ANCHOR_TEXT_COLOR","isTextCentered","numberOfLines","styles","p","marginVertical","textAlign","u","textDecorationLine","i","fontStyle","b","fontWeight","bold","s","tagsStyles","h1","h2","h3","h4","h5","h6","a","color","img","baseFontStyle","useMemo","colors","black","Array","isArray","styleObject","reduce","result","child","SpanRenderer","useCallback","htmlAttribs","_children","FontRenderer","replace","renderers","font","span","html","undefined"],"sources":["../../../src/atom/html/index.native.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport {View, ViewStyle, ImageStyle, TextStyle} from 'react-native';\nimport RenderHTML, {\n CustomRendererProps,\n MixedStyleRecord,\n RenderHTMLProps,\n TBlock\n} from 'react-native-render-html';\n\nimport {HTML_ANCHOR_TEXT_COLOR} from '../../variables/theme.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Text from '../text/index.native';\n\ninterface CustomRenderHTMLProps extends RenderHTMLProps {\n baseFontStyle?: TextStyle;\n testID?: string;\n}\n\nconst HtmlBase = (props: CustomRenderHTMLProps) => {\n return <RenderHTML {...props} />;\n};\n\nexport type Props = {\n children: string;\n fontSize?: TextStyle['fontSize'];\n numberOfLines?: number;\n onLinkPress?: (url: string) => void;\n containerStyle?: ViewStyle;\n anchorTextColor?: string;\n imageStyle?: ImageStyle;\n style?: ViewStyle | ViewStyle[];\n testID?: string;\n isTextCentered?: boolean;\n};\n\ntype Styles = {\n p: {\n marginVertical: ViewStyle['marginVertical'];\n textAlign: TextStyle['textAlign'];\n };\n u: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n i: {\n fontStyle: TextStyle['fontStyle'];\n };\n b: {\n fontWeight: TextStyle['fontWeight'];\n };\n s: {\n textDecorationLine: TextStyle['textDecorationLine'];\n };\n};\n\nconst Html = (props: Props) => {\n const templateContext = useTemplateContext();\n const [isDisabledBaseFontStyleColor, disableBaseFontStyleColor] = useState<boolean>(false);\n const {theme} = templateContext;\n const {\n children,\n fontSize,\n containerStyle,\n imageStyle,\n style,\n testID,\n anchorTextColor = HTML_ANCHOR_TEXT_COLOR,\n isTextCentered,\n numberOfLines\n } = props;\n\n // Don't use StyleSheet there, it's not a react style\n const styles: Styles = {\n p: {\n marginVertical: 0,\n textAlign: 'center'\n },\n u: {\n textDecorationLine: 'underline'\n },\n i: {\n fontStyle: 'italic'\n },\n b: {\n fontWeight: theme.fontWeight.bold\n },\n s: {\n textDecorationLine: 'line-through'\n }\n };\n\n const tagsStyles: MixedStyleRecord = {\n ...styles,\n h1: {fontSize},\n h2: {fontSize},\n h3: {fontSize},\n h4: {fontSize},\n h5: {fontSize},\n h6: {fontSize},\n a: {color: anchorTextColor},\n img: imageStyle || {}\n };\n\n let baseFontStyle: TextStyle = useMemo(\n () => ({fontSize, color: theme.colors.black}),\n [fontSize, theme]\n );\n\n if (style) {\n if (Array.isArray(style)) {\n const styleObject = style.reduce((result, child) => ({\n ...result,\n ...child\n }));\n baseFontStyle = {\n ...baseFontStyle,\n ...styleObject\n };\n } else {\n baseFontStyle = {\n ...baseFontStyle,\n ...style\n };\n }\n }\n\n const SpanRenderer = useCallback(\n (htmlAttribs: CustomRendererProps<TBlock>, _children: string) => (\n <Text numberOfLines={numberOfLines}>{_children}</Text>\n ),\n [numberOfLines]\n );\n\n interface HtmlAttrib extends CustomRendererProps<TBlock> {\n color?: string;\n }\n\n const FontRenderer = useCallback(\n (htmlAttribs: HtmlAttrib, _children: string) => {\n if (htmlAttribs.color) {\n disableBaseFontStyleColor(true);\n }\n\n return (\n <Text\n key={1}\n style={{\n ...baseFontStyle,\n color: htmlAttribs.color?.replace(/ /g, '')\n }}\n >\n {_children}\n </Text>\n );\n },\n [baseFontStyle]\n );\n\n const renderers = {\n font: FontRenderer,\n span: SpanRenderer\n };\n\n return (\n <View testID={testID} style={containerStyle}>\n <HtmlBase\n // to text-align center on android\n // we have to encapsulate between <p> tag\n // and use custom style define on <p>\n // definition in component style doesn't work\n source={{\n // eslint-disable-next-line no-nested-ternary\n html: isTextCentered\n ? `<p>${children}</p>`\n : numberOfLines\n ? `<span>${children}</span>`\n : `${children}`\n }}\n tagsStyles={tagsStyles}\n baseFontStyle={{\n ...baseFontStyle,\n color: isDisabledBaseFontStyleColor ? undefined : baseFontStyle.color\n }}\n renderers={renderers}\n // this is exceptionally for the onboarding course\n // is the only course that has a gif in the context but the img tag\n // comes with width & height attr and these makes this lib do not render the gif\n // so to avoid it, we decided to ignore these attr\n ignoredStyles={['width', 'height']}\n testID=\"html-base\"\n />\n </View>\n );\n};\n\nexport default Html;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,QAAQ,GAAIC,KAAD,IAAkC;EACjD,oBAAO,6BAAC,8BAAD,EAAgBA,KAAhB,CAAP;AACD,CAFD;;AAoCA,MAAMC,IAAI,GAAID,KAAD,IAAkB;EAC7B,MAAME,eAAe,GAAG,IAAAC,mCAAA,GAAxB;EACA,MAAM,CAACC,4BAAD,EAA+BC,yBAA/B,IAA4D,IAAAC,eAAA,EAAkB,KAAlB,CAAlE;EACA,MAAM;IAACC;EAAD,IAAUL,eAAhB;EACA,MAAM;IACJM,QADI;IAEJC,QAFI;IAGJC,cAHI;IAIJC,UAJI;IAKJC,KALI;IAMJC,MANI;IAOJC,eAAe,GAAGC,6BAPd;IAQJC,cARI;IASJC;EATI,IAUFjB,KAVJ,CAJ6B,CAgB7B;;EACA,MAAMkB,MAAc,GAAG;IACrBC,CAAC,EAAE;MACDC,cAAc,EAAE,CADf;MAEDC,SAA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../src/atom/select-modal/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAMjE,OAAoB,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAGlF,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAmCF,QAAA,MAAM,MAAM,UAAW,KAAK,uBAoG3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/select-modal/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAMjE,OAAoB,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAGlF,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAmCF,QAAA,MAAM,MAAM,UAAW,KAAK,uBAuG3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -29,6 +29,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
29
 
30
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
31
 
32
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
+
32
34
  const ICON_WIDTH = 15;
33
35
 
34
36
  const createStyleSheet = theme => _reactNative.StyleSheet.create({
@@ -99,17 +101,14 @@ const Select = props => {
99
101
 
100
102
  const selectedItem = values.find(item => item.selected);
101
103
  const text = selectedItem && selectedItem.text || placeholder || null;
102
- let textStyles = [styleSheet.text];
103
104
 
104
- if (textStyle) {
105
- textStyles = [styleSheet.text, ...textStyle];
106
- }
105
+ let textStyles = _extends({}, styleSheet.text, textStyle);
107
106
 
108
107
  let color;
109
108
 
110
109
  if ((selectedItem?.value?.length || 0) > 0) {
111
110
  color = brandTheme?.colors?.primary;
112
- textStyles.push({
111
+ textStyles = _extends({}, textStyles, {
113
112
  color
114
113
  });
115
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["ICON_WIDTH","createStyleSheet","theme","StyleSheet","create","container","alignItems","flexDirection","text","flex","color","colors","gray","medium","textAlign","logEvent","eventName","analyticsID","analytics","questionType","id","Select","props","templateContext","useTemplateContext","brandTheme","styleSheet","setStylesheet","useState","useEffect","_stylesheet","onBlur","onFocus","onChange","values","placeholder","value","style","textStyle","isFocused","isDisabled","testID","handleFocus","useCallback","ANALYTICS_EVENT_TYPE","OPEN_SELECT","handleBlur","CLOSE_SELECT","handleChange","_value","selectedItem","find","item","selected","textStyles","length","primary","push","dark"],"sources":["../../../src/atom/select-modal/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Modal from 'react-native-modal';\nimport Touchable from '../../hoc/touchable/index.native';\nimport type {QuestionType} from '../../molecule/questions/types';\nimport {Theme} from '../../variables/theme.native';\n\nimport {ANALYTICS_EVENT_TYPE, Analytics} from '../../variables/analytics';\nimport Space from '../space/index.native';\nimport Text from '../text/index.native';\nimport ModalSelect, {OnChangeFunction} from '../../hoc/modal/select/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\n\nexport type ChoiceItem = {\n text: string;\n selected: boolean;\n _id: string;\n value: string;\n};\n\nexport type Props = {\n analyticsID: string;\n questionType: QuestionType;\n isDisabled?: boolean;\n isFocused?: boolean;\n values: Array<ChoiceItem>;\n value?: string;\n placeholder?: string;\n onChange: OnChangeFunction;\n onFocus: () => void;\n onBlur: () => void;\n style?: ViewStyle[];\n textStyle?: ViewStyle[];\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n text: ViewStyle;\n};\n\nconst ICON_WIDTH = 15;\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row'\n },\n text: {\n flex: 1,\n color: theme.colors.gray.medium,\n textAlign: 'center'\n }\n });\n\nconst logEvent = (\n eventName: string,\n analyticsID: string,\n analytics: Analytics,\n questionType: QuestionType\n) => {\n analytics &&\n analytics.logEvent(eventName, {\n id: analyticsID,\n questionType\n });\n};\n\nconst Select = (props: Props) => {\n const templateContext = useTemplateContext();\n const {brandTheme, theme, analytics} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n const {\n analyticsID,\n onBlur,\n onFocus,\n onChange,\n values,\n placeholder,\n value,\n style,\n textStyle,\n questionType,\n isFocused = false,\n isDisabled = false,\n testID = 'select'\n } = props;\n\n const handleFocus = useCallback(() => {\n if (!onFocus) return;\n\n analytics && logEvent(ANALYTICS_EVENT_TYPE.OPEN_SELECT, analyticsID, analytics, questionType);\n onFocus();\n }, [analytics, analyticsID, onFocus, questionType]);\n\n const handleBlur = useCallback(() => {\n if (!onBlur) return;\n\n analytics && logEvent(ANALYTICS_EVENT_TYPE.CLOSE_SELECT, analyticsID, analytics, questionType);\n onBlur();\n }, [analytics, analyticsID, onBlur, questionType]);\n\n const handleChange = useCallback(\n _value => {\n onChange(_value);\n handleBlur();\n },\n [onChange, handleBlur]\n );\n\n if (!styleSheet) {\n return null;\n }\n\n const selectedItem = values.find(item => item.selected);\n const text = (selectedItem && selectedItem.text) || placeholder || null;\n let textStyles: TextStyle[] = [styleSheet.text];\n\n if (textStyle) {\n textStyles = [styleSheet.text, ...textStyle];\n }\n\n let color;\n if ((selectedItem?.value?.length || 0) > 0) {\n color = brandTheme?.colors?.primary;\n textStyles.push({color});\n }\n\n return (\n <>\n <Touchable\n disabled={isDisabled}\n onPress={handleFocus}\n analyticsID={analyticsID}\n testID={`${testID}-input`}\n >\n <View style={[styleSheet.container, style]}>\n <Text style={textStyles}>{text}</Text>\n <Space type=\"tiny\" />\n <ArrowDown\n color={color || theme.colors.gray.dark}\n height={ICON_WIDTH}\n width={ICON_WIDTH}\n />\n </View>\n </Touchable>\n <Modal\n isVisible={isFocused}\n onSwipeComplete={handleBlur}\n onBackdropPress={handleBlur}\n testID={testID}\n >\n <ModalSelect\n value={value}\n values={values}\n onChange={handleChange}\n onClose={handleBlur}\n testID={`${testID}-modal`}\n />\n </Modal>\n </>\n );\n};\n\nexport default Select;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AA8BA,MAAMA,UAAU,GAAG,EAAnB;;AAEA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,UAAU,EAAE,QADH;IAETC,aAAa,EAAE;EAFN,CADK;EAKhBC,IAAI,EAAE;IACJC,IAAI,EAAE,CADF;IAEJC,KAAK,EAAER,KAAK,CAACS,MAAN,CAAaC,IAAb,CAAkBC,MAFrB;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f,UAAU,CAACrB,SAAZ,EAAuBgC,KAAvB;EAAb,gBACE,6BAAC,eAAD;IAAM,KAAK,EAAEiB;EAAb,GAA0B9C,IAA1B,CADF,eAEE,6BAAC,eAAD;IAAO,IAAI,EAAC;EAAZ,EAFF,eAGE,6BAAC,6CAAD;IACE,KAAK,EAAEE,KAAK,IAAIR,KAAK,CAACS,MAAN,CAAaC,IAAb,CAAkB8C,IADpC;IAEE,MAAM,EAAE1D,UAFV;IAGE,KAAK,EAAEA;EAHT,EAHF,CANF,CADF,eAiBE,6BAAC,yBAAD;IACE,SAAS,EAAEuC,SADb;IAEE,eAAe,EAAEO,UAFnB;IAGE,eAAe,EAAEA,UAHnB;IAIE,MAAM,EAAEL;EAJV,gBAME,6BAAC,eAAD;IACE,KAAK,EAAEL,KADT;IAEE,MAAM,EAAEF,MAFV;IAGE,QAAQ,EAAEc,YAHZ;IAIE,OAAO,EAAEF,UAJX;IAKE,MAAM,EAAG,GAAEL,MAAO;EALpB,EANF,CAjBF,CADF;AAkCD,CApGD;;eAsGepB,M"}
1
+ {"version":3,"file":"index.native.js","names":["ICON_WIDTH","createStyleSheet","theme","StyleSheet","create","container","alignItems","flexDirection","text","flex","color","colors","gray","medium","textAlign","logEvent","eventName","analyticsID","analytics","questionType","id","Select","props","templateContext","useTemplateContext","brandTheme","styleSheet","setStylesheet","useState","useEffect","_stylesheet","onBlur","onFocus","onChange","values","placeholder","value","style","textStyle","isFocused","isDisabled","testID","handleFocus","useCallback","ANALYTICS_EVENT_TYPE","OPEN_SELECT","handleBlur","CLOSE_SELECT","handleChange","_value","selectedItem","find","item","selected","textStyles","length","primary","dark"],"sources":["../../../src/atom/select-modal/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Modal from 'react-native-modal';\nimport Touchable from '../../hoc/touchable/index.native';\nimport type {QuestionType} from '../../molecule/questions/types';\nimport {Theme} from '../../variables/theme.native';\n\nimport {ANALYTICS_EVENT_TYPE, Analytics} from '../../variables/analytics';\nimport Space from '../space/index.native';\nimport Text from '../text/index.native';\nimport ModalSelect, {OnChangeFunction} from '../../hoc/modal/select/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\n\nexport type ChoiceItem = {\n text: string;\n selected: boolean;\n _id: string;\n value: string;\n};\n\nexport type Props = {\n analyticsID: string;\n questionType: QuestionType;\n isDisabled?: boolean;\n isFocused?: boolean;\n values: Array<ChoiceItem>;\n value?: string;\n placeholder?: string;\n onChange: OnChangeFunction;\n onFocus: () => void;\n onBlur: () => void;\n style?: ViewStyle[];\n textStyle?: ViewStyle[];\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n text: ViewStyle;\n};\n\nconst ICON_WIDTH = 15;\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row'\n },\n text: {\n flex: 1,\n color: theme.colors.gray.medium,\n textAlign: 'center'\n }\n });\n\nconst logEvent = (\n eventName: string,\n analyticsID: string,\n analytics: Analytics,\n questionType: QuestionType\n) => {\n analytics &&\n analytics.logEvent(eventName, {\n id: analyticsID,\n questionType\n });\n};\n\nconst Select = (props: Props) => {\n const templateContext = useTemplateContext();\n const {brandTheme, theme, analytics} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n const {\n analyticsID,\n onBlur,\n onFocus,\n onChange,\n values,\n placeholder,\n value,\n style,\n textStyle,\n questionType,\n isFocused = false,\n isDisabled = false,\n testID = 'select'\n } = props;\n\n const handleFocus = useCallback(() => {\n if (!onFocus) return;\n\n analytics && logEvent(ANALYTICS_EVENT_TYPE.OPEN_SELECT, analyticsID, analytics, questionType);\n onFocus();\n }, [analytics, analyticsID, onFocus, questionType]);\n\n const handleBlur = useCallback(() => {\n if (!onBlur) return;\n\n analytics && logEvent(ANALYTICS_EVENT_TYPE.CLOSE_SELECT, analyticsID, analytics, questionType);\n onBlur();\n }, [analytics, analyticsID, onBlur, questionType]);\n\n const handleChange = useCallback(\n _value => {\n onChange(_value);\n handleBlur();\n },\n [onChange, handleBlur]\n );\n\n if (!styleSheet) {\n return null;\n }\n\n const selectedItem = values.find(item => item.selected);\n const text = (selectedItem && selectedItem.text) || placeholder || null;\n\n let textStyles: TextStyle = {\n ...styleSheet.text,\n ...textStyle\n };\n\n let color;\n if ((selectedItem?.value?.length || 0) > 0) {\n color = brandTheme?.colors?.primary;\n textStyles = {\n ...textStyles,\n color\n };\n }\n\n return (\n <>\n <Touchable\n disabled={isDisabled}\n onPress={handleFocus}\n analyticsID={analyticsID}\n testID={`${testID}-input`}\n >\n <View style={[styleSheet.container, style]}>\n <Text style={textStyles}>{text}</Text>\n <Space type=\"tiny\" />\n <ArrowDown\n color={color || theme.colors.gray.dark}\n height={ICON_WIDTH}\n width={ICON_WIDTH}\n />\n </View>\n </Touchable>\n <Modal\n isVisible={isFocused}\n onSwipeComplete={handleBlur}\n onBackdropPress={handleBlur}\n testID={testID}\n >\n <ModalSelect\n value={value}\n values={values}\n onChange={handleChange}\n onClose={handleBlur}\n testID={`${testID}-modal`}\n />\n </Modal>\n </>\n );\n};\n\nexport default Select;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AA8BA,MAAMA,UAAU,GAAG,EAAnB;;AAEA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,UAAU,EAAE,QADH;IAETC,aAAa,EAAE;EAFN,CADK;EAKhBC,IAAI,EAAE;IACJC,IAAI,EAAE,CADF;IAEJC,KAAK,EAAER,KAAK,CAACS,MAAN,CAAaC,IAA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AAb,GAA0B9C,IAA1B,CADF,eAEE,6BAAC,eAAD;IAAO,IAAI,EAAC;EAAZ,EAFF,eAGE,6BAAC,6CAAD;IACE,KAAK,EAAEE,KAAK,IAAIR,KAAK,CAACS,MAAN,CAAaC,IAAb,CAAkB6C,IADpC;IAEE,MAAM,EAAEzD,UAFV;IAGE,KAAK,EAAEA;EAHT,EAHF,CANF,CADF,eAiBE,6BAAC,yBAAD;IACE,SAAS,EAAEuC,SADb;IAEE,eAAe,EAAEO,UAFnB;IAGE,eAAe,EAAEA,UAHnB;IAIE,MAAM,EAAEL;EAJV,gBAME,6BAAC,eAAD;IACE,KAAK,EAAEL,KADT;IAEE,MAAM,EAAEF,MAFV;IAGE,QAAQ,EAAEc,YAHZ;IAIE,OAAO,EAAEF,UAJX;IAKE,MAAM,EAAG,GAAEL,MAAO;EALpB,EANF,CAjBF,CADF;AAkCD,CAvGD;;eAyGepB,M"}
@@ -1,16 +1,13 @@
1
- import * as React from 'react';
2
- import { TextStyle, StyleProp } from 'react-native';
1
+ import React from 'react';
2
+ import { TextStyle } from 'react-native';
3
3
  export declare type Props = {
4
4
  children: React.ReactNode;
5
- style?: StyleProp<TextStyle>;
5
+ style?: TextStyle;
6
6
  testID?: string;
7
7
  numberOfLines?: number;
8
8
  allowFontScaling?: boolean;
9
9
  accessibilityLabel?: string;
10
10
  };
11
- export declare const DEFAULT_STYLE: {
12
- fontFamily?: string | undefined;
13
- };
14
11
  declare const Text: (props: Props) => JSX.Element;
15
12
  export default Text;
16
13
  //# sourceMappingURL=index.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/text/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAyC,SAAS,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAE1F,oBAAY,KAAK,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,aAAa;;CAMzB,CAAC;AAQF,QAAA,MAAM,IAAI,UAAW,KAAK,gBAqBzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/text/index.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA+B,SAAS,EAAC,MAAM,cAAc,CAAC;AAErE,oBAAY,KAAK,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAKF,QAAA,MAAM,IAAI,UAAW,KAAK,gBA2BzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,29 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.DEFAULT_STYLE = void 0;
4
+ exports.default = void 0;
5
5
 
6
- var React = _interopRequireWildcard(require("react"));
6
+ var _react = _interopRequireDefault(require("react"));
7
7
 
8
8
  var _reactNative = require("react-native");
9
9
 
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
-
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
11
 
14
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
13
 
16
- const DEFAULT_STYLE = _extends({}, _reactNative.Platform.select({
17
- android: {
18
- fontFamily: 'Roboto'
19
- }
20
- }));
21
-
22
- exports.DEFAULT_STYLE = DEFAULT_STYLE;
14
+ const SCREEN = _reactNative.Dimensions.get('screen');
23
15
 
24
- const styles = _reactNative.StyleSheet.create({
25
- text: _extends({}, DEFAULT_STYLE)
26
- });
16
+ const FONT_SCALING = 0.5 * (SCREEN.height / SCREEN.width);
27
17
 
28
18
  const Text = props => {
29
19
  const {
@@ -34,9 +24,15 @@ const Text = props => {
34
24
  allowFontScaling = true,
35
25
  accessibilityLabel
36
26
  } = props;
37
- return /*#__PURE__*/React.createElement(_reactNative.Text, {
27
+
28
+ const styleWithScaledFont = _extends({}, style, {
29
+ fontSize: style?.fontSize ? style.fontSize * FONT_SCALING : undefined,
30
+ lineHeight: style?.lineHeight ? style.lineHeight * FONT_SCALING : undefined
31
+ });
32
+
33
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
38
34
  allowFontScaling: allowFontScaling,
39
- style: [styles.text, style],
35
+ style: styleWithScaledFont,
40
36
  testID: testID,
41
37
  numberOfLines: numberOfLines,
42
38
  accessibilityLabel: accessibilityLabel
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["DEFAULT_STYLE","Platform","select","android","fontFamily","styles","StyleSheet","create","text","Text","props","children","style","testID","numberOfLines","allowFontScaling","accessibilityLabel"],"sources":["../../../src/atom/text/index.native.tsx"],"sourcesContent":["import * as React from 'react';\nimport {Text as TextBase, Platform, StyleSheet, TextStyle, StyleProp} from 'react-native';\n\nexport type Props = {\n children: React.ReactNode;\n style?: StyleProp<TextStyle>;\n testID?: string;\n numberOfLines?: number;\n allowFontScaling?: boolean;\n accessibilityLabel?: string;\n};\n\nexport const DEFAULT_STYLE = {\n ...Platform.select({\n android: {\n fontFamily: 'Roboto'\n }\n })\n};\n\nconst styles = StyleSheet.create({\n text: {\n ...DEFAULT_STYLE\n }\n});\n\nconst Text = (props: Props) => {\n const {\n children,\n style,\n testID,\n numberOfLines,\n allowFontScaling = true,\n accessibilityLabel\n } = props;\n\n return (\n <TextBase\n allowFontScaling={allowFontScaling}\n style={[styles.text, style]}\n testID={testID}\n numberOfLines={numberOfLines}\n accessibilityLabel={accessibilityLabel}\n >\n {children}\n </TextBase>\n );\n};\n\nexport default Text;\n"],"mappings":";;;;;AAAA;;AACA;;;;;;;;AAWO,MAAMA,aAAa,gBACrBC,qBAAA,CAASC,MAAT,CAAgB;EACjBC,OAAO,EAAE;IACPC,UAAU,EAAE;EADL;AADQ,CAAhB,CADqB,CAAnB;;;;AAQP,MAAMC,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC/BC,IAAI,eACCR,aADD;AAD2B,CAAlB,CAAf;;AAMA,MAAMS,IAAI,GAAIC,KAAD,IAAkB;EAC7B,MAAM;IACJC,QADI;IAEJC,KAFI;IAGJC,MAHI;IAIJC,aAJI;IAKJC,gBAAgB,GAAG,IALf;IAMJC;EANI,IAOFN,KAPJ;EASA,oBACE,oBAAC,iBAAD;IACE,gBAAgB,EAAEK,gBADpB;IAEE,KAAK,EAAE,CAACV,MAAM,CAACG,IAAR,EAAcI,KAAd,CAFT;IAGE,MAAM,EAAEC,MAHV;IAIE,aAAa,EAAEC,aAJjB;IAKE,kBAAkB,EAAEE;EALtB,GAOGL,QAPH,CADF;AAWD,CArBD;;eAuBeF,I"}
1
+ {"version":3,"file":"index.native.js","names":["SCREEN","Dimensions","get","FONT_SCALING","height","width","Text","props","children","style","testID","numberOfLines","allowFontScaling","accessibilityLabel","styleWithScaledFont","fontSize","undefined","lineHeight"],"sources":["../../../src/atom/text/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {Dimensions, Text as TextBase, TextStyle} from 'react-native';\n\nexport type Props = {\n children: React.ReactNode;\n style?: TextStyle;\n testID?: string;\n numberOfLines?: number;\n allowFontScaling?: boolean;\n accessibilityLabel?: string;\n};\n\nconst SCREEN = Dimensions.get('screen');\nconst FONT_SCALING = 0.5 * (SCREEN.height / SCREEN.width);\n\nconst Text = (props: Props) => {\n const {\n children,\n style,\n testID,\n numberOfLines,\n allowFontScaling = true,\n accessibilityLabel\n } = props;\n\n const styleWithScaledFont: TextStyle = {\n ...style,\n fontSize: style?.fontSize ? style.fontSize * FONT_SCALING : undefined,\n lineHeight: style?.lineHeight ? style.lineHeight * FONT_SCALING : undefined\n };\n\n return (\n <TextBase\n allowFontScaling={allowFontScaling}\n style={styleWithScaledFont}\n testID={testID}\n numberOfLines={numberOfLines}\n accessibilityLabel={accessibilityLabel}\n >\n {children}\n </TextBase>\n );\n};\n\nexport default Text;\n"],"mappings":";;;;;AAAA;;AACA;;;;;;AAWA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,GAAX,CAAe,QAAf,CAAf;;AACA,MAAMC,YAAY,GAAG,OAAOH,MAAM,CAACI,MAAP,GAAgBJ,MAAM,CAACK,KAA9B,CAArB;;AAEA,MAAMC,IAAI,GAAIC,KAAD,IAAkB;EAC7B,MAAM;IACJC,QADI;IAEJC,KAFI;IAGJC,MAHI;IAIJC,aAJI;IAKJC,gBAAgB,GAAG,IALf;IAMJC;EANI,IAOFN,KAPJ;;EASA,MAAMO,mBAA8B,gBAC/BL,KAD+B;IAElCM,QAAQ,EAAEN,KAAK,EAAEM,QAAP,GAAkBN,KAAK,CAACM,QAAN,GAAiBZ,YAAnC,GAAkDa,SAF1B;IAGlCC,UAAU,EAAER,KAAK,EAAEQ,UAAP,GAAoBR,KAAK,CAACQ,UAAN,GAAmBd,YAAvC,GAAsDa;EAHhC,EAApC;;EAMA,oBACE,6BAAC,iBAAD;IACE,gBAAgB,EAAEJ,gBADpB;IAEE,KAAK,EAAEE,mBAFT;IAGE,MAAM,EAAEJ,MAHV;IAIE,aAAa,EAAEC,aAJjB;IAKE,kBAAkB,EAAEE;EALtB,GAOGL,QAPH,CADF;AAWD,CA3BD;;eA6BeF,I"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/hoc/modal/select-item/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,qBAAqB,EAAmC,MAAM,cAAc,CAAC;AAQrF,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAuBF,QAAA,MAAM,eAAe,UAAW,KAAK,uBA0BpC,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/hoc/modal/select-item/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,qBAAqB,EAAmC,MAAM,cAAc,CAAC;AAQrF,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAuBF,QAAA,MAAM,eAAe,UAAW,KAAK,uBA8BpC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -19,6 +19,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
19
19
 
20
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
21
 
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
+
22
24
  const createStyleSheet = (brandTheme, theme) => _reactNative.StyleSheet.create({
23
25
  container: {
24
26
  backgroundColor: theme.colors.white,
@@ -56,10 +58,10 @@ const ModalSelectItem = props => {
56
58
  isSelected,
57
59
  testID
58
60
  } = props;
59
- const textStyle = [styleSheet.text];
61
+ let textStyle = styleSheet.text;
60
62
 
61
63
  if (isSelected) {
62
- textStyle.push(styleSheet.selectedTextStyle);
64
+ textStyle = _extends({}, textStyle, styleSheet.selectedTextStyle);
63
65
  }
64
66
 
65
67
  return /*#__PURE__*/_react.default.createElement(_index2.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["createStyleSheet","brandTheme","theme","StyleSheet","create","container","backgroundColor","colors","white","padding","spacing","small","text","fontWeight","bold","color","black","selectedTextStyle","primary","ModalSelectItem","props","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","useEffect","_stylesheet","children","onPress","isSelected","testID","textStyle","push"],"sources":["../../../../src/hoc/modal/select-item/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {GestureResponderEvent, StyleSheet, TextStyle, ViewStyle} from 'react-native';\n\nimport Text from '../../../atom/text/index.native';\nimport Touchable from '../../touchable/index.native';\nimport {useTemplateContext} from '../../../template/app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport {Brand} from '../../../variables/brand.native';\n\nexport type Props = {\n isSelected?: boolean;\n children: string;\n onPress?: (event: GestureResponderEvent) => void;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n text: TextStyle;\n selectedTextStyle: TextStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n backgroundColor: theme.colors.white,\n padding: theme.spacing.small\n },\n text: {\n fontWeight: theme.fontWeight.bold,\n color: theme.colors.black\n },\n selectedTextStyle: {\n color: brandTheme?.colors?.primary\n }\n });\n\nconst ModalSelectItem = (props: Props) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme} = templateContext;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [theme, brandTheme]);\n\n if (!styleSheet) {\n return null;\n }\n\n const {children, onPress, isSelected, testID} = props;\n\n const textStyle: TextStyle[] = [styleSheet.text];\n if (isSelected) {\n textStyle.push(styleSheet.selectedTextStyle);\n }\n\n return (\n <Touchable onPress={onPress} style={styleSheet.container} testID={testID}>\n <Text style={textStyle}>{children}</Text>\n </Touchable>\n );\n};\n\nexport default ModalSelectItem;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;AAiBA,MAAMA,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,eAAe,EAAEJ,KAAK,CAACK,MAAN,CAAaC,KADrB;IAETC,OAAO,EAAEP,KAAK,CAACQ,OAAN,CAAcC;EAFd,CADK;EAKhBC,IAAI,EAAE;IACJC,UAAU,EAAEX,KAAK,CAACW,UAAN,CAAiBC,IADzB;IAEJC,KAAK,EAAEb,KAAK,CAACK,MAAN,CAAaS;EAFhB,CALU;EAShBC,iBAAiB,EAAE;IACjBF,KAAK,EAAEd,UAAU,EAAEM,MAAZ,EAAoBW;EADV;AATH,CAAlB,CADF;;AAeA,MAAMC,eAAe,GAAIC,KAAD,IAAkB;EACxC,MAAMC,eAAe,GAAG,IAAAC,mCAAA,GAAxB;EACA,MAAM,CAACC,UAAD,EAAaC,aAAb,IAA8B,IAAAC,eAAA,EAAgC,IAAhC,CAApC;EACA,MAAM;IAACxB,UAAD;IAAaC;EAAb,IAAsBmB,eAA5B;EAEA,IAAAK,gBAAA,EAAU,MAAM;IACd,MAAMC,WAAW,GAAG3B,gBAAgB,CAACC,UAAD,EAAaC,KAAb,CAApC;;IACAsB,aAAa,CAACG,WAAD,CAAb;EACD,CAHD,EAGG,CAACzB,KAAD,EAAQD,UAAR,CAHH;;EAKA,IAAI,CAACsB,UAAL,EAAiB;IACf,OAAO,IAAP;EACD;;EAED,MAAM;IAACK,QAAD;IAAWC,OAAX;IAAoBC,UAApB;IAAgCC;EAAhC,IAA0CX,KAAhD;EAEA,MAAMY,SAAsB,GAAG,CAACT,UAAU,CAACX,IAAZ,CAA/B;;EACA,IAAIkB,UAAJ,EAAgB;IACdE,SAAS,CAACC,IAAV,CAAeV,UAAU,CAACN,iBAA1B;EACD;;EAED,oBACE,6BAAC,eAAD;IAAW,OAAO,EAAEY,OAApB;IAA6B,KAAK,EAAEN,UAAU,CAAClB,SAA/C;IAA0D,MAAM,EAAE0B;EAAlE,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAEC;EAAb,GAAyBJ,QAAzB,CADF,CADF;AAKD,CA1BD;;eA4BeT,e"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","brandTheme","theme","StyleSheet","create","container","backgroundColor","colors","white","padding","spacing","small","text","fontWeight","bold","color","black","selectedTextStyle","primary","ModalSelectItem","props","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","useEffect","_stylesheet","children","onPress","isSelected","testID","textStyle"],"sources":["../../../../src/hoc/modal/select-item/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {GestureResponderEvent, StyleSheet, TextStyle, ViewStyle} from 'react-native';\n\nimport Text from '../../../atom/text/index.native';\nimport Touchable from '../../touchable/index.native';\nimport {useTemplateContext} from '../../../template/app-review/template-context';\nimport {Theme} from '../../../variables/theme.native';\nimport {Brand} from '../../../variables/brand.native';\n\nexport type Props = {\n isSelected?: boolean;\n children: string;\n onPress?: (event: GestureResponderEvent) => void;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n text: TextStyle;\n selectedTextStyle: TextStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n backgroundColor: theme.colors.white,\n padding: theme.spacing.small\n },\n text: {\n fontWeight: theme.fontWeight.bold,\n color: theme.colors.black\n },\n selectedTextStyle: {\n color: brandTheme?.colors?.primary\n }\n });\n\nconst ModalSelectItem = (props: Props) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme} = templateContext;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [theme, brandTheme]);\n\n if (!styleSheet) {\n return null;\n }\n\n const {children, onPress, isSelected, testID} = props;\n\n let textStyle: TextStyle = styleSheet.text;\n\n if (isSelected) {\n textStyle = {\n ...textStyle,\n ...styleSheet.selectedTextStyle\n };\n }\n\n return (\n <Touchable onPress={onPress} style={styleSheet.container} testID={testID}>\n <Text style={textStyle}>{children}</Text>\n </Touchable>\n );\n};\n\nexport default ModalSelectItem;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAiBA,MAAMA,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,eAAe,EAAEJ,KAAK,CAACK,MAAN,CAAaC,KADrB;IAETC,OAAO,EAAEP,KAAK,CAACQ,OAAN,CAAcC;EAFd,CADK;EAKhBC,IAAI,EAAE;IACJC,UAAU,EAAEX,KAAK,CAACW,UAAN,CAAiBC,IADzB;IAEJC,KAAK,EAAEb,KAAK,CAACK,MAAN,CAAaS;EAFhB,CALU;EAShBC,iBAAiB,EAAE;IACjBF,KAAK,EAAEd,UAAU,EAAEM,MAAZ,EAAoBW;EADV;AATH,CAAlB,CADF;;AAeA,MAAMC,eAAe,GAAIC,KAAD,IAAkB;EACxC,MAAMC,eAAe,GAAG,IAAAC,mCAAA,GAAxB;EACA,MAAM,CAACC,UAAD,EAAaC,aAAb,IAA8B,IAAAC,eAAA,EAAgC,IAAhC,CAApC;EACA,MAAM;IAACxB,UAAD;IAAaC;EAAb,IAAsBmB,eAA5B;EAEA,IAAAK,gBAAA,EAAU,MAAM;IACd,MAAMC,WAAW,GAAG3B,gBAAgB,CAACC,UAAD,EAAaC,KAAb,CAApC;;IACAsB,aAAa,CAACG,WAAD,CAAb;EACD,CAHD,EAGG,CAACzB,KAAD,EAAQD,UAAR,CAHH;;EAKA,IAAI,CAACsB,UAAL,EAAiB;IACf,OAAO,IAAP;EACD;;EAED,MAAM;IAACK,QAAD;IAAWC,OAAX;IAAoBC,UAApB;IAAgCC;EAAhC,IAA0CX,KAAhD;EAEA,IAAIY,SAAoB,GAAGT,UAAU,CAACX,IAAtC;;EAEA,IAAIkB,UAAJ,EAAgB;IACdE,SAAS,gBACJA,SADI,EAEJT,UAAU,CAACN,iBAFP,CAAT;EAID;;EAED,oBACE,6BAAC,eAAD;IAAW,OAAO,EAAEY,OAApB;IAA6B,KAAK,EAAEN,UAAU,CAAClB,SAA/C;IAA0D,MAAM,EAAE0B;EAAlE,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAEC;EAAb,GAAyBJ,QAAzB,CADF,CADF;AAKD,CA9BD;;eAgCeT,e"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/external-content-button/index.js"],"names":[],"mappings":";AAOA;IACE;;;;MAIE;IAEF;;MAEE;IAEF,sCAEC;IAED,8BAKE;IAEF,sBAoBC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/external-content-button/index.js"],"names":[],"mappings":";AAOA;IACE;;;;MAIE;IAEF;;MAEE;IAEF,sCAEC;IAED,8BAKE;IAEF,sBAwBC;CACF"}
@@ -41,7 +41,8 @@ class ExternalContentButton extends _react.default.Component {
41
41
  const iconColor = _externalContent.EXTERNAL_CONTENT_ICONS[type].color;
42
42
  return /*#__PURE__*/_react.default.createElement("div", {
43
43
  onClick: this.handleClick,
44
- className: _style.default.button
44
+ className: _style.default.button,
45
+ "data-testid": "external-content-button"
45
46
  }, /*#__PURE__*/_react.default.createElement("div", {
46
47
  className: _style.default.header,
47
48
  style: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ExternalContentButton","React","Component","constructor","props","context","handleClick","e","stopPropagation","preventDefault","onClick","render","translate","type","description","IconType","EXTERNAL_CONTENT_ICONS","icon","iconColor","color","style","button","header","backgroundColor","iconBackground","title","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","func"],"sources":["../../../src/molecule/external-content-button/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\n\nimport style from './style.css';\n\nclass ExternalContentButton extends React.Component {\n static propTypes = {\n type: PropTypes.string,\n description: PropTypes.string,\n onClick: PropTypes.func\n };\n\n static contextTypes = {\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props, context) {\n super(props, context);\n }\n\n handleClick = e => {\n e.stopPropagation();\n e.preventDefault();\n const {onClick} = this.props;\n onClick && onClick(e);\n };\n\n render() {\n const {translate} = this.context;\n const {type, description} = this.props;\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n return (\n <div onClick={this.handleClick} className={style.button}>\n <div className={style.header} style={{backgroundColor: iconColor}} />\n <div className={style.iconBackground} style={{backgroundColor: iconColor}}>\n <IconType className={style.icon} width={16} height={16} />\n </div>\n <span className={style.title}>\n {type === 'scorm' ? translate('external_content_scorm') : ''}\n {type === 'video' ? translate('external_content_video') : ''}\n {type === 'article' ? translate('external_content_article') : ''}\n {type === 'podcast' ? translate('external_content_podcast') : ''}\n </span>\n <span className={style.description}>{description}</span>\n </div>\n );\n }\n}\n\nexport default ExternalContentButton;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;AAEA,MAAMA,qBAAN,SAAoCC,cAAA,CAAMC,SAA1C,CAAoD;EAWlDC,WAAW,CAACC,KAAD,EAAQC,OAAR,EAAiB;IAC1B,MAAMD,KAAN,EAAaC,OAAb;;IAD0B,KAI5BC,WAJ4B,GAIdC,CAAC,IAAI;MACjBA,CAAC,CAACC,eAAF;MACAD,CAAC,CAACE,cAAF;MACA,MAAM;QAACC;MAAD,IAAY,KAAKN,KAAvB;MACAM,OAAO,IAAIA,OAAO,CAACH,CAAD,CAAlB;IACD,CAT2B;EAE3B;;EASDI,MAAM,G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UC,MADC;EAEjBjB,WAAW,EAAEgB,kBAAA,CAAUC,MAFN;EAGjBrB,OAAO,EAAEoB,kBAAA,CAAUE;AAHF,C;eA4CNhC,qB"}
1
+ {"version":3,"file":"index.js","names":["ExternalContentButton","React","Component","constructor","props","context","handleClick","e","stopPropagation","preventDefault","onClick","render","translate","type","description","IconType","EXTERNAL_CONTENT_ICONS","icon","iconColor","color","style","button","header","backgroundColor","iconBackground","title","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","func"],"sources":["../../../src/molecule/external-content-button/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\n\nimport style from './style.css';\n\nclass ExternalContentButton extends React.Component {\n static propTypes = {\n type: PropTypes.string,\n description: PropTypes.string,\n onClick: PropTypes.func\n };\n\n static contextTypes = {\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props, context) {\n super(props, context);\n }\n\n handleClick = e => {\n e.stopPropagation();\n e.preventDefault();\n const {onClick} = this.props;\n onClick && onClick(e);\n };\n\n render() {\n const {translate} = this.context;\n const {type, description} = this.props;\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n return (\n <div\n onClick={this.handleClick}\n className={style.button}\n data-testid=\"external-content-button\"\n >\n <div className={style.header} style={{backgroundColor: iconColor}} />\n <div className={style.iconBackground} style={{backgroundColor: iconColor}}>\n <IconType className={style.icon} width={16} height={16} />\n </div>\n <span className={style.title}>\n {type === 'scorm' ? translate('external_content_scorm') : ''}\n {type === 'video' ? translate('external_content_video') : ''}\n {type === 'article' ? translate('external_content_article') : ''}\n {type === 'podcast' ? translate('external_content_podcast') : ''}\n </span>\n <span className={style.description}>{description}</span>\n </div>\n );\n }\n}\n\nexport default ExternalContentButton;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;AAEA,MAAMA,qBAAN,S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AA9B,GAA6D,EAHhE,EAIGC,IAAI,KAAK,SAAT,GAAqBD,SAAS,CAAC,0BAAD,CAA9B,GAA6D,EAJhE,CATF,eAeE;MAAM,SAAS,EAAEQ,cAAA,CAAMN;IAAvB,GAAqCA,WAArC,CAfF,CADF;EAmBD;;AA9CiD;;AAA9Cd,qB,CAOG0B,Y,GAAe;EACpBd,SAAS,EAAEe,iBAAA,CAASC,iBAAT,CAA2BhB;AADlB,C;AAPlBZ,qB,CACG6B,S,2CAAY;EACjBhB,IAAI,EAAEiB,kBAAA,CAAUC,MADC;EAEjBjB,WAAW,EAAEgB,kBAAA,CAAUC,MAFN;EAGjBrB,OAAO,EAAEoB,kBAAA,CAAUE;AAHF,C;eAgDNhC,qB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AASpE,oBAAY,yBAAyB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA2DF,QAAA,MAAM,cAAc,UAAW,KAAK,uBA4DnC,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,SAAS,EAAY,MAAM,cAAc,CAAC;AASpE,oBAAY,yBAAyB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA2DF,QAAA,MAAM,cAAc,UAAW,KAAK,uBAiEnC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -92,19 +92,21 @@ const QuestionSlider = props => {
92
92
  const _stylesheet = createStyleSheet(brandTheme, theme);
93
93
 
94
94
  setStylesheet(_stylesheet);
95
- }, [theme]);
95
+ }, [brandTheme, theme]);
96
96
 
97
97
  if (!styleSheet) {
98
98
  return null;
99
99
  }
100
100
 
101
+ const textStyle = _extends({}, styleSheet.header, {
102
+ color: brandTheme?.colors?.primary
103
+ });
104
+
101
105
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
102
106
  style: [styleSheet.container, style],
103
107
  testID: testID
104
108
  }, /*#__PURE__*/_react.default.createElement(_index.default, {
105
- style: [styleSheet.header, {
106
- color: brandTheme?.colors?.primary
107
- }],
109
+ style: textStyle,
108
110
  testID: "slider-value"
109
111
  }, value), /*#__PURE__*/_react.default.createElement(_reactNativeSlider.default, {
110
112
  step: step || 1,
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["createStyleSheet","brandTheme","theme","StyleSheet","create","container","flex","paddingHorizontal","flexDirection","justifyContent","header","fontSize","fontWeight","bold","textAlign","textValue","color","colors","black","valuesContainer","leftValue","alignItems","rightValue","track","height","borderRadius","radius","button","thumb","BOX_STYLE","width","borderWidth","backgroundColor","primary","borderColor","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","setValue","handleSlidingComplete","useCallback","useEffect","_stylesheet"],"sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport Slider from '@coorpacademy/react-native-slider';\n\nimport {Theme} from '../../../../variables/theme.native';\nimport Text from '../../../../atom/text/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {BOX_STYLE} from '../../../../variables/shadow';\nimport {Brand} from '../../../../variables/brand.native';\n\nexport type OnSlidingCompleteFunction = (value: number) => void;\n\nexport type Props = {\n min: number;\n max: number;\n value?: number;\n unit?: string;\n onSlidingComplete: OnSlidingCompleteFunction;\n style?: ViewStyle;\n step?: number;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: TextStyle;\n textValue: TextStyle;\n valuesContainer: ViewStyle;\n leftValue: ViewStyle;\n rightValue: ViewStyle;\n track: ViewStyle;\n thumb: ViewStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n paddingHorizontal: 20,\n flexDirection: 'column',\n justifyContent: 'center'\n },\n header: {\n fontSize: 25,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n textValue: {\n fontSize: 15,\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n valuesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around'\n },\n leftValue: {\n flex: 1,\n alignItems: 'flex-start'\n },\n rightValue: {\n flex: 1,\n alignItems: 'flex-end'\n },\n track: {\n height: 10,\n borderRadius: theme.radius.button\n },\n thumb: {\n ...BOX_STYLE,\n width: 30,\n height: 30,\n borderRadius: 30 / 2,\n borderWidth: 5,\n backgroundColor: brandTheme?.colors?.primary,\n borderColor: 'white'\n }\n });\n\nconst QuestionSlider = (props: Props) => {\n const {\n step,\n style,\n min,\n max,\n unit = '',\n value: storeValue = 0,\n onSlidingComplete,\n testID\n } = props;\n const templateContext = useTemplateContext();\n const {brandTheme, theme} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [value, setValue] = useState<number>(storeValue);\n\n const handleSlidingComplete = useCallback(() => {\n onSlidingComplete(value);\n }, [onSlidingComplete, value]);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={[styleSheet.container, style]} testID={testID}>\n <Text style={[styleSheet.header, {color: brandTheme?.colors?.primary}]} testID=\"slider-value\">\n {value}\n </Text>\n <Slider\n step={step || 1}\n value={value}\n onValueChange={setValue}\n maximumValue={max}\n minimumValue={min}\n onSlidingComplete={handleSlidingComplete}\n minimumTrackTintColor={brandTheme?.colors?.primary}\n trackStyle={styleSheet.track}\n thumbStyle={[styleSheet.thumb]}\n testID=\"slider\"\n />\n <View style={styleSheet.valuesContainer} testID=\"slider-values-container\">\n <View style={styleSheet.leftValue}>\n <Text style={styleSheet.textValue} testID=\"slider-min-value\">\n {`${min} ${unit}`}\n </Text>\n </View>\n <View style={styleSheet.rightValue}>\n <Text style={styleSheet.textValue} testID=\"slider-max-value\">\n {`${max} ${unit}`}\n </Text>\n </View>\n </View>\n </View>\n );\n};\n\nexport default QuestionSlider;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAGA;;AACA;;AACA;;;;;;;;;;AA2BA,MAAMA,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,IAAI,EAAE,CADG;IAETC,iBAAiB,EAAE,EAFV;IAGTC,aAAa,EAAE,QAHN;IAITC,cAAc,EAAE;EAJP,CADK;EAOhBC,MAAM,EAAE;IACNC,QAAQ,EAAE,EADJ;IA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KAAK,EAAE6B,UAAU,CAAC5B;EAAxB,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAE4B,UAAU,CAACjC,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEwB,GAAI,IAAGE,IAAK,EADlB,CADF,CADF,eAME,6BAAC,iBAAD;IAAM,KAAK,EAAEO,UAAU,CAAC1B;EAAxB,gBACE,6BAAC,cAAD;IAAM,KAAK,EAAE0B,UAAU,CAACjC,SAAxB;IAAmC,MAAM,EAAC;EAA1C,GACI,GAAEyB,GAAI,IAAGC,IAAK,EADlB,CADF,CANF,CAhBF,CADF;AA+BD,CA5DD;;eA8DeN,c"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","brandTheme","theme","StyleSheet","create","container","flex","paddingHorizontal","flexDirection","justifyContent","header","fontSize","fontWeight","bold","textAlign","textValue","color","colors","black","valuesContainer","leftValue","alignItems","rightValue","track","height","borderRadius","radius","button","thumb","BOX_STYLE","width","borderWidth","backgroundColor","primary","borderColor","QuestionSlider","props","step","style","min","max","unit","value","storeValue","onSlidingComplete","testID","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","setValue","handleSlidingComplete","useCallback","useEffect","_stylesheet","textStyle"],"sources":["../../../../../src/molecule/questions/mobile/slider/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback} from 'react';\nimport {View, StyleSheet, ViewStyle, TextStyle} from 'react-native';\nimport Slider from '@coorpacademy/react-native-slider';\n\nimport {Theme} from '../../../../variables/theme.native';\nimport Text from '../../../../atom/text/index.native';\nimport {useTemplateContext} from '../../../../template/app-review/template-context';\nimport {BOX_STYLE} from '../../../../variables/shadow';\nimport {Brand} from '../../../../variables/brand.native';\n\nexport type OnSlidingCompleteFunction = (value: number) => void;\n\nexport type Props = {\n min: number;\n max: number;\n value?: number;\n unit?: string;\n onSlidingComplete: OnSlidingCompleteFunction;\n style?: ViewStyle;\n step?: number;\n testID?: string;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n header: TextStyle;\n textValue: TextStyle;\n valuesContainer: ViewStyle;\n leftValue: ViewStyle;\n rightValue: ViewStyle;\n track: ViewStyle;\n thumb: ViewStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n flex: 1,\n paddingHorizontal: 20,\n flexDirection: 'column',\n justifyContent: 'center'\n },\n header: {\n fontSize: 25,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n textValue: {\n fontSize: 15,\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n textAlign: 'center'\n },\n valuesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-around'\n },\n leftValue: {\n flex: 1,\n alignItems: 'flex-start'\n },\n rightValue: {\n flex: 1,\n alignItems: 'flex-end'\n },\n track: {\n height: 10,\n borderRadius: theme.radius.button\n },\n thumb: {\n ...BOX_STYLE,\n width: 30,\n height: 30,\n borderRadius: 30 / 2,\n borderWidth: 5,\n backgroundColor: brandTheme?.colors?.primary,\n borderColor: 'white'\n }\n });\n\nconst QuestionSlider = (props: Props) => {\n const {\n step,\n style,\n min,\n max,\n unit = '',\n value: storeValue = 0,\n onSlidingComplete,\n testID\n } = props;\n const templateContext = useTemplateContext();\n const {brandTheme, theme} = templateContext;\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [value, setValue] = useState<number>(storeValue);\n\n const handleSlidingComplete = useCallback(() => {\n onSlidingComplete(value);\n }, [onSlidingComplete, value]);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n const textStyle: TextStyle = {\n ...styleSheet.header,\n color: brandTheme?.colors?.primary\n };\n\n return (\n <View style={[styleSheet.container, style]} testID={testID}>\n <Text style={textStyle} testID=\"slider-value\">\n {value}\n </Text>\n <Slider\n step={step || 1}\n value={value}\n onValueChange={setValue}\n maximumValue={max}\n minimumValue={min}\n onSlidingComplete={handleSlidingComplete}\n minimumTrackTintColor={brandTheme?.colors?.primary}\n trackStyle={styleSheet.track}\n thumbStyle={[styleSheet.thumb]}\n testID=\"slider\"\n />\n <View style={styleSheet.valuesContainer} testID=\"slider-values-container\">\n <View style={styleSheet.leftValue}>\n <Text style={styleSheet.textValue} testID=\"slider-min-value\">\n {`${min} ${unit}`}\n </Text>\n </View>\n <View style={styleSheet.rightValue}>\n <Text style={styleSheet.textValue} testID=\"slider-max-value\">\n {`${max} ${unit}`}\n </Text>\n </View>\n </View>\n </View>\n );\n};\n\nexport default QuestionSlider;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAGA;;AACA;;AACA;;;;;;;;;;AA2BA,MAAMA,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,IAAI,EAAE,CADG;IAETC,iBAAiB,EAAE,EAFV;IAGTC,aAAa,EAAE,QAHN;IAITC,cAAc,EAAE;EAJP,CADK;EAOhBC,MAAM,EAAE;IACNC,QAAQ,EAAE,EADJ;IAENC,UAAU,EAAEV,KAAK,CAACU,UAAN,CAAiBC,IAFvB;IAGNC,SAAS,EAAE;EAHL,CAPQ;EAYhBC,SAAS,EAAE;IACTJ,QAAQ,EAAE,EADD;IAETK,KAAK,EAAEd,KAAK,CAACe,MAAN,CAAaC,KAFX;IAGTN,UAAU,EAAEV,KAAK,CAACU,UAAN,CAAiBC,IAHpB;IAITC,SAAS,EAAE;EAJF,CAZK;EAkBhBK,eAAe,EAAE;IACfX,aAAa,EAAE,KADA;IAEfC,cAAc,EAAE;EAFD,CAlBD;EAsBhBW,SAAS,EAAE;IACTd,IAAI,EAAE,CADG;IAETe,UAAU,EAAE;EAFH,CAtBK;EA0BhBC,UAAU,EAAE;IACVhB,IAAI,EAAE,CADI;IAEVe,UAAU,EAAE;EAFF,CA1BI;EA8BhBE,KAAK,EAAE;IACLC,MAAM,EA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appings":";AAQA,uEAwEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":[],"mappings":";AAQA,uEAoEC"}
@@ -71,8 +71,7 @@ const QCMImage = (props, legacyContext) => {
71
71
  className: _style.default.titleWrapper
72
72
  }, /*#__PURE__*/_react.default.createElement("div", {
73
73
  title: title,
74
- className: (0, _classnames.default)(_style.default.title, _style.default.innerHTML) // eslint-disable-next-line react/no-danger
75
-
74
+ className: (0, _classnames.default)(_style.default.title, _style.default.innerHTML)
76
75
  }, /*#__PURE__*/_react.default.createElement("label", {
77
76
  htmlFor: checkboxId
78
77
  }, /*#__PURE__*/_react.default.createElement("input", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["QCMImage","props","legacyContext","answers","groupAriaLabel","skin","GetSkinFromContext","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","checkboxId","boxShadow","getShadowBoxColorFromPrimary","style","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","classnames","innerHTML","hiddenCheckbox","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers, groupAriaLabel} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n const checkboxId = `checkbox-graphic-${key}`;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n >\n <label htmlFor={checkboxId}>\n <input\n id={checkboxId}\n type=\"checkbox\"\n value={title}\n checked={selected}\n onChange={onClick}\n className={style.hiddenCheckbox}\n />\n {title}\n </label>\n </div>\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div\n data-name=\"qcm-graphic-wrapper\"\n className={style.wrapper}\n role=\"group\"\n aria-label={groupAriaLabel}\n >\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n ),\n groupAriaLabel: PropTypes.string\n};\n\nexport default QCMImage;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACzC,MAAM;IAACC,OAAD;IAAUC;EAAV,IAA4BH,KAAlC;EACA,MAAMI,IAAI,GAAG,IAAAC,4BAAA,EAAmBJ,aAAnB,CAAb;EACA,MAAMK,gBAAgB,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCF,IAAnC,CAAzB;EAEA,MAAMG,YAAY,GAAGL,OAAO,CAACM,GAAR,CA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AEQ,cAAA,CAAMS;IANnB,EADF,EASGhB,KATH,CALF,CADF,CATF,CAnBF,CADF;EAmDD,CAvDoB,CAArB;EAyDA,oBACE;IACE,aAAU,qBADZ;IAEE,SAAS,EAAEO,cAAA,CAAMU,OAFnB;IAGE,IAAI,EAAC,OAHP;IAIE,cAAY1B;EAJd,GAMGI,YANH,CADF;AAUD,CAxED;;AA0EAR,QAAQ,CAAC+B,YAAT,GAAwB;EACtB1B,IAAI,EAAE2B,iBAAA,CAASC,iBAAT,CAA2B5B;AADX,CAAxB;AAIAL,QAAQ,CAACkC,SAAT,2CAAqB;EACnB/B,OAAO,EAAEgC,kBAAA,CAAUC,OAAV,CACPD,kBAAA,CAAUE,KAAV,CAAgB;IACdxB,KAAK,EAAEsB,kBAAA,CAAUG,MADH;IAEdxB,QAAQ,EAAEqB,kBAAA,CAAUI,IAFN;IAGd3B,OAAO,EAAEuB,kBAAA,CAAUK,IAHL;IAIdzB,KAAK,EAAEoB,kBAAA,CAAUG,MAJH;IAKdtB,SAAS,EAAEmB,kBAAA,CAAUG;EALP,CAAhB,CADO,CADU;EAUnBlC,cAAc,EAAE+B,kBAAA,CAAUG;AAVP,CAArB;eAaetC,Q"}
1
+ {"version":3,"file":"index.js","names":["QCMImage","props","legacyContext","answers","groupAriaLabel","skin","GetSkinFromContext","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","checkboxId","boxShadow","getShadowBoxColorFromPrimary","style","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","classnames","innerHTML","hiddenCheckbox","wrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","bool","func"],"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../../atom/provider';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, legacyContext) => {\n const {answers, groupAriaLabel} = props;\n const skin = GetSkinFromContext(legacyContext);\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n const checkboxId = `checkbox-graphic-${key}`;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div title={title} className={classnames(style.title, style.innerHTML)}>\n <label htmlFor={checkboxId}>\n <input\n id={checkboxId}\n type=\"checkbox\"\n value={title}\n checked={selected}\n onChange={onClick}\n className={style.hiddenCheckbox}\n />\n {title}\n </label>\n </div>\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div\n data-name=\"qcm-graphic-wrapper\"\n className={style.wrapper}\n role=\"group\"\n aria-label={groupAriaLabel}\n >\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n ),\n groupAriaLabel: PropTypes.string\n};\n\nexport default QCMImage;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAACC,KAA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AAc,mBAAA,EAAWP,cAAA,CAAMP,KAAjB,EAAwBO,cAAA,CAAMQ,SAA9B;IAA9B,gBACE;MAAO,OAAO,EAAEX;IAAhB,gBACE;MACE,EAAE,EAAEA,UADN;MAEE,IAAI,EAAC,UAFP;MAGE,KAAK,EAAEJ,KAHT;MAIE,OAAO,EAAEC,QAJX;MAKE,QAAQ,EAAEF,OALZ;MAME,SAAS,EAAEQ,cAAA,CAAMS;IANnB,EADF,EASGhB,KATH,CADF,CADF,CATF,CAnBF,CADF;EA+CD,CAnDoB,CAArB;EAqDA,oBACE;IACE,aAAU,qBADZ;IAEE,SAAS,EAAEO,cAAA,CAAMU,OAFnB;IAGE,IAAI,EAAC,OAHP;IAIE,cAAY1B;EAJd,GAMGI,YANH,CADF;AAUD,CApED;;AAsEAR,QAAQ,CAAC+B,YAAT,GAAwB;EACtB1B,IAAI,EAAE2B,iBAAA,CAASC,iBAAT,CAA2B5B;AADX,CAAxB;AAIAL,QAAQ,CAACkC,SAAT,2CAAqB;EACnB/B,OAAO,EAAEgC,kBAAA,CAAUC,OAAV,CACPD,kBAAA,CAAUE,KAAV,CAAgB;IACdxB,KAAK,EAAEsB,kBAAA,CAAUG,MADH;IAEdxB,QAAQ,EAAEqB,kBAAA,CAAUI,IAFN;IAGd3B,OAAO,EAAEuB,kBAAA,CAAUK,IAHL;IAIdzB,KAAK,EAAEoB,kBAAA,CAAUG,MAJH;IAKdtB,SAAS,EAAEmB,kBAAA,CAAUG;EALP,CAAhB,CADO,CADU;EAUnBlC,cAAc,EAAE+B,kBAAA,CAAUG;AAVP,CAArB;eAaetC,Q"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/qr-code-scanner/index.native.tsx"],"names":[],"mappings":";AAQA,MAAM,WAAW,KAAK;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAyPD,QAAA,MAAM,aAAa,UAAW,KAAK,gBAkDlC,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/template/mobile-login/qr-code-scanner/index.native.tsx"],"names":[],"mappings":";AASA,MAAM,WAAW,KAAK;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAyPD,QAAA,MAAM,aAAa,UAAW,KAAK,gBAkDlC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -13,6 +13,8 @@ var _novaIcons = require("@coorpacademy/nova-icons");
13
13
 
14
14
  var _index = _interopRequireDefault(require("../../../hoc/touchable/index.native"));
15
15
 
16
+ var _index2 = _interopRequireDefault(require("../../../atom/text/index.native"));
17
+
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -120,13 +122,13 @@ const explanationsStyle = _reactNative.StyleSheet.create({
120
122
  explanations: {
121
123
  position: 'absolute',
122
124
  width: '100%',
123
- height: 260,
124
125
  bottom: 0,
125
126
  backgroundColor: '#fff',
126
127
  borderTopLeftRadius: 30,
127
128
  borderTopRightRadius: 30,
128
129
  paddingHorizontal: 24,
129
- paddingVertical: 8
130
+ paddingTop: 8,
131
+ paddingBottom: 30
130
132
  },
131
133
  titleWrapper: {
132
134
  flexDirection: 'row',
@@ -143,9 +145,9 @@ const explanationsStyle = _reactNative.StyleSheet.create({
143
145
  fontWeight: '600',
144
146
  color: '#1D1D2B',
145
147
  fontSize: 21,
146
- lineHeight: 30,
148
+ lineHeight: 24,
147
149
  letterSpacing: 0.5,
148
- marginLeft: 5
150
+ marginLeft: 7
149
151
  },
150
152
  line: {
151
153
  flexDirection: 'row',
@@ -286,26 +288,26 @@ const Explanations = props => {
286
288
  style: explanationsStyle.titleWrapper
287
289
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyQrCode, {
288
290
  style: explanationsStyle.qrCodeIcon
289
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
291
+ }), /*#__PURE__*/_react.default.createElement(_index2.default, {
290
292
  style: explanationsStyle.titleText
291
293
  }, locales.title)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
292
294
  style: explanationsStyle.line
293
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
295
+ }, /*#__PURE__*/_react.default.createElement(_index2.default, {
294
296
  style: explanationsStyle.lineText
295
- }, "1."), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
297
+ }, "1."), /*#__PURE__*/_react.default.createElement(_index2.default, {
296
298
  style: explanationsStyle.lineText
297
299
  }, locales.explanation1)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
298
300
  style: explanationsStyle.line
299
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
301
+ }, /*#__PURE__*/_react.default.createElement(_index2.default, {
300
302
  style: explanationsStyle.lineText
301
- }, "2."), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
303
+ }, "2."), /*#__PURE__*/_react.default.createElement(_index2.default, {
302
304
  style: explanationsStyle.lineText
303
305
  }, locales.explanation2)), /*#__PURE__*/_react.default.createElement(_index.default, {
304
306
  onPress: onHelpPress,
305
307
  style: explanationsStyle.help
306
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
308
+ }, /*#__PURE__*/_react.default.createElement(_index2.default, {
307
309
  style: explanationsStyle.titleHelp
308
- }, locales.titleHelp), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
310
+ }, locales.titleHelp), /*#__PURE__*/_react.default.createElement(_index2.default, {
309
311
  style: explanationsStyle.ctaHelp
310
312
  }, locales.ctaHelp)));
311
313
  };