{"version":3,"file":"siemens-element-ng-resize-observer.mjs","sources":["../../../../projects/element-ng/resize-observer/resize-observer.service.ts","../../../../projects/element-ng/resize-observer/si-resize-observer.directive.ts","../../../../projects/element-ng/resize-observer/si-responsive-container.directive.ts","../../../../projects/element-ng/resize-observer/si-resize-observer.module.ts","../../../../projects/element-ng/resize-observer/index.ts","../../../../projects/element-ng/resize-observer/siemens-element-ng-resize-observer.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, NgZone, PLATFORM_ID } from '@angular/core';\nimport { Observable, Subscriber } from 'rxjs';\n\nexport interface ElementDimensions {\n  width: number;\n  height: number;\n}\n\ninterface ResizeSubscriber {\n  sub: Subscriber<ElementDimensions>;\n  dim?: ElementDimensions;\n  throttle: number;\n  blocked: boolean;\n  emitImmediate?: boolean;\n}\n\ninterface Listener {\n  element: Element;\n  subscribers: ResizeSubscriber[];\n}\n\ninterface QueueEntry {\n  element: Element;\n  subscriber: ResizeSubscriber;\n  unblock: boolean;\n  force: boolean;\n}\n\n/**\n * A service wrapping `ResizeObserver`. This is a service for those reasons:\n * - only one `ResizeObserver` should be used for performance reason.\n * - For Angular change detection to work, explicit `ngZone` calls are necessary\n * - Observable stream\n */\n@Injectable({\n  providedIn: 'root'\n})\nexport class ResizeObserverService {\n  private listeners = new Map<Element, Listener>();\n  private resizeObserver?: ResizeObserver;\n  private timerQueue = new Map<number, QueueEntry[]>();\n  private zone = inject(NgZone);\n\n  constructor() {\n    const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n    if (!isBrowser || !ResizeObserver) {\n      return;\n    }\n    this.resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) =>\n      entries.forEach(entry => this.handleElement(entry.target))\n    );\n  }\n\n  /**\n   * Observe the size of an element. Returns an observable with the changes.\n   * @param element - The element to observe\n   * @param throttle - Throttle time in ms. Will emit this time after the resize\n   * @param emitInitial - Emit the initial size after subscribe?\n   * @param emitImmediate - Emit an event immediately after the size changes. Useful e.g. for visibility checks.\n   */\n  observe(\n    element: Element,\n    throttle: number,\n    emitInitial?: boolean,\n    emitImmediate?: boolean\n  ): Observable<ElementDimensions> {\n    return new Observable<ElementDimensions>(subscriber => {\n      let entry = this.listeners.get(element);\n      if (!entry) {\n        entry = { element, subscribers: [] };\n        this.listeners.set(element, entry);\n      }\n      const sub: ResizeSubscriber = {\n        sub: subscriber,\n        dim: undefined,\n        throttle,\n        blocked: false,\n        emitImmediate\n      };\n      this.subscriberAdded(entry, sub, emitInitial);\n      return () => this.subscriberRemoved(entry, sub);\n    });\n  }\n\n  private subscriberAdded(\n    entry: Listener,\n    subscriber: ResizeSubscriber,\n    emitInitial?: boolean\n  ): void {\n    entry.subscribers.push(subscriber);\n    if (entry.subscribers.length === 1) {\n      this.resizeObserver?.observe(entry.element);\n    }\n\n    if (emitInitial) {\n      this.schedule(0, entry.element, subscriber, false, true);\n    }\n  }\n\n  private subscriberRemoved(entry: Listener, subscriber: ResizeSubscriber): void {\n    const index = entry.subscribers.indexOf(subscriber);\n    if (index >= 0) {\n      entry.subscribers.splice(index, 1);\n    }\n    if (entry.subscribers.length === 0) {\n      // no more subscribers, tear down everything\n      this.resizeObserver?.unobserve(entry.element);\n      this.listeners.delete(entry.element);\n    }\n    this.unschedule(subscriber);\n    // close down, no re-subscription possible\n    subscriber.sub.complete();\n  }\n\n  private handleElement(element: Element): void {\n    const entry = this.listeners.get(element);\n    if (!entry) {\n      this.resizeObserver?.unobserve(element);\n      return;\n    }\n    entry.subscribers.forEach(sub => this.handleResizeSubscriber(element, sub));\n  }\n\n  private handleResizeSubscriber(element: Element, entry: ResizeSubscriber): void {\n    if (entry.blocked) {\n      return;\n    }\n    if (entry.emitImmediate) {\n      this.schedule(0, element, entry, false);\n    }\n    this.schedule(entry.throttle, element, entry, true);\n  }\n\n  private emitSize(element: Element, entry: ResizeSubscriber, force = false): void {\n    const dimensions = { width: element.clientWidth, height: element.clientHeight };\n    if (\n      !force &&\n      entry.dim?.width === dimensions.width &&\n      entry.dim?.height === dimensions.height\n    ) {\n      // Prevent spurious emissions. Subpixels and all..\n      return;\n    }\n    entry.dim = dimensions;\n    entry.sub.next(dimensions);\n  }\n\n  private schedule(\n    timeout: number,\n    element: Element,\n    subscriber: ResizeSubscriber,\n    unblock: boolean,\n    force = false\n  ): void {\n    if (unblock) {\n      subscriber.blocked = true;\n    }\n\n    let queue = this.timerQueue.get(timeout);\n    if (!queue) {\n      queue = [];\n      this.timerQueue.set(timeout, queue);\n      setTimeout(() => {\n        this.timerQueue.delete(timeout);\n        this.processQueue(queue!);\n      }, timeout);\n    }\n\n    queue.push({ element, subscriber, unblock, force });\n  }\n\n  private unschedule(entry: ResizeSubscriber): void {\n    const queued = this.timerQueue.get(entry.throttle);\n    if (queued) {\n      const index = queued.findIndex(q => q.subscriber === entry);\n      if (index > -1) {\n        queued.splice(index, 1);\n      }\n    }\n  }\n\n  private processQueue(queue: QueueEntry[]): void {\n    this.zone.run(() => {\n      queue?.forEach(q => {\n        if (q.unblock) {\n          q.subscriber.blocked = false;\n        }\n        this.emitSize(q.element, q.subscriber, q.force);\n      });\n    });\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n  booleanAttribute,\n  Directive,\n  ElementRef,\n  inject,\n  input,\n  OnDestroy,\n  OnInit,\n  output\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { ElementDimensions, ResizeObserverService } from './resize-observer.service';\n\n/**\n * Directive to emit events on element size change. Use like this:\n *   `<div (siResizeObserver)=\"handleResize($event)\">`\n * When the size of the element changes, an event in the format\n *   `{ width: number, height: number }`\n * will be emitted. Also an initial event will be emitted on init.\n *\n * By default, events are throttled and to an event every 100ms. To change\n * this, add `[resizeThrottle]=\"200\"` on the same element. Input in milliseconds.\n */\n@Directive({\n  selector: '[siResizeObserver]'\n})\nexport class SiResizeObserverDirective implements OnInit, OnDestroy {\n  /**\n   * Minimum time in milliseconds between resize events.\n   *\n   * @defaultValue 100\n   */\n  readonly resizeThrottle = input(100);\n  /**\n   * Whether to emit the element's dimensions when the directive initializes.\n   *\n   * @defaultValue true\n   */\n  readonly emitInitial = input(true, { transform: booleanAttribute });\n  /** Emits the observed element's current width and height. */\n  readonly siResizeObserver = output<ElementDimensions>();\n\n  private subs?: Subscription;\n  private element = inject(ElementRef);\n  private service = inject(ResizeObserverService);\n\n  ngOnInit(): void {\n    this.subs = this.service\n      .observe(this.element.nativeElement, this.resizeThrottle(), this.emitInitial())\n      .subscribe(value => this.siResizeObserver.emit(value));\n  }\n\n  ngOnDestroy(): void {\n    this.subs?.unsubscribe();\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, ElementRef, inject, input, OnDestroy, OnInit, signal } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { ResizeObserverService } from './resize-observer.service';\n\nexport interface Breakpoints {\n  smMinimum: number;\n  mdMinimum: number;\n  lgMinimum: number;\n  xlMinimum: number;\n  xxlMinimum: number;\n}\n\n// keep in sync with the Bootstrap variables\nexport const BOOTSTRAP_BREAKPOINTS: Breakpoints = {\n  smMinimum: 576,\n  mdMinimum: 768,\n  lgMinimum: 992,\n  xlMinimum: 1200,\n  xxlMinimum: 1400\n};\n\n/**\n * Directive to automatically set `si-container-*` classes so Bootstrap column classes work\n * in the context of the container instead of viewport size.\n */\n@Directive({\n  selector: '[siResponsiveContainer]',\n  host: {\n    '[class.si-container-xs]': 'xs()',\n    '[class.si-container-sm]': 'sm()',\n    '[class.si-container-md]': 'md()',\n    '[class.si-container-lg]': 'lg()',\n    '[class.si-container-xl]': 'xl()',\n    '[class.si-container-xxl]': 'xxl()'\n  },\n  exportAs: 'siResponsiveContainer'\n})\nexport class SiResponsiveContainerDirective implements OnInit, OnDestroy {\n  /** @defaultValue false */\n  readonly xs = signal(false);\n  /** @defaultValue false */\n  readonly sm = signal(false);\n  /** @defaultValue false */\n  readonly md = signal(false);\n  /** @defaultValue false */\n  readonly lg = signal(false);\n  /** @defaultValue false */\n  readonly xl = signal(false);\n  /** @defaultValue false */\n  readonly xxl = signal(false);\n\n  /**\n   * Minimum time in milliseconds between resize observations.\n   *\n   * @defaultValue 100\n   */\n  readonly resizeThrottle = input(100);\n  /**\n   * Width thresholds used to assign responsive container classes.\n   *\n   * @defaultValue BOOTSTRAP_BREAKPOINTS\n   */\n  readonly breakpoints = input<Breakpoints>();\n\n  private subs?: Subscription;\n\n  private element = inject(ElementRef);\n  private service = inject(ResizeObserverService);\n\n  ngOnInit(): void {\n    this.subs = this.service\n      .observe(this.element.nativeElement, this.resizeThrottle(), true)\n      .subscribe(event => this.setResponsiveSize(event.width, event.height));\n  }\n\n  ngOnDestroy(): void {\n    this.subs?.unsubscribe();\n  }\n\n  private setResponsiveSize(width: number, height: number): void {\n    if (!width && !height) {\n      // element is not visible, no point in changing anything\n      return;\n    }\n    const breakpoints = this.breakpoints() ?? BOOTSTRAP_BREAKPOINTS;\n\n    this.xs.set(width < breakpoints.smMinimum);\n    this.sm.set(width >= breakpoints.smMinimum && width < breakpoints.mdMinimum);\n    this.md.set(width >= breakpoints.mdMinimum && width < breakpoints.lgMinimum);\n    this.lg.set(width >= breakpoints.lgMinimum && width < breakpoints.xlMinimum);\n    this.xl.set(width >= breakpoints.xlMinimum && width < breakpoints.xxlMinimum);\n    this.xxl.set(width >= breakpoints.xxlMinimum);\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiResizeObserverDirective } from './si-resize-observer.directive';\nimport { SiResponsiveContainerDirective } from './si-responsive-container.directive';\n\n@NgModule({\n  imports: [SiResizeObserverDirective, SiResponsiveContainerDirective],\n  exports: [SiResizeObserverDirective, SiResponsiveContainerDirective]\n})\nexport class SiResizeObserverModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './resize-observer.service';\nexport * from './si-resize-observer.directive';\nexport * from './si-resize-observer.module';\nexport * from './si-responsive-container.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AA8BH;;;;;AAKG;MAIU,qBAAqB,CAAA;AACxB,IAAA,SAAS,GAAG,IAAI,GAAG,EAAqB;AACxC,IAAA,cAAc;AACd,IAAA,UAAU,GAAG,IAAI,GAAG,EAAwB;AAC5C,IAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AAE7B,IAAA,WAAA,GAAA;QACE,MAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACxD,QAAA,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE;YACjC;QACF;AACA,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAA8B,KACtE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAC3D;IACH;AAEA;;;;;;AAMG;AACH,IAAA,OAAO,CACL,OAAgB,EAChB,QAAgB,EAChB,WAAqB,EACrB,aAAuB,EAAA;AAEvB,QAAA,OAAO,IAAI,UAAU,CAAoB,UAAU,IAAG;YACpD,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC;YACvC,IAAI,CAAC,KAAK,EAAE;gBACV,KAAK,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE;gBACpC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC;YACpC;AACA,YAAA,MAAM,GAAG,GAAqB;AAC5B,gBAAA,GAAG,EAAE,UAAU;AACf,gBAAA,GAAG,EAAE,SAAS;gBACd,QAAQ;AACR,gBAAA,OAAO,EA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