@coorpacademy/components 11.2.7-alpha.3 → 11.2.8-alpha.3

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 (133) hide show
  1. package/es/atom/html/index.native.d.ts.map +1 -1
  2. package/es/atom/html/index.native.js +3 -3
  3. package/es/atom/html/index.native.js.map +1 -1
  4. package/es/atom/review-presentation/index.d.ts.map +1 -1
  5. package/es/atom/review-presentation/index.js +5 -9
  6. package/es/atom/review-presentation/index.js.map +1 -1
  7. package/es/atom/review-presentation/index.native.js.map +1 -1
  8. package/es/atom/review-presentation/prop-types.d.ts +9 -11
  9. package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
  10. package/es/atom/review-presentation/prop-types.js +1 -2
  11. package/es/atom/review-presentation/prop-types.js.map +1 -1
  12. package/es/atom/select-modal/index.native.d.ts +1 -1
  13. package/es/atom/select-modal/index.native.d.ts.map +1 -1
  14. package/es/atom/select-modal/index.native.js +5 -2
  15. package/es/atom/select-modal/index.native.js.map +1 -1
  16. package/es/molecule/filters/index.d.ts +2 -0
  17. package/es/molecule/filters/index.d.ts.map +1 -1
  18. package/es/molecule/filters/index.js +10 -4
  19. package/es/molecule/filters/index.js.map +1 -1
  20. package/es/molecule/questions/mobile/template/index.native.d.ts.map +1 -1
  21. package/es/molecule/questions/mobile/template/index.native.js +0 -13
  22. package/es/molecule/questions/mobile/template/index.native.js.map +1 -1
  23. package/es/molecule/review-correction-popin/index.native.d.ts.map +1 -1
  24. package/es/molecule/review-correction-popin/index.native.js +4 -3
  25. package/es/molecule/review-correction-popin/index.native.js.map +1 -1
  26. package/es/organism/mooc-footer/index.d.ts +1 -0
  27. package/es/organism/mooc-footer/index.d.ts.map +1 -1
  28. package/es/organism/mooc-footer/index.js +3 -1
  29. package/es/organism/mooc-footer/index.js.map +1 -1
  30. package/es/organism/mooc-header/index.d.ts.map +1 -1
  31. package/es/organism/mooc-header/index.js +4 -3
  32. package/es/organism/mooc-header/index.js.map +1 -1
  33. package/es/organism/review-congrats/index.native.d.ts.map +1 -1
  34. package/es/organism/review-congrats/index.native.js +6 -5
  35. package/es/organism/review-congrats/index.native.js.map +1 -1
  36. package/es/organism/review-slide/index.native.d.ts.map +1 -1
  37. package/es/organism/review-slide/index.native.js +3 -1
  38. package/es/organism/review-slide/index.native.js.map +1 -1
  39. package/es/organism/review-stacked-slides/index.native.d.ts +0 -1
  40. package/es/organism/review-stacked-slides/index.native.d.ts.map +1 -1
  41. package/es/organism/review-stacked-slides/index.native.js +37 -32
  42. package/es/organism/review-stacked-slides/index.native.js.map +1 -1
  43. package/es/organism/user-preferences/index.d.ts +1 -0
  44. package/es/organism/user-preferences/index.d.ts.map +1 -1
  45. package/es/organism/user-preferences/index.js +11 -6
  46. package/es/organism/user-preferences/index.js.map +1 -1
  47. package/es/template/activity/index.d.ts +2 -0
  48. package/es/template/activity/index.d.ts.map +1 -1
  49. package/es/template/activity/index.js +4 -1
  50. package/es/template/activity/index.js.map +1 -1
  51. package/es/template/activity/progression-item.d.ts +1 -0
  52. package/es/template/activity/progression-item.d.ts.map +1 -1
  53. package/es/template/activity/progression-item.js +5 -2
  54. package/es/template/activity/progression-item.js.map +1 -1
  55. package/es/template/activity/stars-summary.css +2 -0
  56. package/es/template/activity/stars-summary.js +2 -2
  57. package/es/template/activity/stars-summary.js.map +1 -1
  58. package/es/template/app-review/index.d.ts +0 -4
  59. package/es/template/app-review/index.d.ts.map +1 -1
  60. package/es/template/app-review/prop-types.d.ts +0 -4
  61. package/es/template/app-review/prop-types.d.ts.map +1 -1
  62. package/es/template/common/search-page/index.d.ts +4 -0
  63. package/es/template/common/search-page/index.d.ts.map +1 -1
  64. package/es/template/common/search-page/index.js +10 -3
  65. package/es/template/common/search-page/index.js.map +1 -1
  66. package/es/template/review-dashboard-skills/index.d.ts +0 -4
  67. package/lib/atom/html/index.native.d.ts.map +1 -1
  68. package/lib/atom/html/index.native.js +2 -2
  69. package/lib/atom/html/index.native.js.map +1 -1
  70. package/lib/atom/review-presentation/index.d.ts.map +1 -1
  71. package/lib/atom/review-presentation/index.js +5 -9
  72. package/lib/atom/review-presentation/index.js.map +1 -1
  73. package/lib/atom/review-presentation/index.native.js.map +1 -1
  74. package/lib/atom/review-presentation/prop-types.d.ts +9 -11
  75. package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
  76. package/lib/atom/review-presentation/prop-types.js +1 -2
  77. package/lib/atom/review-presentation/prop-types.js.map +1 -1
  78. package/lib/atom/select-modal/index.native.d.ts +1 -1
  79. package/lib/atom/select-modal/index.native.d.ts.map +1 -1
  80. package/lib/atom/select-modal/index.native.js +5 -2
  81. package/lib/atom/select-modal/index.native.js.map +1 -1
  82. package/lib/molecule/filters/index.d.ts +2 -0
  83. package/lib/molecule/filters/index.d.ts.map +1 -1
  84. package/lib/molecule/filters/index.js +10 -4
  85. package/lib/molecule/filters/index.js.map +1 -1
  86. package/lib/molecule/questions/mobile/template/index.native.d.ts.map +1 -1
  87. package/lib/molecule/questions/mobile/template/index.native.js +0 -13
  88. package/lib/molecule/questions/mobile/template/index.native.js.map +1 -1
  89. package/lib/molecule/review-correction-popin/index.native.d.ts.map +1 -1
  90. package/lib/molecule/review-correction-popin/index.native.js +4 -3
  91. package/lib/molecule/review-correction-popin/index.native.js.map +1 -1
  92. package/lib/organism/mooc-footer/index.d.ts +1 -0
  93. package/lib/organism/mooc-footer/index.d.ts.map +1 -1
  94. package/lib/organism/mooc-footer/index.js +3 -1
  95. package/lib/organism/mooc-footer/index.js.map +1 -1
  96. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  97. package/lib/organism/mooc-header/index.js +4 -3
  98. package/lib/organism/mooc-header/index.js.map +1 -1
  99. package/lib/organism/review-congrats/index.native.d.ts.map +1 -1
  100. package/lib/organism/review-congrats/index.native.js +6 -5
  101. package/lib/organism/review-congrats/index.native.js.map +1 -1
  102. package/lib/organism/review-slide/index.native.d.ts.map +1 -1
  103. package/lib/organism/review-slide/index.native.js +3 -1
  104. package/lib/organism/review-slide/index.native.js.map +1 -1
  105. package/lib/organism/review-stacked-slides/index.native.d.ts +0 -1
  106. package/lib/organism/review-stacked-slides/index.native.d.ts.map +1 -1
  107. package/lib/organism/review-stacked-slides/index.native.js +38 -34
  108. package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
  109. package/lib/organism/user-preferences/index.d.ts +1 -0
  110. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  111. package/lib/organism/user-preferences/index.js +11 -6
  112. package/lib/organism/user-preferences/index.js.map +1 -1
  113. package/lib/template/activity/index.d.ts +2 -0
  114. package/lib/template/activity/index.d.ts.map +1 -1
  115. package/lib/template/activity/index.js +4 -1
  116. package/lib/template/activity/index.js.map +1 -1
  117. package/lib/template/activity/progression-item.d.ts +1 -0
  118. package/lib/template/activity/progression-item.d.ts.map +1 -1
  119. package/lib/template/activity/progression-item.js +5 -2
  120. package/lib/template/activity/progression-item.js.map +1 -1
  121. package/lib/template/activity/stars-summary.css +2 -0
  122. package/lib/template/activity/stars-summary.js +2 -2
  123. package/lib/template/activity/stars-summary.js.map +1 -1
  124. package/lib/template/app-review/index.d.ts +0 -4
  125. package/lib/template/app-review/index.d.ts.map +1 -1
  126. package/lib/template/app-review/prop-types.d.ts +0 -4
  127. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  128. package/lib/template/common/search-page/index.d.ts +4 -0
  129. package/lib/template/common/search-page/index.d.ts.map +1 -1
  130. package/lib/template/common/search-page/index.js +10 -3
  131. package/lib/template/common/search-page/index.js.map +1 -1
  132. package/lib/template/review-dashboard-skills/index.d.ts +0 -4
  133. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
