@eric-emg/symphiq-components 1.2.447 → 1.2.448
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/fesm2022/symphiq-components.mjs +22 -34
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +20 -20
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -89148,24 +89148,24 @@ class ProfileQuestionCardComponent {
|
|
|
89148
89148
|
this.answerClick = output();
|
|
89149
89149
|
this.historyClick = output();
|
|
89150
89150
|
this.questionAnswers = computed(() => {
|
|
89151
|
-
const
|
|
89151
|
+
const q = this.question();
|
|
89152
89152
|
const answers = this.profileAnswers();
|
|
89153
89153
|
const allUsers = this.users();
|
|
89154
|
-
if (!
|
|
89154
|
+
if (!q.id || !answers)
|
|
89155
89155
|
return [];
|
|
89156
89156
|
return answers
|
|
89157
|
-
.filter(a => a.profileQuestionId ===
|
|
89157
|
+
.filter(a => a.profileQuestionId === q.id)
|
|
89158
89158
|
.map(answer => ({
|
|
89159
89159
|
answer,
|
|
89160
89160
|
user: allUsers.find(u => u.id === answer.creatorUserId)
|
|
89161
89161
|
}));
|
|
89162
89162
|
}, ...(ngDevMode ? [{ debugName: "questionAnswers" }] : []));
|
|
89163
89163
|
this.displayAnswers = computed(() => {
|
|
89164
|
-
const
|
|
89164
|
+
const q = this.question();
|
|
89165
89165
|
const current = this.questionAnswers();
|
|
89166
89166
|
const allUsers = this.users();
|
|
89167
89167
|
const removedAnswers = this.animationService.removedAnswers()
|
|
89168
|
-
.filter(a => a.profileQuestionId ===
|
|
89168
|
+
.filter(a => a.profileQuestionId === q.id)
|
|
89169
89169
|
.map(answer => ({
|
|
89170
89170
|
answer,
|
|
89171
89171
|
user: allUsers.find(u => u.id === answer.creatorUserId)
|
|
@@ -89175,22 +89175,18 @@ class ProfileQuestionCardComponent {
|
|
|
89175
89175
|
return [...current, ...uniqueRemoved];
|
|
89176
89176
|
}, ...(ngDevMode ? [{ debugName: "displayAnswers" }] : []));
|
|
89177
89177
|
this.isAnswered = computed(() => {
|
|
89178
|
-
|
|
89179
|
-
if ('answered' in q && typeof q.answered === 'boolean') {
|
|
89180
|
-
return q.answered;
|
|
89181
|
-
}
|
|
89182
|
-
return this.questionAnswers().length > 0;
|
|
89178
|
+
return this.question().answered === true;
|
|
89183
89179
|
}, ...(ngDevMode ? [{ debugName: "isAnswered" }] : []));
|
|
89184
89180
|
this.relatedFocusAreas = computed(() => {
|
|
89185
89181
|
const q = this.question();
|
|
89186
89182
|
return 'focusAreaDomains' in q ? (q.focusAreaDomains || []) : [];
|
|
89187
89183
|
}, ...(ngDevMode ? [{ debugName: "relatedFocusAreas" }] : []));
|
|
89188
89184
|
this.hasHistory = computed(() => {
|
|
89189
|
-
const
|
|
89185
|
+
const q = this.question();
|
|
89190
89186
|
const histories = this.profileAnswerHistories();
|
|
89191
|
-
if (!
|
|
89187
|
+
if (!q.id || !histories)
|
|
89192
89188
|
return false;
|
|
89193
|
-
return histories.some(h => h.profileQuestionId ===
|
|
89189
|
+
return histories.some(h => h.profileQuestionId === q.id);
|
|
89194
89190
|
}, ...(ngDevMode ? [{ debugName: "hasHistory" }] : []));
|
|
89195
89191
|
}
|
|
89196
89192
|
isNewAnswer(answerId) {
|
|
@@ -90171,11 +90167,8 @@ function ProfileQuestionsModalComponent_Conditional_0_Template(rf, ctx) { if (rf
|
|
|
90171
90167
|
i0.ɵɵconditional(ctx_r1.historyModeActive() ? 8 : !ctx_r1.answerModeActive() ? 9 : 10);
|
|
90172
90168
|
} }
|
|
90173
90169
|
class ProfileQuestionsModalComponent {
|
|
90174
|
-
isQuestionAnswered(q
|
|
90175
|
-
|
|
90176
|
-
return q.answered;
|
|
90177
|
-
}
|
|
90178
|
-
return answers.some(a => a.profileQuestionId === q.id);
|
|
90170
|
+
isQuestionAnswered(q) {
|
|
90171
|
+
return q.answered === true;
|
|
90179
90172
|
}
|
|
90180
90173
|
constructor() {
|
|
90181
90174
|
this.isOpen = input(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
@@ -90257,8 +90250,7 @@ class ProfileQuestionsModalComponent {
|
|
|
90257
90250
|
return [];
|
|
90258
90251
|
}, ...(ngDevMode ? [{ debugName: "filteredQuestions" }] : []));
|
|
90259
90252
|
this.answeredCount = computed(() => {
|
|
90260
|
-
|
|
90261
|
-
return this.filteredQuestions().filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90253
|
+
return this.filteredQuestions().filter(q => this.isQuestionAnswered(q)).length;
|
|
90262
90254
|
}, ...(ngDevMode ? [{ debugName: "answeredCount" }] : []));
|
|
90263
90255
|
this.totalCount = computed(() => {
|
|
90264
90256
|
return this.filteredQuestions().length;
|
|
@@ -90277,8 +90269,7 @@ class ProfileQuestionsModalComponent {
|
|
|
90277
90269
|
this.moveModalToBody();
|
|
90278
90270
|
this.modalReady.set(true);
|
|
90279
90271
|
if (this.startDirectAnswer()) {
|
|
90280
|
-
const
|
|
90281
|
-
const firstUnanswered = this.filteredQuestions().find(q => !this.isQuestionAnswered(q, answers));
|
|
90272
|
+
const firstUnanswered = this.filteredQuestions().find(q => !this.isQuestionAnswered(q));
|
|
90282
90273
|
if (firstUnanswered) {
|
|
90283
90274
|
this.answerModeActive.set(true);
|
|
90284
90275
|
this.questionForAnswer.set(firstUnanswered);
|
|
@@ -90862,11 +90853,8 @@ function ProfileStatusCardComponent_Conditional_26_Template(rf, ctx) { if (rf &
|
|
|
90862
90853
|
i0.ɵɵconditional(ctx_r1.unansweredQuestions() > 0 ? 2 : -1);
|
|
90863
90854
|
} }
|
|
90864
90855
|
class ProfileStatusCardComponent {
|
|
90865
|
-
isQuestionAnswered(q
|
|
90866
|
-
|
|
90867
|
-
return q.answered;
|
|
90868
|
-
}
|
|
90869
|
-
return answers.some(a => a.profileQuestionId === q.id);
|
|
90856
|
+
isQuestionAnswered(q) {
|
|
90857
|
+
return q.answered === true;
|
|
90870
90858
|
}
|
|
90871
90859
|
constructor() {
|
|
90872
90860
|
this.viewMode = input(ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
@@ -90912,8 +90900,7 @@ class ProfileStatusCardComponent {
|
|
|
90912
90900
|
}, ...(ngDevMode ? [{ debugName: "viewToggleOptions" }] : []));
|
|
90913
90901
|
this.computedAnsweredCount = computed(() => {
|
|
90914
90902
|
const questions = this.questions();
|
|
90915
|
-
|
|
90916
|
-
return questions.filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90903
|
+
return questions.filter(q => this.isQuestionAnswered(q)).length;
|
|
90917
90904
|
}, ...(ngDevMode ? [{ debugName: "computedAnsweredCount" }] : []));
|
|
90918
90905
|
this.completionPercentage = computed(() => {
|
|
90919
90906
|
const total = this.totalQuestions();
|
|
@@ -90935,7 +90922,6 @@ class ProfileStatusCardComponent {
|
|
|
90935
90922
|
}, ...(ngDevMode ? [{ debugName: "unansweredQuestions" }] : []));
|
|
90936
90923
|
this.questionsByCategory = computed(() => {
|
|
90937
90924
|
const questions = this.questions();
|
|
90938
|
-
const answers = this.profileAnswers();
|
|
90939
90925
|
const categoryMap = new Map();
|
|
90940
90926
|
const groupFn = this.questionGroupByCategory();
|
|
90941
90927
|
const gc = this.groupConfig();
|
|
@@ -90955,7 +90941,7 @@ class ProfileStatusCardComponent {
|
|
|
90955
90941
|
});
|
|
90956
90942
|
const items = [];
|
|
90957
90943
|
categoryMap.forEach((categoryQuestions, category) => {
|
|
90958
|
-
const answeredCount = categoryQuestions.filter(q => this.isQuestionAnswered(q
|
|
90944
|
+
const answeredCount = categoryQuestions.filter(q => this.isQuestionAnswered(q)).length;
|
|
90959
90945
|
const totalCount = categoryQuestions.length;
|
|
90960
90946
|
const progress = totalCount > 0 ? (answeredCount / totalCount) * 100 : 0;
|
|
90961
90947
|
items.push({
|
|
@@ -90971,7 +90957,6 @@ class ProfileStatusCardComponent {
|
|
|
90971
90957
|
}, ...(ngDevMode ? [{ debugName: "questionsByCategory" }] : []));
|
|
90972
90958
|
this.questionsByFocusArea = computed(() => {
|
|
90973
90959
|
const questions = this.questions();
|
|
90974
|
-
const answers = this.profileAnswers();
|
|
90975
90960
|
const focusAreaMap = new Map();
|
|
90976
90961
|
const groupFn = this.questionGroupByFocusArea();
|
|
90977
90962
|
const gc = this.groupConfig();
|
|
@@ -91001,7 +90986,7 @@ class ProfileStatusCardComponent {
|
|
|
91001
90986
|
});
|
|
91002
90987
|
const items = [];
|
|
91003
90988
|
focusAreaMap.forEach((faQuestions, focusArea) => {
|
|
91004
|
-
const answeredCount = faQuestions.filter(q => this.isQuestionAnswered(q
|
|
90989
|
+
const answeredCount = faQuestions.filter(q => this.isQuestionAnswered(q)).length;
|
|
91005
90990
|
const totalCount = faQuestions.length;
|
|
91006
90991
|
const progress = totalCount > 0 ? (answeredCount / totalCount) * 100 : 0;
|
|
91007
90992
|
items.push({
|
|
@@ -94984,7 +94969,10 @@ class SymphiqProfileFocusAreasAnalysesDashboardComponent {
|
|
|
94984
94969
|
};
|
|
94985
94970
|
const focusAreaDetailsMap = new Map(focusAreaDetailsData?.map(fad => [fad.focusAreaDomain, fad]));
|
|
94986
94971
|
const profileFocusAreasMap = new Map(profileFocusAreasData?.map(pfa => [pfa.focusAreaDomain, pfa]));
|
|
94987
|
-
const
|
|
94972
|
+
const profileFocusAreaIdToDomainMap = new Map(profileFocusAreasData?.map(pfa => [pfa.id, pfa.focusAreaDomain]));
|
|
94973
|
+
const profileAnalysesMap = new Map(profileAnalysesData
|
|
94974
|
+
?.filter(pa => pa.profileFocusAreaId !== undefined)
|
|
94975
|
+
.map(pa => [profileFocusAreaIdToDomainMap.get(pa.profileFocusAreaId), pa]));
|
|
94988
94976
|
const itemStatusesMap = new Map(itemStatusesData?.map(is => [is.itemId, is]));
|
|
94989
94977
|
return allDomains.map(domain => {
|
|
94990
94978
|
let questionsAnswered = 0;
|