ng-hub-ui-utils 1.2.0 → 22.1.0

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.
package/README.md CHANGED
@@ -1,29 +1,70 @@
1
- # Hub UI - Angular Utilities Library
1
+ # ng-hub-ui-utils
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/ng-hub-ui-utils.svg)](https://www.npmjs.com/package/ng-hub-ui-utils)
4
4
  [![License](https://img.shields.io/npm/l/ng-hub-ui-utils.svg)](LICENSE)
5
- [![Build Status](https://img.shields.io/github/workflow/status/carlos-morcillo/ng-hub-ui-utils/CI)](https://github.com/carlos-morcillo/ng-hub-ui-utils/actions)
5
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/carlos-morcillo/ng-hub-ui/ci.yml)](https://github.com/carlos-morcillo/ng-hub-ui/actions)
6
6
 
7
7
  > Common utilities library for Angular, fundamental support for the Hub UI ecosystem.
8
8
 
9
9
  [Español](./README.es.md) | **English**
10
10
 
11
- ## 🏡 Part of the Hub UI Family
12
-
13
- This library is part of the **Hub UI** ecosystem, which includes:
14
-
15
- - 🎨 [**ng-hub-ui-accordion**](https://github.com/carlos-morcillo/ng-hub-ui-accordion) - Accordion components
16
- - 📱 **ng-hub-ui-action-sheet** - Mobile action sheets
17
- - 👤 [**ng-hub-ui-avatar**](https://github.com/carlos-morcillo/ng-hub-ui-avatar) - Avatar components
18
- - 📋 [**ng-hub-ui-board**](https://github.com/carlos-morcillo/ng-hub-ui-board) - Kanban-style boards
19
- - 🧭 [**ng-hub-ui-breadcrumbs**](https://github.com/carlos-morcillo/ng-hub-ui-breadcrumbs) - Navigation breadcrumbs
20
- - 📜 **ng-hub-ui-dropdown** - Dropdown components
21
- - 📝 **ng-hub-ui-list** - List components
22
- - 🪟 [**ng-hub-ui-modal**](https://github.com/carlos-morcillo/ng-hub-ui-modal) - Modal components
23
- - 🌀 [**ng-hub-ui-portal**](https://github.com/carlos-morcillo/ng-hub-ui-portal) - Portal system
24
- - 🔀 [**ng-hub-ui-sortable**](https://github.com/carlos-morcillo/ng-hub-ui-sortable) - Sortable components
25
- - 📊 [**ng-hub-ui-stepper**](https://github.com/carlos-morcillo/ng-hub-ui-stepper) - Step-by-step components
26
- - 🛠️ [**ng-hub-ui-utils**](https://github.com/carlos-morcillo/ng-hub-ui-utils) ← you are here - Common utilities
11
+ ## 📝 Description
12
+
13
+ `ng-hub-ui-utils` is the foundational utilities library for the entire Hub UI ecosystem. It provides a curated set of framework-agnostic helper functions, type guards, standalone Angular pipes, a flexible overlay/popup system, focus-trap and accessibility helpers, scrollbar compensation, a smooth transition engine, and a lightweight internationalization (i18n) system. It ships no visual components — instead it powers the shared low-level behavior used across the rest of the `ng-hub-ui` libraries, while remaining tree-shakable so you only bundle what you import.
14
+
15
+ ## 📑 Table of Contents
16
+
17
+ - [Description](#-description)
18
+ - [Documentation and Live Examples](#-documentation-and-live-examples)
19
+ - [Library Family `ng-hub-ui`](#-library-family-ng-hub-ui)
20
+ - [Inspiration](#-inspiration)
21
+ - [Features](#-features)
22
+ - [Installation](#-installation)
23
+ - [Quick Start](#-quick-start)
24
+ - [Internationalization (i18n)](#-internationalization-i18n)
25
+ - [Utilities API](#-utilities-api)
26
+ - [Support Components](#-support-components)
27
+ - [Compatibility](#-compatibility)
28
+ - [Development](#-development)
29
+ - [Testing](#-testing)
30
+ - [Changelog](#-changelog)
31
+ - [Issues and Support](#-issues-and-support)
32
+ - [Support the Project](#-support-the-project)
33
+ - [Contributions](#-contributions)
34
+ - [License](#-license)
35
+
36
+ ## 📚 Documentation and Live Examples
37
+
38
+ This package is part of [Hub UI](https://hubui.dev/), a collection of Angular component libraries for standalone apps.
39
+
40
+ - Docs: https://hubui.dev/utils/overview/
41
+ - Live examples: https://hubui.dev/utils/examples/
42
+ - Hub UI: https://hubui.dev/
43
+
44
+ ## 🧩 Library Family `ng-hub-ui`
45
+
46
+ This library is part of the **ng-hub-ui** ecosystem:
47
+
48
+ - [**ng-hub-ui-accordion**](https://www.npmjs.com/package/ng-hub-ui-accordion) (deprecated — use ng-hub-ui-panels)
49
+ - [**ng-hub-ui-action-sheet**](https://www.npmjs.com/package/ng-hub-ui-action-sheet)
50
+ - [**ng-hub-ui-avatar**](https://www.npmjs.com/package/ng-hub-ui-avatar)
51
+ - [**ng-hub-ui-board**](https://www.npmjs.com/package/ng-hub-ui-board)
52
+ - [**ng-hub-ui-breadcrumbs**](https://www.npmjs.com/package/ng-hub-ui-breadcrumbs)
53
+ - [**ng-hub-ui-calendar**](https://www.npmjs.com/package/ng-hub-ui-calendar)
54
+ - [**ng-hub-ui-dropdown**](https://www.npmjs.com/package/ng-hub-ui-dropdown)
55
+ - [**ng-hub-ui-ds**](https://www.npmjs.com/package/ng-hub-ui-ds)
56
+ - [**ng-hub-ui-forms**](https://www.npmjs.com/package/ng-hub-ui-forms)
57
+ - [**ng-hub-ui-history**](https://www.npmjs.com/package/ng-hub-ui-history)
58
+ - [**ng-hub-ui-milestones**](https://www.npmjs.com/package/ng-hub-ui-milestones)
59
+ - [**ng-hub-ui-modal**](https://www.npmjs.com/package/ng-hub-ui-modal)
60
+ - [**ng-hub-ui-nav**](https://www.npmjs.com/package/ng-hub-ui-nav)
61
+ - [**ng-hub-ui-paginable**](https://www.npmjs.com/package/ng-hub-ui-paginable)
62
+ - [**ng-hub-ui-panels**](https://www.npmjs.com/package/ng-hub-ui-panels)
63
+ - [**ng-hub-ui-portal**](https://www.npmjs.com/package/ng-hub-ui-portal)
64
+ - [**ng-hub-ui-skeleton**](https://www.npmjs.com/package/ng-hub-ui-skeleton)
65
+ - [**ng-hub-ui-sortable**](https://www.npmjs.com/package/ng-hub-ui-sortable)
66
+ - [**ng-hub-ui-stepper**](https://www.npmjs.com/package/ng-hub-ui-stepper)
67
+ - [**ng-hub-ui-utils**](https://www.npmjs.com/package/ng-hub-ui-utils) ← You are here
27
68
 
28
69
  ## 💡 Inspiration
29
70
 
@@ -149,6 +190,45 @@ hubRunTransition(
149
190
  });
150
191
  ```
151
192
 
193
+ ### 🌐 Internationalization (i18n)
194
+
195
+ Lightweight, dependency-injection based translation system with a reactive pipe. Register translation dictionaries at bootstrap with `provideHubTranslation`, then translate keys in templates with the `translate` pipe.
196
+
197
+ ```typescript
198
+ import { provideHubTranslation, HubTranslationService, TranslatePipe } from 'ng-hub-ui-utils';
199
+
200
+ // In your application config / bootstrap providers
201
+ bootstrapApplication(AppComponent, {
202
+ providers: [
203
+ provideHubTranslation({
204
+ language: 'en',
205
+ fallbackLanguage: 'en',
206
+ dictionaries: {
207
+ en: { greeting: 'Hello {name}!' },
208
+ es: { greeting: '¡Hola {name}!' }
209
+ }
210
+ })
211
+ ]
212
+ });
213
+ ```
214
+
215
+ ```typescript
216
+ @Component({
217
+ standalone: true,
218
+ imports: [TranslatePipe],
219
+ template: `
220
+ <!-- Simple key -->
221
+ <p>{{ 'greeting' | translate }}</p>
222
+
223
+ <!-- With interpolation params -->
224
+ <p>{{ 'greeting' | translate: { name: 'Carlos' } }}</p>
225
+ `
226
+ })
227
+ export class ExampleComponent {}
228
+ ```
229
+
230
+ See [Internationalization (i18n)](#-internationalization-i18n) for the full API.
231
+
152
232
  ### 🧰 Standalone Angular Pipes
153
233
 
154
234
  Complete set of utility pipes for validation, transformation, and data manipulation.
@@ -323,6 +403,91 @@ export class ExampleComponent {
323
403
  }
324
404
  ```
325
405
 
406
+ ## 🌐 Internationalization (i18n)
407
+
408
+ The i18n system (available since `v1.2.0`) lets you register translation dictionaries via dependency injection and resolve keys reactively in templates. Updating the active translations at runtime automatically refreshes any `translate` pipe in the view.
409
+
410
+ ### `provideHubTranslation(config?)`
411
+
412
+ Environment provider helper that registers `HubTranslationService` and its configuration. Call it once in your application bootstrap providers.
413
+
414
+ ```typescript
415
+ function provideHubTranslation(config?: HubTranslationConfig): EnvironmentProviders;
416
+ ```
417
+
418
+ ### `HubTranslationConfig`
419
+
420
+ ```typescript
421
+ interface HubTranslationConfig {
422
+ /** Map of language code → translation dictionary. */
423
+ dictionaries?: Record<string, Record<string, any>>;
424
+ /** Active language code (defaults to fallbackLanguage, then 'en'). */
425
+ language?: string;
426
+ /** Fallback language merged under the active language (defaults to 'en'). */
427
+ fallbackLanguage?: string;
428
+ }
429
+ ```
430
+
431
+ The configuration is also exposed through the `HUB_TRANSLATION_CONFIG` injection token for advanced scenarios.
432
+
433
+ ### `HubTranslationService`
434
+
435
+ Injectable service that holds the active translations and notifies subscribers when they change.
436
+
437
+ ```typescript
438
+ @Injectable()
439
+ class HubTranslationService {
440
+ /** Currently active flat translations map. */
441
+ translations: Record<string, string>;
442
+ /** Emits whenever the active translations are updated. */
443
+ translationObserver: Observable<Record<string, string>>;
444
+
445
+ /** Resolves a key (supports dot notation) against the active translations. */
446
+ getTranslation(key: string): any;
447
+ /** Replaces the active translations, merging them over the fallback dictionary. */
448
+ setTranslations(translations?: Record<string, string>): void;
449
+ }
450
+ ```
451
+
452
+ ```typescript
453
+ import { HubTranslationService } from 'ng-hub-ui-utils';
454
+
455
+ @Component({ /* ... */ })
456
+ export class LanguageSwitcherComponent {
457
+ private translationSvc = inject(HubTranslationService);
458
+
459
+ switchToSpanish() {
460
+ // Swap the active dictionary at runtime; the `translate` pipe updates automatically.
461
+ this.translationSvc.setTranslations({ greeting: '¡Hola {name}!' });
462
+ }
463
+ }
464
+ ```
465
+
466
+ ### `TranslatePipe` (`translate`)
467
+
468
+ Impure standalone pipe that resolves a translation key with optional interpolation params. It subscribes to the service so the view stays in sync when translations change.
469
+
470
+ ```typescript
471
+ // Simple key
472
+ {{ 'greeting' | translate }}
473
+
474
+ // With an object of interpolation params
475
+ {{ 'greeting' | translate: { name: 'Carlos' } }}
476
+
477
+ // Params can also be written inline as a pseudo-object string
478
+ {{ 'greeting' | translate: "{name: 'Carlos'}" }}
479
+ ```
480
+
481
+ If a key has no matching translation, the key itself is returned. Interpolation tokens use the `{paramName}` syntax (powered by the `interpolateString` utility).
482
+
483
+ ### Supporting utilities
484
+
485
+ These functions back the i18n system and are exported for direct use:
486
+
487
+ - `getValue(target: any, key: string): any` - Reads a nested value by dot-notation key.
488
+ - `interpolateString(text: string, params?: object): string` - Replaces `{token}` placeholders in a string.
489
+ - `equals(o1: any, o2: any): boolean` - Deep equality check used to memoize the pipe value.
490
+
326
491
  ## 📊 Utilities API
327
492
 
328
493
  ### Conversion Functions
@@ -462,8 +627,8 @@ This library doesn't include visual components, but support utilities used by ot
462
627
 
463
628
  | Utility | Description | Used by |
464
629
  | --------------- | ----------------------------------- | -------------------------------------- |
465
- | Overlay Service | Flexible overlay positioning system | ng-hub-ui-dropdown, ng-hub-ui-modal |
466
- | Focus Trap | Focus management in modals/overlays | ng-hub-ui-modal, ng-hub-ui-dropdown |
630
+ | Overlay Service | Flexible overlay positioning system | ng-hub-ui-modal, ng-hub-ui-portal |
631
+ | Focus Trap | Focus management in modals/overlays | ng-hub-ui-modal, ng-hub-ui-portal |
467
632
  | Scrollbar | Scrollbar compensation | ng-hub-ui-modal, ng-hub-ui-portal |
468
633
  | Popup Service | Base class for popup components | ng-hub-ui-modal, ng-hub-ui-portal |
469
634
  | Transitions | Smooth animations | ng-hub-ui-accordion, ng-hub-ui-modal |
@@ -472,7 +637,7 @@ This library doesn't include visual components, but support utilities used by ot
472
637
 
473
638
  ## 🤝 Compatibility
474
639
 
475
- - Angular 15+
640
+ - Angular 16+
476
641
  - TypeScript 4.8+
477
642
  - Node.js 16+
478
643
  - Browsers: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
@@ -529,11 +694,20 @@ describe('ng-hub-ui-utils', () => {
529
694
  });
530
695
  ```
531
696
 
697
+ ## 📋 Changelog
698
+
699
+ All notable changes are documented in the [CHANGELOG.md](./CHANGELOG.md), following [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
700
+
701
+ Recent highlights:
702
+
703
+ - **1.2.1** — Renamed internal i18n files and refreshed `TranslatePipe`; added a test suite for `HubTranslationService`.
704
+ - **1.2.0** — Added the i18n system (`HubTranslationService`, `provideHubTranslation`, `TranslatePipe`, translation tokens) plus the `equals`, `interpolateString` and `getValue` utilities.
705
+
532
706
  ## 🐛 Issues and Support
533
707
 
534
708
  - [Report a bug](https://github.com/carlos-morcillo/ng-hub-ui-utils/issues)
535
709
  - [Request a feature](https://github.com/carlos-morcillo/ng-hub-ui-utils/issues/new?template=feature_request.md)
536
- - [Discussions](https://github.com/carlos-morcillo/ng-hub-ui-utils/discussions)
710
+ - [Repository](https://github.com/carlos-morcillo/ng-hub-ui-utils)
537
711
 
538
712
  ## ☕ Support the Project
539
713
 
@@ -563,7 +737,7 @@ Check our [contribution guidelines](CONTRIBUTING.md) for more details.
563
737
 
564
738
  ## 📄 License
565
739
 
566
- MIT © [Hub UI Team](https://github.com/carlos-morcillo)
740
+ MIT © Hub UI contributors
567
741
 
568
742
  ```
569
743
  MIT License
@@ -593,4 +767,4 @@ SOFTWARE.
593
767
 
594
768
  ⭐ **If you like this project, don't forget to give it a star on GitHub!**
595
769
 
596
- [![GitHub stars](https://img.shields.io/github/stars/carlos-morcillo/ng-hub-ui-utils.svg?style=social&label=Star)](https://github.com/carlos-morcillo/ng-hub-ui-utils)
770
+ [![GitHub stars](https://img.shields.io/github/stars/carlos-morcillo/ng-hub-ui.svg?style=social&label=Star)](https://github.com/carlos-morcillo/ng-hub-ui)
@@ -1,7 +1,7 @@
1
1
  import { fromEvent, Observable, Subject, isObservable, EMPTY, of, timer, race } from 'rxjs';
2
2
  import { takeUntil, map, filter, withLatestFrom, endWith, take, mergeMap, tap } from 'rxjs/operators';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, inject, Injectable, ElementRef, TemplateRef, createComponent, ApplicationRef, Pipe, ChangeDetectorRef, Injector, ViewContainerRef, NgZone } from '@angular/core';
4
+ import { signal, effect, InjectionToken, inject, Injectable, makeEnvironmentProviders, ElementRef, TemplateRef, createComponent, ApplicationRef, Pipe, ChangeDetectorRef, Injector, ViewContainerRef, NgZone } from '@angular/core';
5
5
  import { DOCUMENT } from '@angular/common';
6
6
 
7
7
  const FOCUSABLE_ELEMENTS_SELECTOR = [
@@ -272,6 +272,80 @@ function getValue(target, key) {
272
272
  } while (keys.length);
273
273
  return target;
274
274
  }
275
+ /**
276
+ * Checks if the given item is a plain object (not an array, null, or primitive).
277
+ *
278
+ * @param item Value to test.
279
+ * @returns true when item is a non-null, non-array object.
280
+ */
281
+ function isObject(item) {
282
+ return item !== null && typeof item === 'object' && !Array.isArray(item);
283
+ }
284
+ /**
285
+ * Recursively deep-merges source into target, producing a new object.
286
+ * Arrays are replaced, not merged. Primitives from source win.
287
+ *
288
+ * @param target Base object.
289
+ * @param source Overrides to apply on top of target.
290
+ * @returns New merged object.
291
+ */
292
+ function mergeDeep(target, source) {
293
+ const output = Object.assign({}, target);
294
+ if (isObject(target) && isObject(source)) {
295
+ Object.keys(source).forEach((key) => {
296
+ if (isObject(source[key])) {
297
+ if (!(key in target)) {
298
+ Object.assign(output, { [key]: source[key] });
299
+ }
300
+ else {
301
+ output[key] = mergeDeep(target[key], source[key]);
302
+ }
303
+ }
304
+ else {
305
+ Object.assign(output, { [key]: source[key] });
306
+ }
307
+ });
308
+ }
309
+ return output;
310
+ }
311
+ /**
312
+ * Generates a random alphanumeric string of the requested length.
313
+ * Not cryptographically secure — intended for transient DOM ids and keys.
314
+ *
315
+ * @param length Desired character count.
316
+ * @returns Random alphanumeric string.
317
+ */
318
+ function generateUniqueId(length) {
319
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
320
+ let result = '';
321
+ for (let i = 0; i < length; i++) {
322
+ result += chars.charAt(Math.floor(Math.random() * chars.length));
323
+ }
324
+ return result;
325
+ }
326
+ /**
327
+ * Creates a read-only signal that mirrors sourceSignal but only updates
328
+ * after debounceDelay ms have elapsed since the last emission.
329
+ * Cleans up the pending timer via the Angular effect cleanup mechanism.
330
+ *
331
+ * @template T Type of the signal value.
332
+ * @param sourceSignal Signal to debounce.
333
+ * @param debounceDelay Milliseconds to wait, or a signal that provides the delay.
334
+ * @returns Debounced read-only signal.
335
+ */
336
+ function debouncedSignal(sourceSignal, debounceDelay = 0) {
337
+ const debounced = signal(sourceSignal(), /* @ts-ignore */
338
+ ...(ngDevMode ? [{ debugName: "debounced" }] : /* istanbul ignore next */ []));
339
+ effect((onCleanup) => {
340
+ const delay = typeof debounceDelay === 'number' ? debounceDelay : debounceDelay();
341
+ const value = sourceSignal();
342
+ const timeout = setTimeout(() => {
343
+ debounced.set(value);
344
+ }, delay);
345
+ onCleanup(() => clearTimeout(timeout));
346
+ });
347
+ return debounced;
348
+ }
275
349
  /**
276
350
  * Returns the active element in the given root.
277
351
  *
@@ -321,13 +395,28 @@ class HubTranslationService {
321
395
  this.translations = { ...fallbackTranslations, ...nextTranslations };
322
396
  this.translationSource.next(this.translations);
323
397
  }
324
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: HubTranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
325
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: HubTranslationService });
398
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HubTranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
399
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HubTranslationService });
326
400
  }
327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: HubTranslationService, decorators: [{
401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HubTranslationService, decorators: [{
328
402
  type: Injectable
329
403
  }], ctorParameters: () => [] });
330
404
 
405
+ /**
406
+ * Helper function to provide HubTranslationService and its configuration.
407
+ * @param config Optional configuration for translations.
408
+ * @returns EnvironmentProviders
409
+ */
410
+ function provideHubTranslation(config = {}) {
411
+ return makeEnvironmentProviders([
412
+ HubTranslationService,
413
+ {
414
+ provide: HUB_TRANSLATION_CONFIG,
415
+ useValue: config
416
+ }
417
+ ]);
418
+ }
419
+
331
420
  /**
332
421
  * Positions an overlay container relative to an origin element.
333
422
  * The first configured position that fits within the viewport is applied.
@@ -704,10 +793,10 @@ class OverlayService {
704
793
  position() {
705
794
  return new OverlayPosition();
706
795
  }
707
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: OverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
708
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: OverlayService, providedIn: 'root' });
796
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
797
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OverlayService, providedIn: 'root' });
709
798
  }
710
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: OverlayService, decorators: [{
799
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: OverlayService, decorators: [{
711
800
  type: Injectable,
712
801
  args: [{
713
802
  providedIn: 'root'
@@ -730,10 +819,10 @@ class GetPipe {
730
819
  ? a[c]
731
820
  : defaultValue || null, value);
732
821
  }
733
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: GetPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
734
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.3", ngImport: i0, type: GetPipe, isStandalone: true, name: "get" });
822
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: GetPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
823
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: GetPipe, isStandalone: true, name: "get" });
735
824
  }
736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: GetPipe, decorators: [{
825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: GetPipe, decorators: [{
737
826
  type: Pipe,
738
827
  args: [{
739
828
  name: 'get',
@@ -745,10 +834,10 @@ class IsObjectPipe {
745
834
  transform(value) {
746
835
  return typeof value === 'object';
747
836
  }
748
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: IsObjectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
749
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.3", ngImport: i0, type: IsObjectPipe, isStandalone: true, name: "isObject" });
837
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IsObjectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
838
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: IsObjectPipe, isStandalone: true, name: "isObject" });
750
839
  }
751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: IsObjectPipe, decorators: [{
840
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IsObjectPipe, decorators: [{
752
841
  type: Pipe,
753
842
  args: [{
754
843
  name: 'isObject'
@@ -759,10 +848,10 @@ class IsObservablePipe {
759
848
  transform(value) {
760
849
  return isObservable(value);
761
850
  }
762
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: IsObservablePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
763
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.3", ngImport: i0, type: IsObservablePipe, isStandalone: true, name: "isObservable" });
851
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IsObservablePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
852
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: IsObservablePipe, isStandalone: true, name: "isObservable" });
764
853
  }
765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: IsObservablePipe, decorators: [{
854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IsObservablePipe, decorators: [{
766
855
  type: Pipe,
767
856
  args: [{
768
857
  name: 'isObservable',
@@ -774,10 +863,10 @@ class IsStringPipe {
774
863
  transform(value) {
775
864
  return typeof value === 'string';
776
865
  }
777
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: IsStringPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
778
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.3", ngImport: i0, type: IsStringPipe, isStandalone: true, name: "isString" });
866
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IsStringPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
867
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: IsStringPipe, isStandalone: true, name: "isString" });
779
868
  }
780
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: IsStringPipe, decorators: [{
869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IsStringPipe, decorators: [{
781
870
  type: Pipe,
782
871
  args: [{
783
872
  name: 'isString'
@@ -839,13 +928,12 @@ class TranslatePipe {
839
928
  // Clean any existing subscription.
840
929
  this._dispose();
841
930
  if (!this.translationSubscription) {
842
- this.translationSubscription =
843
- this._translationSvc.translationObserver.subscribe(() => {
844
- if (this.lastKey) {
845
- this.lastKey = null;
846
- this.updateValue(query, interpolateParams);
847
- }
848
- });
931
+ this.translationSubscription = this._translationSvc.translationObserver.subscribe(() => {
932
+ if (this.lastKey) {
933
+ this.lastKey = null;
934
+ this.updateValue(query, interpolateParams);
935
+ }
936
+ });
849
937
  }
850
938
  return this.value;
851
939
  }
@@ -861,10 +949,10 @@ class TranslatePipe {
861
949
  ngOnDestroy() {
862
950
  this._dispose();
863
951
  }
864
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: TranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
865
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.3", ngImport: i0, type: TranslatePipe, isStandalone: true, name: "translate", pure: false });
952
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
953
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: TranslatePipe, isStandalone: true, name: "translate", pure: false });
866
954
  }
867
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: TranslatePipe, decorators: [{
955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TranslatePipe, decorators: [{
868
956
  type: Pipe,
869
957
  args: [{
870
958
  name: 'translate',
@@ -877,10 +965,10 @@ class UcfirstPipe {
877
965
  transform(value = '') {
878
966
  return value.charAt(0).toUpperCase() + value.slice(1);
879
967
  }
880
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: UcfirstPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
881
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.3", ngImport: i0, type: UcfirstPipe, isStandalone: true, name: "ucfirst" });
968
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: UcfirstPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
969
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: UcfirstPipe, isStandalone: true, name: "ucfirst" });
882
970
  }
883
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: UcfirstPipe, decorators: [{
971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: UcfirstPipe, decorators: [{
884
972
  type: Pipe,
885
973
  args: [{
886
974
  name: 'ucfirst',
@@ -948,10 +1036,10 @@ class UnwrapAsyncPipe {
948
1036
  this.subscription = null;
949
1037
  }
950
1038
  }
951
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: UnwrapAsyncPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
952
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.3", ngImport: i0, type: UnwrapAsyncPipe, isStandalone: true, name: "unwrapAsync", pure: false });
1039
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: UnwrapAsyncPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1040
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: UnwrapAsyncPipe, isStandalone: true, name: "unwrapAsync", pure: false });
953
1041
  }
954
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: UnwrapAsyncPipe, decorators: [{
1042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: UnwrapAsyncPipe, decorators: [{
955
1043
  type: Pipe,
956
1044
  args: [{
957
1045
  name: 'unwrapAsync',
@@ -1138,10 +1226,10 @@ class ScrollBar {
1138
1226
  bodyStyle.overflow = overflow;
1139
1227
  };
1140
1228
  }
1141
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: ScrollBar, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1142
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: ScrollBar, providedIn: 'root' });
1229
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ScrollBar, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1230
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ScrollBar, providedIn: 'root' });
1143
1231
  }
1144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: ScrollBar, decorators: [{
1232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ScrollBar, decorators: [{
1145
1233
  type: Injectable,
1146
1234
  args: [{ providedIn: 'root' }]
1147
1235
  }] });
@@ -1154,5 +1242,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
1154
1242
  * Generated bundle index. Do not edit.
1155
1243
  */
1156
1244
 
1157
- export { ContentRef, FOCUSABLE_ELEMENTS_SELECTOR, GetPipe, HUB_TRANSLATION_CONFIG, HubTranslationService, IsObjectPipe, IsObservablePipe, IsStringPipe, OverlayPosition, OverlayRef, OverlayService, PopupService, ScrollBar, TranslatePipe, UcfirstPipe, UnwrapAsyncPipe, closest, equals, getActiveElement, getFocusableBoundaryElements, getValue, getValueInRange, hubCompleteTransition, hubFocusTrap, hubRunTransition, interpolateString, isDefined, isInteger, isNumber, isPromise, isString, padNumber, reflow, regExpEscape, removeAccents, runInZone, toInteger, toString };
1245
+ export { ContentRef, FOCUSABLE_ELEMENTS_SELECTOR, GetPipe, HUB_TRANSLATION_CONFIG, HubTranslationService, IsObjectPipe, IsObservablePipe, IsStringPipe, OverlayPosition, OverlayRef, OverlayService, PopupService, ScrollBar, TranslatePipe, UcfirstPipe, UnwrapAsyncPipe, closest, debouncedSignal, equals, generateUniqueId, getActiveElement, getFocusableBoundaryElements, getValue, getValueInRange, hubCompleteTransition, hubFocusTrap, hubRunTransition, interpolateString, isDefined, isInteger, isNumber, isObject, isPromise, isString, mergeDeep, padNumber, provideHubTranslation, reflow, regExpEscape, removeAccents, runInZone, toInteger, toString };
1158
1246
  //# sourceMappingURL=ng-hub-ui-utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-hub-ui-utils.mjs","sources":["../../../projects/utils/src/lib/focus-trap.ts","../../../projects/utils/src/lib/util.ts","../../../projects/utils/src/lib/i18n/translation.tokens.ts","../../../projects/utils/src/lib/i18n/hub-translation.service.ts","../../../projects/utils/src/lib/overlay/overlay-position.ts","../../../projects/utils/src/lib/overlay/overlay-ref.ts","../../../projects/utils/src/lib/overlay/overlay-service.ts","../../../projects/utils/src/lib/pipes/get.pipe.ts","../../../projects/utils/src/lib/pipes/is-object.pipe.ts","../../../projects/utils/src/lib/pipes/is-observable.pipe.ts","../../../projects/utils/src/lib/pipes/is-string.pipe.ts","../../../projects/utils/src/lib/pipes/translate.pipe.ts","../../../projects/utils/src/lib/pipes/ucfirst.pipe.ts","../../../projects/utils/src/lib/pipes/unwrap-async.pipe.ts","../../../projects/utils/src/lib/transitions/util.ts","../../../projects/utils/src/lib/transitions/transition.ts","../../../projects/utils/src/lib/popup.ts","../../../projects/utils/src/lib/scrollbar.ts","../../../projects/utils/src/public-api.ts","../../../projects/utils/src/ng-hub-ui-utils.ts"],"sourcesContent":["import { NgZone } from '@angular/core';\n\nimport { fromEvent, Observable } from 'rxjs';\nimport { filter, map, takeUntil, withLatestFrom } from 'rxjs/operators';\n\nexport const FOCUSABLE_ELEMENTS_SELECTOR = [\n\t'a[href]',\n\t'button:not([disabled])',\n\t'input:not([disabled]):not([type=\"hidden\"])',\n\t'select:not([disabled])',\n\t'textarea:not([disabled])',\n\t'[contenteditable]',\n\t'[tabindex]:not([tabindex=\"-1\"])'\n].join(', ');\n\n/**\n * Returns first and last focusable elements inside of a given element based on specific CSS selector\n */\nexport function getFocusableBoundaryElements(\n\telement: HTMLElement\n): HTMLElement[] {\n\tconst list: HTMLElement[] = Array.from(\n\t\telement.querySelectorAll(\n\t\t\tFOCUSABLE_ELEMENTS_SELECTOR\n\t\t) as NodeListOf<HTMLElement>\n\t).filter((el) => el.tabIndex !== -1);\n\treturn [list[0], list[list.length - 1]];\n}\n\n/**\n * Function that enforces browser focus to be trapped inside a DOM element.\n *\n * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element\n *\n * @param zone Angular zone\n * @param element The element around which focus will be trapped inside\n * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners\n * and free internal resources\n * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to\n * false)\n */\nexport const hubFocusTrap = (\n\tzone: NgZone,\n\telement: HTMLElement,\n\tstopFocusTrap$: Observable<any>,\n\trefocusOnClick = false\n) => {\n\tzone.runOutsideAngular(() => {\n\t\t// last focused element\n\t\tconst lastFocusedElement$ = fromEvent<FocusEvent>(\n\t\t\telement,\n\t\t\t'focusin'\n\t\t).pipe(\n\t\t\ttakeUntil(stopFocusTrap$),\n\t\t\tmap((e) => e.target)\n\t\t);\n\n\t\t// 'tab' / 'shift+tab' stream\n\t\tfromEvent<KeyboardEvent>(element, 'keydown')\n\t\t\t.pipe(\n\t\t\t\ttakeUntil(stopFocusTrap$),\n\t\t\t\tfilter((e) => e.key === 'Tab'),\n\t\t\t\twithLatestFrom(lastFocusedElement$)\n\t\t\t)\n\t\t\t.subscribe(([tabEvent, focusedElement]) => {\n\t\t\t\tconst [first, last] = getFocusableBoundaryElements(element);\n\n\t\t\t\tif (\n\t\t\t\t\t(focusedElement === first || focusedElement === element) &&\n\t\t\t\t\ttabEvent.shiftKey\n\t\t\t\t) {\n\t\t\t\t\tlast.focus();\n\t\t\t\t\ttabEvent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tif (focusedElement === last && !tabEvent.shiftKey) {\n\t\t\t\t\tfirst.focus();\n\t\t\t\t\ttabEvent.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\n\t\t// inside click\n\t\tif (refocusOnClick) {\n\t\t\tfromEvent(element, 'click')\n\t\t\t\t.pipe(\n\t\t\t\t\ttakeUntil(stopFocusTrap$),\n\t\t\t\t\twithLatestFrom(lastFocusedElement$),\n\t\t\t\t\tmap((arr) => arr[1] as HTMLElement)\n\t\t\t\t)\n\t\t\t\t.subscribe((lastFocusedElement) => lastFocusedElement.focus());\n\t\t}\n\t});\n};\n","import { NgZone } from '@angular/core';\nimport { Observable, OperatorFunction } from 'rxjs';\n\n/**\n * Converts a value to an integer using parseInt.\n *\n * @param {any} value - The `value` parameter in the `toInteger` function is the input value that needs to be converted to an\n * integer.\n *\n * @returns Is returning the parsed integer value of the input `value`.\n */\nexport function toInteger(value: any): number {\n\treturn parseInt(`${value}`, 10);\n}\n\nexport function toString(value: any): string {\n\treturn value !== undefined && value !== null ? `${value}` : '';\n}\n\nexport function getValueInRange(value: number, max: number, min = 0): number {\n\treturn Math.max(Math.min(value, max), min);\n}\n\nexport function isString(value: any): value is string {\n\treturn typeof value === 'string';\n}\n\nexport function isNumber(value: any): value is number {\n\treturn !isNaN(toInteger(value));\n}\n\nexport function isInteger(value: any): value is number {\n\treturn (\n\t\ttypeof value === 'number' &&\n\t\tisFinite(value) &&\n\t\tMath.floor(value) === value\n\t);\n}\n\nexport function isDefined(value: any): boolean {\n\treturn value !== undefined && value !== null;\n}\n\n/**\n * Determines if two objects or values are equivalent.\n *\n * @param o1 Object or value to compare.\n * @param o2 Object or value to compare.\n * @returns true if arguments are equal.\n */\nexport function equals(o1: any, o2: any): boolean {\n\tif (o1 === o2) {\n\t\treturn true;\n\t}\n\tif (o1 === null || o2 === null) {\n\t\treturn false;\n\t}\n\tif (o1 !== o1 && o2 !== o2) {\n\t\treturn true;\n\t} // NaN === NaN\n\tlet t1 = typeof o1,\n\t\tt2 = typeof o2,\n\t\tlength: number,\n\t\tkey: any,\n\t\tkeySet: any;\n\tif (t1 == t2 && t1 == 'object') {\n\t\tif (Array.isArray(o1)) {\n\t\t\tif (!Array.isArray(o2)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ((length = o1.length) == o2.length) {\n\t\t\t\tfor (key = 0; key < length; key++) {\n\t\t\t\t\tif (!equals(o1[key], o2[key])) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Array.isArray(o2)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tkeySet = Object.create(null);\n\t\t\tfor (key in o1) {\n\t\t\t\tif (!equals(o1[key], o2[key])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tkeySet[key] = true;\n\t\t\t}\n\t\t\tfor (key in o2) {\n\t\t\t\tif (!(key in keySet) && typeof o2[key] !== 'undefined') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Checks if a value is a Promise.\n *\n * @param {any} v - The parameter `v` in the `isPromise` function represents any value that is being checked to determine if it is\n * a Promise.\n *\n * @returns A boolean value indicating whether the input `v` is a Promise or not. If `v` has a `then` property, it is considered\n * a Promise and the function returns `true`. Otherwise, it returns `false`.\n */\nexport function isPromise<T>(v: any): v is Promise<T> {\n\treturn v && v.then;\n}\n\n/**\n * Pads a number with a leading zero if it is a valid number.\n *\n * @param {number} value - The `padNumber` function takes a number as input and pads it with a leading zero if it is a valid\n * number. If the input is not a number, it returns an empty string.\n *\n * @returns Takes a number as input and pads it with a leading zero if it is a valid number. If the input is a number, the function\n * returns the input value padded with a leading zero and sliced to keep only the last two characters. If the input is not a number,\n * an empty string is returned.\n */\nexport function padNumber(value: number) {\n\tif (isNumber(value)) {\n\t\treturn `0${value}`.slice(-2);\n\t} else {\n\t\treturn '';\n\t}\n}\n\n/**\n * Escapes special characters in a given text to be used in a regular expression.\n *\n * @param text - The `regExpEscape` function takes a `text` parameter as input. This function is designed to escape special\n * characters in a given text so that it can be safely used within a regular expression pattern.\n *\n * @returns A new string with any special characters in the input `text` escaped with a backslash.\n */\nexport function regExpEscape(text: string): string {\n\treturn text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\nexport function closest(\n\telement: HTMLElement,\n\tselector?: string\n): HTMLElement | null {\n\tif (!selector) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * In certain browsers (e.g. Edge 44.18362.449.0) HTMLDocument does\n\t * not support `Element.prototype.closest`. To emulate the correct behaviour\n\t * we return null when the method is missing.\n\t *\n\t * Note that in evergreen browsers `closest(document.documentElement, 'html')`\n\t * will return the document element whilst in Edge null will be returned. This\n\t * compromise was deemed good enough.\n\t */\n\tif (typeof element.closest === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn element.closest(selector);\n}\n\n/**\n * Force a browser reflow\n *\n * @param element element where to apply the reflow\n */\nexport function reflow(element: HTMLElement) {\n\treturn (element || document.body).getBoundingClientRect();\n}\n\n/**\n * Creates an observable where all callbacks are executed inside a given zone\n *\n * @param zone\n */\nexport function runInZone<T>(zone: NgZone): OperatorFunction<T, T> {\n\treturn (source) => {\n\t\treturn new Observable((observer) => {\n\t\t\tconst next = (value: T) => zone.run(() => observer.next(value));\n\t\t\tconst error = (e: any) => zone.run(() => observer.error(e));\n\t\t\tconst complete = () => zone.run(() => observer.complete());\n\t\t\treturn source.subscribe({ next, error, complete });\n\t\t});\n\t};\n}\n\nexport function removeAccents(str: string): string {\n\treturn str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n}\n\n/**\n * Replaces placeholders in a string with corresponding values from a given object.\n *\n * @param expr a string that represents the expression to be interpolated.\n * @param params an optional object that contains the values to be interpolated into the expr string.\n * @returns the interpolated string.\n */\nexport function interpolateString(\n\texpr: string = '',\n\tparams: any = {},\n\ttemplateMatcher: RegExp = /{{\\s?([^{}\\s]*)\\s?}}/g\n) {\n\tif (!params) {\n\t\treturn expr;\n\t}\n\n\treturn expr.replace(templateMatcher, (substring: string, b: string) => {\n\t\tlet r = getValue(params, b);\n\t\treturn isDefined(r) ? r : substring;\n\t});\n}\n\n/**\n * Retrieves the value of a nested property from an object using dot notation.\n *\n * @param target the object from which you want to retrieve a value.\n * @param key a string that represents the property or nested properties of the target object.\n * @returns the value of the specified key in the target object.\n */\nexport function getValue(target: any, key: string): any {\n\tlet keys = typeof key === 'string' ? key.split('.') : [key];\n\tkey = '';\n\tdo {\n\t\tkey += keys.shift();\n\t\tif (\n\t\t\tisDefined(target) &&\n\t\t\tisDefined(target[key]) &&\n\t\t\t(typeof target[key] === 'object' || !keys.length)\n\t\t) {\n\t\t\ttarget = target[key];\n\t\t\tkey = '';\n\t\t} else if (!keys.length) {\n\t\t\ttarget = undefined;\n\t\t} else {\n\t\t\tkey += '.';\n\t\t}\n\t} while (keys.length);\n\n\treturn target;\n}\n\n/**\n * Returns the active element in the given root.\n *\n * If the active element is inside a shadow root, it is searched recursively.\n */\nexport function getActiveElement(\n\troot: Document | ShadowRoot = document\n): Element | null {\n\tconst activeEl = root?.activeElement;\n\n\tif (!activeEl) {\n\t\treturn null;\n\t}\n\n\treturn activeEl.shadowRoot\n\t\t? getActiveElement(activeEl.shadowRoot)\n\t\t: activeEl;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface HubTranslationConfig {\n\tdictionaries?: Record<string, Record<string, any>>;\n\tlanguage?: string;\n\tfallbackLanguage?: string;\n}\n\nexport const HUB_TRANSLATION_CONFIG = new InjectionToken<HubTranslationConfig>(\n\t'HUB_TRANSLATION_CONFIG'\n);\n","import { Injectable, inject } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { getValue } from '../util';\nimport { HUB_TRANSLATION_CONFIG, HubTranslationConfig } from './translation.tokens';\n\n@Injectable()\nexport class HubTranslationService {\n\t#config: HubTranslationConfig =\n\t\tinject(HUB_TRANSLATION_CONFIG, { optional: true }) ?? {};\n\n\tdefaultTranslations: Record<string, string | any> =\n\t\tthis.#config.dictionaries ?? {};\n\n\ttranslations!: Record<string, string>;\n\n\tprivate translationSource = new Subject<any>();\n\n\ttranslationObserver = this.translationSource.asObservable();\n\n\tconstructor() {\n\t\tthis.initialize();\n\t}\n\n\tinitialize() {\n\t\tconst language = this.#config.language ?? this.#config.fallbackLanguage ?? 'en';\n\t\tconst fallbackLanguage = this.#config.fallbackLanguage ?? 'en';\n\t\tconst fallbackTranslations =\n\t\t\tthis.defaultTranslations[fallbackLanguage] ?? {};\n\t\tconst selectedTranslations =\n\t\t\tthis.defaultTranslations[language] ?? fallbackTranslations;\n\n\t\tthis.setTranslations(selectedTranslations);\n\t}\n\n\t/**\n\t * Retrieves a value from a translations object based on a given key.\n\t */\n\tgetTranslation(key: string): any {\n\t\treturn getValue(this.translations, key);\n\t}\n\n\t/**\n\t * Merges fallback translations with the provided translations and updates observers.\n\t */\n\tsetTranslations(translations: Record<string, string> | any = {}) {\n\t\tconst fallbackLanguage = this.#config.fallbackLanguage ?? 'en';\n\t\tconst fallbackTranslations =\n\t\t\tthis.defaultTranslations[fallbackLanguage] ?? {};\n\t\tconst nextTranslations = translations ?? {};\n\n\t\tthis.translations = { ...fallbackTranslations, ...nextTranslations };\n\t\tthis.translationSource.next(this.translations);\n\t}\n}\n","import { ElementRef } from '@angular/core';\nimport type { ConnectionPosition } from './connection-position';\nimport type { HorizontalConnectionPos } from './horizontal-connection-pos';\nimport type { VerticalConnectionPos } from './vertical-connection-pos';\n\n/**\n * Positions an overlay container relative to an origin element.\n * The first configured position that fits within the viewport is applied.\n */\nexport class OverlayPosition {\n\tprivate _origin: ElementRef | HTMLElement | null = null;\n\tprivate _positions: ConnectionPosition[] = [];\n\n\t/**\n\t * Sets the origin element used to position the overlay.\n\t *\n\t * @param origin Element reference or HTMLElement.\n\t * @returns This position instance for chaining.\n\t */\n\tflexibleConnectedTo(origin: ElementRef | HTMLElement): this {\n\t\tthis._origin = origin;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the preferred positions for the overlay.\n\t * The order of the array determines the fallback priority.\n\t *\n\t * @param positions Array of position configurations.\n\t * @returns This position instance for chaining.\n\t */\n\twithPositions(positions: ConnectionPosition[]): this {\n\t\tthis._positions = positions;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Applies the calculated position to the overlay element.\n\t *\n\t * @param overlayElement The overlay container element.\n\t */\n\tapply(overlayElement: HTMLElement): void {\n\t\tif (!this._origin) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst originElement = this._origin instanceof ElementRef ? this._origin.nativeElement : this._origin;\n\t\tconst originRect = originElement.getBoundingClientRect();\n\n\t\t// Try each position until we find one that fits in the viewport\n\t\tfor (const position of this._positions) {\n\t\t\tconst coords = this._calculatePosition(originRect, overlayElement, position);\n\n\t\t\tif (this._fitsInViewport(coords, overlayElement)) {\n\t\t\t\tthis._applyPosition(overlayElement, coords);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// If no position fits perfectly, use the first one\n\t\tif (this._positions.length > 0) {\n\t\t\tconst coords = this._calculatePosition(originRect, overlayElement, this._positions[0]);\n\t\t\tthis._applyPosition(overlayElement, coords);\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the position coordinates based on the configuration.\n\t *\n\t * @param originRect Bounding rectangle of the origin element.\n\t * @param overlayElement The overlay element.\n\t * @param position Position configuration.\n\t * @returns Calculated x and y coordinates.\n\t */\n\tprivate _calculatePosition(originRect: DOMRect, overlayElement: HTMLElement, position: ConnectionPosition): { x: number; y: number } {\n\t\tconst overlayRect = overlayElement.getBoundingClientRect();\n\n\t\t// Calculate origin point\n\t\tlet x = this._getOriginX(originRect, position.originX);\n\t\tlet y = this._getOriginY(originRect, position.originY);\n\n\t\t// Adjust for overlay alignment\n\t\tx -= this._getOverlayX(overlayRect, position.overlayX);\n\t\ty -= this._getOverlayY(overlayRect, position.overlayY);\n\n\t\t// Apply offsets\n\t\tif (position.offsetX) {\n\t\t\tx += position.offsetX;\n\t\t}\n\t\tif (position.offsetY) {\n\t\t\ty += position.offsetY;\n\t\t}\n\n\t\treturn { x, y };\n\t}\n\n\t/**\n\t * Gets the X coordinate for the origin point.\n\t */\n\tprivate _getOriginX(rect: DOMRect, position: HorizontalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'start':\n\t\t\t\treturn rect.left;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.left + rect.width / 2;\n\t\t\tcase 'end':\n\t\t\t\treturn rect.right;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the Y coordinate for the origin point.\n\t */\n\tprivate _getOriginY(rect: DOMRect, position: VerticalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'top':\n\t\t\t\treturn rect.top;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.top + rect.height / 2;\n\t\t\tcase 'bottom':\n\t\t\t\treturn rect.bottom;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the X offset for the overlay alignment.\n\t */\n\tprivate _getOverlayX(rect: DOMRect, position: HorizontalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'start':\n\t\t\t\treturn 0;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.width / 2;\n\t\t\tcase 'end':\n\t\t\t\treturn rect.width;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the Y offset for the overlay alignment.\n\t */\n\tprivate _getOverlayY(rect: DOMRect, position: VerticalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'top':\n\t\t\t\treturn 0;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.height / 2;\n\t\t\tcase 'bottom':\n\t\t\t\treturn rect.height;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the overlay fits within the viewport at the given coordinates.\n\t */\n\tprivate _fitsInViewport(\n\t\tcoords: { x: number; y: number },\n\t\toverlayElement: HTMLElement\n\t): boolean {\n\t\tconst overlayRect = overlayElement.getBoundingClientRect();\n\t\tconst viewportWidth = window.innerWidth;\n\t\tconst viewportHeight = window.innerHeight;\n\n\t\treturn (\n\t\t\tcoords.x >= 0 &&\n\t\t\tcoords.y >= 0 &&\n\t\t\tcoords.x + overlayRect.width <= viewportWidth &&\n\t\t\tcoords.y + overlayRect.height <= viewportHeight\n\t\t);\n\t}\n\n\t/**\n\t * Applies the calculated position to the overlay element.\n\t */\n\tprivate _applyPosition(\n\t\toverlayElement: HTMLElement,\n\t\tcoords: { x: number; y: number }\n\t): void {\n\t\toverlayElement.style.left = `${coords.x}px`;\n\t\toverlayElement.style.top = `${coords.y}px`;\n\t}\n}\n","import {\n\tApplicationRef,\n\tComponentRef,\n\tcreateComponent,\n\tEmbeddedViewRef,\n\tTemplateRef,\n\tType,\n\tViewContainerRef\n} from '@angular/core';\nimport type { OverlayConfig } from './overlay-config';\n\n/**\n * Manages a single overlay instance created by {@link OverlayService}.\n * Creates a container and optional backdrop in `document.body` and attaches\n * either a template or component as the overlay content.\n */\nexport class OverlayRef {\n\tprivate _backdropElement: HTMLElement | null = null;\n\tprivate _containerElement: HTMLElement | null = null;\n\tprivate _contentElement: HTMLElement | null = null;\n\tprivate _viewRef: EmbeddedViewRef<unknown> | null = null;\n\tprivate _componentRef: ComponentRef<unknown> | null = null;\n\tprivate _isAttached = false;\n\tprivate _backdropClickCallback?: () => void;\n\tprivate _backdropClickHandler?: () => void;\n\n\tconstructor(\n\t\tprivate _config: OverlayConfig,\n\t\tprivate _appRef: ApplicationRef\n\t) {}\n\n\t/**\n\t * Attaches content to the overlay.\n\t *\n\t * If the overlay is already attached, it only updates the position strategy\n\t * and returns the existing content element.\n\t *\n\t * @param content Template or component type to attach.\n\t * @param viewContainerRef View container used to create embedded views for templates.\n\t * @returns The attached content element (first root node).\n\t * @throws When a {@link TemplateRef} is provided without a {@link ViewContainerRef}.\n\t */\n\tattach(\n\t\tcontent: TemplateRef<unknown> | Type<unknown>,\n\t\tviewContainerRef?: ViewContainerRef\n\t): HTMLElement {\n\t\t// If already attached, just update position and return existing element\n\t\tif (this._isAttached && this._contentElement) {\n\t\t\tif (this._config.positionStrategy) {\n\t\t\t\tthis._config.positionStrategy.apply(this._containerElement!);\n\t\t\t}\n\t\t\treturn this._contentElement;\n\t\t}\n\n\t\tthis._createContainer();\n\t\tthis._createBackdrop();\n\n\t\tlet contentElement: HTMLElement;\n\n\t\tif (content instanceof TemplateRef) {\n\t\t\tif (!viewContainerRef) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'ViewContainerRef is required when attaching a TemplateRef'\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Only create and attach view if not already created\n\t\t\tif (!this._viewRef) {\n\t\t\t\tthis._viewRef = viewContainerRef.createEmbeddedView(content);\n\t\t\t\tthis._viewRef.detectChanges();\n\t\t\t}\n\t\t\tcontentElement = this._viewRef.rootNodes[0] as HTMLElement;\n\t\t} else {\n\t\t\tif (this._componentRef) {\n\t\t\t\tthis._appRef.detachView(this._componentRef.hostView);\n\t\t\t\tthis._componentRef.destroy();\n\t\t\t}\n\t\t\tthis._componentRef = createComponent(content, {\n\t\t\t\tenvironmentInjector: this._appRef.injector\n\t\t\t});\n\t\t\tthis._appRef.attachView(this._componentRef.hostView);\n\t\t\tcontentElement = (this._componentRef.hostView as EmbeddedViewRef<unknown>)\n\t\t\t\t.rootNodes[0] as HTMLElement;\n\t\t}\n\n\t\tthis._contentElement = contentElement;\n\n\t\t// Only append if not already in container\n\t\tif (!this._containerElement!.contains(contentElement)) {\n\t\t\tthis._containerElement!.appendChild(contentElement);\n\t\t}\n\n\t\tthis._isAttached = true;\n\n\t\t// Apply position strategy\n\t\tif (this._config.positionStrategy) {\n\t\t\tthis._config.positionStrategy.apply(this._containerElement!);\n\t\t}\n\n\t\treturn contentElement;\n\t}\n\n\t/**\n\t * Detaches the content from the overlay container without disposing the overlay.\n\t */\n\tdetach(): void {\n\t\tif (!this._isAttached) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._contentElement && this._containerElement) {\n\t\t\tthis._containerElement.removeChild(this._contentElement);\n\t\t}\n\n\t\tthis._isAttached = false;\n\t}\n\n\t/**\n\t * Disposes the overlay and cleans up all allocated resources.\n\t */\n\tdispose(): void {\n\t\tthis.detach();\n\n\t\t// Destroy view ref if exists\n\t\tif (this._viewRef) {\n\t\t\tthis._viewRef.destroy();\n\t\t\tthis._viewRef = null;\n\t\t}\n\n\t\tif (this._componentRef) {\n\t\t\tthis._appRef.detachView(this._componentRef.hostView);\n\t\t\tthis._componentRef.destroy();\n\t\t\tthis._componentRef = null;\n\t\t}\n\n\t\tif (this._containerElement) {\n\t\t\tdocument.body.removeChild(this._containerElement);\n\t\t\tthis._containerElement = null;\n\t\t}\n\n\t\tif (this._backdropElement) {\n\t\t\t// Remove event listener before removing element from DOM\n\t\t\tif (this._backdropClickHandler) {\n\t\t\t\tthis._backdropElement.removeEventListener(\n\t\t\t\t\t'click',\n\t\t\t\t\tthis._backdropClickHandler\n\t\t\t\t);\n\t\t\t\tthis._backdropClickHandler = undefined;\n\t\t\t}\n\t\t\tdocument.body.removeChild(this._backdropElement);\n\t\t\tthis._backdropElement = null;\n\t\t}\n\n\t\tthis._contentElement = null;\n\t\tthis._backdropClickCallback = undefined;\n\t}\n\n\t/**\n\t * Checks whether content is currently attached to the overlay.\n\t */\n\thasAttached(): boolean {\n\t\treturn this._isAttached;\n\t}\n\n\t/**\n\t * Registers a callback for backdrop clicks.\n\t * The last registered callback replaces any previous one.\n\t *\n\t * @param callback Function to call when the backdrop is clicked.\n\t */\n\tonBackdropClick(callback: () => void): void {\n\t\tthis._backdropClickCallback = callback;\n\t}\n\n\t/**\n\t * Re-applies the configured position strategy to the overlay container.\n\t */\n\tupdatePosition(): void {\n\t\tif (this._config.positionStrategy && this._containerElement) {\n\t\t\tthis._config.positionStrategy.apply(this._containerElement);\n\t\t}\n\t}\n\n\t/**\n\t * Creates the overlay container element and appends it to the document.\n\t */\n\tprivate _createContainer(): void {\n\t\tif (this._containerElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._containerElement = document.createElement('div');\n\t\tthis._containerElement.classList.add('hub-overlay-container');\n\n\t\tif (this._config.panelClass) {\n\t\t\tconst classes = Array.isArray(this._config.panelClass)\n\t\t\t\t? this._config.panelClass\n\t\t\t\t: [this._config.panelClass];\n\t\t\tclasses.forEach((cls) => this._containerElement!.classList.add(cls));\n\t\t}\n\n\t\tif (this._config.width) {\n\t\t\tthis._containerElement.style.width =\n\t\t\t\ttypeof this._config.width === 'number'\n\t\t\t\t\t? `${this._config.width}px`\n\t\t\t\t\t: this._config.width;\n\t\t}\n\n\t\tif (this._config.height) {\n\t\t\tthis._containerElement.style.height =\n\t\t\t\ttypeof this._config.height === 'number'\n\t\t\t\t\t? `${this._config.height}px`\n\t\t\t\t\t: this._config.height;\n\t\t}\n\n\t\tthis._containerElement.style.position = 'fixed';\n\t\tthis._containerElement.style.zIndex = '1000';\n\n\t\tdocument.body.appendChild(this._containerElement);\n\t}\n\n\t/**\n\t * Creates the backdrop element if enabled and appends it to the document.\n\t */\n\tprivate _createBackdrop(): void {\n\t\tif (!this._config.hasBackdrop || this._backdropElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._backdropElement = document.createElement('div');\n\t\tthis._backdropElement.classList.add('hub-overlay-backdrop');\n\n\t\tif (this._config.backdropClass) {\n\t\t\tthis._backdropElement.classList.add(this._config.backdropClass);\n\t\t}\n\n\t\tthis._backdropElement.style.position = 'fixed';\n\t\tthis._backdropElement.style.top = '0';\n\t\tthis._backdropElement.style.left = '0';\n\t\tthis._backdropElement.style.width = '100%';\n\t\tthis._backdropElement.style.height = '100%';\n\t\tthis._backdropElement.style.zIndex = '999';\n\n\t\t// Store reference to the handler for cleanup\n\t\tthis._backdropClickHandler = () => {\n\t\t\tif (this._backdropClickCallback) {\n\t\t\t\tthis._backdropClickCallback();\n\t\t\t}\n\t\t};\n\n\t\tthis._backdropElement.addEventListener('click', this._backdropClickHandler);\n\n\t\tdocument.body.appendChild(this._backdropElement);\n\t}\n}\n","import { ApplicationRef, inject, Injectable } from '@angular/core';\nimport { OverlayPosition } from './overlay-position';\nimport { OverlayRef } from './overlay-ref';\nimport type { OverlayConfig } from './overlay-config';\n\n/**\n * Service for creating and managing overlay instances.\n */\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class OverlayService {\n\tprivate readonly _appRef = inject(ApplicationRef);\n\n\t/**\n\t * Creates a new overlay with the specified configuration.\n\t *\n\t * @param config Configuration options for the overlay.\n\t * @returns A reference to the created overlay.\n\t */\n\tcreate(config: OverlayConfig = {}): OverlayRef {\n\t\treturn new OverlayRef(config, this._appRef);\n\t}\n\n\t/**\n\t * Creates a position strategy builder for connected overlays.\n\t *\n\t * @returns A new {@link OverlayPosition} instance.\n\t */\n\tposition(): OverlayPosition {\n\t\treturn new OverlayPosition();\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'get',\n\tstandalone: true\n})\nexport class GetPipe implements PipeTransform {\n\t/**\n\t * @param value The object to retrieve the property from.\n\t * @param path The dot-separated path string to the property.\n\t * @param defaultValue The value to return if the property is not found.\n\t */\n\ttransform(value: any, path: string, defaultValue?: any): any {\n\t\tif (typeof path !== 'string') {\n\t\t\treturn value;\n\t\t}\n\t\treturn path\n\t\t\t.split('.')\n\t\t\t.reduce(\n\t\t\t\t(a, c) =>\n\t\t\t\t\ta && a[c] !== null && a[c] !== undefined\n\t\t\t\t\t\t? a[c]\n\t\t\t\t\t\t: defaultValue || null,\n\t\t\t\tvalue\n\t\t\t);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'isObject'\n})\nexport class IsObjectPipe implements PipeTransform {\n\n\ttransform(value: any): boolean {\n\t\treturn typeof value === 'object';\n\t}\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { isObservable, Observable } from 'rxjs';\n\n@Pipe({\n\tname: 'isObservable',\n\tstandalone: true\n})\nexport class IsObservablePipe<T = any> implements PipeTransform {\n\ttransform(value: T | Observable<T>): boolean {\n\t\treturn isObservable(value);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'isString'\n})\nexport class IsStringPipe implements PipeTransform {\n\n\ttransform(value: any): boolean {\n\t\treturn typeof value === 'string';\n\t}\n\n}\n","import {\n\tChangeDetectorRef,\n\tOnDestroy,\n\tPipe,\n\tPipeTransform,\n\tinject\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { equals, interpolateString, isDefined } from '../util';\nimport { HubTranslationService } from '../i18n/hub-translation.service';\n\n@Pipe({\n\tname: 'translate',\n\tstandalone: true,\n\tpure: false\n})\nexport class TranslatePipe implements PipeTransform, OnDestroy {\n\tprivate _ref = inject(ChangeDetectorRef);\n\tprivate _translationSvc = inject(HubTranslationService);\n\n\tvalue: string = '';\n\tlastKey: string | null = null;\n\tlastParams: any[] = [];\n\n\ttranslationSubscription: Subscription | undefined;\n\n\t/**\n\t * Updates the value of a key by interpolating the translation and marking for change detection.\n\t */\n\tupdateValue(key: string, interpolateParams?: Object): void {\n\t\tconst value = interpolateString(\n\t\t\tthis._translationSvc.getTranslation(key),\n\t\t\tinterpolateParams\n\t\t);\n\t\tthis.value = value !== undefined ? value : key;\n\t\tthis.lastKey = key;\n\t\tthis._ref.markForCheck();\n\t}\n\n\t/**\n\t * Transforms a translation key with optional interpolation params.\n\t */\n\ttransform(query: string, ...args: any[]): any {\n\t\tif (!query || !query.length) {\n\t\t\treturn query;\n\t\t}\n\n\t\t// If we ask another time for the same key, return the last value.\n\t\tif (equals(query, this.lastKey) && equals(args, this.lastParams)) {\n\t\t\treturn this.value;\n\t\t}\n\n\t\tlet interpolateParams: Object | undefined = undefined;\n\t\tif (isDefined(args[0]) && args.length) {\n\t\t\tif (typeof args[0] === 'string' && args[0].length) {\n\t\t\t\t// We accept objects written in the template such as {n:1}, {'n':1}, {n:'v'}.\n\t\t\t\t// This converts them to valid JSON.\n\t\t\t\tlet validArgs: string = args[0]\n\t\t\t\t\t.replace(/(\\')?([a-zA-Z0-9_]+)(\\')?(\\s)?:/g, '\"$2\":')\n\t\t\t\t\t.replace(/:(\\s)?(\\')(.*?)(\\')/g, ':\"$3\"');\n\t\t\t\ttry {\n\t\t\t\t\tinterpolateParams = JSON.parse(validArgs);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new SyntaxError(\n\t\t\t\t\t\t`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${args[0]}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if (typeof args[0] === 'object' && !Array.isArray(args[0])) {\n\t\t\t\tinterpolateParams = args[0];\n\t\t\t}\n\t\t}\n\n\t\t// Store the query, in case it changes.\n\t\tthis.lastKey = query;\n\n\t\t// Store the params, in case they change.\n\t\tthis.lastParams = args;\n\n\t\t// Set the value.\n\t\tthis.updateValue(query, interpolateParams);\n\n\t\t// Clean any existing subscription.\n\t\tthis._dispose();\n\n\t\tif (!this.translationSubscription) {\n\t\t\tthis.translationSubscription =\n\t\t\t\tthis._translationSvc.translationObserver.subscribe(() => {\n\t\t\t\t\tif (this.lastKey) {\n\t\t\t\t\t\tthis.lastKey = null;\n\t\t\t\t\t\tthis.updateValue(query, interpolateParams);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * Clean any existing subscription to change events.\n\t */\n\tprivate _dispose(): void {\n\t\tif (typeof this.translationSubscription !== 'undefined') {\n\t\t\tthis.translationSubscription.unsubscribe();\n\t\t\tthis.translationSubscription = undefined;\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._dispose();\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'ucfirst',\n\tstandalone: true\n})\nexport class UcfirstPipe implements PipeTransform {\n\ttransform(value: string = ''): string {\n\t\treturn value.charAt(0).toUpperCase() + value.slice(1);\n\t}\n}\n","import {\n\tChangeDetectorRef,\n\tinject,\n\tOnDestroy,\n\tPipe,\n\tPipeTransform\n} from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\n\n/**\n * A standalone pipe that unwraps the value of an observable or returns the value directly if it's not an observable.\n *\n * @description\n * The `UnwrapAsyncPipe` is used to unwrap the value emitted by an observable or return the value directly if it's not an observable.\n * It subscribes to the observable and returns the emitted value. If the input is not an observable, it simply returns the value.\n *\n * @usageNotes\n * ```html\n * <div>{{ observableOrValue | unwrapAsync }}</div>\n * ```\n *\n * @publicApi\n */\n@Pipe({\n\tname: 'unwrapAsync',\n\tstandalone: true,\n\tpure: false\n})\nexport class UnwrapAsyncPipe<T = any> implements PipeTransform, OnDestroy {\n\t#cdr = inject(ChangeDetectorRef);\n\n\t/**\n\t * The unwrapped value of the observable or the direct value.\n\t */\n\tvalue: T | null = null;\n\n\t/**\n\t * The subscription to the observable.\n\t */\n\tsubscription: Subscription | null = null;\n\n\t/**\n\t * Performs cleanup tasks when the pipe is destroyed.\n\t */\n\tngOnDestroy(): void {\n\t\tthis.unsubscribe();\n\t}\n\n\t/**\n\t * Transforms the input value.\n\t *\n\t * @param value The input value to transform. It can be an observable or a direct value.\n\t * @returns The unwrapped value of the observable or the direct value.\n\t */\n\ttransform(value: T | Observable<T>): T | null {\n\t\tif (value instanceof Observable) {\n\t\t\tthis.unsubscribe();\n\t\t\tthis.subscription = value.subscribe((result) => {\n\t\t\t\tthis.value = result;\n\t\t\t\tthis.#cdr.markForCheck();\n\t\t\t});\n\t\t} else {\n\t\t\t// Clean up subscription when switching to direct value\n\t\t\tthis.unsubscribe();\n\t\t\tthis.value = value;\n\t\t}\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * Unsubscribes from the current subscription.\n\t */\n\tprivate unsubscribe(): void {\n\t\tif (this.subscription) {\n\t\t\tthis.subscription.unsubscribe();\n\t\t\tthis.subscription = null;\n\t\t}\n\t}\n}\n","export function getTransitionDurationMs(element: HTMLElement) {\n\tconst { transitionDelay, transitionDuration } = window.getComputedStyle(element);\n\tconst transitionDelaySec = parseFloat(transitionDelay);\n\tconst transitionDurationSec = parseFloat(transitionDuration);\n\n\treturn (transitionDelaySec + transitionDurationSec) * 1000;\n}\n","import { NgZone } from '@angular/core';\nimport { EMPTY, fromEvent, Observable, of, race, Subject, timer } from 'rxjs';\nimport { endWith, filter, takeUntil } from 'rxjs/operators';\nimport { runInZone } from '../util';\nimport { getTransitionDurationMs } from './util';\n\nconst transitionTimerDelayMs = 5;\n\nexport type TransitionStartFn<T = any> = (\n\telement: HTMLElement,\n\tanimation: boolean,\n\tcontext: T\n) => TransitionEndFn | void;\nexport type TransitionEndFn = () => void;\n\nexport interface TransitionOptions<T> {\n\tanimation: boolean;\n\trunningTransition: 'continue' | 'stop';\n\tcontext?: T;\n}\n\nexport interface TransitionCtx<T> {\n\ttransition$: Subject<any>;\n\tcomplete: () => void;\n\tcontext: T;\n}\n\nconst noopFn: TransitionEndFn = () => {};\n\nconst runningTransitions = new Map<HTMLElement, TransitionCtx<any>>();\n\nexport const hubRunTransition = <T>(\n\tzone: NgZone,\n\telement: HTMLElement,\n\tstartFn: TransitionStartFn<T>,\n\toptions: TransitionOptions<T>\n): Observable<void> => {\n\t// Getting initial context from options\n\tlet context = options.context || <T>{};\n\n\t// Checking if there are already running transitions on the given element.\n\tconst running = runningTransitions.get(element);\n\tif (running) {\n\t\tswitch (options.runningTransition) {\n\t\t\t// If there is one running and we want for it to 'continue' to run, we have to cancel the new one.\n\t\t\t// We're not emitting any values, but simply completing the observable (EMPTY).\n\t\t\tcase 'continue':\n\t\t\t\treturn EMPTY;\n\t\t\t// If there is one running and we want for it to 'stop', we have to complete the running one.\n\t\t\t// We're simply completing the running one and not emitting any values and merging newly provided context\n\t\t\t// with the one coming from currently running transition.\n\t\t\tcase 'stop':\n\t\t\t\tzone.run(() => running.transition$.complete());\n\t\t\t\tcontext = Object.assign(running.context, context);\n\t\t\t\trunningTransitions.delete(element);\n\t\t}\n\t}\n\n\t// Running the start function\n\tconst endFn = startFn(element, options.animation, context) || noopFn;\n\n\t// If 'prefer-reduced-motion' is enabled, the 'transition' will be set to 'none'.\n\t// If animations are disabled, we have to emit a value and complete the observable\n\t// In this case we have to call the end function, but can finish immediately by emitting a value,\n\t// completing the observable and executing end functions synchronously.\n\tif (\n\t\t!options.animation ||\n\t\twindow.getComputedStyle(element).transitionProperty === 'none'\n\t) {\n\t\tzone.run(() => endFn());\n\t\treturn of(undefined).pipe(runInZone(zone));\n\t}\n\n\t// Starting a new transition\n\tconst transition$ = new Subject<void>();\n\tconst finishTransition$ = new Subject<void>();\n\tconst stop$ = transition$.pipe(endWith(true));\n\trunningTransitions.set(element, {\n\t\ttransition$,\n\t\tcomplete: () => {\n\t\t\tfinishTransition$.next();\n\t\t\tfinishTransition$.complete();\n\t\t},\n\t\tcontext\n\t});\n\n\tconst transitionDurationMs = getTransitionDurationMs(element);\n\n\t// 1. We have to both listen for the 'transitionend' event and have a 'just-in-case' timer,\n\t// because 'transitionend' event might not be fired in some browsers, if the transitioning\n\t// element becomes invisible (ex. when scrolling, making browser tab inactive, etc.). The timer\n\t// guarantees, that we'll release the DOM element and complete 'hubRunTransition'.\n\t// 2. We need to filter transition end events, because they might bubble from shorter transitions\n\t// on inner DOM elements. We're only interested in the transition on the 'element' itself.\n\tzone.runOutsideAngular(() => {\n\t\tconst transitionEnd$ = fromEvent(element, 'transitionend').pipe(\n\t\t\ttakeUntil(stop$),\n\t\t\tfilter(({ target }) => target === element)\n\t\t);\n\t\tconst timer$ = timer(\n\t\t\ttransitionDurationMs + transitionTimerDelayMs\n\t\t).pipe(takeUntil(stop$));\n\n\t\trace(timer$, transitionEnd$, finishTransition$)\n\t\t\t.pipe(takeUntil(stop$))\n\t\t\t.subscribe(() => {\n\t\t\t\trunningTransitions.delete(element);\n\t\t\t\tzone.run(() => {\n\t\t\t\t\tendFn();\n\t\t\t\t\ttransition$.next();\n\t\t\t\t\ttransition$.complete();\n\t\t\t\t});\n\t\t\t});\n\t});\n\n\treturn transition$.asObservable();\n};\n\nexport const hubCompleteTransition = (element: HTMLElement) => {\n\trunningTransitions.get(element)?.complete();\n};\n","import {\n\tApplicationRef,\n\tComponentRef,\n\tinject,\n\tInjector,\n\tNgZone,\n\tTemplateRef,\n\tType,\n\tViewContainerRef,\n\tViewRef\n} from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { mergeMap, take, tap } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\nimport { hubRunTransition } from './transitions';\n\nexport class ContentRef {\n\tconstructor(\n\t\tpublic nodes: Node[][],\n\t\tpublic viewRef?: ViewRef,\n\t\tpublic componentRef?: ComponentRef<any>\n\t) {}\n}\n\nexport class PopupService<T> {\n\tprivate _windowRef: ComponentRef<T> | null = null;\n\tprivate _contentRef: ContentRef | null = null;\n\n\tprivate _document = inject(DOCUMENT);\n\tprivate _applicationRef = inject(ApplicationRef);\n\tprivate _injector = inject(Injector);\n\tprivate _viewContainerRef = inject(ViewContainerRef);\n\tprivate _ngZone = inject(NgZone);\n\n\tconstructor(private _componentType: Type<T>) {}\n\n\topen(\n\t\tcontent?: string | TemplateRef<any>,\n\t\ttemplateContext?: any,\n\t\tanimation = false\n\t): { windowRef: ComponentRef<T>; transition$: Observable<void> } {\n\t\tif (!this._windowRef) {\n\t\t\tthis._contentRef = this._getContentRef(content, templateContext);\n\t\t\tthis._windowRef = this._viewContainerRef.createComponent(\n\t\t\t\tthis._componentType,\n\t\t\t\t{\n\t\t\t\t\tinjector: this._injector,\n\t\t\t\t\tprojectableNodes: this._contentRef.nodes\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tconst { nativeElement } = this._windowRef.location;\n\t\tconst transition$ = this._ngZone.onStable.pipe(\n\t\t\ttake(1),\n\t\t\tmergeMap(() =>\n\t\t\t\thubRunTransition(\n\t\t\t\t\tthis._ngZone,\n\t\t\t\t\tnativeElement,\n\t\t\t\t\t({ classList }) => classList.add('show'),\n\t\t\t\t\t{\n\t\t\t\t\t\tanimation,\n\t\t\t\t\t\trunningTransition: 'continue'\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn { windowRef: this._windowRef, transition$ };\n\t}\n\n\tclose(animation = false): Observable<void> {\n\t\tif (!this._windowRef) {\n\t\t\treturn of(undefined);\n\t\t}\n\n\t\treturn hubRunTransition(\n\t\t\tthis._ngZone,\n\t\t\tthis._windowRef.location.nativeElement,\n\t\t\t({ classList }) => classList.remove('show'),\n\t\t\t{ animation, runningTransition: 'stop' }\n\t\t).pipe(\n\t\t\ttap(() => {\n\t\t\t\tthis._windowRef?.destroy();\n\t\t\t\tthis._contentRef?.viewRef?.destroy();\n\t\t\t\tthis._windowRef = null;\n\t\t\t\tthis._contentRef = null;\n\t\t\t})\n\t\t);\n\t}\n\n\tprivate _getContentRef(\n\t\tcontent?: string | TemplateRef<any>,\n\t\ttemplateContext?: any\n\t): ContentRef {\n\t\tif (!content) {\n\t\t\treturn new ContentRef([]);\n\t\t} else if (content instanceof TemplateRef) {\n\t\t\tconst viewRef = content.createEmbeddedView(templateContext);\n\t\t\tthis._applicationRef.attachView(viewRef);\n\t\t\treturn new ContentRef([viewRef.rootNodes], viewRef);\n\t\t} else {\n\t\t\treturn new ContentRef([\n\t\t\t\t[this._document.createTextNode(`${content}`)]\n\t\t\t]);\n\t\t}\n\t}\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/** Type for the callback used to revert the scrollbar. */\nexport type ScrollbarReverter = () => void;\n\n/**\n * Utility to handle the scrollbar.\n *\n * It allows to hide the scrollbar and compensate the lack of a vertical scrollbar\n * by adding an equivalent padding on the right of the body, and to revert this change.\n */\n@Injectable({ providedIn: 'root' })\nexport class ScrollBar {\n\tprivate _document = inject(DOCUMENT);\n\n\t/**\n\t * To be called to hide a potential vertical scrollbar:\n\t * - if a scrollbar is there and has a width greater than 0, adds some compensation\n\t * padding to the body to keep the same layout as when the scrollbar is there\n\t * - adds overflow: hidden\n\t *\n\t * @return a callback used to revert the change\n\t */\n\thide(): ScrollbarReverter {\n\t\tconst scrollbarWidth = Math.abs(window.innerWidth - this._document.documentElement.clientWidth);\n\t\tconst body = this._document.body;\n\t\tconst bodyStyle = body.style;\n\t\tconst { overflow, paddingRight } = bodyStyle;\n\t\tif (scrollbarWidth > 0) {\n\t\t\tconst actualPadding = parseFloat(window.getComputedStyle(body).paddingRight);\n\t\t\tbodyStyle.paddingRight = `${actualPadding + scrollbarWidth}px`;\n\t\t}\n\t\tbodyStyle.overflow = 'hidden';\n\t\treturn () => {\n\t\t\tif (scrollbarWidth > 0) {\n\t\t\t\tbodyStyle.paddingRight = paddingRight;\n\t\t\t}\n\t\t\tbodyStyle.overflow = overflow;\n\t\t};\n\t}\n}\n","/*\n * Public API Surface of utils\n */\n\nexport * from './lib/focus-trap';\nexport * from './lib/i18n/hub-translation.service';\nexport * from './lib/i18n/translation.tokens';\nexport * from './lib/overlay';\nexport { GetPipe } from './lib/pipes/get.pipe';\nexport { IsObjectPipe } from './lib/pipes/is-object.pipe';\nexport { IsObservablePipe } from './lib/pipes/is-observable.pipe';\nexport { IsStringPipe } from './lib/pipes/is-string.pipe';\nexport * from './lib/pipes/translate.pipe';\nexport { UcfirstPipe } from './lib/pipes/ucfirst.pipe';\nexport { UnwrapAsyncPipe } from './lib/pipes/unwrap-async.pipe';\nexport * from './lib/popup';\nexport * from './lib/scrollbar';\nexport * from './lib/transitions';\nexport * from './lib/util';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKO,MAAM,2BAA2B,GAAG;IAC1C,SAAS;IACT,wBAAwB;IACxB,4CAA4C;IAC5C,wBAAwB;IACxB,0BAA0B;IAC1B,mBAAmB;IACnB;AACA,CAAA,CAAC,IAAI,CAAC,IAAI;AAEX;;AAEG;AACG,SAAU,4BAA4B,CAC3C,OAAoB,EAAA;AAEpB,IAAA,MAAM,IAAI,GAAkB,KAAK,CAAC,IAAI,CACrC,OAAO,CAAC,gBAAgB,CACvB,2BAA2B,CACA,CAC5B,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC;AACpC,IAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACxC;AAEA;;;;;;;;;;;AAWG;AACI,MAAM,YAAY,GAAG,CAC3B,IAAY,EACZ,OAAoB,EACpB,cAA+B,EAC/B,cAAc,GAAG,KAAK,KACnB;AACH,IAAA,IAAI,CAAC,iBAAiB,CAAC,MAAK;;AAE3B,QAAA,MAAM,mBAAmB,GAAG,SAAS,CACpC,OAAO,EACP,SAAS,CACT,CAAC,IAAI,CACL,SAAS,CAAC,cAAc,CAAC,EACzB,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CACpB;;AAGD,QAAA,SAAS,CAAgB,OAAO,EAAE,SAAS;aACzC,IAAI,CACJ,SAAS,CAAC,cAAc,CAAC,EACzB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,K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A,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI;AAChC,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;AAC5B,QAAA,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,SAAS;AAC5C,QAAA,IAAI,cAAc,GAAG,CAAC,EAAE;AACvB,YAAA,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC;YAC5E,SAAS,CAAC,YAAY,GAAG,CAAA,EAAG,aAAa,GAAG,cAAc,IAAI;QAC/D;AACA,QAAA,SAAS,CAAC,QAAQ,GAAG,QAAQ;AAC7B,QAAA,OAAO,MAAK;AACX,YAAA,IAAI,cAAc,GAAG,CAAC,EAAE;AACvB,gBAAA,SAAS,CAAC,YAAY,GAAG,YAAY;YACtC;AACA,YAAA,SAAS,CAAC,QAAQ,GAAG,QAAQ;AAC9B,QAAA,CAAC;IACF;uGA3BY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAT,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,SAAS,cADI,MAAM,EAAA,CAAA;;2FACnB,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-hub-ui-utils.mjs","sources":["../../../projects/utils/src/lib/focus-trap.ts","../../../projects/utils/src/lib/util.ts","../../../projects/utils/src/lib/i18n/translation.tokens.ts","../../../projects/utils/src/lib/i18n/translation.service.ts","../../../projects/utils/src/lib/i18n/translation.provider.ts","../../../projects/utils/src/lib/overlay/overlay-position.ts","../../../projects/utils/src/lib/overlay/overlay-ref.ts","../../../projects/utils/src/lib/overlay/overlay-service.ts","../../../projects/utils/src/lib/pipes/get.pipe.ts","../../../projects/utils/src/lib/pipes/is-object.pipe.ts","../../../projects/utils/src/lib/pipes/is-observable.pipe.ts","../../../projects/utils/src/lib/pipes/is-string.pipe.ts","../../../projects/utils/src/lib/pipes/translate.pipe.ts","../../../projects/utils/src/lib/pipes/ucfirst.pipe.ts","../../../projects/utils/src/lib/pipes/unwrap-async.pipe.ts","../../../projects/utils/src/lib/transitions/util.ts","../../../projects/utils/src/lib/transitions/transition.ts","../../../projects/utils/src/lib/popup.ts","../../../projects/utils/src/lib/scrollbar.ts","../../../projects/utils/src/public-api.ts","../../../projects/utils/src/ng-hub-ui-utils.ts"],"sourcesContent":["import { NgZone } from '@angular/core';\n\nimport { fromEvent, Observable } from 'rxjs';\nimport { filter, map, takeUntil, withLatestFrom } from 'rxjs/operators';\n\nexport const FOCUSABLE_ELEMENTS_SELECTOR = [\n\t'a[href]',\n\t'button:not([disabled])',\n\t'input:not([disabled]):not([type=\"hidden\"])',\n\t'select:not([disabled])',\n\t'textarea:not([disabled])',\n\t'[contenteditable]',\n\t'[tabindex]:not([tabindex=\"-1\"])'\n].join(', ');\n\n/**\n * Returns first and last focusable elements inside of a given element based on specific CSS selector\n */\nexport function getFocusableBoundaryElements(\n\telement: HTMLElement\n): HTMLElement[] {\n\tconst list: HTMLElement[] = Array.from(\n\t\telement.querySelectorAll(\n\t\t\tFOCUSABLE_ELEMENTS_SELECTOR\n\t\t) as NodeListOf<HTMLElement>\n\t).filter((el) => el.tabIndex !== -1);\n\treturn [list[0], list[list.length - 1]];\n}\n\n/**\n * Function that enforces browser focus to be trapped inside a DOM element.\n *\n * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element\n *\n * @param zone Angular zone\n * @param element The element around which focus will be trapped inside\n * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners\n * and free internal resources\n * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to\n * false)\n */\nexport const hubFocusTrap = (\n\tzone: NgZone,\n\telement: HTMLElement,\n\tstopFocusTrap$: Observable<any>,\n\trefocusOnClick = false\n) => {\n\tzone.runOutsideAngular(() => {\n\t\t// last focused element\n\t\tconst lastFocusedElement$ = fromEvent<FocusEvent>(\n\t\t\telement,\n\t\t\t'focusin'\n\t\t).pipe(\n\t\t\ttakeUntil(stopFocusTrap$),\n\t\t\tmap((e) => e.target)\n\t\t);\n\n\t\t// 'tab' / 'shift+tab' stream\n\t\tfromEvent<KeyboardEvent>(element, 'keydown')\n\t\t\t.pipe(\n\t\t\t\ttakeUntil(stopFocusTrap$),\n\t\t\t\tfilter((e) => e.key === 'Tab'),\n\t\t\t\twithLatestFrom(lastFocusedElement$)\n\t\t\t)\n\t\t\t.subscribe(([tabEvent, focusedElement]) => {\n\t\t\t\tconst [first, last] = getFocusableBoundaryElements(element);\n\n\t\t\t\tif (\n\t\t\t\t\t(focusedElement === first || focusedElement === element) &&\n\t\t\t\t\ttabEvent.shiftKey\n\t\t\t\t) {\n\t\t\t\t\tlast.focus();\n\t\t\t\t\ttabEvent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tif (focusedElement === last && !tabEvent.shiftKey) {\n\t\t\t\t\tfirst.focus();\n\t\t\t\t\ttabEvent.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\n\t\t// inside click\n\t\tif (refocusOnClick) {\n\t\t\tfromEvent(element, 'click')\n\t\t\t\t.pipe(\n\t\t\t\t\ttakeUntil(stopFocusTrap$),\n\t\t\t\t\twithLatestFrom(lastFocusedElement$),\n\t\t\t\t\tmap((arr) => arr[1] as HTMLElement)\n\t\t\t\t)\n\t\t\t\t.subscribe((lastFocusedElement) => lastFocusedElement.focus());\n\t\t}\n\t});\n};\n","import { effect, NgZone, Signal, signal } from '@angular/core';\nimport { Observable, OperatorFunction } from 'rxjs';\n\n/**\n * Converts a value to an integer using parseInt.\n *\n * @param {any} value - The `value` parameter in the `toInteger` function is the input value that needs to be converted to an\n * integer.\n *\n * @returns Is returning the parsed integer value of the input `value`.\n */\nexport function toInteger(value: any): number {\n\treturn parseInt(`${value}`, 10);\n}\n\nexport function toString(value: any): string {\n\treturn value !== undefined && value !== null ? `${value}` : '';\n}\n\nexport function getValueInRange(value: number, max: number, min = 0): number {\n\treturn Math.max(Math.min(value, max), min);\n}\n\nexport function isString(value: any): value is string {\n\treturn typeof value === 'string';\n}\n\nexport function isNumber(value: any): value is number {\n\treturn !isNaN(toInteger(value));\n}\n\nexport function isInteger(value: any): value is number {\n\treturn (\n\t\ttypeof value === 'number' &&\n\t\tisFinite(value) &&\n\t\tMath.floor(value) === value\n\t);\n}\n\nexport function isDefined(value: any): boolean {\n\treturn value !== undefined && value !== null;\n}\n\n/**\n * Determines if two objects or values are equivalent.\n *\n * @param o1 Object or value to compare.\n * @param o2 Object or value to compare.\n * @returns true if arguments are equal.\n */\nexport function equals(o1: any, o2: any): boolean {\n\tif (o1 === o2) {\n\t\treturn true;\n\t}\n\tif (o1 === null || o2 === null) {\n\t\treturn false;\n\t}\n\tif (o1 !== o1 && o2 !== o2) {\n\t\treturn true;\n\t} // NaN === NaN\n\tlet t1 = typeof o1,\n\t\tt2 = typeof o2,\n\t\tlength: number,\n\t\tkey: any,\n\t\tkeySet: any;\n\tif (t1 == t2 && t1 == 'object') {\n\t\tif (Array.isArray(o1)) {\n\t\t\tif (!Array.isArray(o2)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ((length = o1.length) == o2.length) {\n\t\t\t\tfor (key = 0; key < length; key++) {\n\t\t\t\t\tif (!equals(o1[key], o2[key])) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Array.isArray(o2)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tkeySet = Object.create(null);\n\t\t\tfor (key in o1) {\n\t\t\t\tif (!equals(o1[key], o2[key])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tkeySet[key] = true;\n\t\t\t}\n\t\t\tfor (key in o2) {\n\t\t\t\tif (!(key in keySet) && typeof o2[key] !== 'undefined') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Checks if a value is a Promise.\n *\n * @param {any} v - The parameter `v` in the `isPromise` function represents any value that is being checked to determine if it is\n * a Promise.\n *\n * @returns A boolean value indicating whether the input `v` is a Promise or not. If `v` has a `then` property, it is considered\n * a Promise and the function returns `true`. Otherwise, it returns `false`.\n */\nexport function isPromise<T>(v: any): v is Promise<T> {\n\treturn v && v.then;\n}\n\n/**\n * Pads a number with a leading zero if it is a valid number.\n *\n * @param {number} value - The `padNumber` function takes a number as input and pads it with a leading zero if it is a valid\n * number. If the input is not a number, it returns an empty string.\n *\n * @returns Takes a number as input and pads it with a leading zero if it is a valid number. If the input is a number, the function\n * returns the input value padded with a leading zero and sliced to keep only the last two characters. If the input is not a number,\n * an empty string is returned.\n */\nexport function padNumber(value: number) {\n\tif (isNumber(value)) {\n\t\treturn `0${value}`.slice(-2);\n\t} else {\n\t\treturn '';\n\t}\n}\n\n/**\n * Escapes special characters in a given text to be used in a regular expression.\n *\n * @param text - The `regExpEscape` function takes a `text` parameter as input. This function is designed to escape special\n * characters in a given text so that it can be safely used within a regular expression pattern.\n *\n * @returns A new string with any special characters in the input `text` escaped with a backslash.\n */\nexport function regExpEscape(text: string): string {\n\treturn text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\nexport function closest(\n\telement: HTMLElement,\n\tselector?: string\n): HTMLElement | null {\n\tif (!selector) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * In certain browsers (e.g. Edge 44.18362.449.0) HTMLDocument does\n\t * not support `Element.prototype.closest`. To emulate the correct behaviour\n\t * we return null when the method is missing.\n\t *\n\t * Note that in evergreen browsers `closest(document.documentElement, 'html')`\n\t * will return the document element whilst in Edge null will be returned. This\n\t * compromise was deemed good enough.\n\t */\n\tif (typeof element.closest === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn element.closest(selector);\n}\n\n/**\n * Force a browser reflow\n *\n * @param element element where to apply the reflow\n */\nexport function reflow(element: HTMLElement) {\n\treturn (element || document.body).getBoundingClientRect();\n}\n\n/**\n * Creates an observable where all callbacks are executed inside a given zone\n *\n * @param zone\n */\nexport function runInZone<T>(zone: NgZone): OperatorFunction<T, T> {\n\treturn (source) => {\n\t\treturn new Observable((observer) => {\n\t\t\tconst next = (value: T) => zone.run(() => observer.next(value));\n\t\t\tconst error = (e: any) => zone.run(() => observer.error(e));\n\t\t\tconst complete = () => zone.run(() => observer.complete());\n\t\t\treturn source.subscribe({ next, error, complete });\n\t\t});\n\t};\n}\n\nexport function removeAccents(str: string): string {\n\treturn str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n}\n\n/**\n * Replaces placeholders in a string with corresponding values from a given object.\n *\n * @param expr a string that represents the expression to be interpolated.\n * @param params an optional object that contains the values to be interpolated into the expr string.\n * @returns the interpolated string.\n */\nexport function interpolateString(\n\texpr: string = '',\n\tparams: any = {},\n\ttemplateMatcher: RegExp = /{{\\s?([^{}\\s]*)\\s?}}/g\n) {\n\tif (!params) {\n\t\treturn expr;\n\t}\n\n\treturn expr.replace(templateMatcher, (substring: string, b: string) => {\n\t\tlet r = getValue(params, b);\n\t\treturn isDefined(r) ? r : substring;\n\t});\n}\n\n/**\n * Retrieves the value of a nested property from an object using dot notation.\n *\n * @param target the object from which you want to retrieve a value.\n * @param key a string that represents the property or nested properties of the target object.\n * @returns the value of the specified key in the target object.\n */\nexport function getValue(target: any, key: string): any {\n\tlet keys = typeof key === 'string' ? key.split('.') : [key];\n\tkey = '';\n\tdo {\n\t\tkey += keys.shift();\n\t\tif (\n\t\t\tisDefined(target) &&\n\t\t\tisDefined(target[key]) &&\n\t\t\t(typeof target[key] === 'object' || !keys.length)\n\t\t) {\n\t\t\ttarget = target[key];\n\t\t\tkey = '';\n\t\t} else if (!keys.length) {\n\t\t\ttarget = undefined;\n\t\t} else {\n\t\t\tkey += '.';\n\t\t}\n\t} while (keys.length);\n\n\treturn target;\n}\n\n/**\n * Checks if the given item is a plain object (not an array, null, or primitive).\n *\n * @param item Value to test.\n * @returns true when item is a non-null, non-array object.\n */\nexport function isObject(item: any): boolean {\n\treturn item !== null && typeof item === 'object' && !Array.isArray(item);\n}\n\n/**\n * Recursively deep-merges source into target, producing a new object.\n * Arrays are replaced, not merged. Primitives from source win.\n *\n * @param target Base object.\n * @param source Overrides to apply on top of target.\n * @returns New merged object.\n */\nexport function mergeDeep(target: any, source: any): any {\n\tconst output = Object.assign({}, target);\n\tif (isObject(target) && isObject(source)) {\n\t\tObject.keys(source).forEach((key: any) => {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!(key in target)) {\n\t\t\t\t\tObject.assign(output, { [key]: source[key] });\n\t\t\t\t} else {\n\t\t\t\t\toutput[key] = mergeDeep(target[key], source[key]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tObject.assign(output, { [key]: source[key] });\n\t\t\t}\n\t\t});\n\t}\n\treturn output;\n}\n\n/**\n * Generates a random alphanumeric string of the requested length.\n * Not cryptographically secure — intended for transient DOM ids and keys.\n *\n * @param length Desired character count.\n * @returns Random alphanumeric string.\n */\nexport function generateUniqueId(length: number): string {\n\tconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\tlet result = '';\n\tfor (let i = 0; i < length; i++) {\n\t\tresult += chars.charAt(Math.floor(Math.random() * chars.length));\n\t}\n\treturn result;\n}\n\n/**\n * Creates a read-only signal that mirrors sourceSignal but only updates\n * after debounceDelay ms have elapsed since the last emission.\n * Cleans up the pending timer via the Angular effect cleanup mechanism.\n *\n * @template T Type of the signal value.\n * @param sourceSignal Signal to debounce.\n * @param debounceDelay Milliseconds to wait, or a signal that provides the delay.\n * @returns Debounced read-only signal.\n */\nexport function debouncedSignal<T>(sourceSignal: Signal<T>, debounceDelay: number | Signal<number> = 0): Signal<T> {\n\tconst debounced = signal(sourceSignal());\n\n\teffect((onCleanup) => {\n\t\tconst delay = typeof debounceDelay === 'number' ? debounceDelay : debounceDelay();\n\t\tconst value = sourceSignal();\n\n\t\tconst timeout = setTimeout(() => {\n\t\t\tdebounced.set(value);\n\t\t}, delay);\n\n\t\tonCleanup(() => clearTimeout(timeout));\n\t});\n\n\treturn debounced;\n}\n\n/**\n * Returns the active element in the given root.\n *\n * If the active element is inside a shadow root, it is searched recursively.\n */\nexport function getActiveElement(\n\troot: Document | ShadowRoot = document\n): Element | null {\n\tconst activeEl = root?.activeElement;\n\n\tif (!activeEl) {\n\t\treturn null;\n\t}\n\n\treturn activeEl.shadowRoot\n\t\t? getActiveElement(activeEl.shadowRoot)\n\t\t: activeEl;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface HubTranslationConfig {\n\tdictionaries?: Record<string, Record<string, any>>;\n\tlanguage?: string;\n\tfallbackLanguage?: string;\n}\n\nexport const HUB_TRANSLATION_CONFIG = new InjectionToken<HubTranslationConfig>(\n\t'HUB_TRANSLATION_CONFIG'\n);\n","import { Injectable, inject } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { getValue } from '../util';\nimport { HUB_TRANSLATION_CONFIG, HubTranslationConfig } from './translation.tokens';\n\n@Injectable()\nexport class HubTranslationService {\n\t#config: HubTranslationConfig =\n\t\tinject(HUB_TRANSLATION_CONFIG, { optional: true }) ?? {};\n\n\tdefaultTranslations: Record<string, string | any> =\n\t\tthis.#config.dictionaries ?? {};\n\n\ttranslations!: Record<string, string>;\n\n\tprivate translationSource = new Subject<any>();\n\n\ttranslationObserver = this.translationSource.asObservable();\n\n\tconstructor() {\n\t\tthis.initialize();\n\t}\n\n\tinitialize() {\n\t\tconst language = this.#config.language ?? this.#config.fallbackLanguage ?? 'en';\n\t\tconst fallbackLanguage = this.#config.fallbackLanguage ?? 'en';\n\t\tconst fallbackTranslations =\n\t\t\tthis.defaultTranslations[fallbackLanguage] ?? {};\n\t\tconst selectedTranslations =\n\t\t\tthis.defaultTranslations[language] ?? fallbackTranslations;\n\n\t\tthis.setTranslations(selectedTranslations);\n\t}\n\n\t/**\n\t * Retrieves a value from a translations object based on a given key.\n\t */\n\tgetTranslation(key: string): any {\n\t\treturn getValue(this.translations, key);\n\t}\n\n\t/**\n\t * Merges fallback translations with the provided translations and updates observers.\n\t */\n\tsetTranslations(translations: Record<string, string> | any = {}) {\n\t\tconst fallbackLanguage = this.#config.fallbackLanguage ?? 'en';\n\t\tconst fallbackTranslations =\n\t\t\tthis.defaultTranslations[fallbackLanguage] ?? {};\n\t\tconst nextTranslations = translations ?? {};\n\n\t\tthis.translations = { ...fallbackTranslations, ...nextTranslations };\n\t\tthis.translationSource.next(this.translations);\n\t}\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { HubTranslationService } from './translation.service';\nimport { HUB_TRANSLATION_CONFIG, HubTranslationConfig } from './translation.tokens';\n\n/**\n * Helper function to provide HubTranslationService and its configuration.\n * @param config Optional configuration for translations.\n * @returns EnvironmentProviders\n */\nexport function provideHubTranslation(config: HubTranslationConfig = {}): EnvironmentProviders {\n\treturn makeEnvironmentProviders([\n\t\tHubTranslationService,\n\t\t{\n\t\t\tprovide: HUB_TRANSLATION_CONFIG,\n\t\t\tuseValue: config\n\t\t}\n\t]);\n}\n","import { ElementRef } from '@angular/core';\nimport type { ConnectionPosition } from './connection-position';\nimport type { HorizontalConnectionPos } from './horizontal-connection-pos';\nimport type { VerticalConnectionPos } from './vertical-connection-pos';\n\n/**\n * Positions an overlay container relative to an origin element.\n * The first configured position that fits within the viewport is applied.\n */\nexport class OverlayPosition {\n\tprivate _origin: ElementRef | HTMLElement | null = null;\n\tprivate _positions: ConnectionPosition[] = [];\n\n\t/**\n\t * Sets the origin element used to position the overlay.\n\t *\n\t * @param origin Element reference or HTMLElement.\n\t * @returns This position instance for chaining.\n\t */\n\tflexibleConnectedTo(origin: ElementRef | HTMLElement): this {\n\t\tthis._origin = origin;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the preferred positions for the overlay.\n\t * The order of the array determines the fallback priority.\n\t *\n\t * @param positions Array of position configurations.\n\t * @returns This position instance for chaining.\n\t */\n\twithPositions(positions: ConnectionPosition[]): this {\n\t\tthis._positions = positions;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Applies the calculated position to the overlay element.\n\t *\n\t * @param overlayElement The overlay container element.\n\t */\n\tapply(overlayElement: HTMLElement): void {\n\t\tif (!this._origin) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst originElement = this._origin instanceof ElementRef ? this._origin.nativeElement : this._origin;\n\t\tconst originRect = originElement.getBoundingClientRect();\n\n\t\t// Try each position until we find one that fits in the viewport\n\t\tfor (const position of this._positions) {\n\t\t\tconst coords = this._calculatePosition(originRect, overlayElement, position);\n\n\t\t\tif (this._fitsInViewport(coords, overlayElement)) {\n\t\t\t\tthis._applyPosition(overlayElement, coords);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// If no position fits perfectly, use the first one\n\t\tif (this._positions.length > 0) {\n\t\t\tconst coords = this._calculatePosition(originRect, overlayElement, this._positions[0]);\n\t\t\tthis._applyPosition(overlayElement, coords);\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the position coordinates based on the configuration.\n\t *\n\t * @param originRect Bounding rectangle of the origin element.\n\t * @param overlayElement The overlay element.\n\t * @param position Position configuration.\n\t * @returns Calculated x and y coordinates.\n\t */\n\tprivate _calculatePosition(originRect: DOMRect, overlayElement: HTMLElement, position: ConnectionPosition): { x: number; y: number } {\n\t\tconst overlayRect = overlayElement.getBoundingClientRect();\n\n\t\t// Calculate origin point\n\t\tlet x = this._getOriginX(originRect, position.originX);\n\t\tlet y = this._getOriginY(originRect, position.originY);\n\n\t\t// Adjust for overlay alignment\n\t\tx -= this._getOverlayX(overlayRect, position.overlayX);\n\t\ty -= this._getOverlayY(overlayRect, position.overlayY);\n\n\t\t// Apply offsets\n\t\tif (position.offsetX) {\n\t\t\tx += position.offsetX;\n\t\t}\n\t\tif (position.offsetY) {\n\t\t\ty += position.offsetY;\n\t\t}\n\n\t\treturn { x, y };\n\t}\n\n\t/**\n\t * Gets the X coordinate for the origin point.\n\t */\n\tprivate _getOriginX(rect: DOMRect, position: HorizontalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'start':\n\t\t\t\treturn rect.left;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.left + rect.width / 2;\n\t\t\tcase 'end':\n\t\t\t\treturn rect.right;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the Y coordinate for the origin point.\n\t */\n\tprivate _getOriginY(rect: DOMRect, position: VerticalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'top':\n\t\t\t\treturn rect.top;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.top + rect.height / 2;\n\t\t\tcase 'bottom':\n\t\t\t\treturn rect.bottom;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the X offset for the overlay alignment.\n\t */\n\tprivate _getOverlayX(rect: DOMRect, position: HorizontalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'start':\n\t\t\t\treturn 0;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.width / 2;\n\t\t\tcase 'end':\n\t\t\t\treturn rect.width;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the Y offset for the overlay alignment.\n\t */\n\tprivate _getOverlayY(rect: DOMRect, position: VerticalConnectionPos): number {\n\t\tswitch (position) {\n\t\t\tcase 'top':\n\t\t\t\treturn 0;\n\t\t\tcase 'center':\n\t\t\t\treturn rect.height / 2;\n\t\t\tcase 'bottom':\n\t\t\t\treturn rect.height;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the overlay fits within the viewport at the given coordinates.\n\t */\n\tprivate _fitsInViewport(\n\t\tcoords: { x: number; y: number },\n\t\toverlayElement: HTMLElement\n\t): boolean {\n\t\tconst overlayRect = overlayElement.getBoundingClientRect();\n\t\tconst viewportWidth = window.innerWidth;\n\t\tconst viewportHeight = window.innerHeight;\n\n\t\treturn (\n\t\t\tcoords.x >= 0 &&\n\t\t\tcoords.y >= 0 &&\n\t\t\tcoords.x + overlayRect.width <= viewportWidth &&\n\t\t\tcoords.y + overlayRect.height <= viewportHeight\n\t\t);\n\t}\n\n\t/**\n\t * Applies the calculated position to the overlay element.\n\t */\n\tprivate _applyPosition(\n\t\toverlayElement: HTMLElement,\n\t\tcoords: { x: number; y: number }\n\t): void {\n\t\toverlayElement.style.left = `${coords.x}px`;\n\t\toverlayElement.style.top = `${coords.y}px`;\n\t}\n}\n","import {\n\tApplicationRef,\n\tComponentRef,\n\tcreateComponent,\n\tEmbeddedViewRef,\n\tTemplateRef,\n\tType,\n\tViewContainerRef\n} from '@angular/core';\nimport type { OverlayConfig } from './overlay-config';\n\n/**\n * Manages a single overlay instance created by {@link OverlayService}.\n * Creates a container and optional backdrop in `document.body` and attaches\n * either a template or component as the overlay content.\n */\nexport class OverlayRef {\n\tprivate _backdropElement: HTMLElement | null = null;\n\tprivate _containerElement: HTMLElement | null = null;\n\tprivate _contentElement: HTMLElement | null = null;\n\tprivate _viewRef: EmbeddedViewRef<unknown> | null = null;\n\tprivate _componentRef: ComponentRef<unknown> | null = null;\n\tprivate _isAttached = false;\n\tprivate _backdropClickCallback?: () => void;\n\tprivate _backdropClickHandler?: () => void;\n\n\tconstructor(\n\t\tprivate _config: OverlayConfig,\n\t\tprivate _appRef: ApplicationRef\n\t) {}\n\n\t/**\n\t * Attaches content to the overlay.\n\t *\n\t * If the overlay is already attached, it only updates the position strategy\n\t * and returns the existing content element.\n\t *\n\t * @param content Template or component type to attach.\n\t * @param viewContainerRef View container used to create embedded views for templates.\n\t * @returns The attached content element (first root node).\n\t * @throws When a {@link TemplateRef} is provided without a {@link ViewContainerRef}.\n\t */\n\tattach(\n\t\tcontent: TemplateRef<unknown> | Type<unknown>,\n\t\tviewContainerRef?: ViewContainerRef\n\t): HTMLElement {\n\t\t// If already attached, just update position and return existing element\n\t\tif (this._isAttached && this._contentElement) {\n\t\t\tif (this._config.positionStrategy) {\n\t\t\t\tthis._config.positionStrategy.apply(this._containerElement!);\n\t\t\t}\n\t\t\treturn this._contentElement;\n\t\t}\n\n\t\tthis._createContainer();\n\t\tthis._createBackdrop();\n\n\t\tlet contentElement: HTMLElement;\n\n\t\tif (content instanceof TemplateRef) {\n\t\t\tif (!viewContainerRef) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'ViewContainerRef is required when attaching a TemplateRef'\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Only create and attach view if not already created\n\t\t\tif (!this._viewRef) {\n\t\t\t\tthis._viewRef = viewContainerRef.createEmbeddedView(content);\n\t\t\t\tthis._viewRef.detectChanges();\n\t\t\t}\n\t\t\tcontentElement = this._viewRef.rootNodes[0] as HTMLElement;\n\t\t} else {\n\t\t\tif (this._componentRef) {\n\t\t\t\tthis._appRef.detachView(this._componentRef.hostView);\n\t\t\t\tthis._componentRef.destroy();\n\t\t\t}\n\t\t\tthis._componentRef = createComponent(content, {\n\t\t\t\tenvironmentInjector: this._appRef.injector\n\t\t\t});\n\t\t\tthis._appRef.attachView(this._componentRef.hostView);\n\t\t\tcontentElement = (this._componentRef.hostView as EmbeddedViewRef<unknown>)\n\t\t\t\t.rootNodes[0] as HTMLElement;\n\t\t}\n\n\t\tthis._contentElement = contentElement;\n\n\t\t// Only append if not already in container\n\t\tif (!this._containerElement!.contains(contentElement)) {\n\t\t\tthis._containerElement!.appendChild(contentElement);\n\t\t}\n\n\t\tthis._isAttached = true;\n\n\t\t// Apply position strategy\n\t\tif (this._config.positionStrategy) {\n\t\t\tthis._config.positionStrategy.apply(this._containerElement!);\n\t\t}\n\n\t\treturn contentElement;\n\t}\n\n\t/**\n\t * Detaches the content from the overlay container without disposing the overlay.\n\t */\n\tdetach(): void {\n\t\tif (!this._isAttached) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._contentElement && this._containerElement) {\n\t\t\tthis._containerElement.removeChild(this._contentElement);\n\t\t}\n\n\t\tthis._isAttached = false;\n\t}\n\n\t/**\n\t * Disposes the overlay and cleans up all allocated resources.\n\t */\n\tdispose(): void {\n\t\tthis.detach();\n\n\t\t// Destroy view ref if exists\n\t\tif (this._viewRef) {\n\t\t\tthis._viewRef.destroy();\n\t\t\tthis._viewRef = null;\n\t\t}\n\n\t\tif (this._componentRef) {\n\t\t\tthis._appRef.detachView(this._componentRef.hostView);\n\t\t\tthis._componentRef.destroy();\n\t\t\tthis._componentRef = null;\n\t\t}\n\n\t\tif (this._containerElement) {\n\t\t\tdocument.body.removeChild(this._containerElement);\n\t\t\tthis._containerElement = null;\n\t\t}\n\n\t\tif (this._backdropElement) {\n\t\t\t// Remove event listener before removing element from DOM\n\t\t\tif (this._backdropClickHandler) {\n\t\t\t\tthis._backdropElement.removeEventListener(\n\t\t\t\t\t'click',\n\t\t\t\t\tthis._backdropClickHandler\n\t\t\t\t);\n\t\t\t\tthis._backdropClickHandler = undefined;\n\t\t\t}\n\t\t\tdocument.body.removeChild(this._backdropElement);\n\t\t\tthis._backdropElement = null;\n\t\t}\n\n\t\tthis._contentElement = null;\n\t\tthis._backdropClickCallback = undefined;\n\t}\n\n\t/**\n\t * Checks whether content is currently attached to the overlay.\n\t */\n\thasAttached(): boolean {\n\t\treturn this._isAttached;\n\t}\n\n\t/**\n\t * Registers a callback for backdrop clicks.\n\t * The last registered callback replaces any previous one.\n\t *\n\t * @param callback Function to call when the backdrop is clicked.\n\t */\n\tonBackdropClick(callback: () => void): void {\n\t\tthis._backdropClickCallback = callback;\n\t}\n\n\t/**\n\t * Re-applies the configured position strategy to the overlay container.\n\t */\n\tupdatePosition(): void {\n\t\tif (this._config.positionStrategy && this._containerElement) {\n\t\t\tthis._config.positionStrategy.apply(this._containerElement);\n\t\t}\n\t}\n\n\t/**\n\t * Creates the overlay container element and appends it to the document.\n\t */\n\tprivate _createContainer(): void {\n\t\tif (this._containerElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._containerElement = document.createElement('div');\n\t\tthis._containerElement.classList.add('hub-overlay-container');\n\n\t\tif (this._config.panelClass) {\n\t\t\tconst classes = Array.isArray(this._config.panelClass)\n\t\t\t\t? this._config.panelClass\n\t\t\t\t: [this._config.panelClass];\n\t\t\tclasses.forEach((cls) => this._containerElement!.classList.add(cls));\n\t\t}\n\n\t\tif (this._config.width) {\n\t\t\tthis._containerElement.style.width =\n\t\t\t\ttypeof this._config.width === 'number'\n\t\t\t\t\t? `${this._config.width}px`\n\t\t\t\t\t: this._config.width;\n\t\t}\n\n\t\tif (this._config.height) {\n\t\t\tthis._containerElement.style.height =\n\t\t\t\ttypeof this._config.height === 'number'\n\t\t\t\t\t? `${this._config.height}px`\n\t\t\t\t\t: this._config.height;\n\t\t}\n\n\t\tthis._containerElement.style.position = 'fixed';\n\t\tthis._containerElement.style.zIndex = '1000';\n\n\t\tdocument.body.appendChild(this._containerElement);\n\t}\n\n\t/**\n\t * Creates the backdrop element if enabled and appends it to the document.\n\t */\n\tprivate _createBackdrop(): void {\n\t\tif (!this._config.hasBackdrop || this._backdropElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._backdropElement = document.createElement('div');\n\t\tthis._backdropElement.classList.add('hub-overlay-backdrop');\n\n\t\tif (this._config.backdropClass) {\n\t\t\tthis._backdropElement.classList.add(this._config.backdropClass);\n\t\t}\n\n\t\tthis._backdropElement.style.position = 'fixed';\n\t\tthis._backdropElement.style.top = '0';\n\t\tthis._backdropElement.style.left = '0';\n\t\tthis._backdropElement.style.width = '100%';\n\t\tthis._backdropElement.style.height = '100%';\n\t\tthis._backdropElement.style.zIndex = '999';\n\n\t\t// Store reference to the handler for cleanup\n\t\tthis._backdropClickHandler = () => {\n\t\t\tif (this._backdropClickCallback) {\n\t\t\t\tthis._backdropClickCallback();\n\t\t\t}\n\t\t};\n\n\t\tthis._backdropElement.addEventListener('click', this._backdropClickHandler);\n\n\t\tdocument.body.appendChild(this._backdropElement);\n\t}\n}\n","import { ApplicationRef, inject, Injectable } from '@angular/core';\nimport { OverlayPosition } from './overlay-position';\nimport { OverlayRef } from './overlay-ref';\nimport type { OverlayConfig } from './overlay-config';\n\n/**\n * Service for creating and managing overlay instances.\n */\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class OverlayService {\n\tprivate readonly _appRef = inject(ApplicationRef);\n\n\t/**\n\t * Creates a new overlay with the specified configuration.\n\t *\n\t * @param config Configuration options for the overlay.\n\t * @returns A reference to the created overlay.\n\t */\n\tcreate(config: OverlayConfig = {}): OverlayRef {\n\t\treturn new OverlayRef(config, this._appRef);\n\t}\n\n\t/**\n\t * Creates a position strategy builder for connected overlays.\n\t *\n\t * @returns A new {@link OverlayPosition} instance.\n\t */\n\tposition(): OverlayPosition {\n\t\treturn new OverlayPosition();\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'get',\n\tstandalone: true\n})\nexport class GetPipe implements PipeTransform {\n\t/**\n\t * @param value The object to retrieve the property from.\n\t * @param path The dot-separated path string to the property.\n\t * @param defaultValue The value to return if the property is not found.\n\t */\n\ttransform(value: any, path: string, defaultValue?: any): any {\n\t\tif (typeof path !== 'string') {\n\t\t\treturn value;\n\t\t}\n\t\treturn path\n\t\t\t.split('.')\n\t\t\t.reduce(\n\t\t\t\t(a, c) =>\n\t\t\t\t\ta && a[c] !== null && a[c] !== undefined\n\t\t\t\t\t\t? a[c]\n\t\t\t\t\t\t: defaultValue || null,\n\t\t\t\tvalue\n\t\t\t);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'isObject'\n})\nexport class IsObjectPipe implements PipeTransform {\n\n\ttransform(value: any): boolean {\n\t\treturn typeof value === 'object';\n\t}\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { isObservable, Observable } from 'rxjs';\n\n@Pipe({\n\tname: 'isObservable',\n\tstandalone: true\n})\nexport class IsObservablePipe<T = any> implements PipeTransform {\n\ttransform(value: T | Observable<T>): boolean {\n\t\treturn isObservable(value);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'isString'\n})\nexport class IsStringPipe implements PipeTransform {\n\n\ttransform(value: any): boolean {\n\t\treturn typeof value === 'string';\n\t}\n\n}\n","import { ChangeDetectorRef, OnDestroy, Pipe, PipeTransform, inject } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { HubTranslationService } from '../i18n/translation.service';\nimport { equals, interpolateString, isDefined } from '../util';\n\n@Pipe({\n\tname: 'translate',\n\tstandalone: true,\n\tpure: false\n})\nexport class TranslatePipe implements PipeTransform, OnDestroy {\n\tprivate _ref = inject(ChangeDetectorRef);\n\tprivate _translationSvc = inject(HubTranslationService);\n\n\tvalue: string = '';\n\tlastKey: string | null = null;\n\tlastParams: any[] = [];\n\n\ttranslationSubscription: Subscription | undefined;\n\n\t/**\n\t * Updates the value of a key by interpolating the translation and marking for change detection.\n\t */\n\tupdateValue(key: string, interpolateParams?: Object): void {\n\t\tconst value = interpolateString(this._translationSvc.getTranslation(key), interpolateParams);\n\t\tthis.value = value !== undefined ? value : key;\n\t\tthis.lastKey = key;\n\t\tthis._ref.markForCheck();\n\t}\n\n\t/**\n\t * Transforms a translation key with optional interpolation params.\n\t */\n\ttransform(query: string, ...args: any[]): any {\n\t\tif (!query || !query.length) {\n\t\t\treturn query;\n\t\t}\n\n\t\t// If we ask another time for the same key, return the last value.\n\t\tif (equals(query, this.lastKey) && equals(args, this.lastParams)) {\n\t\t\treturn this.value;\n\t\t}\n\n\t\tlet interpolateParams: Object | undefined = undefined;\n\t\tif (isDefined(args[0]) && args.length) {\n\t\t\tif (typeof args[0] === 'string' && args[0].length) {\n\t\t\t\t// We accept objects written in the template such as {n:1}, {'n':1}, {n:'v'}.\n\t\t\t\t// This converts them to valid JSON.\n\t\t\t\tlet validArgs: string = args[0]\n\t\t\t\t\t.replace(/(\\')?([a-zA-Z0-9_]+)(\\')?(\\s)?:/g, '\"$2\":')\n\t\t\t\t\t.replace(/:(\\s)?(\\')(.*?)(\\')/g, ':\"$3\"');\n\t\t\t\ttry {\n\t\t\t\t\tinterpolateParams = JSON.parse(validArgs);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${args[0]}`);\n\t\t\t\t}\n\t\t\t} else if (typeof args[0] === 'object' && !Array.isArray(args[0])) {\n\t\t\t\tinterpolateParams = args[0];\n\t\t\t}\n\t\t}\n\n\t\t// Store the query, in case it changes.\n\t\tthis.lastKey = query;\n\n\t\t// Store the params, in case they change.\n\t\tthis.lastParams = args;\n\n\t\t// Set the value.\n\t\tthis.updateValue(query, interpolateParams);\n\n\t\t// Clean any existing subscription.\n\t\tthis._dispose();\n\n\t\tif (!this.translationSubscription) {\n\t\t\tthis.translationSubscription = this._translationSvc.translationObserver.subscribe(() => {\n\t\t\t\tif (this.lastKey) {\n\t\t\t\t\tthis.lastKey = null;\n\t\t\t\t\tthis.updateValue(query, interpolateParams);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * Clean any existing subscription to change events.\n\t */\n\tprivate _dispose(): void {\n\t\tif (typeof this.translationSubscription !== 'undefined') {\n\t\t\tthis.translationSubscription.unsubscribe();\n\t\t\tthis.translationSubscription = undefined;\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._dispose();\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'ucfirst',\n\tstandalone: true\n})\nexport class UcfirstPipe implements PipeTransform {\n\ttransform(value: string = ''): string {\n\t\treturn value.charAt(0).toUpperCase() + value.slice(1);\n\t}\n}\n","import {\n\tChangeDetectorRef,\n\tinject,\n\tOnDestroy,\n\tPipe,\n\tPipeTransform\n} from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\n\n/**\n * A standalone pipe that unwraps the value of an observable or returns the value directly if it's not an observable.\n *\n * @description\n * The `UnwrapAsyncPipe` is used to unwrap the value emitted by an observable or return the value directly if it's not an observable.\n * It subscribes to the observable and returns the emitted value. If the input is not an observable, it simply returns the value.\n *\n * @usageNotes\n * ```html\n * <div>{{ observableOrValue | unwrapAsync }}</div>\n * ```\n *\n * @publicApi\n */\n@Pipe({\n\tname: 'unwrapAsync',\n\tstandalone: true,\n\tpure: false\n})\nexport class UnwrapAsyncPipe<T = any> implements PipeTransform, OnDestroy {\n\t#cdr = inject(ChangeDetectorRef);\n\n\t/**\n\t * The unwrapped value of the observable or the direct value.\n\t */\n\tvalue: T | null = null;\n\n\t/**\n\t * The subscription to the observable.\n\t */\n\tsubscription: Subscription | null = null;\n\n\t/**\n\t * Performs cleanup tasks when the pipe is destroyed.\n\t */\n\tngOnDestroy(): void {\n\t\tthis.unsubscribe();\n\t}\n\n\t/**\n\t * Transforms the input value.\n\t *\n\t * @param value The input value to transform. It can be an observable or a direct value.\n\t * @returns The unwrapped value of the observable or the direct value.\n\t */\n\ttransform(value: T | Observable<T>): T | null {\n\t\tif (value instanceof Observable) {\n\t\t\tthis.unsubscribe();\n\t\t\tthis.subscription = value.subscribe((result) => {\n\t\t\t\tthis.value = result;\n\t\t\t\tthis.#cdr.markForCheck();\n\t\t\t});\n\t\t} else {\n\t\t\t// Clean up subscription when switching to direct value\n\t\t\tthis.unsubscribe();\n\t\t\tthis.value = value;\n\t\t}\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * Unsubscribes from the current subscription.\n\t */\n\tprivate unsubscribe(): void {\n\t\tif (this.subscription) {\n\t\t\tthis.subscription.unsubscribe();\n\t\t\tthis.subscription = null;\n\t\t}\n\t}\n}\n","export function getTransitionDurationMs(element: HTMLElement) {\n\tconst { transitionDelay, transitionDuration } = window.getComputedStyle(element);\n\tconst transitionDelaySec = parseFloat(transitionDelay);\n\tconst transitionDurationSec = parseFloat(transitionDuration);\n\n\treturn (transitionDelaySec + transitionDurationSec) * 1000;\n}\n","import { NgZone } from '@angular/core';\nimport { EMPTY, fromEvent, Observable, of, race, Subject, timer } from 'rxjs';\nimport { endWith, filter, takeUntil } from 'rxjs/operators';\nimport { runInZone } from '../util';\nimport { getTransitionDurationMs } from './util';\n\nconst transitionTimerDelayMs = 5;\n\nexport type TransitionStartFn<T = any> = (\n\telement: HTMLElement,\n\tanimation: boolean,\n\tcontext: T\n) => TransitionEndFn | void;\nexport type TransitionEndFn = () => void;\n\nexport interface TransitionOptions<T> {\n\tanimation: boolean;\n\trunningTransition: 'continue' | 'stop';\n\tcontext?: T;\n}\n\nexport interface TransitionCtx<T> {\n\ttransition$: Subject<any>;\n\tcomplete: () => void;\n\tcontext: T;\n}\n\nconst noopFn: TransitionEndFn = () => {};\n\nconst runningTransitions = new Map<HTMLElement, TransitionCtx<any>>();\n\nexport const hubRunTransition = <T>(\n\tzone: NgZone,\n\telement: HTMLElement,\n\tstartFn: TransitionStartFn<T>,\n\toptions: TransitionOptions<T>\n): Observable<void> => {\n\t// Getting initial context from options\n\tlet context = options.context || <T>{};\n\n\t// Checking if there are already running transitions on the given element.\n\tconst running = runningTransitions.get(element);\n\tif (running) {\n\t\tswitch (options.runningTransition) {\n\t\t\t// If there is one running and we want for it to 'continue' to run, we have to cancel the new one.\n\t\t\t// We're not emitting any values, but simply completing the observable (EMPTY).\n\t\t\tcase 'continue':\n\t\t\t\treturn EMPTY;\n\t\t\t// If there is one running and we want for it to 'stop', we have to complete the running one.\n\t\t\t// We're simply completing the running one and not emitting any values and merging newly provided context\n\t\t\t// with the one coming from currently running transition.\n\t\t\tcase 'stop':\n\t\t\t\tzone.run(() => running.transition$.complete());\n\t\t\t\tcontext = Object.assign(running.context, context);\n\t\t\t\trunningTransitions.delete(element);\n\t\t}\n\t}\n\n\t// Running the start function\n\tconst endFn = startFn(element, options.animation, context) || noopFn;\n\n\t// If 'prefer-reduced-motion' is enabled, the 'transition' will be set to 'none'.\n\t// If animations are disabled, we have to emit a value and complete the observable\n\t// In this case we have to call the end function, but can finish immediately by emitting a value,\n\t// completing the observable and executing end functions synchronously.\n\tif (\n\t\t!options.animation ||\n\t\twindow.getComputedStyle(element).transitionProperty === 'none'\n\t) {\n\t\tzone.run(() => endFn());\n\t\treturn of(undefined).pipe(runInZone(zone));\n\t}\n\n\t// Starting a new transition\n\tconst transition$ = new Subject<void>();\n\tconst finishTransition$ = new Subject<void>();\n\tconst stop$ = transition$.pipe(endWith(true));\n\trunningTransitions.set(element, {\n\t\ttransition$,\n\t\tcomplete: () => {\n\t\t\tfinishTransition$.next();\n\t\t\tfinishTransition$.complete();\n\t\t},\n\t\tcontext\n\t});\n\n\tconst transitionDurationMs = getTransitionDurationMs(element);\n\n\t// 1. We have to both listen for the 'transitionend' event and have a 'just-in-case' timer,\n\t// because 'transitionend' event might not be fired in some browsers, if the transitioning\n\t// element becomes invisible (ex. when scrolling, making browser tab inactive, etc.). The timer\n\t// guarantees, that we'll release the DOM element and complete 'hubRunTransition'.\n\t// 2. We need to filter transition end events, because they might bubble from shorter transitions\n\t// on inner DOM elements. We're only interested in the transition on the 'element' itself.\n\tzone.runOutsideAngular(() => {\n\t\tconst transitionEnd$ = fromEvent(element, 'transitionend').pipe(\n\t\t\ttakeUntil(stop$),\n\t\t\tfilter(({ target }) => target === element)\n\t\t);\n\t\tconst timer$ = timer(\n\t\t\ttransitionDurationMs + transitionTimerDelayMs\n\t\t).pipe(takeUntil(stop$));\n\n\t\trace(timer$, transitionEnd$, finishTransition$)\n\t\t\t.pipe(takeUntil(stop$))\n\t\t\t.subscribe(() => {\n\t\t\t\trunningTransitions.delete(element);\n\t\t\t\tzone.run(() => {\n\t\t\t\t\tendFn();\n\t\t\t\t\ttransition$.next();\n\t\t\t\t\ttransition$.complete();\n\t\t\t\t});\n\t\t\t});\n\t});\n\n\treturn transition$.asObservable();\n};\n\nexport const hubCompleteTransition = (element: HTMLElement) => {\n\trunningTransitions.get(element)?.complete();\n};\n","import {\n\tApplicationRef,\n\tComponentRef,\n\tinject,\n\tInjector,\n\tNgZone,\n\tTemplateRef,\n\tType,\n\tViewContainerRef,\n\tViewRef\n} from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { mergeMap, take, tap } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\nimport { hubRunTransition } from './transitions';\n\nexport class ContentRef {\n\tconstructor(\n\t\tpublic nodes: Node[][],\n\t\tpublic viewRef?: ViewRef,\n\t\tpublic componentRef?: ComponentRef<any>\n\t) {}\n}\n\nexport class PopupService<T> {\n\tprivate _windowRef: ComponentRef<T> | null = null;\n\tprivate _contentRef: ContentRef | null = null;\n\n\tprivate _document = inject(DOCUMENT);\n\tprivate _applicationRef = inject(ApplicationRef);\n\tprivate _injector = inject(Injector);\n\tprivate _viewContainerRef = inject(ViewContainerRef);\n\tprivate _ngZone = inject(NgZone);\n\n\tconstructor(private _componentType: Type<T>) {}\n\n\topen(\n\t\tcontent?: string | TemplateRef<any>,\n\t\ttemplateContext?: any,\n\t\tanimation = false\n\t): { windowRef: ComponentRef<T>; transition$: Observable<void> } {\n\t\tif (!this._windowRef) {\n\t\t\tthis._contentRef = this._getContentRef(content, templateContext);\n\t\t\tthis._windowRef = this._viewContainerRef.createComponent(\n\t\t\t\tthis._componentType,\n\t\t\t\t{\n\t\t\t\t\tinjector: this._injector,\n\t\t\t\t\tprojectableNodes: this._contentRef.nodes\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tconst { nativeElement } = this._windowRef.location;\n\t\tconst transition$ = this._ngZone.onStable.pipe(\n\t\t\ttake(1),\n\t\t\tmergeMap(() =>\n\t\t\t\thubRunTransition(\n\t\t\t\t\tthis._ngZone,\n\t\t\t\t\tnativeElement,\n\t\t\t\t\t({ classList }) => classList.add('show'),\n\t\t\t\t\t{\n\t\t\t\t\t\tanimation,\n\t\t\t\t\t\trunningTransition: 'continue'\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn { windowRef: this._windowRef, transition$ };\n\t}\n\n\tclose(animation = false): Observable<void> {\n\t\tif (!this._windowRef) {\n\t\t\treturn of(undefined);\n\t\t}\n\n\t\treturn hubRunTransition(\n\t\t\tthis._ngZone,\n\t\t\tthis._windowRef.location.nativeElement,\n\t\t\t({ classList }) => classList.remove('show'),\n\t\t\t{ animation, runningTransition: 'stop' }\n\t\t).pipe(\n\t\t\ttap(() => {\n\t\t\t\tthis._windowRef?.destroy();\n\t\t\t\tthis._contentRef?.viewRef?.destroy();\n\t\t\t\tthis._windowRef = null;\n\t\t\t\tthis._contentRef = null;\n\t\t\t})\n\t\t);\n\t}\n\n\tprivate _getContentRef(\n\t\tcontent?: string | TemplateRef<any>,\n\t\ttemplateContext?: any\n\t): ContentRef {\n\t\tif (!content) {\n\t\t\treturn new ContentRef([]);\n\t\t} else if (content instanceof TemplateRef) {\n\t\t\tconst viewRef = content.createEmbeddedView(templateContext);\n\t\t\tthis._applicationRef.attachView(viewRef);\n\t\t\treturn new ContentRef([viewRef.rootNodes], viewRef);\n\t\t} else {\n\t\t\treturn new ContentRef([\n\t\t\t\t[this._document.createTextNode(`${content}`)]\n\t\t\t]);\n\t\t}\n\t}\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/** Type for the callback used to revert the scrollbar. */\nexport type ScrollbarReverter = () => void;\n\n/**\n * Utility to handle the scrollbar.\n *\n * It allows to hide the scrollbar and compensate the lack of a vertical scrollbar\n * by adding an equivalent padding on the right of the body, and to revert this change.\n */\n@Injectable({ providedIn: 'root' })\nexport class ScrollBar {\n\tprivate _document = inject(DOCUMENT);\n\n\t/**\n\t * To be called to hide a potential vertical scrollbar:\n\t * - if a scrollbar is there and has a width greater than 0, adds some compensation\n\t * padding to the body to keep the same layout as when the scrollbar is there\n\t * - adds overflow: hidden\n\t *\n\t * @return a callback used to revert the change\n\t */\n\thide(): ScrollbarReverter {\n\t\tconst scrollbarWidth = Math.abs(window.innerWidth - this._document.documentElement.clientWidth);\n\t\tconst body = this._document.body;\n\t\tconst bodyStyle = body.style;\n\t\tconst { overflow, paddingRight } = bodyStyle;\n\t\tif (scrollbarWidth > 0) {\n\t\t\tconst actualPadding = parseFloat(window.getComputedStyle(body).paddingRight);\n\t\t\tbodyStyle.paddingRight = `${actualPadding + scrollbarWidth}px`;\n\t\t}\n\t\tbodyStyle.overflow = 'hidden';\n\t\treturn () => {\n\t\t\tif (scrollbarWidth > 0) {\n\t\t\t\tbodyStyle.paddingRight = paddingRight;\n\t\t\t}\n\t\t\tbodyStyle.overflow = overflow;\n\t\t};\n\t}\n}\n","/*\n * Public API Surface of utils\n */\n\nexport * from './lib/focus-trap';\nexport * from './lib/i18n/translation.provider';\nexport * from './lib/i18n/translation.service';\nexport * from './lib/i18n/translation.tokens';\nexport * from './lib/overlay';\nexport { GetPipe } from './lib/pipes/get.pipe';\nexport { IsObjectPipe } from './lib/pipes/is-object.pipe';\nexport { IsObservablePipe } from './lib/pipes/is-observable.pipe';\nexport { IsStringPipe } from './lib/pipes/is-string.pipe';\nexport * from './lib/pipes/translate.pipe';\nexport { UcfirstPipe } from './lib/pipes/ucfirst.pipe';\nexport { UnwrapAsyncPipe } from './lib/pipes/unwrap-async.pipe';\nexport * from './lib/popup';\nexport * from './lib/scrollbar';\nexport * from './lib/transitions';\nexport * from './lib/util';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKO,MAAM,2BAA2B,GAAG;IAC1C,SAAS;IACT,wBAAwB;IACxB,4CAA4C;IAC5C,wBAAwB;IACxB,0BAA0B;IAC1B,mBAAmB;IACnB;AACA,CAAA,CAAC,IAAI,CAAC,IAAI;AAEX;;AAEG;AACG,SAAU,4BAA4B,CAC3C,OAAoB,EAAA;AAEpB,IAAA,MAAM,IAAI,GAAkB,KAAK,CAAC,IAAI,CACrC,OAAO,CAAC,gBAAgB,CACvB,2BAA2B,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AAA,CAAA;;2FACnB,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;AAEG;;ACFH;;AAEG;;;;"}
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-hub-ui-utils",
3
- "version": "1.2.0",
3
+ "version": "22.1.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=16.0.0",
6
6
  "@angular/core": ">=16.0.0"
@@ -9,15 +9,18 @@
9
9
  "tslib": "^2.3.0"
10
10
  },
11
11
  "sideEffects": false,
12
+ "homepage": "https://hubui.dev/",
13
+ "author": "Carlos Morcillo <carlos.morcillo@me.com> (https://www.carlosmorcillo.com)",
12
14
  "module": "fesm2022/ng-hub-ui-utils.mjs",
13
- "typings": "index.d.ts",
15
+ "typings": "types/ng-hub-ui-utils.d.ts",
14
16
  "exports": {
15
17
  "./package.json": {
16
18
  "default": "./package.json"
17
19
  },
18
20
  ".": {
19
- "types": "./index.d.ts",
21
+ "types": "./types/ng-hub-ui-utils.d.ts",
20
22
  "default": "./fesm2022/ng-hub-ui-utils.mjs"
21
23
  }
22
- }
24
+ },
25
+ "type": "module"
23
26
  }
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgZone, InjectionToken, ElementRef, ApplicationRef, TemplateRef, Type, ViewContainerRef, PipeTransform, OnDestroy, ViewRef, ComponentRef } from '@angular/core';
2
+ import { NgZone, InjectionToken, EnvironmentProviders, ElementRef, ApplicationRef, TemplateRef, Type, ViewContainerRef, PipeTransform, OnDestroy, ViewRef, ComponentRef, Signal } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable, Subscription, Subject, OperatorFunction } from 'rxjs';
5
5
 
@@ -22,6 +22,20 @@ declare function getFocusableBoundaryElements(element: HTMLElement): HTMLElement
22
22
  */
23
23
  declare const hubFocusTrap: (zone: NgZone, element: HTMLElement, stopFocusTrap$: Observable<any>, refocusOnClick?: boolean) => void;
24
24
 
25
+ interface HubTranslationConfig {
26
+ dictionaries?: Record<string, Record<string, any>>;
27
+ language?: string;
28
+ fallbackLanguage?: string;
29
+ }
30
+ declare const HUB_TRANSLATION_CONFIG: InjectionToken<HubTranslationConfig>;
31
+
32
+ /**
33
+ * Helper function to provide HubTranslationService and its configuration.
34
+ * @param config Optional configuration for translations.
35
+ * @returns EnvironmentProviders
36
+ */
37
+ declare function provideHubTranslation(config?: HubTranslationConfig): EnvironmentProviders;
38
+
25
39
  declare class HubTranslationService {
26
40
  #private;
27
41
  defaultTranslations: Record<string, string | any>;
@@ -42,13 +56,6 @@ declare class HubTranslationService {
42
56
  static ɵprov: i0.ɵɵInjectableDeclaration<HubTranslationService>;
43
57
  }
44
58
 
45
- interface HubTranslationConfig {
46
- dictionaries?: Record<string, Record<string, any>>;
47
- language?: string;
48
- fallbackLanguage?: string;
49
- }
50
- declare const HUB_TRANSLATION_CONFIG: InjectionToken<HubTranslationConfig>;
51
-
52
59
  /**
53
60
  * Horizontal position options for overlay connection points.
54
61
  */
@@ -514,6 +521,41 @@ declare function interpolateString(expr?: string, params?: any, templateMatcher?
514
521
  * @returns the value of the specified key in the target object.
515
522
  */
516
523
  declare function getValue(target: any, key: string): any;
524
+ /**
525
+ * Checks if the given item is a plain object (not an array, null, or primitive).
526
+ *
527
+ * @param item Value to test.
528
+ * @returns true when item is a non-null, non-array object.
529
+ */
530
+ declare function isObject(item: any): boolean;
531
+ /**
532
+ * Recursively deep-merges source into target, producing a new object.
533
+ * Arrays are replaced, not merged. Primitives from source win.
534
+ *
535
+ * @param target Base object.
536
+ * @param source Overrides to apply on top of target.
537
+ * @returns New merged object.
538
+ */
539
+ declare function mergeDeep(target: any, source: any): any;
540
+ /**
541
+ * Generates a random alphanumeric string of the requested length.
542
+ * Not cryptographically secure — intended for transient DOM ids and keys.
543
+ *
544
+ * @param length Desired character count.
545
+ * @returns Random alphanumeric string.
546
+ */
547
+ declare function generateUniqueId(length: number): string;
548
+ /**
549
+ * Creates a read-only signal that mirrors sourceSignal but only updates
550
+ * after debounceDelay ms have elapsed since the last emission.
551
+ * Cleans up the pending timer via the Angular effect cleanup mechanism.
552
+ *
553
+ * @template T Type of the signal value.
554
+ * @param sourceSignal Signal to debounce.
555
+ * @param debounceDelay Milliseconds to wait, or a signal that provides the delay.
556
+ * @returns Debounced read-only signal.
557
+ */
558
+ declare function debouncedSignal<T>(sourceSignal: Signal<T>, debounceDelay?: number | Signal<number>): Signal<T>;
517
559
  /**
518
560
  * Returns the active element in the given root.
519
561
  *
@@ -521,5 +563,5 @@ declare function getValue(target: any, key: string): any;
521
563
  */
522
564
  declare function getActiveElement(root?: Document | ShadowRoot): Element | null;
523
565
 
524
- export { ContentRef, FOCUSABLE_ELEMENTS_SELECTOR, GetPipe, HUB_TRANSLATION_CONFIG, HubTranslationService, IsObjectPipe, IsObservablePipe, IsStringPipe, OverlayPosition, OverlayRef, OverlayService, PopupService, ScrollBar, TranslatePipe, UcfirstPipe, UnwrapAsyncPipe, closest, equals, getActiveElement, getFocusableBoundaryElements, getValue, getValueInRange, hubCompleteTransition, hubFocusTrap, hubRunTransition, interpolateString, isDefined, isInteger, isNumber, isPromise, isString, padNumber, reflow, regExpEscape, removeAccents, runInZone, toInteger, toString };
566
+ export { ContentRef, FOCUSABLE_ELEMENTS_SELECTOR, GetPipe, HUB_TRANSLATION_CONFIG, HubTranslationService, IsObjectPipe, IsObservablePipe, IsStringPipe, OverlayPosition, OverlayRef, OverlayService, PopupService, ScrollBar, TranslatePipe, UcfirstPipe, UnwrapAsyncPipe, closest, debouncedSignal, equals, generateUniqueId, getActiveElement, getFocusableBoundaryElements, getValue, getValueInRange, hubCompleteTransition, hubFocusTrap, hubRunTransition, interpolateString, isDefined, isInteger, isNumber, isObject, isPromise, isString, mergeDeep, padNumber, provideHubTranslation, reflow, regExpEscape, removeAccents, runInZone, toInteger, toString };
525
567
  export type { ConnectionPosition, HorizontalConnectionPos, HubTranslationConfig, OverlayConfig, ScrollbarReverter, TransitionCtx, TransitionEndFn, TransitionOptions, TransitionStartFn, VerticalConnectionPos };
Binary file