@coorpacademy/components 11.4.6 → 11.5.0

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 (96) hide show
  1. package/es/atom/provider/index.d.ts +1 -0
  2. package/es/atom/provider/index.d.ts.map +1 -1
  3. package/es/atom/provider/index.js +11 -1
  4. package/es/atom/provider/index.js.map +1 -1
  5. package/es/atom/provider/web-context.d.ts +1 -1
  6. package/es/atom/provider/web-context.d.ts.map +1 -1
  7. package/es/atom/provider/web-context.js +2 -1
  8. package/es/atom/provider/web-context.js.map +1 -1
  9. package/es/atom/review-header-step-item/index.d.ts.map +1 -1
  10. package/es/atom/review-header-step-item/index.js +24 -6
  11. package/es/atom/review-header-step-item/index.js.map +1 -1
  12. package/es/globals.d.js.map +1 -1
  13. package/es/molecule/answer/prop-types.d.ts +2 -0
  14. package/es/molecule/answer/prop-types.d.ts.map +1 -1
  15. package/es/molecule/discipline-header/index.d.ts +1 -0
  16. package/es/molecule/discipline-header/index.d.ts.map +1 -1
  17. package/es/molecule/questions/types.d.ts +1 -0
  18. package/es/molecule/questions/types.d.ts.map +1 -1
  19. package/es/molecule/questions/types.js.map +1 -1
  20. package/es/molecule/resource-player/index.d.ts +1 -0
  21. package/es/molecule/resource-player/index.d.ts.map +1 -1
  22. package/es/molecule/video-player/index.d.ts +1 -0
  23. package/es/molecule/video-player/index.d.ts.map +1 -1
  24. package/es/molecule/video-player/index.js +4 -2
  25. package/es/molecule/video-player/index.js.map +1 -1
  26. package/es/molecule/video-player/jwplayer.d.ts +1 -0
  27. package/es/molecule/video-player/jwplayer.d.ts.map +1 -1
  28. package/es/molecule/video-player/prop-types.d.ts +3 -0
  29. package/es/molecule/video-player/prop-types.js +2 -0
  30. package/es/molecule/video-player/prop-types.js.map +1 -1
  31. package/es/organism/review-slide/prop-types.d.ts +2 -0
  32. package/es/organism/review-slide/prop-types.d.ts.map +1 -1
  33. package/es/organism/review-stacked-slides/prop-types.d.ts +5 -0
  34. package/es/organism/review-stacked-slides/prop-types.d.ts.map +1 -1
  35. package/es/template/app-player/player/slides/index.d.ts +2 -0
  36. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  37. package/es/template/app-review/index.d.ts +5 -0
  38. package/es/template/app-review/index.d.ts.map +1 -1
  39. package/es/template/app-review/player/prop-types.d.ts +5 -0
  40. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  41. package/es/template/app-review/prop-types.d.ts +5 -0
  42. package/es/template/app-review/prop-types.d.ts.map +1 -1
  43. package/es/template/app-review/template-context.d.ts +1 -1
  44. package/es/template/app-review/template-context.d.ts.map +1 -1
  45. package/es/template/app-review/template-context.js +2 -1
  46. package/es/template/app-review/template-context.js.map +1 -1
  47. package/es/template/common/discipline/index.d.ts +1 -0
  48. package/lib/atom/provider/index.d.ts +1 -0
  49. package/lib/atom/provider/index.d.ts.map +1 -1
  50. package/lib/atom/provider/index.js +10 -1
  51. package/lib/atom/provider/index.js.map +1 -1
  52. package/lib/atom/provider/web-context.d.ts +1 -1
  53. package/lib/atom/provider/web-context.d.ts.map +1 -1
  54. package/lib/atom/provider/web-context.js +3 -1
  55. package/lib/atom/provider/web-context.js.map +1 -1
  56. package/lib/atom/review-header-step-item/index.d.ts.map +1 -1
  57. package/lib/atom/review-header-step-item/index.js +25 -6
  58. package/lib/atom/review-header-step-item/index.js.map +1 -1
  59. package/lib/globals.d.js.map +1 -1
  60. package/lib/molecule/answer/prop-types.d.ts +2 -0
  61. package/lib/molecule/answer/prop-types.d.ts.map +1 -1
  62. package/lib/molecule/discipline-header/index.d.ts +1 -0
  63. package/lib/molecule/discipline-header/index.d.ts.map +1 -1
  64. package/lib/molecule/questions/types.d.ts +1 -0
  65. package/lib/molecule/questions/types.d.ts.map +1 -1
  66. package/lib/molecule/questions/types.js.map +1 -1
  67. package/lib/molecule/resource-player/index.d.ts +1 -0
  68. package/lib/molecule/resource-player/index.d.ts.map +1 -1
  69. package/lib/molecule/video-player/index.d.ts +1 -0
  70. package/lib/molecule/video-player/index.d.ts.map +1 -1
  71. package/lib/molecule/video-player/index.js +5 -2
  72. package/lib/molecule/video-player/index.js.map +1 -1
  73. package/lib/molecule/video-player/jwplayer.d.ts +1 -0
  74. package/lib/molecule/video-player/jwplayer.d.ts.map +1 -1
  75. package/lib/molecule/video-player/prop-types.d.ts +3 -0
  76. package/lib/molecule/video-player/prop-types.js +2 -0
  77. package/lib/molecule/video-player/prop-types.js.map +1 -1
  78. package/lib/organism/review-slide/prop-types.d.ts +2 -0
  79. package/lib/organism/review-slide/prop-types.d.ts.map +1 -1
  80. package/lib/organism/review-stacked-slides/prop-types.d.ts +5 -0
  81. package/lib/organism/review-stacked-slides/prop-types.d.ts.map +1 -1
  82. package/lib/template/app-player/player/slides/index.d.ts +2 -0
  83. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  84. package/lib/template/app-review/index.d.ts +5 -0
  85. package/lib/template/app-review/index.d.ts.map +1 -1
  86. package/lib/template/app-review/player/prop-types.d.ts +5 -0
  87. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  88. package/lib/template/app-review/prop-types.d.ts +5 -0
  89. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  90. package/lib/template/app-review/template-context.d.ts +1 -1
  91. package/lib/template/app-review/template-context.d.ts.map +1 -1
  92. package/lib/template/app-review/template-context.js +3 -1
  93. package/lib/template/app-review/template-context.js.map +1 -1
  94. package/lib/template/common/discipline/index.d.ts +1 -0
  95. package/locales/en/global.json +5 -2
  96. package/package.json +2 -2
