@eric-emg/symphiq-components 1.2.387 → 1.2.388
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 +49 -11
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +3 -1
- 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 } from '@angular/animations';
|
|
15
|
+
import { trigger, transition, style, animate, 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("ngClass", ctx_r0.answerChipClasses());
|
|
88187
|
+
i0.ɵɵproperty("@answerChip", undefined)("ngClass", ctx_r0.answerChipClasses());
|
|
88188
88188
|
i0.ɵɵadvance();
|
|
88189
88189
|
i0.ɵɵproperty("ngClass", ctx_r0.answerTextClasses());
|
|
88190
88190
|
i0.ɵɵadvance();
|
|
@@ -88192,16 +88192,17 @@ 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("ngClass", ctx_r0.answerDateClasses());
|
|
88195
|
+
i0.ɵɵproperty("@answerChip", undefined)("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, 9, null, null, _forTrack0$3);
|
|
88202
88202
|
i0.ɵɵelementEnd();
|
|
88203
88203
|
} if (rf & 2) {
|
|
88204
88204
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
88205
|
+
i0.ɵɵproperty("@.disabled", !ctx_r0.animationsEnabled());
|
|
88205
88206
|
i0.ɵɵadvance();
|
|
88206
88207
|
i0.ɵɵrepeater(ctx_r0.questionAnswers());
|
|
88207
88208
|
} }
|
|
@@ -88242,18 +88243,21 @@ class ShopProfileQuestionCardComponent {
|
|
|
88242
88243
|
this.profileShopAnswers = input([], ...(ngDevMode ? [{ debugName: "profileShopAnswers" }] : []));
|
|
88243
88244
|
this.users = input([], ...(ngDevMode ? [{ debugName: "users" }] : []));
|
|
88244
88245
|
this.answerClick = output();
|
|
88246
|
+
this.animationsEnabled = signal(false, ...(ngDevMode ? [{ debugName: "animationsEnabled" }] : []));
|
|
88245
88247
|
this.questionAnswers = computed(() => {
|
|
88246
88248
|
const questionId = this.question().id;
|
|
88247
88249
|
const answers = this.profileShopAnswers();
|
|
88248
88250
|
const allUsers = this.users();
|
|
88249
88251
|
if (!questionId || !answers)
|
|
88250
88252
|
return [];
|
|
88251
|
-
|
|
88253
|
+
const result = answers
|
|
88252
88254
|
.filter(a => a.profileQuestionId === questionId)
|
|
88253
88255
|
.map(answer => ({
|
|
88254
88256
|
answer,
|
|
88255
88257
|
user: allUsers.find(u => u.id === answer.creatorUserId)
|
|
88256
88258
|
}));
|
|
88259
|
+
console.log(`[QuestionCard ${questionId}] Answers:`, result.map(r => r.answer.id));
|
|
88260
|
+
return result;
|
|
88257
88261
|
}, ...(ngDevMode ? [{ debugName: "questionAnswers" }] : []));
|
|
88258
88262
|
this.isAnswered = computed(() => {
|
|
88259
88263
|
return this.questionAnswers().length > 0;
|
|
@@ -88266,6 +88270,13 @@ class ShopProfileQuestionCardComponent {
|
|
|
88266
88270
|
return q.focusAreaDomains || [];
|
|
88267
88271
|
}, ...(ngDevMode ? [{ debugName: "relatedFocusAreas" }] : []));
|
|
88268
88272
|
}
|
|
88273
|
+
ngOnInit() {
|
|
88274
|
+
console.log(`[QuestionCard ${this.question().id}] ngOnInit - enabling animations after delay`);
|
|
88275
|
+
setTimeout(() => {
|
|
88276
|
+
console.log(`[QuestionCard ${this.question().id}] Animations now enabled`);
|
|
88277
|
+
this.animationsEnabled.set(true);
|
|
88278
|
+
}, 100);
|
|
88279
|
+
}
|
|
88269
88280
|
getFocusAreaTitle(focusArea) {
|
|
88270
88281
|
return FocusAreaDomainEnumUtil.title(focusArea);
|
|
88271
88282
|
}
|
|
@@ -88376,7 +88387,7 @@ class ShopProfileQuestionCardComponent {
|
|
|
88376
88387
|
i0.ɵɵelementEnd();
|
|
88377
88388
|
i0.ɵɵconditionalCreate(6, ShopProfileQuestionCardComponent_Conditional_6_Template, 2, 2, "p", 5);
|
|
88378
88389
|
i0.ɵɵconditionalCreate(7, ShopProfileQuestionCardComponent_Conditional_7_Template, 7, 2, "div", 6);
|
|
88379
|
-
i0.ɵɵconditionalCreate(8, ShopProfileQuestionCardComponent_Conditional_8_Template, 3,
|
|
88390
|
+
i0.ɵɵconditionalCreate(8, ShopProfileQuestionCardComponent_Conditional_8_Template, 3, 1, "div", 7)(9, ShopProfileQuestionCardComponent_Conditional_9_Template, 11, 6, "div", 8);
|
|
88380
88391
|
i0.ɵɵelementStart(10, "div", 9)(11, "button", 10);
|
|
88381
88392
|
i0.ɵɵlistener("click", function ShopProfileQuestionCardComponent_Template_button_click_11_listener() { return ctx.onAnswerClick(); });
|
|
88382
88393
|
i0.ɵɵelementStart(12, "span");
|
|
@@ -88404,7 +88415,20 @@ class ShopProfileQuestionCardComponent {
|
|
|
88404
88415
|
i0.ɵɵproperty("ngClass", ctx.buttonClasses());
|
|
88405
88416
|
i0.ɵɵadvance(2);
|
|
88406
88417
|
i0.ɵɵtextInterpolate(ctx.isAnswered() ? "Edit Answer" : "Answer");
|
|
88407
|
-
} }, dependencies: [CommonModule, i1$1.NgClass, UserAvatarComponent], encapsulation: 2,
|
|
88418
|
+
} }, dependencies: [CommonModule, i1$1.NgClass, UserAvatarComponent], encapsulation: 2, data: { animation: [
|
|
88419
|
+
trigger('answerChip', [
|
|
88420
|
+
transition(':enter', [
|
|
88421
|
+
animate('500ms ease-out', keyframes([
|
|
88422
|
+
style({ opacity: 0, transform: 'scale(0.8)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 0 }),
|
|
88423
|
+
style({ opacity: 1, transform: 'scale(1.05)', boxShadow: '0 0 20px 4px rgba(59, 130, 246, 0.5)', offset: 0.5 }),
|
|
88424
|
+
style({ opacity: 1, transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 1 })
|
|
88425
|
+
]))
|
|
88426
|
+
]),
|
|
88427
|
+
transition(':leave', [
|
|
88428
|
+
animate('300ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
88429
|
+
])
|
|
88430
|
+
])
|
|
88431
|
+
] }, changeDetection: 0 }); }
|
|
88408
88432
|
}
|
|
88409
88433
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShopProfileQuestionCardComponent, [{
|
|
88410
88434
|
type: Component,
|
|
@@ -88413,6 +88437,20 @@ class ShopProfileQuestionCardComponent {
|
|
|
88413
88437
|
standalone: true,
|
|
88414
88438
|
imports: [CommonModule, UserAvatarComponent],
|
|
88415
88439
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
88440
|
+
animations: [
|
|
88441
|
+
trigger('answerChip', [
|
|
88442
|
+
transition(':enter', [
|
|
88443
|
+
animate('500ms ease-out', keyframes([
|
|
88444
|
+
style({ opacity: 0, transform: 'scale(0.8)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 0 }),
|
|
88445
|
+
style({ opacity: 1, transform: 'scale(1.05)', boxShadow: '0 0 20px 4px rgba(59, 130, 246, 0.5)', offset: 0.5 }),
|
|
88446
|
+
style({ opacity: 1, transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(59, 130, 246, 0)', offset: 1 })
|
|
88447
|
+
]))
|
|
88448
|
+
]),
|
|
88449
|
+
transition(':leave', [
|
|
88450
|
+
animate('300ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
88451
|
+
])
|
|
88452
|
+
])
|
|
88453
|
+
],
|
|
88416
88454
|
template: `
|
|
88417
88455
|
<div [ngClass]="containerClasses()" class="rounded-xl border-2 p-6 transition-all duration-200">
|
|
88418
88456
|
<!-- Question Header with Checkbox -->
|
|
@@ -88459,9 +88497,9 @@ class ShopProfileQuestionCardComponent {
|
|
|
88459
88497
|
<!-- Answer Section -->
|
|
88460
88498
|
@if (questionAnswers().length > 0) {
|
|
88461
88499
|
<!-- Answered State - Show answer chips -->
|
|
88462
|
-
<div class="flex flex-wrap gap-3">
|
|
88500
|
+
<div class="flex flex-wrap gap-3" [@.disabled]="!animationsEnabled()">
|
|
88463
88501
|
@for (answerData of questionAnswers(); track answerData.answer.id) {
|
|
88464
|
-
<div [ngClass]="answerChipClasses()" class="flex items-center gap-2 px-4 py-2.5 rounded-full">
|
|
88502
|
+
<div @answerChip [ngClass]="answerChipClasses()" class="flex items-center gap-2 px-4 py-2.5 rounded-full">
|
|
88465
88503
|
<span [ngClass]="answerTextClasses()" class="text-sm font-medium">
|
|
88466
88504
|
{{ answerData.answer.answer }}
|
|
88467
88505
|
</span>
|
|
@@ -88471,7 +88509,7 @@ class ShopProfileQuestionCardComponent {
|
|
|
88471
88509
|
size="small"
|
|
88472
88510
|
/>
|
|
88473
88511
|
</div>
|
|
88474
|
-
<div [ngClass]="answerDateClasses()" class="self-center text-xs -ml-1">
|
|
88512
|
+
<div @answerChip [ngClass]="answerDateClasses()" class="self-center text-xs -ml-1">
|
|
88475
88513
|
Answered {{ formatAnswerDate(answerData.answer.createdDate) }}
|
|
88476
88514
|
</div>
|
|
88477
88515
|
}
|
|
@@ -88516,7 +88554,7 @@ class ShopProfileQuestionCardComponent {
|
|
|
88516
88554
|
`
|
|
88517
88555
|
}]
|
|
88518
88556
|
}], 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:
|
|
88557
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionCardComponent, { className: "ShopProfileQuestionCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-card.component.ts", lineNumber: 136 }); })();
|
|
88520
88558
|
|
|
88521
88559
|
const _c0$5 = ["scrollContainer"];
|
|
88522
88560
|
const _c1$2 = ["stickySentinel"];
|