@yoobic/yobi 8.2.13-0 → 8.2.13-1
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/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/yoo-form-dynamic.cjs.entry.js +1 -0
- package/dist/cjs/yoo-lesson-question-result.cjs.entry.js +4 -3
- package/dist/cjs/yoo-points-recap.cjs.entry.js +5 -4
- package/dist/collection/components/2.molecules/points-recap/points-recap.js +23 -4
- package/dist/collection/components/form/form-dynamic/form-dynamic.js +1 -0
- package/dist/collection/feature-learn/learning/lesson-question-result/lesson-question-result.js +4 -3
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/yoo-form-dynamic.entry.js +1 -0
- package/dist/design-system/yoo-lesson-question-result.entry.js +4 -3
- package/dist/design-system/yoo-points-recap.entry.js +5 -4
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-form-dynamic.entry.js +1 -0
- package/dist/esm/yoo-lesson-question-result.entry.js +4 -3
- package/dist/esm/yoo-points-recap.entry.js +5 -4
- package/dist/types/components/2.molecules/points-recap/points-recap.d.ts +2 -1
- package/dist/types/components.d.ts +2 -0
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/form-field/form-field.interface.d.ts +1 -0
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/ui/points-recap/points-recap.interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3285,6 +3285,7 @@ const YooFormDynamicComponent = class {
|
|
|
3285
3285
|
extraAttrs = {
|
|
3286
3286
|
min: field.min,
|
|
3287
3287
|
max: field.max,
|
|
3288
|
+
allowDecimals: field.allowDecimals,
|
|
3288
3289
|
maxCharacters: field.maxCharacters,
|
|
3289
3290
|
type: field.type === FormFieldType.number && isSamsung() ? FormFieldType.text : getInputType(field),
|
|
3290
3291
|
inputmode: field.type === FormFieldType.number && isSamsung() ? 'numeric' : '',
|
|
@@ -215,7 +215,7 @@ const YooLessonQuestionResultComponent = class {
|
|
|
215
215
|
}
|
|
216
216
|
else if (!isContentOnly(this.lessonType)) {
|
|
217
217
|
items = (_b = this.fields) === null || _b === void 0 ? void 0 : _b.map((field, i) => {
|
|
218
|
-
var _a, _b, _c, _d, _e, _f;
|
|
218
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
219
219
|
return ({
|
|
220
220
|
name: `${translate('QUESTION')} ${i + 1}`,
|
|
221
221
|
description: translateMulti(field.sentence || field.description || field.title),
|
|
@@ -227,11 +227,12 @@ const YooLessonQuestionResultComponent = class {
|
|
|
227
227
|
? ((_d = this.lessonData[field.name]) === null || _d === void 0 ? void 0 : _d.earnedConfidencePoints) + ((_e = this.lessonData[field.name]) === null || _e === void 0 ? void 0 : _e.earnedQuestionPoints)
|
|
228
228
|
: ((_f = this.lessonData[field.name]) === null || _f === void 0 ? void 0 : _f.fieldValidity)
|
|
229
229
|
? Math.round(this.points)
|
|
230
|
-
: 0
|
|
230
|
+
: 0,
|
|
231
|
+
isCorrect: (_g = this.lessonData[field.name]) === null || _g === void 0 ? void 0 : _g.fieldValidity
|
|
231
232
|
});
|
|
232
233
|
});
|
|
233
234
|
}
|
|
234
|
-
return h("yoo-points-recap", { heading: translate('TOTALPOINTSEARNED'), totalPoints: Math.round(this.earnedPoints), items: items, showItemIcon: showItemIcon });
|
|
235
|
+
return h("yoo-points-recap", { heading: translate('TOTALPOINTSEARNED'), totalPoints: Math.round(this.earnedPoints), items: items, showItemIcon: showItemIcon, forceTotalPoints: true });
|
|
235
236
|
}
|
|
236
237
|
renderProgressBarLessonRecap() {
|
|
237
238
|
var _a;
|
|
@@ -6,6 +6,7 @@ const YooPointsRecap = class {
|
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.showItemIcon = true;
|
|
9
|
+
this.forceTotalPoints = false;
|
|
9
10
|
}
|
|
10
11
|
onItemsUpdated() {
|
|
11
12
|
this.updatePoints();
|
|
@@ -31,8 +32,8 @@ const YooPointsRecap = class {
|
|
|
31
32
|
return 'success';
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
getItemIconAttr(
|
|
35
|
-
if (
|
|
35
|
+
getItemIconAttr(isCorrect) {
|
|
36
|
+
if (!isCorrect) {
|
|
36
37
|
return { name: 'close', color: 'danger' };
|
|
37
38
|
}
|
|
38
39
|
else {
|
|
@@ -42,7 +43,7 @@ const YooPointsRecap = class {
|
|
|
42
43
|
renderTitle(title) {
|
|
43
44
|
var _a, _b;
|
|
44
45
|
const titleClass = `item ${((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.heading ? 'heading' : this.footer && 'footer' : 'content'}`;
|
|
45
|
-
const points = (this.footer || !((_b = this.items) === null || _b === void 0 ? void 0 : _b.length)) ? this.totalPoints : this.totalItemsPoints;
|
|
46
|
+
const points = (this.footer || !((_b = this.items) === null || _b === void 0 ? void 0 : _b.length) || this.forceTotalPoints) ? this.totalPoints : this.totalItemsPoints;
|
|
46
47
|
const tagColor = this.getTagColor(points);
|
|
47
48
|
return (h("div", { class: "row" }, this.footer && this.renderSeparator(), h("div", { class: titleClass }, h("div", null, h("b", null, title)), h("div", null, h("yoo-tag", { size: "medium", color: `${tagColor}-10` }, h("yoo-icon", { slot: "start", name: "star", size: "small", color: tagColor }), h("div", null, points)))), this.heading && this.renderSeparator()));
|
|
48
49
|
}
|
|
@@ -53,7 +54,7 @@ const YooPointsRecap = class {
|
|
|
53
54
|
renderItem(item, index) {
|
|
54
55
|
var _a;
|
|
55
56
|
const tagColor = this.getTagColor(item.points);
|
|
56
|
-
const itemIcon = this.getItemIconAttr(item.
|
|
57
|
+
const itemIcon = this.getItemIconAttr(item.isCorrect);
|
|
57
58
|
return (h("div", { class: "row" }, h("div", { class: "item content" }, h("div", { class: "sub-item" }, this.showItemIcon && h("yoo-icon", { slot: "start", name: itemIcon.name, size: "medium", color: itemIcon.color }), item.subItem ? this.renderSubItem(item) :
|
|
58
59
|
h("yoo-tooltip", { placement: "top", content: item.description }, h("div", { class: "name" }, item.name))), h("div", null, h("yoo-tag", { size: "medium", color: `${tagColor}-10` }, h("yoo-icon", { slot: "start", name: "star", size: "small", color: tagColor }), h("div", null, item.points)))), (((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) - 1) !== index && h("div", { class: "separator" })));
|
|
59
60
|
}
|
|
@@ -5,13 +5,14 @@ export declare class YooPointsRecap {
|
|
|
5
5
|
totalPoints?: number;
|
|
6
6
|
items?: IItemsPoints[];
|
|
7
7
|
showItemIcon?: boolean;
|
|
8
|
+
forceTotalPoints?: boolean;
|
|
8
9
|
pointsUpdated: boolean;
|
|
9
10
|
private totalItemsPoints;
|
|
10
11
|
onItemsUpdated(): void;
|
|
11
12
|
componentWillLoad(): void;
|
|
12
13
|
updatePoints(): void;
|
|
13
14
|
getTagColor(points: number, isSubItem?: boolean): TColor;
|
|
14
|
-
getItemIconAttr(
|
|
15
|
+
getItemIconAttr(isCorrect: boolean): IITemIcon;
|
|
15
16
|
renderTitle(title: string): any;
|
|
16
17
|
renderSeparator(): any;
|
|
17
18
|
renderItem(item: IItemsPoints, index: number): any;
|
|
@@ -5984,6 +5984,7 @@ export namespace Components {
|
|
|
5984
5984
|
}
|
|
5985
5985
|
interface YooPointsRecap {
|
|
5986
5986
|
"footer": string;
|
|
5987
|
+
"forceTotalPoints"?: boolean;
|
|
5987
5988
|
"heading": string;
|
|
5988
5989
|
"items"?: IItemsPoints[];
|
|
5989
5990
|
"showItemIcon"?: boolean;
|
|
@@ -16919,6 +16920,7 @@ declare namespace LocalJSX {
|
|
|
16919
16920
|
}
|
|
16920
16921
|
interface YooPointsRecap {
|
|
16921
16922
|
"footer"?: string;
|
|
16923
|
+
"forceTotalPoints"?: boolean;
|
|
16922
16924
|
"heading"?: string;
|
|
16923
16925
|
"items"?: IItemsPoints[];
|
|
16924
16926
|
"showItemIcon"?: boolean;
|