- import { GestureResponderEvent } from 'react-native';
3
+ import { ColorValue, GestureResponderEvent, ViewStyle } from 'react-native';
3
4
  declare const propTypes: {
4
5
  'aria-label': PropTypes.Requireable<string>;
5
6
  reviewTitle: PropTypes.Requireable<string>;
@@ -8,22 +9,18 @@ declare const propTypes: {
8
9
  skills: PropTypes.Requireable<PropTypes.InferProps<{
9
10
  text: PropTypes.Requireable<string>;
10
11
  tooltipText: PropTypes.Requireable<string>;
11
- moreDetailsAreaLabel: PropTypes.Requireable<string>;
12
12
  }>>;
13
13
  questions: PropTypes.Requireable<PropTypes.InferProps<{
14
14
  text: PropTypes.Requireable<string>;
15
15
  tooltipText: PropTypes.Requireable<string>;
16
- moreDetailsAreaLabel: PropTypes.Requireable<string>;
17
16
  }>>;
18
17
  lifes: PropTypes.Requireable<PropTypes.InferProps<{
19
18
  text: PropTypes.Requireable<string>;
20
19
  tooltipText: PropTypes.Requireable<string>;
21
- moreDetailsAreaLabel: PropTypes.Requireable<string>;
22
20
  }>>;
23
21
  allright: PropTypes.Requireable<PropTypes.InferProps<{
24
22
  text: PropTypes.Requireable<string>;
25
23
  tooltipText: PropTypes.Requireable<string>;
26
- moreDetailsAreaLabel: PropTypes.Requireable<string>;
27
24
  }>>;
28
25
  }>>;
29
26
  };
@@ -43,28 +40,29 @@ export declare type OnboardingProps = {
43
40
  skills?: {
44
41
  text?: string | undefined;
45
42
  tooltipText?: string | undefined;
46
- 'aria-label'?: string | undefined;
47
43
  } | undefined;
48
44
  questions?: {
49
45
  text?: string | undefined;
50
46
  tooltipText?: string | undefined;
51
- 'aria-label'?: string | undefined;
52
47
  };
53
48
  lifes?: {
54
49
  text?: string | undefined;
55
50
  tooltipText?: string | undefined;
56
- 'aria-label'?: string | undefined;
57
51
  } | undefined;
58
52
  allright?: {
59
53
  text?: string | undefined;
60
54
  tooltipText?: string | undefined;
61
- 'aria-label'?: string | undefined;
62
55
  } | undefined;
63
56
  };
64
- onPress: (event: GestureResponderEvent) => any;
57
+ onPress: (event: GestureResponderEvent) => void;
65
58
  };
66
59
  export declare type TipProps = {
67
60
  text: string | undefined;
68
- Icon: any;
61
+ Icon: React.FC<{
62
+ height: number;
63
+ width: number;
64
+ style: ViewStyle;
65
+ color: ColorValue;
66
+ }>;
69
67
  };
70
68
  //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAQnD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;CAUd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EACH;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,SAAS,CAAC,EAAE;YACV,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,CAAC;QACF,KAAK,CAAC,EACF;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACnC,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,EACL;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAA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AAG,SAAS,CAAC;SAClC,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,EACL;YACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAClC,GACD,SAAS,CAAC;KACf,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAC,CAAC,CAAC;CACtF,CAAC"}
@@ -9,8 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
9
9
 
10
10
  const levelItem = _propTypes.default.shape({
11
11
  text: _propTypes.default.string,
12
- tooltipText: _propTypes.default.string,
13
- moreDetailsAreaLabel: _propTypes.default.string
12
+ tooltipText: _propTypes.default.string
14
13
  });
15
14
 
16
15
  const propTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","moreDetailsAreaLabel","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {GestureResponderEvent} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string,\n moreDetailsAreaLabel: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n 'aria-label'?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => any;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: any;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG,MAFS;EAGhCE,oBAAoB,EAAEL,kBAAA,CAAUG;AAHA,CAAhB,CAAlB;;AAMA,MAAMG,SAAS,GAAG;EAChB,cAAcN,kBAAA,CAAUG,MADR;EAEhBI,WAAW,EAAEP,kBAAA,CAAUG,MAFP;EAGhBK,UAAU,EAAER,kBAAA,CAAUG,MAHN;EAIhBM,UAAU,EAAET,kBAAA,CAAUC,KAAV,CAAgB;IAC1BS,MAAM,EAAEX,SADkB;IAE1BY,SAAS,EAAEZ,SAFe;IAG1Ba,KAAK,EAAEb,SAHmB;IAI1Bc,QAAQ,EAAEd;EAJgB,CAAhB;AAJI,CAAlB;eAYeO,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEf,kBAAA,CAAUgB;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3Bf,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3Be,IAAI,EAAElB,kBAAA,CAAUmB;AAFW,CAAtB"}
1
+ {"version":3,"file":"prop-types.js","names":["levelItem","PropTypes","shape","text","string","tooltipText","propTypes","reviewTitle","reviewText","labelsList","skills","questions","lifes","allright","OnboardingPropsTypes","onPress","func","TipPropsTypes","Icon","any"],"sources":["../../../src/atom/review-presentation/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ColorValue, GestureResponderEvent, ViewStyle} from 'react-native';\n\nconst levelItem = PropTypes.shape({\n text: PropTypes.string,\n tooltipText: PropTypes.string\n});\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n reviewTitle: PropTypes.string,\n reviewText: PropTypes.string,\n labelsList: PropTypes.shape({\n skills: levelItem,\n questions: levelItem,\n lifes: levelItem,\n allright: levelItem\n })\n};\n\nexport default propTypes;\n\nexport const OnboardingPropsTypes = {\n onPress: PropTypes.func\n};\n\nexport const TipPropsTypes = {\n text: PropTypes.string,\n Icon: PropTypes.any\n};\n\nexport type OnboardingProps = {\n 'aria-label'?: string | undefined;\n reviewTitle?: string | undefined;\n reviewText?: string | undefined;\n labelsList?: {\n skills?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n questions?: {\n text?: string | undefined;\n tooltipText?: string | undefined;\n };\n lifes?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n allright?:\n | {\n text?: string | undefined;\n tooltipText?: string | undefined;\n }\n | undefined;\n };\n onPress: (event: GestureResponderEvent) => void;\n};\n\nexport type TipProps = {\n text: string | undefined;\n Icon: React.FC<{height: number; width: number; style: ViewStyle; color: ColorValue}>;\n};\n"],"mappings":";;;;;AAAA;;;;AAGA,MAAMA,SAAS,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAChCC,IAAI,EAAEF,kBAAA,CAAUG,MADgB;EAEhCC,WAAW,EAAEJ,kBAAA,CAAUG;AAFS,CAAhB,CAAlB;;AAKA,MAAME,SAAS,GAAG;EAChB,cAAcL,kBAAA,CAAUG,MADR;EAEhBG,WAAW,EAAEN,kBAAA,CAAUG,MAFP;EAGhBI,UAAU,EAAEP,kBAAA,CAAUG,MAHN;EAIhBK,UAAU,EAAER,kBAAA,CAAUC,KAAV,CAAgB;IAC1BQ,MAAM,EAAEV,SADkB;IAE1BW,SAAS,EAAEX,SAFe;IAG1BY,KAAK,EAAEZ,SAHmB;IAI1Ba,QAAQ,EAAEb;EAJgB,CAAhB;AAJI,CAAlB;eAYeM,S;;AAER,MAAMQ,oBAAoB,GAAG;EAClCC,OAAO,EAAEd,kBAAA,CAAUe;AADe,CAA7B;;AAIA,MAAMC,aAAa,GAAG;EAC3Bd,IAAI,EAAEF,kBAAA,CAAUG,MADW;EAE3Bc,IAAI,EAAEjB,kBAAA,CAAUkB;AAFW,CAAtB"}
@@ -6,6 +6,7 @@ export declare type ChoiceItem = {
6
6
  text: string;
7
7
  selected: boolean;
8
8
  _id: string;
9
+ value: string;
9
10
  };
