@eric-emg/symphiq-components 1.2.385 → 1.2.386

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.
@@ -88184,7 +88184,7 @@ function ShopProfileQuestionCardComponent_Conditional_8_For_2_Template(rf, ctx)
88184
88184
  } if (rf & 2) {
88185
88185
  const answerData_r3 = ctx.$implicit;
88186
88186
  const ctx_r0 = i0.ɵɵnextContext(2);
88187
- i0.ɵɵproperty("@answerAnimation", ctx_r0.getAnimationState(answerData_r3.answer.id))("ngClass", ctx_r0.answerChipClasses());
88187
+ i0.ɵɵproperty("@answerAnimation", answerData_r3.animState)("ngClass", ctx_r0.answerChipClasses());
88188
88188
  i0.ɵɵadvance();
88189
88189
  i0.ɵɵproperty("ngClass", ctx_r0.answerTextClasses());
88190
88190
  i0.ɵɵadvance();
@@ -88192,7 +88192,7 @@ function ShopProfileQuestionCardComponent_Conditional_8_For_2_Template(rf, ctx)
88192
88192
  i0.ɵɵadvance();
88193
88193
  i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("user", answerData_r3.user);
88194
88194
  i0.ɵɵadvance();
88195
- i0.ɵɵproperty("@answerAnimation", ctx_r0.getAnimationState(answerData_r3.answer.id))("ngClass", ctx_r0.answerDateClasses());
88195
+ i0.ɵɵproperty("@answerAnimation", answerData_r3.animState)("ngClass", ctx_r0.answerDateClasses());
88196
88196
  i0.ɵɵadvance();
88197
88197
  i0.ɵɵtextInterpolate1(" Answered ", ctx_r0.formatAnswerDate(answerData_r3.answer.createdDate), " ");
88198
88198
  } }
@@ -88243,19 +88243,35 @@ class ShopProfileQuestionCardComponent {
88243
88243
  this.users = input([], ...(ngDevMode ? [{ debugName: "users" }] : []));
88244
88244
  this.answerClick = output();
88245
88245
  this.knownAnswerIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "knownAnswerIds" }] : []));
