@eric-emg/symphiq-components 1.2.101 → 1.2.102

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.
@@ -24940,6 +24940,7 @@ class FloatingTocComponent {
24940
24940
  this.sections = [];
24941
24941
  this.viewMode = ViewModeEnum.LIGHT;
24942
24942
  this.embedded = false;
24943
+ this.parentHeaderOffset = 0;
24943
24944
  this.isHovered = signal(false, ...(ngDevMode ? [{ debugName: "isHovered" }] : []));
24944
24945
  this.isPinned = signal(false, ...(ngDevMode ? [{ debugName: "isPinned" }] : []));
24945
24946
  this.activeSection = signal('', ...(ngDevMode ? [{ debugName: "activeSection" }] : []));
@@ -25081,12 +25082,39 @@ class FloatingTocComponent {
25081
25082
  window.addEventListener('scroll', this.scrollListener, { passive: true });
25082
25083
  }
25083
25084
  calculateContainerOffset() {
25084
- if (this.embedded && this.containerElement) {
25085
- const rect = this.containerElement.getBoundingClientRect();
25086
- const stickyHeader = document.querySelector('header');
25087
- const headerHeight = stickyHeader ? stickyHeader.getBoundingClientRect().height : 0;
25088
- const viewportOffset = Math.max(0, rect.top);
25089
- this.containerTopOffset.set(viewportOffset + headerHeight);
25085
+ if (this.embedded) {
25086
+ // If scrollElement is provided, use its top position to know where content starts
25087
+ if (this.scrollElement) {
25088
+ const scrollRect = this.scrollElement.getBoundingClientRect();
25089
+ // The top position tells us exactly how much space headers take above it
25090
+ this.containerTopOffset.set(Math.max(0, scrollRect.top));
25091
+ return;
25092
+ }
25093
+ // Fallback: use containerElement
25094
+ if (this.containerElement) {
25095
+ const rect = this.containerElement.getBoundingClientRect();
25096
+ const viewportOffset = Math.max(0, rect.top);
25097
+ // If parentHeaderOffset is manually provided, use it
25098
+ if (this.parentHeaderOffset > 0) {
25099
+ this.containerTopOffset.set(viewportOffset + this.parentHeaderOffset);
25100
+ return;
25101
+ }
25102
+ // Otherwise, try to detect all fixed/sticky headers
25103
+ let totalHeaderHeight = 0;
25104
+ const allHeaders = document.querySelectorAll('header, [class*="header"], [class*="navbar"]');
25105
+ allHeaders.forEach(header => {
25106
+ const htmlHeader = header;
25107
+ const style = window.getComputedStyle(htmlHeader);
25108
+ const position = style.position;
25109
+ if (position === 'fixed' || position === 'sticky') {
25110
+ const headerRect = htmlHeader.getBoundingClientRect();
25111
+ if (headerRect.top < 100) {
25112
+ totalHeaderHeight += headerRect.height;
25113
+ }
25114
+ }
25115
+ });
25116
+ this.containerTopOffset.set(viewportOffset + totalHeaderHeight);
25117
+ }
25090
25118
  }
25091
25119
  else {
25092
25120
  this.containerTopOffset.set(0);
@@ -25251,7 +25279,7 @@ class FloatingTocComponent {
25251
25279
  `.trim();
25252
25280
  }
25253
25281
  static { this.ɵfac = function FloatingTocComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FloatingTocComponent)(); }; }
25254
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FloatingTocComponent, selectors: [["symphiq-floating-toc"]], inputs: { sections: "sections", viewMode: "viewMode", embedded: "embedded", containerElement: "containerElement" }, decls: 26, vars: 16, consts: [[3, "mouseenter", "mouseleave", "ngClass"], [3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-5", "h-5"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M4 6h16M4 12h16M4 18h16"], [1, "flex", "items-center", "justify-between", "mb-4", "pb-3", "border-b", 3, "ngClass"], [1, "flex", "items-center", "gap-2"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["type", "button", 3, "click", "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"], [1, "space-y-1", "overflow-y-auto", "max-h-[60vh]", "pr-2", 3, "ngClass"], [1, "space-y-0.5"], [1, "mt-4", "pt-3", "border-t", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 10l7-7m0 0l7 7m-7-7v18"], [1, "text-sm"], [1, "flex", "items-center", "gap-2", "flex-1", "min-w-0"], [1, "flex-shrink-0"], [1, "truncate", "text-sm", "font-medium"], [1, "ml-6", "space-y-0.5", "mt-1"], ["size", "w-4 h-4", 3, "icon", "ngClass"], ["type", "button", 3, "ngClass"], [1, "truncate", "text-xs"]], template: function FloatingTocComponent_Template(rf, ctx) { if (rf & 1) {
25282
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FloatingTocComponent, selectors: [["symphiq-floating-toc"]], inputs: { sections: "sections", viewMode: "viewMode", embedded: "embedded", containerElement: "containerElement", scrollElement: "scrollElement", parentHeaderOffset: "parentHeaderOffset" }, decls: 26, vars: 16, consts: [[3, "mouseenter", "mouseleave", "ngClass"], [3, "ngClass"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-5", "h-5"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M4 6h16M4 12h16M4 18h16"], [1, "flex", "items-center", "justify-between", "mb-4", "pb-3", "border-b", 3, "ngClass"], [1, "flex", "items-center", "gap-2"], ["fill", "none", "stroke", "currentColor", "viewBox", "0 0 24 24", 1, "w-4", "h-4"], ["type", "button", 3, "click", "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"], [1, "space-y-1", "overflow-y-auto", "max-h-[60vh]", "pr-2", 3, "ngClass"], [1, "space-y-0.5"], [1, "mt-4", "pt-3", "border-t", 3, "ngClass"], ["stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2", "d", "M5 10l7-7m0 0l7 7m-7-7v18"], [1, "text-sm"], [1, "flex", "items-center", "gap-2", "flex-1", "min-w-0"], [1, "flex-shrink-0"], [1, "truncate", "text-sm", "font-medium"], [1, "ml-6", "space-y-0.5", "mt-1"], ["size", "w-4 h-4", 3, "icon", "ngClass"], ["type", "button", 3, "ngClass"], [1, "truncate", "text-xs"]], template: function FloatingTocComponent_Template(rf, ctx) { if (rf & 1) {
25255
25283
  i0.ɵɵelementStart(0, "div", 0);
25256
25284
  i0.ɵɵlistener("mouseenter", function FloatingTocComponent_Template_div_mouseenter_0_listener() { return ctx.onMouseEnter(); })("mouseleave", function FloatingTocComponent_Template_div_mouseleave_0_listener() { return ctx.onMouseLeave(); });
25257
25285
  i0.ɵɵelementStart(1, "div", 1)(2, "div", 1);
@@ -25436,6 +25464,10 @@ class FloatingTocComponent {
25436
25464
  type: Input
25437
25465
  }], containerElement: [{
25438
25466
  type: Input
25467
+ }], scrollElement: [{
25468
+ type: Input
25469
+ }], parentHeaderOffset: [{
25470
+ type: Input
25439
25471
  }] }); })();
25440
25472
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FloatingTocComponent, { className: "FloatingTocComponent", filePath: "lib/components/business-analysis-dashboard/floating-toc.component.ts", lineNumber: 125 }); })();
25441
25473
 
@@ -49485,7 +49517,7 @@ function SymphiqBusinessAnalysisDashboardComponent_Conditional_14_Template(rf, c
49485
49517
  i0.ɵɵadvance(2);
49486
49518
  i0.ɵɵproperty("sections", ctx_r1.sections())("viewMode", ctx_r1.viewMode)("embedded", ctx_r1.embedded);
49487
49519
  i0.ɵɵadvance();
49488
- i0.ɵɵproperty("sections", ctx_r1.sections())("viewMode", ctx_r1.viewMode)("embedded", ctx_r1.embedded)("containerElement", dashboardContainer_r9);
49520
+ i0.ɵɵproperty("sections", ctx_r1.sections())("viewMode", ctx_r1.viewMode)("embedded", ctx_r1.embedded)("containerElement", dashboardContainer_r9)("scrollElement", ctx_r1.scrollElement)("parentHeaderOffset", ctx_r1.parentHeaderOffset);
49489
49521
  i0.ɵɵadvance();
49490
49522
  i0.ɵɵproperty("viewMode", ctx_r1.viewMode)("embedded", ctx_r1.embedded);
49491
49523
  } }
@@ -49517,6 +49549,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
49517
49549
  this.embedded = false;
49518
49550
  this.isLoading = false;
49519
49551
  this.useSampleData = false;
49552
+ this.parentHeaderOffset = 0;
49520
49553
  this.headerScrollService = inject(HeaderScrollService);
49521
49554
  this.lookupService = inject(ProfileItemLookupService);
49522
49555
  this.navigationService = inject(NavigationStateService);
@@ -49909,7 +49942,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
49909
49942
  static { this.ɵfac = function SymphiqBusinessAnalysisDashboardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SymphiqBusinessAnalysisDashboardComponent)(); }; }
49910
49943
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SymphiqBusinessAnalysisDashboardComponent, selectors: [["symphiq-business-analysis-dashboard"]], hostBindings: function SymphiqBusinessAnalysisDashboardComponent_HostBindings(rf, ctx) { if (rf & 1) {
49911
49944
  i0.ɵɵlistener("scroll", function SymphiqBusinessAnalysisDashboardComponent_scroll_HostBindingHandler($event) { return ctx.onScroll($event); }, i0.ɵɵresolveWindow)("keydown", function SymphiqBusinessAnalysisDashboardComponent_keydown_HostBindingHandler($event) { return ctx.handleKeyDown($event); }, i0.ɵɵresolveDocument);
49912
- } }, inputs: { requestedByUser: "requestedByUser", viewMode: "viewMode", embedded: "embedded", scrollEvent: "scrollEvent", scrollElement: "scrollElement", isLoading: "isLoading", useSampleData: "useSampleData", profile: "profile" }, decls: 19, vars: 19, consts: [["dashboardContainer", ""], [3, "ngClass"], [3, "class"], [1, "relative", "z-[51]"], [1, "sticky", "top-0", "z-50", 3, "ngClass"], [1, "relative"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-8", "space-y-8"], [3, "isLightMode"], [3, "searchChange", "resultSelected", "close", "isLightMode", "isOpen", "searchQuery", "results", "hasResults", "selectedIndex", "placeholder"], [1, "h-full", "transition-all", "duration-200", "ease-out", 3, "ngClass"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-4"], [1, "flex", "items-center", "justify-between"], [3, "toggle", "viewModeSelected", "currentViewMode", "viewMode"], [1, "transition-all", "duration-300", "ease-in-out", "overflow-hidden"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-8"], [1, "flex", "items-center", "gap-2"], [3, "searchClick", "isLightMode"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-3"], [1, "flex-1", "min-w-0", "mr-4"], [1, "flex", "items-center", "gap-4"], [1, "flex", "items-center", "gap-2", "text-sm", "flex-shrink-0"], [1, "transition-opacity", "duration-300", 3, "ngClass"], [3, "searchClick", "isLightMode", "minimized"], [3, "toggle", "viewModeSelected", "currentViewMode", "viewMode", "minimized"], [3, "getStarted", "dismiss", "businessName", "viewMode", "showCta"], [3, "currentStep", "completedSteps", "viewMode"], [3, "profile", "viewMode"], [3, "analyzeFunnel", "exploreMore", "viewMode"], [3, "sections", "viewMode", "embedded"], [3, "sections", "viewMode", "embedded", "containerElement"], [3, "viewMode", "embedded"], [3, "section", "viewMode", "forceExpanded"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8"], [3, "viewMode", "subsections"]], template: function SymphiqBusinessAnalysisDashboardComponent_Template(rf, ctx) { if (rf & 1) {
49945
+ } }, inputs: { requestedByUser: "requestedByUser", viewMode: "viewMode", embedded: "embedded", scrollEvent: "scrollEvent", scrollElement: "scrollElement", isLoading: "isLoading", useSampleData: "useSampleData", profile: "profile", parentHeaderOffset: "parentHeaderOffset" }, decls: 19, vars: 19, consts: [["dashboardContainer", ""], [3, "ngClass"], [3, "class"], [1, "relative", "z-[51]"], [1, "sticky", "top-0", "z-50", 3, "ngClass"], [1, "relative"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-8", "space-y-8"], [3, "isLightMode"], [3, "searchChange", "resultSelected", "close", "isLightMode", "isOpen", "searchQuery", "results", "hasResults", "selectedIndex", "placeholder"], [1, "h-full", "transition-all", "duration-200", "ease-out", 3, "ngClass"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-4"], [1, "flex", "items-center", "justify-between"], [3, "toggle", "viewModeSelected", "currentViewMode", "viewMode"], [1, "transition-all", "duration-300", "ease-in-out", "overflow-hidden"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-8"], [1, "flex", "items-center", "gap-2"], [3, "searchClick", "isLightMode"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8", "py-3"], [1, "flex-1", "min-w-0", "mr-4"], [1, "flex", "items-center", "gap-4"], [1, "flex", "items-center", "gap-2", "text-sm", "flex-shrink-0"], [1, "transition-opacity", "duration-300", 3, "ngClass"], [3, "searchClick", "isLightMode", "minimized"], [3, "toggle", "viewModeSelected", "currentViewMode", "viewMode", "minimized"], [3, "getStarted", "dismiss", "businessName", "viewMode", "showCta"], [3, "currentStep", "completedSteps", "viewMode"], [3, "profile", "viewMode"], [3, "analyzeFunnel", "exploreMore", "viewMode"], [3, "sections", "viewMode", "embedded"], [3, "sections", "viewMode", "embedded", "containerElement", "scrollElement", "parentHeaderOffset"], [3, "viewMode", "embedded"], [3, "section", "viewMode", "forceExpanded"], [1, "max-w-7xl", "mx-auto", "px-4", "sm:px-6", "lg:px-8"], [3, "viewMode", "subsections"]], template: function SymphiqBusinessAnalysisDashboardComponent_Template(rf, ctx) { if (rf & 1) {
49913
49946
  const _r1 = i0.ɵɵgetCurrentView();
49914
49947
  i0.ɵɵelementStart(0, "div", 1, 0);
49915
49948
  i0.ɵɵconditionalCreate(2, SymphiqBusinessAnalysisDashboardComponent_Conditional_2_Template, 2, 5, "div", 2);
@@ -49919,7 +49952,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
49919
49952
  i0.ɵɵelementStart(9, "div", 3);
49920
49953
  i0.ɵɵconditionalCreate(10, SymphiqBusinessAnalysisDashboardComponent_Conditional_10_Template, 9, 6, "header", 4)(11, SymphiqBusinessAnalysisDashboardComponent_Conditional_11_Template, 25, 45, "header", 4);
49921
49954
  i0.ɵɵelementStart(12, "main", 5);
49922
- i0.ɵɵconditionalCreate(13, SymphiqBusinessAnalysisDashboardComponent_Conditional_13_Template, 6, 11, "div", 6)(14, SymphiqBusinessAnalysisDashboardComponent_Conditional_14_Template, 5, 9);
49955
+ i0.ɵɵconditionalCreate(13, SymphiqBusinessAnalysisDashboardComponent_Conditional_13_Template, 6, 11, "div", 6)(14, SymphiqBusinessAnalysisDashboardComponent_Conditional_14_Template, 5, 11);
49923
49956
  i0.ɵɵelementEnd()();
49924
49957
  i0.ɵɵconditionalCreate(15, SymphiqBusinessAnalysisDashboardComponent_Conditional_15_Template, 2, 2, "div", 1);
49925
49958
  i0.ɵɵelement(16, "symphiq-tooltip-container")(17, "symphiq-business-analysis-modal", 7);
@@ -50155,6 +50188,8 @@ class SymphiqBusinessAnalysisDashboardComponent {
50155
50188
  [viewMode]="viewMode"
50156
50189
  [embedded]="embedded"
50157
50190
  [containerElement]="dashboardContainer"
50191
+ [scrollElement]="scrollElement"
50192
+ [parentHeaderOffset]="parentHeaderOffset"
50158
50193
  />
50159
50194
 
50160
50195
  <symphiq-floating-back-button
@@ -50204,6 +50239,8 @@ class SymphiqBusinessAnalysisDashboardComponent {
50204
50239
  type: Input
50205
50240
  }], profile: [{
50206
50241
  type: Input
50242
+ }], parentHeaderOffset: [{
50243
+ type: Input
50207
50244
  }], onScroll: [{
50208
50245
  type: HostListener,
50209
50246
  args: ['window:scroll', ['$event']]
@@ -50211,7 +50248,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
50211
50248
  type: HostListener,
50212
50249
  args: ['document:keydown', ['$event']]
50213
50250
  }] }); })();
50214
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SymphiqBusinessAnalysisDashboardComponent, { className: "SymphiqBusinessAnalysisDashboardComponent", filePath: "lib/components/business-analysis-dashboard/symphiq-business-analysis-dashboard.component.ts", lineNumber: 290 }); })();
50251
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SymphiqBusinessAnalysisDashboardComponent, { className: "SymphiqBusinessAnalysisDashboardComponent", filePath: "lib/components/business-analysis-dashboard/symphiq-business-analysis-dashboard.component.ts", lineNumber: 292 }); })();
50215
50252
 
50216
50253
  class ScrollProgressBarComponent {
50217
50254
  constructor() {