@eric-emg/symphiq-components 1.2.444 → 1.2.446
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.
|
@@ -90853,6 +90853,12 @@ function ProfileStatusCardComponent_Conditional_26_Template(rf, ctx) { if (rf &
|
|
|
90853
90853
|
i0.ɵɵconditional(ctx_r1.unansweredQuestions() > 0 ? 2 : -1);
|
|
90854
90854
|
} }
|
|
90855
90855
|
class ProfileStatusCardComponent {
|
|
90856
|
+
isQuestionAnswered(q, answers) {
|
|
90857
|
+
if ('answered' in q && typeof q.answered === 'boolean') {
|
|
90858
|
+
return q.answered;
|
|
90859
|
+
}
|
|
90860
|
+
return answers.some(a => a.profileQuestionId === q.id);
|
|
90861
|
+
}
|
|
90856
90862
|
constructor() {
|
|
90857
90863
|
this.viewMode = input(ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
90858
90864
|
this.totalQuestions = input(0, ...(ngDevMode ? [{ debugName: "totalQuestions" }] : []));
|
|
@@ -90898,7 +90904,7 @@ class ProfileStatusCardComponent {
|
|
|
90898
90904
|
this.computedAnsweredCount = computed(() => {
|
|
90899
90905
|
const questions = this.questions();
|
|
90900
90906
|
const answers = this.profileAnswers();
|
|
90901
|
-
return questions.filter(q =>
|
|
90907
|
+
return questions.filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90902
90908
|
}, ...(ngDevMode ? [{ debugName: "computedAnsweredCount" }] : []));
|
|
90903
90909
|
this.completionPercentage = computed(() => {
|
|
90904
90910
|
const total = this.totalQuestions();
|
|
@@ -90940,7 +90946,7 @@ class ProfileStatusCardComponent {
|
|
|
90940
90946
|
});
|
|
90941
90947
|
const items = [];
|
|
90942
90948
|
categoryMap.forEach((categoryQuestions, category) => {
|
|
90943
|
-
const answeredCount = categoryQuestions.filter(q =>
|
|
90949
|
+
const answeredCount = categoryQuestions.filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90944
90950
|
const totalCount = categoryQuestions.length;
|
|
90945
90951
|
const progress = totalCount > 0 ? (answeredCount / totalCount) * 100 : 0;
|
|
90946
90952
|
items.push({
|
|
@@ -90986,7 +90992,7 @@ class ProfileStatusCardComponent {
|
|
|
90986
90992
|
});
|
|
90987
90993
|
const items = [];
|
|
90988
90994
|
focusAreaMap.forEach((faQuestions, focusArea) => {
|
|
90989
|
-
const answeredCount = faQuestions.filter(q =>
|
|
90995
|
+
const answeredCount = faQuestions.filter(q => this.isQuestionAnswered(q, answers)).length;
|
|
90990
90996
|
const totalCount = faQuestions.length;
|
|
90991
90997
|
const progress = totalCount > 0 ? (answeredCount / totalCount) * 100 : 0;
|
|
90992
90998
|
items.push({
|
|
@@ -95800,8 +95806,7 @@ class SymphiqProfileFocusAreaDashboardComponent {
|
|
|
95800
95806
|
}, ...(ngDevMode ? [{ debugName: "totalQuestions" }] : []));
|
|
95801
95807
|
this.answeredQuestions = computed(() => {
|
|
95802
95808
|
const questions = this.profileFocusAreaQuestions() || [];
|
|
95803
|
-
|
|
95804
|
-
return questions.filter(q => answers.some(a => a.profileQuestionId === q.id)).length;
|
|
95809
|
+
return questions.filter(q => q.answered === true).length;
|
|
95805
95810
|
}, ...(ngDevMode ? [{ debugName: "answeredQuestions" }] : []));
|
|
95806
95811
|
this.shouldShowStickyFooter = computed(() => {
|
|
95807
95812
|
return this.profileFocusArea() && this.totalQuestions() > 0 && !this.isLoading();
|
|
@@ -95814,6 +95819,9 @@ class SymphiqProfileFocusAreaDashboardComponent {
|
|
|
95814
95819
|
this.answerSave.emit(event);
|
|
95815
95820
|
}
|
|
95816
95821
|
handleContinueClick() {
|
|
95822
|
+
if (this.profileStatusCard) {
|
|
95823
|
+
this.profileStatusCard.openAllQuestionsAnswerMode();
|
|
95824
|
+
}
|
|
95817
95825
|
this.continueClick.emit();
|
|
95818
95826
|
}
|
|
95819
95827
|
getContainerClasses() {
|
|
@@ -95844,7 +95852,12 @@ class SymphiqProfileFocusAreaDashboardComponent {
|
|
|
95844
95852
|
return this.isLightMode() ? 'text-slate-600' : 'text-slate-400';
|
|
95845
95853
|
}
|
|
95846
95854
|
static { this.ɵfac = function SymphiqProfileFocusAreaDashboardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SymphiqProfileFocusAreaDashboardComponent)(); }; }
|
|
95847
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SymphiqProfileFocusAreaDashboardComponent, selectors: [["symphiq-profile-focus-area-dashboard"]],
|
|
95855
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SymphiqProfileFocusAreaDashboardComponent, selectors: [["symphiq-profile-focus-area-dashboard"]], viewQuery: function SymphiqProfileFocusAreaDashboardComponent_Query(rf, ctx) { if (rf & 1) {
|
|
95856
|
+
i0.ɵɵviewQuery(ProfileStatusCardComponent, 5);
|
|
95857
|
+
} if (rf & 2) {
|
|
95858
|
+
let _t;
|
|
95859
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.profileStatusCard = _t.first);
|
|
95860
|
+
} }, inputs: { viewMode: [1, "viewMode"], profileFocusArea: [1, "profileFocusArea"], profileFocusAreaQuestions: [1, "profileFocusAreaQuestions"], profileAnswers: [1, "profileAnswers"], profileAnswerHistories: [1, "profileAnswerHistories"], users: [1, "users"], isLoading: [1, "isLoading"], forDemo: [1, "forDemo"], currentUser: [1, "currentUser"] }, outputs: { startCategoryQuestions: "startCategoryQuestions", answerSave: "answerSave", continueClick: "continueClick" }, decls: 8, vars: 7, consts: [[1, "min-h-screen", "relative", 3, "ngClass"], [1, "animated-bubbles", 2, "position", "fixed", "top", "0", "left", "0", "right", "0", "bottom", "0", "width", "100vw", "height", "100vh", "z-index", "1", "pointer-events", "none"], [1, "relative", "z-10"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-8"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", "backdrop-blur-sm", 3, "ngClass"], [3, "viewMode", "totalQuestions", "answeredQuestions", "questions", "profileAnswers", "profileAnswerHistories", "users", "config", "groupConfig", "categoryNameFormatter"], [1, "rounded-2xl", "border", "shadow-lg", "p-8", "text-center", 3, "ngClass"], [3, "viewMode", "totalQuestions", "answeredQuestions", "buttonConfig"], [1, "flex", "flex-col", "items-center", "justify-center", "space-y-4"], ["size", "large", 3, "viewMode"], [1, "text-center"], [1, "text-lg", "font-semibold", "mb-1", 3, "ngClass"], [1, "text-sm", 3, "ngClass"], [3, "startCategoryQuestions", "answerSave", "viewMode", "totalQuestions", "answeredQuestions", "questions", "profileAnswers", "profileAnswerHistories", "users", "config", "groupConfig", "categoryNameFormatter"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-16", "h-16", "mx-auto", "mb-4", "opacity-50"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"], [1, "text-xl", "font-semibold", "mb-2", 3, "ngClass"], [3, "continueClick", "viewMode", "totalQuestions", "answeredQuestions", "buttonConfig"]], template: function SymphiqProfileFocusAreaDashboardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
95848
95861
|
i0.ɵɵelementStart(0, "div", 0);
|
|
95849
95862
|
i0.ɵɵelement(1, "div", 1);
|
|
95850
95863
|
i0.ɵɵelementStart(2, "div", 2)(3, "main", 3);
|
|
@@ -95944,8 +95957,11 @@ class SymphiqProfileFocusAreaDashboardComponent {
|
|
|
95944
95957
|
</div>
|
|
95945
95958
|
`
|
|
95946
95959
|
}]
|
|
95947
|
-
}], null, {
|
|
95948
|
-
|
|
95960
|
+
}], null, { profileStatusCard: [{
|
|
95961
|
+
type: ViewChild,
|
|
95962
|
+
args: [ProfileStatusCardComponent]
|
|
95963
|
+
}], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], profileFocusArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileFocusArea", required: false }] }], profileFocusAreaQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileFocusAreaQuestions", required: false }] }], profileAnswers: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileAnswers", required: false }] }], profileAnswerHistories: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileAnswerHistories", required: false }] }], users: [{ type: i0.Input, args: [{ isSignal: true, alias: "users", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], forDemo: [{ type: i0.Input, args: [{ isSignal: true, alias: "forDemo", required: false }] }], currentUser: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentUser", required: false }] }], startCategoryQuestions: [{ type: i0.Output, args: ["startCategoryQuestions"] }], answerSave: [{ type: i0.Output, args: ["answerSave"] }], continueClick: [{ type: i0.Output, args: ["continueClick"] }] }); })();
|
|
95964
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SymphiqProfileFocusAreaDashboardComponent, { className: "SymphiqProfileFocusAreaDashboardComponent", filePath: "lib/components/profile-focus-area-dashboard/symphiq-profile-focus-area-dashboard.component.ts", lineNumber: 105 }); })();
|
|
95949
95965
|
|
|
95950
95966
|
const _forTrack0$4 = ($index, $item) => $item.id;
|
|
95951
95967
|
function ShopProfileCategoryListComponent_For_2_Template(rf, ctx) { if (rf & 1) {
|