@eric-emg/symphiq-components 1.2.386 → 1.2.387
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 +15 -94
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +20 -29
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
15
|
+
import { trigger, transition, style, animate } 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("
|
|
88187
|
+
i0.ɵɵproperty("ngClass", ctx_r0.answerChipClasses());
|
|
88188
88188
|
i0.ɵɵadvance();
|
|
88189
88189
|
i0.ɵɵproperty("ngClass", ctx_r0.answerTextClasses());
|
|
88190
88190
|
i0.ɵɵadvance();
|
|
@@ -88192,13 +88192,13 @@ 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("
|
|
88195
|
+
i0.ɵɵproperty("ngClass", ctx_r0.answerDateClasses());
|
|
88196
88196
|
i0.ɵɵadvance();
|
|
88197
88197
|
i0.ɵɵtextInterpolate1(" Answered ", ctx_r0.formatAnswerDate(answerData_r3.answer.createdDate), " ");
|
|
88198
88198
|
} }
|
|
88199
88199
|
function ShopProfileQuestionCardComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
88200
88200
|
i0.ɵɵelementStart(0, "div", 7);
|
|
88201
|
-
i0.ɵɵrepeaterCreate(1, ShopProfileQuestionCardComponent_Conditional_8_For_2_Template, 6,
|
|
88201
|
+
i0.ɵɵrepeaterCreate(1, ShopProfileQuestionCardComponent_Conditional_8_For_2_Template, 6, 7, null, null, _forTrack0$3);
|
|
88202
88202
|
i0.ɵɵelementEnd();
|
|
88203
88203
|
} if (rf & 2) {
|
|
88204
88204
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -88242,36 +88242,18 @@ 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.
|
|
88246
|
-
this.isInitialized = signal(false, ...(ngDevMode ? [{ debugName: "isInitialized" }] : []));
|
|
88247
|
-
this.questionAnswersWithState = computed(() => {
|
|
88245
|
+
this.questionAnswers = computed(() => {
|
|
88248
88246
|
const questionId = this.question().id;
|
|
88249
88247
|
const answers = this.profileShopAnswers();
|
|
88250
88248
|
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
|
-
});
|
|
88258
88249
|
if (!questionId || !answers)
|
|
88259
88250
|
return [];
|
|
88260
|
-
|
|
88251
|
+
return answers
|
|
88261
88252
|
.filter(a => a.profileQuestionId === questionId)
|
|
88262
|
-
.map(answer => {
|
|
88263
|
-
|
|
88264
|
-
|
|
88265
|
-
|
|
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();
|
|
88253
|
+
.map(answer => ({
|
|
88254
|
+
answer,
|
|
88255
|
+
user: allUsers.find(u => u.id === answer.creatorUserId)
|
|
88256
|
+
}));
|
|
88275
88257
|
}, ...(ngDevMode ? [{ debugName: "questionAnswers" }] : []));
|
|
88276
88258
|
this.isAnswered = computed(() => {
|
|
88277
88259
|
return this.questionAnswers().length > 0;
|
|
@@ -88283,34 +88265,6 @@ class ShopProfileQuestionCardComponent {
|
|
|
88283
88265
|
const q = this.question();
|
|
88284
88266
|
return q.focusAreaDomains || [];
|
|
88285
88267
|
}, ...(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
|
-
});
|
|
88314
88268
|
}
|
|
88315
88269
|
getFocusAreaTitle(focusArea) {
|
|
88316
88270
|
return FocusAreaDomainEnumUtil.title(focusArea);
|
|
@@ -88450,23 +88404,7 @@ class ShopProfileQuestionCardComponent {
|
|
|
88450
88404
|
i0.ɵɵproperty("ngClass", ctx.buttonClasses());
|
|
88451
88405
|
i0.ɵɵadvance(2);
|
|
88452
88406
|
i0.ɵɵtextInterpolate(ctx.isAnswered() ? "Edit Answer" : "Answer");
|
|
88453
|
-
} }, dependencies: [CommonModule, i1$1.NgClass, UserAvatarComponent], encapsulation: 2,
|
|
88454
|
-
trigger('answerAnimation', [
|
|
88455
|
-
state('existing', style({ opacity: 1, transform: 'scale(1)' })),
|
|
88456
|
-
state('new', style({ opacity: 1, transform: 'scale(1)' })),
|
|
88457
|
-
transition('void => new', [
|
|
88458
|
-
animate('500ms ease-out', keyframes([
|
|
88459
|
-
style({ opacity: 0, transform: 'scale(0.8)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 0 }),
|
|
88460
|
-
style({ opacity: 1, transform: 'scale(1.05)', boxShadow: '0 0 20px 4px rgba(59, 130, 246, 0.5)', offset: 0.5 }),
|
|
88461
|
-
style({ opacity: 1, transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 1 })
|
|
88462
|
-
]))
|
|
88463
|
-
]),
|
|
88464
|
-
transition('void => existing', []),
|
|
88465
|
-
transition('* => void', [
|
|
88466
|
-
animate('300ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
88467
|
-
])
|
|
88468
|
-
])
|
|
88469
|
-
] }, changeDetection: 0 }); }
|
|
88407
|
+
} }, dependencies: [CommonModule, i1$1.NgClass, UserAvatarComponent], encapsulation: 2, changeDetection: 0 }); }
|
|
88470
88408
|
}
|
|
88471
88409
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShopProfileQuestionCardComponent, [{
|
|
88472
88410
|
type: Component,
|
|
@@ -88475,23 +88413,6 @@ class ShopProfileQuestionCardComponent {
|
|
|
88475
88413
|
standalone: true,
|
|
88476
88414
|
imports: [CommonModule, UserAvatarComponent],
|
|
88477
88415
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
88478
|
-
animations: [
|
|
88479
|
-
trigger('answerAnimation', [
|
|
88480
|
-
state('existing', style({ opacity: 1, transform: 'scale(1)' })),
|
|
88481
|
-
state('new', style({ opacity: 1, transform: 'scale(1)' })),
|
|
88482
|
-
transition('void => new', [
|
|
88483
|
-
animate('500ms ease-out', keyframes([
|
|
88484
|
-
style({ opacity: 0, transform: 'scale(0.8)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 0 }),
|
|
88485
|
-
style({ opacity: 1, transform: 'scale(1.05)', boxShadow: '0 0 20px 4px rgba(59, 130, 246, 0.5)', offset: 0.5 }),
|
|
88486
|
-
style({ opacity: 1, transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 1 })
|
|
88487
|
-
]))
|
|
88488
|
-
]),
|
|
88489
|
-
transition('void => existing', []),
|
|
88490
|
-
transition('* => void', [
|
|
88491
|
-
animate('300ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
88492
|
-
])
|
|
88493
|
-
])
|
|
88494
|
-
],
|
|
88495
88416
|
template: `
|
|
88496
88417
|
<div [ngClass]="containerClasses()" class="rounded-xl border-2 p-6 transition-all duration-200">
|
|
88497
88418
|
<!-- Question Header with Checkbox -->
|
|
@@ -88540,7 +88461,7 @@ class ShopProfileQuestionCardComponent {
|
|
|
88540
88461
|
<!-- Answered State - Show answer chips -->
|
|
88541
88462
|
<div class="flex flex-wrap gap-3">
|
|
88542
88463
|
@for (answerData of questionAnswers(); track answerData.answer.id) {
|
|
88543
|
-
<div [
|
|
88464
|
+
<div [ngClass]="answerChipClasses()" class="flex items-center gap-2 px-4 py-2.5 rounded-full">
|
|
88544
88465
|
<span [ngClass]="answerTextClasses()" class="text-sm font-medium">
|
|
88545
88466
|
{{ answerData.answer.answer }}
|
|
88546
88467
|
</span>
|
|
@@ -88550,7 +88471,7 @@ class ShopProfileQuestionCardComponent {
|
|
|
88550
88471
|
size="small"
|
|
88551
88472
|
/>
|
|
88552
88473
|
</div>
|
|
88553
|
-
<div [
|
|
88474
|
+
<div [ngClass]="answerDateClasses()" class="self-center text-xs -ml-1">
|
|
88554
88475
|
Answered {{ formatAnswerDate(answerData.answer.createdDate) }}
|
|
88555
88476
|
</div>
|
|
88556
88477
|
}
|
|
@@ -88594,8 +88515,8 @@ class ShopProfileQuestionCardComponent {
|
|
|
88594
88515
|
</div>
|
|
88595
88516
|
`
|
|
88596
88517
|
}]
|
|
88597
|
-
}],
|
|
88598
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionCardComponent, { className: "ShopProfileQuestionCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-card.component.ts", lineNumber:
|
|
88518
|
+
}], 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"] }] }); })();
|
|
88519
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionCardComponent, { className: "ShopProfileQuestionCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-card.component.ts", lineNumber: 119 }); })();
|
|
88599
88520
|
|
|
88600
88521
|
const _c0$5 = ["scrollContainer"];
|
|
88601
88522
|
const _c1$2 = ["stickySentinel"];
|