@@ -86,6 +86,7 @@ declare const AppReview: {
86
86
  onError: import("prop-types").Requireable<(...args: any[]) => any>;
87
87
  autoplay: import("prop-types").Requireable<boolean>;
88
88
  disableAutostart: import("prop-types").Requireable<boolean>;
89
+ loading: import("prop-types").Requireable<boolean>;
89
90
  jwpOptions: import("prop-types").Requireable<import("prop-types").InferProps<{
90
91
  file: import("prop-types").Requireable<any>;
91
92
  customProps: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -161,6 +162,7 @@ declare const AppReview: {
161
162
  onError: import("prop-types").Requireable<(...args: any[]) => any>;
162
163
  autoplay: import("prop-types").Requireable<boolean>;
163
164
  disableAutostart: import("prop-types").Requireable<boolean>;
165
+ loading: import("prop-types").Requireable<boolean>;
164
166
  jwpOptions: import("prop-types").Requireable<import("prop-types").InferProps<{
165
167
  file: import("prop-types").Requireable<any>;
166
168
  customProps: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -236,6 +238,7 @@ declare const AppReview: {
236
238
  onError: import("prop-types").Requireable<(...args: any[]) => any>;
237
239
  autoplay: import("prop-types").Requireable<boolean>;
238
240
  disableAutostart: import("prop-types").Requireable<boolean>;
241
+ loading: import("prop-types").Requireable<boolean>;
239
242
  jwpOptions: import("prop-types").Requireable<import("prop-types").InferProps<{
240
243
  file: import("prop-types").Requireable<any>;
241
244
  customProps: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -311,6 +314,7 @@ declare const AppReview: {
311
314
  onError: import("prop-types").Requireable<(...args: any[]) => any>;
312
315
  autoplay: import("prop-types").Requireable<boolean>;
313
316
  disableAutostart: import("prop-types").Requireable<boolean>;
317
+ loading: import("prop-types").Requireable<boolean>;
314
318
  jwpOptions: import("prop-types").Requireable<import("prop-types").InferProps<{
315
319
  file: import("prop-types").Requireable<any>;
316
320
  customProps: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -386,6 +390,7 @@ declare const AppReview: {
386
390
  onError: import("prop-types").Requireable<(...args: any[]) => any>;
387
391
  autoplay: import("prop-types").Requireable<boolean>;
388
392
  disableAutostart: import("prop-types").Requireable<boolean>;
393
+ loading: import("prop-types").Requireable<boolean>;
389
394
  jwpOptions: import("prop-types").Requireable<import("prop-types").InferProps<{
390
395
  file: import("prop-types").Requireable<any>;
391
396
  customProps: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpD,CAAC;AAIF,eAAe,SAAS,CAAC"}
@@ -85,6 +85,7 @@ declare const propTypes: {
85
85
  onError: PropTypes.Requireable<(...args: any[]) => any>;
86
86
  autoplay: PropTypes.Requireable<boolean>;
87
87
  disableAutostart: PropTypes.Requireable<boolean>;
88
+ loading: PropTypes.Requireable<boolean>;
88
89
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
89
90
  file: PropTypes.Requireable<any>;
90
91
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -160,6 +161,7 @@ declare const propTypes: {
160
161
  onError: PropTypes.Requireable<(...args: any[]) => any>;
161
162
  autoplay: PropTypes.Requireable<boolean>;
162
163
  disableAutostart: PropTypes.Requireable<boolean>;
164
+ loading: PropTypes.Requireable<boolean>;
163
165
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
164
166
  file: PropTypes.Requireable<any>;
165
167
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -235,6 +237,7 @@ declare const propTypes: {
235
237
  onError: PropTypes.Requireable<(...args: any[]) => any>;
236
238
  autoplay: PropTypes.Requireable<boolean>;
237
239
  disableAutostart: PropTypes.Requireable<boolean>;
240
+ loading: PropTypes.Requireable<boolean>;
238
241
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
239
242
  file: PropTypes.Requireable<any>;
240
243
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -310,6 +313,7 @@ declare const propTypes: {
310
313
  onError: PropTypes.Requireable<(...args: any[]) => any>;
311
314
  autoplay: PropTypes.Requireable<boolean>;
312
315
  disableAutostart: PropTypes.Requireable<boolean>;
316
+ loading: PropTypes.Requireable<boolean>;
313
317
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
314
318
  file: PropTypes.Requireable<any>;
315
319
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -385,6 +389,7 @@ declare const propTypes: {
385
389
  onError: PropTypes.Requireable<(...args: any[]) => any>;
386
390
  autoplay: PropTypes.Requireable<boolean>;
387
391
  disableAutostart: PropTypes.Requireable<boolean>;
392
+ loading: PropTypes.Requireable<boolean>;
388
393
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
389
394
  file: PropTypes.Requireable<any>;
390
395
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../../src/template/app-review/player/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAgC,EAC9B,mBAAmB,EACpB,MAAM,8CAA8C,CAAC;AAGtD,OAA8B,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAEzF,OAA+B,EAC7B,gBAAgB,EACjB,MAAM,oDAAoD,CAAC;AAE5D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,iBAAiB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,gBAAgB,CAAC;IACxB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B,CAAC"}
@@ -90,6 +90,7 @@ declare const propTypes: {
90
90
  onError: PropTypes.Requireable<(...args: any[]) => any>;
91
91
  autoplay: PropTypes.Requireable<boolean>;
92
92
  disableAutostart: PropTypes.Requireable<boolean>;
93
+ loading: PropTypes.Requireable<boolean>;
93
94
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
94
95
  file: PropTypes.Requireable<any>;
95
96
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -165,6 +166,7 @@ declare const propTypes: {
165
166
  onError: PropTypes.Requireable<(...args: any[]) => any>;
166
167
  autoplay: PropTypes.Requireable<boolean>;
167
168
  disableAutostart: PropTypes.Requireable<boolean>;
169
+ loading: PropTypes.Requireable<boolean>;
168
170
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
169
171
  file: PropTypes.Requireable<any>;
170
172
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -240,6 +242,7 @@ declare const propTypes: {
240
242
  onError: PropTypes.Requireable<(...args: any[]) => any>;
241
243
  autoplay: PropTypes.Requireable<boolean>;
242
244
  disableAutostart: PropTypes.Requireable<boolean>;
245
+ loading: PropTypes.Requireable<boolean>;
243
246
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
244
247
  file: PropTypes.Requireable<any>;
245
248
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -315,6 +318,7 @@ declare const propTypes: {
315
318
  onError: PropTypes.Requireable<(...args: any[]) => any>;
316
319
  autoplay: PropTypes.Requireable<boolean>;
317
320
  disableAutostart: PropTypes.Requireable<boolean>;
321
+ loading: PropTypes.Requireable<boolean>;
318
322
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
319
323
  file: PropTypes.Requireable<any>;
320
324
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -390,6 +394,7 @@ declare const propTypes: {
390
394
  onError: PropTypes.Requireable<(...args: any[]) => any>;
391
395
  autoplay: PropTypes.Requireable<boolean>;
392
396
  disableAutostart: PropTypes.Requireable<boolean>;
397
+ loading: PropTypes.Requireable<boolean>;
393
398
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
394
399
  file: PropTypes.Requireable<any>;
395
400
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -22,7 +22,7 @@ export declare type TemplateContextValues = {
22
22
  handleBlur?: HandleBlur;
23
23
  handleFocus?: HandleFocus;
24
24
  };
25
- translate: (arg: string) => string;
25
+ translate: (key: string, data?: Record<string, string>) => string;
26
26
  };
27
27
  declare type Props = {
28
28
  values: TemplateContextValues;
@@ -1 +1 @@
1
- {"version":3,"file":"template-context.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/template-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,KAAK,EAAoB,MAAM,8BAA8B,CAAC;AACtE,OAAqB,EAAC,KAAK,EAAC,MAAM,8BAA8B,CAAC;AACjE,OAAkC,EAAC,YAAY,EAAC,MAAM,6CAA6C,CAAC;AACpG,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,oBAAY,UAAU,GAAG,MAAM,IAAI,CAAC;AACpC,oBAAY,WAAW,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;AACrD,oBAAY,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;AAE5C,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,CAAC;IACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,CAAC;AAEF,aAAK,KAAK,GAAG;IAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAAC;AAclE,QAAA,MAAM,kBAAkB,QAAO,qBAU9B,CAAC;AAEF,QAAA,MAAM,eAAe,yBAAwB,KAAK,gBAEjD,CAAC;AAEF,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,CAAC"}
1
+ {"version":3,"file":"template-context.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/template-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAElE,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,KAAK,EAAoB,MAAM,8BAA8B,CAAC;AACtE,OAAqB,EAAC,KAAK,EAAC,MAAM,8BAA8B,CAAC;AACjE,OAAkC,EAAC,YAAY,EAAC,MAAM,6CAA6C,CAAC;AACpG,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,oBAAY,UAAU,GAAG,MAAM,IAAI,CAAC;AACpC,oBAAY,WAAW,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;AACrD,oBAAY,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;AAE5C,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,CAAC;IACF,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;CACnE,CAAC;AAEF,aAAK,KAAK,GAAG;IAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAAC;AAclE,QAAA,MAAM,kBAAkB,QAAO,qBAU9B,CAAC;AAEF,QAAA,MAAM,eAAe,yBAAwB,KAAK,gBAEjD,CAAC;AAEF,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React, { createContext, useContext } from 'react';
2
+ import { mockTranslate } from '@coorpacademy/translate';
2
3
  import { defaultBrandTheme } from '../../variables/brand.native';
3
4
  import defaultTheme from '../../variables/theme.native';
4
5
  import defaultMobileTranslations from '../../variables/default-mobile-translations';
@@ -11,7 +12,7 @@ const Context = /*#__PURE__*/createContext({
11
12
  statusBarHeight: 42
12
13
  },
13
14
  store: {},
14
- translate: arg => arg
15
+ translate: mockTranslate
15
16
  });
16
17
 
17
18
  const useTemplateContext = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"template-context.js","names":["React","createContext","useContext","defaultBrandTheme","defaultTheme","defaultMobileTranslations","Context","theme","brandTheme","translations","display","headerHeight","statusBarHeight","store","translate","arg","useTemplateContext","context","Error","TemplateContext","values","children"],"sources":["../../../src/template/app-review/template-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {Analytics} from '../../variables/analytics';\nimport {Brand, defaultBrandTheme} from '../../variables/brand.native';\nimport defaultTheme, {Theme} from '../../variables/theme.native';\nimport defaultMobileTranslations, {Translations} from '../../variables/default-mobile-translations';\nimport {Vibration} from '../../variables/vibration';\n\nexport type HandleBlur = () => void;\nexport type HandleFocus = (id: string) => () => void;\nexport type FocusedSelectId = string | null;\n\nexport type TemplateContextValues = {\n analytics?: Analytics;\n brandTheme: Brand;\n theme: Theme;\n translations: Translations;\n vibration?: Vibration;\n display: {\n headerHeight: number;\n statusBarHeight: number;\n };\n store: {\n focusedSelectId?: FocusedSelectId;\n handleBlur?: HandleBlur;\n handleFocus?: HandleFocus;\n };\n translate: (arg: string) => string;\n};\n\ntype Props = {values: TemplateContextValues; children: ReactNode};\n\nconst Context = createContext({\n theme: defaultTheme,\n brandTheme: defaultBrandTheme,\n translations: defaultMobileTranslations,\n display: {\n headerHeight: 67,\n statusBarHeight: 42\n },\n store: {},\n translate: (arg: string) => arg\n});\n\nconst useTemplateContext = (): TemplateContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error(\n `❌ [TemplateContext] useTemplateContext must be used within a provider <TemplateContext>`\n );\n }\n\n return context;\n};\n\nconst TemplateContext = ({values, children}: Props) => {\n return <Context.Provider value={values}>{children}</Context.Provider>;\n};\n\nexport {TemplateContext, useTemplateContext};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,aAAf,EAAyCC,UAAzC,QAA0D,OAA1D;AAEA,SAAeC,iBAAf,QAAuC,8BAAvC;AACA,OAAOC,YAAP,MAAkC,8BAAlC;AACA,OAAOC,yBAAP,MAAsD,6CAAtD;AA2BA,MAAMC,OAAO,gBAAGL,aAAa,CAAC;EAC5BM,KAAK,EAAEH,YADqB;EAE5BI,UAAU,EAAEL,iBAFgB;EAG5BM,YAAY,EAAEJ,yBAHc;EAI5BK,OAAO,EAAE;IACPC,YAAY,EAAE,EADP;IAEPC,eAAe,EAAE;EAFV,CAJmB;EAQ5BC,KAAK,EAAE,EARqB;EAS5BC,SAAS,EAAGC,GAAD,IAAiBA;AATA,CAAD,CAA7B;;AAYA,MAAMC,kBAAkB,GAAG,MAA6B;EACtD,MAAMC,OAAO,GAAGf,UAAU,CAACI,OAAD,CAA1B;;EAEA,IAAI,CAACW,OAAL,EAAc;IACZ,MAAM,IAAIC,KAAJ,CACH,yFADG,CAAN;EAGD;;EAED,OAAOD,OAAP;AACD,CAVD;;AAYA,MAAME,eAAe,GAAG,CAAC;EAACC,MAAD;EAASC;AAAT,CAAD,KAA+B;EACrD,oBAAO,oBAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAED;EAAzB,GAAkCC,QAAlC,CAAP;AACD,CAFD;;AAIA,SAAQF,eAAR,EAAyBH,kBAAzB"}
1
+ {"version":3,"file":"template-context.js","names":["React","createContext","useContext","mockTranslate","defaultBrandTheme","defaultTheme","defaultMobileTranslations","Context","theme","brandTheme","translations","display","headerHeight","statusBarHeight","store","translate","useTemplateContext","context","Error","TemplateContext","values","children"],"sources":["../../../src/template/app-review/template-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {Analytics} from '../../variables/analytics';\nimport {Brand, defaultBrandTheme} from '../../variables/brand.native';\nimport defaultTheme, {Theme} from '../../variables/theme.native';\nimport defaultMobileTranslations, {Translations} from '../../variables/default-mobile-translations';\nimport {Vibration} from '../../variables/vibration';\n\nexport type HandleBlur = () => void;\nexport type HandleFocus = (id: string) => () => void;\nexport type FocusedSelectId = string | null;\n\nexport type TemplateContextValues = {\n analytics?: Analytics;\n brandTheme: Brand;\n theme: Theme;\n translations: Translations;\n vibration?: Vibration;\n display: {\n headerHeight: number;\n statusBarHeight: number;\n };\n store: {\n focusedSelectId?: FocusedSelectId;\n handleBlur?: HandleBlur;\n handleFocus?: HandleFocus;\n };\n translate: (key: string, data?: Record<string, string>) => string;\n};\n\ntype Props = {values: TemplateContextValues; children: ReactNode};\n\nconst Context = createContext({\n theme: defaultTheme,\n brandTheme: defaultBrandTheme,\n translations: defaultMobileTranslations,\n display: {\n headerHeight: 67,\n statusBarHeight: 42\n },\n store: {},\n translate: mockTranslate\n});\n\nconst useTemplateContext = (): TemplateContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error(\n `❌ [TemplateContext] useTemplateContext must be used within a provider <TemplateContext>`\n );\n }\n\n return context;\n};\n\nconst TemplateContext = ({values, children}: Props) => {\n return <Context.Provider value={values}>{children}</Context.Provider>;\n};\n\nexport {TemplateContext, useTemplateContext};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,aAAf,EAAyCC,UAAzC,QAA0D,OAA1D;AACA,SAAQC,aAAR,QAA4B,yBAA5B;AAEA,SAAeC,iBAAf,QAAuC,8BAAvC;AACA,OAAOC,YAAP,MAAkC,8BAAlC;AACA,OAAOC,yBAAP,MAAsD,6CAAtD;AA2BA,MAAMC,OAAO,gBAAGN,aAAa,CAAC;EAC5BO,KAAK,EAAEH,YADqB;EAE5BI,UAAU,EAAEL,iBAFgB;EAG5BM,YAAY,EAAEJ,yBAHc;EAI5BK,OAAO,EAAE;IACPC,YAAY,EAAE,EADP;IAEPC,eAAe,EAAE;EAFV,CAJmB;EAQ5BC,KAAK,EAAE,EARqB;EAS5BC,SAAS,EAAEZ;AATiB,CAAD,CAA7B;;AAYA,MAAMa,kBAAkB,GAAG,MAA6B;EACtD,MAAMC,OAAO,GAAGf,UAAU,CAACK,OAAD,CAA1B;;EAEA,IAAI,CAACU,OAAL,EAAc;IACZ,MAAM,IAAIC,KAAJ,CACH,yFADG,CAAN;EAGD;;EAED,OAAOD,OAAP;AACD,CAVD;;AAYA,MAAME,eAAe,GAAG,CAAC;EAACC,MAAD;EAASC;AAAT,CAAD,KAA+B;EACrD,oBAAO,oBAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAED;EAAzB,GAAkCC,QAAlC,CAAP;AACD,CAFD;;AAIA,SAAQF,eAAR,EAAyBH,kBAAzB"}
@@ -15,6 +15,7 @@ declare namespace Discipline {
15
15
  onError: PropTypes.Requireable<(...args: any[]) => any>;
16
16
  autoplay: PropTypes.Requireable<boolean>;
17
17
  disableAutostart: PropTypes.Requireable<boolean>;
18
+ loading: PropTypes.Requireable<boolean>;
18
19
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
19
20
  file: PropTypes.Requireable<any>;
20
21
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -2,6 +2,7 @@ export default Provider;
2
2
  import WebContext from "./web-context";
3
3
  import { useWebContext } from "./web-context";
4
4
  export function GetSkinFromContext(legacyContext: any): any;
5
+ export function GetTranslateFromContext(legacyContext: any): any;
5
6
  declare class Provider extends React.Component<any, any, any> {
6
7
  static propTypes: {
7
8
  history: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/index.js"],"names":[],"mappings":";;;AAqGA,4DAMC;AAnDD;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQE;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKE;IAEF;;;;MAQC;IAED,sCAKC;IADC;;;;;MAA+D;IAGjE;;;;;MAEC;CAMF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/index.js"],"names":[],"mappings":";;;AAqGA,4DAMC;AAED,iEAKC;AA1DD;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQE;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKE;IAEF;;;;MAQC;IAED,sCAKC;IADC;;;;;MAA+D;IAGjE;;;;;MAEC;CAMF"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.GetSkinFromContext = void 0;
4
+ exports.default = exports.GetTranslateFromContext = exports.GetSkinFromContext = void 0;
5
5
 
6
6
  var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
7
7
 
@@ -144,6 +144,15 @@ const GetSkinFromContext = legacyContext => {
144
144
  };
145
145
 
146
146
  exports.GetSkinFromContext = GetSkinFromContext;
147
+
148
+ const GetTranslateFromContext = legacyContext => {
149
+ const context = (0, _webContext.useWebContext)();
150
+ const legacyTranslate = (0, _get2.default)('translate', legacyContext);
151
+ const translate = (0, _getOr2.default)(legacyTranslate, 'translate', context);
152
+ return translate;
153
+ };
154
+
155
+ exports.GetTranslateFromContext = GetTranslateFromContext;
147
156
  var _default = Provider;
148
157
  exports.default = _default;
149
158
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","PropTypes","shape","createHref","func","push","skinShape","objectOf","ColorPropType","images","SrcPropType","logo","login","icons","HexPropType","mod","courses","arrayOf","texts","translateShape","Provider","React","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","childContextTypes","object","propTypes","node","isRequired","GetSkinFromContext","legacyContext","useWebContext","legacySkin"],"sources":["../../../src/atom/provider/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {defaultsDeep, get, getOr} from 'lodash/fp';\nimport {SrcPropType, ColorPropType, HexPropType} from '../../util/proptypes';\nimport WebContext, {useWebContext} from './web-context';\n\nconst DEFAULT_SKIN = {\n common: {\n good: '#24b694',\n bad: '#ed1c24',\n primary: '#00B0FF',\n life: '#ed1c24',\n brand: '#00B0FF',\n primaryAdd1: '#B3E5FC',\n primaryAdd2: '#0091EA',\n primaryAdd3: '#0277BD',\n primaryAdd4: '#015798',\n xtraLightGrey: '#FAFAFA',\n light: '#ECEFF1',\n medium: '#90A4AE',\n dark: '#546E7A',\n grey: '#607D8B',\n orangeAdd: '#FF7043',\n orange: '#FFA000',\n positive: '#3EC483',\n lightGreen: '#66BB6A',\n negative: '#F73F52',\n battle: '#FFE100',\n white: '#FFFFFF',\n black: '#14171A'\n }\n};\n\nconst mergeSkin = (skin = {}) => defaultsDeep(DEFAULT_SKIN, skin);\n\nconst historyShape = PropTypes.shape({\n createHref: PropTypes.func,\n push: PropTypes.func\n});\n\nconst skinShape = PropTypes.shape({\n common: PropTypes.objectOf(ColorPropType),\n images: PropTypes.shape({\n 'logo-mobile': SrcPropType,\n logo: SrcPropType,\n 'logo-email': SrcPropType,\n login: SrcPropType\n }),\n icons: PropTypes.objectOf(HexPropType),\n mod: PropTypes.objectOf(ColorPropType),\n courses: PropTypes.arrayOf(ColorPropType),\n texts: PropTypes.objectOf(ColorPropType)\n});\n\nconst translateShape = PropTypes.func;\n\nclass Provider extends React.Component {\n static propTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n children: PropTypes.node.isRequired,\n Vimeo: PropTypes.shape({\n common: PropTypes.func\n })\n };\n\n static childContextTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n Vimeo: PropTypes.object\n };\n\n static getDerivedStateFromProps(props) {\n const {history, skin, translate} = props;\n\n return {\n history,\n skin: mergeSkin(skin),\n translate\n };\n }\n\n constructor(props, context) {\n super(props, context);\n const {history, skin, translate, Vimeo} = props;\n // eslint-disable-next-line react/no-unused-state\n this.state = {history, skin: mergeSkin(skin), translate, Vimeo};\n }\n\n getChildContext() {\n return this.state;\n }\n\n render() {\n const {children} = this.props;\n return React.Children.only(children);\n }\n}\n\nconst GetSkinFromContext = legacyContext => {\n const context = useWebContext();\n const legacySkin = get('skin', legacyContext);\n const skin = getOr(legacySkin, 'skin', context);\n\n return skin;\n};\n\nexport {WebContext, useWebContext, GetSkinFromContext};\nexport default Provider;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,MAAM,EAAE;IACNC,IAAI,EAAE,SADA;IAENC,GAAG,EAAE,SAFC;IAGNC,OAAO,EAAE,SAHH;IAINC,IAAI,EAAE,SAJA;IAKNC,KAAK,EAAE,SALD;IAMNC,WAAW,EAAE,SANP;IAONC,WAAW,EAAE,SAPP;IAQNC,WAAW,EAAE,SARP;IASNC,WAAW,EAAE,SATP;IAUNC,aAAa,EAAE,SAVT;IAWNC,KAAK,EAAE,SAXD;IAYNC,MAAM,EAAE,SAZF;IAaNC,IAAI,EAAE,SAbA;IAcNC,IAAI,EAAE,SAdA;IAeNC,SAAS,EAAE,SAfL;IAgBNC,MAAM,EAAE,SAhBF;IAiBNC,QAAQ,EAAE,SAjBJ;IAkBNC,UAAU,EAAE,SAlBN;IAmBNC,QAAQ,EAAE,SAnBJ;IAoBNC,MAAM,EAAE,SApBF;IAqBNC,KAAK,EAAE,SArBD;IAsBNC,KAAK,EAAE;EAtBD;AADW,CAArB;;AA2BA,MAAMC,SAAS,GAAG,CAACC,IAAI,GAAG,EAAR,KAAe,4BAAazB,YAAb,EAA2ByB,IAA3B,CAAjC;;AAEA,MAAMC,YAAY,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EACnCC,UAAU,EAAEF,kBAAA,CAAUG,IADa;EAEnCC,IAAI,EAAEJ,kBAAA,CAAUG;AAFmB,CAAhB,CAArB;;AAKA,MAAME,SAAS,GAAGL,kBAAA,CAAUC,KAAV,CAAgB;EAChC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AKT,KAAxB;IACA,OAAOH,cAAA,CAAMa,QAAN,CAAeC,IAAf,CAAoBF,QAApB,CAAP;EACD;;AA1CoC;;AAAjCb,Q,CAWGgB,iB,GAAoB;EACzBX,OAAO,EAAEzB,YADgB;EAEzBD,IAAI,EAAEO,SAFmB;EAGzBoB,SAAS,EAAEP,cAHc;EAIzBU,KAAK,EAAE5B,kBAAA,CAAUoC;AAJQ,C;AAXvBjB,Q,CACGkB,S,2CAAY;EACjBb,OAAO,EAAEzB,YADQ;EAEjBD,IAAI,EAAEO,SAFW;EAGjBoB,SAAS,EAAEP,cAHM;EAIjBc,QAAQ,EAAEhC,kBAAA,CAAUsC,IAAV,CAAeC,UAJR;EAKjBX,KAAK,EAAE5B,kBAAA,CAAUC,KAAV,CAAgB;IACrB3B,MAAM,EAAE0B,kBAAA,CAAUG;EADG,CAAhB;AALU,C;;AA4CrB,MAAMqC,kBAAkB,GAAGC,aAAa,IAAI;EAC1C,MAAMd,OAAO,GAAG,IAAAe,yBAAA,GAAhB;EACA,MAAMC,UAAU,GAAG,mBAAI,MAAJ,EAAYF,aAAZ,CAAnB;EACA,MAAM3C,IAAI,GAAG,qBAAM6C,UAAN,EAAkB,MAAlB,EAA0BhB,OAA1B,CAAb;EAEA,OAAO7B,IAAP;AACD,CAND;;;eASeqB,Q"}
1
+ {"version":3,"file":"index.js","names":["DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","PropTypes","shape","createHref","func","push","skinShape","objectOf","ColorPropType","images","SrcPropType","logo","login","icons","HexPropType","mod","courses","arrayOf","texts","translateShape","Provider","React","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","childContextTypes","object","propTypes","node","isRequired","GetSkinFromContext","legacyContext","useWebContext","legacySkin","GetTranslateFromContext","legacyTranslate"],"sources":["../../../src/atom/provider/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {defaultsDeep, get, getOr} from 'lodash/fp';\nimport {SrcPropType, ColorPropType, HexPropType} from '../../util/proptypes';\nimport WebContext, {useWebContext} from './web-context';\n\nconst DEFAULT_SKIN = {\n common: {\n good: '#24b694',\n bad: '#ed1c24',\n primary: '#00B0FF',\n life: '#ed1c24',\n brand: '#00B0FF',\n primaryAdd1: '#B3E5FC',\n primaryAdd2: '#0091EA',\n primaryAdd3: '#0277BD',\n primaryAdd4: '#015798',\n xtraLightGrey: '#FAFAFA',\n light: '#ECEFF1',\n medium: '#90A4AE',\n dark: '#546E7A',\n grey: '#607D8B',\n orangeAdd: '#FF7043',\n orange: '#FFA000',\n positive: '#3EC483',\n lightGreen: '#66BB6A',\n negative: '#F73F52',\n battle: '#FFE100',\n white: '#FFFFFF',\n black: '#14171A'\n }\n};\n\nconst mergeSkin = (skin = {}) => defaultsDeep(DEFAULT_SKIN, skin);\n\nconst historyShape = PropTypes.shape({\n createHref: PropTypes.func,\n push: PropTypes.func\n});\n\nconst skinShape = PropTypes.shape({\n common: PropTypes.objectOf(ColorPropType),\n images: PropTypes.shape({\n 'logo-mobile': SrcPropType,\n logo: SrcPropType,\n 'logo-email': SrcPropType,\n login: SrcPropType\n }),\n icons: PropTypes.objectOf(HexPropType),\n mod: PropTypes.objectOf(ColorPropType),\n courses: PropTypes.arrayOf(ColorPropType),\n texts: PropTypes.objectOf(ColorPropType)\n});\n\nconst translateShape = PropTypes.func;\n\nclass Provider extends React.Component {\n static propTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n children: PropTypes.node.isRequired,\n Vimeo: PropTypes.shape({\n common: PropTypes.func\n })\n };\n\n static childContextTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n Vimeo: PropTypes.object\n };\n\n static getDerivedStateFromProps(props) {\n const {history, skin, translate} = props;\n\n return {\n history,\n skin: mergeSkin(skin),\n translate\n };\n }\n\n constructor(props, context) {\n super(props, context);\n const {history, skin, translate, Vimeo} = props;\n // eslint-disable-next-line react/no-unused-state\n this.state = {history, skin: mergeSkin(skin), translate, Vimeo};\n }\n\n getChildContext() {\n return this.state;\n }\n\n render() {\n const {children} = this.props;\n return React.Children.only(children);\n }\n}\n\nconst GetSkinFromContext = legacyContext => {\n const context = useWebContext();\n const legacySkin = get('skin', legacyContext);\n const skin = getOr(legacySkin, 'skin', context);\n\n return skin;\n};\n\nconst GetTranslateFromContext = legacyContext => {\n const context = useWebContext();\n const legacyTranslate = get('translate', legacyContext);\n const translate = getOr(legacyTranslate, 'translate', context);\n return translate;\n};\n\nexport {WebContext, useWebContext, GetSkinFromContext, GetTranslateFromContext};\nexport default Provider;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,MAAM,EAAE;IACNC,IAAI,EAAE,SADA;IAENC,GAAG,EAAE,SAFC;IAGNC,OAAO,EAAE,SAHH;IAINC,IAAI,EAAE,SAJA;IAKNC,KAAK,EAAE,SALD;IAMNC,WAAW,EAAE,SANP;IAONC,WAAW,EAAE,SAPP;IAQNC,WAAW,EAAE,SARP;IASNC,WAAW,EAAE,SATP;IAUNC,aAAa,EAAE,SAVT;IAWNC,KAAK,EAAE,SAXD;IAYNC,MAAM,EAAE,SAZF;IAaNC,IAAI,EAAE,SAbA;IAcNC,IAAI,EAAE,SAdA;IAeNC,SAAS,EAAE,SAfL;IAgBNC,MAAM,EAAE,SAhBF;IAiBNC,QAAQ,EAAE,SAjBJ;IAkBNC,UAAU,EAAE,SAlBN;IAmBNC,QAAQ,EAAE,SAnBJ;IAoBNC,MAAM,EAAE,SApBF;IAqBNC,KAAK,EAAE,SArBD;IAsBNC,KAAK,EAAE;EAtBD;AADW,CAArB;;AA2BA,MAAMC,SAAS,GAAG,CAACC,IAAI,GAAG,EAAR,KAAe,4BAAazB,YAAb,EAA2ByB,IAA3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,EAAoClB,OAApC,CAAlB;EACA,OAAOF,SAAP;AACD,CALD;;;eAQeN,Q"}
@@ -6,7 +6,7 @@ declare type Skin = {
6
6
  };
7
7
  declare type WebContextValues = {
8
8
  skin?: Skin;
9
- translate: (key: string, data?: unknown) => string;
9
+ translate: (key: string, data?: Record<string, string>) => string;
10
10
  };
11
11
  declare type Props = WebContextValues & {
12
12
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"web-context.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/web-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAElE,aAAK,IAAI,GAAG;IACV,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CACpD,CAAC;AAMF,aAAK,KAAK,GAAG,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,UAAU,2BAA0B,KAAK,gBAE9C,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,gBAQhC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"web-context.d.ts","sourceRoot":"","sources":["../../../src/atom/provider/web-context.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,SAAS,EAAa,MAAM,OAAO,CAAC;AAGlE,aAAK,IAAI,GAAG;IACV,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;CACnE,CAAC;AAMF,aAAK,KAAK,GAAG,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,UAAU,2BAA0B,KAAK,gBAE9C,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,gBAQhC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -5,6 +5,8 @@ exports.useWebContext = exports.default = void 0;
5
5
 
6
6
  var _react = _interopRequireWildcard(require("react"));
7
7
 
8
+ var _translate = require("@coorpacademy/translate");
9
+
8
10
  const _excluded = ["children"];
9
11
 
10
12
  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); }
@@ -14,7 +16,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
14
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
17
 
16
18
  const Context = /*#__PURE__*/(0, _react.createContext)({
17
- translate: key => key
19
+ translate: _translate.mockTranslate
18
20
  });
19
21
 
20
22
  const WebContext = _ref => {
@@ -1 +1 @@
1
- {"version":3,"file":"web-context.js","names":["Context","createContext","translate","key","WebContext","children","value","useWebContext","context","useContext","Error"],"sources":["../../../src/atom/provider/web-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\n\ntype Skin = {\n common: {\n primary: string;\n };\n};\n\ntype WebContextValues = {\n skin?: Skin;\n translate: (key: string, data?: unknown) => string;\n};\n\nconst Context = createContext({\n translate: (key: string) => key\n});\n\ntype Props = WebContextValues & {\n children: ReactNode;\n};\n\nconst WebContext = ({children, ...value}: Props) => {\n return <Context.Provider value={value}>{children}</Context.Provider>;\n};\n\nexport const useWebContext = (): WebContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');\n }\n\n return context;\n};\n\nexport default WebContext;\n"],"mappings":";;;;;AAAA;;;;;;;;;;AAaA,MAAMA,OAAO,gBAAG,IAAAC,oBAAA,EAAc;EAC5BC,SAAS,EAAGC,GAAD,IAAiBA;AADA,CAAd,CAAhB;;AAQA,MAAMC,UAAU,GAAG,QAAiC;EAAA,IAAhC;IAACC;EAAD,CAAgC;EAAA,IAAlBC,KAAkB;;EAClD,oBAAO,6BAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAEA;EAAzB,GAAiCD,QAAjC,CAAP;AACD,CAFD;;AAIO,MAAME,aAAa,GAAG,MAAwB;EACnD,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAWT,OAAX,CAAhB;;EAEA,IAAI,CAACQ,OAAL,EAAc;IACZ,MAAM,IAAIE,KAAJ,CAAU,0EAAV,CAAN;EACD;;EAED,OAAOF,OAAP;AACD,CARM;;;eAUQJ,U"}
1
+ {"version":3,"file":"web-context.js","names":["Context","createContext","translate","mockTranslate","WebContext","children","value","useWebContext","context","useContext","Error"],"sources":["../../../src/atom/provider/web-context.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext} from 'react';\nimport {mockTranslate} from '@coorpacademy/translate';\n\ntype Skin = {\n common: {\n primary: string;\n };\n};\n\ntype WebContextValues = {\n skin?: Skin;\n translate: (key: string, data?: Record<string, string>) => string;\n};\n\nconst Context = createContext({\n translate: mockTranslate\n});\n\ntype Props = WebContextValues & {\n children: ReactNode;\n};\n\nconst WebContext = ({children, ...value}: Props) => {\n return <Context.Provider value={value}>{children}</Context.Provider>;\n};\n\nexport const useWebContext = (): WebContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');\n }\n\n return context;\n};\n\nexport default WebContext;\n"],"mappings":";;;;;AAAA;;AACA;;;;;;;;;;AAaA,MAAMA,OAAO,gBAAG,IAAAC,oBAAA,EAAc;EAC5BC,SAAS,EAAEC;AADiB,CAAd,CAAhB;;AAQA,MAAMC,UAAU,GAAG,QAAiC;EAAA,IAAhC;IAACC;EAAD,CAAgC;EAAA,IAAlBC,KAAkB;;EAClD,oBAAO,6BAAC,OAAD,CAAS,QAAT;IAAkB,KAAK,EAAEA;EAAzB,GAAiCD,QAAjC,CAAP;AACD,CAFD;;AAIO,MAAME,aAAa,GAAG,MAAwB;EACnD,MAAMC,OAAO,GAAG,IAAAC,iBAAA,EAAWT,OAAX,CAAhB;;EAEA,IAAI,CAACQ,OAAL,EAAc;IACZ,MAAM,IAAIE,KAAJ,CAAU,0EAAV,CAAN;EACD;;EAED,OAAOF,OAAP;AACD,CARM;;;eAUQJ,U"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-header-step-item/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAiCvD,QAAA,MAAM,oBAAoB;YAAW,mBAAmB;;;;;;CAevD,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-header-step-item/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAsDvD,QAAA,MAAM,oBAAoB;YAAW,mBAAmB;;;;;;CAevD,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
@@ -9,34 +9,50 @@ var _classnames = _interopRequireDefault(require("classnames"));
9
9
 
10
10
  var _novaIcons = require("@coorpacademy/nova-icons");
11
11
 
12
+ var _provider = require("../provider");
13
+
12
14
  var _style = _interopRequireDefault(require("./style.css"));
13
15
 
14
16
  var _types = _interopRequireDefault(require("./types"));
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
- const Content = ({
19
- icon,
20
- current,
21
- value
22
- }) => {
20
+ const Content = props => {
21
+ const {
22
+ icon,
23
+ current,
24
+ value
25
+ } = props;
26
+ const translate = (0, _provider.GetTranslateFromContext)();
23
27
  let child;
28
+ let ariaDescription;
24
29
 
25
30
  switch (icon) {
26
31
  case 'no-answer':
27
32
  child = value;
33
+ ariaDescription = current ? translate('review_header_step_item.current_question', {
34
+ headerStepValue: value
35
+ }) : translate('review_header_step_item.not_answered_question', {
36
+ headerStepValue: value
37
+ });
28
38
  break;
29
39
 
30
40
  case 'right':
31
41
  child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyCheck, {
32
42
  className: (0, _classnames.default)(_style.default.rightIcon, current && _style.default.currentRightIcon)
33
43
  });
44
+ ariaDescription = translate('review_header_step_item.correct_question', {
45
+ headerStepValue: value
46
+ });
34
47
  break;
35
48
 
36
49
  case 'wrong':
37
50
  child = /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
38
51
  className: (0, _classnames.default)(_style.default.wrongIcon, current && _style.default.currentWrongIcon)
39
52
  });
53
+ ariaDescription = translate('review_header_step_item.incorrect_question', {
54
+ headerStepValue: value
55
+ });
40
56
  break;
41
57
 
42
58
  default:
@@ -45,7 +61,10 @@ const Content = ({
45
61
 
46
62
  return /*#__PURE__*/_react.default.createElement("span", {
47
63
  className: _style.default.value,
48
- "aria-label": `step ${value}`
64
+ "aria-label": translate('review_header_step_item.aria_label', {
65
+ headerStepValue: value
66
+ }),
67
+ "aria-describedby": ariaDescription
49
68
  }, child);
50
69
  };
51
70
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Content","icon","current","value","child","classnames","style","rightIcon","currentRightIcon","wrongIcon","currentWrongIcon","ReviewHeaderStepItem","props","default","right","wrong","propTypes"],"sources":["../../../src/atom/review-header-step-item/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes, {HeaderStepItemProps} from './types';\n\nconst Content = ({icon, current, value}: HeaderStepItemProps) => {\n let child;\n\n switch (icon) {\n case 'no-answer':\n child = value;\n break;\n\n case 'right':\n child = (\n <RightIcon className={classnames(style.rightIcon, current && style.currentRightIcon)} />\n );\n break;\n\n case 'wrong':\n child = (\n <WrongIcon className={classnames(style.wrongIcon, current && style.currentWrongIcon)} />\n );\n break;\n\n default:\n return null;\n }\n\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n {child}\n </span>\n );\n};\n\nconst ReviewHeaderStepItem = (props: HeaderStepItemProps) => {\n const {icon, current} = props;\n return (\n <div\n className={classnames(\n style.default,\n icon === 'right' && style.right,\n icon === 'wrong' && style.wrong,\n current && style.current\n )}\n data-name=\"header-step-item\"\n >\n <Content {...props} />\n </div>\n );\n};\n\nReviewHeaderStepItem.propTypes = propTypes;\n\nexport default ReviewHeaderStepItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,CAAC;EAACC,IAAD;EAAOC,OAAP;EAAgBC;AAAhB,CAAD,KAAiD;EAC/D,IAAIC,KAAJ;;EAEA,QAAQH,IAAR;IACE,KAAK,WAAL;MACEG,KAAK,GAAGD,KAAR;MACA;;IAEF,KAAK,OAAL;MACEC,KAAK,gBACH,6BAAC,2CAAD;QAAW,SAAS,EAAE,IAAAC,mBAAA,EAAWC,cAAA,CAAMC,SAAjB,EAA4BL,OAAO,IAAII,cAAA,CAAME,gBAA7C;MAAtB,EADF;MAGA;;IAEF,KAAK,OAAL;MACEJ,KAAK,gBACH,6BAAC,+BAAD;QAAW,SAAS,EAAE,IAAAC,mBAAA,EAAWC,cAAA,CAAMG,SAAjB,EAA4BP,OAAO,IAAII,cAAA,CAAMI,gBAA7C;MAAtB,EADF;MAGA;;IAEF;MACE,OAAO,IAAP;EAlBJ;;EAqBA,oBACE;IAAM,SAAS,EAAEJ,cAAA,CAAMH,KAAvB;IAA8B,cAAa,QAAOA,KAAM;EAAxD,GACGC,KADH,CADF;AAKD,CA7BD;;AA+BA,MAAMO,oBAAoB,GAAIC,KAAD,IAAgC;EAC3D,MAAM;IAACX,IAAD;IAAOC;EAAP,IAAkBU,KAAxB;EACA,oBACE;IACE,SAAS,EAAE,IAAAP,mBAAA,EACTC,cAAA,CAAMO,OADG,EAETZ,IAAI,KAAK,OAAT,IAAoBK,cAAA,CAAMQ,KAFjB,EAGTb,IAAI,KAAK,OAAT,IAAoBK,cAAA,CAAMS,KAHjB,EAITb,OAAO,IAAII,cAAA,CAAMJ,OAJR,CADb;IAOE,aAAU;EAPZ,gBASE,6BAAC,OAAD,EAAaU,KAAb,CATF,CADF;AAaD,CAfD;;AAiBAD,oBAAoB,CAACK,SAArB,2CAAiCA,cAAjC;eAEeL,oB"}
1
+ {"version":3,"file":"index.js","names":["Content","props","icon","current","value","translate","GetTranslateFromContext","child","ariaDescription","headerStepValue","classnames","style","rightIcon","currentRightIcon","wrongIcon","currentWrongIcon","ReviewHeaderStepItem","default","right","wrong","propTypes"],"sources":["../../../src/atom/review-header-step-item/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport {GetTranslateFromContext} from '../provider';\nimport style from './style.css';\nimport propTypes, {HeaderStepItemProps} from './types';\n\nconst Content = (props: HeaderStepItemProps) => {\n const {icon, current, value} = props;\n const translate = GetTranslateFromContext();\n let child;\n let ariaDescription;\n switch (icon) {\n case 'no-answer':\n child = value;\n ariaDescription = current\n ? translate('review_header_step_item.current_question', {\n headerStepValue: value\n })\n : translate('review_header_step_item.not_answered_question', {\n headerStepValue: value\n });\n break;\n\n case 'right':\n child = (\n <RightIcon className={classnames(style.rightIcon, current && style.currentRightIcon)} />\n );\n ariaDescription = translate('review_header_step_item.correct_question', {\n headerStepValue: value\n });\n break;\n\n case 'wrong':\n child = (\n <WrongIcon className={classnames(style.wrongIcon, current && style.currentWrongIcon)} />\n );\n ariaDescription = translate('review_header_step_item.incorrect_question', {\n headerStepValue: value\n });\n break;\n\n default:\n return null;\n }\n\n return (\n <span\n className={style.value}\n aria-label={translate('review_header_step_item.aria_label', {\n headerStepValue: value\n })}\n aria-describedby={ariaDescription}\n >\n {child}\n </span>\n );\n};\n\nconst ReviewHeaderStepItem = (props: HeaderStepItemProps) => {\n const {icon, current} = props;\n return (\n <div\n className={classnames(\n style.default,\n icon === 'right' && style.right,\n icon === 'wrong' && style.wrong,\n current && style.current\n )}\n data-name=\"header-step-item\"\n >\n <Content {...props} />\n </div>\n );\n};\n\nReviewHeaderStepItem.propTypes = propTypes;\n\nexport default ReviewHeaderStepItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAIC,KAAD,IAAgC;EAC9C,MAAM;IAACC,IAAD;IAAOC,OAAP;IAAgBC;EAAhB,IAAyBH,KAA/B;EACA,MAAMI,SAAS,GAAG,IAAAC,iCAAA,GAAlB;EACA,IAAIC,KAAJ;EACA,IAAIC,eAAJ;;EACA,QAAQN,IAAR;IACE,KAAK,WAAL;MACEK,KAAK,GAAGH,KAAR;MACAI,eAAe,GAAGL,OAAO,GACrBE,SAAS,CAAC,0CAAD,EAA6C;QACpDI,eAAe,EAAEL;MADmC,CAA7C,CADY,GAIrBC,SAAS,CAAC,+CAAD,EAAkD;QACzDI,eAAe,EAAEL;MADwC,CAAlD,CAJb;MAOA;;IAEF,KAAK,OAAL;MACEG,KAAK,gBACH,6BAAC,2CAAD;QAAW,SAAS,EAAE,IAAAG,mBAAA,EAAWC,cAAA,CAAMC,SAAjB,EAA4BT,OAAO,IAAIQ,cAAA,CAAME,gBAA7C;MAAtB,EADF;MAGAL,eAAe,GAAGH,SAAS,CAAC,0CAAD,EAA6C;QACtEI,eAAe,EAAEL;MADqD,CAA7C,CAA3B;MAGA;;IAEF,KAAK,OAAL;MACEG,KAAK,gBACH,6BAAC,+BAAD;QAAW,SAAS,EAAE,IAAAG,mBAAA,EAAWC,cAAA,CAAMG,SAAjB,EAA4BX,OAAO,IAAIQ,cAAA,CAAMI,gBAA7C;MAAtB,EADF;MAGAP,eAAe,GAAGH,SAAS,CAAC,4CAAD,EAA+C;QACxEI,eAAe,EAAEL;MADuD,CAA/C,CAA3B;MAGA;;IAEF;MACE,OAAO,IAAP;EA/BJ;;EAkCA,oBACE;IACE,SAAS,EAAEO,cAAA,CAAMP,KADnB;IAEE,cAAYC,SAAS,CAAC,oCAAD,EAAuC;MAC1DI,eAAe,EAAEL;IADyC,CAAvC,CAFvB;IAKE,oBAAkBI;EALpB,GAOGD,KAPH,CADF;AAWD,CAlDD;;AAoDA,MAAMS,oBAAoB,GAAIf,KAAD,IAAgC;EAC3D,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAkBF,KAAxB;EACA,oBACE;IACE,SAAS,EAAE,IAAAS,mBAAA,EACTC,cAAA,CAAMM,OADG,EAETf,IAAI,KAAK,OAAT,IAAoBS,cAAA,CAAMO,KAFjB,EAGThB,IAAI,KAAK,OAAT,IAAoBS,cAAA,CAAMQ,KAHjB,EAIThB,OAAO,IAAIQ,cAAA,CAAMR,OAJR,CADb;IAOE,aAAU;EAPZ,gBASE,6BAAC,OAAD,EAAaF,KAAb,CATF,CADF;AAaD,CAfD;;AAiBAe,oBAAoB,CAACI,SAArB,2CAAiCA,cAAjC;eAEeJ,oB"}
@@ -1 +1 @@
1
- {"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
1
+ {"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module '@coorpacademy/translate';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
@@ -17,6 +17,7 @@ export declare const MediaViewPropTypes: {
17
17
  onError: PropTypes.Requireable<(...args: any[]) => any>;
18
18
  autoplay: PropTypes.Requireable<boolean>;
19
19
  disableAutostart: PropTypes.Requireable<boolean>;
20
+ loading: PropTypes.Requireable<boolean>;
20
21
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
21
22
  file: PropTypes.Requireable<any>;
22
23
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -80,6 +81,7 @@ declare const propTypes: {
80
81
  onError: PropTypes.Requireable<(...args: any[]) => any>;
81
82
  autoplay: PropTypes.Requireable<boolean>;
82
83
  disableAutostart: PropTypes.Requireable<boolean>;
84
+ loading: PropTypes.Requireable<boolean>;
83
85
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
84
86
  file: PropTypes.Requireable<any>;
85
87
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/answer/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAGzC,eAAO,MAAM,UAAU,QAAQ,CAAC;AAChC,eAAO,MAAM,UAAU,UAAU,CAAC;AAClC,eAAO,MAAM,UAAU,UAAU,CAAC;AAmBlC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE9B,CAAC;AAqBF,QAAA,MAAM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ACzF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;QAC5C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -16,6 +16,7 @@ declare class DisciplineHeader extends React.Component<any, any, any> {
16
16
  onError: PropTypes.Requireable<(...args: any[]) => any>;
17
17
  autoplay: PropTypes.Requireable<boolean>;
18
18
  disableAutostart: PropTypes.Requireable<boolean>;
19
+ loading: PropTypes.Requireable<boolean>;
19
20
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
20
21
  file: PropTypes.Requireable<any>;
21
22
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA2BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKE;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,yBAEC;IAED,sBAsCC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA2BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKE;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,yBAEC;IAED,sBAsCC;CACF"}
@@ -12,6 +12,7 @@ export declare type MediaType = 'img' | 'audio' | 'video' | 'pdf';
12
12
  export declare type Media = {
13
13
  type?: MediaType;
14
14
  description?: string;
15
+ loading?: boolean;
15
16
  mimeType?: ResourceMimeType;
16
17
  _id?: string;
17
18
  mediaUrl?: Url;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/questions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAEhE,aAAK,GAAG,GAAG,MAAM,CAAC;AAElB,aAAK,aAAa,GACd,qBAAqB,GACrB,sBAAsB,GACtB,qBAAqB,GACrB,wBAAwB,GACxB,mBAAmB,CAAC;AAExB,aAAK,gBAAgB,GACjB,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,iBAAiB,GACjB,aAAa,CAAC;AAElB,oBAAY,MAAM,GAAG;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAE1D,oBAAY,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,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@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/molecule/questions/types.ts"],"sourcesContent":["import {ChoiceItem} from '../../atom/select-modal/index.native';\n\ntype Url = string;\n\ntype VideoMimeType =\n | 'application/kontiki'\n | 'application/jwplayer'\n | 'application/youtube'\n | 'application/omniPlayer'\n | 'application/vimeo';\n\ntype ResourceMimeType =\n | 'video/mp4'\n | 'audio/acc'\n | 'image/jpeg'\n | 'image/png'\n | 'application/pdf'\n | VideoMimeType;\n\nexport type Source = {\n _id?: string;\n mimeType?: ResourceMimeType;\n url: Url;\n videoId?: string;\n};\n\nexport type MediaType = 'img' | 'audio' | 'video' | 'pdf';\n\nexport type Media = {\n type?: MediaType;\n description?: string;\n mimeType?: ResourceMimeType;\n _id?: string;\n mediaUrl?: Url;\n url?: Url;\n subtitles?: Array<string>;\n posters?: Array<Url>;\n src?: Array<Source>;\n poster?: string;\n videoId?: string;\n onClick?: () => void;\n onPlay?: () => void;\n onPause?: () => void;\n onResume?: () => void;\n onEnded?: () => void;\n};\n\nexport type QuestionType = 'qcm' | 'qcmGraphic' | 'slider' | 'qcmDrag' | 'basic' | 'template';\n\ntype ChoiceBase = {\n _id: string;\n value?: string;\n name?: string;\n label?: string;\n};\n\nexport type SelectableChoice = {\n _id: string;\n label: string;\n selected: boolean;\n onPress: (value?: string) => void;\n media?: Media;\n};\n\nexport type TemplateTextChoice = {\n type: 'text';\n _id: string;\n name: string;\n value: string;\n label: string;\n selected: boolean;\n};\n\nexport type TemplateListOfChoices = {\n type: 'select';\n _id: string;\n name: string;\n value: string;\n label: string;\n items: Array<ChoiceItem>;\n};\n\nexport type Choice = ChoiceBase | SelectableChoice | TemplateListOfChoices | TemplateTextChoice;\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/molecule/questions/types.ts"],"sourcesContent":["import {ChoiceItem} from '../../atom/select-modal/index.native';\n\ntype Url = string;\n\ntype VideoMimeType =\n | 'application/kontiki'\n | 'application/jwplayer'\n | 'application/youtube'\n | 'application/omniPlayer'\n | 'application/vimeo';\n\ntype ResourceMimeType =\n | 'video/mp4'\n | 'audio/acc'\n | 'image/jpeg'\n | 'image/png'\n | 'application/pdf'\n | VideoMimeType;\n\nexport type Source = {\n _id?: string;\n mimeType?: ResourceMimeType;\n url: Url;\n videoId?: string;\n};\n\nexport type MediaType = 'img' | 'audio' | 'video' | 'pdf';\n\nexport type Media = {\n type?: MediaType;\n description?: string;\n loading?: boolean;\n mimeType?: ResourceMimeType;\n _id?: string;\n mediaUrl?: Url;\n url?: Url;\n subtitles?: Array<string>;\n posters?: Array<Url>;\n src?: Array<Source>;\n poster?: string;\n videoId?: string;\n onClick?: () => void;\n onPlay?: () => void;\n onPause?: () => void;\n onResume?: () => void;\n onEnded?: () => void;\n};\n\nexport type QuestionType = 'qcm' | 'qcmGraphic' | 'slider' | 'qcmDrag' | 'basic' | 'template';\n\ntype ChoiceBase = {\n _id: string;\n value?: string;\n name?: string;\n label?: string;\n};\n\nexport type SelectableChoice = {\n _id: string;\n label: string;\n selected: boolean;\n onPress: (value?: string) => void;\n media?: Media;\n};\n\nexport type TemplateTextChoice = {\n type: 'text';\n _id: string;\n name: string;\n value: string;\n label: string;\n selected: boolean;\n};\n\nexport type TemplateListOfChoices = {\n type: 'select';\n _id: string;\n name: string;\n value: string;\n label: string;\n items: Array<ChoiceItem>;\n};\n\nexport type Choice = ChoiceBase | SelectableChoice | TemplateListOfChoices | TemplateTextChoice;\n"],"mappings":""}
@@ -18,6 +18,7 @@ declare class ResourcePlayer extends React.Component<any, any, any> {
18
18
  onError: PropTypes.Requireable<(...args: any[]) => any>;
19
19
  autoplay: PropTypes.Requireable<boolean>;
20
20
  disableAutostart: PropTypes.Requireable<boolean>;
21
+ loading: PropTypes.Requireable<boolean>;
21
22
  jwpOptions: PropTypes.Requireable<PropTypes.InferProps<{
22
23
  file: PropTypes.Requireable<any>;
23
24
  customProps: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/resource-player/index.js"],"names":[],"mappings":"AAWA,+BAAgC;AAChC,6BAA8B;AAC9B,iCAAkC;AAClC,iCAAkC;;AAgGlC;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQE;IAEF,sCAQC;IANC;;;MAGC;IAKH,sBAKC;IAED,sBA0BC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/resource-player/index.js"],"names":[],"mappings":"AAWA,+BAAgC;AAChC,6BAA8B;AAC9B,iCAAkC;AAClC,iCAAkC;;AAgGlC;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQE;IAEF,sCAQC;IANC;;;MAGC;IAKH,sBAKC;IAED,sBA0BC;CACF"}
@@ -12,6 +12,7 @@ declare class VideoPlayer extends React.Component<any, any, any> {
12
12
  onError: import("prop-types").Requireable<(...args: any[]) => any>;
13
13
  autoplay: import("prop-types").Requireable<boolean>;
14
14
  disableAutostart: import("prop-types").Requireable<boolean>;
15
+ loading: import("prop-types").Requireable<boolean>;
15
16
  jwpOptions: import("prop-types").Requireable<import("prop-types").InferProps<{
16
17
  file: import("prop-types").Requireable<any>;
17
18
  customProps: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/video-player/index.js"],"names":[],"mappings":";AAOA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA6B;IAE7B;;;aAOC;IAED,wBAMC;IAJC;;;MAGC;IAGH,+BASE;IAEF,4CAkDE;IAEF,sBAOC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/video-player/index.js"],"names":[],"mappings":";AAQA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA6B;IAE7B;;;aAOC;IAED,wBAMC;IAJC;;;MAGC;IAGH,+BASE;IAEF,4CAoDE;IAEF,sBAOC;CACF"}
@@ -5,6 +5,8 @@ exports.default = void 0;
5
5
 
6
6
  var _react = _interopRequireDefault(require("react"));
7
7
 
8
+ var _loader = _interopRequireDefault(require("../../atom/loader"));
9
+
8
10
  var _videoIframe = _interopRequireDefault(require("../video-iframe"));
9
11
 
10
12
  var _jwplayer = _interopRequireDefault(require("./jwplayer"));
@@ -15,7 +17,7 @@ var _style = _interopRequireDefault(require("./style.css"));
15
17
 
16
18
  var _propTypes = _interopRequireDefault(require("./prop-types"));
17
19
 
18
- const _excluded = ["disableAutostart", "jwpOptions"];
20
+ const _excluded = ["loading", "disableAutostart", "jwpOptions"];
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
@@ -99,12 +101,13 @@ class VideoPlayer extends _react.default.Component {
99
101
  {
100
102
  const _this$props = this.props,
101
103
  {
104
+ loading = false,
102
105
  disableAutostart,
103
106
  jwpOptions
104
107
  } = _this$props,
105
108
  otherProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
106
109
 
107
- return /*#__PURE__*/_react.default.createElement(_jwplayer.default, _extends({}, otherProps, {
110
+ return loading ? /*#__PURE__*/_react.default.createElement(_loader.default, null) : /*#__PURE__*/_react.default.createElement(_jwplayer.default, _extends({}, otherProps, {
108
111
  disableAutostart: disableAutostart,
109
112
  jwpOptions: jwpOptions,
110
113
  onPlay: this.handleOnPlay,