@eric-emg/symphiq-components 1.2.384 → 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.
@@ -12,7 +12,7 @@ import * as i1$1 from '@angular/common';
12
12
  import { NgClass, CommonModule, isPlatformBrowser, DOCUMENT } from '@angular/common';
13
13
  import * as i2$1 from '@angular/forms';
14
14
  import { FormsModule, FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
15
- import { trigger, transition, style, animate, keyframes } from '@angular/animations';
15
+ import { trigger, transition, style, animate, state, keyframes } from '@angular/animations';
16
16
  import { toObservable, toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
17
17
  import { MarkdownComponent } from 'ngx-markdown';
18
18
  import dayjs from 'dayjs';
@@ -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", undefined)("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", undefined)("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
  } }
@@ -88242,18 +88242,36 @@ class ShopProfileQuestionCardComponent {
88242
88242
  this.profileShopAnswers = input([], ...(ngDevMode ? [{ debugName: "profileShopAnswers" }] : []));
88243
88243
  this.users = input([], ...(ngDevMode ? [{ debugName: "users" }] : []));
88244
88244
  this.answerClick = output();
88245
- this.questionAnswers = computed(() => {
88245
+ this.knownAnswerIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "knownAnswerIds" }] : []));
88246
+ this.isInitialized = signal(false, ...(ngDevMode ? [{ debugName: "isInitialized" }] : []));
88247
+ this.questionAnswersWithState = computed(() => {
88246
88248
  const questionId = this.question().id;
88247
88249
  const answers = this.profileShopAnswers();
88248
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
+ });
88249
88258
  if (!questionId || !answers)
88250
88259
  return [];
88251
- return answers
88260
+ const result = answers
88252
88261
  .filter(a => a.profileQuestionId === questionId)
88253
- .map(answer => ({
88254
- answer,
88255
- user: allUsers.find(u => u.id === answer.creatorUserId)
88256
- }));
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();
88257
88275
  }, ...(ngDevMode ? [{ debugName: "questionAnswers" }] : []));
88258
88276
  this.isAnswered = computed(() => {
88259
88277
  return this.questionAnswers().length > 0;
@@ -88265,6 +88283,34 @@ class ShopProfileQuestionCardComponent {
88265
88283
  const q = this.question();
88266
88284
  return q.focusAreaDomains || [];
88267
88285
  }, ...(ngDevMode ? [{ debugName: "relatedFocusAreas" }] : []));
88286
+ effect(() => {
88287
+ const currentAnswers = this.questionAnswersWithState();
88288
+ const currentIds = new Set(currentAnswers.map(a => a.answer.id).filter((id) => id !== undefined));
88289
+ const known = untracked(() => this.knownAnswerIds());
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);
88304
+ }
88305
+ else {
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);
88312
+ }
88313
+ });
88268
88314
  }
