@eric-emg/symphiq-components 1.2.451 → 1.2.452

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.
@@ -88255,6 +88255,17 @@ class ProfileQuestionAnswerComponent {
88255
88255
  this.allQuestionsAnswered = computed(() => {
88256
88256
  return this.unansweredQuestions().length === 0;
88257
88257
  }, ...(ngDevMode ? [{ debugName: "allQuestionsAnswered" }] : []));
88258
+ this.hasMoreUnansweredQuestions = computed(() => {
88259
+ const currentQuestionId = this.question().id;
88260
+ const unanswered = this.unansweredQuestions();
88261
+ const otherUnanswered = unanswered.filter(q => q.id !== currentQuestionId);
88262
+ console.log('[hasMoreUnansweredQuestions] currentQuestionId:', currentQuestionId);
88263
+ console.log('[hasMoreUnansweredQuestions] unanswered count:', unanswered.length);
88264
+ console.log('[hasMoreUnansweredQuestions] unanswered ids:', unanswered.map(q => q.id));
88265
+ console.log('[hasMoreUnansweredQuestions] otherUnanswered count:', otherUnanswered.length);
88266
+ console.log('[hasMoreUnansweredQuestions] result (show Save & Next):', otherUnanswered.length > 0);
88267
+ return otherUnanswered.length > 0;
88268
+ }, ...(ngDevMode ? [{ debugName: "hasMoreUnansweredQuestions" }] : []));
88258
88269
  this.canAddCustomAnswers = computed(() => {
88259
88270
  return this.customAnswerText().trim().length > 0;
88260
88271
  }, ...(ngDevMode ? [{ debugName: "canAddCustomAnswers" }] : []));
@@ -88665,12 +88676,12 @@ class ProfileQuestionAnswerComponent {
88665
88676
  i0.ɵɵadvance(2);
88666
88677
  i0.ɵɵproperty("ngClass", ctx.footerClasses());
88667
88678
  i0.ɵɵadvance(2);
88668
- i0.ɵɵclassProp("flex-1", ctx.allQuestionsAnswered())("border", !ctx.allQuestionsAnswered());
88669
- i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", ctx.allQuestionsAnswered() ? ctx.saveAndNextButtonClasses() : ctx.saveButtonClasses());
88679
+ i0.ɵɵclassProp("flex-1", !ctx.hasMoreUnansweredQuestions())("border", ctx.hasMoreUnansweredQuestions());
88680
+ i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", !ctx.hasMoreUnansweredQuestions() ? ctx.saveAndNextButtonClasses() : ctx.saveButtonClasses());
88670
88681
  i0.ɵɵadvance();
88671
88682
  i0.ɵɵconditional(ctx.isSaving() && ctx.pendingSaveAction() === "save" ? 30 : 31);
88672
88683
  i0.ɵɵadvance(2);
88673
- i0.ɵɵconditional(!ctx.allQuestionsAnswered() ? 32 : -1);
88684
+ i0.ɵɵconditional(ctx.hasMoreUnansweredQuestions() ? 32 : -1);
88674
88685
  } }, dependencies: [CommonModule, i1$1.NgClass, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgModel, IndeterminateSpinnerComponent], encapsulation: 2, data: { animation: [
88675
88686
  trigger('fadeIn', [
88676
88687
  transition(':enter', [
@@ -88855,10 +88866,10 @@ class ProfileQuestionAnswerComponent {
88855
88866
  type="button"
88856
88867
  (click)="onSave()"
88857
88868
  [disabled]="saveButtonsDisabled()"
88858
- [ngClass]="allQuestionsAnswered() ? saveAndNextButtonClasses() : saveButtonClasses()"
88859
- [class.flex-1]="allQuestionsAnswered()"
88869
+ [ngClass]="!hasMoreUnansweredQuestions() ? saveAndNextButtonClasses() : saveButtonClasses()"
88870
+ [class.flex-1]="!hasMoreUnansweredQuestions()"
88860
88871
  class="px-5 py-2.5 rounded-lg font-medium text-sm transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-[1.02] active:scale-95 disabled:hover:scale-100 flex items-center justify-center gap-2 min-w-[80px]"
88861
- [class.border]="!allQuestionsAnswered()">
88872
+ [class.border]="hasMoreUnansweredQuestions()">
88862
88873
  @if (isSaving() && pendingSaveAction() === 'save') {
88863
88874
  <svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
88864
88875
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
@@ -88869,7 +88880,7 @@ class ProfileQuestionAnswerComponent {
88869
88880
  <span>Save</span>
88870
88881
  }
88871
88882
  </button>
88872
- @if (!allQuestionsAnswered()) {
88883
+ @if (hasMoreUnansweredQuestions()) {
88873
88884
  <button
88874
88885
  type="button"
88875
88886
  (click)="onSaveAndNext()"
@@ -90863,7 +90874,7 @@ class ProfileStatusCardComponent {
90863
90874
  this.profileAnswerHistories = input([], ...(ngDevMode ? [{ debugName: "profileAnswerHistories" }] : []));
90864
90875
  this.users = input([], ...(ngDevMode ? [{ debugName: "users" }] : []));
90865
90876
  this.startAnsweringAll = input(false, ...(ngDevMode ? [{ debugName: "startAnsweringAll" }] : []));
90866
- this.showAdminButtons = input(false, ...(ngDevMode ? [{ debugName: "showAdminButtons" }] : []));
90877
+ this.currentUser = input(undefined, ...(ngDevMode ? [{ debugName: "currentUser" }] : []));
90867
90878
  this.config = input({
90868
90879
  title: 'Profile',
90869
90880
  breadcrumbPrefix: ''
@@ -90915,6 +90926,9 @@ class ProfileStatusCardComponent {
90915
90926
  this.hasQuestions = computed(() => {
90916
90927
  return this.questions().length > 0;
90917
90928
  }, ...(ngDevMode ? [{ debugName: "hasQuestions" }] : []));
90929
+ this.showAdminButtons = computed(() => {
90930
+ return EMAIL_IS_EMG_APPS(this.currentUser()?.email);
90931
+ }, ...(ngDevMode ? [{ debugName: "showAdminButtons" }] : []));
90918
90932
  this.unansweredQuestions = computed(() => {
90919
90933
  return this.totalQuestions() - this.computedAnsweredCount();
90920
90934
  }, ...(ngDevMode ? [{ debugName: "unansweredQuestions" }] : []));
@@ -91228,7 +91242,7 @@ class ProfileStatusCardComponent {
91228
91242
  } if (rf & 2) {
91229
91243
  let _t;
91230
91244
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.chartDiv = _t.first);
91231
- } }, inputs: { viewMode: [1, "viewMode"], totalQuestions: [1, "totalQuestions"], answeredQuestions: [1, "answeredQuestions"], questions: [1, "questions"], profileAnswers: [1, "profileAnswers"], profileAnswerHistories: [1, "profileAnswerHistories"], users: [1, "users"], startAnsweringAll: [1, "startAnsweringAll"], showAdminButtons: [1, "showAdminButtons"], config: [1, "config"], groupConfig: [1, "groupConfig"], categoryNameFormatter: [1, "categoryNameFormatter"], focusAreaNameFormatter: [1, "focusAreaNameFormatter"], questionFilterFn: [1, "questionFilterFn"], questionGroupByCategory: [1, "questionGroupByCategory"], questionGroupByFocusArea: [1, "questionGroupByFocusArea"] }, outputs: { startCategoryQuestions: "startCategoryQuestions", questionAnswerRequested: "questionAnswerRequested", answerSave: "answerSave", adminAnswerAction: "adminAnswerAction" }, decls: 28, vars: 29, consts: [["chartdiv", ""], [1, "rounded-2xl", "border", "shadow-lg", "overflow-hidden", 3, "ngClass"], [1, "px-6", "py-5", "border-b", 3, "ngClass"], [1, "flex", "items-center", "justify-between"], [1, "flex", "items-center", "gap-3"], [1, "p-2.5", "rounded-lg", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-5", "h-5"], ["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 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", "mt-0.5", 3, "ngClass"], [1, "p-6", 3, "ngClass"], [1, "flex", "flex-wrap", "items-center", "gap-6", "mb-8"], [1, "rounded-xl", "p-6", "flex-1", "min-w-[300px]", 3, "ngClass"], [1, "flex", "items-start", "gap-4"], [1, "flex-shrink-0", "p-2", "rounded-lg", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"], [1, "flex-1"], [1, "leading-relaxed", 3, "ngClass", "innerHTML"], [1, "flex-shrink-0"], [1, "w-[250px]", "h-[250px]"], [1, "flex", "items-center", "justify-center", "gap-4", "mt-6", "pt-6", "border-t", "border-slate-700/50"], [3, "close", "questionAnswerClick", "answerSave", "isOpen", "questions", "profileAnswers", "profileAnswerHistories", "users", "selectedCategoryId", "selectedFocusAreaId", "showAllQuestions", "startDirectAnswer", "viewMode", "breadcrumbPrefix", "showFocusAreaChips", "categoryNameFormatter", "focusAreaNameFormatter", "questionFilterFn"], [1, "font-semibold", "text-lg", "mb-3", 3, "ngClass"], [1, "flex", "justify-center", "mb-6"], [3, "itemClick", "viewMode", "items", "delayAnimation"], [3, "viewChanged", "viewMode", "currentView", "options"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors", 3, "click"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M6 18L18 6M6 6l12 12"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 13l4 4L19 7"]], template: function ProfileStatusCardComponent_Template(rf, ctx) { if (rf & 1) {
91245
+ } }, inputs: { viewMode: [1, "viewMode"], totalQuestions: [1, "totalQuestions"], answeredQuestions: [1, "answeredQuestions"], questions: [1, "questions"], profileAnswers: [1, "profileAnswers"], profileAnswerHistories: [1, "profileAnswerHistories"], users: [1, "users"], startAnsweringAll: [1, "startAnsweringAll"], currentUser: [1, "currentUser"], config: [1, "config"], groupConfig: [1, "groupConfig"], categoryNameFormatter: [1, "categoryNameFormatter"], focusAreaNameFormatter: [1, "focusAreaNameFormatter"], questionFilterFn: [1, "questionFilterFn"], questionGroupByCategory: [1, "questionGroupByCategory"], questionGroupByFocusArea: [1, "questionGroupByFocusArea"] }, outputs: { startCategoryQuestions: "startCategoryQuestions", questionAnswerRequested: "questionAnswerRequested", answerSave: "answerSave", adminAnswerAction: "adminAnswerAction" }, decls: 28, vars: 29, consts: [["chartdiv", ""], [1, "rounded-2xl", "border", "shadow-lg", "overflow-hidden", 3, "ngClass"], [1, "px-6", "py-5", "border-b", 3, "ngClass"], [1, "flex", "items-center", "justify-between"], [1, "flex", "items-center", "gap-3"], [1, "p-2.5", "rounded-lg", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-5", "h-5"], ["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 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"], [1, "text-xl", "font-bold", 3, "ngClass"], [1, "text-sm", "mt-0.5", 3, "ngClass"], [1, "p-6", 3, "ngClass"], [1, "flex", "flex-wrap", "items-center", "gap-6", "mb-8"], [1, "rounded-xl", "p-6", "flex-1", "min-w-[300px]", 3, "ngClass"], [1, "flex", "items-start", "gap-4"], [1, "flex-shrink-0", "p-2", "rounded-lg", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"], [1, "flex-1"], [1, "leading-relaxed", 3, "ngClass", "innerHTML"], [1, "flex-shrink-0"], [1, "w-[250px]", "h-[250px]"], [1, "flex", "items-center", "justify-center", "gap-4", "mt-6", "pt-6", "border-t", "border-slate-700/50"], [3, "close", "questionAnswerClick", "answerSave", "isOpen", "questions", "profileAnswers", "profileAnswerHistories", "users", "selectedCategoryId", "selectedFocusAreaId", "showAllQuestions", "startDirectAnswer", "viewMode", "breadcrumbPrefix", "showFocusAreaChips", "categoryNameFormatter", "focusAreaNameFormatter", "questionFilterFn"], [1, "font-semibold", "text-lg", "mb-3", 3, "ngClass"], [1, "flex", "justify-center", "mb-6"], [3, "itemClick", "viewMode", "items", "delayAnimation"], [3, "viewChanged", "viewMode", "currentView", "options"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors"], ["type", "button", 1, "flex", "items-center", "gap-2", "px-4", "py-2", "rounded-lg", "border-2", "border-violet-500/70", "bg-transparent", "text-violet-400", "hover:bg-violet-500/10", "transition-colors", 3, "click"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M6 18L18 6M6 6l12 12"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 13l4 4L19 7"]], template: function ProfileStatusCardComponent_Template(rf, ctx) { if (rf & 1) {
91232
91246
  const _r1 = i0.ɵɵgetCurrentView();
91233
91247
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "div", 3)(3, "div", 4)(4, "div", 5);
91234
91248
  i0.ɵɵnamespaceSVG();
@@ -91420,11 +91434,11 @@ class ProfileStatusCardComponent {
91420
91434
  (answerSave)="onAnswerSave($event)" />
91421
91435
  `
91422
91436
  }]
91423
- }], () => [], { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], totalQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalQuestions", required: false }] }], answeredQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "answeredQuestions", required: false }] }], questions: [{ type: i0.Input, args: [{ isSignal: true, alias: "questions", 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 }] }], startAnsweringAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAnsweringAll", required: false }] }], showAdminButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAdminButtons", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], groupConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupConfig", required: false }] }], categoryNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryNameFormatter", required: false }] }], focusAreaNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusAreaNameFormatter", required: false }] }], questionFilterFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionFilterFn", required: false }] }], questionGroupByCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByCategory", required: false }] }], questionGroupByFocusArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByFocusArea", required: false }] }], startCategoryQuestions: [{ type: i0.Output, args: ["startCategoryQuestions"] }], questionAnswerRequested: [{ type: i0.Output, args: ["questionAnswerRequested"] }], answerSave: [{ type: i0.Output, args: ["answerSave"] }], adminAnswerAction: [{ type: i0.Output, args: ["adminAnswerAction"] }], chartDiv: [{
91437
+ }], () => [], { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], totalQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalQuestions", required: false }] }], answeredQuestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "answeredQuestions", required: false }] }], questions: [{ type: i0.Input, args: [{ isSignal: true, alias: "questions", 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 }] }], startAnsweringAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAnsweringAll", required: false }] }], currentUser: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentUser", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], groupConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupConfig", required: false }] }], categoryNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "categoryNameFormatter", required: false }] }], focusAreaNameFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusAreaNameFormatter", required: false }] }], questionFilterFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionFilterFn", required: false }] }], questionGroupByCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByCategory", required: false }] }], questionGroupByFocusArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionGroupByFocusArea", required: false }] }], startCategoryQuestions: [{ type: i0.Output, args: ["startCategoryQuestions"] }], questionAnswerRequested: [{ type: i0.Output, args: ["questionAnswerRequested"] }], answerSave: [{ type: i0.Output, args: ["answerSave"] }], adminAnswerAction: [{ type: i0.Output, args: ["adminAnswerAction"] }], chartDiv: [{
91424
91438
  type: ViewChild,
91425
91439
  args: ['chartdiv', { static: false }]
91426
91440
  }] }); })();
91427
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProfileStatusCardComponent, { className: "ProfileStatusCardComponent", filePath: "lib/components/shared/profile/profile-status-card.component.ts", lineNumber: 173 }); })();
91441
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ProfileStatusCardComponent, { className: "ProfileStatusCardComponent", filePath: "lib/components/shared/profile/profile-status-card.component.ts", lineNumber: 174 }); })();
91428
91442
 
91429
91443
  function ProfileStickyFooterComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
91430
91444
  i0.ɵɵelementStart(0, "div", 5);