88246
- this.newAnswerIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "newAnswerIds" }] : []));
88247
- this.questionAnswers = computed(() => {
88246
+ this.isInitialized = signal(false, ...(ngDevMode ? [{ debugName: "isInitialized" }] : []));
88247
+ this.questionAnswersWithState = computed(() => {
88248
88248
  const questionId = this.question().id;
88249
88249
  const answers = this.profileShopAnswers();
88250
88250
  const allUsers = this.users();
88251
+ const known = this.knownAnswerIds();
88252
+ const initialized = this.isInitialized();
88253
+ console.log(`[QuestionCard ${questionId}] Computing answers:`, {
88254
+ answerCount: answers?.length,
88255
+ knownIds: Array.from(known),
88256
+ initialized
88257
+ });
88251
88258
  if (!questionId || !answers)
88252
88259
  return [];
88253
- return answers
88260
+ const result = answers
88254
88261
  .filter(a => a.profileQuestionId === questionId)
88255
- .map(answer => ({
88256
- answer,
88257
- user: allUsers.find(u => u.id === answer.creatorUserId)
88258
- }));
88262
+ .map(answer => {
88263
+ const isNew = initialized && answer.id !== undefined && !known.has(answer.id);
88264
+ console.log(`[QuestionCard ${questionId}] Answer ${answer.id}: isNew=${isNew}, initialized=${initialized}, inKnown=${answer.id !== undefined && known.has(answer.id)}`);
88265
+ return {
88266
+ answer,
88267
+ user: allUsers.find(u => u.id === answer.creatorUserId),
88268
+ animState: isNew ? 'new' : 'existing'
88269
+ };
88270
+ });
88271
+ return result;
88272
+ }, ...(ngDevMode ? [{ debugName: "questionAnswersWithState" }] : []));
88273
+ this.questionAnswers = computed(() => {
88274
+ return this.questionAnswersWithState();
88259
88275
  }, ...(ngDevMode ? [{ debugName: "questionAnswers" }] : []));
88260
88276
  this.isAnswered = computed(() => {
88261
88277
  return this.questionAnswers().length > 0;
@@ -88268,30 +88284,34 @@ class ShopProfileQuestionCardComponent {
88268
88284
  return q.focusAreaDomains || [];
88269
88285
  }, ...(ngDevMode ? [{ debugName: "relatedFocusAreas" }] : []));
88270
88286
  effect(() => {
88271
- const currentAnswers = this.questionAnswers();
88287
+ const currentAnswers = this.questionAnswersWithState();
88272
88288
  const currentIds = new Set(currentAnswers.map(a => a.answer.id).filter((id) => id !== undefined));
88273
88289
  const known = untracked(() => this.knownAnswerIds());
88274
- if (known.size === 0) {
88275
- this.knownAnswerIds.set(currentIds);
88276
- this.newAnswerIds.set(new Set());
88290
+ const initialized = untracked(() => this.isInitialized());
88291
+ const questionId = this.question().id;
88292
+ console.log(`[QuestionCard ${questionId}] Effect triggered:`, {
88293
+ currentIds: Array.from(currentIds),
88294
+ knownIds: Array.from(known),
88295
+ initialized
88296
+ });
88297
+ if (!initialized) {
88298
+ console.log(`[QuestionCard ${questionId}] First run - marking all ${currentIds.size} as known`);
88299
+ this.knownAnswerIds.set(new Set(currentIds));
88300
+ setTimeout(() => {
88301
+ console.log(`[QuestionCard ${questionId}] Setting initialized=true`);
88302
+ this.isInitialized.set(true);
88303
+ }, 50);
88277
88304
  }
88278
88305
  else {
88279
- const newIds = new Set();
88280
- currentIds.forEach(id => {
88281
- if (!known.has(id)) {
88282
- newIds.add(id);
88283
- }
88284
- });
88285
- this.newAnswerIds.set(newIds);
88286
- this.knownAnswerIds.set(currentIds);
88306
+ const newKnown = new Set(known);
88307
+ currentIds.forEach(id => newKnown.add(id));
88308
+ if (newKnown.size !== known.size) {
88309
+ console.log(`[QuestionCard ${questionId}] Adding new IDs to known:`, Array.from(currentIds).filter(id => !known.has(id)));
88310
+ }
88311
+ this.knownAnswerIds.set(newKnown);
88287
88312
  }
88288
88313
  });
88289
88314
  }
88290
- getAnimationState(answerId) {
88291
- if (!answerId)
88292
- return 'existing';
88293
- return this.newAnswerIds().has(answerId) ? 'new' : 'existing';
88294
- }
88295
88315
  getFocusAreaTitle(focusArea) {
88296
88316
  return FocusAreaDomainEnumUtil.title(focusArea);
88297
88317
  }
@@ -88520,7 +88540,7 @@ class ShopProfileQuestionCardComponent {
88520
88540
  <!-- Answered State - Show answer chips -->
88521
88541
  <div class="flex flex-wrap gap-3">
88522
88542
  @for (answerData of questionAnswers(); track answerData.answer.id) {
88523
- <div [@answerAnimation]="getAnimationState(answerData.answer.id)" [ngClass]="answerChipClasses()" class="flex items-center gap-2 px-4 py-2.5 rounded-full">
88543
+ <div [@answerAnimation]="answerData.animState" [ngClass]="answerChipClasses()" class="flex items-center gap-2 px-4 py-2.5 rounded-full">
88524
88544
  <span [ngClass]="answerTextClasses()" class="text-sm font-medium">
88525
88545
  {{ answerData.answer.answer }}
88526
88546
  </span>
@@ -88530,7 +88550,7 @@ class ShopProfileQuestionCardComponent {
88530
88550
  size="small"
88531
88551
  />
88532
88552
  </div>
88533
- <div [@answerAnimation]="getAnimationState(answerData.answer.id)" [ngClass]="answerDateClasses()" class="self-center text-xs -ml-1">
88553
+ <div [@answerAnimation]="answerData.animState" [ngClass]="answerDateClasses()" class="self-center text-xs -ml-1">
88534
88554
  Answered {{ formatAnswerDate(answerData.answer.createdDate) }}
88535
88555
  </div>
88536
88556
  }
@@ -88768,7 +88788,7 @@ function ShopProfileQuestionAnswerComponent_Conditional_31_Template(rf, ctx) { i
88768
88788
  i0.ɵɵtext(1, "Save");
88769
88789
  i0.ɵɵelementEnd();
88770
88790
  } }
88771
- function ShopProfileQuestionAnswerComponent_Conditional_33_Template(rf, ctx) { if (rf & 1) {
88791
+ function ShopProfileQuestionAnswerComponent_Conditional_32_Conditional_1_Template(rf, ctx) { if (rf & 1) {
88772
88792
  i0.ɵɵnamespaceSVG();
88773
88793
  i0.ɵɵelementStart(0, "svg", 55);
88774
88794
  i0.ɵɵelement(1, "circle", 56)(2, "path", 57);
@@ -88778,14 +88798,26 @@ function ShopProfileQuestionAnswerComponent_Conditional_33_Template(rf, ctx) { i
88778
88798
  i0.ɵɵtext(4, "Saving...");
88779
88799
  i0.ɵɵelementEnd();
88780
88800
  } }
88781
- function ShopProfileQuestionAnswerComponent_Conditional_34_Template(rf, ctx) { if (rf & 1) {
88801
+ function ShopProfileQuestionAnswerComponent_Conditional_32_Conditional_2_Template(rf, ctx) { if (rf & 1) {
88782
88802
  i0.ɵɵelementStart(0, "span");
88783
88803
  i0.ɵɵtext(1, "Save & next unanswered");
88784
88804
  i0.ɵɵelementEnd();
88785
88805
  i0.ɵɵnamespaceSVG();
88786
- i0.ɵɵelementStart(2, "svg", 58);
88787
- i0.ɵɵelement(3, "path", 59);
88806
+ i0.ɵɵelementStart(2, "svg", 59);
88807
+ i0.ɵɵelement(3, "path", 60);
88808
+ i0.ɵɵelementEnd();
88809
+ } }
88810
+ function ShopProfileQuestionAnswerComponent_Conditional_32_Template(rf, ctx) { if (rf & 1) {
88811
+ const _r8 = i0.ɵɵgetCurrentView();
88812
+ i0.ɵɵelementStart(0, "button", 58);
88813
+ i0.ɵɵlistener("click", function ShopProfileQuestionAnswerComponent_Conditional_32_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSaveAndNext()); });
88814
+ i0.ɵɵconditionalCreate(1, ShopProfileQuestionAnswerComponent_Conditional_32_Conditional_1_Template, 5, 0)(2, ShopProfileQuestionAnswerComponent_Conditional_32_Conditional_2_Template, 4, 0);
88788
88815
  i0.ɵɵelementEnd();
88816
+ } if (rf & 2) {
88817
+ const ctx_r1 = i0.ɵɵnextContext();
88818
+ i0.ɵɵproperty("disabled", ctx_r1.saveButtonsDisabled())("ngClass", ctx_r1.saveAndNextButtonClasses());
88819
+ i0.ɵɵadvance();
88820
+ i0.ɵɵconditional(ctx_r1.isSaving() && ctx_r1.pendingSaveAction() === "saveAndNext" ? 1 : 2);
88789
88821
  } }
88790
88822
  class ShopProfileQuestionAnswerComponent {
88791
88823
  constructor() {
@@ -88869,6 +88901,9 @@ class ShopProfileQuestionAnswerComponent {
88869
88901
  return 0;
88870
88902
  return (this.answeredCount() / total) * 100;
88871
88903
  }, ...(ngDevMode ? [{ debugName: "progressPercentage" }] : []));
88904
+ this.allQuestionsAnswered = computed(() => {
88905
+ return this.unansweredQuestions().length === 0;
88906
+ }, ...(ngDevMode ? [{ debugName: "allQuestionsAnswered" }] : []));
88872
88907
  this.canAddCustomAnswers = computed(() => {
88873
88908
  return this.customAnswerText().trim().length > 0;
88874
88909
  }, ...(ngDevMode ? [{ debugName: "canAddCustomAnswers" }] : []));
@@ -89211,7 +89246,7 @@ class ShopProfileQuestionAnswerComponent {
89211
89246
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stickySentinel = _t.first);
89212
89247
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stickyHeader = _t.first);
89213
89248
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.questionTitle = _t.first);
89214
- } }, inputs: { question: [1, "question"], viewMode: [1, "viewMode"], viewType: [1, "viewType"], selectedCategoryId: [1, "selectedCategoryId"], selectedFocusAreaId: [1, "selectedFocusAreaId"], filteredQuestions: [1, "filteredQuestions"], profileShopAnswers: [1, "profileShopAnswers"] }, outputs: { backClick: "backClick", saveClick: "saveClick", saveAndNextClick: "saveAndNextClick", navigateToList: "navigateToList", navigateToNextQuestion: "navigateToNextQuestion" }, decls: 35, vars: 25, consts: [["scrollContainer", ""], ["stickySentinel", ""], ["stickyHeader", ""], ["questionTitle", ""], [1, "flex", "flex-col", "h-full"], [1, "flex-1", "overflow-y-auto"], [1, "px-6", "py-4", "border-b", 3, "ngClass"], [1, "text-sm", "font-semibold", "mb-3", 3, "ngClass"], [1, "flex", "items-center", "gap-3"], [1, "flex-1"], [1, "h-2", "rounded-full", "overflow-hidden", 3, "ngClass"], [1, "h-full", "transition-all", "duration-500", "ease-out", "rounded-full", 3, "ngClass"], [1, "text-sm", "font-medium", "whitespace-nowrap", 3, "ngClass"], [1, "inline-block", "tabular-nums", "transition-transform", "duration-300"], [1, "h-0"], [1, "sticky", "top-0", "z-10", "px-6", "py-4", "transition-all", "duration-200", 3, "ngClass"], [1, "text-sm", "italic", "mb-2", 3, "ngClass"], [1, "space-y-2"], [1, "font-bold", "text-2xl", "[&.is-sticky]:text-lg", "transition-all", "duration-200", 3, "ngClass"], [1, "px-6"], [1, "mt-3", "space-y-2"], [1, "px-6", "py-6"], [1, "flex", "flex-col", "items-center", "justify-center", "py-12"], [1, "px-6", "py-4", "border-t", "sticky", "bottom-0", "z-10", 3, "ngClass"], [1, "flex", "items-center", "gap-4"], ["type", "button", 1, "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "border", "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]", 3, "click", "disabled", "ngClass"], ["type", "button", 1, "flex-1", "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "flex", "items-center", "justify-center", "gap-2", "disabled:opacity-50", "disabled:cursor-not-allowed", "hover:scale-[1.01]", "active:scale-[0.99]", "disabled:hover:scale-100", 3, "click", "disabled", "ngClass"], [1, "h-7", "rounded", "w-3/4", "animate-pulse", 3, "ngClass"], [1, "h-7", "rounded", "w-1/2", "animate-pulse", 3, "ngClass"], [1, "h-4", "rounded", "w-full", "animate-pulse", 3, "ngClass"], [1, "h-4", "rounded", "w-5/6", "animate-pulse", 3, "ngClass"], [1, "text-sm", "leading-relaxed", "mt-3", 3, "ngClass"], [1, "mt-4"], [1, "flex", "items-center", "gap-2", "mb-2"], [1, "text-xs", "font-semibold", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4", 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", "flex-wrap", "gap-2"], [1, "px-3", "py-1.5", "rounded-full", "text-xs", "font-medium", 3, "ngClass"], ["size", "medium", 3, "viewMode"], [1, "mt-4", "text-sm", "font-medium", 3, "ngClass"], [1, "space-y-3", "mb-4"], [1, "flex", "items-start", "gap-3", "p-4", "rounded-lg", "cursor-pointer", "transition-all", "duration-200", "hover:scale-[1.01]", 3, "ngClass"], [1, "mb-6"], [1, "grid", "transition-[grid-template-rows]", "duration-300", "ease-in-out"], [1, "overflow-hidden", "min-h-0"], [1, "pb-4"], ["rows", "5", "placeholder", "Enter your answer(s) here, separated by returns.", 1, "w-full", "px-4", "py-3", "rounded-lg", "border-2", "text-sm", "resize-y", "transition-colors", "duration-200", "focus:ring-2", "focus:ring-offset-2", 3, "ngModelChange", "ngModel", "ngClass"], [1, "flex", "items-center", "gap-3", "mt-3"], ["type", "button", 1, "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "hover:scale-105", "active:scale-95", 3, "click", "ngClass"], ["type", "button", 1, "flex-1", "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "disabled:opacity-50", "disabled:cursor-not-allowed", "disabled:hover:scale-100", 3, "click", "disabled", "ngClass"], ["type", "button", 1, "w-full", "px-5", "py-3", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "border-2", "hover:scale-[1.01]", "active:scale-[0.99]", 3, "ngClass"], ["type", "checkbox", 1, "mt-0.5", "w-5", "h-5", "rounded", "border-2", "cursor-pointer", "transition-all", "duration-200", "focus:ring-2", "focus:ring-offset-2", 3, "change", "checked", "ngClass"], [1, "text-base", "flex-1", 3, "ngClass"], ["type", "button", 1, "w-full", "px-5", "py-3", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "border-2", "hover:scale-[1.01]", "active:scale-[0.99]", 3, "click", "ngClass"], ["xmlns", "http://www.w3.org/2000/svg", "fill", "none", "viewBox", "0 0 24 24", 1, "animate-spin", "h-4", "w-4"], ["cx", "12", "cy", "12", "r", "10", "stroke", "currentColor", "stroke-width", "4", 1, "opacity-25"], ["fill", "currentColor", "d", "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z", 1, "opacity-75"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 5l7 7-7 7"]], template: function ShopProfileQuestionAnswerComponent_Template(rf, ctx) { if (rf & 1) {
89249
+ } }, inputs: { question: [1, "question"], viewMode: [1, "viewMode"], viewType: [1, "viewType"], selectedCategoryId: [1, "selectedCategoryId"], selectedFocusAreaId: [1, "selectedFocusAreaId"], filteredQuestions: [1, "filteredQuestions"], profileShopAnswers: [1, "profileShopAnswers"] }, outputs: { backClick: "backClick", saveClick: "saveClick", saveAndNextClick: "saveAndNextClick", navigateToList: "navigateToList", navigateToNextQuestion: "navigateToNextQuestion" }, decls: 33, vars: 27, consts: [["scrollContainer", ""], ["stickySentinel", ""], ["stickyHeader", ""], ["questionTitle", ""], [1, "flex", "flex-col", "h-full"], [1, "flex-1", "overflow-y-auto"], [1, "px-6", "py-4", "border-b", 3, "ngClass"], [1, "text-sm", "font-semibold", "mb-3", 3, "ngClass"], [1, "flex", "items-center", "gap-3"], [1, "flex-1"], [1, "h-2", "rounded-full", "overflow-hidden", 3, "ngClass"], [1, "h-full", "transition-all", "duration-500", "ease-out", "rounded-full", 3, "ngClass"], [1, "text-sm", "font-medium", "whitespace-nowrap", 3, "ngClass"], [1, "inline-block", "tabular-nums", "transition-transform", "duration-300"], [1, "h-0"], [1, "sticky", "top-0", "z-10", "px-6", "py-4", "transition-all", "duration-200", 3, "ngClass"], [1, "text-sm", "italic", "mb-2", 3, "ngClass"], [1, "space-y-2"], [1, "font-bold", "text-2xl", "[&.is-sticky]:text-lg", "transition-all", "duration-200", 3, "ngClass"], [1, "px-6"], [1, "mt-3", "space-y-2"], [1, "px-6", "py-6"], [1, "flex", "flex-col", "items-center", "justify-center", "py-12"], [1, "px-6", "py-4", "border-t", "sticky", "bottom-0", "z-10", 3, "ngClass"], [1, "flex", "items-center", "gap-4"], ["type", "button", 1, "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]", 3, "click", "disabled", "ngClass"], ["type", "button", 1, "flex-1", "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "flex", "items-center", "justify-center", "gap-2", "disabled:opacity-50", "disabled:cursor-not-allowed", "hover:scale-[1.01]", "active:scale-[0.99]", "disabled:hover:scale-100", 3, "disabled", "ngClass"], [1, "h-7", "rounded", "w-3/4", "animate-pulse", 3, "ngClass"], [1, "h-7", "rounded", "w-1/2", "animate-pulse", 3, "ngClass"], [1, "h-4", "rounded", "w-full", "animate-pulse", 3, "ngClass"], [1, "h-4", "rounded", "w-5/6", "animate-pulse", 3, "ngClass"], [1, "text-sm", "leading-relaxed", "mt-3", 3, "ngClass"], [1, "mt-4"], [1, "flex", "items-center", "gap-2", "mb-2"], [1, "text-xs", "font-semibold", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4", 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", "flex-wrap", "gap-2"], [1, "px-3", "py-1.5", "rounded-full", "text-xs", "font-medium", 3, "ngClass"], ["size", "medium", 3, "viewMode"], [1, "mt-4", "text-sm", "font-medium", 3, "ngClass"], [1, "space-y-3", "mb-4"], [1, "flex", "items-start", "gap-3", "p-4", "rounded-lg", "cursor-pointer", "transition-all", "duration-200", "hover:scale-[1.01]", 3, "ngClass"], [1, "mb-6"], [1, "grid", "transition-[grid-template-rows]", "duration-300", "ease-in-out"], [1, "overflow-hidden", "min-h-0"], [1, "pb-4"], ["rows", "5", "placeholder", "Enter your answer(s) here, separated by returns.", 1, "w-full", "px-4", "py-3", "rounded-lg", "border-2", "text-sm", "resize-y", "transition-colors", "duration-200", "focus:ring-2", "focus:ring-offset-2", 3, "ngModelChange", "ngModel", "ngClass"], [1, "flex", "items-center", "gap-3", "mt-3"], ["type", "button", 1, "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "hover:scale-105", "active:scale-95", 3, "click", "ngClass"], ["type", "button", 1, "flex-1", "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "disabled:opacity-50", "disabled:cursor-not-allowed", "disabled:hover:scale-100", 3, "click", "disabled", "ngClass"], ["type", "button", 1, "w-full", "px-5", "py-3", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "border-2", "hover:scale-[1.01]", "active:scale-[0.99]", 3, "ngClass"], ["type", "checkbox", 1, "mt-0.5", "w-5", "h-5", "rounded", "border-2", "cursor-pointer", "transition-all", "duration-200", "focus:ring-2", "focus:ring-offset-2", 3, "change", "checked", "ngClass"], [1, "text-base", "flex-1", 3, "ngClass"], ["type", "button", 1, "w-full", "px-5", "py-3", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "border-2", "hover:scale-[1.01]", "active:scale-[0.99]", 3, "click", "ngClass"], ["xmlns", "http://www.w3.org/2000/svg", "fill", "none", "viewBox", "0 0 24 24", 1, "animate-spin", "h-4", "w-4"], ["cx", "12", "cy", "12", "r", "10", "stroke", "currentColor", "stroke-width", "4", 1, "opacity-25"], ["fill", "currentColor", "d", "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z", 1, "opacity-75"], ["type", "button", 1, "flex-1", "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-200", "flex", "items-center", "justify-center", "gap-2", "disabled:opacity-50", "disabled:cursor-not-allowed", "hover:scale-[1.01]", "active:scale-[0.99]", "disabled:hover:scale-100", 3, "click", "disabled", "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M9 5l7 7-7 7"]], template: function ShopProfileQuestionAnswerComponent_Template(rf, ctx) { if (rf & 1) {
89215
89250
  const _r1 = i0.ɵɵgetCurrentView();
89216
89251
  i0.ɵɵelementStart(0, "div", 4)(1, "div", 5, 0)(3, "div", 6)(4, "h4", 7);
89217
89252
  i0.ɵɵtext(5, " Unanswered questions status ");
@@ -89239,10 +89274,8 @@ class ShopProfileQuestionAnswerComponent {
89239
89274
  i0.ɵɵlistener("click", function ShopProfileQuestionAnswerComponent_Template_button_click_29_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSave()); });
89240
89275
  i0.ɵɵconditionalCreate(30, ShopProfileQuestionAnswerComponent_Conditional_30_Template, 5, 0)(31, ShopProfileQuestionAnswerComponent_Conditional_31_Template, 2, 0, "span");
89241
89276
  i0.ɵɵelementEnd();
89242
- i0.ɵɵelementStart(32, "button", 26);
89243
- i0.ɵɵlistener("click", function ShopProfileQuestionAnswerComponent_Template_button_click_32_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSaveAndNext()); });
89244
- i0.ɵɵconditionalCreate(33, ShopProfileQuestionAnswerComponent_Conditional_33_Template, 5, 0)(34, ShopProfileQuestionAnswerComponent_Conditional_34_Template, 4, 0);
89245
- i0.ɵɵelementEnd()()()();
89277
+ i0.ɵɵconditionalCreate(32, ShopProfileQuestionAnswerComponent_Conditional_32_Template, 3, 3, "button", 26);
89278
+ i0.ɵɵelementEnd()()();
89246
89279
  } if (rf & 2) {
89247
89280
  i0.ɵɵadvance(3);
89248
89281
  i0.ɵɵproperty("ngClass", ctx.statusHeaderClasses());
@@ -89274,13 +89307,12 @@ class ShopProfileQuestionAnswerComponent {
89274
89307
  i0.ɵɵadvance(2);
89275
89308
  i0.ɵɵproperty("ngClass", ctx.footerClasses());
89276
89309
  i0.ɵɵadvance(2);
89277
- i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", ctx.saveButtonClasses());
89310
+ i0.ɵɵclassProp("flex-1", ctx.allQuestionsAnswered())("border", !ctx.allQuestionsAnswered());
89311
+ i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", ctx.allQuestionsAnswered() ? ctx.saveAndNextButtonClasses() : ctx.saveButtonClasses());
89278
89312
  i0.ɵɵadvance();
89279
89313
  i0.ɵɵconditional(ctx.isSaving() && ctx.pendingSaveAction() === "save" ? 30 : 31);
89280
89314
  i0.ɵɵadvance(2);
89281
- i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", ctx.saveAndNextButtonClasses());
89282
- i0.ɵɵadvance();
89283
- i0.ɵɵconditional(ctx.isSaving() && ctx.pendingSaveAction() === "saveAndNext" ? 33 : 34);
89315
+ i0.ɵɵconditional(!ctx.allQuestionsAnswered() ? 32 : -1);
89284
89316
  } }, dependencies: [CommonModule, i1$1.NgClass, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgModel, IndeterminateSpinnerComponent], encapsulation: 2, data: { animation: [
89285
89317
  trigger('fadeIn', [
89286
89318
  transition(':enter', [
@@ -89479,8 +89511,10 @@ class ShopProfileQuestionAnswerComponent {
89479
89511
  type="button"
89480
89512
  (click)="onSave()"
89481
89513
  [disabled]="saveButtonsDisabled()"
89482
- [ngClass]="saveButtonClasses()"
89483
- class="px-5 py-2.5 rounded-lg font-medium text-sm transition-all duration-200 border 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]">
89514
+ [ngClass]="allQuestionsAnswered() ? saveAndNextButtonClasses() : saveButtonClasses()"
89515
+ [class.flex-1]="allQuestionsAnswered()"
89516
+ 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]"
89517
+ [class.border]="!allQuestionsAnswered()">
89484
89518
  @if (isSaving() && pendingSaveAction() === 'save') {
89485
89519
  <svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
89486
89520
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
@@ -89491,25 +89525,27 @@ class ShopProfileQuestionAnswerComponent {
89491
89525
  <span>Save</span>
89492
89526
  }
89493
89527
  </button>
89494
- <button
89495
- type="button"
89496
- (click)="onSaveAndNext()"
89497
- [disabled]="saveButtonsDisabled()"
89498
- [ngClass]="saveAndNextButtonClasses()"
89499
- class="flex-1 px-5 py-2.5 rounded-lg font-medium text-sm transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-[1.01] active:scale-[0.99] disabled:hover:scale-100">
89500
- @if (isSaving() && pendingSaveAction() === 'saveAndNext') {
89501
- <svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
89502
- <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
89503
- <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
89504
- </svg>
89505
- <span>Saving...</span>
89506
- } @else {
89507
- <span>Save & next unanswered</span>
89508
- <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
89509
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
89510
- </svg>
89511
- }
89512
- </button>
89528
+ @if (!allQuestionsAnswered()) {
89529
+ <button
89530
+ type="button"
89531
+ (click)="onSaveAndNext()"
89532
+ [disabled]="saveButtonsDisabled()"
89533
+ [ngClass]="saveAndNextButtonClasses()"
89534
+ class="flex-1 px-5 py-2.5 rounded-lg font-medium text-sm transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-[1.01] active:scale-[0.99] disabled:hover:scale-100">
89535
+ @if (isSaving() && pendingSaveAction() === 'saveAndNext') {
89536
+ <svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
89537
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
89538
+ <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
89539
+ </svg>
89540
+ <span>Saving...</span>
89541
+ } @else {
89542
+ <span>Save & next unanswered</span>
89543
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
89544
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
89545
+ </svg>
89546
+ }
89547
+ </button>
89548
+ }
89513
89549
  </div>
89514
89550
  </div>
89515
89551
  </div>
@@ -89528,7 +89564,7 @@ class ShopProfileQuestionAnswerComponent {
89528
89564
  type: ViewChild,
89529
89565
  args: ['questionTitle']
89530
89566
  }] }); })();
89531
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionAnswerComponent, { className: "ShopProfileQuestionAnswerComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-answer.component.ts", lineNumber: 260 }); })();
89567
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionAnswerComponent, { className: "ShopProfileQuestionAnswerComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-answer.component.ts", lineNumber: 264 }); })();
89532
89568
 
89533
89569
  const _c0$4 = ["modalContent"];
89534
89570
  const _c1$1 = ["modalWrapper"];