wontfix-sdk 0.0.6 → 0.0.7

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.
@@ -510,6 +510,9 @@ class TooltipService {
510
510
  tooltipsSubject = new BehaviorSubject([]);
511
511
  config = null;
512
512
  guidanceCollections = [];
513
+ rescanAttempt = 0;
514
+ rescanTimer = null;
515
+ rescanDelaysMs = [0, 250, 750, 1500, 3000, 5000];
513
516
  tooltipComponentRefs = new Map();
514
517
  tooltipElements = new Map();
515
518
  tooltipListenerCleanup = new Map();
@@ -532,7 +535,11 @@ class TooltipService {
532
535
  async initializeTooltips(config) {
533
536
  this.config = config;
534
537
  if (config.debug) {
535
- console.log('[Wontfix] Initializing tooltips...');
538
+ console.log('[Wontfix] Initializing tooltips...', {
539
+ pathname: window.location.pathname,
540
+ hasPayload: config.payload !== undefined,
541
+ fallbackToMock: config.fallbackToMock,
542
+ });
536
543
  }
537
544
  try {
538
545
  // Wait for Angular to stabilize (all components rendered and change detection complete)
@@ -547,6 +554,15 @@ class TooltipService {
547
554
  await this.fetchTooltips();
548
555
  // After initial load, keep reacting to host route changes.
549
556
  this.setupRouteListener();
557
+ if (config.debug) {
558
+ window.__wontfix = {
559
+ rescan: () => this.rescanDOM(),
560
+ reinit: () => this.reinitializeTooltips(),
561
+ collections: () => this.guidanceCollections,
562
+ tooltips: () => this.tooltipsSubject.value,
563
+ };
564
+ console.log('[Wontfix] Debug helpers available on window.__wontfix');
565
+ }
550
566
  }
551
567
  catch (error) {
552
568
  console.error('[Wontfix] Failed to initialize tooltips:', error);
@@ -561,7 +577,16 @@ class TooltipService {
561
577
  const collections = await this.fetchGuidanceCollections();
562
578
  this.guidanceCollections = collections;
563
579
  if (this.config.debug) {
564
- console.log(`[Wontfix] Loaded ${collections.length} guidance collections`);
580
+ const byType = {};
581
+ for (const c of collections) {
582
+ const key = String(c?.type ?? 'unknown');
583
+ byType[key] = (byType[key] ?? 0) + 1;
584
+ }
585
+ console.log(`[Wontfix] Loaded ${collections.length} guidance collections`, {
586
+ pathname: window.location.pathname,
587
+ byType,
588
+ sampleUrls: collections.slice(0, 5).map((c) => c?.url),
589
+ });
565
590
  }
566
591
  // Map new API contract -> existing TooltipInstance shape used by TooltipComponent.
567
592
  const tooltips = collections
@@ -593,6 +618,7 @@ class TooltipService {
593
618
  return accumulator;
594
619
  }, []);
595
620
  this.tooltipsSubject.next(tooltips);
621
+ this.resetRescan('fetchTooltips');
596
622
  this.matchSelectorsToDOM();
597
623
  // Also initialize beacons
598
624
  this.initializeBeacons();
@@ -607,6 +633,8 @@ class TooltipService {
607
633
  initializeBeacons() {
608
634
  const currentUrl = window.location.pathname;
609
635
  const beacons = this.guidanceCollections.filter((c) => c?.type === 'beacon' && this.urlMatches(c.url, currentUrl));
636
+ let matched = 0;
637
+ let missing = 0;
610
638
  beacons.forEach((beacon, collectionIndex) => {
611
639
  const elements = Array.isArray(beacon.elements) ? beacon.elements : [];
612
640
  elements.forEach((beaconElement, elementIndex) => {
@@ -614,6 +642,17 @@ class TooltipService {
614
642
  const element = this.resolveTargetElement(beaconElement.selector);
615
643
  if (element instanceof HTMLElement) {
616
644
  this.attachBeaconToElement(element, beacon, beaconElement, collectionIndex, elementIndex);
645
+ matched += 1;
646
+ }
647
+ else {
648
+ missing += 1;
649
+ if (this.config?.debug) {
650
+ console.warn('[Wontfix] Beacon target not found', {
651
+ selector: beaconElement.selector,
652
+ collectionId: beacon.id,
653
+ pathname: currentUrl,
654
+ });
655
+ }
617
656
  }
618
657
  }
619
658
  catch (error) {
@@ -621,17 +660,32 @@ class TooltipService {
621
660
  }
622
661
  });
623
662
  });
663
+ if (this.config?.debug) {
664
+ console.log('[Wontfix] Beacon DOM match summary', {
665
+ pathname: currentUrl,
666
+ collections: beacons.length,
667
+ matched,
668
+ missing,
669
+ });
670
+ }
671
+ if (missing > 0) {
672
+ this.scheduleRescan('beacons-missing');
673
+ }
624
674
  }
625
675
  /**
626
676
  * Attach beacon to an element
627
677
  */
628
678
  attachBeaconToElement(element, beacon, beaconElementConfig, collectionIndex, elementIndex) {
629
679
  const beaconId = `beacon-${beacon.id}-${beaconElementConfig.id ?? `${collectionIndex}-${elementIndex}`}`;
680
+ // Prevent duplicates when rescanning/retrying.
681
+ if (this.beaconComponentRefs.has(beaconId)) {
682
+ return;
683
+ }
630
684
  const componentRef = createComponent(BeaconComponent, {
631
685
  environmentInjector: this.appRef.injector,
632
686
  });
633
687
  componentRef.instance.config = {
634
- position: (beaconElementConfig.position ?? 'top'),
688
+ position: this.normalizeBeaconPosition(beaconElementConfig.position),
635
689
  label: beaconElementConfig.content
636
690
  };
637
691
  this.appRef.attachView(componentRef.hostView);
@@ -706,8 +760,12 @@ class TooltipService {
706
760
  matchSelectorsToDOM() {
707
761
  const tooltips = this.tooltipsSubject.value;
708
762
  const currentUrl = window.location.pathname;
763
+ let matched = 0;
764
+ let missing = 0;
765
+ let skippedRoute = 0;
709
766
  tooltips.forEach((tooltip) => {
710
767
  if (!this.urlMatches(tooltip.pageUrl, currentUrl)) {
768
+ skippedRoute += 1;
711
769
  return;
712
770
  }
713
771
  try {
@@ -715,12 +773,41 @@ class TooltipService {
715
773
  if (element instanceof HTMLElement) {
716
774
  tooltip.element = element;
717
775
  this.attachTooltipToElement(tooltip);
776
+ matched += 1;
777
+ }
778
+ else {
779
+ missing += 1;
780
+ if (this.config?.debug) {
781
+ console.warn('[Wontfix] Tooltip target not found', {
782
+ tooltipId: tooltip.id,
783
+ selector: tooltip.path,
784
+ pageUrl: tooltip.pageUrl,
785
+ pathname: currentUrl,
786
+ hint: 'If this element is inside a ShadowRoot, document XPath/CSS selectors will not find it. Prefer selectors that target light DOM (or use ::part/::slotted when applicable).',
787
+ });
788
+ }
718
789
  }
719
790
  }
720
791
  catch (error) {
721
792
  console.error(`[Wontfix] ERROR matching path "${tooltip.path}":`, error);
722
793
  }
723
794
  });
795
+ if (this.config?.debug) {
796
+ console.log('[Wontfix] Tooltip DOM match summary', {
797
+ pathname: currentUrl,
798
+ total: tooltips.length,
799
+ matched,
800
+ missing,
801
+ skippedRoute,
802
+ rescanAttempt: this.rescanAttempt,
803
+ });
804
+ }
805
+ if (missing > 0) {
806
+ this.scheduleRescan('tooltips-missing');
807
+ }
808
+ else {
809
+ this.resetRescan('all-matched');
810
+ }
724
811
  this.tooltipsSubject.next(tooltips);
725
812
  }
726
813
  /**
@@ -892,6 +979,7 @@ class TooltipService {
892
979
  */
893
980
  rescanDOM() {
894
981
  this.matchSelectorsToDOM();
982
+ this.initializeBeacons();
895
983
  }
896
984
  /**
897
985
  * Update tooltip visibility
@@ -919,7 +1007,7 @@ class TooltipService {
919
1007
  .replace(/\//g, '\\/')
920
1008
  .replace(/\*/g, '.*');
921
1009
  try {
922
- return new RegExp(`^${regexPattern}$`).test(currentUrl);
1010
+ return new RegExp(`^${regexPattern}$`).test(normalizedCurrent);
923
1011
  }
924
1012
  catch {
925
1013
  return false;
@@ -952,6 +1040,7 @@ class TooltipService {
952
1040
  this.closeNavFlow();
953
1041
  this.closePopup();
954
1042
  this.detachAllTooltipListeners();
1043
+ this.resetRescan('reinitializeTooltips');
955
1044
  // Clear existing beacons
956
1045
  this.beaconComponentRefs.forEach(ref => {
957
1046
  this.appRef.detachView(ref.hostView);
@@ -1339,6 +1428,9 @@ class TooltipService {
1339
1428
  const xPathMatch = PathMatcher.findElementByXPath(selectorOrPath);
1340
1429
  if (xPathMatch)
1341
1430
  return xPathMatch;
1431
+ if (this.config?.debug) {
1432
+ console.warn('[Wontfix] XPath did not match any element', { selector: selectorOrPath });
1433
+ }
1342
1434
  }
1343
1435
  if (selectorOrPath.includes('/')) {
1344
1436
  return PathMatcher.findElementByPath(selectorOrPath);
@@ -1351,6 +1443,55 @@ class TooltipService {
1351
1443
  return PathMatcher.findElementByPath(selectorOrPath);
1352
1444
  }
1353
1445
  }
1446
+ normalizeBeaconPosition(position) {
1447
+ switch (position) {
1448
+ case 'right':
1449
+ case 'left':
1450
+ case 'top':
1451
+ case 'bottom':
1452
+ return position;
1453
+ default:
1454
+ if (typeof position === 'string' && position.includes('right'))
1455
+ return 'right';
1456
+ if (typeof position === 'string' && position.includes('left'))
1457
+ return 'left';
1458
+ if (typeof position === 'string' && position.includes('bottom'))
1459
+ return 'bottom';
1460
+ return 'top';
1461
+ }
1462
+ }
1463
+ resetRescan(reason) {
1464
+ if (this.rescanTimer !== null) {
1465
+ window.clearTimeout(this.rescanTimer);
1466
+ this.rescanTimer = null;
1467
+ }
1468
+ if (this.rescanAttempt !== 0 && this.config?.debug) {
1469
+ console.log('[Wontfix] Rescan reset', { reason });
1470
+ }
1471
+ this.rescanAttempt = 0;
1472
+ }
1473
+ scheduleRescan(reason) {
1474
+ if (!this.config)
1475
+ return;
1476
+ if (this.rescanTimer !== null)
1477
+ return;
1478
+ const attempt = this.rescanAttempt;
1479
+ if (attempt >= this.rescanDelaysMs.length) {
1480
+ if (this.config.debug) {
1481
+ console.warn('[Wontfix] Giving up on rescans', { reason, attempts: attempt });
1482
+ }
1483
+ return;
1484
+ }
1485
+ const delay = this.rescanDelaysMs[Math.min(attempt, this.rescanDelaysMs.length - 1)];
1486
+ this.rescanAttempt += 1;
1487
+ if (this.config.debug) {
1488
+ console.log('[Wontfix] Scheduling rescan', { reason, attempt, delay, pathname: window.location.pathname });
1489
+ }
1490
+ this.rescanTimer = window.setTimeout(() => {
1491
+ this.rescanTimer = null;
1492
+ this.rescanDOM();
1493
+ }, delay);
1494
+ }
1354
1495
  normalizeUrlToPathPattern(value) {
1355
1496
  if (!value)
1356
1497
  return '';
@@ -1 +1 @@
1
- {"version":3,"file":"wontfix-sdk.mjs","sources":["../../../projects/wontfix-sdk/src/lib/mock-tooltips.ts","../../../projects/wontfix-sdk/src/lib/path-matcher.ts","../../../projects/wontfix-sdk/src/lib/tooltip.component.ts","../../../projects/wontfix-sdk/src/lib/beacon.component.ts","../../../projects/wontfix-sdk/src/lib/nav-flow.component.ts","../../../projects/wontfix-sdk/src/lib/tooltip.service.ts","../../../projects/wontfix-sdk/src/lib/tooltip.initializer.ts","../../../projects/wontfix-sdk/src/lib/index.ts","../../../projects/wontfix-sdk/src/lib/wontfix-sdk.ts","../../../projects/wontfix-sdk/src/public-api.ts","../../../projects/wontfix-sdk/src/wontfix-sdk.ts"],"sourcesContent":["/**\n * Mock tooltip data for demo purposes\n * Paths are in format: tag_index/tag_index/.../ \n * Index indicates which child with that tag name (0-based)\n * templateId: 1 = product tour, 2 = tooltip\n */\n\nexport const MOCK_TOOLTIPS = [\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'hover' as const,\n position: 'top' as const,\n text: '💾 Save your work! All changes will be stored securely.'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n interaction: 'hover' as const,\n position: 'top' as const,\n text: '⚠️ Warning: This action cannot be undone!'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_2/',\n pageUrl: '*',\n metadata: {\n interaction: 'hover' as const,\n position: 'top' as const,\n text: '🔄 Refresh the page to get latest updates'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '❓ Need help? Click here to view our documentation and FAQs.'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '⚙️ Configure app settings and preferences'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_2/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: 'ℹ️ Learn more about Wontfix Tooltip SDK v1.0'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/form_0/div_0/input_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '📧 Enter a valid email address (e.g., user@example.com)'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/form_0/div_1/input_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '🔒 Use a strong password with at least 8 characters'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/form_0/div_2/input_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '✓ Must match the password above'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'top' as const,\n text: '⬆️ This tooltip appears at the TOP'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '➡️ This tooltip appears on the RIGHT'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_2/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'bottom' as const,\n text: '⬇️ This tooltip appears at the BOTTOM'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_3/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'left' as const,\n text: '⬅️ This tooltip appears on the LEFT'\n }\n },\n {\n templateId: 1,\n path: '*',\n pageUrl: '/product-tour',\n metadata: {\n assetUrl: '/assets/product-tour.mp4',\n header: 'Cool Product Tour',\n buttonText: 'Awesome!'\n }\n },\n {\n templateId: 3,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n position: 'left' as const,\n label: ''\n }\n },\n {\n templateId: 3,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n position: 'right' as const,\n label: 'Hot'\n } },\n {\n templateId: 4,\n path: '*',\n pageUrl: '*',\n metadata: {\n title: 'Getting Started Tour',\n steps: [\n {\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_0/',\n position: 'bottom' as const,\n title: 'Save Your Work',\n text: 'Click the Save button to securely store all your changes.',\n order: 1\n },\n {\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_1/',\n position: 'bottom' as const,\n title: 'Delete Items',\n text: 'Use this button to permanently delete items. This action cannot be undone!',\n order: 2\n },\n {\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_0/',\n position: 'right' as const,\n title: 'Get Help',\n text: 'Need assistance? Click here to access our comprehensive help documentation.',\n order: 3\n }\n ]\n } \n },\n {\n templateId: 5,\n path: '*',\n pageUrl: '/popup-demo',\n metadata: {\n title: 'Welcome to Wontfix! 🎉',\n text: 'We\\'re excited to have you here. This popup demonstrates how you can show important announcements, feature updates, or onboarding messages to your users.',\n buttonText: 'Got it'\n }\n }\n];","/**\n * Path matcher utility for DOM element targeting\n * Matches elements based on their path in the DOM tree\n * \n * Path format: \"body_0/app-root_0/app-tooltip-demo_0/div_0/button_1/\"\n * Numbers indicate the child index (0-based) among siblings of the same tag name\n */\n\nexport class PathMatcher {\n /**\n * Find DOM element by XPath\n * @param xpath XPath like \"/html/body/app-root/div[2]/...\"\n */\n static findElementByXPath(xpath: string): HTMLElement | null {\n if (!xpath) return null;\n try {\n const result = document.evaluate(\n xpath,\n document,\n null,\n XPathResult.FIRST_ORDERED_NODE_TYPE,\n null\n );\n return result.singleNodeValue instanceof HTMLElement ? result.singleNodeValue : null;\n } catch {\n return null;\n }\n }\n\n /**\n * Find DOM element by path\n * @param path DOM path like \"html_0/body_0/div_0/button_1/\"\n * @returns The matching element or null\n */\n static findElementByPath(path: string): HTMLElement | null {\n \n // Remove leading/trailing slashes and split\n const segments = path.split('/').filter(s => s.length > 0);\n \n if (segments.length === 0) {\n return null;\n }\n\n // Start from the appropriate root\n let currentElement: Element | null = null;\n let startIndex = 0;\n\n // Check if first segment is the html element\n if (segments[0].startsWith('html')) {\n currentElement = document.documentElement;\n startIndex = 1;\n } else if (segments[0].startsWith('body')) {\n currentElement = document.body;\n startIndex = 1;\n } else {\n currentElement = document.documentElement;\n }\n\n // Process remaining segments\n for (let i = startIndex; i < segments.length; i++) {\n if (!currentElement) {\n return null;\n }\n\n const segment = segments[i];\n const [tagName, indexStr] = this.parseSegment(segment);\n const index = parseInt(indexStr, 10);\n\n // Find all children with the same tag name\n const childrenWithTag: Element[] = Array.from(currentElement.children).filter(\n (child: Element) => {\n const matches = child.tagName.toLowerCase() === tagName.toLowerCase();\n return matches;\n }\n );\n\n // Get the element at the specified index\n if (index >= 0 && index < childrenWithTag.length) {\n currentElement = childrenWithTag[index];\n } else {\n return null; // Index out of bounds\n }\n }\n\n return currentElement instanceof HTMLElement ? currentElement : null;\n }\n\n /**\n * Get the path for a given DOM element\n * @param element The element to get the path for\n * @returns Path string like \"body_0/div_0/button_1/\"\n */\n static getPathForElement(element: HTMLElement): string {\n const segments: string[] = [];\n let currentElement: Element | null = element;\n\n while (currentElement && currentElement !== document.documentElement) {\n const parent: HTMLElement | null = currentElement.parentElement;\n if (!parent) break;\n\n // Count siblings with same tag name that come before this element\n const siblings: Element[] = Array.from(parent.children).filter(\n (child: Element) => child.tagName === currentElement!.tagName\n );\n const index = siblings.indexOf(currentElement);\n\n if (index >= 0) {\n segments.unshift(`${currentElement.tagName.toLowerCase()}_${index}`);\n }\n\n currentElement = parent;\n }\n\n // Add root element\n if (currentElement === document.documentElement) {\n segments.unshift(`${document.documentElement.tagName.toLowerCase()}_0`);\n }\n\n return segments.join('/') + '/';\n }\n\n /**\n * Parse a path segment like \"button_1\" into [\"button\", \"1\"]\n */\n private static parseSegment(segment: string): [string, string] {\n const lastUnderscoreIndex = segment.lastIndexOf('_');\n if (lastUnderscoreIndex === -1) {\n return [segment, '0'];\n }\n return [\n segment.substring(0, lastUnderscoreIndex),\n segment.substring(lastUnderscoreIndex + 1)\n ];\n }\n}\n","import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TooltipInstance } from './tooltip.model';\n\n@Component({\n selector: 'app-tooltip-popover',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div \n class=\"tooltip-container\"\n [ngClass]=\"'tooltip-' + tooltip.position\"\n [style.top.px]=\"top\"\n [style.left.px]=\"left\"\n >\n <div class=\"tooltip-content\">\n {{ tooltip.text }}\n </div>\n <div class=\"tooltip-arrow\"></div>\n </div>\n `,\n styles: [`\n .tooltip-container {\n position: fixed;\n background-color: #333;\n color: white;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 12px;\n z-index: 9999;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n max-width: 300px;\n word-wrap: break-word;\n pointer-events: none;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n }\n\n .tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n }\n\n /* Position: Top */\n .tooltip-top {\n transform: translateX(-50%) translateY(-100%);\n }\n\n .tooltip-top .tooltip-arrow {\n bottom: -4px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 4px 4px 0 4px;\n border-color: #333 transparent transparent transparent;\n }\n\n /* Position: Bottom */\n .tooltip-bottom {\n transform: translateX(-50%) translateY(8px);\n }\n\n .tooltip-bottom .tooltip-arrow {\n top: -4px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 0 4px 4px 4px;\n border-color: transparent transparent #333 transparent;\n }\n\n /* Position: Left */\n .tooltip-left {\n transform: translateX(-8px) translateY(-50%);\n }\n\n .tooltip-left .tooltip-arrow {\n right: -4px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 4px 0 4px 4px;\n border-color: transparent transparent transparent #333;\n }\n\n /* Position: Right */\n .tooltip-right {\n transform: translateX(8px) translateY(-50%);\n }\n\n .tooltip-right .tooltip-arrow {\n left: -4px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 4px 4px 4px 0;\n border-color: transparent #333 transparent transparent;\n }\n `]\n})\nexport class TooltipComponent {\n @Input() tooltip!: TooltipInstance;\n @Output() close = new EventEmitter<void>();\n \n top: number = 0;\n left: number = 0;\n\n closeTooltip(): void {\n this.close.emit();\n }\n}\n","import { Component, Input, OnInit, ElementRef } from '@angular/core';\n\nexport interface BeaconConfig {\n position: 'top' | 'right' | 'bottom' | 'left';\n label?: string;\n}\n\n@Component({\n selector: 'app-beacon',\n standalone: true,\n template: `\n <div class=\"beacon-container\" [class]=\"'beacon-' + config.position\">\n <div class=\"beacon-pulse\"></div>\n <div class=\"beacon-dot\"></div>\n </div>\n @if (config.label) {\n <span class=\"beacon-label\">{{ config.label }}</span>\n }\n `,\n styles: [`\n .beacon-container {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 6px;\n z-index: 100;\n }\n\n .beacon-pulse {\n position: absolute;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(231, 76, 60, 0.3);\n animation: pulse 2s infinite;\n }\n\n @keyframes pulse {\n 0% {\n transform: scale(0.8);\n opacity: 1;\n }\n 70% {\n transform: scale(1.8);\n opacity: 0;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n\n .beacon-dot {\n position: relative;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #e74c3c;\n box-shadow: 0 2px 6px rgba(231, 76, 60, 0.5);\n z-index: 1;\n flex-shrink: 0;\n }\n\n .beacon-label {\n display: block;\n margin-top: 8px;\n font-size: 10px;\n font-weight: 700;\n color: white;\n background: #e74c3c;\n padding: 2px 5px;\n border-radius: 3px;\n white-space: nowrap;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n flex-shrink: 0;\n }\n `]\n})\nexport class BeaconComponent implements OnInit {\n @Input() config!: BeaconConfig;\n\n constructor(private elementRef: ElementRef) {}\n\n ngOnInit() {\n // Position beacon relative to its parent container\n // The beacon container will be positioned at top-left, then adjusted via CSS classes\n }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nexport interface NavFlowStep {\n path: string;\n position: 'top' | 'right' | 'bottom' | 'left';\n title: string;\n text: string;\n order: number;\n}\n\n@Component({\n selector: 'app-nav-flow',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div \n class=\"nav-flow-container\"\n [ngClass]=\"'nav-flow-' + step.position\"\n [style.top.px]=\"top\"\n [style.left.px]=\"left\"\n >\n <div class=\"nav-flow-header\">\n <span class=\"step-indicator\">{{ currentStep }} of {{ totalSteps }}</span>\n <button class=\"close-btn\" (click)=\"close.emit()\">✕</button>\n </div>\n <h3 class=\"nav-flow-title\">{{ step.title }}</h3>\n <p class=\"nav-flow-text\">{{ step.text }}</p>\n <div class=\"nav-flow-footer\">\n <button \n class=\"nav-btn\" \n [disabled]=\"currentStep === 1\"\n (click)=\"previous.emit()\"\n >\n ← Previous\n </button>\n <button \n class=\"nav-btn primary\" \n (click)=\"onNextClick()\"\n >\n {{ currentStep === totalSteps ? 'Finish' : 'Next →' }}\n </button>\n </div>\n <div class=\"nav-flow-arrow\"></div>\n </div>\n `,\n styles: [`\n .nav-flow-container {\n position: fixed;\n background: white;\n border-radius: 8px;\n padding: 20px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n max-width: 350px;\n z-index: 10001;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n }\n\n .nav-flow-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 12px;\n }\n\n .step-indicator {\n font-size: 12px;\n color: #7f8c8d;\n font-weight: 600;\n }\n\n .close-btn {\n background: transparent;\n border: none;\n font-size: 20px;\n cursor: pointer;\n color: #7f8c8d;\n padding: 0;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: background-color 0.2s;\n }\n\n .close-btn:hover {\n background-color: #f0f0f0;\n }\n\n .nav-flow-title {\n margin: 0 0 8px 0;\n font-size: 18px;\n font-weight: 700;\n color: #2c3e50;\n }\n\n .nav-flow-text {\n margin: 0 0 16px 0;\n font-size: 14px;\n line-height: 1.5;\n color: #34495e;\n }\n\n .nav-flow-footer {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n }\n\n .nav-btn {\n padding: 8px 16px;\n border: 1px solid #ddd;\n background: white;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s;\n }\n\n .nav-btn:hover:not(:disabled) {\n background: #f8f9fa;\n }\n\n .nav-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .nav-btn.primary {\n background: #3498db;\n color: white;\n border-color: #3498db;\n }\n\n .nav-btn.primary:hover {\n background: #2980b9;\n }\n\n .nav-flow-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n }\n\n /* Position: Top */\n .nav-flow-top .nav-flow-arrow {\n bottom: -8px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 8px 8px 0 8px;\n border-color: white transparent transparent transparent;\n }\n\n /* Position: Bottom */\n .nav-flow-bottom .nav-flow-arrow {\n top: -8px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 0 8px 8px 8px;\n border-color: transparent transparent white transparent;\n }\n\n /* Position: Left */\n .nav-flow-left .nav-flow-arrow {\n right: -8px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 8px 0 8px 8px;\n border-color: transparent transparent transparent white;\n }\n\n /* Position: Right */\n .nav-flow-right .nav-flow-arrow {\n left: -8px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 8px 8px 8px 0;\n border-color: transparent white transparent transparent;\n }\n `]\n})\nexport class NavFlowComponent {\n @Input() step!: NavFlowStep;\n @Input() currentStep!: number;\n @Input() totalSteps!: number;\n @Output() next = new EventEmitter<void>();\n @Output() previous = new EventEmitter<void>();\n @Output() close = new EventEmitter<void>();\n \n top: number = 0;\n left: number = 0;\n\n onNextClick() {\n if (this.currentStep === this.totalSteps) {\n this.close.emit();\n } else {\n this.next.emit();\n }\n }\n}\n","import { Injectable, inject, ApplicationRef, createComponent, Injector } from '@angular/core';\nimport { BehaviorSubject, firstValueFrom, filter, take, Subscription } from 'rxjs';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { TooltipInstance } from './tooltip.model';\nimport { MOCK_TOOLTIPS } from './mock-tooltips';\nimport { PathMatcher } from './path-matcher';\nimport { TooltipComponent } from './tooltip.component';\nimport { BeaconComponent } from './beacon.component';\nimport { NavFlowComponent, NavFlowStep } from './nav-flow.component';\nimport { PopupComponent } from './popup.component';\n\ntype GuidanceCollectionType = 'tooltip' | 'beacon' | 'product-tour' | 'nav-flow' | 'popup' | string;\n\ntype GuidanceElement = {\n id: string;\n selector: string;\n position?: 'top' | 'right' | 'bottom' | 'left';\n order?: number | null;\n content?: string;\n interaction?: 'hover' | 'click' | string;\n};\n\ntype GuidanceCollection = {\n id: string;\n type: GuidanceCollectionType;\n url: string;\n elements?: GuidanceElement[];\n metadata?: any;\n [key: string]: any;\n};\n\n// TooltipConfig interface for SDK initialization\nexport interface TooltipConfig {\n apiUrl: string;\n payload?: any;\n debug?: boolean;\n fallbackToMock?: boolean;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TooltipService {\n private appRef = inject(ApplicationRef);\n private injector = inject(Injector);\n private router = inject(Router, { optional: true });\n private tooltipsSubject = new BehaviorSubject<TooltipInstance[]>([]);\n private config: TooltipConfig | null = null;\n private guidanceCollections: GuidanceCollection[] = [];\n private tooltipComponentRefs = new Map<string, any>();\n private tooltipElements = new Map<string, HTMLElement>();\n private tooltipListenerCleanup = new Map<string, () => void>();\n private beaconComponentRefs = new Map<string, any>();\n private beaconElements = new Map<string, HTMLElement>();\n private navFlowComponentRef: any = null;\n private navFlowElement: HTMLElement | null = null;\n private currentNavFlowStep: number = 0;\n private navFlowData: any = null;\n private popupComponentRef: any = null;\n private popupElement: HTMLElement | null = null;\n private popupOpen = false;\n private routeSubscription: Subscription | null = null;\n private windowRouteListenersAttached = false;\n\n public tooltips$ = this.tooltipsSubject.asObservable();\n\n /**\n * Initialize tooltips by fetching from API on app load\n * Waits for Angular to stabilize before matching paths\n */\n async initializeTooltips(config: TooltipConfig): Promise<void> {\n this.config = config;\n \n if (config.debug) {\n console.log('[Wontfix] Initializing tooltips...');\n }\n \n try {\n // Wait for Angular to stabilize (all components rendered and change detection complete)\n // Some host apps may never become \"stable\" due to long-running tasks; don't block forever.\n if (config.debug) {\n console.log('[Wontfix] Waiting for Angular to stabilize...');\n }\n\n await this.waitForAngularStability(5000);\n \n if (config.debug) {\n console.log('[Wontfix] Angular stable, fetching tooltips');\n }\n \n await this.fetchTooltips();\n\n // After initial load, keep reacting to host route changes.\n this.setupRouteListener();\n } catch (error) {\n console.error('[Wontfix] Failed to initialize tooltips:', error);\n }\n }\n\n /**\n * Fetch tooltips (currently using mock data)\n */\n private async fetchTooltips(): Promise<void> {\n if (!this.config) return;\n\n const collections = await this.fetchGuidanceCollections();\n this.guidanceCollections = collections;\n\n if (this.config.debug) {\n console.log(`[Wontfix] Loaded ${collections.length} guidance collections`);\n }\n\n // Map new API contract -> existing TooltipInstance shape used by TooltipComponent.\n const tooltips: TooltipInstance[] = collections\n .filter((c) => c?.type === 'tooltip')\n .reduce((accumulator, collection) => {\n const pageUrl = this.normalizeUrlToPathPattern(collection.url);\n const elements = Array.isArray(collection.elements) ? collection.elements : [];\n\n for (const el of elements) {\n const position = (el.position ?? 'top') as TooltipInstance['position'];\n const interaction = (el.interaction ?? 'hover') as TooltipInstance['interaction'];\n const text = el.content ?? '';\n\n accumulator.push({\n templateId: 2,\n path: el.selector,\n pageUrl,\n metadata: {\n interaction,\n position,\n text,\n },\n priority: el.order ?? undefined,\n id: `tooltip-${collection.id}-${el.id}`,\n isVisible: false,\n interaction,\n position,\n text,\n } as TooltipInstance);\n }\n\n return accumulator;\n }, [] as TooltipInstance[]);\n \n this.tooltipsSubject.next(tooltips);\n this.matchSelectorsToDOM();\n \n // Also initialize beacons\n this.initializeBeacons();\n \n \n // Check for popups on current route\n this.checkPopups();\n // Check for product tours on current route\n this.checkProductTours();\n }\n\n /**\n * Initialize beacons (templateId: 3)\n */\n private initializeBeacons(): void {\n const currentUrl = window.location.pathname;\n const beacons = this.guidanceCollections.filter(\n (c) => c?.type === 'beacon' && this.urlMatches(c.url, currentUrl)\n );\n\n beacons.forEach((beacon, collectionIndex) => {\n const elements = Array.isArray(beacon.elements) ? beacon.elements : [];\n\n elements.forEach((beaconElement, elementIndex) => {\n try {\n const element = this.resolveTargetElement(beaconElement.selector);\n if (element instanceof HTMLElement) {\n this.attachBeaconToElement(element, beacon, beaconElement, collectionIndex, elementIndex);\n }\n } catch (error) {\n console.error(`[Wontfix] ERROR matching beacon selector \"${beaconElement.selector}\":`, error);\n }\n });\n });\n }\n\n /**\n * Attach beacon to an element\n */\n private attachBeaconToElement(\n element: HTMLElement,\n beacon: GuidanceCollection,\n beaconElementConfig: GuidanceElement,\n collectionIndex: number,\n elementIndex: number\n ): void {\n const beaconId = `beacon-${beacon.id}-${beaconElementConfig.id ?? `${collectionIndex}-${elementIndex}`}`;\n const componentRef = createComponent(BeaconComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n componentRef.instance.config = {\n position: (beaconElementConfig.position ?? 'top') as 'top' | 'right' | 'bottom' | 'left',\n label: beaconElementConfig.content\n };\n\n this.appRef.attachView(componentRef.hostView);\n const beaconElement = componentRef.location.nativeElement;\n\n // Get parent button group\n const parent = element.parentElement;\n if (parent) {\n parent.style.position = 'relative';\n \n // Calculate button position within parent\n const buttonRect = element.getBoundingClientRect();\n const parentRect = parent.getBoundingClientRect();\n \n const relativeTop = buttonRect.top - parentRect.top;\n const relativeLeft = buttonRect.left - parentRect.left;\n const buttonWidth = buttonRect.width;\n const buttonHeight = buttonRect.height;\n\n // Set beacon position based on position prop\n const position = beaconElementConfig.position;\n let top = relativeTop;\n let left = relativeLeft;\n\n switch (position) {\n case 'top':\n top = relativeTop - 18;\n left = relativeLeft + buttonWidth / 2 - 5;\n break;\n case 'bottom':\n top = relativeTop + buttonHeight + 8;\n left = relativeLeft + buttonWidth / 2 - 5;\n break;\n case 'left':\n top = relativeTop + buttonHeight / 2 - 5;\n left = relativeLeft - 18;\n break;\n case 'right':\n top = relativeTop + buttonHeight / 2 - 5;\n left = relativeLeft + buttonWidth + 8;\n break;\n default:\n break;\n }\n\n beaconElement.style.position = 'absolute';\n beaconElement.style.top = top + 'px';\n beaconElement.style.left = left + 'px';\n \n parent.appendChild(beaconElement);\n } else {\n element.appendChild(beaconElement);\n }\n\n this.beaconElements.set(beaconId, beaconElement);\n this.beaconComponentRefs.set(beaconId, componentRef);\n }\n\n /**\n * Check if current route should show a product tour\n */\n private checkProductTours(): void {\n const currentUrl = window.location.pathname;\n const productTours = this.guidanceCollections.filter(item => \n item?.type === 'product-tour' && this.urlMatches(item.url, currentUrl)\n );\n\n if (productTours.length > 0 && this.config?.debug) {\n console.log('[Wontfix] Product tour found for route:', currentUrl);\n // Product tour will be handled by the ProductTourComponent on that route\n }\n }\n\n /**\n * Get all tooltips for current page\n */\n getTooltipsForCurrentPage(): TooltipInstance[] {\n const currentUrl = window.location.pathname;\n return this.tooltipsSubject.value.filter(tooltip => this.urlMatches(tooltip.pageUrl, currentUrl));\n }\n\n /**\n * Match tooltip paths to actual DOM elements\n */\n private matchSelectorsToDOM(): void {\n const tooltips = this.tooltipsSubject.value;\n const currentUrl = window.location.pathname;\n tooltips.forEach((tooltip) => {\n if (!this.urlMatches(tooltip.pageUrl, currentUrl)) {\n return;\n }\n try {\n const element = this.resolveTargetElement(tooltip.path);\n if (element instanceof HTMLElement) {\n tooltip.element = element;\n this.attachTooltipToElement(tooltip);\n }\n } catch (error) {\n console.error(`[Wontfix] ERROR matching path \"${tooltip.path}\":`, error);\n }\n });\n this.tooltipsSubject.next(tooltips);\n }\n\n /**\n * Attach tooltip event listeners to an element\n */\n private attachTooltipToElement(tooltip: TooltipInstance): void {\n const element = tooltip.element;\n if (!element) {\n return;\n }\n\n const existingCleanup = this.tooltipListenerCleanup.get(tooltip.id);\n if (existingCleanup) {\n existingCleanup();\n this.tooltipListenerCleanup.delete(tooltip.id);\n }\n\n if (tooltip.interaction === 'hover') {\n const onEnter = () => this.showTooltip(tooltip.id);\n const onLeave = () => this.hideTooltip(tooltip.id);\n element.addEventListener('mouseenter', onEnter);\n element.addEventListener('mouseleave', onLeave);\n this.tooltipListenerCleanup.set(tooltip.id, () => {\n element.removeEventListener('mouseenter', onEnter);\n element.removeEventListener('mouseleave', onLeave);\n });\n } else if (tooltip.interaction === 'click') {\n const onElementClick = (e: Event) => {\n e.stopPropagation();\n const isVisible = this.tooltipsSubject.value.find(t => t.id === tooltip.id)?.isVisible;\n if (isVisible) {\n this.hideTooltip(tooltip.id);\n } else {\n this.showTooltip(tooltip.id);\n }\n };\n\n element.addEventListener('click', onElementClick);\n\n // Close on outside click\n const onDocumentClick = () => this.hideTooltip(tooltip.id);\n document.addEventListener('click', onDocumentClick);\n\n this.tooltipListenerCleanup.set(tooltip.id, () => {\n element.removeEventListener('click', onElementClick);\n document.removeEventListener('click', onDocumentClick);\n });\n }\n }\n\n /**\n * Show tooltip\n */\n private showTooltip(tooltipId: string): void {\n const tooltip = this.tooltipsSubject.value.find(t => t.id === tooltipId);\n if (!tooltip || tooltip.isVisible) return;\n\n tooltip.isVisible = true;\n this.createAndShowTooltip(tooltip);\n this.tooltipsSubject.next(this.tooltipsSubject.value);\n }\n\n /**\n * Create and show tooltip component\n */\n private createAndShowTooltip(tooltip: TooltipInstance): void {\n if (!tooltip.element) {\n return;\n }\n\n // Remove existing tooltip\n this.hideTooltip(tooltip.id);\n\n // Create component\n const componentRef = createComponent(TooltipComponent, {\n environmentInjector: this.appRef.injector,\n elementInjector: this.injector\n });\n\n componentRef.instance.tooltip = tooltip;\n componentRef.instance.close.subscribe(() => {\n this.hideTooltip(tooltip.id);\n });\n\n this.appRef.attachView(componentRef.hostView);\n const tooltipElement = componentRef.location.nativeElement;\n\n document.body.appendChild(tooltipElement);\n this.tooltipElements.set(tooltip.id, tooltipElement);\n this.tooltipComponentRefs.set(tooltip.id, componentRef);\n\n // Position tooltip\n this.positionTooltip(tooltip, tooltipElement);\n }\n\n /**\n * Position tooltip relative to element\n */\n private positionTooltip(tooltip: TooltipInstance, tooltipElement: HTMLElement): void {\n if (!tooltip.element) return;\n\n const rect = tooltip.element.getBoundingClientRect();\n const tooltipRect = tooltipElement.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8;\n\n switch (tooltip.position) {\n case 'top':\n top = rect.top - tooltipRect.height - offset;\n left = rect.left + rect.width / 2 - tooltipRect.width / 2;\n break;\n case 'bottom':\n top = rect.bottom + offset;\n left = rect.left + rect.width / 2 - tooltipRect.width / 2;\n break;\n case 'left':\n top = rect.top + rect.height / 2 - tooltipRect.height / 2;\n left = rect.left - tooltipRect.width - offset;\n break;\n case 'right':\n top = rect.top + rect.height / 2 - tooltipRect.height / 2;\n left = rect.right + offset;\n break;\n }\n\n // Don't add scroll offset for position: fixed elements\n // Fixed positioning is relative to viewport, not document\n \n // Set position on component instance\n const componentInstance = this.tooltipComponentRefs.get(tooltip.id)?.instance;\n if (componentInstance) {\n componentInstance.top = top;\n componentInstance.left = left;\n }\n }\n\n /**\n * Hide tooltip\n */\n private hideTooltip(tooltipId: string): void {\n const tooltip = this.tooltipsSubject.value.find(t => t.id === tooltipId);\n if (tooltip) {\n tooltip.isVisible = false;\n }\n\n const componentRef = this.tooltipComponentRefs.get(tooltipId);\n const tooltipElement = this.tooltipElements.get(tooltipId);\n\n if (componentRef) {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n this.tooltipComponentRefs.delete(tooltipId);\n }\n\n if (tooltipElement && tooltipElement.parentNode) {\n tooltipElement.parentNode.removeChild(tooltipElement);\n this.tooltipElements.delete(tooltipId);\n }\n\n this.tooltipsSubject.next(this.tooltipsSubject.value);\n }\n\n private closeAllTooltips(): void {\n for (const tooltipId of Array.from(this.tooltipComponentRefs.keys())) {\n const tooltip = this.tooltipsSubject.value.find(t => t.id === tooltipId);\n if (tooltip) {\n tooltip.isVisible = false;\n }\n\n const componentRef = this.tooltipComponentRefs.get(tooltipId);\n const tooltipElement = this.tooltipElements.get(tooltipId);\n\n if (componentRef) {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n }\n if (tooltipElement && tooltipElement.parentNode) {\n tooltipElement.parentNode.removeChild(tooltipElement);\n }\n }\n\n this.tooltipComponentRefs.clear();\n this.tooltipElements.clear();\n this.tooltipsSubject.next(this.tooltipsSubject.value);\n }\n\n private detachAllTooltipListeners(): void {\n this.tooltipListenerCleanup.forEach((cleanup) => cleanup());\n this.tooltipListenerCleanup.clear();\n }\n\n /**\n * Re-scan DOM for new elements (useful for dynamically added content)\n */\n rescanDOM(): void {\n this.matchSelectorsToDOM();\n }\n\n /**\n * Update tooltip visibility\n */\n setTooltipVisible(tooltipId: string, visible: boolean): void {\n const tooltips = this.tooltipsSubject.value.map(t => \n t.id === tooltipId ? { ...t, isVisible: visible } : t\n );\n this.tooltipsSubject.next(tooltips);\n }\n\n /**\n * Check if page URL matches the tooltip's pageUrl pattern\n * Supports:\n * - Exact match: \"/dashboard\"\n * - Wildcard: \"/dashboard/*\"\n * - All pages: \"*\"\n */\n private urlMatches(pattern: string, currentUrl: string): boolean {\n const normalizedPattern = this.normalizeUrlToPathPattern(pattern);\n const normalizedCurrent = this.normalizeUrlToPathPattern(currentUrl);\n\n if (normalizedPattern === '*') return true;\n if (normalizedPattern === normalizedCurrent) return true;\n\n // Handle wildcard patterns like \"/dashboard/*\"\n const regexPattern = normalizedPattern\n .replace(/\\//g, '\\\\/')\n .replace(/\\*/g, '.*');\n\n try {\n return new RegExp(`^${regexPattern}$`).test(currentUrl);\n } catch {\n return false;\n }\n }\n\n /**\n * Get tooltip by ID\n */\n getTooltipById(id: string): TooltipInstance | undefined {\n return this.tooltipsSubject.value.find(t => t.id === id);\n }\n\n /**\n * Get all available tooltips (for debugging)\n */\n getAvailableTooltips(): string[] {\n return this.tooltipsSubject.value.map(t => t.id);\n }\n\n /**\n * Get product tour data for current route\n */\n getProductTourForRoute(route: string): any {\n const productTour = this.guidanceCollections.find(item =>\n item?.type === 'product-tour' && this.urlMatches(item.url, route)\n );\n return productTour;\n }\n\n /**\n * Reinitialize tooltips and beacons (useful when navigating back to a route)\n */\n reinitializeTooltips(): void {\n this.closeAllTooltips();\n this.closeNavFlow();\n this.closePopup();\n this.detachAllTooltipListeners();\n\n // Clear existing beacons\n this.beaconComponentRefs.forEach(ref => {\n this.appRef.detachView(ref.hostView);\n ref.destroy();\n });\n this.beaconComponentRefs.clear();\n this.beaconElements.forEach(el => {\n if (el && el.parentNode) {\n el.parentNode.removeChild(el);\n }\n });\n this.beaconElements.clear();\n\n // Reinitialize beacons\n this.initializeBeacons();\n \n // Rematch tooltips to DOM\n this.matchSelectorsToDOM();\n\n this.checkPopups();\n this.checkProductTours();\n }\n\n /**\n * Start a nav-flow for the current page\n */\n startNavFlow(): void {\n const currentUrl = window.location.pathname;\n const navFlow = this.guidanceCollections.find(item => \n item?.type === 'nav-flow' && this.urlMatches(item.url, currentUrl)\n );\n\n if (!navFlow || !navFlow.metadata.steps) {\n console.warn('[Wontfix] No nav-flow found for current page');\n return;\n }\n\n this.navFlowData = navFlow;\n this.currentNavFlowStep = 0;\n this.showNavFlowStep(0);\n }\n\n /**\n * Show a specific nav-flow step\n */\n private showNavFlowStep(stepIndex: number): void {\n if (!this.navFlowData) return;\n\n const steps = this.navFlowData.metadata.steps;\n if (stepIndex < 0 || stepIndex >= steps.length) return;\n\n // Clean up existing nav-flow component without resetting state\n if (this.navFlowComponentRef) {\n this.appRef.detachView(this.navFlowComponentRef.hostView);\n this.navFlowComponentRef.destroy();\n this.navFlowComponentRef = null;\n }\n if (this.navFlowElement && this.navFlowElement.parentNode) {\n this.navFlowElement.parentNode.removeChild(this.navFlowElement);\n this.navFlowElement = null;\n }\n\n const step = steps[stepIndex];\n this.currentNavFlowStep = stepIndex;\n\n try {\n const element = this.resolveTargetElement(step.path);\n if (element instanceof HTMLElement) {\n this.createAndShowNavFlow(element, step, stepIndex + 1, steps.length);\n }\n } catch (error) {\n console.error(`[Wontfix] ERROR finding element for nav-flow step:`, error);\n }\n }\n\n /**\n * Create and show nav-flow component\n */\n private createAndShowNavFlow(element: HTMLElement, step: NavFlowStep, currentStep: number, totalSteps: number): void {\n const componentRef = createComponent(NavFlowComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n componentRef.instance.step = step;\n componentRef.instance.currentStep = currentStep;\n componentRef.instance.totalSteps = totalSteps;\n \n this.appRef.attachView(componentRef.hostView);\n const navFlowElement = componentRef.location.nativeElement;\n\n document.body.appendChild(navFlowElement);\n this.navFlowElement = navFlowElement;\n this.navFlowComponentRef = componentRef;\n\n // Position nav-flow\n this.positionNavFlow(element, step, navFlowElement, componentRef);\n\n // Subscribe to events after setting refs\n componentRef.instance.next.subscribe(() => {\n this.nextNavFlowStep();\n });\n componentRef.instance.previous.subscribe(() => {\n this.previousNavFlowStep();\n });\n componentRef.instance.close.subscribe(() => {\n this.closeNavFlow();\n });\n }\n\n /**\n * Position nav-flow relative to element\n */\n private positionNavFlow(element: HTMLElement, step: NavFlowStep, navFlowElement: HTMLElement, componentRef: any): void {\n const rect = element.getBoundingClientRect();\n const navFlowRect = navFlowElement.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8;\n \n // Use actual dimensions or fallback if not rendered yet\n const navFlowWidth = navFlowRect.width || 350;\n const navFlowHeight = navFlowRect.height || 200; // Approximate height\n\n switch (step.position) {\n case 'top':\n top = rect.top - navFlowHeight - offset;\n left = rect.left + rect.width / 2 - navFlowWidth / 2;\n break; \n case 'bottom':\n top = rect.bottom + offset;\n left = rect.left + rect.width / 2 - navFlowWidth / 2;\n break;\n case 'left':\n top = rect.top + rect.height / 2 - navFlowHeight / 2;\n left = rect.left - navFlowWidth - offset;\n break;\n case 'right':\n top = rect.top + rect.height / 2 - navFlowHeight / 2;\n left = rect.right + offset;\n break;\n }\n\n componentRef.instance.top = top;\n componentRef.instance.left = left;\n }\n\n /**\n * Go to next nav-flow step\n */\n private nextNavFlowStep(): void {\n this.showNavFlowStep(this.currentNavFlowStep + 1);\n }\n\n /**\n * Go to previous nav-flow step\n */\n private previousNavFlowStep(): void {\n this.showNavFlowStep(this.currentNavFlowStep - 1);\n }\n\n /**\n * Close nav-flow\n */\n closeNavFlow(): void {\n if (this.navFlowComponentRef) {\n this.appRef.detachView(this.navFlowComponentRef.hostView);\n this.navFlowComponentRef.destroy();\n this.navFlowComponentRef = null;\n }\n\n if (this.navFlowElement && this.navFlowElement.parentNode) {\n this.navFlowElement.parentNode.removeChild(this.navFlowElement);\n this.navFlowElement = null;\n }\n\n this.navFlowData = null;\n this.currentNavFlowStep = 0;\n }\n\n /**\n * Check if current route should show a popup\n */\n private checkPopups(): void {\n const currentUrl = window.location.pathname;\n const popup = this.guidanceCollections.find(item => \n item?.type === 'popup' && this.urlMatches(item.url, currentUrl)\n );\n\n if (popup && this.config?.debug) {\n console.log('[Wontfix] Popup found for route:', currentUrl);\n // Popup will be handled by the PopupComponent on that route\n }\n }\n\n /**\n * Get popup data for current route\n */\n getPopupForRoute(route: string): any {\n const popup = this.guidanceCollections.find(item => \n item?.type === 'popup' && this.urlMatches(item.url, route)\n );\n return popup;\n }\n\n private setupRouteListener(): void {\n if (this.routeSubscription || this.windowRouteListenersAttached) {\n return;\n }\n\n if (this.router) {\n this.routeSubscription = this.router.events.subscribe((event) => {\n if (event instanceof NavigationEnd) {\n this.onRouteChanged();\n }\n });\n return;\n }\n\n window.addEventListener('popstate', this.onRouteChanged);\n window.addEventListener('hashchange', this.onRouteChanged);\n this.windowRouteListenersAttached = true;\n }\n\n private onRouteChanged = async (): Promise<void> => {\n try {\n await firstValueFrom(\n this.appRef.isStable.pipe(\n filter(stable => stable === true),\n take(1)\n )\n );\n this.reinitializeTooltips();\n } catch (error) {\n if (this.config?.debug) {\n console.warn('[Wontfix] Route-change reinit failed:', error);\n }\n }\n };\n\n private async fetchGuidanceCollections(): Promise<GuidanceCollection[]> {\n const fallbackToMock = this.config?.fallbackToMock ?? true;\n\n try {\n if (!this.config?.apiUrl) {\n return fallbackToMock ? this.normalizeGuidanceCollections(MOCK_TOOLTIPS as any[]) : [];\n }\n\n const hasPayload = this.config.payload !== undefined;\n\n if (this.config.debug) {\n console.log('[Wontfix] Fetching guidance collections...', {\n url: this.config.apiUrl,\n method: hasPayload ? 'POST' : 'GET'\n });\n }\n\n const response = await fetch(this.config.apiUrl, {\n method: hasPayload ? 'POST' : 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: hasPayload ? JSON.stringify(this.config.payload) : undefined,\n });\n\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}`);\n }\n\n const json = await response.json();\n const raw = Array.isArray(json)\n ? json\n : Array.isArray(json?.data)\n ? json.data\n : Array.isArray(json?.items)\n ? json.items\n : [];\n\n if (this.config.debug) {\n console.log('[Wontfix] Guidance collections fetched', {\n status: json?.status,\n count: Array.isArray(raw) ? raw.length : 0\n });\n }\n\n return this.normalizeGuidanceCollections(raw);\n } catch (error) {\n console.error('[Wontfix] Failed to fetch guidance elements:', error);\n return fallbackToMock ? this.normalizeGuidanceCollections(MOCK_TOOLTIPS as any[]) : [];\n }\n }\n\n private async waitForAngularStability(timeoutMs: number): Promise<void> {\n try {\n await Promise.race([\n firstValueFrom(\n this.appRef.isStable.pipe(\n filter(stable => stable === true),\n take(1)\n )\n ),\n new Promise<void>((resolve) => setTimeout(resolve, timeoutMs)),\n ]);\n\n if (this.config?.debug) {\n console.log('[Wontfix] Stability wait finished');\n }\n } catch {\n // Never block initialization on stability failures.\n }\n }\n\n private normalizeGuidanceCollections(raw: any[]): GuidanceCollection[] {\n if (!Array.isArray(raw)) return [];\n const result: GuidanceCollection[] = [];\n\n let skippedInactive = 0;\n let skippedInvalidShape = 0;\n let normalizedFromLegacy = 0;\n let normalizedFromElementLevel = 0;\n\n raw.forEach((item, index) => {\n if (item && typeof item === 'object') {\n const candidateType = typeof item.type === 'string' ? item.type : undefined;\n const candidateUrl =\n typeof item.url === 'string'\n ? item.url\n : typeof item.pageUrl === 'string'\n ? item.pageUrl\n : undefined;\n\n // New contract: already a collection.\n if (candidateType && candidateUrl) {\n if (item.isActive === false) {\n skippedInactive += 1;\n return;\n }\n\n const normalized: GuidanceCollection = {\n ...(item as any),\n type: candidateType,\n url: candidateUrl,\n };\n\n if (Array.isArray(normalized.elements)) {\n normalized.elements = normalized.elements.filter((el: any) => el?.isActive !== false);\n }\n\n result.push(normalized);\n return;\n }\n\n // Newer contract variant: type/url live on each element, not the collection.\n // We \"lift\" them up by grouping active elements by (type,url).\n if (Array.isArray(item.elements)) {\n if (item.isActive === false) {\n skippedInactive += 1;\n return;\n }\n\n const activeElements = item.elements.filter((el: any) => el?.isActive !== false);\n if (activeElements.length === 0) {\n skippedInvalidShape += 1;\n return;\n }\n\n const groups = new Map<string, GuidanceCollection>();\n\n for (const el of activeElements) {\n const elType = typeof el?.type === 'string' ? (el.type as string) : undefined;\n const elUrl = typeof el?.url === 'string' ? (el.url as string) : undefined;\n const elSelector = typeof el?.selector === 'string' ? el.selector : undefined;\n\n if (!elType || !elUrl || !elSelector) {\n skippedInvalidShape += 1;\n continue;\n }\n\n const key = `${elType}@@${elUrl}`;\n let collection = groups.get(key);\n if (!collection) {\n collection = {\n id: item.id ?? `collection-${index}`,\n type: elType,\n url: elUrl,\n elements: [],\n };\n groups.set(key, collection);\n }\n\n collection.elements!.push({\n id: el.id ?? `${collection.id}-el-${collection.elements!.length}`,\n selector: elSelector,\n position: el.position,\n order: el.order,\n content: el.content,\n interaction: el.interaction,\n });\n }\n\n for (const collection of groups.values()) {\n normalizedFromElementLevel += 1;\n result.push(collection);\n }\n\n return;\n }\n }\n\n if (item && typeof item === 'object' && typeof item.templateId === 'number') {\n const templateId = item.templateId as number;\n const type: GuidanceCollectionType =\n templateId === 2 ? 'tooltip' :\n templateId === 3 ? 'beacon' :\n templateId === 1 ? 'product-tour' :\n templateId === 4 ? 'nav-flow' :\n templateId === 5 ? 'popup' :\n 'unknown';\n\n normalizedFromLegacy += 1;\n result.push({\n id: item.id ?? `legacy-${templateId}-${index}`,\n type,\n url: item.pageUrl ?? '*',\n elements: [\n {\n id: item.elements?.[0]?.id ?? `legacy-el-${index}`,\n selector: item.path ?? item.selector,\n position: item.metadata?.position,\n interaction: item.metadata?.interaction,\n content: item.metadata?.text,\n order: item.priority ?? item.order ?? item.elements?.[0]?.order,\n },\n ],\n metadata: item.metadata,\n });\n return;\n }\n\n skippedInvalidShape += 1;\n });\n\n if (this.config?.debug) {\n console.log('[Wontfix] Normalization summary', {\n rawCount: raw.length,\n loadedCount: result.length,\n skippedInactive,\n skippedInvalidShape,\n normalizedFromLegacy,\n normalizedFromElementLevel,\n sampleRawKeys: raw[0] && typeof raw[0] === 'object' ? Object.keys(raw[0]) : undefined,\n });\n }\n\n return result;\n }\n\n private resolveTargetElement(selectorOrPath: string): HTMLElement | null {\n if (!selectorOrPath) return null;\n\n // XPath selectors (new contract) e.g. \"/html/body/.../div[2]\"\n if (selectorOrPath.startsWith('/') || selectorOrPath.startsWith('(')) {\n const xPathMatch = PathMatcher.findElementByXPath(selectorOrPath);\n if (xPathMatch) return xPathMatch;\n }\n\n if (selectorOrPath.includes('/')) {\n return PathMatcher.findElementByPath(selectorOrPath);\n }\n\n try {\n const element = document.querySelector(selectorOrPath);\n return element instanceof HTMLElement ? element : null;\n } catch {\n return PathMatcher.findElementByPath(selectorOrPath);\n }\n }\n\n private normalizeUrlToPathPattern(value: string): string {\n if (!value) return '';\n if (value === '*') return '*';\n if (value.startsWith('/')) {\n return value;\n }\n\n try {\n const parsed = new URL(value);\n return parsed.pathname || '/';\n } catch {\n return value;\n }\n }\n\n /**\n * Close popup\n */\n closePopup(): void {\n this.popupOpen = false;\n if (this.popupComponentRef) {\n this.appRef.detachView(this.popupComponentRef.hostView);\n this.popupComponentRef.destroy();\n this.popupComponentRef = null;\n }\n\n if (this.popupElement && this.popupElement.parentNode) {\n this.popupElement.parentNode.removeChild(this.popupElement);\n this.popupElement = null;\n }\n }\n\n /**\n * Check if popup is open\n */\n isPopupOpen(): boolean {\n return this.popupOpen;\n }\n}\n","import { inject } from '@angular/core';\nimport { TooltipService } from './tooltip.service';\nimport type { TooltipConfig } from './tooltip.service';\n\n/*\n * Tooltips are fetched once on app load.\n * Updates are only available on next app reload.\n */\nexport function wontfixInitializer(config: TooltipConfig) {\n return () => {\n const tooltipService = inject(TooltipService);\n return tooltipService.initializeTooltips(config);\n };\n}\n","/**\n * Wontfix Tooltip SDK - Public API\n * \n * This is the main entry point for applications using the Wontfix SDK.\n * Export only the public-facing APIs that consumers should use.\n */\n\nexport { TooltipService } from './tooltip.service';\nexport type { TooltipConfig } from './tooltip.service';\nexport { wontfixInitializer } from './tooltip.initializer';\nexport type { Tooltip, TooltipInstance } from './tooltip.model';\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-wontfix-sdk',\n imports: [],\n template: `\n <p>\n wontfix-sdk works!\n </p>\n `,\n styles: ``,\n})\nexport class WontfixSdk {\n\n}\n","/*\n * Public API Surface of wontfix-sdk\n */\n\n// Main SDK surface (service + initializer + types)\nexport * from './lib/index';\n\n// Optional: keep the generated demo component exported\nexport * from './lib/wontfix-sdk';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;AAKG;AAEI,MAAM,aAAa,GAAG;AAC3B,IAAA;AACE,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,IAAI,EAAE,6EAA6E;AACnF,QAAA,OAAO,EAAE,GAAG;AACZ,QAAA,QAAQ,EAAE;AACR,YAAA,WAAW,EAAE,OAAgB;AAC7B,YAAA,QAAQ,EAAE,KAAc;AACxB,YAAA,IAAI,EAAE;AACP;AACF,KAAA;AACD,IAAA;AACE,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,IAAI,EAAE,6EAA6E;AACnF,QAAA,OAAO,EAAE,GAAG;AACZ,QAAA,QAAQ,EAAE;AACR,YAAA,WAAW,EAAE,OAAgB;AAC7B,YAAA,QAAQ,EAAE,KAAc;AACxB,YAAA,IAAI,EAAE;AACP;AACF,KAAA;AACD,IAAA;AACE,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,IAAI,EAAE,6EAA6E;AACnF,QAAA,OAAO,EAAE,GAAG;AACZ,QAAA,QAAQ,EAAE;AACR,YAAA,WAAW,EAAE,OAAgB;AAC7B,YAAA,QAAQ,EAAE,KAAc;AACxB,YAAA,IAAI,EAAE;AACP;AACF,KAAA;AACD,IAAA;AACE,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,IAAI,EAAE,6EAA6E;AACnF,QAAA,OAAO,EAAE,GAAG;AACZ,QAAA,QAAQ,EAAE;AACR,YAAA,WAAW,EAAE,OAAgB;AAC7B,YAAA,QAAQ,EAAE,OAAgB;AAC1B,YAAA,IAAI,EAAE;AACP;AACF,KAAA;AACD,IAAA;AACE,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,IAAI,EAAE,6EAA6E;AACnF,QAAA,OAAO,EAAE,GAAG;AACZ,QAAA,QAAQ,EAAE;AACR,YAAA,WAAW,EAAE,OAAgB;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A;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACrCD;;;AAGG;AACG,SAAU,kBAAkB,CAAC,MAAqB,EAAA;AACtD,IAAA,OAAO,MAAK;AACV,QAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7C,QAAA,OAAO,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC;AAClD,IAAA,CAAC;AACH;;ACbA;;;;;AAKG;;MCOU,UAAU,CAAA;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPX;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,UAAU,EAAA,UAAA,EAAA,CAAA;kBAVtB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,EAAE,EAAA,QAAA,EACD;;;;AAIT,EAAA,CAAA,EAAA;;;ACTH;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
1
+ {"version":3,"file":"wontfix-sdk.mjs","sources":["../../../projects/wontfix-sdk/src/lib/mock-tooltips.ts","../../../projects/wontfix-sdk/src/lib/path-matcher.ts","../../../projects/wontfix-sdk/src/lib/tooltip.component.ts","../../../projects/wontfix-sdk/src/lib/beacon.component.ts","../../../projects/wontfix-sdk/src/lib/nav-flow.component.ts","../../../projects/wontfix-sdk/src/lib/tooltip.service.ts","../../../projects/wontfix-sdk/src/lib/tooltip.initializer.ts","../../../projects/wontfix-sdk/src/lib/index.ts","../../../projects/wontfix-sdk/src/lib/wontfix-sdk.ts","../../../projects/wontfix-sdk/src/public-api.ts","../../../projects/wontfix-sdk/src/wontfix-sdk.ts"],"sourcesContent":["/**\n * Mock tooltip data for demo purposes\n * Paths are in format: tag_index/tag_index/.../ \n * Index indicates which child with that tag name (0-based)\n * templateId: 1 = product tour, 2 = tooltip\n */\n\nexport const MOCK_TOOLTIPS = [\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'hover' as const,\n position: 'top' as const,\n text: '💾 Save your work! All changes will be stored securely.'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n interaction: 'hover' as const,\n position: 'top' as const,\n text: '⚠️ Warning: This action cannot be undone!'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_2/',\n pageUrl: '*',\n metadata: {\n interaction: 'hover' as const,\n position: 'top' as const,\n text: '🔄 Refresh the page to get latest updates'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '❓ Need help? Click here to view our documentation and FAQs.'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '⚙️ Configure app settings and preferences'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_2/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: 'ℹ️ Learn more about Wontfix Tooltip SDK v1.0'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/form_0/div_0/input_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '📧 Enter a valid email address (e.g., user@example.com)'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/form_0/div_1/input_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '🔒 Use a strong password with at least 8 characters'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/form_0/div_2/input_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '✓ Must match the password above'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'top' as const,\n text: '⬆️ This tooltip appears at the TOP'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'right' as const,\n text: '➡️ This tooltip appears on the RIGHT'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_2/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'bottom' as const,\n text: '⬇️ This tooltip appears at the BOTTOM'\n }\n },\n {\n templateId: 2,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_3/div_0/button_3/',\n pageUrl: '*',\n metadata: {\n interaction: 'click' as const,\n position: 'left' as const,\n text: '⬅️ This tooltip appears on the LEFT'\n }\n },\n {\n templateId: 1,\n path: '*',\n pageUrl: '/product-tour',\n metadata: {\n assetUrl: '/assets/product-tour.mp4',\n header: 'Cool Product Tour',\n buttonText: 'Awesome!'\n }\n },\n {\n templateId: 3,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/div_0/button_0/',\n pageUrl: '*',\n metadata: {\n position: 'left' as const,\n label: ''\n }\n },\n {\n templateId: 3,\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_2/div_0/button_1/',\n pageUrl: '*',\n metadata: {\n position: 'right' as const,\n label: 'Hot'\n } },\n {\n templateId: 4,\n path: '*',\n pageUrl: '*',\n metadata: {\n title: 'Getting Started Tour',\n steps: [\n {\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_0/',\n position: 'bottom' as const,\n title: 'Save Your Work',\n text: 'Click the Save button to securely store all your changes.',\n order: 1\n },\n {\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_0/div_0/button_1/',\n position: 'bottom' as const,\n title: 'Delete Items',\n text: 'Use this button to permanently delete items. This action cannot be undone!',\n order: 2\n },\n {\n path: 'html_0/body_0/app-root_0/app-tooltip-demo_0/div_0/section_1/div_0/button_0/',\n position: 'right' as const,\n title: 'Get Help',\n text: 'Need assistance? Click here to access our comprehensive help documentation.',\n order: 3\n }\n ]\n } \n },\n {\n templateId: 5,\n path: '*',\n pageUrl: '/popup-demo',\n metadata: {\n title: 'Welcome to Wontfix! 🎉',\n text: 'We\\'re excited to have you here. This popup demonstrates how you can show important announcements, feature updates, or onboarding messages to your users.',\n buttonText: 'Got it'\n }\n }\n];","/**\n * Path matcher utility for DOM element targeting\n * Matches elements based on their path in the DOM tree\n * \n * Path format: \"body_0/app-root_0/app-tooltip-demo_0/div_0/button_1/\"\n * Numbers indicate the child index (0-based) among siblings of the same tag name\n */\n\nexport class PathMatcher {\n /**\n * Find DOM element by XPath\n * @param xpath XPath like \"/html/body/app-root/div[2]/...\"\n */\n static findElementByXPath(xpath: string): HTMLElement | null {\n if (!xpath) return null;\n try {\n const result = document.evaluate(\n xpath,\n document,\n null,\n XPathResult.FIRST_ORDERED_NODE_TYPE,\n null\n );\n return result.singleNodeValue instanceof HTMLElement ? result.singleNodeValue : null;\n } catch {\n return null;\n }\n }\n\n /**\n * Find DOM element by path\n * @param path DOM path like \"html_0/body_0/div_0/button_1/\"\n * @returns The matching element or null\n */\n static findElementByPath(path: string): HTMLElement | null {\n \n // Remove leading/trailing slashes and split\n const segments = path.split('/').filter(s => s.length > 0);\n \n if (segments.length === 0) {\n return null;\n }\n\n // Start from the appropriate root\n let currentElement: Element | null = null;\n let startIndex = 0;\n\n // Check if first segment is the html element\n if (segments[0].startsWith('html')) {\n currentElement = document.documentElement;\n startIndex = 1;\n } else if (segments[0].startsWith('body')) {\n currentElement = document.body;\n startIndex = 1;\n } else {\n currentElement = document.documentElement;\n }\n\n // Process remaining segments\n for (let i = startIndex; i < segments.length; i++) {\n if (!currentElement) {\n return null;\n }\n\n const segment = segments[i];\n const [tagName, indexStr] = this.parseSegment(segment);\n const index = parseInt(indexStr, 10);\n\n // Find all children with the same tag name\n const childrenWithTag: Element[] = Array.from(currentElement.children).filter(\n (child: Element) => {\n const matches = child.tagName.toLowerCase() === tagName.toLowerCase();\n return matches;\n }\n );\n\n // Get the element at the specified index\n if (index >= 0 && index < childrenWithTag.length) {\n currentElement = childrenWithTag[index];\n } else {\n return null; // Index out of bounds\n }\n }\n\n return currentElement instanceof HTMLElement ? currentElement : null;\n }\n\n /**\n * Get the path for a given DOM element\n * @param element The element to get the path for\n * @returns Path string like \"body_0/div_0/button_1/\"\n */\n static getPathForElement(element: HTMLElement): string {\n const segments: string[] = [];\n let currentElement: Element | null = element;\n\n while (currentElement && currentElement !== document.documentElement) {\n const parent: HTMLElement | null = currentElement.parentElement;\n if (!parent) break;\n\n // Count siblings with same tag name that come before this element\n const siblings: Element[] = Array.from(parent.children).filter(\n (child: Element) => child.tagName === currentElement!.tagName\n );\n const index = siblings.indexOf(currentElement);\n\n if (index >= 0) {\n segments.unshift(`${currentElement.tagName.toLowerCase()}_${index}`);\n }\n\n currentElement = parent;\n }\n\n // Add root element\n if (currentElement === document.documentElement) {\n segments.unshift(`${document.documentElement.tagName.toLowerCase()}_0`);\n }\n\n return segments.join('/') + '/';\n }\n\n /**\n * Parse a path segment like \"button_1\" into [\"button\", \"1\"]\n */\n private static parseSegment(segment: string): [string, string] {\n const lastUnderscoreIndex = segment.lastIndexOf('_');\n if (lastUnderscoreIndex === -1) {\n return [segment, '0'];\n }\n return [\n segment.substring(0, lastUnderscoreIndex),\n segment.substring(lastUnderscoreIndex + 1)\n ];\n }\n}\n","import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TooltipInstance } from './tooltip.model';\n\n@Component({\n selector: 'app-tooltip-popover',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div \n class=\"tooltip-container\"\n [ngClass]=\"'tooltip-' + tooltip.position\"\n [style.top.px]=\"top\"\n [style.left.px]=\"left\"\n >\n <div class=\"tooltip-content\">\n {{ tooltip.text }}\n </div>\n <div class=\"tooltip-arrow\"></div>\n </div>\n `,\n styles: [`\n .tooltip-container {\n position: fixed;\n background-color: #333;\n color: white;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 12px;\n z-index: 9999;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n max-width: 300px;\n word-wrap: break-word;\n pointer-events: none;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n }\n\n .tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n }\n\n /* Position: Top */\n .tooltip-top {\n transform: translateX(-50%) translateY(-100%);\n }\n\n .tooltip-top .tooltip-arrow {\n bottom: -4px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 4px 4px 0 4px;\n border-color: #333 transparent transparent transparent;\n }\n\n /* Position: Bottom */\n .tooltip-bottom {\n transform: translateX(-50%) translateY(8px);\n }\n\n .tooltip-bottom .tooltip-arrow {\n top: -4px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 0 4px 4px 4px;\n border-color: transparent transparent #333 transparent;\n }\n\n /* Position: Left */\n .tooltip-left {\n transform: translateX(-8px) translateY(-50%);\n }\n\n .tooltip-left .tooltip-arrow {\n right: -4px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 4px 0 4px 4px;\n border-color: transparent transparent transparent #333;\n }\n\n /* Position: Right */\n .tooltip-right {\n transform: translateX(8px) translateY(-50%);\n }\n\n .tooltip-right .tooltip-arrow {\n left: -4px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 4px 4px 4px 0;\n border-color: transparent #333 transparent transparent;\n }\n `]\n})\nexport class TooltipComponent {\n @Input() tooltip!: TooltipInstance;\n @Output() close = new EventEmitter<void>();\n \n top: number = 0;\n left: number = 0;\n\n closeTooltip(): void {\n this.close.emit();\n }\n}\n","import { Component, Input, OnInit, ElementRef } from '@angular/core';\n\nexport interface BeaconConfig {\n position: 'top' | 'right' | 'bottom' | 'left';\n label?: string;\n}\n\n@Component({\n selector: 'app-beacon',\n standalone: true,\n template: `\n <div class=\"beacon-container\" [class]=\"'beacon-' + config.position\">\n <div class=\"beacon-pulse\"></div>\n <div class=\"beacon-dot\"></div>\n </div>\n @if (config.label) {\n <span class=\"beacon-label\">{{ config.label }}</span>\n }\n `,\n styles: [`\n .beacon-container {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 6px;\n z-index: 100;\n }\n\n .beacon-pulse {\n position: absolute;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(231, 76, 60, 0.3);\n animation: pulse 2s infinite;\n }\n\n @keyframes pulse {\n 0% {\n transform: scale(0.8);\n opacity: 1;\n }\n 70% {\n transform: scale(1.8);\n opacity: 0;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n\n .beacon-dot {\n position: relative;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #e74c3c;\n box-shadow: 0 2px 6px rgba(231, 76, 60, 0.5);\n z-index: 1;\n flex-shrink: 0;\n }\n\n .beacon-label {\n display: block;\n margin-top: 8px;\n font-size: 10px;\n font-weight: 700;\n color: white;\n background: #e74c3c;\n padding: 2px 5px;\n border-radius: 3px;\n white-space: nowrap;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n flex-shrink: 0;\n }\n `]\n})\nexport class BeaconComponent implements OnInit {\n @Input() config!: BeaconConfig;\n\n constructor(private elementRef: ElementRef) {}\n\n ngOnInit() {\n // Position beacon relative to its parent container\n // The beacon container will be positioned at top-left, then adjusted via CSS classes\n }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nexport interface NavFlowStep {\n path: string;\n position: 'top' | 'right' | 'bottom' | 'left';\n title: string;\n text: string;\n order: number;\n}\n\n@Component({\n selector: 'app-nav-flow',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div \n class=\"nav-flow-container\"\n [ngClass]=\"'nav-flow-' + step.position\"\n [style.top.px]=\"top\"\n [style.left.px]=\"left\"\n >\n <div class=\"nav-flow-header\">\n <span class=\"step-indicator\">{{ currentStep }} of {{ totalSteps }}</span>\n <button class=\"close-btn\" (click)=\"close.emit()\">✕</button>\n </div>\n <h3 class=\"nav-flow-title\">{{ step.title }}</h3>\n <p class=\"nav-flow-text\">{{ step.text }}</p>\n <div class=\"nav-flow-footer\">\n <button \n class=\"nav-btn\" \n [disabled]=\"currentStep === 1\"\n (click)=\"previous.emit()\"\n >\n ← Previous\n </button>\n <button \n class=\"nav-btn primary\" \n (click)=\"onNextClick()\"\n >\n {{ currentStep === totalSteps ? 'Finish' : 'Next →' }}\n </button>\n </div>\n <div class=\"nav-flow-arrow\"></div>\n </div>\n `,\n styles: [`\n .nav-flow-container {\n position: fixed;\n background: white;\n border-radius: 8px;\n padding: 20px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n max-width: 350px;\n z-index: 10001;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n }\n\n .nav-flow-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 12px;\n }\n\n .step-indicator {\n font-size: 12px;\n color: #7f8c8d;\n font-weight: 600;\n }\n\n .close-btn {\n background: transparent;\n border: none;\n font-size: 20px;\n cursor: pointer;\n color: #7f8c8d;\n padding: 0;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: background-color 0.2s;\n }\n\n .close-btn:hover {\n background-color: #f0f0f0;\n }\n\n .nav-flow-title {\n margin: 0 0 8px 0;\n font-size: 18px;\n font-weight: 700;\n color: #2c3e50;\n }\n\n .nav-flow-text {\n margin: 0 0 16px 0;\n font-size: 14px;\n line-height: 1.5;\n color: #34495e;\n }\n\n .nav-flow-footer {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n }\n\n .nav-btn {\n padding: 8px 16px;\n border: 1px solid #ddd;\n background: white;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s;\n }\n\n .nav-btn:hover:not(:disabled) {\n background: #f8f9fa;\n }\n\n .nav-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .nav-btn.primary {\n background: #3498db;\n color: white;\n border-color: #3498db;\n }\n\n .nav-btn.primary:hover {\n background: #2980b9;\n }\n\n .nav-flow-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n }\n\n /* Position: Top */\n .nav-flow-top .nav-flow-arrow {\n bottom: -8px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 8px 8px 0 8px;\n border-color: white transparent transparent transparent;\n }\n\n /* Position: Bottom */\n .nav-flow-bottom .nav-flow-arrow {\n top: -8px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 0 8px 8px 8px;\n border-color: transparent transparent white transparent;\n }\n\n /* Position: Left */\n .nav-flow-left .nav-flow-arrow {\n right: -8px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 8px 0 8px 8px;\n border-color: transparent transparent transparent white;\n }\n\n /* Position: Right */\n .nav-flow-right .nav-flow-arrow {\n left: -8px;\n top: 50%;\n transform: translateY(-50%);\n border-width: 8px 8px 8px 0;\n border-color: transparent white transparent transparent;\n }\n `]\n})\nexport class NavFlowComponent {\n @Input() step!: NavFlowStep;\n @Input() currentStep!: number;\n @Input() totalSteps!: number;\n @Output() next = new EventEmitter<void>();\n @Output() previous = new EventEmitter<void>();\n @Output() close = new EventEmitter<void>();\n \n top: number = 0;\n left: number = 0;\n\n onNextClick() {\n if (this.currentStep === this.totalSteps) {\n this.close.emit();\n } else {\n this.next.emit();\n }\n }\n}\n","import { Injectable, inject, ApplicationRef, createComponent, Injector } from '@angular/core';\nimport { BehaviorSubject, firstValueFrom, filter, take, Subscription } from 'rxjs';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { TooltipInstance } from './tooltip.model';\nimport { MOCK_TOOLTIPS } from './mock-tooltips';\nimport { PathMatcher } from './path-matcher';\nimport { TooltipComponent } from './tooltip.component';\nimport { BeaconComponent } from './beacon.component';\nimport { NavFlowComponent, NavFlowStep } from './nav-flow.component';\nimport { PopupComponent } from './popup.component';\n\ntype GuidanceCollectionType = 'tooltip' | 'beacon' | 'product-tour' | 'nav-flow' | 'popup' | string;\n\ntype GuidanceElement = {\n id: string;\n selector: string;\n position?: string;\n order?: number | null;\n content?: string;\n interaction?: 'hover' | 'click' | string;\n};\n\ntype GuidanceCollection = {\n id: string;\n type: GuidanceCollectionType;\n url: string;\n elements?: GuidanceElement[];\n metadata?: any;\n [key: string]: any;\n};\n\n// TooltipConfig interface for SDK initialization\nexport interface TooltipConfig {\n apiUrl: string;\n payload?: any;\n debug?: boolean;\n fallbackToMock?: boolean;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TooltipService {\n private appRef = inject(ApplicationRef);\n private injector = inject(Injector);\n private router = inject(Router, { optional: true });\n private tooltipsSubject = new BehaviorSubject<TooltipInstance[]>([]);\n private config: TooltipConfig | null = null;\n private guidanceCollections: GuidanceCollection[] = [];\n private rescanAttempt = 0;\n private rescanTimer: number | null = null;\n private readonly rescanDelaysMs = [0, 250, 750, 1500, 3000, 5000];\n private tooltipComponentRefs = new Map<string, any>();\n private tooltipElements = new Map<string, HTMLElement>();\n private tooltipListenerCleanup = new Map<string, () => void>();\n private beaconComponentRefs = new Map<string, any>();\n private beaconElements = new Map<string, HTMLElement>();\n private navFlowComponentRef: any = null;\n private navFlowElement: HTMLElement | null = null;\n private currentNavFlowStep: number = 0;\n private navFlowData: any = null;\n private popupComponentRef: any = null;\n private popupElement: HTMLElement | null = null;\n private popupOpen = false;\n private routeSubscription: Subscription | null = null;\n private windowRouteListenersAttached = false;\n\n public tooltips$ = this.tooltipsSubject.asObservable();\n\n /**\n * Initialize tooltips by fetching from API on app load\n * Waits for Angular to stabilize before matching paths\n */\n async initializeTooltips(config: TooltipConfig): Promise<void> {\n this.config = config;\n \n if (config.debug) {\n console.log('[Wontfix] Initializing tooltips...', {\n pathname: window.location.pathname,\n hasPayload: config.payload !== undefined,\n fallbackToMock: config.fallbackToMock,\n });\n }\n \n try {\n // Wait for Angular to stabilize (all components rendered and change detection complete)\n // Some host apps may never become \"stable\" due to long-running tasks; don't block forever.\n if (config.debug) {\n console.log('[Wontfix] Waiting for Angular to stabilize...');\n }\n\n await this.waitForAngularStability(5000);\n \n if (config.debug) {\n console.log('[Wontfix] Angular stable, fetching tooltips');\n }\n \n await this.fetchTooltips();\n\n // After initial load, keep reacting to host route changes.\n this.setupRouteListener();\n\n if (config.debug) {\n (window as any).__wontfix = {\n rescan: () => this.rescanDOM(),\n reinit: () => this.reinitializeTooltips(),\n collections: () => this.guidanceCollections,\n tooltips: () => this.tooltipsSubject.value,\n };\n console.log('[Wontfix] Debug helpers available on window.__wontfix');\n }\n } catch (error) {\n console.error('[Wontfix] Failed to initialize tooltips:', error);\n }\n }\n\n /**\n * Fetch tooltips (currently using mock data)\n */\n private async fetchTooltips(): Promise<void> {\n if (!this.config) return;\n\n const collections = await this.fetchGuidanceCollections();\n this.guidanceCollections = collections;\n\n if (this.config.debug) {\n const byType: Record<string, number> = {};\n for (const c of collections) {\n const key = String((c as any)?.type ?? 'unknown');\n byType[key] = (byType[key] ?? 0) + 1;\n }\n console.log(`[Wontfix] Loaded ${collections.length} guidance collections`, {\n pathname: window.location.pathname,\n byType,\n sampleUrls: collections.slice(0, 5).map((c) => c?.url),\n });\n }\n\n // Map new API contract -> existing TooltipInstance shape used by TooltipComponent.\n const tooltips: TooltipInstance[] = collections\n .filter((c) => c?.type === 'tooltip')\n .reduce((accumulator, collection) => {\n const pageUrl = this.normalizeUrlToPathPattern(collection.url);\n const elements = Array.isArray(collection.elements) ? collection.elements : [];\n\n for (const el of elements) {\n const position = (el.position ?? 'top') as TooltipInstance['position'];\n const interaction = (el.interaction ?? 'hover') as TooltipInstance['interaction'];\n const text = el.content ?? '';\n\n accumulator.push({\n templateId: 2,\n path: el.selector,\n pageUrl,\n metadata: {\n interaction,\n position,\n text,\n },\n priority: el.order ?? undefined,\n id: `tooltip-${collection.id}-${el.id}`,\n isVisible: false,\n interaction,\n position,\n text,\n } as TooltipInstance);\n }\n\n return accumulator;\n }, [] as TooltipInstance[]);\n \n this.tooltipsSubject.next(tooltips);\n\n this.resetRescan('fetchTooltips');\n this.matchSelectorsToDOM();\n \n // Also initialize beacons\n this.initializeBeacons();\n \n \n // Check for popups on current route\n this.checkPopups();\n // Check for product tours on current route\n this.checkProductTours();\n }\n\n /**\n * Initialize beacons (templateId: 3)\n */\n private initializeBeacons(): void {\n const currentUrl = window.location.pathname;\n const beacons = this.guidanceCollections.filter(\n (c) => c?.type === 'beacon' && this.urlMatches(c.url, currentUrl)\n );\n\n let matched = 0;\n let missing = 0;\n\n beacons.forEach((beacon, collectionIndex) => {\n const elements = Array.isArray(beacon.elements) ? beacon.elements : [];\n\n elements.forEach((beaconElement, elementIndex) => {\n try {\n const element = this.resolveTargetElement(beaconElement.selector);\n if (element instanceof HTMLElement) {\n this.attachBeaconToElement(element, beacon, beaconElement, collectionIndex, elementIndex);\n matched += 1;\n } else {\n missing += 1;\n if (this.config?.debug) {\n console.warn('[Wontfix] Beacon target not found', {\n selector: beaconElement.selector,\n collectionId: beacon.id,\n pathname: currentUrl,\n });\n }\n }\n } catch (error) {\n console.error(`[Wontfix] ERROR matching beacon selector \"${beaconElement.selector}\":`, error);\n }\n });\n });\n\n if (this.config?.debug) {\n console.log('[Wontfix] Beacon DOM match summary', {\n pathname: currentUrl,\n collections: beacons.length,\n matched,\n missing,\n });\n }\n\n if (missing > 0) {\n this.scheduleRescan('beacons-missing');\n }\n }\n\n /**\n * Attach beacon to an element\n */\n private attachBeaconToElement(\n element: HTMLElement,\n beacon: GuidanceCollection,\n beaconElementConfig: GuidanceElement,\n collectionIndex: number,\n elementIndex: number\n ): void {\n const beaconId = `beacon-${beacon.id}-${beaconElementConfig.id ?? `${collectionIndex}-${elementIndex}`}`;\n\n // Prevent duplicates when rescanning/retrying.\n if (this.beaconComponentRefs.has(beaconId)) {\n return;\n }\n\n const componentRef = createComponent(BeaconComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n componentRef.instance.config = {\n position: this.normalizeBeaconPosition(beaconElementConfig.position),\n label: beaconElementConfig.content\n };\n\n this.appRef.attachView(componentRef.hostView);\n const beaconElement = componentRef.location.nativeElement;\n\n // Get parent button group\n const parent = element.parentElement;\n if (parent) {\n parent.style.position = 'relative';\n \n // Calculate button position within parent\n const buttonRect = element.getBoundingClientRect();\n const parentRect = parent.getBoundingClientRect();\n \n const relativeTop = buttonRect.top - parentRect.top;\n const relativeLeft = buttonRect.left - parentRect.left;\n const buttonWidth = buttonRect.width;\n const buttonHeight = buttonRect.height;\n\n // Set beacon position based on position prop\n const position = beaconElementConfig.position;\n let top = relativeTop;\n let left = relativeLeft;\n\n switch (position) {\n case 'top':\n top = relativeTop - 18;\n left = relativeLeft + buttonWidth / 2 - 5;\n break;\n case 'bottom':\n top = relativeTop + buttonHeight + 8;\n left = relativeLeft + buttonWidth / 2 - 5;\n break;\n case 'left':\n top = relativeTop + buttonHeight / 2 - 5;\n left = relativeLeft - 18;\n break;\n case 'right':\n top = relativeTop + buttonHeight / 2 - 5;\n left = relativeLeft + buttonWidth + 8;\n break;\n default:\n break;\n }\n\n beaconElement.style.position = 'absolute';\n beaconElement.style.top = top + 'px';\n beaconElement.style.left = left + 'px';\n \n parent.appendChild(beaconElement);\n } else {\n element.appendChild(beaconElement);\n }\n\n this.beaconElements.set(beaconId, beaconElement);\n this.beaconComponentRefs.set(beaconId, componentRef);\n }\n\n /**\n * Check if current route should show a product tour\n */\n private checkProductTours(): void {\n const currentUrl = window.location.pathname;\n const productTours = this.guidanceCollections.filter(item => \n item?.type === 'product-tour' && this.urlMatches(item.url, currentUrl)\n );\n\n if (productTours.length > 0 && this.config?.debug) {\n console.log('[Wontfix] Product tour found for route:', currentUrl);\n // Product tour will be handled by the ProductTourComponent on that route\n }\n }\n\n /**\n * Get all tooltips for current page\n */\n getTooltipsForCurrentPage(): TooltipInstance[] {\n const currentUrl = window.location.pathname;\n return this.tooltipsSubject.value.filter(tooltip => this.urlMatches(tooltip.pageUrl, currentUrl));\n }\n\n /**\n * Match tooltip paths to actual DOM elements\n */\n private matchSelectorsToDOM(): void {\n const tooltips = this.tooltipsSubject.value;\n const currentUrl = window.location.pathname;\n\n let matched = 0;\n let missing = 0;\n let skippedRoute = 0;\n\n tooltips.forEach((tooltip) => {\n if (!this.urlMatches(tooltip.pageUrl, currentUrl)) {\n skippedRoute += 1;\n return;\n }\n try {\n const element = this.resolveTargetElement(tooltip.path);\n if (element instanceof HTMLElement) {\n tooltip.element = element;\n this.attachTooltipToElement(tooltip);\n matched += 1;\n } else {\n missing += 1;\n if (this.config?.debug) {\n console.warn('[Wontfix] Tooltip target not found', {\n tooltipId: tooltip.id,\n selector: tooltip.path,\n pageUrl: tooltip.pageUrl,\n pathname: currentUrl,\n hint:\n 'If this element is inside a ShadowRoot, document XPath/CSS selectors will not find it. Prefer selectors that target light DOM (or use ::part/::slotted when applicable).',\n });\n }\n }\n } catch (error) {\n console.error(`[Wontfix] ERROR matching path \"${tooltip.path}\":`, error);\n }\n });\n\n if (this.config?.debug) {\n console.log('[Wontfix] Tooltip DOM match summary', {\n pathname: currentUrl,\n total: tooltips.length,\n matched,\n missing,\n skippedRoute,\n rescanAttempt: this.rescanAttempt,\n });\n }\n\n if (missing > 0) {\n this.scheduleRescan('tooltips-missing');\n } else {\n this.resetRescan('all-matched');\n }\n\n this.tooltipsSubject.next(tooltips);\n }\n\n /**\n * Attach tooltip event listeners to an element\n */\n private attachTooltipToElement(tooltip: TooltipInstance): void {\n const element = tooltip.element;\n if (!element) {\n return;\n }\n\n const existingCleanup = this.tooltipListenerCleanup.get(tooltip.id);\n if (existingCleanup) {\n existingCleanup();\n this.tooltipListenerCleanup.delete(tooltip.id);\n }\n\n if (tooltip.interaction === 'hover') {\n const onEnter = () => this.showTooltip(tooltip.id);\n const onLeave = () => this.hideTooltip(tooltip.id);\n element.addEventListener('mouseenter', onEnter);\n element.addEventListener('mouseleave', onLeave);\n this.tooltipListenerCleanup.set(tooltip.id, () => {\n element.removeEventListener('mouseenter', onEnter);\n element.removeEventListener('mouseleave', onLeave);\n });\n } else if (tooltip.interaction === 'click') {\n const onElementClick = (e: Event) => {\n e.stopPropagation();\n const isVisible = this.tooltipsSubject.value.find(t => t.id === tooltip.id)?.isVisible;\n if (isVisible) {\n this.hideTooltip(tooltip.id);\n } else {\n this.showTooltip(tooltip.id);\n }\n };\n\n element.addEventListener('click', onElementClick);\n\n // Close on outside click\n const onDocumentClick = () => this.hideTooltip(tooltip.id);\n document.addEventListener('click', onDocumentClick);\n\n this.tooltipListenerCleanup.set(tooltip.id, () => {\n element.removeEventListener('click', onElementClick);\n document.removeEventListener('click', onDocumentClick);\n });\n }\n }\n\n /**\n * Show tooltip\n */\n private showTooltip(tooltipId: string): void {\n const tooltip = this.tooltipsSubject.value.find(t => t.id === tooltipId);\n if (!tooltip || tooltip.isVisible) return;\n\n tooltip.isVisible = true;\n this.createAndShowTooltip(tooltip);\n this.tooltipsSubject.next(this.tooltipsSubject.value);\n }\n\n /**\n * Create and show tooltip component\n */\n private createAndShowTooltip(tooltip: TooltipInstance): void {\n if (!tooltip.element) {\n return;\n }\n\n // Remove existing tooltip\n this.hideTooltip(tooltip.id);\n\n // Create component\n const componentRef = createComponent(TooltipComponent, {\n environmentInjector: this.appRef.injector,\n elementInjector: this.injector\n });\n\n componentRef.instance.tooltip = tooltip;\n componentRef.instance.close.subscribe(() => {\n this.hideTooltip(tooltip.id);\n });\n\n this.appRef.attachView(componentRef.hostView);\n const tooltipElement = componentRef.location.nativeElement;\n\n document.body.appendChild(tooltipElement);\n this.tooltipElements.set(tooltip.id, tooltipElement);\n this.tooltipComponentRefs.set(tooltip.id, componentRef);\n\n // Position tooltip\n this.positionTooltip(tooltip, tooltipElement);\n }\n\n /**\n * Position tooltip relative to element\n */\n private positionTooltip(tooltip: TooltipInstance, tooltipElement: HTMLElement): void {\n if (!tooltip.element) return;\n\n const rect = tooltip.element.getBoundingClientRect();\n const tooltipRect = tooltipElement.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8;\n\n switch (tooltip.position) {\n case 'top':\n top = rect.top - tooltipRect.height - offset;\n left = rect.left + rect.width / 2 - tooltipRect.width / 2;\n break;\n case 'bottom':\n top = rect.bottom + offset;\n left = rect.left + rect.width / 2 - tooltipRect.width / 2;\n break;\n case 'left':\n top = rect.top + rect.height / 2 - tooltipRect.height / 2;\n left = rect.left - tooltipRect.width - offset;\n break;\n case 'right':\n top = rect.top + rect.height / 2 - tooltipRect.height / 2;\n left = rect.right + offset;\n break;\n }\n\n // Don't add scroll offset for position: fixed elements\n // Fixed positioning is relative to viewport, not document\n \n // Set position on component instance\n const componentInstance = this.tooltipComponentRefs.get(tooltip.id)?.instance;\n if (componentInstance) {\n componentInstance.top = top;\n componentInstance.left = left;\n }\n }\n\n /**\n * Hide tooltip\n */\n private hideTooltip(tooltipId: string): void {\n const tooltip = this.tooltipsSubject.value.find(t => t.id === tooltipId);\n if (tooltip) {\n tooltip.isVisible = false;\n }\n\n const componentRef = this.tooltipComponentRefs.get(tooltipId);\n const tooltipElement = this.tooltipElements.get(tooltipId);\n\n if (componentRef) {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n this.tooltipComponentRefs.delete(tooltipId);\n }\n\n if (tooltipElement && tooltipElement.parentNode) {\n tooltipElement.parentNode.removeChild(tooltipElement);\n this.tooltipElements.delete(tooltipId);\n }\n\n this.tooltipsSubject.next(this.tooltipsSubject.value);\n }\n\n private closeAllTooltips(): void {\n for (const tooltipId of Array.from(this.tooltipComponentRefs.keys())) {\n const tooltip = this.tooltipsSubject.value.find(t => t.id === tooltipId);\n if (tooltip) {\n tooltip.isVisible = false;\n }\n\n const componentRef = this.tooltipComponentRefs.get(tooltipId);\n const tooltipElement = this.tooltipElements.get(tooltipId);\n\n if (componentRef) {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n }\n if (tooltipElement && tooltipElement.parentNode) {\n tooltipElement.parentNode.removeChild(tooltipElement);\n }\n }\n\n this.tooltipComponentRefs.clear();\n this.tooltipElements.clear();\n this.tooltipsSubject.next(this.tooltipsSubject.value);\n }\n\n private detachAllTooltipListeners(): void {\n this.tooltipListenerCleanup.forEach((cleanup) => cleanup());\n this.tooltipListenerCleanup.clear();\n }\n\n /**\n * Re-scan DOM for new elements (useful for dynamically added content)\n */\n rescanDOM(): void {\n this.matchSelectorsToDOM();\n this.initializeBeacons();\n }\n\n /**\n * Update tooltip visibility\n */\n setTooltipVisible(tooltipId: string, visible: boolean): void {\n const tooltips = this.tooltipsSubject.value.map(t => \n t.id === tooltipId ? { ...t, isVisible: visible } : t\n );\n this.tooltipsSubject.next(tooltips);\n }\n\n /**\n * Check if page URL matches the tooltip's pageUrl pattern\n * Supports:\n * - Exact match: \"/dashboard\"\n * - Wildcard: \"/dashboard/*\"\n * - All pages: \"*\"\n */\n private urlMatches(pattern: string, currentUrl: string): boolean {\n const normalizedPattern = this.normalizeUrlToPathPattern(pattern);\n const normalizedCurrent = this.normalizeUrlToPathPattern(currentUrl);\n\n if (normalizedPattern === '*') return true;\n if (normalizedPattern === normalizedCurrent) return true;\n\n // Handle wildcard patterns like \"/dashboard/*\"\n const regexPattern = normalizedPattern\n .replace(/\\//g, '\\\\/')\n .replace(/\\*/g, '.*');\n\n try {\n return new RegExp(`^${regexPattern}$`).test(normalizedCurrent);\n } catch {\n return false;\n }\n }\n\n /**\n * Get tooltip by ID\n */\n getTooltipById(id: string): TooltipInstance | undefined {\n return this.tooltipsSubject.value.find(t => t.id === id);\n }\n\n /**\n * Get all available tooltips (for debugging)\n */\n getAvailableTooltips(): string[] {\n return this.tooltipsSubject.value.map(t => t.id);\n }\n\n /**\n * Get product tour data for current route\n */\n getProductTourForRoute(route: string): any {\n const productTour = this.guidanceCollections.find(item =>\n item?.type === 'product-tour' && this.urlMatches(item.url, route)\n );\n return productTour;\n }\n\n /**\n * Reinitialize tooltips and beacons (useful when navigating back to a route)\n */\n reinitializeTooltips(): void {\n this.closeAllTooltips();\n this.closeNavFlow();\n this.closePopup();\n this.detachAllTooltipListeners();\n this.resetRescan('reinitializeTooltips');\n\n // Clear existing beacons\n this.beaconComponentRefs.forEach(ref => {\n this.appRef.detachView(ref.hostView);\n ref.destroy();\n });\n this.beaconComponentRefs.clear();\n this.beaconElements.forEach(el => {\n if (el && el.parentNode) {\n el.parentNode.removeChild(el);\n }\n });\n this.beaconElements.clear();\n\n // Reinitialize beacons\n this.initializeBeacons();\n \n // Rematch tooltips to DOM\n this.matchSelectorsToDOM();\n\n this.checkPopups();\n this.checkProductTours();\n }\n\n /**\n * Start a nav-flow for the current page\n */\n startNavFlow(): void {\n const currentUrl = window.location.pathname;\n const navFlow = this.guidanceCollections.find(item => \n item?.type === 'nav-flow' && this.urlMatches(item.url, currentUrl)\n );\n\n if (!navFlow || !navFlow.metadata.steps) {\n console.warn('[Wontfix] No nav-flow found for current page');\n return;\n }\n\n this.navFlowData = navFlow;\n this.currentNavFlowStep = 0;\n this.showNavFlowStep(0);\n }\n\n /**\n * Show a specific nav-flow step\n */\n private showNavFlowStep(stepIndex: number): void {\n if (!this.navFlowData) return;\n\n const steps = this.navFlowData.metadata.steps;\n if (stepIndex < 0 || stepIndex >= steps.length) return;\n\n // Clean up existing nav-flow component without resetting state\n if (this.navFlowComponentRef) {\n this.appRef.detachView(this.navFlowComponentRef.hostView);\n this.navFlowComponentRef.destroy();\n this.navFlowComponentRef = null;\n }\n if (this.navFlowElement && this.navFlowElement.parentNode) {\n this.navFlowElement.parentNode.removeChild(this.navFlowElement);\n this.navFlowElement = null;\n }\n\n const step = steps[stepIndex];\n this.currentNavFlowStep = stepIndex;\n\n try {\n const element = this.resolveTargetElement(step.path);\n if (element instanceof HTMLElement) {\n this.createAndShowNavFlow(element, step, stepIndex + 1, steps.length);\n }\n } catch (error) {\n console.error(`[Wontfix] ERROR finding element for nav-flow step:`, error);\n }\n }\n\n /**\n * Create and show nav-flow component\n */\n private createAndShowNavFlow(element: HTMLElement, step: NavFlowStep, currentStep: number, totalSteps: number): void {\n const componentRef = createComponent(NavFlowComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n componentRef.instance.step = step;\n componentRef.instance.currentStep = currentStep;\n componentRef.instance.totalSteps = totalSteps;\n \n this.appRef.attachView(componentRef.hostView);\n const navFlowElement = componentRef.location.nativeElement;\n\n document.body.appendChild(navFlowElement);\n this.navFlowElement = navFlowElement;\n this.navFlowComponentRef = componentRef;\n\n // Position nav-flow\n this.positionNavFlow(element, step, navFlowElement, componentRef);\n\n // Subscribe to events after setting refs\n componentRef.instance.next.subscribe(() => {\n this.nextNavFlowStep();\n });\n componentRef.instance.previous.subscribe(() => {\n this.previousNavFlowStep();\n });\n componentRef.instance.close.subscribe(() => {\n this.closeNavFlow();\n });\n }\n\n /**\n * Position nav-flow relative to element\n */\n private positionNavFlow(element: HTMLElement, step: NavFlowStep, navFlowElement: HTMLElement, componentRef: any): void {\n const rect = element.getBoundingClientRect();\n const navFlowRect = navFlowElement.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const offset = 8;\n \n // Use actual dimensions or fallback if not rendered yet\n const navFlowWidth = navFlowRect.width || 350;\n const navFlowHeight = navFlowRect.height || 200; // Approximate height\n\n switch (step.position) {\n case 'top':\n top = rect.top - navFlowHeight - offset;\n left = rect.left + rect.width / 2 - navFlowWidth / 2;\n break; \n case 'bottom':\n top = rect.bottom + offset;\n left = rect.left + rect.width / 2 - navFlowWidth / 2;\n break;\n case 'left':\n top = rect.top + rect.height / 2 - navFlowHeight / 2;\n left = rect.left - navFlowWidth - offset;\n break;\n case 'right':\n top = rect.top + rect.height / 2 - navFlowHeight / 2;\n left = rect.right + offset;\n break;\n }\n\n componentRef.instance.top = top;\n componentRef.instance.left = left;\n }\n\n /**\n * Go to next nav-flow step\n */\n private nextNavFlowStep(): void {\n this.showNavFlowStep(this.currentNavFlowStep + 1);\n }\n\n /**\n * Go to previous nav-flow step\n */\n private previousNavFlowStep(): void {\n this.showNavFlowStep(this.currentNavFlowStep - 1);\n }\n\n /**\n * Close nav-flow\n */\n closeNavFlow(): void {\n if (this.navFlowComponentRef) {\n this.appRef.detachView(this.navFlowComponentRef.hostView);\n this.navFlowComponentRef.destroy();\n this.navFlowComponentRef = null;\n }\n\n if (this.navFlowElement && this.navFlowElement.parentNode) {\n this.navFlowElement.parentNode.removeChild(this.navFlowElement);\n this.navFlowElement = null;\n }\n\n this.navFlowData = null;\n this.currentNavFlowStep = 0;\n }\n\n /**\n * Check if current route should show a popup\n */\n private checkPopups(): void {\n const currentUrl = window.location.pathname;\n const popup = this.guidanceCollections.find(item => \n item?.type === 'popup' && this.urlMatches(item.url, currentUrl)\n );\n\n if (popup && this.config?.debug) {\n console.log('[Wontfix] Popup found for route:', currentUrl);\n // Popup will be handled by the PopupComponent on that route\n }\n }\n\n /**\n * Get popup data for current route\n */\n getPopupForRoute(route: string): any {\n const popup = this.guidanceCollections.find(item => \n item?.type === 'popup' && this.urlMatches(item.url, route)\n );\n return popup;\n }\n\n private setupRouteListener(): void {\n if (this.routeSubscription || this.windowRouteListenersAttached) {\n return;\n }\n\n if (this.router) {\n this.routeSubscription = this.router.events.subscribe((event) => {\n if (event instanceof NavigationEnd) {\n this.onRouteChanged();\n }\n });\n return;\n }\n\n window.addEventListener('popstate', this.onRouteChanged);\n window.addEventListener('hashchange', this.onRouteChanged);\n this.windowRouteListenersAttached = true;\n }\n\n private onRouteChanged = async (): Promise<void> => {\n try {\n await firstValueFrom(\n this.appRef.isStable.pipe(\n filter(stable => stable === true),\n take(1)\n )\n );\n this.reinitializeTooltips();\n } catch (error) {\n if (this.config?.debug) {\n console.warn('[Wontfix] Route-change reinit failed:', error);\n }\n }\n };\n\n private async fetchGuidanceCollections(): Promise<GuidanceCollection[]> {\n const fallbackToMock = this.config?.fallbackToMock ?? true;\n\n try {\n if (!this.config?.apiUrl) {\n return fallbackToMock ? this.normalizeGuidanceCollections(MOCK_TOOLTIPS as any[]) : [];\n }\n\n const hasPayload = this.config.payload !== undefined;\n\n if (this.config.debug) {\n console.log('[Wontfix] Fetching guidance collections...', {\n url: this.config.apiUrl,\n method: hasPayload ? 'POST' : 'GET'\n });\n }\n\n const response = await fetch(this.config.apiUrl, {\n method: hasPayload ? 'POST' : 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: hasPayload ? JSON.stringify(this.config.payload) : undefined,\n });\n\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}`);\n }\n\n const json = await response.json();\n const raw = Array.isArray(json)\n ? json\n : Array.isArray(json?.data)\n ? json.data\n : Array.isArray(json?.items)\n ? json.items\n : [];\n\n if (this.config.debug) {\n console.log('[Wontfix] Guidance collections fetched', {\n status: json?.status,\n count: Array.isArray(raw) ? raw.length : 0\n });\n }\n\n return this.normalizeGuidanceCollections(raw);\n } catch (error) {\n console.error('[Wontfix] Failed to fetch guidance elements:', error);\n return fallbackToMock ? this.normalizeGuidanceCollections(MOCK_TOOLTIPS as any[]) : [];\n }\n }\n\n private async waitForAngularStability(timeoutMs: number): Promise<void> {\n try {\n await Promise.race([\n firstValueFrom(\n this.appRef.isStable.pipe(\n filter(stable => stable === true),\n take(1)\n )\n ),\n new Promise<void>((resolve) => setTimeout(resolve, timeoutMs)),\n ]);\n\n if (this.config?.debug) {\n console.log('[Wontfix] Stability wait finished');\n }\n } catch {\n // Never block initialization on stability failures.\n }\n }\n\n private normalizeGuidanceCollections(raw: any[]): GuidanceCollection[] {\n if (!Array.isArray(raw)) return [];\n const result: GuidanceCollection[] = [];\n\n let skippedInactive = 0;\n let skippedInvalidShape = 0;\n let normalizedFromLegacy = 0;\n let normalizedFromElementLevel = 0;\n\n raw.forEach((item, index) => {\n if (item && typeof item === 'object') {\n const candidateType = typeof item.type === 'string' ? item.type : undefined;\n const candidateUrl =\n typeof item.url === 'string'\n ? item.url\n : typeof item.pageUrl === 'string'\n ? item.pageUrl\n : undefined;\n\n // New contract: already a collection.\n if (candidateType && candidateUrl) {\n if (item.isActive === false) {\n skippedInactive += 1;\n return;\n }\n\n const normalized: GuidanceCollection = {\n ...(item as any),\n type: candidateType,\n url: candidateUrl,\n };\n\n if (Array.isArray(normalized.elements)) {\n normalized.elements = normalized.elements.filter((el: any) => el?.isActive !== false);\n }\n\n result.push(normalized);\n return;\n }\n\n // Newer contract variant: type/url live on each element, not the collection.\n // We \"lift\" them up by grouping active elements by (type,url).\n if (Array.isArray(item.elements)) {\n if (item.isActive === false) {\n skippedInactive += 1;\n return;\n }\n\n const activeElements = item.elements.filter((el: any) => el?.isActive !== false);\n if (activeElements.length === 0) {\n skippedInvalidShape += 1;\n return;\n }\n\n const groups = new Map<string, GuidanceCollection>();\n\n for (const el of activeElements) {\n const elType = typeof el?.type === 'string' ? (el.type as string) : undefined;\n const elUrl = typeof el?.url === 'string' ? (el.url as string) : undefined;\n const elSelector = typeof el?.selector === 'string' ? el.selector : undefined;\n\n if (!elType || !elUrl || !elSelector) {\n skippedInvalidShape += 1;\n continue;\n }\n\n const key = `${elType}@@${elUrl}`;\n let collection = groups.get(key);\n if (!collection) {\n collection = {\n id: item.id ?? `collection-${index}`,\n type: elType,\n url: elUrl,\n elements: [],\n };\n groups.set(key, collection);\n }\n\n collection.elements!.push({\n id: el.id ?? `${collection.id}-el-${collection.elements!.length}`,\n selector: elSelector,\n position: el.position,\n order: el.order,\n content: el.content,\n interaction: el.interaction,\n });\n }\n\n for (const collection of groups.values()) {\n normalizedFromElementLevel += 1;\n result.push(collection);\n }\n\n return;\n }\n }\n\n if (item && typeof item === 'object' && typeof item.templateId === 'number') {\n const templateId = item.templateId as number;\n const type: GuidanceCollectionType =\n templateId === 2 ? 'tooltip' :\n templateId === 3 ? 'beacon' :\n templateId === 1 ? 'product-tour' :\n templateId === 4 ? 'nav-flow' :\n templateId === 5 ? 'popup' :\n 'unknown';\n\n normalizedFromLegacy += 1;\n result.push({\n id: item.id ?? `legacy-${templateId}-${index}`,\n type,\n url: item.pageUrl ?? '*',\n elements: [\n {\n id: item.elements?.[0]?.id ?? `legacy-el-${index}`,\n selector: item.path ?? item.selector,\n position: item.metadata?.position,\n interaction: item.metadata?.interaction,\n content: item.metadata?.text,\n order: item.priority ?? item.order ?? item.elements?.[0]?.order,\n },\n ],\n metadata: item.metadata,\n });\n return;\n }\n\n skippedInvalidShape += 1;\n });\n\n if (this.config?.debug) {\n console.log('[Wontfix] Normalization summary', {\n rawCount: raw.length,\n loadedCount: result.length,\n skippedInactive,\n skippedInvalidShape,\n normalizedFromLegacy,\n normalizedFromElementLevel,\n sampleRawKeys: raw[0] && typeof raw[0] === 'object' ? Object.keys(raw[0]) : undefined,\n });\n }\n\n return result;\n }\n\n private resolveTargetElement(selectorOrPath: string): HTMLElement | null {\n if (!selectorOrPath) return null;\n\n // XPath selectors (new contract) e.g. \"/html/body/.../div[2]\"\n if (selectorOrPath.startsWith('/') || selectorOrPath.startsWith('(')) {\n const xPathMatch = PathMatcher.findElementByXPath(selectorOrPath);\n if (xPathMatch) return xPathMatch;\n\n if (this.config?.debug) {\n console.warn('[Wontfix] XPath did not match any element', { selector: selectorOrPath });\n }\n }\n\n if (selectorOrPath.includes('/')) {\n return PathMatcher.findElementByPath(selectorOrPath);\n }\n\n try {\n const element = document.querySelector(selectorOrPath);\n return element instanceof HTMLElement ? element : null;\n } catch {\n return PathMatcher.findElementByPath(selectorOrPath);\n }\n }\n\n private normalizeBeaconPosition(position: GuidanceElement['position']): 'top' | 'right' | 'bottom' | 'left' {\n switch (position) {\n case 'right':\n case 'left':\n case 'top':\n case 'bottom':\n return position;\n default:\n if (typeof position === 'string' && position.includes('right')) return 'right';\n if (typeof position === 'string' && position.includes('left')) return 'left';\n if (typeof position === 'string' && position.includes('bottom')) return 'bottom';\n return 'top';\n }\n }\n\n private resetRescan(reason: string): void {\n if (this.rescanTimer !== null) {\n window.clearTimeout(this.rescanTimer);\n this.rescanTimer = null;\n }\n if (this.rescanAttempt !== 0 && this.config?.debug) {\n console.log('[Wontfix] Rescan reset', { reason });\n }\n this.rescanAttempt = 0;\n }\n\n private scheduleRescan(reason: string): void {\n if (!this.config) return;\n if (this.rescanTimer !== null) return;\n\n const attempt = this.rescanAttempt;\n if (attempt >= this.rescanDelaysMs.length) {\n if (this.config.debug) {\n console.warn('[Wontfix] Giving up on rescans', { reason, attempts: attempt });\n }\n return;\n }\n\n const delay = this.rescanDelaysMs[Math.min(attempt, this.rescanDelaysMs.length - 1)];\n this.rescanAttempt += 1;\n\n if (this.config.debug) {\n console.log('[Wontfix] Scheduling rescan', { reason, attempt, delay, pathname: window.location.pathname });\n }\n\n this.rescanTimer = window.setTimeout(() => {\n this.rescanTimer = null;\n this.rescanDOM();\n }, delay);\n }\n\n private normalizeUrlToPathPattern(value: string): string {\n if (!value) return '';\n if (value === '*') return '*';\n if (value.startsWith('/')) {\n return value;\n }\n\n try {\n const parsed = new URL(value);\n return parsed.pathname || '/';\n } catch {\n return value;\n }\n }\n\n /**\n * Close popup\n */\n closePopup(): void {\n this.popupOpen = false;\n if (this.popupComponentRef) {\n this.appRef.detachView(this.popupComponentRef.hostView);\n this.popupComponentRef.destroy();\n this.popupComponentRef = null;\n }\n\n if (this.popupElement && this.popupElement.parentNode) {\n this.popupElement.parentNode.removeChild(this.popupElement);\n this.popupElement = null;\n }\n }\n\n /**\n * Check if popup is open\n */\n isPopupOpen(): boolean {\n return this.popupOpen;\n }\n}\n","import { inject } from '@angular/core';\nimport { TooltipService } from './tooltip.service';\nimport type { TooltipConfig } from './tooltip.service';\n\n/*\n * Tooltips are fetched once on app load.\n * Updates are only available on next app reload.\n */\nexport function wontfixInitializer(config: TooltipConfig) {\n return () => {\n const tooltipService = inject(TooltipService);\n return tooltipService.initializeTooltips(config);\n };\n}\n","/**\n * Wontfix Tooltip SDK - Public API\n * \n * This is the main entry point for applications using the Wontfix SDK.\n * Export only the public-facing APIs that consumers should use.\n */\n\nexport { TooltipService } from './tooltip.service';\nexport type { TooltipConfig } from './tooltip.service';\nexport { wontfixInitializer } from './tooltip.initializer';\nexport type { Tooltip, TooltipInstance } from './tooltip.model';\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-wontfix-sdk',\n imports: [],\n template: `\n <p>\n wontfix-sdk works!\n </p>\n `,\n styles: ``,\n})\nexport class WontfixSdk {\n\n}\n","/*\n * Public API Surface of wontfix-sdk\n */\n\n// Main SDK surface (service + initializer + types)\nexport * from './lib/index';\n\n// Optional: keep the generated demo component exported\nexport * from './lib/wontfix-sdk';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;AAKG;AAEI,MAAM,aAAa,GAAG;AAC3B,IAAA;AACE,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,IAAI,EAAE,6EAA6E;AACnF,QAAA,OAAO,EAAE,GAAG;AACZ,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AACG,SAAU,kBAAkB,CAAC,MAAqB,EAAA;AACtD,IAAA,OAAO,MAAK;AACV,QAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7C,QAAA,OAAO,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC;AAClD,IAAA,CAAC;AACH;;ACbA;;;;;AAKG;;MCOU,UAAU,CAAA;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPX;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,UAAU,EAAA,UAAA,EAAA,CAAA;kBAVtB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,EAAE,EAAA,QAAA,EACD;;;;AAIT,EAAA,CAAA,EAAA;;;ACTH;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wontfix-sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0",
@@ -40,6 +40,9 @@ declare class TooltipService {
40
40
  private tooltipsSubject;
41
41
  private config;
42
42
  private guidanceCollections;
43
+ private rescanAttempt;
44
+ private rescanTimer;
45
+ private readonly rescanDelaysMs;
43
46
  private tooltipComponentRefs;
44
47
  private tooltipElements;
45
48
  private tooltipListenerCleanup;
@@ -180,6 +183,9 @@ declare class TooltipService {
180
183
  private waitForAngularStability;
181
184
  private normalizeGuidanceCollections;
182
185
  private resolveTargetElement;
186
+ private normalizeBeaconPosition;
187
+ private resetRescan;
188
+ private scheduleRescan;
183
189
  private normalizeUrlToPathPattern;
184
190
  /**
185
191
  * Close popup