@eric-emg/symphiq-components 1.2.387 → 1.2.389
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 +122 -19
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +44 -38
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -88124,6 +88124,70 @@ class ShopProfileViewToggleComponent {
|
|
|
88124
88124
|
}], null, { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], currentView: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentView", required: false }] }], viewChanged: [{ type: i0.Output, args: ["viewChanged"] }] }); })();
|
|
88125
88125
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileViewToggleComponent, { className: "ShopProfileViewToggleComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-view-toggle.component.ts", lineNumber: 33 }); })();
|
|
88126
88126
|
|
|
88127
|
+
class ProfileAnswerAnimationService {
|
|
88128
|
+
constructor() {
|
|
88129
|
+
this.previousAnswerIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "previousAnswerIds" }] : []));
|
|
88130
|
+
this.animationState = signal({
|
|
88131
|
+
newAnswerIds: new Set(),
|
|
88132
|
+
removedAnswerIds: new Set()
|
|
88133
|
+
}, ...(ngDevMode ? [{ debugName: "animationState" }] : []));
|
|
88134
|
+
}
|
|
88135
|
+
getAnimationState() {
|
|
88136
|
+
return this.animationState.asReadonly();
|
|
88137
|
+
}
|
|
88138
|
+
snapshotCurrentAnswers(answerIds) {
|
|
88139
|
+
this.previousAnswerIds.set(new Set(answerIds));
|
|
88140
|
+
}
|
|
88141
|
+
computeAnimationState(currentAnswerIds) {
|
|
88142
|
+
const previous = this.previousAnswerIds();
|
|
88143
|
+
const current = new Set(currentAnswerIds);
|
|
88144
|
+
const newAnswerIds = new Set();
|
|
88145
|
+
const removedAnswerIds = new Set();
|
|
88146
|
+
current.forEach(id => {
|
|
88147
|
+
if (!previous.has(id)) {
|
|
88148
|
+
newAnswerIds.add(id);
|
|
88149
|
+
}
|
|
88150
|
+
});
|
|
88151
|
+
previous.forEach(id => {
|
|
88152
|
+
if (!current.has(id)) {
|
|
88153
|
+
removedAnswerIds.add(id);
|
|
88154
|
+
}
|
|
88155
|
+
});
|
|
88156
|
+
console.log('[AnimationService] State computed:', {
|
|
88157
|
+
previous: Array.from(previous),
|
|
88158
|
+
current: Array.from(current),
|
|
88159
|
+
newIds: Array.from(newAnswerIds),
|
|
88160
|
+
removedIds: Array.from(removedAnswerIds)
|
|
88161
|
+
});
|
|
88162
|
+
this.animationState.set({ newAnswerIds, removedAnswerIds });
|
|
88163
|
+
this.previousAnswerIds.set(current);
|
|
88164
|
+
}
|
|
88165
|
+
isNewAnswer(answerId) {
|
|
88166
|
+
return this.animationState().newAnswerIds.has(answerId);
|
|
88167
|
+
}
|
|
88168
|
+
clearAnimationState() {
|
|
88169
|
+
this.animationState.set({
|
|
88170
|
+
newAnswerIds: new Set(),
|
|
88171
|
+
removedAnswerIds: new Set()
|
|
88172
|
+
});
|
|
88173
|
+
}
|
|
88174
|
+
clearNewAnswer(answerId) {
|
|
88175
|
+
this.animationState.update(state => {
|
|
88176
|
+
const newIds = new Set(state.newAnswerIds);
|
|
88177
|
+
newIds.delete(answerId);
|
|
88178
|
+
return { ...state, newAnswerIds: newIds };
|
|
88179
|
+
});
|
|
88180
|
+
}
|
|
88181
|
+
static { this.ɵfac = function ProfileAnswerAnimationService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ProfileAnswerAnimationService)(); }; }
|
|
88182
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ProfileAnswerAnimationService, factory: ProfileAnswerAnimationService.ɵfac, providedIn: 'root' }); }
|
|
88183
|
+
}
|
|
88184
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProfileAnswerAnimationService, [{
|
|
88185
|
+
type: Injectable,
|
|
88186
|
+
args: [{
|
|
88187
|
+
providedIn: 'root'
|
|
88188
|
+
}]
|
|
88189
|
+
}], null, null); })();
|
|
88190
|
+
|
|
88127
88191
|
const _forTrack0$3 = ($index, $item) => $item.answer.id;
|
|
88128
88192
|
function ShopProfileQuestionCardComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
88129
88193
|
i0.ɵɵelementStart(0, "div", 4);
|
|
@@ -88173,7 +88237,10 @@ function ShopProfileQuestionCardComponent_Conditional_7_Template(rf, ctx) { if (
|
|
|
88173
88237
|
i0.ɵɵrepeater(ctx_r0.relatedFocusAreas());
|
|
88174
88238
|
} }
|
|
88175
88239
|
function ShopProfileQuestionCardComponent_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
88176
|
-
i0.ɵɵ
|
|
88240
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
88241
|
+
i0.ɵɵelementStart(0, "div", 18);
|
|
88242
|
+
i0.ɵɵlistener("animationend", function ShopProfileQuestionCardComponent_Conditional_8_For_2_Template_div_animationend_0_listener() { const answerData_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onAnimationEnd(answerData_r4.answer.id)); });
|
|
88243
|
+
i0.ɵɵelementStart(1, "span", 19);
|
|
88177
88244
|
i0.ɵɵtext(2);
|
|
88178
88245
|
i0.ɵɵelementEnd();
|
|
88179
88246
|
i0.ɵɵelement(3, "symphiq-user-avatar", 20);
|
|
@@ -88182,23 +88249,24 @@ function ShopProfileQuestionCardComponent_Conditional_8_For_2_Template(rf, ctx)
|
|
|
88182
88249
|
i0.ɵɵtext(5);
|
|
88183
88250
|
i0.ɵɵelementEnd();
|
|
88184
88251
|
} if (rf & 2) {
|
|
88185
|
-
const
|
|
88252
|
+
const answerData_r4 = ctx.$implicit;
|
|
88186
88253
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
88254
|
+
i0.ɵɵclassProp("animate-answer-pop-in", ctx_r0.isNewAnswer(answerData_r4.answer.id));
|
|
88187
88255
|
i0.ɵɵproperty("ngClass", ctx_r0.answerChipClasses());
|
|
88188
88256
|
i0.ɵɵadvance();
|
|
88189
88257
|
i0.ɵɵproperty("ngClass", ctx_r0.answerTextClasses());
|
|
88190
88258
|
i0.ɵɵadvance();
|
|
88191
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
88259
|
+
i0.ɵɵtextInterpolate1(" ", answerData_r4.answer.answer, " ");
|
|
88192
88260
|
i0.ɵɵadvance();
|
|
88193
|
-
i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("user",
|
|
88261
|
+
i0.ɵɵproperty("viewMode", ctx_r0.viewMode())("user", answerData_r4.user);
|
|
88194
88262
|
i0.ɵɵadvance();
|
|
88195
88263
|
i0.ɵɵproperty("ngClass", ctx_r0.answerDateClasses());
|
|
88196
88264
|
i0.ɵɵadvance();
|
|
88197
|
-
i0.ɵɵtextInterpolate1(" Answered ", ctx_r0.formatAnswerDate(
|
|
88265
|
+
i0.ɵɵtextInterpolate1(" Answered ", ctx_r0.formatAnswerDate(answerData_r4.answer.createdDate), " ");
|
|
88198
88266
|
} }
|
|
88199
88267
|
function ShopProfileQuestionCardComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
88200
88268
|
i0.ɵɵelementStart(0, "div", 7);
|
|
88201
|
-
i0.ɵɵrepeaterCreate(1, ShopProfileQuestionCardComponent_Conditional_8_For_2_Template, 6,
|
|
88269
|
+
i0.ɵɵrepeaterCreate(1, ShopProfileQuestionCardComponent_Conditional_8_For_2_Template, 6, 9, null, null, _forTrack0$3);
|
|
88202
88270
|
i0.ɵɵelementEnd();
|
|
88203
88271
|
} if (rf & 2) {
|
|
88204
88272
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -88236,6 +88304,7 @@ function ShopProfileQuestionCardComponent_Conditional_9_Template(rf, ctx) { if (
|
|
|
88236
88304
|
} }
|
|
88237
88305
|
class ShopProfileQuestionCardComponent {
|
|
88238
88306
|
constructor() {
|
|
88307
|
+
this.animationService = inject(ProfileAnswerAnimationService);
|
|
88239
88308
|
this.question = input.required(...(ngDevMode ? [{ debugName: "question" }] : []));
|
|
88240
88309
|
this.viewMode = input(ViewModeEnum.LIGHT, ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
88241
88310
|
this.viewType = input('category', ...(ngDevMode ? [{ debugName: "viewType" }] : []));
|
|
@@ -88266,6 +88335,16 @@ class ShopProfileQuestionCardComponent {
|
|
|
88266
88335
|
return q.focusAreaDomains || [];
|
|
88267
88336
|
}, ...(ngDevMode ? [{ debugName: "relatedFocusAreas" }] : []));
|
|
88268
88337
|
}
|
|
88338
|
+
isNewAnswer(answerId) {
|
|
88339
|
+
if (answerId === undefined)
|
|
88340
|
+
return false;
|
|
88341
|
+
return this.animationService.isNewAnswer(answerId);
|
|
88342
|
+
}
|
|
88343
|
+
onAnimationEnd(answerId) {
|
|
88344
|
+
if (answerId !== undefined) {
|
|
88345
|
+
this.animationService.clearNewAnswer(answerId);
|
|
88346
|
+
}
|
|
88347
|
+
}
|
|
88269
88348
|
getFocusAreaTitle(focusArea) {
|
|
88270
88349
|
return FocusAreaDomainEnumUtil.title(focusArea);
|
|
88271
88350
|
}
|
|
@@ -88368,7 +88447,7 @@ class ShopProfileQuestionCardComponent {
|
|
|
88368
88447
|
: 'bg-gradient-to-r from-blue-500 to-cyan-500 hover:from-blue-600 hover:to-cyan-600 text-white shadow-lg shadow-blue-500/20';
|
|
88369
88448
|
}
|
|
88370
88449
|
static { this.ɵfac = function ShopProfileQuestionCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ShopProfileQuestionCardComponent)(); }; }
|
|
88371
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShopProfileQuestionCardComponent, selectors: [["symphiq-shop-profile-question-card"]], inputs: { question: [1, "question"], viewMode: [1, "viewMode"], viewType: [1, "viewType"], profileShopAnswers: [1, "profileShopAnswers"], users: [1, "users"] }, outputs: { answerClick: "answerClick" }, decls: 16, vars: 9, consts: [[1, "rounded-xl", "border-2", "p-6", "transition-all", "duration-200", 3, "ngClass"], [1, "flex", "items-start", "gap-3"], [1, "flex-1", "min-w-0"], [1, "text-lg", "font-bold", "mb-2", 3, "ngClass"], [1, "flex-shrink-0", "w-6", "h-6", "rounded", "flex", "items-center", "justify-center", 3, "ngClass"], [1, "text-sm", "leading-relaxed", "mb-4", 3, "ngClass"], [1, "mb-4"], [1, "flex", "flex-wrap", "gap-3"], [1, "rounded-lg", "p-6", "border-2", "border-dashed", "text-center", 3, "ngClass"], [1, "mt-4", "flex", "justify-end"], ["type", "button", 1, "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-300", "flex", "items-center", "gap-2", "hover:scale-105", "active:scale-95", 3, "click", "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"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 13l4 4L19 7"], [1, "mb-2"], [1, "text-xs", "font-semibold", 3, "ngClass"], [1, "flex", "flex-wrap", "gap-2"], [1, "px-3", "py-1.5", "rounded-full", "text-xs", "font-medium", 3, "ngClass"], [1, "flex", "items-center", "gap-2", "px-4", "py-2.5", "rounded-full", 3, "ngClass"], [1, "text-sm", "font-medium", 3, "ngClass"], ["size", "small", 3, "viewMode", "user"], [1, "self-center", "text-xs", "-ml-1", 3, "ngClass"], [1, "flex", "flex-col", "items-center", "gap-3"], [1, "relative", "w-16", "h-16", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-full", "h-full", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "1.5", "d", "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"], [1, "absolute", "top-1", "right-1", "w-3", "h-3", "rounded-full", "border-2", 3, "ngClass"], [1, "text-sm", "font-semibold", "mb-1", 3, "ngClass"], [1, "text-xs", 3, "ngClass"]], template: function ShopProfileQuestionCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
88450
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShopProfileQuestionCardComponent, selectors: [["symphiq-shop-profile-question-card"]], inputs: { question: [1, "question"], viewMode: [1, "viewMode"], viewType: [1, "viewType"], profileShopAnswers: [1, "profileShopAnswers"], users: [1, "users"] }, outputs: { answerClick: "answerClick" }, decls: 16, vars: 9, consts: [[1, "rounded-xl", "border-2", "p-6", "transition-all", "duration-200", 3, "ngClass"], [1, "flex", "items-start", "gap-3"], [1, "flex-1", "min-w-0"], [1, "text-lg", "font-bold", "mb-2", 3, "ngClass"], [1, "flex-shrink-0", "w-6", "h-6", "rounded", "flex", "items-center", "justify-center", 3, "ngClass"], [1, "text-sm", "leading-relaxed", "mb-4", 3, "ngClass"], [1, "mb-4"], [1, "flex", "flex-wrap", "gap-3"], [1, "rounded-lg", "p-6", "border-2", "border-dashed", "text-center", 3, "ngClass"], [1, "mt-4", "flex", "justify-end"], ["type", "button", 1, "px-5", "py-2.5", "rounded-lg", "font-medium", "text-sm", "transition-all", "duration-300", "flex", "items-center", "gap-2", "hover:scale-105", "active:scale-95", 3, "click", "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"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 13l4 4L19 7"], [1, "mb-2"], [1, "text-xs", "font-semibold", 3, "ngClass"], [1, "flex", "flex-wrap", "gap-2"], [1, "px-3", "py-1.5", "rounded-full", "text-xs", "font-medium", 3, "ngClass"], [1, "flex", "items-center", "gap-2", "px-4", "py-2.5", "rounded-full", 3, "animationend", "ngClass"], [1, "text-sm", "font-medium", 3, "ngClass"], ["size", "small", 3, "viewMode", "user"], [1, "self-center", "text-xs", "-ml-1", 3, "ngClass"], [1, "flex", "flex-col", "items-center", "gap-3"], [1, "relative", "w-16", "h-16", 3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-full", "h-full", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "1.5", "d", "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"], [1, "absolute", "top-1", "right-1", "w-3", "h-3", "rounded-full", "border-2", 3, "ngClass"], [1, "text-sm", "font-semibold", "mb-1", 3, "ngClass"], [1, "text-xs", 3, "ngClass"]], template: function ShopProfileQuestionCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
88372
88451
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h3", 3);
|
|
88373
88452
|
i0.ɵɵtext(4);
|
|
88374
88453
|
i0.ɵɵelementEnd()();
|
|
@@ -88404,16 +88483,11 @@ class ShopProfileQuestionCardComponent {
|
|
|
88404
88483
|
i0.ɵɵproperty("ngClass", ctx.buttonClasses());
|
|
88405
88484
|
i0.ɵɵadvance(2);
|
|
88406
88485
|
i0.ɵɵtextInterpolate(ctx.isAnswered() ? "Edit Answer" : "Answer");
|
|
88407
|
-
} }, dependencies: [CommonModule, i1$1.NgClass, UserAvatarComponent],
|
|
88486
|
+
} }, dependencies: [CommonModule, i1$1.NgClass, UserAvatarComponent], styles: ["@keyframes _ngcontent-%COMP%_answerPopIn{0%{opacity:0;transform:scale(.8);box-shadow:0 0 #3b82f600}50%{opacity:1;transform:scale(1.05);box-shadow:0 0 20px 4px #3b82f680}to{opacity:1;transform:scale(1);box-shadow:0 0 #3b82f600}}.animate-answer-pop-in[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_answerPopIn .5s ease-out forwards}"], changeDetection: 0 }); }
|
|
88408
88487
|
}
|
|
88409
88488
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShopProfileQuestionCardComponent, [{
|
|
88410
88489
|
type: Component,
|
|
88411
|
-
args: [{
|
|
88412
|
-
selector: 'symphiq-shop-profile-question-card',
|
|
88413
|
-
standalone: true,
|
|
88414
|
-
imports: [CommonModule, UserAvatarComponent],
|
|
88415
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
88416
|
-
template: `
|
|
88490
|
+
args: [{ selector: 'symphiq-shop-profile-question-card', standalone: true, imports: [CommonModule, UserAvatarComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
88417
88491
|
<div [ngClass]="containerClasses()" class="rounded-xl border-2 p-6 transition-all duration-200">
|
|
88418
88492
|
<!-- Question Header with Checkbox -->
|
|
88419
88493
|
<div class="flex items-start gap-3">
|
|
@@ -88461,7 +88535,11 @@ class ShopProfileQuestionCardComponent {
|
|
|
88461
88535
|
<!-- Answered State - Show answer chips -->
|
|
88462
88536
|
<div class="flex flex-wrap gap-3">
|
|
88463
88537
|
@for (answerData of questionAnswers(); track answerData.answer.id) {
|
|
88464
|
-
<div
|
|
88538
|
+
<div
|
|
88539
|
+
[ngClass]="answerChipClasses()"
|
|
88540
|
+
[class.animate-answer-pop-in]="isNewAnswer(answerData.answer.id)"
|
|
88541
|
+
(animationend)="onAnimationEnd(answerData.answer.id)"
|
|
88542
|
+
class="flex items-center gap-2 px-4 py-2.5 rounded-full">
|
|
88465
88543
|
<span [ngClass]="answerTextClasses()" class="text-sm font-medium">
|
|
88466
88544
|
{{ answerData.answer.answer }}
|
|
88467
88545
|
</span>
|
|
@@ -88513,10 +88591,9 @@ class ShopProfileQuestionCardComponent {
|
|
|
88513
88591
|
</button>
|
|
88514
88592
|
</div>
|
|
88515
88593
|
</div>
|
|
88516
|
-
|
|
88517
|
-
}]
|
|
88594
|
+
`, styles: ["@keyframes answerPopIn{0%{opacity:0;transform:scale(.8);box-shadow:0 0 #3b82f600}50%{opacity:1;transform:scale(1.05);box-shadow:0 0 20px 4px #3b82f680}to{opacity:1;transform:scale(1);box-shadow:0 0 #3b82f600}}.animate-answer-pop-in{animation:answerPopIn .5s ease-out forwards}\n"] }]
|
|
88518
88595
|
}], 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:
|
|
88596
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionCardComponent, { className: "ShopProfileQuestionCardComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-question-card.component.ts", lineNumber: 147 }); })();
|
|
88520
88597
|
|
|
88521
88598
|
const _c0$5 = ["scrollContainer"];
|
|
88522
88599
|
const _c1$2 = ["stickySentinel"];
|
|
@@ -89682,11 +89759,13 @@ class ShopProfileQuestionsModalComponent {
|
|
|
89682
89759
|
this.renderer = inject(Renderer2);
|
|
89683
89760
|
this.document = inject(DOCUMENT);
|
|
89684
89761
|
this.hostElement = inject(ElementRef);
|
|
89762
|
+
this.animationService = inject(ProfileAnswerAnimationService);
|
|
89685
89763
|
this.modalReady = signal(false, ...(ngDevMode ? [{ debugName: "modalReady" }] : []));
|
|
89686
89764
|
this.answerModeActive = signal(false, ...(ngDevMode ? [{ debugName: "answerModeActive" }] : []));
|
|
89687
89765
|
this.questionForAnswer = signal(null, ...(ngDevMode ? [{ debugName: "questionForAnswer" }] : []));
|
|
89688
89766
|
this.navigationHistory = signal([], ...(ngDevMode ? [{ debugName: "navigationHistory" }] : []));
|
|
89689
89767
|
this.modalMovedToBody = false;
|
|
89768
|
+
this.savePending = signal(false, ...(ngDevMode ? [{ debugName: "savePending" }] : []));
|
|
89690
89769
|
this.viewType = computed(() => {
|
|
89691
89770
|
if (this.showAllQuestions())
|
|
89692
89771
|
return 'all';
|
|
@@ -89770,6 +89849,19 @@ class ShopProfileQuestionsModalComponent {
|
|
|
89770
89849
|
this.questionForAnswer.set(null);
|
|
89771
89850
|
this.navigationHistory.set([]);
|
|
89772
89851
|
this.returnModalToHost();
|
|
89852
|
+
this.animationService.clearAnimationState();
|
|
89853
|
+
}
|
|
89854
|
+
});
|
|
89855
|
+
effect(() => {
|
|
89856
|
+
const answers = this.profileShopAnswers();
|
|
89857
|
+
const pending = this.savePending();
|
|
89858
|
+
if (pending && answers.length > 0) {
|
|
89859
|
+
const answerIds = answers
|
|
89860
|
+
.map(a => a.id)
|
|
89861
|
+
.filter((id) => id !== undefined);
|
|
89862
|
+
console.log('[Modal] Save completed, computing animation state');
|
|
89863
|
+
this.animationService.computeAnimationState(answerIds);
|
|
89864
|
+
this.savePending.set(false);
|
|
89773
89865
|
}
|
|
89774
89866
|
});
|
|
89775
89867
|
}
|
|
@@ -89810,11 +89902,22 @@ class ShopProfileQuestionsModalComponent {
|
|
|
89810
89902
|
}
|
|
89811
89903
|
}
|
|
89812
89904
|
onSaveAnswer(event) {
|
|
89905
|
+
this.snapshotAnswersForAnimation();
|
|
89813
89906
|
this.answerSave.emit(event);
|
|
89814
89907
|
}
|
|
89815
89908
|
onSaveAndNextAnswer(event) {
|
|
89909
|
+
this.snapshotAnswersForAnimation();
|
|
89816
89910
|
this.answerSave.emit(event);
|
|
89817
89911
|
}
|
|
89912
|
+
snapshotAnswersForAnimation() {
|
|
89913
|
+
const answers = this.profileShopAnswers();
|
|
89914
|
+
const answerIds = answers
|
|
89915
|
+
.map(a => a.id)
|
|
89916
|
+
.filter((id) => id !== undefined);
|
|
89917
|
+
console.log('[Modal] Snapshotting current answers before save:', answerIds);
|
|
89918
|
+
this.animationService.snapshotCurrentAnswers(answerIds);
|
|
89919
|
+
this.savePending.set(true);
|
|
89920
|
+
}
|
|
89818
89921
|
onNavigateToList() {
|
|
89819
89922
|
this.answerModeActive.set(false);
|
|
89820
89923
|
this.questionForAnswer.set(null);
|
|
@@ -90166,7 +90269,7 @@ class ShopProfileQuestionsModalComponent {
|
|
|
90166
90269
|
type: ViewChild,
|
|
90167
90270
|
args: ['modalWrapper']
|
|
90168
90271
|
}] }); })();
|
|
90169
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionsModalComponent, { className: "ShopProfileQuestionsModalComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-questions-modal.component.ts", lineNumber:
|
|
90272
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShopProfileQuestionsModalComponent, { className: "ShopProfileQuestionsModalComponent", filePath: "lib/components/profile-analysis-dashboard/cards/shop-profile-questions-modal.component.ts", lineNumber: 202 }); })();
|
|
90170
90273
|
|
|
90171
90274
|
const _c0$3 = ["chartdiv"];
|
|
90172
90275
|
function ShopProfileStatusCardComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|