@magmamath/students-features 1.2.1-rc.21 → 1.2.1-rc.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +34 -48
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js +114 -0
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js +5 -1
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js +3 -1
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js +33 -14
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +5 -1
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -1
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +10 -2
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js +2 -0
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +6 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +2 -1
- package/dist/commonjs/shared/translation/localization/de.json +2 -1
- package/dist/commonjs/shared/translation/localization/en.json +2 -1
- package/dist/commonjs/shared/translation/localization/gb.json +2 -1
- package/dist/commonjs/shared/translation/localization/sct.json +2 -1
- package/dist/commonjs/shared/translation/localization/sw.json +2 -1
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js +38 -52
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +1 -1
- package/dist/module/features/pmProgress/components/header/StartButton.js +107 -0
- package/dist/module/features/pmProgress/components/header/StartButton.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/Fluency.js +5 -1
- package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -1
- package/dist/module/features/pmProgress/components/list/ListCard.js +3 -1
- package/dist/module/features/pmProgress/components/list/ListCard.js.map +1 -1
- package/dist/module/features/pmProgress/components/list/ListItem.js +35 -16
- package/dist/module/features/pmProgress/components/list/ListItem.js.map +1 -1
- package/dist/module/features/pmProgress/components/list/PmDomainList.js +5 -1
- package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -1
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +12 -4
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js +2 -0
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -1
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js +5 -0
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +2 -1
- package/dist/module/shared/translation/localization/de.json +2 -1
- package/dist/module/shared/translation/localization/en.json +2 -1
- package/dist/module/shared/translation/localization/gb.json +2 -1
- package/dist/module/shared/translation/localization/sct.json +2 -1
- package/dist/module/shared/translation/localization/sw.json +2 -1
- package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts +11 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts +2 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +2 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts +2 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +4 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +6 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +2 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts +11 -0
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts +2 -1
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +2 -1
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts +2 -0
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +4 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +6 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +2 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/pmProgress/components/header/PmProgressHeader.tsx +36 -43
- package/src/features/pmProgress/components/header/StartButton.tsx +141 -0
- package/src/features/pmProgress/components/list/Fluency.tsx +5 -1
- package/src/features/pmProgress/components/list/ListCard.tsx +3 -0
- package/src/features/pmProgress/components/list/ListItem.tsx +38 -13
- package/src/features/pmProgress/components/list/PmDomainList.tsx +5 -1
- package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +12 -4
- package/src/features/pmProgress/model/PmSolvingFlowModel.ts +3 -0
- package/src/features/pmProgress/shared/pmProgress.constants.ts +5 -0
- package/src/shared/translation/localization/ca.json +2 -1
- package/src/shared/translation/localization/de.json +2 -1
- package/src/shared/translation/localization/en.json +2 -1
- package/src/shared/translation/localization/gb.json +2 -1
- package/src/shared/translation/localization/sct.json +2 -1
- package/src/shared/translation/localization/sw.json +2 -1
|
@@ -77,6 +77,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
77
77
|
grade: string;
|
|
78
78
|
gradeK: string;
|
|
79
79
|
gradeOther: string;
|
|
80
|
+
loading: string;
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
83
|
"en-GB": {
|
|
@@ -157,6 +158,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
157
158
|
grade: string;
|
|
158
159
|
gradeK: string;
|
|
159
160
|
gradeOther: string;
|
|
161
|
+
loading: string;
|
|
160
162
|
};
|
|
161
163
|
};
|
|
162
164
|
"sv-SE": {
|
|
@@ -237,6 +239,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
237
239
|
grade: string;
|
|
238
240
|
gradeK: string;
|
|
239
241
|
gradeOther: string;
|
|
242
|
+
loading: string;
|
|
240
243
|
};
|
|
241
244
|
};
|
|
242
245
|
"en-CA": {
|
|
@@ -317,6 +320,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
317
320
|
grade: string;
|
|
318
321
|
gradeK: string;
|
|
319
322
|
gradeOther: string;
|
|
323
|
+
loading: string;
|
|
320
324
|
};
|
|
321
325
|
};
|
|
322
326
|
"en-SCT": {
|
|
@@ -397,6 +401,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
397
401
|
grade: string;
|
|
398
402
|
gradeK: string;
|
|
399
403
|
gradeOther: string;
|
|
404
|
+
loading: string;
|
|
400
405
|
};
|
|
401
406
|
};
|
|
402
407
|
"de-DE": {
|
|
@@ -477,6 +482,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
477
482
|
grade: string;
|
|
478
483
|
gradeK: string;
|
|
479
484
|
gradeOther: string;
|
|
485
|
+
loading: string;
|
|
480
486
|
};
|
|
481
487
|
};
|
|
482
488
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhC,CAAA"}
|
|
@@ -78,6 +78,7 @@ export declare const setLocalization: import("effector").EventCallable<{
|
|
|
78
78
|
grade: string;
|
|
79
79
|
gradeK: string;
|
|
80
80
|
gradeOther: string;
|
|
81
|
+
loading: string;
|
|
81
82
|
};
|
|
82
83
|
} | ((config: typeof LOCALIZATION_CONFIGS) => Translations)>;
|
|
83
84
|
export declare const $localization: import("effector").StoreWritable<{
|
|
@@ -158,6 +159,7 @@ export declare const $localization: import("effector").StoreWritable<{
|
|
|
158
159
|
grade: string;
|
|
159
160
|
gradeK: string;
|
|
160
161
|
gradeOther: string;
|
|
162
|
+
loading: string;
|
|
161
163
|
};
|
|
162
164
|
}>;
|
|
163
165
|
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
|
package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PmProgressHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/header/PmProgressHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"PmProgressHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/header/PmProgressHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAuBvC,eAAO,MAAM,gBAAgB,yBAqG5B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type StartButtonProps = {
|
|
3
|
+
onPress: () => void;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
withPulsation?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const StartButton: ({ onPress, disabled, isLoading, isActive, withPulsation, }: StartButtonProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=StartButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StartButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/header/StartButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAmB1D,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,WAAW,+DAMrB,gBAAgB,sBAwFlB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fluency.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/Fluency.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAGtD,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,OAAO,aAAc,YAAY,
|
|
1
|
+
{"version":3,"file":"Fluency.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/Fluency.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AAGtD,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,OAAO,aAAc,YAAY,6BAkC7C,CAAA"}
|
|
@@ -24,7 +24,8 @@ type ListCardProps<T extends ListCardItem> = {
|
|
|
24
24
|
expandedColor?: string;
|
|
25
25
|
isSkillsLeftHidden?: boolean;
|
|
26
26
|
isHighlighted?: boolean;
|
|
27
|
+
loadingItemId?: string | null;
|
|
27
28
|
};
|
|
28
|
-
export declare const ListCard: <T extends ListCardItem>({ title, icon, color, items, isExpanded, isHighlighted, onPress, onHoverIn, onHoverOut, onItemPress, progress, rightContent, isFirst, isLast, maxItems, expandedColor, isSkillsLeftHidden, }: ListCardProps<T>) => React.JSX.Element;
|
|
29
|
+
export declare const ListCard: <T extends ListCardItem>({ title, icon, color, items, isExpanded, isHighlighted, onPress, onHoverIn, onHoverOut, onItemPress, progress, rightContent, isFirst, isLast, maxItems, expandedColor, isSkillsLeftHidden, loadingItemId, }: ListCardProps<T>) => React.JSX.Element;
|
|
29
30
|
export {};
|
|
30
31
|
//# sourceMappingURL=ListCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/ListCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAavC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAM3D,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;CACzB,CAAA;AAQD,KAAK,aAAa,CAAC,CAAC,SAAS,YAAY,IAAI;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,YAAY,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ListCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/ListCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAavC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAM3D,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;CACzB,CAAA;AAQD,KAAK,aAAa,CAAC,CAAC,SAAS,YAAY,IAAI;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,YAAY,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,YAAY,+MAmB5C,aAAa,CAAC,CAAC,CAAC,sBAkFlB,CAAA"}
|
|
@@ -4,8 +4,9 @@ export type ListItemProps = {
|
|
|
4
4
|
subtitle: string;
|
|
5
5
|
skillsLeft: number;
|
|
6
6
|
isFinished?: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
7
8
|
onPress?: () => void;
|
|
8
9
|
isSkillsLeftHidden?: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare const ListItem: ({ title, subtitle, skillsLeft, isFinished, onPress, isSkillsLeftHidden, }: ListItemProps) => React.JSX.Element;
|
|
11
|
+
export declare const ListItem: ({ title, subtitle, skillsLeft, isFinished, isLoading, onPress, isSkillsLeftHidden, }: ListItemProps) => React.JSX.Element;
|
|
11
12
|
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAqBvC,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAqBvC,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,QAAQ,yFAQlB,aAAa,sBA2Df,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PmDomainList.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/PmDomainList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"PmDomainList.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/PmDomainList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,eAAO,MAAM,YAAY,yBAgDxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PmTeacherRecs.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/recs/PmTeacherRecs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAiBzB,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"PmTeacherRecs.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/recs/PmTeacherRecs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAiBzB,eAAO,MAAM,aAAa,gCAsEzB,CAAA"}
|
|
@@ -7,6 +7,8 @@ export declare class PmSolvingFlowModel {
|
|
|
7
7
|
readonly reset: import("effector").EventCallable<void>;
|
|
8
8
|
readonly setQueue: import("effector").EventCallable<Skill[]>;
|
|
9
9
|
readonly advance: import("effector").EventCallable<void>;
|
|
10
|
+
readonly setLoaderOpeningId: import("effector").EventCallable<string | null>;
|
|
11
|
+
readonly $loaderOpeningId: import("effector").StoreWritable<string | null>;
|
|
10
12
|
readonly $queue: import("effector").StoreWritable<Skill[]>;
|
|
11
13
|
constructor(treeModel: PmTreeModel, recommendationsModel: PmRecommendationsModel);
|
|
12
14
|
start(props: StartSolvingProps): Promise<Skill>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PmSolvingFlowModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/model/PmSolvingFlowModel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAIL,KAAK,EAEL,iBAAiB,EAGlB,MAAM,4BAA4B,CAAA;AAYnC,qBAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"PmSolvingFlowModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/model/PmSolvingFlowModel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAIL,KAAK,EAEL,iBAAiB,EAGlB,MAAM,4BAA4B,CAAA;AAYnC,qBAAa,kBAAkB;IAc3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IAdvC,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,QAAQ,4CAAyB;IACjD,SAAgB,OAAO,yCAAgB;IACvC,SAAgB,kBAAkB,kDAA+B;IAEjE,SAAgB,gBAAgB,kDAAyC;IAEzE,SAAgB,MAAM,4CAEF;gBAGD,SAAS,EAAE,WAAW,EACtB,oBAAoB,EAAE,sBAAsB;IAKlD,KAAK,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC;IAU/C,IAAI;IAKjB,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,kBAAkB;YAkBZ,UAAU;CAWzB"}
|
|
@@ -15,6 +15,10 @@ export declare enum SolvingFlow {
|
|
|
15
15
|
MAGMA = "MAGMA",
|
|
16
16
|
STANDARD = "STANDARD"
|
|
17
17
|
}
|
|
18
|
+
export declare enum OpeningLoaderId {
|
|
19
|
+
START_BUTTON = "START_BUTTON",
|
|
20
|
+
PRACTICE_BUTTON = "PRACTICE_BUTTON"
|
|
21
|
+
}
|
|
18
22
|
export declare enum SessionStorageKeys {
|
|
19
23
|
SOLVING_QUEUE = "PM_SOLVING_QUEUE",
|
|
20
24
|
GRADE = "PM_GRADE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pmProgress.constants.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/pmProgress.constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,SAAS,aAAa;CACvB;AAED,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,oBAAY,kBAAkB;IAC5B,aAAa,qBAAqB;IAClC,KAAK,aAAa;IAClB,OAAO,eAAe;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,+PAsBzB,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;;;GAM9B,CAAA;AAEH,eAAO,MAAM,oBAAoB,uFAsBhC,CAAA"}
|
|
1
|
+
{"version":3,"file":"pmProgress.constants.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/pmProgress.constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,SAAS,aAAa;CACvB;AAED,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,oBAAY,eAAe;IACzB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AAED,oBAAY,kBAAkB;IAC5B,aAAa,qBAAqB;IAClC,KAAK,aAAa;IAClB,OAAO,eAAe;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,+PAsBzB,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;;;GAM9B,CAAA;AAEH,eAAO,MAAM,oBAAoB,uFAsBhC,CAAA"}
|
|
@@ -77,6 +77,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
77
77
|
grade: string;
|
|
78
78
|
gradeK: string;
|
|
79
79
|
gradeOther: string;
|
|
80
|
+
loading: string;
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
83
|
"en-GB": {
|
|
@@ -157,6 +158,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
157
158
|
grade: string;
|
|
158
159
|
gradeK: string;
|
|
159
160
|
gradeOther: string;
|
|
161
|
+
loading: string;
|
|
160
162
|
};
|
|
161
163
|
};
|
|
162
164
|
"sv-SE": {
|
|
@@ -237,6 +239,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
237
239
|
grade: string;
|
|
238
240
|
gradeK: string;
|
|
239
241
|
gradeOther: string;
|
|
242
|
+
loading: string;
|
|
240
243
|
};
|
|
241
244
|
};
|
|
242
245
|
"en-CA": {
|
|
@@ -317,6 +320,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
317
320
|
grade: string;
|
|
318
321
|
gradeK: string;
|
|
319
322
|
gradeOther: string;
|
|
323
|
+
loading: string;
|
|
320
324
|
};
|
|
321
325
|
};
|
|
322
326
|
"en-SCT": {
|
|
@@ -397,6 +401,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
397
401
|
grade: string;
|
|
398
402
|
gradeK: string;
|
|
399
403
|
gradeOther: string;
|
|
404
|
+
loading: string;
|
|
400
405
|
};
|
|
401
406
|
};
|
|
402
407
|
"de-DE": {
|
|
@@ -477,6 +482,7 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
477
482
|
grade: string;
|
|
478
483
|
gradeK: string;
|
|
479
484
|
gradeOther: string;
|
|
485
|
+
loading: string;
|
|
480
486
|
};
|
|
481
487
|
};
|
|
482
488
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhC,CAAA"}
|
|
@@ -78,6 +78,7 @@ export declare const setLocalization: import("effector").EventCallable<{
|
|
|
78
78
|
grade: string;
|
|
79
79
|
gradeK: string;
|
|
80
80
|
gradeOther: string;
|
|
81
|
+
loading: string;
|
|
81
82
|
};
|
|
82
83
|
} | ((config: typeof LOCALIZATION_CONFIGS) => Translations)>;
|
|
83
84
|
export declare const $localization: import("effector").StoreWritable<{
|
|
@@ -158,6 +159,7 @@ export declare const $localization: import("effector").StoreWritable<{
|
|
|
158
159
|
grade: string;
|
|
159
160
|
gradeK: string;
|
|
160
161
|
gradeOther: string;
|
|
162
|
+
loading: string;
|
|
161
163
|
};
|
|
162
164
|
}>;
|
|
163
165
|
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
|
package/package.json
CHANGED
|
@@ -2,8 +2,6 @@ import React, { useState } from 'react'
|
|
|
2
2
|
import { StyleSheet, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
-
ButtonColor,
|
|
6
|
-
ButtonSize,
|
|
7
5
|
ButtonVariant,
|
|
8
6
|
CaretDownIcon,
|
|
9
7
|
CaretUpIcon,
|
|
@@ -11,17 +9,17 @@ import {
|
|
|
11
9
|
Dropdown,
|
|
12
10
|
HeadingVariants,
|
|
13
11
|
Menu,
|
|
14
|
-
PlayIcon,
|
|
15
12
|
SPACING,
|
|
16
13
|
Typography,
|
|
17
14
|
} from '@magmamath/react-native-ui'
|
|
18
15
|
import { SketchArrowRight } from '../../../../shared/icons/SketchArrowRight'
|
|
19
16
|
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
20
17
|
import { useText } from '../../../../shared/translation'
|
|
21
|
-
import {
|
|
18
|
+
import { useUnit, useStoreMap } from 'effector-react'
|
|
22
19
|
import { usePmProgress } from '../../context/PmProgressContext'
|
|
23
20
|
import { formatGradeName, isFluencyDomain } from '../../shared/pmProgress.helpers'
|
|
24
|
-
import { SolvingFlow } from '../../shared/pmProgress.constants'
|
|
21
|
+
import { OpeningLoaderId, SolvingFlow } from '../../shared/pmProgress.constants'
|
|
22
|
+
import { StartButton } from './StartButton'
|
|
25
23
|
|
|
26
24
|
export const PmProgressHeader = () => {
|
|
27
25
|
const t = useText()
|
|
@@ -37,6 +35,8 @@ export const PmProgressHeader = () => {
|
|
|
37
35
|
})),
|
|
38
36
|
)
|
|
39
37
|
|
|
38
|
+
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
39
|
+
|
|
40
40
|
const nextUp = useStoreMap(model.tree.$domains, (domains) =>
|
|
41
41
|
domains.find((domain) => {
|
|
42
42
|
const isFluency = isFluencyDomain(domain.title)
|
|
@@ -84,40 +84,41 @@ export const PmProgressHeader = () => {
|
|
|
84
84
|
</View>
|
|
85
85
|
|
|
86
86
|
<View style={styles.nextUp}>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
87
|
+
{nextUp && (
|
|
88
|
+
<>
|
|
89
|
+
<View style={styles.content}>
|
|
90
|
+
<View style={styles.subtitle}>
|
|
91
|
+
<Typography variant={HeadingVariants.H2} style={styles.dark}>
|
|
92
|
+
{t('pmProgress.nextUp')}
|
|
93
|
+
</Typography>
|
|
94
|
+
</View>
|
|
95
|
+
<View style={[styles.row, styles.tilted]}>
|
|
96
|
+
<Typography variant={HeadingVariants.H7} style={styles.muted}>
|
|
97
|
+
{nextUp?.title}
|
|
98
|
+
</Typography>
|
|
99
|
+
<View style={styles.diamond}>
|
|
100
|
+
<SliceDiamondIcon color={nextUp?.color} />
|
|
101
|
+
</View>
|
|
102
|
+
</View>
|
|
103
|
+
</View>
|
|
104
|
+
<View style={styles.arrow}>
|
|
105
|
+
<SketchArrowRight />
|
|
99
106
|
</View>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
</View>
|
|
105
|
-
<Button
|
|
107
|
+
</>
|
|
108
|
+
)}
|
|
109
|
+
|
|
110
|
+
<StartButton
|
|
106
111
|
onPress={async () => {
|
|
112
|
+
model.solving.setLoaderOpeningId(OpeningLoaderId.START_BUTTON)
|
|
107
113
|
const skill = await model.solving.start({ type: SolvingFlow.MAGMA })
|
|
108
|
-
onStartPress?.(skill)
|
|
114
|
+
await onStartPress?.(skill)
|
|
115
|
+
model.solving.setLoaderOpeningId(null)
|
|
109
116
|
}}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
style={{ container: styles.startButton }}
|
|
116
|
-
>
|
|
117
|
-
<Typography variant={HeadingVariants.H6} style={styles.startButtonText}>
|
|
118
|
-
{t('pmProgress.startButton')}
|
|
119
|
-
</Typography>
|
|
120
|
-
</Button>
|
|
117
|
+
disabled={loaderOpeningId !== null}
|
|
118
|
+
isLoading={loaderOpeningId === OpeningLoaderId.START_BUTTON}
|
|
119
|
+
isActive={loaderOpeningId === OpeningLoaderId.START_BUTTON}
|
|
120
|
+
withPulsation={!!nextUp}
|
|
121
|
+
/>
|
|
121
122
|
</View>
|
|
122
123
|
</View>
|
|
123
124
|
)
|
|
@@ -176,12 +177,4 @@ const styles = StyleSheet.create({
|
|
|
176
177
|
arrow: {
|
|
177
178
|
transform: [{ rotate: '358deg' }],
|
|
178
179
|
},
|
|
179
|
-
startButton: {
|
|
180
|
-
minWidth: 145,
|
|
181
|
-
},
|
|
182
|
-
startButtonText: {
|
|
183
|
-
fontWeight: '700',
|
|
184
|
-
textTransform: 'uppercase',
|
|
185
|
-
color: COLORS.NEUTRAL_1,
|
|
186
|
-
},
|
|
187
180
|
})
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
2
|
+
import { Animated, StyleSheet, View } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
ButtonColor,
|
|
6
|
+
ButtonSize,
|
|
7
|
+
ButtonVariant,
|
|
8
|
+
COLORS,
|
|
9
|
+
HeadingVariants,
|
|
10
|
+
PlayIcon,
|
|
11
|
+
Typography,
|
|
12
|
+
} from '@magmamath/react-native-ui'
|
|
13
|
+
import { useText } from '../../../../shared/translation'
|
|
14
|
+
|
|
15
|
+
type Sizes = {
|
|
16
|
+
width: number
|
|
17
|
+
height: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type StartButtonProps = {
|
|
21
|
+
onPress: () => void
|
|
22
|
+
disabled: boolean
|
|
23
|
+
isLoading: boolean
|
|
24
|
+
isActive: boolean
|
|
25
|
+
withPulsation?: boolean
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const StartButton = ({
|
|
29
|
+
onPress,
|
|
30
|
+
disabled,
|
|
31
|
+
isLoading,
|
|
32
|
+
isActive,
|
|
33
|
+
withPulsation,
|
|
34
|
+
}: StartButtonProps) => {
|
|
35
|
+
const t = useText()
|
|
36
|
+
const [sizes, setSizes] = useState<Sizes | null>(null)
|
|
37
|
+
const [aspectRatio, setAspectRatio] = useState<number | null>(null)
|
|
38
|
+
const showPulsation = withPulsation && sizes && aspectRatio
|
|
39
|
+
|
|
40
|
+
const scaleAnimValue = useRef(new Animated.Value(0)).current
|
|
41
|
+
const fadeAnimValue = useRef(new Animated.Value(1)).current
|
|
42
|
+
|
|
43
|
+
const scaleAnimation = Animated.timing(scaleAnimValue, {
|
|
44
|
+
toValue: 1,
|
|
45
|
+
duration: 1000,
|
|
46
|
+
useNativeDriver: true,
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const fadeOutAnimation = Animated.timing(fadeAnimValue, {
|
|
50
|
+
toValue: 0,
|
|
51
|
+
duration: 1000,
|
|
52
|
+
useNativeDriver: true,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const pulsationAnimation = Animated.loop(
|
|
56
|
+
Animated.sequence([scaleAnimation, Animated.delay(1000), fadeOutAnimation]),
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (sizes && withPulsation) {
|
|
61
|
+
pulsationAnimation.start()
|
|
62
|
+
}
|
|
63
|
+
}, [sizes, withPulsation])
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<View
|
|
67
|
+
style={styles.container}
|
|
68
|
+
onLayout={(event) => {
|
|
69
|
+
setSizes({
|
|
70
|
+
width: event.nativeEvent.layout.width + 16,
|
|
71
|
+
height: event.nativeEvent.layout.height + 18,
|
|
72
|
+
})
|
|
73
|
+
setAspectRatio(event.nativeEvent.layout.width / event.nativeEvent.layout.height)
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
{showPulsation && (
|
|
77
|
+
<Animated.View
|
|
78
|
+
style={[
|
|
79
|
+
styles.animatedBackground,
|
|
80
|
+
{
|
|
81
|
+
width: sizes.width,
|
|
82
|
+
height: sizes.height,
|
|
83
|
+
top: -6,
|
|
84
|
+
left: -8,
|
|
85
|
+
transform: [
|
|
86
|
+
{
|
|
87
|
+
scaleX: scaleAnimValue.interpolate({
|
|
88
|
+
inputRange: [0, 1],
|
|
89
|
+
outputRange: [aspectRatio / 10 > 0.7 ? 0.7 : aspectRatio / 10, 1],
|
|
90
|
+
}),
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
scaleY: scaleAnimValue.interpolate({
|
|
94
|
+
inputRange: [0, 1],
|
|
95
|
+
outputRange: [0, 1],
|
|
96
|
+
}),
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
opacity: fadeAnimValue,
|
|
100
|
+
},
|
|
101
|
+
]}
|
|
102
|
+
/>
|
|
103
|
+
)}
|
|
104
|
+
<Button
|
|
105
|
+
onPress={onPress}
|
|
106
|
+
disabled={disabled}
|
|
107
|
+
isLoading={isLoading}
|
|
108
|
+
isActive={isActive}
|
|
109
|
+
icon={<PlayIcon size={16} color={COLORS.NEUTRAL_1} />}
|
|
110
|
+
variant={ButtonVariant.PRIMARY}
|
|
111
|
+
size={ButtonSize.LARGE}
|
|
112
|
+
colorScheme={ButtonColor.YELLOW}
|
|
113
|
+
raiseLevel={6}
|
|
114
|
+
style={{ container: styles.startButton }}
|
|
115
|
+
>
|
|
116
|
+
<Typography variant={HeadingVariants.H6} style={styles.startButtonText}>
|
|
117
|
+
{t('pmProgress.startButton')}
|
|
118
|
+
</Typography>
|
|
119
|
+
</Button>
|
|
120
|
+
</View>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const styles = StyleSheet.create({
|
|
125
|
+
container: {
|
|
126
|
+
marginRight: 8,
|
|
127
|
+
},
|
|
128
|
+
startButton: {
|
|
129
|
+
minWidth: 145,
|
|
130
|
+
},
|
|
131
|
+
startButtonText: {
|
|
132
|
+
fontWeight: '700',
|
|
133
|
+
textTransform: 'uppercase',
|
|
134
|
+
color: COLORS.NEUTRAL_1,
|
|
135
|
+
},
|
|
136
|
+
animatedBackground: {
|
|
137
|
+
backgroundColor: '#FFBE4E66',
|
|
138
|
+
position: 'absolute',
|
|
139
|
+
borderRadius: 50,
|
|
140
|
+
},
|
|
141
|
+
})
|
|
@@ -17,6 +17,7 @@ export const Fluency = ({ data }: FluencyProps) => {
|
|
|
17
17
|
const t = useText()
|
|
18
18
|
const { model, onStandardPress } = usePmProgress()
|
|
19
19
|
const expandedId = useUnit(model.highlight.$expandedId)
|
|
20
|
+
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
20
21
|
|
|
21
22
|
if (!data) return null
|
|
22
23
|
|
|
@@ -30,12 +31,15 @@ export const Fluency = ({ data }: FluencyProps) => {
|
|
|
30
31
|
color={COLORS.PRIMARY_ORANGE}
|
|
31
32
|
onPress={() => model.highlight.expand(CustomDomain.FLUENCY)}
|
|
32
33
|
onItemPress={async (item) => {
|
|
34
|
+
model.solving.setLoaderOpeningId(item.id)
|
|
33
35
|
const skill = await model.solving.start({
|
|
34
36
|
type: SolvingFlow.STANDARD,
|
|
35
37
|
standardId: item.standardId,
|
|
36
38
|
})
|
|
37
|
-
onStandardPress?.(skill)
|
|
39
|
+
await onStandardPress?.(skill)
|
|
40
|
+
model.solving.setLoaderOpeningId(null)
|
|
38
41
|
}}
|
|
42
|
+
loadingItemId={loaderOpeningId}
|
|
39
43
|
isFirst
|
|
40
44
|
isLast
|
|
41
45
|
isExpanded={expandedId === CustomDomain.FLUENCY}
|
|
@@ -48,6 +48,7 @@ type ListCardProps<T extends ListCardItem> = {
|
|
|
48
48
|
expandedColor?: string
|
|
49
49
|
isSkillsLeftHidden?: boolean
|
|
50
50
|
isHighlighted?: boolean
|
|
51
|
+
loadingItemId?: string | null
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export const ListCard = <T extends ListCardItem>({
|
|
@@ -68,6 +69,7 @@ export const ListCard = <T extends ListCardItem>({
|
|
|
68
69
|
maxItems,
|
|
69
70
|
expandedColor = COLORS.NEUTRAL_3,
|
|
70
71
|
isSkillsLeftHidden = false,
|
|
72
|
+
loadingItemId = null,
|
|
71
73
|
}: ListCardProps<T>) => {
|
|
72
74
|
const t = useText()
|
|
73
75
|
const [isHovered, setIsHovered] = useState(false)
|
|
@@ -135,6 +137,7 @@ export const ListCard = <T extends ListCardItem>({
|
|
|
135
137
|
skillsLeft={skillsLeft}
|
|
136
138
|
subtitle={item.subtitle}
|
|
137
139
|
isFinished={skillsLeft === 0}
|
|
140
|
+
isLoading={loadingItemId === item.id}
|
|
138
141
|
isSkillsLeftHidden={isSkillsLeftHidden}
|
|
139
142
|
onPress={() => onItemPress?.(item)}
|
|
140
143
|
/>
|