88269
88315
  getFocusAreaTitle(focusArea) {
88270
88316
  return FocusAreaDomainEnumUtil.title(focusArea);
@@ -88406,14 +88452,17 @@ class ShopProfileQuestionCardComponent {
88406
88452
  i0.ɵɵtextInterpolate(ctx.isAnswered() ? "Edit Answer" : "Answer");
88407
88453
  } }, dependencies: [CommonModule, i1$1.NgClass, UserAvatarComponent], encapsulation: 2, data: { animation: [
88408
88454
  trigger('answerAnimation', [
88409
- transition(':enter', [
88455
+ state('existing', style({ opacity: 1, transform: 'scale(1)' })),
88456
+ state('new', style({ opacity: 1, transform: 'scale(1)' })),
88457
+ transition('void => new', [
88410
88458
  animate('500ms ease-out', keyframes([
88411
88459
  style({ opacity: 0, transform: 'scale(0.8)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 0 }),
88412
88460
  style({ opacity: 1, transform: 'scale(1.05)', boxShadow: '0 0 20px 4px rgba(59, 130, 246, 0.5)', offset: 0.5 }),
88413
88461
  style({ opacity: 1, transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 1 })
88414
88462
  ]))
88415
88463
  ]),
88416
- transition(':leave', [
88464
+ transition('void => existing', []),
88465
+ transition('* => void', [
88417
88466
  animate('300ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
88418
88467
  ])
88419
88468
  ])
@@ -88428,14 +88477,17 @@ class ShopProfileQuestionCardComponent {
88428
88477
  changeDetection: ChangeDetectionStrategy.OnPush,
88429
88478
  animations: [
88430
88479
  trigger('answerAnimation', [
88431
- transition(':enter', [
88480
+ state('existing', style({ opacity: 1, transform: 'scale(1)' })),
88481
+ state('new', style({ opacity: 1, transform: 'scale(1)' })),
88482
+ transition('void => new', [
88432
88483
  animate('500ms ease-out', keyframes([
88433
88484
  style({ opacity: 0, transform: 'scale(0.8)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 0 }),
88434
88485
  style({ opacity: 1, transform: 'scale(1.05)', boxShadow: '0 0 20px 4px rgba(59, 130, 246, 0.5)', offset: 0.5 }),
88435
88486
  style({ opacity: 1, transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 1 })
88436
88487
  ]))
88437
88488
  ]),
88438
- transition(':leave', [
88489
+ transition('void => existing', []),
88490
+ transition('* => void', [
88439
88491
  animate('300ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
88440
88492
  ])
88441
88493
  ])
@@ -88488,7 +88540,7 @@ class ShopProfileQuestionCardComponent {
88488
88540
  <!-- Answered State - Show answer chips -->
88489
88541
  <div class="flex flex-wrap gap-3">
88490
88542
  @for (answerData of questionAnswers(); track answerData.answer.id) {
88491
- <div @answerAnimation [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">
88492
88544
  <span [ngClass]="answerTextClasses()" class="text-sm font-medium">
88493
88545
  {{ answerData.answer.answer }}
88494
88546
  </span>
@@ -88498,7 +88550,7 @@ class ShopProfileQuestionCardComponent {
88498
88550
  size="small"
88499
88551
  />
88500
88552
  </div>
88501
- <div @answerAnimation [ngClass]="answerDateClasses()" class="self-center text-xs -ml-1">
88553
+ <div [@answerAnimation]="answerData.animState" [ngClass]="answerDateClasses()" class="self-center text-xs -ml-1">
88502
88554
  Answered {{ formatAnswerDate(answerData.answer.createdDate) }}
88503
88555
  </div>
88504
88556
  }
@@ -88542,8 +88594,8 @@ class ShopProfileQuestionCardComponent {
88542
88594
  </div>
88543
88595
  `
88544
88596
  }]
88545
- }], null, { question: [{ type: i0.Input, args: [{ isSignal: true, alias: "question", required: true }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: false }] }], profileShopAnswers: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileShopAnswers", required: false }] }], users: [{ type: i0.Input, args: [{ isSignal: true, alias: "users", required: false }] }], answerClick: [{ type: i0.Output, args: ["answerClick"] }] }); })();
88546
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionCardComponent, { className: "ShopProfileQuestionCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-card.component.ts", lineNumber: 134 }); })();
88597
+ }], () => [], { question: [{ type: i0.Input, args: [{ isSignal: true, alias: "question", required: true }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: false }] }], profileShopAnswers: [{ type: i0.Input, args: [{ isSignal: true, alias: "profileShopAnswers", required: false }] }], users: [{ type: i0.Input, args: [{ isSignal: true, alias: "users", required: false }] }], answerClick: [{ type: i0.Output, args: ["answerClick"] }] }); })();
88598
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionCardComponent, { className: "ShopProfileQuestionCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-card.component.ts", lineNumber: 140 }); })();
88547
88599
 
88548
88600
  const _c0$5 = ["scrollContainer"];
88549
88601
  const _c1$2 = ["stickySentinel"];
@@ -88736,7 +88788,7 @@ function ShopProfileQuestionAnswerComponent_Conditional_31_Template(rf, ctx) { i
88736
88788
  i0.ɵɵtext(1, "Save");
88737
88789
  i0.ɵɵelementEnd();
88738
88790
  } }
88739
- function ShopProfileQuestionAnswerComponent_Conditional_33_Template(rf, ctx) { if (rf & 1) {
88791
+ function ShopProfileQuestionAnswerComponent_Conditional_32_Conditional_1_Template(rf, ctx) { if (rf & 1) {
88740
88792
  i0.ɵɵnamespaceSVG();
88741
88793
  i0.ɵɵelementStart(0, "svg", 55);
88742
88794
  i0.ɵɵelement(1, "circle", 56)(2, "path", 57);
@@ -88746,15 +88798,27 @@ function ShopProfileQuestionAnswerComponent_Conditional_33_Template(rf, ctx) { i
88746
88798
  i0.ɵɵtext(4, "Saving...");
88747
88799
  i0.ɵɵelementEnd();
88748
88800
  } }
88749
- function ShopProfileQuestionAnswerComponent_Conditional_34_Template(rf, ctx) { if (rf & 1) {
88801
+ function ShopProfileQuestionAnswerComponent_Conditional_32_Conditional_2_Template(rf, ctx) { if (rf & 1) {
88750
88802
  i0.ɵɵelementStart(0, "span");
88751
88803
  i0.ɵɵtext(1, "Save & next unanswered");
88752
88804
  i0.ɵɵelementEnd();
88753
88805
  i0.ɵɵnamespaceSVG();
88754
- i0.ɵɵelementStart(2, "svg", 58);
88755
- i0.ɵɵelement(3, "path", 59);
88806
+ i0.ɵɵelementStart(2, "svg", 59);
88807
+ i0.ɵɵelement(3, "path", 60);
88756
88808
  i0.ɵɵelementEnd();
88757
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);
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);
88821
+ } }
88758
88822
  class ShopProfileQuestionAnswerComponent {
88759
88823
  constructor() {
88760
88824
  this.question = input.required(...(ngDevMode ? [{ debugName: "question" }] : []));
@@ -88837,6 +88901,9 @@ class ShopProfileQuestionAnswerComponent {
88837
88901
  return 0;
88838
88902
  return (this.answeredCount() / total) * 100;
88839
88903
  }, ...(ngDevMode ? [{ debugName: "progressPercentage" }] : []));
88904
+ this.allQuestionsAnswered = computed(() => {
88905
+ return this.unansweredQuestions().length === 0;
88906
+ }, ...(ngDevMode ? [{ debugName: "allQuestionsAnswered" }] : []));
88840
88907
  this.canAddCustomAnswers = computed(() => {
88841
88908
  return this.customAnswerText().trim().length > 0;
88842
88909
  }, ...(ngDevMode ? [{ debugName: "canAddCustomAnswers" }] : []));
@@ -89179,7 +89246,7 @@ class ShopProfileQuestionAnswerComponent {
89179
89246
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stickySentinel = _t.first);
89180
89247
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stickyHeader = _t.first);
89181
89248
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.questionTitle = _t.first);
89182
- } }, 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) {
89183
89250
  const _r1 = i0.ɵɵgetCurrentView();
89184
89251
  i0.ɵɵelementStart(0, "div", 4)(1, "div", 5, 0)(3, "div", 6)(4, "h4", 7);
89185
89252
  i0.ɵɵtext(5, " Unanswered questions status ");
@@ -89207,10 +89274,8 @@ class ShopProfileQuestionAnswerComponent {
89207
89274
  i0.ɵɵlistener("click", function ShopProfileQuestionAnswerComponent_Template_button_click_29_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSave()); });
89208
89275
  i0.ɵɵconditionalCreate(30, ShopProfileQuestionAnswerComponent_Conditional_30_Template, 5, 0)(31, ShopProfileQuestionAnswerComponent_Conditional_31_Template, 2, 0, "span");
89209
89276
  i0.ɵɵelementEnd();
89210
- i0.ɵɵelementStart(32, "button", 26);
89211
- i0.ɵɵlistener("click", function ShopProfileQuestionAnswerComponent_Template_button_click_32_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSaveAndNext()); });
89212
- i0.ɵɵconditionalCreate(33, ShopProfileQuestionAnswerComponent_Conditional_33_Template, 5, 0)(34, ShopProfileQuestionAnswerComponent_Conditional_34_Template, 4, 0);
89213
- i0.ɵɵelementEnd()()()();
89277
+ i0.ɵɵconditionalCreate(32, ShopProfileQuestionAnswerComponent_Conditional_32_Template, 3, 3, "button", 26);
89278
+ i0.ɵɵelementEnd()()();
89214
89279
  } if (rf & 2) {
89215
89280
  i0.ɵɵadvance(3);
89216
89281
  i0.ɵɵproperty("ngClass", ctx.statusHeaderClasses());
@@ -89242,13 +89307,12 @@ class ShopProfileQuestionAnswerComponent {
89242
89307
  i0.ɵɵadvance(2);
89243
89308
  i0.ɵɵproperty("ngClass", ctx.footerClasses());
89244
89309
  i0.ɵɵadvance(2);
89245
- 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());
89246
89312
  i0.ɵɵadvance();
89247
89313
  i0.ɵɵconditional(ctx.isSaving() && ctx.pendingSaveAction() === "save" ? 30 : 31);
89248
89314
  i0.ɵɵadvance(2);
89249
- i0.ɵɵproperty("disabled", ctx.saveButtonsDisabled())("ngClass", ctx.saveAndNextButtonClasses());
89250
- i0.ɵɵadvance();
89251
- i0.ɵɵconditional(ctx.isSaving() && ctx.pendingSaveAction() === "saveAndNext" ? 33 : 34);
89315
+ i0.ɵɵconditional(!ctx.allQuestionsAnswered() ? 32 : -1);
89252
89316
  } }, dependencies: [CommonModule, i1$1.NgClass, FormsModule, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgModel, IndeterminateSpinnerComponent], encapsulation: 2, data: { animation: [
89253
89317
  trigger('fadeIn', [
89254
89318
  transition(':enter', [
@@ -89447,8 +89511,10 @@ class ShopProfileQuestionAnswerComponent {
89447
89511
  type="button"
89448
89512
  (click)="onSave()"
89449
89513
  [disabled]="saveButtonsDisabled()"
89450
- [ngClass]="saveButtonClasses()"
89451
- 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()">
89452
89518
  @if (isSaving() && pendingSaveAction() === 'save') {
89453
89519
  <svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
89454
89520
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
@@ -89459,25 +89525,27 @@ class ShopProfileQuestionAnswerComponent {
89459
89525
  <span>Save</span>
89460
89526
  }
89461
89527
  </button>
89462
- <button
89463
- type="button"
89464
- (click)="onSaveAndNext()"
89465
- [disabled]="saveButtonsDisabled()"
89466
- [ngClass]="saveAndNextButtonClasses()"
89467
- 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">
89468
- @if (isSaving() && pendingSaveAction() === 'saveAndNext') {
89469
- <svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
89470
- <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
89471
- <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>
89472
- </svg>
89473
- <span>Saving...</span>
89474
- } @else {
89475
- <span>Save & next unanswered</span>
89476
- <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
89477
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
89478
- </svg>
89479
- }
89480
- </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
+ }
89481
89549
  </div>
89482
89550
  </div>
89483
89551
  </div>
@@ -89496,7 +89564,7 @@ class ShopProfileQuestionAnswerComponent {
89496
89564
  type: ViewChild,
89497
89565
  args: ['questionTitle']
89498
89566
  }] }); })();
89499
- (() => { (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 }); })();
89500
89568
 
89501
89569
  const _c0$4 = ["modalContent"];
89502
89570
  const _c1$1 = ["modalWrapper"];