{"version":3,"file":"angular-tag-cloud-module.mjs","sources":["../../../projects/angular-tag-cloud-module/src/lib/tag-cloud.component.ts","../../../projects/angular-tag-cloud-module/src/public-api.ts","../../../projects/angular-tag-cloud-module/src/angular-tag-cloud-module.ts"],"sourcesContent":["import {\n  Component,\n  ElementRef,\n  Renderer2,\n  HostListener,\n  input,\n  output,\n  effect,\n  inject,\n  model,\n  computed,\n  ChangeDetectionStrategy\n} from '@angular/core';\n\nimport {\n  CloudData,\n  CloudOptions,\n  ZoomOnHoverOptions,\n} from './tag-cloud.interfaces';\n\ninterface CloudOptionsInternal extends CloudOptions {\n  /**\n   * setting the aspect ratio. This value is calculated by the given width and height\n   */\n  aspectRatio: number;\n  center: {\n    x: number;\n    y: number;\n  };\n}\n\nconst DEFAULT_HEIGHT = 400;\nconst DEFAULT_WIDTH = 1;\nconst DEFAULT_STEP = 1;\n\n@Component({\n  standalone: true,\n  selector: 'angular-tag-cloud, ng-tag-cloud, ngtc',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: '',\n  styleUrls: ['./tag-cloud.component.scss'],\n})\nexport class TagCloudComponent {\n  data = input<CloudData[]>([]);\n  width = input<number>();\n  height = input<number>();\n  step = input<number>();\n  overflow = input<boolean>();\n  strict = input<boolean>();\n  zoomOnHover = input<ZoomOnHoverOptions>();\n  realignOnResize = input<boolean>();\n  randomizeAngle = input<boolean>();\n  background = input<string>();\n  font = input<string>();\n  delay = input<number>();\n  config = input<CloudOptions>({});\n  log = input<'warn' | 'debug' | false>();\n\n  clicked = output<CloudData>();\n  // dataChanges = output<SimpleChanges>();\n  afterInit = output<void>();\n  afterChecked = output<void>();\n\n  private localConfig = computed(() => {\n    const config = this.config()\n    const localConfig: CloudOptions = {\n      ...config, // override default width params in config object\n      width: this.width() || config.width || 500,\n      height: this.height() || config.height || 300,\n      overflow: this.overflow() ?? (config.overflow || true),\n      strict: this.strict() ?? (config.strict || false),\n      zoomOnHover: this.zoomOnHover() || config.zoomOnHover || {\n        transitionTime: 0,\n        scale: 1,\n        delay: 0,\n      },\n      realignOnResize: this.realignOnResize() ?? (config.realignOnResize || false),\n      randomizeAngle: this.randomizeAngle() ?? (config.randomizeAngle || false),\n      step: this.step() || config.step || 2.0,\n      log: this.log() || config.log || false,\n      delay: this.delay() || config.delay,\n      background: this.background() || config.background,\n      font: this.font() || config.font\n    };\n    return localConfig;\n  });\n\n  public cloudDataHtmlElements: HTMLElement[] = [];\n  private dataArr: CloudData[] = [];\n\n  private options!: CloudOptionsInternal;\n  private timeoutId: number | undefined;\n\n  get calculatedWidth(): number {\n    let width = this.localConfig().width || this.width() || DEFAULT_WIDTH;\n    if (\n      this.el.nativeElement.parentNode.offsetWidth > 0 &&\n      width <= 1 &&\n      width > 0\n    ) {\n      width = this.el.nativeElement.parentNode.offsetWidth * width;\n    }\n    return width;\n  }\n\n  get calculatedHeight(): number {\n    let height = this.localConfig().height || this.height() || DEFAULT_HEIGHT;\n    if (\n      this.el.nativeElement.parentNode.offsetHeight > 0 &&\n      height <= 1 &&\n      height > 0\n    ) {\n      height = this.el.nativeElement.parentNode.offsetHeight * height;\n    }\n    return height;\n  }\n\n  private el = inject(ElementRef);\n  private r2 = inject(Renderer2);\n\n  @HostListener('window:resize', ['$event']) onResize(event: any) {\n    this.logMessage('debug', 'rezisze triggered');\n    window.clearTimeout(this.timeoutId);\n    this.timeoutId = window.setTimeout(() => {\n      if (this.options.realignOnResize) {\n        this.reDraw();\n      }\n    }, 200);\n  }\n\n  constructor() {\n    const el = this.el.nativeElement;\n    effect(() => {\n      // this.logMessage('debug', 'ngOnChanges fired', changes);\n      // set default values\n      const config = this.localConfig();\n      this.logMessage('warn', 'cloud configuration', config);\n\n      // set the basic font style if property is provided\n      if (config.font) {\n        this.r2.setStyle(el, 'font', config.font);\n      }\n\n      // set a background image if property is provided\n      if (config.background) {\n        this.r2.setStyle(el, 'background', config.background);\n      }\n      this.reDraw();\n    });\n  }\n\n  // ngAfterContentInit() {\n  //   this.afterInit?.emit();\n  //   this.logMessage('debug', 'afterInit emitted');\n  // }\n\n  // ngAfterContentChecked() {\n  //   this.afterChecked?.emit();\n  //   this.logMessage('debug', 'afterChecked emitted');\n  // }\n\n  /**\n   * re-draw the word cloud\n   * @param changes the change set\n   */\n  reDraw() {\n    // this.dataChanges?.emit(changes);\n    this.afterChecked?.emit();\n    this.logMessage('debug', 'dataChanges emitted');\n    this.cloudDataHtmlElements = [];\n\n    // check if data is not null or empty\n    if (!this.data()) {\n      console.error(\n        'angular-tag-cloud: No data passed. Please pass an Array of CloudData',\n      );\n      return;\n    }\n\n    // values changed, reset cloud\n    this.el.nativeElement.innerHTML = '';\n\n    // set value changes\n    if (this.data()) {\n      this.dataArr = this.data();\n    }\n\n    // set options\n    this.options = {\n      ...this.localConfig(),\n      aspectRatio: this.calculatedWidth / this.calculatedHeight,\n      width: this.calculatedWidth,\n      height: this.calculatedHeight,\n      center: {\n        x: this.calculatedWidth / 2.0,\n        y: this.calculatedHeight / 2.0,\n      },\n    };\n\n    // set the dimensions\n    this.r2.setStyle(this.el.nativeElement, 'width', this.options.width + 'px');\n    this.r2.setStyle(\n      this.el.nativeElement,\n      'height',\n      this.options.height + 'px',\n    );\n\n    // draw the cloud\n    this.drawWordCloud();\n    this.logMessage('debug', 'reDraw finished');\n  }\n\n  /**\n   * helper to generate a descriptive string for an entry to use when sorting alphabetically\n   * @param entry the cloud entry to be used\n   */\n  private descriptiveEntry(entry: CloudData): string {\n    let description = entry.text;\n    description += entry.color ? `-${entry.color}` : '';\n    description += entry.external ? `-${entry.external}` : '';\n    description += entry.link ? `-${entry.link}` : '';\n    description += entry.rotate ? `-${entry.rotate}` : '';\n    return description;\n  }\n\n  /**\n   * proceed draw the cloud\n   */\n  private drawWordCloud() {\n    // Sort alphabetically to ensure that, all things being equal, words are placed uniformly\n    this.dataArr.sort((a, b) =>\n      this.descriptiveEntry(a).localeCompare(this.descriptiveEntry(b)),\n    );\n    // Sort this._dataArr from the word with the highest weight to the one with the lowest\n    this.dataArr.sort((a, b) => b.weight - a.weight);\n    // place fixed elements first\n    const elementsWithFixedPositions = this.dataArr.filter(\n      (item) => item.position,\n    );\n    const elementsWithRandomPositions = this.dataArr.filter(\n      (item) => !item.position,\n    );\n    elementsWithFixedPositions.forEach((elem, index) => {\n      this.drawWord(index, elem);\n    });\n    elementsWithRandomPositions.forEach((elem, index) => {\n      this.drawWord(index, elem);\n    });\n  }\n\n  /**\n   * Helper function to test if an element overlaps others\n   * @param rect the DOM rectangle that represents the element's bounds\n   */\n  private hitTest(rect: DOMRect): boolean {\n    // Check elements for overlap one by one, stop and return false as soon as an overlap is found\n    for (const item of this.cloudDataHtmlElements) {\n      if (this.overlapping(rect, item)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Pairwise overlap detection\n   * @param rect the DOM rectangle that represents the element's bounds\n   * @param e2 the second element for overlap detection\n   */\n  private overlapping(rect: DOMRect, e2: HTMLElement) {\n    const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = e2;\n    const offsetRight = offsetLeft + offsetWidth;\n    const offsetBottom = offsetTop + offsetHeight;\n\n    const overlap = !(\n      rect.right < offsetLeft ||\n      rect.left > offsetRight ||\n      rect.bottom < offsetTop ||\n      rect.top > offsetBottom\n    );\n    return overlap;\n  }\n\n  /**\n   * Check if min(weight) > max(weight) otherwise use default\n   * @param word the particular word configuration\n   */\n  private getWeightForWord(word: CloudData): number {\n    let weight = 5;\n    if (this.dataArr[0].weight > this.dataArr[this.dataArr.length - 1].weight) {\n      // check if strict mode is active\n      if (!this.options.strict) {\n        // Linearly map the original weight to a discrete scale from 1 to 10\n        weight =\n          Math.round(\n            ((word.weight - this.dataArr[this.dataArr.length - 1].weight) /\n              (this.dataArr[0].weight -\n                this.dataArr[this.dataArr.length - 1].weight)) *\n            9.0,\n          ) + 1;\n      } else {\n        // use given value for weigth directly\n        // fallback to 10\n        if (word.weight > 10) {\n          weight = 10;\n          this.logMessage(\n            'warn',\n            `[TagCloud strict] Weight property ${word.weight} > 10. Fallback to 10 as you are using strict mode`,\n            word,\n          );\n        } else if (word.weight < 1) {\n          // fallback to 1\n          weight = 1;\n          this.logMessage(\n            'warn',\n            `[TagCloud strict] Given weight property ${word.weight} < 1. Fallback to 1 as you are using strict mode`,\n            word,\n          );\n        } else if (word.weight % 1 !== 0) {\n          // round if given value is not an integer\n          weight = Math.round(word.weight);\n          this.logMessage(\n            'warn',\n            `[TagCloud strict] Given weight property ${word.weight} is not an integer. Rounded value to ${weight}`,\n            word,\n          );\n        } else {\n          weight = word.weight;\n        }\n      }\n    }\n    return weight;\n  }\n\n  /**\n   * change the HTMLElements color style\n   * @param el the HTML element\n   * @param color the CSS color value\n   */\n  private setWordColor(el: HTMLElement, color: string) {\n    this.r2.setStyle(el, 'color', color);\n  }\n\n  /**\n   * Add a tooltip to the element\n   * @param el the HTML element\n   * @param tooltip the tooltip text\n   */\n  private setTooltip(el: HTMLElement, tooltip: string) {\n    this.r2.addClass(el, 'tooltip');\n    const tooltipSpan = this.r2.createElement('span');\n    tooltipSpan.className = 'tooltiptext';\n    const text = this.r2.createText(tooltip);\n    tooltipSpan.appendChild(text);\n    el.appendChild(tooltipSpan);\n  }\n\n  /**\n   * change the HTMLElements rotation style\n   * @param el the HTML element\n   * @param deg the rotation value (degrees)\n   */\n  private setWordRotation(el: HTMLElement, deg?: number): string {\n    const transformString = deg ? `rotate(${deg}deg)` : '';\n    this.r2.setStyle(el, 'transform', transformString);\n    return transformString;\n  }\n\n  /**\n   * wrap the given node into an HTML anchor element\n   * @param node the HTML node that should be wrapped\n   * @param word the particular word configuration\n   */\n  private wrapNodeIntoAnchorElement(\n    node: HTMLElement,\n    word: CloudData,\n  ): HTMLAnchorElement {\n    const wordLink: HTMLAnchorElement = this.r2.createElement('a');\n    wordLink.href = word.link || '';\n\n    if (word.external !== undefined && word.external) {\n      wordLink.target = '_blank';\n    }\n\n    wordLink.appendChild(node);\n    return wordLink;\n  }\n\n  /**\n   * wrap the given node into an HTML anchor element\n   * @param node the HTML node that should be wrapped\n   * @param word the particular word configuration\n   */\n  private applyZoomStyle(\n    node: HTMLElement,\n    el: HTMLElement,\n    link: string | undefined,\n    transformString: string,\n  ) {\n    if (this.options.zoomOnHover && this.options.zoomOnHover.scale !== 1) {\n      if (!this.options.zoomOnHover.transitionTime) {\n        this.options.zoomOnHover.transitionTime = 0;\n      }\n      if (!this.options.zoomOnHover.scale) {\n        this.options.zoomOnHover.scale = 1;\n      }\n\n      el.onmouseover = () => {\n        if (this.options.zoomOnHover?.transitionTime) {\n          this.r2.setStyle(\n            el,\n            'transition',\n            `transform ${this.options.zoomOnHover.transitionTime}s`,\n          );\n        }\n        if (this.options.zoomOnHover?.scale) {\n          this.r2.setStyle(\n            el,\n            'transform',\n            `scale(${this.options.zoomOnHover.scale}) ${transformString}`,\n          );\n        }\n        if (this.options.zoomOnHover?.delay) {\n          this.r2.setStyle(\n            el,\n            'transition-delay',\n            `${this.options.zoomOnHover.delay}s`,\n          );\n        }\n        if (this.options.zoomOnHover?.color) {\n          link\n            ? this.r2.setStyle(node, 'color', this.options.zoomOnHover.color)\n            : this.r2.setStyle(el, 'color', this.options.zoomOnHover.color);\n        }\n      };\n\n      el.onmouseout = () => {\n        this.r2.setStyle(el, 'transform', `none ${transformString}`);\n        if (this.options.zoomOnHover?.color) {\n          link\n            ? this.r2.removeStyle(node, 'color')\n            : this.r2.removeStyle(el, 'color');\n        }\n      };\n    }\n  }\n\n  /**\n   * Place the word at a calculated position\n   * @param wordSpan The HTML Span element to be placed\n   * @param word The word to be placed\n   * @param index The index of the element\n   */\n  private setPosition(\n    wordSpan: HTMLSpanElement,\n    word: CloudData,\n    index: number,\n  ) {\n    let angle = this.options.randomizeAngle ? 6.28 * Math.random() : 0;\n    let radius = 0;\n    // Save a reference to the style property, for better performance\n    const wordStyle = wordSpan.style;\n    wordStyle.position = 'absolute';\n\n    const useFixedPosition: boolean = Boolean(\n      word.position && word.position.left && word.position.top,\n    );\n\n    const width = wordSpan.offsetWidth;\n    const height = wordSpan.offsetHeight;\n    let left =\n      useFixedPosition && word.position?.left\n        ? word.position.left\n        : this.options.center.x - width / 2;\n    let top =\n      useFixedPosition && word.position?.top\n        ? word.position.top\n        : this.options.center.y - height / 2;\n\n    // place the first word\n    wordStyle.left = left + 'px';\n    wordStyle.top = top + 'px';\n\n    // delayed appearance\n    if (this.options.delay) {\n      wordSpan.classList.add('tag-animation-delay');\n      // add custom css properties\n      wordStyle.setProperty(\n        '--tag-animation-delay',\n        `${this.options.delay * index}ms`,\n      );\n    }\n\n    // default case: place randomly\n    if (!useFixedPosition) {\n      // do not place the first word always right in the middle\n      if (index === 0) {\n        wordStyle.left =\n          left + (Math.random() - 0.5) * 2 * (this.calculatedWidth / 5) + 'px';\n        wordStyle.top =\n          top +\n          (Math.random() - 0.5) * 2 * (this.calculatedHeight / 5) +\n          '30px';\n      } else {\n        while (\n          this.options.width &&\n          this.options.height &&\n          wordSpan.offsetHeight &&\n          wordSpan.offsetWidth &&\n          this.hitTest(new DOMRect(left, top, wordSpan.offsetWidth, wordSpan.offsetHeight))\n        ) {\n          radius += this.options.step || DEFAULT_STEP;\n          angle +=\n            (index % 2 === 0 ? 1 : -1) * (this.options.step || DEFAULT_STEP);\n\n          left =\n            this.options.center.x -\n            width / 2.0 +\n            radius * Math.cos(angle) * this.options.aspectRatio;\n          top = this.options.center.y + radius * Math.sin(angle) - height / 2.0;\n        }\n\n        wordStyle.left = left + 'px';\n        wordStyle.top = top + 'px';\n      }\n    }\n\n    // Don't render word if part of it would be outside the container\n    if (\n      !this.options.overflow &&\n      (left < 0 ||\n        top < 0 ||\n        left + width > this.calculatedWidth ||\n        top + height > this.calculatedHeight)\n    ) {\n      this.logMessage(\n        'warn',\n        \"Word did not fit into the cloud and overflow is set to 'false'. The element will be removed\",\n        wordSpan,\n      );\n      wordSpan.remove();\n      return;\n    }\n  }\n\n  /**\n   * Methods to draw a word, by moving it in spiral until it finds a suitable empty place.\n   * This will be iterated on each word.\n   * @param index the index number for the word\n   * @param word the particular word configuration\n   */\n  private drawWord(index: number, word: CloudData) {\n    let wordSpan: HTMLSpanElement;\n\n    // get calculated word weight\n    const weight: number = this.getWeightForWord(word);\n\n    // Create a new span and insert node.\n    wordSpan = this.r2.createElement('span');\n    wordSpan.className = `w${weight}`;\n\n    // emit onclick event\n    wordSpan.onclick = () => {\n      this.clicked?.emit(word);\n    };\n\n    // Put the word (and its tooltip) in foreground when cursor is above\n    wordSpan.onmouseenter = () => {\n      wordSpan.style.zIndex = '2';\n    };\n\n    // Otherwise, restore standard priority\n    wordSpan.onmouseleave = () => {\n      wordSpan.style.zIndex = '1';\n    };\n\n    // append word text\n    let node = this.r2.createText(word.text);\n\n    // set color\n    if (word.color) this.setWordColor(wordSpan, word.color);\n\n    // rotate word possibly\n    const transformString = this.setWordRotation(wordSpan, word.rotate);\n\n    // Append href if there's a link along with the tag\n    if (word.link) node = this.wrapNodeIntoAnchorElement(node, word);\n\n    // set zoomOption\n    if (this.options.zoomOnHover && this.options.zoomOnHover.scale !== 1) {\n      this.applyZoomStyle(node, wordSpan, word.link, transformString);\n    }\n\n    wordSpan.appendChild(node);\n    this.r2.appendChild(this.el.nativeElement, wordSpan);\n\n    // add tooltip if provided\n    if (word.tooltip) this.setTooltip(wordSpan, word.tooltip);\n\n    // set a unique id\n    wordSpan.id = `angular-tag-cloud-item-${index}`;\n\n    // define the elements position\n    this.setPosition(wordSpan, word, index);\n\n    this.logMessage('debug', 'Adds new word <span>', wordSpan);\n    this.cloudDataHtmlElements.push(wordSpan);\n\n    this.logMessage('debug', 'Placed words', this.cloudDataHtmlElements);\n  }\n\n  /**\n   * Log messages to console\n   * @param level the log level\n   * @param args extra args to be logged\n   */\n  private logMessage(level: 'warn' | 'debug' | false, ...args: any) {\n    if (!this.localConfig()) {\n      return;\n    }\n    if (this.localConfig().log === 'debug') {\n      console.log(`[AngularTagCloudModule ${level}]`, ...args);\n    } else if (this.localConfig().log === 'warn' && level === 'warn') {\n      console.warn(`[AngularTagCloudModule ${level}]`, ...args);\n    }\n  }\n}\n","/*\n * Public API Surface of angular-tag-cloud-module\n */\n\nexport * from './lib/tag-cloud.interfaces';\nexport * from './lib/tag-cloud.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AA+BA,MAAM,cAAc,GAAG,GAAG;AAC1B,MAAM,aAAa,GAAG,CAAC;AACvB,MAAM,YAAY,GAAG,CAAC;MAST,iBAAiB,CAAA;AAmD5B,IAAA,IAAI,eAAe,GAAA;AACjB,QAAA,IAAI,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,aAAa;QACrE,IACE,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,GAAG,CAAC;AAChD,YAAA,KAAK,IAAI,CAAC;YACV,KAAK,GAAG,CAAC,EACT;AACA,YAAA,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,GAAG,KAAK;QAC9D;AACA,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,IAAI,gBAAgB,GAAA;AAClB,QAAA,IAAI,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,cAAc;QACzE,IACE,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,YAAY,GAAG,CAAC;AACjD,YAAA,MAAM,IAAI,CAAC;YACX,MAAM,GAAG,CAAC,EACV;AACA,YAAA,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,YAAY,GAAG,MAAM;QACjE;AACA,QAAA,OAAO,MAAM;IACf;AAK2C,IAAA,QAAQ,CAAC,KAAU,EAAA;AAC5D,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,mBAAmB,CAAC;AAC7C,QAAA,MAAM,CAAC,YAAY,CAAC,IAAI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