10
11
  export declare type Props = {
11
12
  analyticsID: string;
@@ -15,7 +16,6 @@ export declare type Props = {
15
16
  values: Array<ChoiceItem>;
16
17
  value?: string;
17
18
  placeholder?: string;
18
- color?: string;
19
19
  onChange: OnChangeFunction;
20
20
  onFocus: () => void;
21
21
  onBlur: () => void;
@@ -1 +1 @@
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;CACb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AAU,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"}
@@ -53,6 +53,7 @@ const logEvent = (eventName, analyticsID, analytics, questionType) => {
53
53
  const Select = props => {
54
54
  const templateContext = (0, _templateContext.useTemplateContext)();
55
55
  const {
56
+ brandTheme,
56
57
  theme,
57
58
  analytics
58
59
  } = templateContext;
@@ -72,7 +73,6 @@ const Select = props => {
72
73
  value,
73
74
  style,
74
75
  textStyle,
75
- color,
76
76
  questionType,
77
77
  isFocused = false,
78
78
  isDisabled = false,
@@ -105,7 +105,10 @@ const Select = props => {
105
105
  textStyles = [styleSheet.text, ...textStyle];
106
106
  }
107
107
 
108
- if (color) {
108
+ let color;
109
+
110
+ if ((selectedItem?.value?.length || 0) > 0) {
111
+ color = brandTheme?.colors?.primary;
109
112
  textStyles.push({
110
113
  color
111
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","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","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};\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 color?: 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 {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 color,\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 if (color) {\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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EuB,MAAO;EAJpB,gBAME,6BAAC,iBAAD;IAAM,KAAK,EAAE,CAACf,UAAU,CAACpB,SAAZ,EAAuB+B,KAAvB;EAAb,gBACE,6BAAC,eAAD;IAAM,KAAK,EAAEiB;EAAb,GAA0B7C,IAA1B,CADF,eAEE,6BAAC,eAAD;IAAO,IAAI,EAAC;EAAZ,EAFF,eAGE,6BAAC,6CAAD;IACE,KAAK,EAAEE,KAAK,IAAIR,KAAK,CAACS,MAAN,CAAaC,IAAb,CAAkB2C,IADpC;IAEE,MAAM,EAAEvD,UAFV;IAGE,KAAK,EAAEA;EAHT,EAHF,CANF,CADF,eAiBE,6BAAC,yBAAD;IACE,SAAS,EAAEsC,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,CAlGD;;eAoGenB,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","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,EA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EzB,WAHf;IAIE,MAAM,EAAG,GAAEwB,MAAO;EAJpB,gBAME,6BAAC,iBAAD;IAAM,KAAK,EAAE,CAACf,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"}
@@ -35,6 +35,8 @@ declare class Filters extends React.Component<any, any, any> {
35
35
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
36
36
  onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
37
37
  onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
38
+ moreSortAriaLabel: PropTypes.Requireable<string>;
39
+ moreFilterAriaLabel: PropTypes.Requireable<string>;
38
40
  };
39
41
  static contextTypes: {
40
42
  skin: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBA8EC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
@@ -84,7 +84,9 @@ class Filters extends _react.default.Component {
84
84
  filterTabLabel,
85
85
  sortCTALabel,
86
86
  sortTabLabel,
87
- filters
87
+ filters,
88
+ moreFilterAriaLabel,
89
+ moreSortAriaLabel
88
90
  } = this.props;
89
91
  const {
90
92
  filter,
@@ -116,7 +118,8 @@ class Filters extends _react.default.Component {
116
118
  className: _style.default.arrow
117
119
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
118
120
  color: darkColor,
119
- height: 14
121
+ height: 14,
122
+ "aria-label": moreFilterAriaLabel
120
123
  })))), /*#__PURE__*/_react.default.createElement("div", {
121
124
  "data-name": "sortBy",
122
125
  "data-open": sortingActive,
@@ -129,7 +132,8 @@ class Filters extends _react.default.Component {
129
132
  className: _style.default.arrow
130
133
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
131
134
  color: darkColor,
132
- height: 14
135
+ height: 14,
136
+ "aria-label": moreSortAriaLabel
133
137
  })))), /*#__PURE__*/_react.default.createElement("div", {
134
138
  "data-name": "filterWrapper",
135
139
  className: filtersActive ? _style.default.activeWrapperFilters : _style.default.wrapperFilters
@@ -172,7 +176,9 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
172
176
  sorting: _propTypes.default.shape(_select.default.propTypes),
173
177
  onSearch: _propTypes.default.func,
174
178
  onToggleFilters: _propTypes.default.func,
175
- onToggleSorts: _propTypes.default.func
179
+ onToggleSorts: _propTypes.default.func,
180
+ moreSortAriaLabel: _propTypes.default.string,
181
+ moreFilterAriaLabel: _propTypes.default.string
176
182
  } : {};
177
183
  var _default = Filters;
178
184
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Filters","React","Component","constructor","props","state","filter","openFilters","sorted","openSorts","handleOpenFilter","bind","handleOpenSort","handleSearch","onToggleFilters","newValue","setState","onToggleSorts","onSearch","render","sorting","filterCTALabel","filterTabLabel","sortCTALabel","sortTabLabel","filters","skin","context","defaultColor","darkColor","filtersActive","sortingActive","sortView","undefined","style","select","search","activeDefault","default","title","arrow","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","FiltersWrapper","shape","Select","func"],"sources":["../../../src/molecule/filters/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Select from '../../atom/select';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\nimport FiltersWrapper from './filters-wrapper';\n\nclass Filters extends React.Component {\n static propTypes = {\n filterCTALabel: PropTypes.string,\n filterTabLabel: PropTypes.string,\n sortCTALabel: PropTypes.string,\n sortTabLabel: PropTypes.string,\n openFilters: PropTypes.bool,\n openSorts: PropTypes.bool,\n filters: FiltersWrapper.propTypes.filters,\n sorting: PropTypes.shape(Select.propTypes),\n onSearch: PropTypes.func,\n onToggleFilters: PropTypes.func,\n onToggleSorts: PropTypes.func\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n filter: !!props.openFilters,\n sorted: !!props.openSorts\n };\n this.handleOpenFilter = this.handleOpenFilter.bind(this);\n this.handleOpenSort = this.handleOpenSort.bind(this);\n this.handleSearch = this.handleSearch.bind(this);\n }\n\n handleOpenFilter() {\n const {filter} = this.state;\n const {onToggleFilters} = this.props;\n\n const newValue = !filter;\n\n this.setState({\n filter: newValue,\n sorted: false\n });\n\n if (onToggleFilters) {\n onToggleFilters(newValue);\n }\n }\n\n handleOpenSort() {\n const {sorted} = this.state;\n const {onToggleSorts} = this.props;\n\n const newValue = !sorted;\n\n this.setState({\n sorted: newValue,\n filter: false\n });\n\n if (onToggleSorts) onToggleSorts(newValue);\n }\n\n handleSearch() {\n const {onSearch} = this.props;\n this.setState({\n sorted: false,\n filter: false\n });\n if (onSearch) onSearch();\n }\n\n render() {\n const {sorting, filterCTALabel, filterTabLabel, sortCTALabel, sortTabLabel, filters} =\n this.props;\n const {filter, sorted} = this.state;\n const {skin} = this.context;\n\n const defaultColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const filtersActive = filter === true;\n const sortingActive = sorted === true;\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\" className={style.select}>\n <Select {...sorting} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"search\" className={style.search}>\n <div\n data-name=\"filter\"\n data-open={filtersActive}\n className={filtersActive ? style.activeDefault : style.default}\n >\n <div className={style.title} data-name=\"filterButton\" onClick={this.handleOpenFilter}>\n {filterTabLabel}\n <div className={style.arrow}>\n <ArrowDown color={darkColor} height={14} />\n </div>\n </div>\n </div>\n <div\n data-name=\"sortBy\"\n data-open={sortingActive}\n className={sortingActive ? style.activeWrapperSortBy : style.wrapperSortBy}\n >\n <div className={style.title} data-name=\"sortButton\" onClick={this.handleOpenSort}>\n {sortTabLabel}\n <div className={style.arrow}>\n <ArrowDown color={darkColor} height={14} />\n </div>\n </div>\n </div>\n <div\n data-name=\"filterWrapper\"\n className={filtersActive ? style.activeWrapperFilters : style.wrapperFilters}\n >\n <FiltersWrapper className={style.wrapper} filters={filters} />\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {filterCTALabel}\n </div>\n </div>\n <div\n data-name=\"sortWrapper\"\n className={sortingActive ? style.activeSorting : style.sorting}\n >\n {sortView}\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {sortCTALabel}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default Filters;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAN,SAAsBC,cAAA,CAAMC,SAA5B,CAAsC;EAmBpCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,GAAa;MACXC,MAAM,EAAE,CAAC,CAACF,KAAK,CAACG,WADL;MAEXC,MAAM,EAAE,CAAC,CAACJ,KAAK,CAACK;IAFL,CAAb;IAIA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBC,IAAtB,CAA2B,IAA3B,CAAxB;IACA,KAAKC,cAAL,GAAsB,KAAKA,cAAL,CAAoBD,IAApB,CAAyB,IAAzB,CAAtB;IACA,KAAKE,YAAL,GAAoB,KAAKA,YAAL,CAAkBF,IAAlB,CAAuB,IAAvB,CAApB;EACD;;EAEDD,gBAAgB,GAAG;IACjB,MAAM;MAACJ;IAAD,IAAW,KAAKD,KAAtB;IACA,MAAM;MAACS;IAAD,IAAoB,KAAKV,KAA/B;IAEA,MAAMW,QAAQ,GAAG,CAACT,MAAlB;IAEA,KAAKU,QAAL,CAAc;MACZV,MAAM,EAAES,QADI;MAEZP,MAAM,EAAE;IAFI,CAAd;;IAKA,IAAIM,eAAJ,EAAqB;MACnBA,eAAe,CAACC,QAAD,CAAf;IACD;EACF;;EAEDH,cAAc,GAAG;IACf,MAAM;MAACJ;IAAD,IAAW,KAAKH,KAAtB;IACA,MAAM;MAACY;IAAD,IAAkB,KAAKb,KAA7B;IAEA,MAAMW,QAAQ,GAAG,CAACP,MAAlB;IAEA,KA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Ae;EACpBvB,IAAI,EAAEwB,iBAAA,CAASC,iBAAT,CAA2BzB;AADb,C;AAflB1B,O,CACGoD,S,2CAAY;EACjB/B,cAAc,EAAEgC,kBAAA,CAAUC,MADT;EAEjBhC,cAAc,EAAE+B,kBAAA,CAAUC,MAFT;EAGjB/B,YAAY,EAAE8B,kBAAA,CAAUC,MAHP;EAIjB9B,YAAY,EAAE6B,kBAAA,CAAUC,MAJP;EAKjB/C,WAAW,EAAE8C,kBAAA,CAAUE,IALN;EAMjB9C,SAAS,EAAE4C,kBAAA,CAAUE,IANJ;EAOjB9B,OAAO,EAAE+B,uBAAA,CAAeJ,SAAf,CAAyB3B,OAPjB;EAQjBL,OAAO,EAAEiC,kBAAA,CAAUI,KAAV,CAAgBC,eAAA,CAAON,SAAvB,CARQ;EASjBlC,QAAQ,EAAEmC,kBAAA,CAAUM,IATH;EAUjB7C,eAAe,EAAEuC,kBAAA,CAAUM,IAVV;EAWjB1C,aAAa,EAAEoC,kBAAA,CAAUM;AAXR,C;eAqJN3D,O"}
1
+ {"version":3,"file":"index.js","names":["Filters","React","Component","constructor","props","state","filter","openFilters","sorted","openSorts","handleOpenFilter","bind","handleOpenSort","handleSearch","onToggleFilters","newValue","setState","onToggleSorts","onSearch","render","sorting","filterCTALabel","filterTabLabel","sortCTALabel","sortTabLabel","filters","moreFilterAriaLabel","moreSortAriaLabel","skin","context","defaultColor","darkColor","filtersActive","sortingActive","sortView","undefined","style","select","search","activeDefault","default","title","arrow","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","bool","FiltersWrapper","shape","Select","func"],"sources":["../../../src/molecule/filters/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Select from '../../atom/select';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\nimport FiltersWrapper from './filters-wrapper';\n\nclass Filters extends React.Component {\n static propTypes = {\n filterCTALabel: PropTypes.string,\n filterTabLabel: PropTypes.string,\n sortCTALabel: PropTypes.string,\n sortTabLabel: PropTypes.string,\n openFilters: PropTypes.bool,\n openSorts: PropTypes.bool,\n filters: FiltersWrapper.propTypes.filters,\n sorting: PropTypes.shape(Select.propTypes),\n onSearch: PropTypes.func,\n onToggleFilters: PropTypes.func,\n onToggleSorts: PropTypes.func,\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n filter: !!props.openFilters,\n sorted: !!props.openSorts\n };\n this.handleOpenFilter = this.handleOpenFilter.bind(this);\n this.handleOpenSort = this.handleOpenSort.bind(this);\n this.handleSearch = this.handleSearch.bind(this);\n }\n\n handleOpenFilter() {\n const {filter} = this.state;\n const {onToggleFilters} = this.props;\n\n const newValue = !filter;\n\n this.setState({\n filter: newValue,\n sorted: false\n });\n\n if (onToggleFilters) {\n onToggleFilters(newValue);\n }\n }\n\n handleOpenSort() {\n const {sorted} = this.state;\n const {onToggleSorts} = this.props;\n\n const newValue = !sorted;\n\n this.setState({\n sorted: newValue,\n filter: false\n });\n\n if (onToggleSorts) onToggleSorts(newValue);\n }\n\n handleSearch() {\n const {onSearch} = this.props;\n this.setState({\n sorted: false,\n filter: false\n });\n if (onSearch) onSearch();\n }\n\n render() {\n const {\n sorting,\n filterCTALabel,\n filterTabLabel,\n sortCTALabel,\n sortTabLabel,\n filters,\n moreFilterAriaLabel,\n moreSortAriaLabel\n } = this.props;\n const {filter, sorted} = this.state;\n const {skin} = this.context;\n\n const defaultColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const filtersActive = filter === true;\n const sortingActive = sorted === true;\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\" className={style.select}>\n <Select {...sorting} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"search\" className={style.search}>\n <div\n data-name=\"filter\"\n data-open={filtersActive}\n className={filtersActive ? style.activeDefault : style.default}\n >\n <div className={style.title} data-name=\"filterButton\" onClick={this.handleOpenFilter}>\n {filterTabLabel}\n <div className={style.arrow}>\n <ArrowDown color={darkColor} height={14} aria-label={moreFilterAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"sortBy\"\n data-open={sortingActive}\n className={sortingActive ? style.activeWrapperSortBy : style.wrapperSortBy}\n >\n <div className={style.title} data-name=\"sortButton\" onClick={this.handleOpenSort}>\n {sortTabLabel}\n <div className={style.arrow}>\n <ArrowDown color={darkColor} height={14} aria-label={moreSortAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"filterWrapper\"\n className={filtersActive ? style.activeWrapperFilters : style.wrapperFilters}\n >\n <FiltersWrapper className={style.wrapper} filters={filters} />\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {filterCTALabel}\n </div>\n </div>\n <div\n data-name=\"sortWrapper\"\n className={sortingActive ? style.activeSorting : style.sorting}\n >\n {sortView}\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {sortCTALabel}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default Filters;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAN,SAAsBC,cAAA,CAAMC,SAA5B,CAAsC;EAqBpCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,GAAa;MACXC,MAAM,EAAE,CAAC,CAACF,KAAK,CAACG,WADL;MAEXC,MAAM,EAAE,CAAC,CAACJ,KAAK,CAACK;IAFL,CAAb;IAIA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBC,I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AAUM,IATH;EAUjB/C,eAAe,EAAEyC,kBAAA,CAAUM,IAVV;EAWjB5C,aAAa,EAAEsC,kBAAA,CAAUM,IAXR;EAYjBlC,iBAAiB,EAAE4B,kBAAA,CAAUC,MAZZ;EAajB9B,mBAAmB,EAAE6B,kBAAA,CAAUC;AAbd,C;eA+JNxD,O"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,kDAAkD,CAAC;AA+J1D,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;IAC3D,aAAa,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,uBA+CrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,kDAAkD,CAAC;AAoJ1D,oBAAY,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;IAC3D,aAAa,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,UAAW,KAAK,uBA+CrC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -80,15 +80,11 @@ const Item = props => {
80
80
  const templateContext = (0, _templateContext.useTemplateContext)();
81
81
  const {
82
82
  theme,
83
- brandTheme,
84
83
  translations
85
84
  } = templateContext;
86
85
  const inputNames = choices.map(choice => choice.name);
87
86
  const id = `question-part-${index + 1}`;
88
87
  const isFocused = focusedSelectId === id;
89
- const coloredText = brandTheme && {
90
- color: brandTheme.colors?.primary
91
- };
92
88
 
93
89
  if (part.type === 'answerField' && inputNames.includes(part.value)) {
94
90
  const choiceIndex = choices.findIndex(choice => choice.name === part.value);
@@ -121,17 +117,8 @@ const Item = props => {
121
117
  }
122
118
 
123
119
  const selectInputStyle = [styles.selectInput];
124
-
125
- if (coloredText && value) {
126
- selectInputStyle.push(coloredText);
127
- }
128
-
129
120
  const selectTextStyle = [styles.selectText];
130
121
 
131
- if (coloredText && value) {
132
- selectTextStyle.push(coloredText);
133
- }
134
-
135
122
  if (choice.type === 'select') {
136
123
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
137
124
  style: styles.spaced,
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","container","width","flexDirection","flexWrap","justifyContent","alignItems","spaced","paddingVertical","spacing","tiny","htmlText","color","colors","black","fontWeight","bold","lineHeight","selectInput","padding","borderRadius","radius","regular","minWidth","marginHorizontal","BOX_STYLE","backgroundColor","white","selectText","gray","medium","fontSize","textAlign","Item","props","part","index","isDisabled","focusedSelectId","choices","onInputChange","handleBlur","handleFocus","styles","templateContext","useTemplateContext","brandTheme","translations","inputNames","map","choice","name","id","isFocused","coloredText","primary","type","includes","value","choiceIndex","findIndex","disabledSuffix","selectedSuffix","handleInputChange","_item","_value","selectInputStyle","push","selectTextStyle","items","selectAnAnswer","trim","QuestionTemplate","template","styleSheet","setStylesheet","useState","useEffect","_stylesheet","parts","parseTemplateString"],"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {TextStyle, View, ViewStyle} from 'react-native';\n\nimport trim from 'lodash/fp/trim';\n\nimport Html from '../../../../atom/html/index.native';\nimport Select from '../../../../atom/select-modal/index.native';\nimport Space from '../../../../atom/space/index.native';\nimport type {TemplateListOfChoices, TemplateTextChoice} from '../../types';\nimport FreeText from '../../free-text/index.native';\nimport {\n FocusedSelectId,\n HandleBlur,\n HandleFocus,\n useTemplateContext\n} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\nimport parseTemplateString from '../../../../util/parse-template-string';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\ntype StyleSheetType = {\n container: ViewStyle;\n spaced: ViewStyle;\n htmlText: TextStyle;\n selectInput: ViewStyle;\n selectText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType => ({\n container: {\n width: '100%',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignItems: 'center'\n },\n spaced: {\n paddingVertical: theme.spacing.tiny\n },\n htmlText: {\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 25\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n selectInput: {\n padding: theme.spacing.tiny,\n borderRadius: theme.radius.regular,\n minWidth: 175,\n marginHorizontal: 12,\n paddingVertical: 16,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n selectText: {\n color: theme.colors.gray.medium,\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.regular,\n textAlign: 'center'\n }\n});\n\ntype TemplatePart = {\n type: 'string' | 'answerField';\n value: string;\n};\n\ntype ItemProps = {\n part: TemplatePart;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n isDisabled?: boolean;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: StyleSheetType;\n};\n\nconst Item = (props: ItemProps) => {\n const {\n part,\n index,\n isDisabled = false,\n focusedSelectId,\n choices,\n onInputChange,\n handleBlur,\n handleFocus,\n styles\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme, brandTheme, translations} = templateContext;\n\n const inputNames = choices.map(choice => choice.name);\n const id = `question-part-${index + 1}`;\n const isFocused = focusedSelectId === id;\n\n const coloredText = brandTheme && {\n color: brandTheme.colors?.primary\n };\n\n if (part.type === 'answerField' && inputNames.includes(part.value)) {\n const choiceIndex = choices.findIndex(choice => choice.name === part.value);\n const choice = choices[choiceIndex];\n const {value} = choice;\n\n if (!choice || !choice.type || !choice.name) {\n return null;\n }\n\n const disabledSuffix = isDisabled ? '-disabled' : '';\n const selectedSuffix = value ? '-selected' : '';\n\n const handleInputChange =\n (_item: TemplateTextChoice | TemplateListOfChoices) => (_value: string) =>\n onInputChange(_item, _value);\n\n if (choice.type === 'text') {\n return (\n <View style={styles.spaced} testID={id}>\n <FreeText\n key={id}\n isDisabled={isDisabled}\n onChange={handleInputChange(choice)}\n value={value}\n testID={`${id}-text${selectedSuffix}${disabledSuffix}`}\n questionType=\"template\"\n />\n </View>\n );\n }\n\n const selectInputStyle: TextStyle[] = [styles.selectInput];\n if (coloredText && value) {\n selectInputStyle.push(coloredText);\n }\n\n const selectTextStyle: TextStyle[] = [styles.selectText];\n if (coloredText && value) {\n selectTextStyle.push(coloredText);\n }\n\n if (choice.type === 'select') {\n return (\n <View style={styles.spaced} testID={id}>\n <Select\n isDisabled={isDisabled}\n questionType=\"template\"\n values={choice.items}\n value={value}\n placeholder={translations.selectAnAnswer}\n isFocused={isFocused}\n onBlur={handleBlur}\n onFocus={handleFocus(id)}\n onChange={handleInputChange(choice)}\n textStyle={selectTextStyle}\n style={selectInputStyle}\n analyticsID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n testID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n />\n </View>\n );\n }\n }\n\n return (\n <Html key={id} fontSize={theme.fontSize.regular} testID={id} style={styles.htmlText}>\n {trim(part.value || '')}\n </Html>\n );\n};\n\nexport type Props = {\n isDisabled?: boolean;\n template: string;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n};\n\nconst QuestionTemplate = (props: Props) => {\n const {\n template,\n onInputChange,\n choices,\n handleBlur,\n handleFocus,\n focusedSelectId,\n isDisabled = false\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!template || !styleSheet) {\n return null;\n }\n\n const parts: TemplatePart[] = parseTemplateString(template);\n\n return (\n <View style={styleSheet.container} testID=\"question-template\">\n {parts.map((part, id) => (\n <View key={`question-part-${id}`} style={{flexDirection: 'row'}}>\n <Item\n part={part}\n choices={choices}\n index={id}\n focusedSelectId={focusedSelectId}\n isDisabled={isDisabled}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n onInputChange={onInputChange}\n styles={styleSheet}\n />\n <Space type=\"micro\" />\n </View>\n ))}\n </View>\n );\n};\n\nexport default QuestionTemplate;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAOA;;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,EAAEC,WAPf;IAQE,aAAa,EAAEF,aARjB;IASE,MAAM,EAAEkC;EATV,EADF,eAYE,6BAAC,eAAD;IAAO,IAAI,EAAC;EAAZ,EAZF,CADD,CADH,CADF;AAoBD,CA/CD;;eAiDeF,gB"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","container","width","flexDirection","flexWrap","justifyContent","alignItems","spaced","paddingVertical","spacing","tiny","htmlText","color","colors","black","fontWeight","bold","lineHeight","selectInput","padding","borderRadius","radius","regular","minWidth","marginHorizontal","BOX_STYLE","backgroundColor","white","selectText","gray","medium","fontSize","textAlign","Item","props","part","index","isDisabled","focusedSelectId","choices","onInputChange","handleBlur","handleFocus","styles","templateContext","useTemplateContext","translations","inputNames","map","choice","name","id","isFocused","type","includes","value","choiceIndex","findIndex","disabledSuffix","selectedSuffix","handleInputChange","_item","_value","selectInputStyle","selectTextStyle","items","selectAnAnswer","trim","QuestionTemplate","template","styleSheet","setStylesheet","useState","useEffect","_stylesheet","parts","parseTemplateString"],"sources":["../../../../../src/molecule/questions/mobile/template/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {TextStyle, View, ViewStyle} from 'react-native';\n\nimport trim from 'lodash/fp/trim';\n\nimport Html from '../../../../atom/html/index.native';\nimport Select from '../../../../atom/select-modal/index.native';\nimport Space from '../../../../atom/space/index.native';\nimport type {TemplateListOfChoices, TemplateTextChoice} from '../../types';\nimport FreeText from '../../free-text/index.native';\nimport {\n FocusedSelectId,\n HandleBlur,\n HandleFocus,\n useTemplateContext\n} from '../../../../template/app-review/template-context';\nimport {Theme} from '../../../../variables/theme.native';\nimport parseTemplateString from '../../../../util/parse-template-string';\nimport {BOX_STYLE} from '../../../../variables/shadow';\n\ntype StyleSheetType = {\n container: ViewStyle;\n spaced: ViewStyle;\n htmlText: TextStyle;\n selectInput: ViewStyle;\n selectText: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType => ({\n container: {\n width: '100%',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignItems: 'center'\n },\n spaced: {\n paddingVertical: theme.spacing.tiny\n },\n htmlText: {\n color: theme.colors.black,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 25\n },\n // eslint-disable-next-line @coorpacademy/coorpacademy/no-overwriting-spread\n selectInput: {\n padding: theme.spacing.tiny,\n borderRadius: theme.radius.regular,\n minWidth: 175,\n marginHorizontal: 12,\n paddingVertical: 16,\n ...BOX_STYLE,\n backgroundColor: theme.colors.white\n },\n selectText: {\n color: theme.colors.gray.medium,\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.regular,\n textAlign: 'center'\n }\n});\n\ntype TemplatePart = {\n type: 'string' | 'answerField';\n value: string;\n};\n\ntype ItemProps = {\n part: TemplatePart;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n index: number;\n isDisabled?: boolean;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n styles: StyleSheetType;\n};\n\nconst Item = (props: ItemProps) => {\n const {\n part,\n index,\n isDisabled = false,\n focusedSelectId,\n choices,\n onInputChange,\n handleBlur,\n handleFocus,\n styles\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme, translations} = templateContext;\n\n const inputNames = choices.map(choice => choice.name);\n const id = `question-part-${index + 1}`;\n const isFocused = focusedSelectId === id;\n\n if (part.type === 'answerField' && inputNames.includes(part.value)) {\n const choiceIndex = choices.findIndex(choice => choice.name === part.value);\n const choice = choices[choiceIndex];\n const {value} = choice;\n\n if (!choice || !choice.type || !choice.name) {\n return null;\n }\n\n const disabledSuffix = isDisabled ? '-disabled' : '';\n const selectedSuffix = value ? '-selected' : '';\n\n const handleInputChange =\n (_item: TemplateTextChoice | TemplateListOfChoices) => (_value: string) =>\n onInputChange(_item, _value);\n\n if (choice.type === 'text') {\n return (\n <View style={styles.spaced} testID={id}>\n <FreeText\n key={id}\n isDisabled={isDisabled}\n onChange={handleInputChange(choice)}\n value={value}\n testID={`${id}-text${selectedSuffix}${disabledSuffix}`}\n questionType=\"template\"\n />\n </View>\n );\n }\n\n const selectInputStyle: TextStyle[] = [styles.selectInput];\n const selectTextStyle: TextStyle[] = [styles.selectText];\n\n if (choice.type === 'select') {\n return (\n <View style={styles.spaced} testID={id}>\n <Select\n isDisabled={isDisabled}\n questionType=\"template\"\n values={choice.items}\n value={value}\n placeholder={translations.selectAnAnswer}\n isFocused={isFocused}\n onBlur={handleBlur}\n onFocus={handleFocus(id)}\n onChange={handleInputChange(choice)}\n textStyle={selectTextStyle}\n style={selectInputStyle}\n analyticsID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n testID={`${id}-select${selectedSuffix}${disabledSuffix}`}\n />\n </View>\n );\n }\n }\n\n return (\n <Html key={id} fontSize={theme.fontSize.regular} testID={id} style={styles.htmlText}>\n {trim(part.value || '')}\n </Html>\n );\n};\n\nexport type Props = {\n isDisabled?: boolean;\n template: string;\n choices: Array<TemplateTextChoice | TemplateListOfChoices>;\n onInputChange: (item: TemplateTextChoice | TemplateListOfChoices, value: string) => void;\n focusedSelectId: FocusedSelectId;\n handleBlur: HandleBlur;\n handleFocus: HandleFocus;\n};\n\nconst QuestionTemplate = (props: Props) => {\n const {\n template,\n onInputChange,\n choices,\n handleBlur,\n handleFocus,\n focusedSelectId,\n isDisabled = false\n } = props;\n\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n if (!template || !styleSheet) {\n return null;\n }\n\n const parts: TemplatePart[] = parseTemplateString(template);\n\n return (\n <View style={styleSheet.container} testID=\"question-template\">\n {parts.map((part, id) => (\n <View key={`question-part-${id}`} style={{flexDirection: 'row'}}>\n <Item\n part={part}\n choices={choices}\n index={id}\n focusedSelectId={focusedSelectId}\n isDisabled={isDisabled}\n handleBlur={handleBlur}\n handleFocus={handleFocus}\n onInputChange={onInputChange}\n styles={styleSheet}\n />\n <Space type=\"micro\" />\n </View>\n ))}\n </View>\n );\n};\n\nexport default QuestionTemplate;\n"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAOA;;AACA;;;;;;;;;;AAUA,MAAMA,gBAAgB,GAAIC,KAAD,KAAmC;EAC1DC,SAAS,EAAE;IACTC,KAAK,EAAE,MADE;IAETC,aAAa,EAAE,KAFN;IAGTC,QAAQ,EAAE,MAHD;IAITC,cAAc,EAAE,QAJP;IAKTC,UAAU,EAAE;EALH,CAD+C;EAQ1DC,MAAM,EAAE;IACNC,eAAe,EAAER,KAAK,CAACS,OAAN,CAAcC;EADzB,CARkD;EAW1DC,QAAQ,EAAE;IACRC,KAAK,EAAEZ,KAAK,CAACa,MAAN,CAAaC,KADZ;IAERC,UAAU,EAAEf,KAAK,CAACe,UAAN,CAAiBC,IAFrB;IAGRC,UAAU,EAAE;EAHJ,CAXgD;EAgB1D;EACAC,WAAW;IACTC,OAAO,EAAEnB,KAAK,CAACS,OAAN,CAAcC,IADd;IAETU,YAAY,EAAEpB,KAAK,CAACqB,MAAN,CAAaC,OAFlB;IAGTC,QAAQ,EAAE,GAHD;IAITC,gBAAgB,EAAE,EAJT;IAKThB,eAAe,EAAE;EALR,GAMNiB,iBANM;IAOTC,eAAe,EAAE1B,KAAK,CAACa,MAAN,CAAac;EAPrB,EAjB+C;EA0B1DC,UAAU,EAAE;IACVhB,KAAK,EAAEZ,KAAK,CAACa,MAAN,CAAagB,IAAb,CAAkBC,MADf;IAEVf,UAAU,EAAEf,KAAK,CAACe,UAAN,CAAiBC,IAFnB;IAGVe,QAAQ,EAAE/B,KAAK,CAAC+B,QAAN,CAAeT,OAHf;IAIVU,SAAS,EAAE;EAJD;AA1B8C,CAAnC,CAAzB;;AAmDA,MAAMC,IAAI,GAAIC,K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8B;EATV,EADF,eAYE,6BAAC,eAAD;IAAO,IAAI,EAAC;EAAZ,EAZF,CADD,CADH,CADF;AAoBD,CA/CD;;eAiDeF,gB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAgC,0BAA0B,EAAC,MAAM,cAAc,CAAC;AA4PvF,QAAA,MAAM,qBAAqB,kDAMxB,0BAA0B,uBAiD5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAgC,0BAA0B,EAAC,MAAM,cAAc,CAAC;AA6PvF,QAAA,MAAM,qBAAqB,kDAMxB,0BAA0B,uBAiD5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -29,9 +29,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
29
29
 
30
30
  const createStyleSheet = (theme, type) => _reactNative.StyleSheet.create({
31
31
  wrapper: {
32
- height: 'auto',
33
- color: theme.colors.white,
34
- display: 'flex'
32
+ backgroundColor: '#00000000',
33
+ height: 2000,
34
+ display: 'flex',
35
+ justifyContent: 'flex-end'
35
36
  },
36
37
  popin: {
37
38
  padding: theme.spacing.medium,
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","type","StyleSheet","create","wrapper","height","color","colors","white","display","popin","padding","spacing","medium","borderRadius","flexDirection","alignItems","backgroundColor","negative","positive","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","elevation","correctionSection","iconCircle","justifyContent","opacity","icon","resultLabel","fontSize","fontWeight","lineHeight","marginLeft","textTransform","feedbackSection","marginVertical","labelContainer","alignSelf","paddingHorizontal","tiny","paddingVertical","micro","marginBottom","label","extraBold","htmlInfoMessage","button","base","small","buttonText","cta","bold","textAlign","containerButtonKlf","buttonKlf","buttonKlfActive","buttonKlfText","iconKey","marginRight","containerTooltip","zIndex","position","black","buttonTooltip","bottom","right","htmlTooltipText","text","primary","triangleTooltip","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderTopWidth","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor","transform","rotate","left","top","KlfButton","klf","styleSheet","displayTooltip","setDisplayTooltip","useState","fadeIn","useAnimateProp","property","fromValue","toValue","easing","Easing","bezier","handlePressKey","useCallback","start","revert","tooltip","animatedStyle","ICONS","RightIcon","wrong","WrongIcon","ReviewCorrectionPopin","information","next","templateContext","useTemplateContext","setStylesheet","handlePressNext","onClick","Icon","useEffect","_stylesheet","message"],"sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState} from 'react';\nimport {Animated, Easing, TextStyle, StyleSheet, View, ViewStyle} from 'react-native';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport Html from '../../atom/html/index.native';\nimport {Theme} from '../../variables/theme.native';\nimport Text from '../../atom/text/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {ReviewCorrectionPopinKLFProps, ReviewCorrectionPopinProps} from './prop-types';\n\ninterface StyleSheetType {\n wrapper: ViewStyle;\n popin: ViewStyle;\n correctionSection: ViewStyle;\n iconCircle: ViewStyle;\n icon: ViewStyle;\n resultLabel: TextStyle;\n feedbackSection: ViewStyle;\n labelContainer: ViewStyle;\n label: TextStyle;\n htmlInfoMessage: TextStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n buttonKlf: ViewStyle;\n buttonKlfActive: TextStyle;\n buttonKlfText: TextStyle;\n iconKey: ViewStyle;\n containerTooltip: ViewStyle;\n buttonTooltip: ViewStyle;\n containerButtonKlf: ViewStyle;\n triangleTooltip: ViewStyle;\n htmlTooltipText: TextStyle;\n}\n\nconst createStyleSheet = (theme: Theme, type: string): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n height: 'auto',\n color: theme.colors.white,\n display: 'flex'\n },\n popin: {\n padding: theme.spacing.medium,\n borderRadius: 16,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowOpacity: 0.5,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 15,\n elevation: 4\n },\n correctionSection: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '80%'\n },\n iconCircle: {\n width: 60,\n height: 60,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n opacity: 0.7,\n borderRadius: 50\n },\n icon: {\n height: 30,\n width: 30\n },\n resultLabel: {\n color: theme.colors.white,\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 24,\n marginLeft: 12,\n textTransform: 'uppercase'\n },\n feedbackSection: {\n marginVertical: theme.spacing.medium\n },\n labelContainer: {\n alignSelf: 'flex-start',\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderRadius: 56,\n paddingHorizontal: theme.spacing.tiny,\n paddingVertical: theme.spacing.micro,\n marginBottom: 8\n },\n label: {\n color: theme.colors.white,\n fontSize: 14,\n fontWeight: theme.fontWeight.extraBold,\n lineHeight: 17\n },\n htmlInfoMessage: {\n color: theme.colors.white,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 19\n },\n button: {\n alignSelf: 'stretch',\n backgroundColor: theme.colors.white,\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small\n },\n buttonText: {\n color: theme.colors.cta,\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n containerButtonKlf: {\n width: '100%'\n },\n buttonKlf: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small,\n marginBottom: theme.spacing.tiny\n },\n buttonKlfActive: {\n backgroundColor:\n 'linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), rgba(255, 255, 255, 0.1)'\n },\n buttonKlfText: {\n color: 'white',\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n iconKey: {\n width: 12,\n height: 12,\n marginRight: theme.spacing.tiny\n },\n containerTooltip: {\n zIndex: 30,\n position: 'relative',\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8\n },\n buttonTooltip: {\n flexDirection: 'column',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n borderRadius: 15,\n padding: theme.spacing.small,\n width: '112%',\n position: 'absolute',\n bottom: 4,\n right: -15,\n zIndex: 20\n },\n htmlTooltipText: {\n color: theme.colors.text.primary,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 22,\n textAlign: 'center'\n },\n triangleTooltip: {\n width: 0,\n height: 0,\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderLeftWidth: 13,\n borderRightWidth: 13,\n borderBottomWidth: 13,\n borderTopWidth: 13,\n borderLeftColor: 'transparent',\n borderTopColor: 'transparent',\n borderRightColor: theme.colors.white,\n borderBottomColor: theme.colors.white,\n transform: [{rotate: '45deg'}],\n position: 'absolute',\n left: 110,\n top: -20,\n borderRadius: 4\n }\n });\n\nconst KlfButton = ({\n klf,\n styleSheet\n}: {\n klf: ReviewCorrectionPopinKLFProps;\n styleSheet: StyleSheetType;\n}) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n const fadeIn = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n easing: Easing.bezier(0.25, 1, 0.5, 1)\n });\n\n const handlePressKey = useCallback(() => {\n setDisplayTooltip(!displayTooltip);\n !displayTooltip ? fadeIn.start() : fadeIn.revert();\n }, [displayTooltip, fadeIn]);\n\n const {\n buttonKlf,\n buttonKlfActive,\n buttonKlfText,\n containerButtonKlf,\n containerTooltip,\n buttonTooltip,\n htmlTooltipText,\n iconKey,\n triangleTooltip\n } = styleSheet;\n\n const {label, tooltip} = klf;\n\n return (\n <View style={containerButtonKlf}>\n <Animated.View style={[containerTooltip, fadeIn.animatedStyle]}>\n <Touchable\n style={buttonTooltip}\n accessibilityLabel={`aria-label-tooltip`}\n isHighlight\n onPress={handlePressKey}\n testID=\"button-tooltip\"\n >\n <Html style={htmlTooltipText}>{tooltip}</Html>\n </Touchable>\n <View style={triangleTooltip} />\n </Animated.View>\n <Touchable\n style={displayTooltip ? {...buttonKlf, ...buttonKlfActive} : buttonKlf}\n accessibilityLabel={`aria-label-${label}`}\n onPress={handlePressKey}\n testID=\"button-klf\"\n >\n <KlfIcon style={iconKey} color=\"white\" />\n <Text style={buttonKlfText}>{label}</Text>\n </Touchable>\n </View>\n );\n};\n\nconst ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n};\n\nconst ReviewCorrectionPopin = ({\n information,\n klf,\n next,\n type,\n resultLabel\n}: ReviewCorrectionPopinProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n const handlePressNext = next.onClick;\n\n const Icon = ICONS[type];\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, type);\n setStylesheet(_stylesheet);\n }, [theme, type]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.wrapper}>\n <View style={styleSheet.popin}>\n <View style={styleSheet.correctionSection}>\n <View style={styleSheet.iconCircle}>\n <Icon\n style={styleSheet.icon}\n color={type === 'wrong' ? theme.colors.negative : theme.colors.positive}\n />\n </View>\n <Text style={styleSheet.resultLabel}>{resultLabel}</Text>\n </View>\n <View style={styleSheet.feedbackSection} accessibilityLabel=\"answer-information\">\n <View style={styleSheet.labelContainer} needsOffscreenAlphaCompositing>\n <Text accessibilityLabel={information.label} style={styleSheet.label}>\n {information.label}\n </Text>\n </View>\n <Html style={styleSheet.htmlInfoMessage}>{information.message}</Html>\n </View>\n {klf && type === 'wrong' ? <KlfButton styleSheet={styleSheet} klf={klf} /> : null}\n <Touchable\n style={styleSheet.button}\n onPress={handlePressNext}\n accessibilityLabel={next['aria-label']}\n testID={next['data-name']}\n >\n <Text style={styleSheet.buttonText}>{next.label}</Text>\n </Touchable>\n </View>\n </View>\n );\n};\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AA2BA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAeC,IAAf,KACvBC,uBAAA,CAAWC,MAAX,CAAkB;EAChBC,OAAO,EAAE;IACPC,MAAM,EAAE,MADD;IAEPC,KAAK,EAAEN,KAAK,CAACO,MAAN,CAAaC,KAFb;IAGPC,OAAO,EAAE;EAHF,CADO;EAMhBC,KAAK,EAAE;IACLC,OAAO,EAAEX,KAAK,CAACY,OAAN,CAAcC,MADlB;IAELC,YAAY,EAAE,EAFT;IAGLL,OAAO,EAAE,MAHJ;IAILM,aAAa,EAAE,QAJV;IAKLC,UAAU,EAAE,YALP;IAMLC,eAAe,EAAEhB,IAAI,KAAK,OAAT,GAAmBD,KAAK,CAACO,MAAN,CAAaW,QAAhC,GAA2ClB,KAAK,CAACO,MAAN,CAAaY,QANpE;IAOLC,WAAW,EAAEnB,IAAI,KAAK,OAAT,GAAmBD,KAAK,CAACO,MAAN,CAAaW,QAAhC,GAA2ClB,KAAK,CAACO,MAAN,CAAaY,QAPhE;IAQLE,aAAa,EAAE,GARV;IASLC,YAAY,EAAE;MAACC,KAAK,EAAE,CAAR;MAAWlB,MAAM,EAAE;IAAnB,CATT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AlB/E,eAmBE,6BAAC,eAAD;IACE,KAAK,EAAEC,UAAU,CAACvC,MADpB;IAEE,OAAO,EAAEmE,eAFX;IAGE,kBAAkB,EAAEJ,IAAI,CAAC,YAAD,CAH1B;IAIE,MAAM,EAAEA,IAAI,CAAC,WAAD;EAJd,gBAME,6BAAC,eAAD;IAAM,KAAK,EAAExB,UAAU,CAACpC;EAAxB,GAAqC4D,IAAI,CAAClE,KAA1C,CANF,CAnBF,CADF,CADF;AAgCD,CAvDD;;eAyDegE,qB"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","type","StyleSheet","create","wrapper","backgroundColor","height","display","justifyContent","popin","padding","spacing","medium","borderRadius","flexDirection","alignItems","colors","negative","positive","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","elevation","correctionSection","iconCircle","white","opacity","icon","resultLabel","color","fontSize","fontWeight","lineHeight","marginLeft","textTransform","feedbackSection","marginVertical","labelContainer","alignSelf","paddingHorizontal","tiny","paddingVertical","micro","marginBottom","label","extraBold","htmlInfoMessage","button","base","small","buttonText","cta","bold","textAlign","containerButtonKlf","buttonKlf","buttonKlfActive","buttonKlfText","iconKey","marginRight","containerTooltip","zIndex","position","black","buttonTooltip","bottom","right","htmlTooltipText","text","primary","triangleTooltip","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderTopWidth","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor","transform","rotate","left","top","KlfButton","klf","styleSheet","displayTooltip","setDisplayTooltip","useState","fadeIn","useAnimateProp","property","fromValue","toValue","easing","Easing","bezier","handlePressKey","useCallback","start","revert","tooltip","animatedStyle","ICONS","RightIcon","wrong","WrongIcon","ReviewCorrectionPopin","information","next","templateContext","useTemplateContext","setStylesheet","handlePressNext","onClick","Icon","useEffect","_stylesheet","message"],"sources":["../../../src/molecule/review-correction-popin/index.native.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState} from 'react';\nimport {Animated, Easing, TextStyle, StyleSheet, View, ViewStyle} from 'react-native';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\nimport {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport Html from '../../atom/html/index.native';\nimport {Theme} from '../../variables/theme.native';\nimport Text from '../../atom/text/index.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {ReviewCorrectionPopinKLFProps, ReviewCorrectionPopinProps} from './prop-types';\n\ninterface StyleSheetType {\n wrapper: ViewStyle;\n popin: ViewStyle;\n correctionSection: ViewStyle;\n iconCircle: ViewStyle;\n icon: ViewStyle;\n resultLabel: TextStyle;\n feedbackSection: ViewStyle;\n labelContainer: ViewStyle;\n label: TextStyle;\n htmlInfoMessage: TextStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n buttonKlf: ViewStyle;\n buttonKlfActive: TextStyle;\n buttonKlfText: TextStyle;\n iconKey: ViewStyle;\n containerTooltip: ViewStyle;\n buttonTooltip: ViewStyle;\n containerButtonKlf: ViewStyle;\n triangleTooltip: ViewStyle;\n htmlTooltipText: TextStyle;\n}\n\nconst createStyleSheet = (theme: Theme, type: string): StyleSheetType =>\n StyleSheet.create({\n wrapper: {\n backgroundColor: '#00000000',\n height: 2000,\n display: 'flex',\n justifyContent: 'flex-end'\n },\n popin: {\n padding: theme.spacing.medium,\n borderRadius: 16,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowColor: type === 'wrong' ? theme.colors.negative : theme.colors.positive,\n shadowOpacity: 0.5,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 15,\n elevation: 4\n },\n correctionSection: {\n flexDirection: 'row',\n alignItems: 'center',\n width: '80%'\n },\n iconCircle: {\n width: 60,\n height: 60,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n opacity: 0.7,\n borderRadius: 50\n },\n icon: {\n height: 30,\n width: 30\n },\n resultLabel: {\n color: theme.colors.white,\n fontSize: 24,\n fontWeight: '600',\n lineHeight: 24,\n marginLeft: 12,\n textTransform: 'uppercase'\n },\n feedbackSection: {\n marginVertical: theme.spacing.medium\n },\n labelContainer: {\n alignSelf: 'flex-start',\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n borderRadius: 56,\n paddingHorizontal: theme.spacing.tiny,\n paddingVertical: theme.spacing.micro,\n marginBottom: 8\n },\n label: {\n color: theme.colors.white,\n fontSize: 14,\n fontWeight: theme.fontWeight.extraBold,\n lineHeight: 17\n },\n htmlInfoMessage: {\n color: theme.colors.white,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 19\n },\n button: {\n alignSelf: 'stretch',\n backgroundColor: theme.colors.white,\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small\n },\n buttonText: {\n color: theme.colors.cta,\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n containerButtonKlf: {\n width: '100%'\n },\n buttonKlf: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(255, 255, 255, 0.1)',\n borderRadius: 7,\n paddingHorizontal: theme.spacing.base,\n paddingVertical: theme.spacing.small,\n marginBottom: theme.spacing.tiny\n },\n buttonKlfActive: {\n backgroundColor:\n 'linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)), rgba(255, 255, 255, 0.1)'\n },\n buttonKlfText: {\n color: 'white',\n fontSize: 14,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 20,\n textAlign: 'center'\n },\n iconKey: {\n width: 12,\n height: 12,\n marginRight: theme.spacing.tiny\n },\n containerTooltip: {\n zIndex: 30,\n position: 'relative',\n shadowColor: theme.colors.black,\n shadowOpacity: 0.3,\n shadowOffset: {width: 0, height: 0},\n shadowRadius: 8\n },\n buttonTooltip: {\n flexDirection: 'column',\n justifyContent: 'center',\n backgroundColor: theme.colors.white,\n borderRadius: 15,\n padding: theme.spacing.small,\n width: '112%',\n position: 'absolute',\n bottom: 4,\n right: -15,\n zIndex: 20\n },\n htmlTooltipText: {\n color: theme.colors.text.primary,\n fontSize: 16,\n fontWeight: '600',\n lineHeight: 22,\n textAlign: 'center'\n },\n triangleTooltip: {\n width: 0,\n height: 0,\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderLeftWidth: 13,\n borderRightWidth: 13,\n borderBottomWidth: 13,\n borderTopWidth: 13,\n borderLeftColor: 'transparent',\n borderTopColor: 'transparent',\n borderRightColor: theme.colors.white,\n borderBottomColor: theme.colors.white,\n transform: [{rotate: '45deg'}],\n position: 'absolute',\n left: 110,\n top: -20,\n borderRadius: 4\n }\n });\n\nconst KlfButton = ({\n klf,\n styleSheet\n}: {\n klf: ReviewCorrectionPopinKLFProps;\n styleSheet: StyleSheetType;\n}) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n const fadeIn = useAnimateProp({\n property: 'opacity',\n fromValue: 0,\n toValue: 1,\n easing: Easing.bezier(0.25, 1, 0.5, 1)\n });\n\n const handlePressKey = useCallback(() => {\n setDisplayTooltip(!displayTooltip);\n !displayTooltip ? fadeIn.start() : fadeIn.revert();\n }, [displayTooltip, fadeIn]);\n\n const {\n buttonKlf,\n buttonKlfActive,\n buttonKlfText,\n containerButtonKlf,\n containerTooltip,\n buttonTooltip,\n htmlTooltipText,\n iconKey,\n triangleTooltip\n } = styleSheet;\n\n const {label, tooltip} = klf;\n\n return (\n <View style={containerButtonKlf}>\n <Animated.View style={[containerTooltip, fadeIn.animatedStyle]}>\n <Touchable\n style={buttonTooltip}\n accessibilityLabel={`aria-label-tooltip`}\n isHighlight\n onPress={handlePressKey}\n testID=\"button-tooltip\"\n >\n <Html style={htmlTooltipText}>{tooltip}</Html>\n </Touchable>\n <View style={triangleTooltip} />\n </Animated.View>\n <Touchable\n style={displayTooltip ? {...buttonKlf, ...buttonKlfActive} : buttonKlf}\n accessibilityLabel={`aria-label-${label}`}\n onPress={handlePressKey}\n testID=\"button-klf\"\n >\n <KlfIcon style={iconKey} color=\"white\" />\n <Text style={buttonKlfText}>{label}</Text>\n </Touchable>\n </View>\n );\n};\n\nconst ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n};\n\nconst ReviewCorrectionPopin = ({\n information,\n klf,\n next,\n type,\n resultLabel\n}: ReviewCorrectionPopinProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme} = templateContext;\n const handlePressNext = next.onClick;\n\n const Icon = ICONS[type];\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, type);\n setStylesheet(_stylesheet);\n }, [theme, type]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.wrapper}>\n <View style={styleSheet.popin}>\n <View style={styleSheet.correctionSection}>\n <View style={styleSheet.iconCircle}>\n <Icon\n style={styleSheet.icon}\n color={type === 'wrong' ? theme.colors.negative : theme.colors.positive}\n />\n </View>\n <Text style={styleSheet.resultLabel}>{resultLabel}</Text>\n </View>\n <View style={styleSheet.feedbackSection} accessibilityLabel=\"answer-information\">\n <View style={styleSheet.labelContainer} needsOffscreenAlphaCompositing>\n <Text accessibilityLabel={information.label} style={styleSheet.label}>\n {information.label}\n </Text>\n </View>\n <Html style={styleSheet.htmlInfoMessage}>{information.message}</Html>\n </View>\n {klf && type === 'wrong' ? <KlfButton styleSheet={styleSheet} klf={klf} /> : null}\n <Touchable\n style={styleSheet.button}\n onPress={handlePressNext}\n accessibilityLabel={next['aria-label']}\n testID={next['data-name']}\n >\n <Text style={styleSheet.buttonText}>{next.label}</Text>\n </Touchable>\n </View>\n </View>\n );\n};\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AA2BA,MAAMA,gBAAg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,CAACgB,MAAN,CAAaC,QAAhC,GAA2CjB,KAAK,CAACgB,MAAN,CAAaE;EAFjE,EADF,CADF,eAOE,6BAAC,eAAD;IAAM,KAAK,EAAEsE,UAAU,CAAC1D;EAAxB,GAAsCA,WAAtC,CAPF,CADF,eAUE,6BAAC,iBAAD;IAAM,KAAK,EAAE0D,UAAU,CAACnD,eAAxB;IAAyC,kBAAkB,EAAC;EAA5D,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEmD,UAAU,CAACjD,cAAxB;IAAwC,8BAA8B;EAAtE,gBACE,6BAAC,eAAD;IAAM,kBAAkB,EAAEwE,WAAW,CAACjE,KAAtC;IAA6C,KAAK,EAAE0C,UAAU,CAAC1C;EAA/D,GACGiE,WAAW,CAACjE,KADf,CADF,CADF,eAME,6BAAC,cAAD;IAAM,KAAK,EAAE0C,UAAU,CAACxC;EAAxB,GAA0C+D,WAAW,CAACU,OAAtD,CANF,CAVF,EAkBGlC,GAAG,IAAItF,IAAI,KAAK,OAAhB,gBAA0B,6BAAC,SAAD;IAAW,UAAU,EAAEuF,UAAvB;IAAmC,GAAG,EAAED;EAAxC,EAA1B,GAA4E,IAlB/E,eAmBE,6BAAC,eAAD;IACE,KAAK,EAAEC,UAAU,CAACvC,MADpB;IAEE,OAAO,EAAEmE,eAFX;IAGE,kBAAkB,EAAEJ,IAAI,CAAC,YAAD,CAH1B;IAIE,MAAM,EAAEA,IAAI,CAAC,WAAD;EAJd,gBAME,6BAAC,eAAD;IAAM,KAAK,EAAExB,UAAU,CAACpC;EAAxB,GAAqC4D,IAAI,CAAClE,KAA1C,CANF,CAnBF,CADF,CADF;AAgCD,CAvDD;;eAyDegE,qB"}
@@ -18,6 +18,7 @@ declare namespace MoocFooter {
18
18
  title: PropTypes.Requireable<string>;
19
19
  link: PropTypes.Requireable<string>;
20
20
  target: PropTypes.Requireable<string>;
21
+ ariaLabel: PropTypes.Requireable<string>;
21
22
  }> | null | undefined)[]>;
22
23
  }> | null | undefined)[]>;
23
24
  socialLinks: PropTypes.Requireable<(PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-footer/index.js"],"names":[],"mappings":";AA+CA,qDA+HC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-footer/index.js"],"names":[],"mappings":";AA+CA,qDAgIC"}
@@ -108,6 +108,7 @@ function MoocFooter(props) {
108
108
  "data-text": page.title,
109
109
  className: _style.default.pageLink,
110
110
  target: page.target,
111
+ "aria-label": page.ariaLabel ? page.ariaLabel : page.title,
111
112
  "data-name": page.title
112
113
  }, page.title));
113
114
  }));
@@ -178,7 +179,8 @@ MoocFooter.propTypes = process.env.NODE_ENV !== "production" ? {
178
179
  pages: _propTypes.default.arrayOf(_propTypes.default.shape({
179
180
  title: _propTypes.default.string,
180
181
  link: _propTypes.default.string,
181
- target: _propTypes.default.string
182
+ target: _propTypes.default.string,
183
+ ariaLabel: _propTypes.default.string
182
184
  }))
183
185
  })),
184
186
  socialLinks: _propTypes.default.arrayOf(_propTypes.default.shape({