@eric-emg/symphiq-components 1.2.100 → 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" }] : []));
@@ -24966,6 +24967,7 @@ class FloatingTocComponent {
24966
24967
  this.setupIntersectionObserver();
24967
24968
  this.calculateContainerOffset();
24968
24969
  this.setupResizeListener();
24970
+ this.setupScrollListener();
24969
24971
  }
24970
24972
  }
24971
24973
  ngOnDestroy() {
@@ -24975,6 +24977,9 @@ class FloatingTocComponent {
24975
24977
  if (this.resizeListener && typeof window !== 'undefined') {
24976
24978
  window.removeEventListener('resize', this.resizeListener);
24977
24979
  }
24980
+ if (this.scrollListener && typeof window !== 'undefined') {
24981
+ window.removeEventListener('scroll', this.scrollListener, true);
24982
+ }
24978
24983
  }
24979
24984
  setupIntersectionObserver() {
24980
24985
  this.observer = new IntersectionObserver((entries) => {
@@ -25070,11 +25075,46 @@ class FloatingTocComponent {
25070
25075
  };
25071
25076
  window.addEventListener('resize', this.resizeListener);
25072
25077
  }
25078
+ setupScrollListener() {
25079
+ this.scrollListener = () => {
25080
+ this.calculateContainerOffset();
25081
+ };
25082
+ window.addEventListener('scroll', this.scrollListener, { passive: true });
25083
+ }
25073
25084
  calculateContainerOffset() {
25074
- if (this.embedded && this.containerElement) {
25075
- const rect = this.containerElement.getBoundingClientRect();
25076
- const offset = rect.top + window.scrollY;
25077
- this.containerTopOffset.set(offset);
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
+ }
25078
25118
  }
25079
25119
  else {
25080
25120
  this.containerTopOffset.set(0);
@@ -25082,7 +25122,7 @@ class FloatingTocComponent {
25082
25122
  }
25083
25123
  getCalculatedTopPosition() {
25084
25124
  if (this.embedded && this.containerTopOffset() > 0) {
25085
- return this.BASE_OFFSET + this.containerTopOffset();
25125
+ return this.containerTopOffset() + 16;
25086
25126
  }
25087
25127
  return this.BASE_OFFSET;
25088
25128
  }
@@ -25239,7 +25279,7 @@ class FloatingTocComponent {
25239
25279
  `.trim();
25240
25280
  }
25241
25281
  static { this.ɵfac = function FloatingTocComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FloatingTocComponent)(); }; }
25242
- 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) {
25243
25283
  i0.ɵɵelementStart(0, "div", 0);
25244
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(); });
25245
25285
  i0.ɵɵelementStart(1, "div", 1)(2, "div", 1);
@@ -25424,6 +25464,10 @@ class FloatingTocComponent {
25424
25464
  type: Input
25425
25465
  }], containerElement: [{
25426
25466
  type: Input
25467
+ }], scrollElement: [{
25468
+ type: Input
25469
+ }], parentHeaderOffset: [{
25470
+ type: Input
25427
25471
  }] }); })();
25428
25472
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FloatingTocComponent, { className: "FloatingTocComponent", filePath: "lib/components/business-analysis-dashboard/floating-toc.component.ts", lineNumber: 125 }); })();
25429
25473
 
@@ -49473,7 +49517,7 @@ function SymphiqBusinessAnalysisDashboardComponent_Conditional_14_Template(rf, c
49473
49517
  i0.ɵɵadvance(2);
49474
49518
  i0.ɵɵproperty("sections", ctx_r1.sections())("viewMode", ctx_r1.viewMode)("embedded", ctx_r1.embedded);
49475
49519
  i0.ɵɵadvance();
49476
- 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);
49477
49521
  i0.ɵɵadvance();
49478
49522
  i0.ɵɵproperty("viewMode", ctx_r1.viewMode)("embedded", ctx_r1.embedded);
49479
49523
  } }
@@ -49505,6 +49549,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
49505
49549
  this.embedded = false;
49506
49550
  this.isLoading = false;
49507
49551
  this.useSampleData = false;
49552
+ this.parentHeaderOffset = 0;
49508
49553
  this.headerScrollService = inject(HeaderScrollService);
49509
49554
  this.lookupService = inject(ProfileItemLookupService);
49510
49555
  this.navigationService = inject(NavigationStateService);
@@ -49897,7 +49942,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
49897
49942
  static { this.ɵfac = function SymphiqBusinessAnalysisDashboardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SymphiqBusinessAnalysisDashboardComponent)(); }; }
49898
49943
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SymphiqBusinessAnalysisDashboardComponent, selectors: [["symphiq-business-analysis-dashboard"]], hostBindings: function SymphiqBusinessAnalysisDashboardComponent_HostBindings(rf, ctx) { if (rf & 1) {
49899
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);
49900
- } }, 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) {
49901
49946
  const _r1 = i0.ɵɵgetCurrentView();
49902
49947
  i0.ɵɵelementStart(0, "div", 1, 0);
49903
49948
  i0.ɵɵconditionalCreate(2, SymphiqBusinessAnalysisDashboardComponent_Conditional_2_Template, 2, 5, "div", 2);
@@ -49907,7 +49952,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
49907
49952
  i0.ɵɵelementStart(9, "div", 3);
49908
49953
  i0.ɵɵconditionalCreate(10, SymphiqBusinessAnalysisDashboardComponent_Conditional_10_Template, 9, 6, "header", 4)(11, SymphiqBusinessAnalysisDashboardComponent_Conditional_11_Template, 25, 45, "header", 4);
49909
49954
  i0.ɵɵelementStart(12, "main", 5);
49910
- 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);
49911
49956
  i0.ɵɵelementEnd()();
49912
49957
  i0.ɵɵconditionalCreate(15, SymphiqBusinessAnalysisDashboardComponent_Conditional_15_Template, 2, 2, "div", 1);
49913
49958
  i0.ɵɵelement(16, "symphiq-tooltip-container")(17, "symphiq-business-analysis-modal", 7);
@@ -50143,6 +50188,8 @@ class SymphiqBusinessAnalysisDashboardComponent {
50143
50188
  [viewMode]="viewMode"
50144
50189
  [embedded]="embedded"
50145
50190
  [containerElement]="dashboardContainer"
50191
+ [scrollElement]="scrollElement"
50192
+ [parentHeaderOffset]="parentHeaderOffset"
50146
50193
  />
50147
50194
 
50148
50195
  <symphiq-floating-back-button
@@ -50192,6 +50239,8 @@ class SymphiqBusinessAnalysisDashboardComponent {
50192
50239
  type: Input
50193
50240
  }], profile: [{
50194
50241
  type: Input
50242
+ }], parentHeaderOffset: [{
50243
+ type: Input
50195
50244
  }], onScroll: [{
50196
50245
  type: HostListener,
50197
50246
  args: ['window:scroll', ['$event']]
@@ -50199,7 +50248,7 @@ class SymphiqBusinessAnalysisDashboardComponent {
50199
50248
  type: HostListener,
50200
50249
  args: ['document:keydown', ['$event']]
50201
50250
  }] }); })();
50202
- (() => { (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 }); })();
50203
50252
 
50204
50253
  class ScrollProgressBarComponent {
50205
50254
  constructor() {