@sixbell-telco/sdk 1.2.0 → 1.2.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.1] - 2025-08-22
11
+
12
+ ### Added
13
+
14
+ - **Dialog**: Add dialog injection toggle functionality with switch-case handling (28e04f5)
15
+ - **Dialog**: Add Storybook stories for `st-dialog` with multiple configurations and examples (e585581, 25a2790)
16
+ - **Dialog**: Add basic declarative dialog with subtitle support (ae4b245)
17
+ - **Dialog**: Implement dynamic class assignment for dialog title when subtitle is present (56b0a59)
18
+
19
+ ### Changed
20
+
21
+ - **Dialog**: Adjust margin spacing for dialog title and subtitle components for improved layout (0d499af)
22
+ - **Dialog**: Replace `alignment` input with `xPosition` and `yPosition` for precise positioning (dec8614)
23
+ - **Dialog**: Use paragraph element for dialog subtitle for improved semantics (3d68d28)
24
+ - **App**: Remove unused `DialogModule` import from app configuration (8226140)
25
+ - **Translation**: Simplify public API exports and update export paths for translation module (292cd92, 905893a)
26
+ - **SDK Build**: Update builder path to use `@angular-devkit` (cdc011d)
27
+ - **Storybook**: Add and update Storybook documentation and generated docs for dialog stories (25a2790, a3f8849)
28
+ - **Docs**: Update Storybook generated documentation (a3f8849)
29
+
30
+ ### Fixed
31
+
32
+ - **Dialog**: Improve subscription management and ensure cleanup on destroy to prevent memory leaks (884f89f, 0489ed3)
33
+ - **Dialog**: Fix import paths and handling for dialog title and subtitle components (cb1a66f, e27596f, f6364be)
34
+ - **Dialog**: Adjust margin for dialog subtitle component (66fec71)
35
+ - **Dialog**: Remove unnecessary `alignment` attribute usage from `st-dialog` components (68be5db)
36
+ - **Dropdown Menu**: Fix import paths for dropdown menu components and icons (3082a35)
37
+
10
38
  ## [1.2.0] - 2025-08-13
11
39
 
12
40
  ### Added
@@ -1,5 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class DialogTitleComponent {
3
+ /** Internal signal that indicates whether a subtitle is present in the dialog */
4
+ private readonly hasSubTitle;
5
+ setHasSubTitle(value: boolean): void;
6
+ componentClass: import("@angular/core").Signal<string>;
3
7
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogTitleComponent, never>;
4
8
  static ɵcmp: i0.ɵɵComponentDeclaration<DialogTitleComponent, "st-dialog-title", never, {}, {}, never, ["*"], true, never>;
5
9
  }
@@ -1,5 +1,9 @@
1
- import { TemplateRef } from '@angular/core';
1
+ import { AfterContentInit, OnDestroy, TemplateRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ /** Dropdown X position options for CDK overlay positioning */
4
+ export type DialogXPosition = 'start' | 'center' | 'end';
5
+ /** Dropdown Y position options for CDK overlay positioning */
6
+ export type DialogYPosition = 'top' | 'center' | 'bottom';
3
7
  /**
4
8
  * CSS class generator for dialog component variants
5
9
  * Uses carefully selected DaisyUI classes that don't conflict with CDK positioning
@@ -10,14 +14,11 @@ export declare const dialogComponent: (props?: ({
10
14
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
15
  /** Possible width values for the dialog component */
12
16
  export type DialogWidthProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | null | undefined;
13
- /** Possible vertical alignment values for the dialog component */
14
- export type DialogAlignmentProps = 'top' | 'center' | 'bottom' | 'start' | 'end' | null | undefined;
15
17
  /** Animation states for the dialog */
16
18
  type AnimationState = 'closed' | 'open';
17
19
  /** Configuration properties for the dialog component */
18
20
  export type DialogProps = {
19
21
  width?: DialogWidthProps;
20
- alignment?: DialogAlignmentProps;
21
22
  };
22
23
  /**
23
24
  * A customizable dialog component using Angular CDK Dialog for declarative usage
@@ -44,7 +45,14 @@ export type DialogProps = {
44
45
  * </st-dialog>
45
46
  * ```
46
47
  */
47
- export declare class DialogComponent {
48
+ export declare class DialogComponent implements AfterContentInit, OnDestroy {
49
+ /** @internal Content children to detect what's projected */
50
+ private readonly titleComponent;
51
+ private readonly subTitleComponent;
52
+ /** @internal Signals for conditional styling */
53
+ hasTitle: import("@angular/core").WritableSignal<boolean>;
54
+ hasSubTitle: import("@angular/core").WritableSignal<boolean>;
55
+ ngAfterContentInit(): void;
48
56
  /**
49
57
  * Specifies the maximum width of the dialog content
50
58
  * @defaultValue 'md'
@@ -54,12 +62,12 @@ export declare class DialogComponent {
54
62
  * Controls the horizontal positioning of the dialog (x-axis)
55
63
  * @defaultValue 'center'
56
64
  */
57
- xPosition: import("@angular/core").InputSignal<"center" | "start" | "end">;
65
+ xPosition: import("@angular/core").InputSignal<DialogXPosition>;
58
66
  /**
59
67
  * Controls the vertical positioning of the dialog (y-axis)
60
68
  * @defaultValue 'center'
61
69
  */
62
- yPosition: import("@angular/core").InputSignal<"center" | "top" | "bottom">;
70
+ yPosition: import("@angular/core").InputSignal<DialogYPosition>;
63
71
  /**
64
72
  * Controls the visibility state of the dialog
65
73
  * Supports two-way binding via Angular's model
@@ -77,6 +85,8 @@ export declare class DialogComponent {
77
85
  dialogTemplate: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
78
86
  /** @internal Reference to the current open dialog */
79
87
  private dialogRef;
88
+ /** @internal Subscriptions for CDK dialog observables so we can clean up on destroy */
89
+ private subs;
80
90
  /** @internal Animation state signal for controlling CSS animations */
81
91
  private readonly animationState;
82
92
  /** @internal Flag to track if we're in the process of closing */
@@ -121,12 +131,16 @@ export declare class DialogComponent {
121
131
  * @internal
122
132
  */
123
133
  onAnimationEnd(event: AnimationEvent): void;
134
+ /**
135
+ * Clean up CDK subscriptions and ensure the overlay is closed when the component is destroyed
136
+ */
137
+ ngOnDestroy(): void;
124
138
  /**
125
139
  * Handles the close button click
126
140
  * @internal
127
141
  */
128
142
  handleCloseClick(): void;
129
143
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
130
- static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "st-dialog", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, { "opened": "openedChange"; "closed": "closed"; "clickOutside": "clickOutside"; }, never, ["st-dialog-title", "st-dialog-sub-title", "st-dialog-content", "st-dialog-actions"], true, never>;
144
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "st-dialog", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, { "opened": "openedChange"; "closed": "closed"; "clickOutside": "clickOutside"; }, ["titleComponent", "subTitleComponent"], ["st-dialog-title", "st-dialog-sub-title", "st-dialog-content", "st-dialog-actions"], true, never>;
131
145
  }
132
146
  export {};
@@ -1,11 +1,12 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { input, computed, ChangeDetectionStrategy, Component, model, output, inject, viewChild, signal, effect } from '@angular/core';
3
+ import { input, computed, ChangeDetectionStrategy, Component, signal, contentChild, model, output, inject, viewChild, effect } from '@angular/core';
4
4
  import { cn } from '@sixbell-telco/sdk/utils/cn';
5
5
  import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
6
6
  import { Dialog } from '@angular/cdk/dialog';
7
7
  import { Overlay } from '@angular/cdk/overlay';
8
8
  import { cva } from 'class-variance-authority';
9
+ import { Subscription } from 'rxjs';
9
10
 
10
11
  class DialogActionsComponent {
11
12
  // Base table properties
@@ -34,20 +35,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
34
35
 
35
36
  class DialogSubTitleComponent {
36
37
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogSubTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
37
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DialogSubTitleComponent, isStandalone: true, selector: "st-dialog-sub-title", ngImport: i0, template: "<div class=\"mb-6\">\n\t<h3 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h3\">\n\t\t<ng-content></ng-content>\n\t</h3>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DialogSubTitleComponent, isStandalone: true, selector: "st-dialog-sub-title", ngImport: i0, template: "<div class=\"text-base-content/80 mb-3\">\n\t<p typography tyFontWeight=\"normal\" tyColor=\"inherit\" tyVariant=\"h6\">\n\t\t<ng-content></ng-content>\n\t</p>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
39
  }
39
40
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogSubTitleComponent, decorators: [{
40
41
  type: Component,
41
- args: [{ selector: 'st-dialog-sub-title', imports: [CommonModule, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-6\">\n\t<h3 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h3\">\n\t\t<ng-content></ng-content>\n\t</h3>\n</div>\n" }]
42
+ args: [{ selector: 'st-dialog-sub-title', imports: [CommonModule, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"text-base-content/80 mb-3\">\n\t<p typography tyFontWeight=\"normal\" tyColor=\"inherit\" tyVariant=\"h6\">\n\t\t<ng-content></ng-content>\n\t</p>\n</div>\n" }]
42
43
  }] });
43
44
 
44
45
  class DialogTitleComponent {
46
+ /** Internal signal that indicates whether a subtitle is present in the dialog */
47
+ hasSubTitle = signal(false);
48
+ setHasSubTitle(value) {
49
+ this.hasSubTitle.set(value);
50
+ }
51
+ componentClass = computed(() => cn({
52
+ 'mb-3': !this.hasSubTitle(),
53
+ 'mb-1': this.hasSubTitle(),
54
+ }));
45
55
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DialogTitleComponent, isStandalone: true, selector: "st-dialog-title", ngImport: i0, template: "<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
56
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DialogTitleComponent, isStandalone: true, selector: "st-dialog-title", ngImport: i0, template: "<div [class]=\"componentClass()\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
47
57
  }
48
58
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogTitleComponent, decorators: [{
49
59
  type: Component,
50
- args: [{ selector: 'st-dialog-title', imports: [CommonModule, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n" }]
60
+ args: [{ selector: 'st-dialog-title', imports: [CommonModule, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"componentClass()\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n" }]
51
61
  }] });
52
62
 
53
63
  /**
@@ -108,6 +118,20 @@ const dialogComponent = cva([
108
118
  * ```
109
119
  */
110
120
  class DialogComponent {
121
+ /** @internal Content children to detect what's projected */
122
+ titleComponent = contentChild(DialogTitleComponent);
123
+ subTitleComponent = contentChild(DialogSubTitleComponent);
124
+ /** @internal Signals for conditional styling */
125
+ hasTitle = signal(false);
126
+ hasSubTitle = signal(false);
127
+ ngAfterContentInit() {
128
+ const titleInstance = typeof this.titleComponent === 'function' ? this.titleComponent() : this.titleComponent;
129
+ const subTitleInstance = typeof this.subTitleComponent === 'function' ? this.subTitleComponent() : this.subTitleComponent;
130
+ const hasSub = !!subTitleInstance;
131
+ this.hasTitle.set(!!titleInstance);
132
+ this.hasSubTitle.set(hasSub);
133
+ titleInstance?.setHasSubTitle?.(hasSub);
134
+ }
111
135
  /**
112
136
  * Specifies the maximum width of the dialog content
113
137
  * @defaultValue 'md'
@@ -140,6 +164,8 @@ class DialogComponent {
140
164
  dialogTemplate = viewChild('dialogTemplate');
141
165
  /** @internal Reference to the current open dialog */
142
166
  dialogRef = null;
167
+ /** @internal Subscriptions for CDK dialog observables so we can clean up on destroy */
168
+ subs = new Subscription();
143
169
  /** @internal Animation state signal for controlling CSS animations */
144
170
  animationState = signal('closed');
145
171
  /** @internal Flag to track if we're in the process of closing */
@@ -230,7 +256,11 @@ class DialogComponent {
230
256
  this.animationState.set('open');
231
257
  this.isClosing = false;
232
258
  // Handle dialog close events
233
- this.dialogRef.closed.subscribe(() => {
259
+ this.subs.add(this.dialogRef.closed.subscribe(() => {
260
+ // tear down current subscriptions to avoid re-entrancy or emits after destroy
261
+ this.subs.unsubscribe();
262
+ // recreate the subscription container so future opens can re-subscribe
263
+ this.subs = new Subscription();
234
264
  this.dialogRef = null;
235
265
  this.animationState.set('closed');
236
266
  this.isClosing = false;
@@ -238,25 +268,33 @@ class DialogComponent {
238
268
  this.opened.set(false);
239
269
  this.closed.emit();
240
270
  }
241
- });
271
+ }));
242
272
  // Handle backdrop clicks
243
- this.dialogRef.backdropClick.subscribe(() => {
273
+ this.subs.add(this.dialogRef.backdropClick.subscribe(() => {
244
274
  this.clickOutside.emit();
245
275
  this.close();
246
- });
276
+ }));
247
277
  // Handle escape key
248
- this.dialogRef.keydownEvents.subscribe((event) => {
278
+ this.subs.add(this.dialogRef.keydownEvents.subscribe((event) => {
249
279
  if (event.key === 'Escape') {
250
280
  this.close();
251
281
  }
252
- });
282
+ }));
253
283
  }
254
284
  /**
255
285
  * Public method to close the dialog
256
286
  * Can be called directly from parent components or child components
257
287
  */
258
288
  close() {
289
+ // If we have an active dialogRef, close it immediately so consumers (and tests)
290
+ // that spy on dialogRef.close() observe the call.
291
+ if (this.dialogRef) {
292
+ this.dialogRef.close();
293
+ this.dialogRef = null;
294
+ }
295
+ // Ensure opened flag is synchronized and notify listeners that the dialog closed
259
296
  this.opened.set(false);
297
+ this.closed.emit();
260
298
  }
261
299
  /**
262
300
  * Closes the dialog using CDK Dialog
@@ -282,6 +320,19 @@ class DialogComponent {
282
320
  this.dialogRef.close();
283
321
  }
284
322
  }
323
+ /**
324
+ * Clean up CDK subscriptions and ensure the overlay is closed when the component is destroyed
325
+ */
326
+ ngOnDestroy() {
327
+ // Unsubscribe from any dialog-related observables to prevent handlers running after destroy
328
+ this.subs.unsubscribe();
329
+ // If a dialog is still open, close it now. We call close after unsubscribing to avoid
330
+ // receiving the closed event while this component is being torn down.
331
+ if (this.dialogRef) {
332
+ this.dialogRef.close?.();
333
+ this.dialogRef = null;
334
+ }
335
+ }
285
336
  /**
286
337
  * Handles the close button click
287
338
  * @internal
@@ -290,7 +341,7 @@ class DialogComponent {
290
341
  this.close();
291
342
  }
292
343
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
293
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.0", type: DialogComponent, isStandalone: true, selector: "st-dialog", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", closed: "closed", clickOutside: "clickOutside" }, viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Dialog template for CDK Dialog -->\n<ng-template #dialogTemplate>\n\t<!-- Dialog content with data-driven animations -->\n\t<div [class]=\"componentClass()\" [attr.data-state]=\"dataState()\" (animationend)=\"onAnimationEnd($event)\">\n\t\t<!-- Close button -->\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm\" (click)=\"handleCloseClick()\" aria-label=\"Close dialog\">\u2715</button>\n\t\t</div>\n\n\t\t<!-- Content projection -->\n\t\t<ng-content select=\"st-dialog-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-sub-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-content\"></ng-content>\n\n\t\t<!-- Actions section with spacing -->\n\t\t<div class=\"flex justify-end gap-2 pt-4\">\n\t\t\t<ng-content select=\"st-dialog-actions\"></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
344
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.0", type: DialogComponent, isStandalone: true, selector: "st-dialog", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", closed: "closed", clickOutside: "clickOutside" }, queries: [{ propertyName: "titleComponent", first: true, predicate: DialogTitleComponent, descendants: true, isSignal: true }, { propertyName: "subTitleComponent", first: true, predicate: DialogSubTitleComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Dialog template for CDK Dialog -->\n<ng-template #dialogTemplate>\n\t<!-- Dialog content with data-driven animations -->\n\t<div [class]=\"componentClass()\" [attr.data-state]=\"dataState()\" (animationend)=\"onAnimationEnd($event)\">\n\t\t<!-- Close button -->\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm\" (click)=\"handleCloseClick()\" aria-label=\"Close dialog\">\u2715</button>\n\t\t</div>\n\n\t\t<!-- Content projection -->\n\t\t<ng-content select=\"st-dialog-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-sub-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-content\"></ng-content>\n\n\t\t<!-- Actions section with spacing -->\n\t\t<div class=\"flex justify-end gap-2 pt-4\">\n\t\t\t<ng-content select=\"st-dialog-actions\"></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
294
345
  }
295
346
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogComponent, decorators: [{
296
347
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-dialog.mjs","sources":["../../../projects/sdk/components/dialog/dialog-actions/dialog-actions.component.ts","../../../projects/sdk/components/dialog/dialog-actions/dialog-actions.component.html","../../../projects/sdk/components/dialog/dialog-content/dialog-content.component.ts","../../../projects/sdk/components/dialog/dialog-content/dialog-content.component.html","../../../projects/sdk/components/dialog/dialog-sub-title/dialog-sub-title.component.ts","../../../projects/sdk/components/dialog/dialog-sub-title/dialog-sub-title.component.html","../../../projects/sdk/components/dialog/dialog-title/dialog-title.component.ts","../../../projects/sdk/components/dialog/dialog-title/dialog-title.component.html","../../../projects/sdk/components/dialog/src/dialog.component.ts","../../../projects/sdk/components/dialog/src/dialog.component.html","../../../projects/sdk/components/dialog/sixbell-telco-sdk-components-dialog.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\nexport type ModalActionsAligmentProps = 'left' | 'right' | 'center';\n\n@Component({\n\tselector: 'st-dialog-actions',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogActionsComponent {\n\t// Base table properties\n\talignment = input<ModalActionsAligmentProps>('left');\n\n\tcomponentClass = computed(() =>\n\t\tcn('modal-action text-pretty font-body leading-normal', {\n\t\t\t'justify-start': this.alignment() === 'left',\n\t\t\t'justify-end': this.alignment() === 'right',\n\t\t\t'justify-center': this.alignment() === 'center',\n\t\t}),\n\t);\n}\n","<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n\tselector: 'st-dialog-content',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog-content.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogContentComponent {}\n","<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n@Component({\n\tselector: 'st-dialog-sub-title',\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './dialog-sub-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogSubTitleComponent {}\n","<div class=\"mb-6\">\n\t<h3 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h3\">\n\t\t<ng-content></ng-content>\n\t</h3>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n@Component({\n\tselector: 'st-dialog-title',\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './dialog-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogTitleComponent {}\n","<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n","import { Dialog, DialogConfig, DialogRef } from '@angular/cdk/dialog';\nimport { Overlay } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, model, output, signal, TemplateRef, viewChild } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n/**\n * CSS class generator for dialog component variants\n * Uses carefully selected DaisyUI classes that don't conflict with CDK positioning\n * @internal\n */\nexport const dialogComponent = cva(\n\t[\n\t\t'bg-base-200',\n\t\t'rounded-box',\n\t\t'shadow-backdrop',\n\t\t'p-6',\n\t\t'text-base-content',\n\t\t'relative',\n\t\t'data-[state=closed]:animate-exit data-[state=open]:animate-enter',\n\t],\n\t{\n\t\tvariants: {\n\t\t\twidth: {\n\t\t\t\txs: ['w-64'],\n\t\t\t\tsm: ['w-80'],\n\t\t\t\tmd: ['w-96'],\n\t\t\t\tlg: ['w-[32rem]'],\n\t\t\t\txl: ['w-[36rem]'],\n\t\t\t\t'2xl': ['w-[42rem]'],\n\t\t\t\t'3xl': ['w-[48rem]'],\n\t\t\t\t'4xl': ['w-[56rem]'],\n\t\t\t\t'5xl': ['w-[64rem]'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\twidth: 'md',\n\t\t},\n\t},\n);\n\n/** Possible width values for the dialog component */\nexport type DialogWidthProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | null | undefined;\n\n/** Possible vertical alignment values for the dialog component */\nexport type DialogAlignmentProps = 'top' | 'center' | 'bottom' | 'start' | 'end' | null | undefined;\n\n/** Animation states for the dialog */\ntype AnimationState = 'closed' | 'open';\n\n/** Configuration properties for the dialog component */\nexport type DialogProps = {\n\twidth?: DialogWidthProps;\n\talignment?: DialogAlignmentProps;\n};\n\n/**\n * A customizable dialog component using Angular CDK Dialog for declarative usage\n *\n * @remarks\n * This component provides a declarative way to create dialogs with content projection.\n * Uses CDK Dialog under the hood to avoid z-index issues with native dialog elements.\n *\n * @example\n * ```html\n * <st-dialog\n * [(opened)]=\"isDialogOpen\"\n * width=\"lg\"\n * alignment=\"center\"\n * (closed)=\"handleDialogClosed()\">\n * <st-dialog-title>Confirm Action</st-dialog-title>\n * <st-dialog-content>\n * Are you sure you want to proceed?\n * </st-dialog-content>\n * <st-dialog-actions>\n * <st-button (click)=\"confirmAction()\">Confirm</st-button>\n * <st-button variant=\"secondary\" (click)=\"closeDialog()\">Cancel</st-button>\n * </st-dialog-actions>\n * </st-dialog>\n * ```\n */\n@Component({\n\tselector: 'st-dialog',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogComponent {\n\t/**\n\t * Specifies the maximum width of the dialog content\n\t * @defaultValue 'md'\n\t */\n\twidth = input<DialogWidthProps>('md');\n\n\t/**\n\t * Controls the horizontal positioning of the dialog (x-axis)\n\t * @defaultValue 'center'\n\t */\n\txPosition = input<'start' | 'center' | 'end'>('center');\n\n\t/**\n\t * Controls the vertical positioning of the dialog (y-axis)\n\t * @defaultValue 'center'\n\t */\n\tyPosition = input<'top' | 'center' | 'bottom'>('center');\n\n\t/**\n\t * Controls the visibility state of the dialog\n\t * Supports two-way binding via Angular's model\n\t */\n\topened = model<boolean>(false);\n\n\t/** Event emitted when the dialog closes */\n\tclosed = output<void>();\n\n\t/** Event emitted when clicking outside the dialog content */\n\tclickOutside = output<void>();\n\n\t/** @internal CDK Dialog service */\n\tprivate readonly dialog = inject(Dialog);\n\n\t/** @internal CDK Overlay service for positioning */\n\tprivate readonly overlay = inject(Overlay);\n\n\t/** @internal Reference to the dialog template */\n\tdialogTemplate = viewChild<TemplateRef<unknown>>('dialogTemplate');\n\n\t/** @internal Reference to the current open dialog */\n\tprivate dialogRef: DialogRef<unknown> | null = null;\n\n\t/** @internal Animation state signal for controlling CSS animations */\n\tprivate readonly animationState = signal<AnimationState>('closed');\n\n\t/** @internal Flag to track if we're in the process of closing */\n\tprivate isClosing = false;\n\n\t/**\n\t * Computes the data-state attribute value for CSS animations\n\t * @returns Current animation state\n\t * @internal\n\t */\n\tdataState = computed(() => this.animationState());\n\n\t/**\n\t * Computes CSS classes for dialog content based on current configuration\n\t * @returns Combined Tailwind classes string\n\t * @internal\n\t */\n\tcomponentClass = computed(() => {\n\t\treturn cn(\n\t\t\tdialogComponent({\n\t\t\t\twidth: this.width(),\n\t\t\t}),\n\t\t);\n\t});\n\n\t/** @internal Handles open/close state changes */\n\topenedEffect = effect(() => {\n\t\tif (this.opened()) {\n\t\t\tthis.openDialog();\n\t\t} else {\n\t\t\tthis.closeDialog();\n\t\t}\n\t});\n\n\t/**\n\t * Computed CDK Dialog configuration based on x/y axis signals\n\t * Uses CDK's overlay positioning system for full axis control\n\t * @internal\n\t */\n\tprivate readonly dialogConfig = computed<DialogConfig>(() => {\n\t\tconst x = this.xPosition();\n\t\tconst y = this.yPosition();\n\n\t\tconst baseConfig: DialogConfig = {\n\t\t\thasBackdrop: true,\n\t\t\tdisableClose: true, // Prevent automatic close, we handle it manually for animations\n\t\t\tautoFocus: true,\n\t\t\trestoreFocus: true,\n\t\t\tbackdropClass: ['bg-backdrop'],\n\t\t\tpanelClass: ['st-dialog-panel'],\n\t\t\t// Use noop scroll strategy to prevent body scroll changes that affect sticky navbar\n\t\t\tscrollStrategy: this.overlay.scrollStrategies.noop(),\n\t\t};\n\n\t\tlet positionStrategy = this.overlay.position().global();\n\n\t\t// X axis\n\t\tswitch (x) {\n\t\t\tcase 'start':\n\t\t\t\tpositionStrategy = positionStrategy.left('2rem');\n\t\t\t\tbreak;\n\t\t\tcase 'end':\n\t\t\t\tpositionStrategy = positionStrategy.right('2rem');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpositionStrategy = positionStrategy.centerHorizontally();\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Y axis\n\t\tswitch (y) {\n\t\t\tcase 'top':\n\t\t\t\tpositionStrategy = positionStrategy.top('2rem');\n\t\t\t\tbreak;\n\t\t\tcase 'bottom':\n\t\t\t\tpositionStrategy = positionStrategy.bottom('2rem');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpositionStrategy = positionStrategy.centerVertically();\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\t...baseConfig,\n\t\t\tpositionStrategy,\n\t\t};\n\t});\n\n\t/**\n\t * Opens the dialog using CDK Dialog\n\t * @internal\n\t */\n\tprivate openDialog() {\n\t\tif (this.dialogRef || !this.dialogTemplate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dialogRef = this.dialog.open(this.dialogTemplate()!, this.dialogConfig() as DialogConfig<unknown, DialogRef<unknown, unknown>>);\n\n\t\t// Set open state for animation\n\t\tthis.animationState.set('open');\n\t\tthis.isClosing = false;\n\n\t\t// Handle dialog close events\n\t\tthis.dialogRef.closed.subscribe(() => {\n\t\t\tthis.dialogRef = null;\n\t\t\tthis.animationState.set('closed');\n\t\t\tthis.isClosing = false;\n\t\t\tif (this.opened()) {\n\t\t\t\tthis.opened.set(false);\n\t\t\t\tthis.closed.emit();\n\t\t\t}\n\t\t});\n\n\t\t// Handle backdrop clicks\n\t\tthis.dialogRef.backdropClick.subscribe(() => {\n\t\t\tthis.clickOutside.emit();\n\t\t\tthis.close();\n\t\t});\n\n\t\t// Handle escape key\n\t\tthis.dialogRef.keydownEvents.subscribe((event: KeyboardEvent) => {\n\t\t\tif (event.key === 'Escape') {\n\t\t\t\tthis.close();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Public method to close the dialog\n\t * Can be called directly from parent components or child components\n\t */\n\tclose() {\n\t\tthis.opened.set(false);\n\t}\n\n\t/**\n\t * Closes the dialog using CDK Dialog\n\t * @internal\n\t */\n\tprivate closeDialog() {\n\t\tif (this.dialogRef && !this.isClosing) {\n\t\t\t// Set closing flag and closed state for animation\n\t\t\tthis.isClosing = true;\n\t\t\tthis.animationState.set('closed');\n\n\t\t\t// The actual CDK close will be triggered by the animation end event\n\t\t}\n\t}\n\n\t/**\n\t * Handles animation end events to trigger the actual dialog close\n\t * @internal\n\t */\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tconst target = event.target as HTMLElement;\n\n\t\t// Only handle animations on the main dialog element\n\t\tif (target.hasAttribute('data-state') && this.isClosing && this.dialogRef) {\n\t\t\t// Animation finished, now actually close the CDK dialog\n\t\t\tthis.dialogRef.close();\n\t\t}\n\t}\n\n\t/**\n\t * Handles the close button click\n\t * @internal\n\t */\n\thandleCloseClick() {\n\t\tthis.close();\n\t}\n}\n","<!-- Dialog template for CDK Dialog -->\n<ng-template #dialogTemplate>\n\t<!-- Dialog content with data-driven animations -->\n\t<div [class]=\"componentClass()\" [attr.data-state]=\"dataState()\" (animationend)=\"onAnimationEnd($event)\">\n\t\t<!-- Close button -->\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm\" (click)=\"handleCloseClick()\" aria-label=\"Close dialog\">✕</button>\n\t\t</div>\n\n\t\t<!-- Content projection -->\n\t\t<ng-content select=\"st-dialog-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-sub-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-content\"></ng-content>\n\n\t\t<!-- Actions section with spacing -->\n\t\t<div class=\"flex justify-end gap-2 pt-4\">\n\t\t\t<ng-content select=\"st-dialog-actions\"></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAYa,sBAAsB,CAAA;;AAElC,IAAA,SAAS,GAAG,KAAK,CAA4B,MAAM,CAAC;IAEpD,cAAc,GAAG,QAAQ,CAAC,MACzB,EAAE,CAAC,mDAAmD,EAAE;AACvD,QAAA,eAAe,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,MAAM;AAC5C,QAAA,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,OAAO;AAC3C,QAAA,gBAAgB,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,QAAQ;AAC/C,KAAA,CAAC,CACF;uGAVW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,C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A,EAAA,UAAA,EAAA,IAAA,EDiEW,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,CAAC,YAAY,CAAC,EAEN,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,m2BAAA,EAAA;;;AEvFhD;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-dialog.mjs","sources":["../../../projects/sdk/components/dialog/dialog-actions/dialog-actions.component.ts","../../../projects/sdk/components/dialog/dialog-actions/dialog-actions.component.html","../../../projects/sdk/components/dialog/dialog-content/dialog-content.component.ts","../../../projects/sdk/components/dialog/dialog-content/dialog-content.component.html","../../../projects/sdk/components/dialog/dialog-sub-title/dialog-sub-title.component.ts","../../../projects/sdk/components/dialog/dialog-sub-title/dialog-sub-title.component.html","../../../projects/sdk/components/dialog/dialog-title/dialog-title.component.ts","../../../projects/sdk/components/dialog/dialog-title/dialog-title.component.html","../../../projects/sdk/components/dialog/src/dialog.component.ts","../../../projects/sdk/components/dialog/src/dialog.component.html","../../../projects/sdk/components/dialog/sixbell-telco-sdk-components-dialog.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\nexport type ModalActionsAligmentProps = 'left' | 'right' | 'center';\n\n@Component({\n\tselector: 'st-dialog-actions',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogActionsComponent {\n\t// Base table properties\n\talignment = input<ModalActionsAligmentProps>('left');\n\n\tcomponentClass = computed(() =>\n\t\tcn('modal-action text-pretty font-body leading-normal', {\n\t\t\t'justify-start': this.alignment() === 'left',\n\t\t\t'justify-end': this.alignment() === 'right',\n\t\t\t'justify-center': this.alignment() === 'center',\n\t\t}),\n\t);\n}\n","<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n\tselector: 'st-dialog-content',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog-content.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogContentComponent {}\n","<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n@Component({\n\tselector: 'st-dialog-sub-title',\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './dialog-sub-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogSubTitleComponent {}\n","<div class=\"text-base-content/80 mb-3\">\n\t<p typography tyFontWeight=\"normal\" tyColor=\"inherit\" tyVariant=\"h6\">\n\t\t<ng-content></ng-content>\n\t</p>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, signal } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\n@Component({\n\tselector: 'st-dialog-title',\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './dialog-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogTitleComponent {\n\t/** Internal signal that indicates whether a subtitle is present in the dialog */\n\tprivate readonly hasSubTitle = signal(false);\n\n\tsetHasSubTitle(value: boolean) {\n\t\tthis.hasSubTitle.set(value);\n\t}\n\n\tcomponentClass = computed(() =>\n\t\tcn({\n\t\t\t'mb-3': !this.hasSubTitle(),\n\t\t\t'mb-1': this.hasSubTitle(),\n\t\t}),\n\t);\n}\n","<div [class]=\"componentClass()\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n","import { Dialog, DialogConfig, DialogRef } from '@angular/cdk/dialog';\nimport { Overlay } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport {\n\tAfterContentInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\tcontentChild,\n\teffect,\n\tinject,\n\tinput,\n\tmodel,\n\tOnDestroy,\n\toutput,\n\tsignal,\n\tTemplateRef,\n\tviewChild,\n} from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { Subscription } from 'rxjs';\nimport { DialogSubTitleComponent } from '../dialog-sub-title/dialog-sub-title.component';\nimport { DialogTitleComponent } from '../dialog-title/dialog-title.component';\n\n/** Dropdown X position options for CDK overlay positioning */\nexport type DialogXPosition = 'start' | 'center' | 'end';\n\n/** Dropdown Y position options for CDK overlay positioning */\nexport type DialogYPosition = 'top' | 'center' | 'bottom';\n\n/**\n * CSS class generator for dialog component variants\n * Uses carefully selected DaisyUI classes that don't conflict with CDK positioning\n * @internal\n */\nexport const dialogComponent = cva(\n\t[\n\t\t'bg-base-200',\n\t\t'rounded-box',\n\t\t'shadow-backdrop',\n\t\t'p-6',\n\t\t'text-base-content',\n\t\t'relative',\n\t\t'data-[state=closed]:animate-exit data-[state=open]:animate-enter',\n\t],\n\t{\n\t\tvariants: {\n\t\t\twidth: {\n\t\t\t\txs: ['w-64'],\n\t\t\t\tsm: ['w-80'],\n\t\t\t\tmd: ['w-96'],\n\t\t\t\tlg: ['w-[32rem]'],\n\t\t\t\txl: ['w-[36rem]'],\n\t\t\t\t'2xl': ['w-[42rem]'],\n\t\t\t\t'3xl': ['w-[48rem]'],\n\t\t\t\t'4xl': ['w-[56rem]'],\n\t\t\t\t'5xl': ['w-[64rem]'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\twidth: 'md',\n\t\t},\n\t},\n);\n\n/** Possible width values for the dialog component */\nexport type DialogWidthProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | null | undefined;\n\n/** Animation states for the dialog */\ntype AnimationState = 'closed' | 'open';\n\n/** Configuration properties for the dialog component */\nexport type DialogProps = {\n\twidth?: DialogWidthProps;\n};\n\n/**\n * A customizable dialog component using Angular CDK Dialog for declarative usage\n *\n * @remarks\n * This component provides a declarative way to create dialogs with content projection.\n * Uses CDK Dialog under the hood to avoid z-index issues with native dialog elements.\n *\n * @example\n * ```html\n * <st-dialog\n * [(opened)]=\"isDialogOpen\"\n * width=\"lg\"\n * alignment=\"center\"\n * (closed)=\"handleDialogClosed()\">\n * <st-dialog-title>Confirm Action</st-dialog-title>\n * <st-dialog-content>\n * Are you sure you want to proceed?\n * </st-dialog-content>\n * <st-dialog-actions>\n * <st-button (click)=\"confirmAction()\">Confirm</st-button>\n * <st-button variant=\"secondary\" (click)=\"closeDialog()\">Cancel</st-button>\n * </st-dialog-actions>\n * </st-dialog>\n * ```\n */\n@Component({\n\tselector: 'st-dialog',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogComponent implements AfterContentInit, OnDestroy {\n\t/** @internal Content children to detect what's projected */\n\tprivate readonly titleComponent = contentChild(DialogTitleComponent);\n\tprivate readonly subTitleComponent = contentChild(DialogSubTitleComponent);\n\n\t/** @internal Signals for conditional styling */\n\thasTitle = signal(false);\n\thasSubTitle = signal(false);\n\n\tngAfterContentInit() {\n\t\tconst titleInstance = typeof this.titleComponent === 'function' ? this.titleComponent() : this.titleComponent;\n\t\tconst subTitleInstance = typeof this.subTitleComponent === 'function' ? this.subTitleComponent() : this.subTitleComponent;\n\n\t\tconst hasSub = !!subTitleInstance;\n\t\tthis.hasTitle.set(!!titleInstance);\n\t\tthis.hasSubTitle.set(hasSub);\n\n\t\ttitleInstance?.setHasSubTitle?.(hasSub);\n\t}\n\n\t/**\n\t * Specifies the maximum width of the dialog content\n\t * @defaultValue 'md'\n\t */\n\twidth = input<DialogWidthProps>('md');\n\n\t/**\n\t * Controls the horizontal positioning of the dialog (x-axis)\n\t * @defaultValue 'center'\n\t */\n\txPosition = input<DialogXPosition>('center');\n\n\t/**\n\t * Controls the vertical positioning of the dialog (y-axis)\n\t * @defaultValue 'center'\n\t */\n\tyPosition = input<DialogYPosition>('center');\n\n\t/**\n\t * Controls the visibility state of the dialog\n\t * Supports two-way binding via Angular's model\n\t */\n\topened = model<boolean>(false);\n\n\t/** Event emitted when the dialog closes */\n\tclosed = output<void>();\n\n\t/** Event emitted when clicking outside the dialog content */\n\tclickOutside = output<void>();\n\n\t/** @internal CDK Dialog service */\n\tprivate readonly dialog = inject(Dialog);\n\n\t/** @internal CDK Overlay service for positioning */\n\tprivate readonly overlay = inject(Overlay);\n\n\t/** @internal Reference to the dialog template */\n\tdialogTemplate = viewChild<TemplateRef<unknown>>('dialogTemplate');\n\n\t/** @internal Reference to the current open dialog */\n\tprivate dialogRef: DialogRef<unknown> | null = null;\n\n\t/** @internal Subscriptions for CDK dialog observables so we can clean up on destroy */\n\tprivate subs = new Subscription();\n\n\t/** @internal Animation state signal for controlling CSS animations */\n\tprivate readonly animationState = signal<AnimationState>('closed');\n\n\t/** @internal Flag to track if we're in the process of closing */\n\tprivate isClosing = false;\n\n\t/**\n\t * Computes the data-state attribute value for CSS animations\n\t * @returns Current animation state\n\t * @internal\n\t */\n\tdataState = computed(() => this.animationState());\n\n\t/**\n\t * Computes CSS classes for dialog content based on current configuration\n\t * @returns Combined Tailwind classes string\n\t * @internal\n\t */\n\tcomponentClass = computed(() => {\n\t\treturn cn(\n\t\t\tdialogComponent({\n\t\t\t\twidth: this.width(),\n\t\t\t}),\n\t\t);\n\t});\n\n\t/** @internal Handles open/close state changes */\n\topenedEffect = effect(() => {\n\t\tif (this.opened()) {\n\t\t\tthis.openDialog();\n\t\t} else {\n\t\t\tthis.closeDialog();\n\t\t}\n\t});\n\n\t/**\n\t * Computed CDK Dialog configuration based on x/y axis signals\n\t * Uses CDK's overlay positioning system for full axis control\n\t * @internal\n\t */\n\tprivate readonly dialogConfig = computed<DialogConfig>(() => {\n\t\tconst x = this.xPosition();\n\t\tconst y = this.yPosition();\n\n\t\tconst baseConfig: DialogConfig = {\n\t\t\thasBackdrop: true,\n\t\t\tdisableClose: true, // Prevent automatic close, we handle it manually for animations\n\t\t\tautoFocus: true,\n\t\t\trestoreFocus: true,\n\t\t\tbackdropClass: ['bg-backdrop'],\n\t\t\tpanelClass: ['st-dialog-panel'],\n\t\t\t// Use noop scroll strategy to prevent body scroll changes that affect sticky navbar\n\t\t\tscrollStrategy: this.overlay.scrollStrategies.noop(),\n\t\t};\n\n\t\tlet positionStrategy = this.overlay.position().global();\n\n\t\t// X axis\n\t\tswitch (x) {\n\t\t\tcase 'start':\n\t\t\t\tpositionStrategy = positionStrategy.left('2rem');\n\t\t\t\tbreak;\n\t\t\tcase 'end':\n\t\t\t\tpositionStrategy = positionStrategy.right('2rem');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpositionStrategy = positionStrategy.centerHorizontally();\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Y axis\n\t\tswitch (y) {\n\t\t\tcase 'top':\n\t\t\t\tpositionStrategy = positionStrategy.top('2rem');\n\t\t\t\tbreak;\n\t\t\tcase 'bottom':\n\t\t\t\tpositionStrategy = positionStrategy.bottom('2rem');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpositionStrategy = positionStrategy.centerVertically();\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\t...baseConfig,\n\t\t\tpositionStrategy,\n\t\t};\n\t});\n\n\t/**\n\t * Opens the dialog using CDK Dialog\n\t * @internal\n\t */\n\tprivate openDialog() {\n\t\tif (this.dialogRef || !this.dialogTemplate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dialogRef = this.dialog.open(this.dialogTemplate()!, this.dialogConfig() as DialogConfig<unknown, DialogRef<unknown, unknown>>);\n\n\t\t// Set open state for animation\n\t\tthis.animationState.set('open');\n\t\tthis.isClosing = false;\n\n\t\t// Handle dialog close events\n\t\tthis.subs.add(\n\t\t\tthis.dialogRef.closed.subscribe(() => {\n\t\t\t\t// tear down current subscriptions to avoid re-entrancy or emits after destroy\n\t\t\t\tthis.subs.unsubscribe();\n\t\t\t\t// recreate the subscription container so future opens can re-subscribe\n\t\t\t\tthis.subs = new Subscription();\n\t\t\t\tthis.dialogRef = null;\n\t\t\t\tthis.animationState.set('closed');\n\t\t\t\tthis.isClosing = false;\n\t\t\t\tif (this.opened()) {\n\t\t\t\t\tthis.opened.set(false);\n\t\t\t\t\tthis.closed.emit();\n\t\t\t\t}\n\t\t\t}),\n\t\t);\n\n\t\t// Handle backdrop clicks\n\t\tthis.subs.add(\n\t\t\tthis.dialogRef.backdropClick.subscribe(() => {\n\t\t\t\tthis.clickOutside.emit();\n\t\t\t\tthis.close();\n\t\t\t}),\n\t\t);\n\n\t\t// Handle escape key\n\t\tthis.subs.add(\n\t\t\tthis.dialogRef.keydownEvents.subscribe((event: KeyboardEvent) => {\n\t\t\t\tif (event.key === 'Escape') {\n\t\t\t\t\tthis.close();\n\t\t\t\t}\n\t\t\t}),\n\t\t);\n\t}\n\n\t/**\n\t * Public method to close the dialog\n\t * Can be called directly from parent components or child components\n\t */\n\tclose() {\n\t\t// If we have an active dialogRef, close it immediately so consumers (and tests)\n\t\t// that spy on dialogRef.close() observe the call.\n\t\tif (this.dialogRef) {\n\t\t\tthis.dialogRef.close();\n\t\t\tthis.dialogRef = null;\n\t\t}\n\n\t\t// Ensure opened flag is synchronized and notify listeners that the dialog closed\n\t\tthis.opened.set(false);\n\t\tthis.closed.emit();\n\t}\n\n\t/**\n\t * Closes the dialog using CDK Dialog\n\t * @internal\n\t */\n\tprivate closeDialog() {\n\t\tif (this.dialogRef && !this.isClosing) {\n\t\t\t// Set closing flag and closed state for animation\n\t\t\tthis.isClosing = true;\n\t\t\tthis.animationState.set('closed');\n\n\t\t\t// The actual CDK close will be triggered by the animation end event\n\t\t}\n\t}\n\n\t/**\n\t * Handles animation end events to trigger the actual dialog close\n\t * @internal\n\t */\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tconst target = event.target as HTMLElement;\n\n\t\t// Only handle animations on the main dialog element\n\t\tif (target.hasAttribute('data-state') && this.isClosing && this.dialogRef) {\n\t\t\t// Animation finished, now actually close the CDK dialog\n\t\t\tthis.dialogRef.close();\n\t\t}\n\t}\n\n\t/**\n\t * Clean up CDK subscriptions and ensure the overlay is closed when the component is destroyed\n\t */\n\tngOnDestroy(): void {\n\t\t// Unsubscribe from any dialog-related observables to prevent handlers running after destroy\n\t\tthis.subs.unsubscribe();\n\n\t\t// If a dialog is still open, close it now. We call close after unsubscribing to avoid\n\t\t// receiving the closed event while this component is being torn down.\n\t\tif (this.dialogRef) {\n\t\t\tthis.dialogRef.close?.();\n\t\t\tthis.dialogRef = null;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the close button click\n\t * @internal\n\t */\n\thandleCloseClick() {\n\t\tthis.close();\n\t}\n}\n","<!-- Dialog template for CDK Dialog -->\n<ng-template #dialogTemplate>\n\t<!-- Dialog content with data-driven animations -->\n\t<div [class]=\"componentClass()\" [attr.data-state]=\"dataState()\" (animationend)=\"onAnimationEnd($event)\">\n\t\t<!-- Close button -->\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm\" (click)=\"handleCloseClick()\" aria-label=\"Close dialog\">✕</button>\n\t\t</div>\n\n\t\t<!-- Content projection -->\n\t\t<ng-content select=\"st-dialog-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-sub-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-content\"></ng-content>\n\n\t\t<!-- Actions section with spacing -->\n\t\t<div class=\"flex justify-end gap-2 pt-4\">\n\t\t\t<ng-content select=\"st-dialog-actions\"></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAYa,sBAAsB,CAAA;;AAElC,IAAA,SAAS,GAAG,KAAK,CAA4B,MAAM,CAAC;IAEpD,cAAc,GAAG,QAAQ,CAAC,MACzB,EAAE,CAAC,mDAAmD,EAAE;AACvD,QAAA,eAAe,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,MAAM;AAC5C,QAAA,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,OAAO;AAC3C,QAAA,gBAAgB,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,QAAQ;AAC/C,KAAA,CAAC,CACF;uGAVW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZnC,2EAGA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDKW,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIV,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,WACpB,CAAC,YAAY,CAAC,EAEN,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2EAA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AAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,6sBAEoB,oBAAoB,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EACjB,uBAAuB,EChH1E,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,m2BAoBA,2CDqFW,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,CAAC,YAAY,CAAC,EAEN,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,m2BAAA,EAAA;;;AE3GhD;;AAEG;;;;"}
@@ -1,14 +1,13 @@
1
1
  import { DOCUMENT } from '@angular/common';
2
2
  import { HttpBackend, HttpClient } from '@angular/common/http';
3
- export { HttpBackend } from '@angular/common/http';
4
3
  import * as i0 from '@angular/core';
5
4
  import { InjectionToken, inject, Optional, Inject, Injectable, provideAppInitializer } from '@angular/core';
6
5
  import { TranslateService, TranslateLoader, provideTranslateService, MissingTranslationHandler } from '@ngx-translate/core';
7
- export { FakeMissingTranslationHandler, MissingTranslationHandler, TranslateCompiler, TranslateDefaultParser, TranslateDirective, TranslateFakeCompiler, TranslateLoader, TranslateModule, TranslateParser, TranslatePipe, TranslateService, TranslateStore, provideTranslateService } from '@ngx-translate/core';
6
+ export * from '@ngx-translate/core';
8
7
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
9
- export { TranslateHttpLoader } from '@ngx-translate/http-loader';
8
+ export * from '@ngx-translate/http-loader';
10
9
  import { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';
11
- export { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';
10
+ export * from 'ngx-translate-multi-http-loader';
12
11
 
13
12
  /**
14
13
  * Helper function to create a language definition with full type safety and IntelliSense
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-utils-translation.mjs","sources":["../../../projects/sdk/utils/translation/src/translation.service.ts","../../../projects/sdk/utils/translation/public-api.ts","../../../projects/sdk/utils/translation/sixbell-telco-sdk-utils-translation.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { HttpBackend, HttpClient } from '@angular/common/http';\nimport { EnvironmentProviders, Inject, inject, Injectable, InjectionToken, Optional, provideAppInitializer, Provider } from '@angular/core';\nimport {\n\tMissingTranslationHandler,\n\tMissingTranslationHandlerParams,\n\tprovideTranslateService,\n\tTranslateLoader,\n\tTranslateService,\n} from '@ngx-translate/core';\nimport { TranslateHttpLoader } from '@ngx-translate/http-loader';\nimport { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';\n\n/**\n * Language definition interface\n */\nexport interface LanguageDefinition {\n\t/** Language code (ISO 639-1 format recommended) */\n\tcode: string;\n\t/** Display name for the language */\n\tname: string;\n}\n\n/**\n * Helper function to create a language definition with full type safety and IntelliSense\n */\nexport function createLanguage(config: LanguageDefinition): LanguageDefinition {\n\treturn {\n\t\tcode: config.code,\n\t\tname: config.name,\n\t};\n}\n\n// Default base languages - always available\nexport const DEFAULT_LANGUAGES: readonly LanguageDefinition[] = [\n\t{ code: 'en', name: 'English' },\n\t{ code: 'es', name: 'Español' },\n\t{ code: 'pt', name: 'Português' },\n] as const;\n\nexport const DEFAULT_LANGUAGE_CODE = 'en';\n\n// Export language codes for IntelliSense\nexport const DEFAULT_LANGUAGE_CODES = ['en', 'es', 'pt'] as const;\nexport type DefaultLanguageCode = (typeof DEFAULT_LANGUAGE_CODES)[number];\n\n// Helper type to extract language codes from LanguageDefinition arrays\ntype ExtractLanguageCode<T> = T extends readonly (infer U)[] ? (U extends LanguageDefinition ? U['code'] : never) : never;\n\n// Custom missing translation handler to show keys instead of falling back to default language\nexport class PlaceholderMissingTranslationHandler implements MissingTranslationHandler {\n\thandle(params: MissingTranslationHandlerParams): string {\n\t\t// Return the translation key as placeholder to make missing translations visible\n\t\treturn params.key;\n\t}\n}\n\n/**\n * Main translation configuration interface\n */\nexport interface TranslationConfig {\n\t/**\n\t * Additional languages to make available beyond the default base languages (en, es, pt)\n\t * When you add languages here, they become available in defaultLang and excludeLanguages\n\t * @example [{ code: 'de', name: 'Deutsch' }, { code: 'fr', name: 'Français' }]\n\t */\n\tadditionalLanguages?: readonly LanguageDefinition[];\n\t/**\n\t * Languages to exclude from the available set\n\t * IntelliSense includes: base languages (en, es, pt) + any additionalLanguages you specified above\n\t * @example ['pt'] to exclude Portuguese\n\t */\n\texcludeLanguages?: readonly string[];\n\t/**\n\t * Default language code\n\t * IntelliSense includes: base languages (en, es, pt) + any additionalLanguages you specified above\n\t * @example 'en'\n\t */\n\tdefaultLang?: string;\n\t/** Translation file paths */\n\ttranslationPaths?: string[];\n}\n\n// Injection tokens for dependency injection\nexport const TRANSLATION_CONFIG_TOKEN = new InjectionToken<TranslationConfig>('Translation Configuration');\n\nconst LOCALIZATION_LOCAL_STORAGE_KEY = 'language';\n\n/**\n * Factory function to create HTTP loader for translations with custom paths\n */\nexport function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {\n\treturn new TranslateHttpLoader(http, './assets/i18n/', '.json');\n}\n\n/**\n * Factory function to create multi-path HTTP loader for translations\n */\nexport function MultiPathHttpLoaderFactory(httpBackend: HttpBackend, paths: string[]): MultiTranslateHttpLoader {\n\treturn new MultiTranslateHttpLoader(httpBackend, paths);\n}\n\n/**\n * Utility function to extend default languages with additional ones\n */\nexport function extendDefaultLanguages(additionalLanguages: LanguageDefinition[]): LanguageDefinition[] {\n\treturn [...DEFAULT_LANGUAGES, ...additionalLanguages];\n}\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class TranslationService {\n\tprivate readonly translate = inject(TranslateService);\n\tprivate readonly document = inject(DOCUMENT);\n\tprivate initialized = false;\n\n\t// Default configuration - can be overridden by provider\n\tprivate config: {\n\t\tavailableLanguages: LanguageDefinition[];\n\t\tdefaultLang: string;\n\t\ttranslationPaths: string[];\n\t} = {\n\t\tavailableLanguages: [...DEFAULT_LANGUAGES],\n\t\tdefaultLang: DEFAULT_LANGUAGE_CODE,\n\t\ttranslationPaths: ['/assets/i18n/'],\n\t};\n\n\tconstructor(@Optional() @Inject(TRANSLATION_CONFIG_TOKEN) private readonly translationConfig?: TranslationConfig) {\n\t\t// Configure with provided config or defaults\n\t\tif (translationConfig) {\n\t\t\tthis.configure(translationConfig);\n\t\t} else {\n\t\t\t// Initialize with defaults immediately\n\t\t\tthis.initializeFromStorage();\n\t\t\tthis.applyLanguage();\n\t\t\tthis.initialized = true;\n\t\t}\n\t}\n\n\t/**\n\t * Configure and initialize the translation service (used by provider)\n\t */\n\tpublic configure(config: TranslationConfig = {}): void {\n\t\t// Start with default base languages (en, es, pt)\n\t\tlet availableLanguages = [...DEFAULT_LANGUAGES];\n\n\t\t// Handle additional languages\n\t\tif (config.additionalLanguages) {\n\t\t\tavailableLanguages = [...DEFAULT_LANGUAGES, ...config.additionalLanguages];\n\t\t}\n\n\t\t// Apply language exclusions if specified\n\t\tif (config.excludeLanguages) {\n\t\t\tconst excludeCodes = config.excludeLanguages as string[];\n\t\t\tavailableLanguages = availableLanguages.filter((lang) => !excludeCodes.includes(lang.code));\n\t\t}\n\n\t\t// Determine default language\n\t\tconst defaultLang = config.defaultLang || DEFAULT_LANGUAGE_CODE;\n\n\t\t// Update configuration\n\t\tthis.config = {\n\t\t\tavailableLanguages,\n\t\t\tdefaultLang,\n\t\t\ttranslationPaths: config.translationPaths || this.config.translationPaths,\n\t\t};\n\n\t\t// Validate defaultLang is in available languages\n\t\tconst availableCodes = this.config.availableLanguages.map((lang) => lang.code);\n\t\tif (!availableCodes.includes(this.config.defaultLang)) {\n\t\t\tconsole.warn(\n\t\t\t\t`TranslationService: defaultLang '${this.config.defaultLang}' not in availableLanguages, using '${availableCodes[0] || DEFAULT_LANGUAGE_CODE}'`,\n\t\t\t);\n\t\t\tthis.config.defaultLang = availableCodes[0] || DEFAULT_LANGUAGE_CODE;\n\t\t}\n\n\t\t// If this is called after constructor (provider case), re-initialize with new config\n\t\tif (this.initialized) {\n\t\t\tthis.initializeFromStorage();\n\t\t} else {\n\t\t\tthis.initializeFromStorage();\n\t\t\tthis.initialized = true;\n\t\t}\n\t}\n\n\t/**\n\t * Initialize translation from localStorage and apply it immediately\n\t */\n\tprivate initializeFromStorage(): void {\n\t\t// Safety checks for browser environment\n\t\tif (typeof window === 'undefined' || typeof localStorage === 'undefined') {\n\t\t\tconsole.warn('TranslationService: Browser environment not available, using defaults');\n\t\t\tthis.applyLanguage();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// Set up translate service with available languages\n\t\t\tthis.translate.setDefaultLang(this.config.defaultLang);\n\n\t\t\t// Load available translations\n\t\t\tconst languageCodes = this.config.availableLanguages.map((lang) => lang.code);\n\t\t\tthis.translate.addLangs(languageCodes);\n\n\t\t\t// Get current language from storage or use default\n\t\t\tconst savedLang = localStorage.getItem(LOCALIZATION_LOCAL_STORAGE_KEY);\n\t\t\tconst currentLang = savedLang && languageCodes.includes(savedLang) ? savedLang : this.config.defaultLang;\n\n\t\t\t// Apply language immediately\n\t\t\tthis.applyLanguage(currentLang);\n\t\t} catch (error) {\n\t\t\tconsole.error('TranslationService: Failed to initialize from storage:', error);\n\t\t\tthis.applyLanguage();\n\t\t}\n\t}\n\n\t/**\n\t * Apply the current language to the translate service and document\n\t */\n\tprivate applyLanguage(lang?: string): void {\n\t\tconst targetLang = lang || this.config.defaultLang;\n\n\t\t// Set the language in translate service\n\t\tthis.translate.use(targetLang);\n\n\t\t// Update HTML lang attribute for accessibility and SEO\n\t\tthis.document.documentElement.lang = targetLang;\n\n\t\t// Persist to localStorage\n\t\tif (typeof localStorage !== 'undefined') {\n\t\t\tlocalStorage.setItem(LOCALIZATION_LOCAL_STORAGE_KEY, targetLang);\n\t\t}\n\t}\n\n\t/**\n\t * Set the current language and persist to localStorage\n\t */\n\tsetLanguage(lang: string): void {\n\t\tif (lang) {\n\t\t\t// Validate language is available\n\t\t\tconst availableCodes = this.config.availableLanguages.map((l) => l.code);\n\t\t\tif (!availableCodes.includes(lang)) {\n\t\t\t\tconsole.warn(`TranslationService: Language '${lang}' not available, using default '${this.config.defaultLang}'`);\n\t\t\t\tlang = this.config.defaultLang;\n\t\t\t}\n\n\t\t\tthis.applyLanguage(lang);\n\t\t}\n\t}\n\n\t/**\n\t * Get the current language from localStorage or default\n\t */\n\tgetCurrentLanguage(): string {\n\t\tif (typeof localStorage === 'undefined') {\n\t\t\treturn this.config.defaultLang;\n\t\t}\n\n\t\tconst saved = localStorage.getItem(LOCALIZATION_LOCAL_STORAGE_KEY);\n\t\tconst availableCodes = this.config.availableLanguages.map((l) => l.code);\n\n\t\treturn saved && availableCodes.includes(saved) ? saved : this.config.defaultLang;\n\t}\n\n\t/**\n\t * Get the current HTML lang attribute\n\t */\n\tgetCurrentHtmlLanguage(): string {\n\t\treturn this.document.documentElement.lang || this.config.defaultLang;\n\t}\n\n\t/**\n\t * Get available languages\n\t */\n\tgetAvailableLanguages(): string[] {\n\t\treturn this.translate.getLangs();\n\t}\n\n\t/**\n\t * Get default language\n\t */\n\tgetDefaultLanguage(): string {\n\t\treturn this.config.defaultLang;\n\t}\n\n\t/**\n\t * Instantly translate a key with optional parameters\n\t */\n\tinstant(key: string, params?: object | undefined): string {\n\t\tif (params) {\n\t\t\treturn this.translate.instant(key, params);\n\t\t}\n\n\t\treturn this.translate.instant(key);\n\t}\n\n\t/**\n\t * Get observable translation for a key\n\t */\n\tget(key: string, params?: object | undefined) {\n\t\tif (params) {\n\t\t\treturn this.translate.get(key, params);\n\t\t}\n\n\t\treturn this.translate.get(key);\n\t}\n\n\t/**\n\t * Get stream of translations for a key\n\t */\n\tstream(key: string, params?: object | undefined) {\n\t\tif (params) {\n\t\t\treturn this.translate.stream(key, params);\n\t\t}\n\n\t\treturn this.translate.stream(key);\n\t}\n\n\t/**\n\t * Get available languages configuration\n\t */\n\tgetAvailableLanguagesConfig(): LanguageDefinition[] {\n\t\treturn this.config.availableLanguages;\n\t}\n\n\t/**\n\t * Get available language codes\n\t */\n\tgetAvailableLanguageCodes(): string[] {\n\t\treturn this.config.availableLanguages.map((lang) => lang.code);\n\t}\n\n\t/**\n\t * Get language configuration by code\n\t */\n\tgetLanguageByCode(code: string): LanguageDefinition | undefined {\n\t\treturn this.config.availableLanguages.find((lang) => lang.code === code);\n\t}\n\n\t/**\n\t * Get language display name by code\n\t */\n\tgetLanguageDisplayName(code: string): string {\n\t\tconst language = this.getLanguageByCode(code);\n\t\treturn language ? language.name : code.toUpperCase();\n\t}\n\n\t/**\n\t * Get localized language name by code using translations\n\t * This automatically returns the localized name based on the current language\n\t */\n\tgetLocalizedLanguageName(code: string): string {\n\t\tconst translationKey = `sdk.language.languages.${code}`;\n\t\tconst translatedName = this.translate.instant(translationKey);\n\n\t\tif (translatedName && translatedName !== translationKey) {\n\t\t\treturn translatedName;\n\t\t}\n\n\t\tconst language = this.getLanguageByCode(code);\n\t\treturn language ? language.name : code.toUpperCase();\n\t}\n\n\t/**\n\t * Force initialization method for MFE environments\n\t */\n\tpublic init(): void {\n\t\t// This method just ensures the service is instantiated and initialized\n\t\tthis.getAvailableLanguagesConfig(); // Trigger any lazy initialization\n\t}\n}\n\n/**\n * Provider function for translation configuration in Angular applications\n * This provides the translation configuration through dependency injection\n *\n * @example\n * ```typescript\n * // Basic usage - only default languages available (en, es, pt)\n * provideTranslation({\n * defaultLang: 'es' // IntelliSense shows: 'en', 'es', 'pt'\n * }),\n *\n * // With additional languages - IntelliSense includes base + additional languages\n * provideTranslation({\n * additionalLanguages: [\n * { code: 'de', name: 'Deutsch' },\n * { code: 'fr', name: 'Français' }\n * ] as const,\n * defaultLang: 'de', // IntelliSense shows: 'en', 'es', 'pt', 'de', 'fr'\n * excludeLanguages: ['pt'] as const // IntelliSense shows: 'en', 'es', 'pt', 'de', 'fr'\n * })\n * ```\n */\n\n// Overload 1: No config provided - use all defaults\nexport function provideTranslation(): (Provider | EnvironmentProviders)[];\n\n// Overload 2: Config without additionalLanguages - provides IntelliSense for base languages only\nexport function provideTranslation(config: {\n\t/**\n\t * Default language code (from base languages: en, es, pt)\n\t */\n\tdefaultLang?: DefaultLanguageCode;\n\t/**\n\t * Languages to exclude from the default base languages (en, es, pt)\n\t */\n\texcludeLanguages?: readonly DefaultLanguageCode[];\n\t/** Translation file paths */\n\ttranslationPaths?: string[];\n\tadditionalLanguages?: never;\n}): (Provider | EnvironmentProviders)[];\n\n// Overload 3: Config with additionalLanguages - provides IntelliSense for base + additional languages\nexport function provideTranslation<const T extends readonly LanguageDefinition[]>(config: {\n\t/**\n\t * Additional languages to make available beyond the default base languages (en, es, pt)\n\t */\n\tadditionalLanguages: T;\n\t/**\n\t * Default language code (includes both base and additional languages)\n\t */\n\tdefaultLang?: DefaultLanguageCode | ExtractLanguageCode<T>;\n\t/**\n\t * Languages to exclude from the available set (includes both base and additional languages)\n\t */\n\texcludeLanguages?: readonly (DefaultLanguageCode | ExtractLanguageCode<T>)[];\n\t/** Translation file paths */\n\ttranslationPaths?: string[];\n}): (Provider | EnvironmentProviders)[];\n\n// Implementation\nexport function provideTranslation(config?: TranslationConfig): (Provider | EnvironmentProviders)[] {\n\t// Determine which loader to use based on configuration\n\tconst loaderProvider =\n\t\tconfig?.translationPaths && config.translationPaths.length > 0\n\t\t\t? {\n\t\t\t\t\tprovide: TranslateLoader,\n\t\t\t\t\tuseFactory: (httpBackend: HttpBackend) => MultiPathHttpLoaderFactory(httpBackend, config.translationPaths!),\n\t\t\t\t\tdeps: [HttpBackend],\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tprovide: TranslateLoader,\n\t\t\t\t\tuseFactory: HttpLoaderFactory,\n\t\t\t\t\tdeps: [HttpClient],\n\t\t\t\t};\n\n\treturn [\n\t\t// Provide the complete ngx-translate setup with appropriate loader and missing translation handler\n\t\tprovideTranslateService({\n\t\t\tloader: loaderProvider,\n\t\t\tmissingTranslationHandler: {\n\t\t\t\tprovide: MissingTranslationHandler,\n\t\t\t\tuseClass: PlaceholderMissingTranslationHandler,\n\t\t\t},\n\t\t\tuseDefaultLang: false, // Don't fall back to default language, use missing translation handler instead\n\t\t}),\n\t\t// Provide our translation configuration\n\t\t{\n\t\t\tprovide: TRANSLATION_CONFIG_TOKEN,\n\t\t\tuseValue: config || {},\n\t\t},\n\t\t// Automatically initialize translation service for MFE compatibility\n\t\tprovideAppInitializer(() => inject(TranslationService).init()),\n\t];\n}\n","// Export our translation service and types\nexport * from './src/translation.service';\n\n// Re-export useful ngx-translate components and services for convenience\nexport {\n\tDefaultLangChangeEvent,\n\tFakeMissingTranslationHandler,\n\tLangChangeEvent,\n\tMissingTranslationHandler,\n\tTranslateCompiler,\n\tTranslateDefaultParser,\n\tTranslateDirective,\n\tTranslateFakeCompiler,\n\tTranslateLoader,\n\tTranslateModule,\n\tTranslateParser,\n\tTranslatePipe,\n\tTranslateService,\n\tTranslateStore,\n\tTranslationChangeEvent,\n\tprovideTranslateService,\n} from '@ngx-translate/core';\n\n// Re-export the HTTP loader for advanced use cases\nexport { TranslateHttpLoader } from '@ngx-translate/http-loader';\n\n// Re-export MultiTranslateHttpLoader for multi-path scenarios\nexport { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';\n\n// Re-export HttpBackend for custom loader factories\nexport { HttpBackend } from '@angular/common/http';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAuBA;;AAEG;AACG,SAAU,cAAc,CAAC,MAA0B,EAAA;IACxD,OAAO;QACN,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;KACjB;AACF;AAEA;AACa,MAAA,iBAAiB,GAAkC;AAC/D,IAAA,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;AAC/B,IAAA,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;AAC/B,IAAA,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE;;AAG3B,MAAM,qBAAqB,GAAG;AAErC;AACa,MAAA,sBAAsB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI;AAMvD;MACa,oCAAoC,CAAA;AAChD,IAAA,MAAM,CAAC,MAAuC,EAAA;;QAE7C,OAAO,MAAM,CAAC,GAAG;;AAElB;AA4BD;MACa,wBAAwB,GAAG,IAAI,cAAc,CAAoB,2BAA2B;AAEzG,MAAM,8BAA8B,GAAG,UAAU;AAEjD;;AAEG;AACG,SAAU,iBAAiB,CAAC,IAAgB,EAAA;IACjD,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC;AAChE;AAEA;;AAEG;AACa,SAAA,0BAA0B,CAAC,WAAwB,EAAE,KAAe,EAAA;AACnF,IAAA,OAAO,IAAI,wBAAwB,CAAC,WAAW,EAAE,KAAK,CAAC;AACxD;AAEA;;AAEG;AACG,SAAU,sBAAsB,CAAC,mBAAyC,EAAA;AAC/E,IAAA,OAAO,CAAC,GAAG,iBAAiB,EAAE,GAAG,mBAAmB,CAAC;AACtD;MAKa,kBAAkB,CAAA;AAgB6C,IAAA,iBAAA;AAf1D,IAAA,SAAS,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ED,qBAAqB,CAAC,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,EAAE,CAAC;KAC9D;AACF;;ACldA;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-utils-translation.mjs","sources":["../../../projects/sdk/utils/translation/src/translation.service.ts","../../../projects/sdk/utils/translation/public-api.ts","../../../projects/sdk/utils/translation/sixbell-telco-sdk-utils-translation.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { HttpBackend, HttpClient } from '@angular/common/http';\nimport { EnvironmentProviders, Inject, inject, Injectable, InjectionToken, Optional, provideAppInitializer, Provider } from '@angular/core';\nimport {\n\tMissingTranslationHandler,\n\tMissingTranslationHandlerParams,\n\tprovideTranslateService,\n\tTranslateLoader,\n\tTranslateService,\n} from '@ngx-translate/core';\nimport { TranslateHttpLoader } from '@ngx-translate/http-loader';\nimport { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';\n\n/**\n * Language definition interface\n */\nexport interface LanguageDefinition {\n\t/** Language code (ISO 639-1 format recommended) */\n\tcode: string;\n\t/** Display name for the language */\n\tname: string;\n}\n\n/**\n * Helper function to create a language definition with full type safety and IntelliSense\n */\nexport function createLanguage(config: LanguageDefinition): LanguageDefinition {\n\treturn {\n\t\tcode: config.code,\n\t\tname: config.name,\n\t};\n}\n\n// Default base languages - always available\nexport const DEFAULT_LANGUAGES: readonly LanguageDefinition[] = [\n\t{ code: 'en', name: 'English' },\n\t{ code: 'es', name: 'Español' },\n\t{ code: 'pt', name: 'Português' },\n] as const;\n\nexport const DEFAULT_LANGUAGE_CODE = 'en';\n\n// Export language codes for IntelliSense\nexport const DEFAULT_LANGUAGE_CODES = ['en', 'es', 'pt'] as const;\nexport type DefaultLanguageCode = (typeof DEFAULT_LANGUAGE_CODES)[number];\n\n// Helper type to extract language codes from LanguageDefinition arrays\ntype ExtractLanguageCode<T> = T extends readonly (infer U)[] ? (U extends LanguageDefinition ? U['code'] : never) : never;\n\n// Custom missing translation handler to show keys instead of falling back to default language\nexport class PlaceholderMissingTranslationHandler implements MissingTranslationHandler {\n\thandle(params: MissingTranslationHandlerParams): string {\n\t\t// Return the translation key as placeholder to make missing translations visible\n\t\treturn params.key;\n\t}\n}\n\n/**\n * Main translation configuration interface\n */\nexport interface TranslationConfig {\n\t/**\n\t * Additional languages to make available beyond the default base languages (en, es, pt)\n\t * When you add languages here, they become available in defaultLang and excludeLanguages\n\t * @example [{ code: 'de', name: 'Deutsch' }, { code: 'fr', name: 'Français' }]\n\t */\n\tadditionalLanguages?: readonly LanguageDefinition[];\n\t/**\n\t * Languages to exclude from the available set\n\t * IntelliSense includes: base languages (en, es, pt) + any additionalLanguages you specified above\n\t * @example ['pt'] to exclude Portuguese\n\t */\n\texcludeLanguages?: readonly string[];\n\t/**\n\t * Default language code\n\t * IntelliSense includes: base languages (en, es, pt) + any additionalLanguages you specified above\n\t * @example 'en'\n\t */\n\tdefaultLang?: string;\n\t/** Translation file paths */\n\ttranslationPaths?: string[];\n}\n\n// Injection tokens for dependency injection\nexport const TRANSLATION_CONFIG_TOKEN = new InjectionToken<TranslationConfig>('Translation Configuration');\n\nconst LOCALIZATION_LOCAL_STORAGE_KEY = 'language';\n\n/**\n * Factory function to create HTTP loader for translations with custom paths\n */\nexport function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {\n\treturn new TranslateHttpLoader(http, './assets/i18n/', '.json');\n}\n\n/**\n * Factory function to create multi-path HTTP loader for translations\n */\nexport function MultiPathHttpLoaderFactory(httpBackend: HttpBackend, paths: string[]): MultiTranslateHttpLoader {\n\treturn new MultiTranslateHttpLoader(httpBackend, paths);\n}\n\n/**\n * Utility function to extend default languages with additional ones\n */\nexport function extendDefaultLanguages(additionalLanguages: LanguageDefinition[]): LanguageDefinition[] {\n\treturn [...DEFAULT_LANGUAGES, ...additionalLanguages];\n}\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class TranslationService {\n\tprivate readonly translate = inject(TranslateService);\n\tprivate readonly document = inject(DOCUMENT);\n\tprivate initialized = false;\n\n\t// Default configuration - can be overridden by provider\n\tprivate config: {\n\t\tavailableLanguages: LanguageDefinition[];\n\t\tdefaultLang: string;\n\t\ttranslationPaths: string[];\n\t} = {\n\t\tavailableLanguages: [...DEFAULT_LANGUAGES],\n\t\tdefaultLang: DEFAULT_LANGUAGE_CODE,\n\t\ttranslationPaths: ['/assets/i18n/'],\n\t};\n\n\tconstructor(@Optional() @Inject(TRANSLATION_CONFIG_TOKEN) private readonly translationConfig?: TranslationConfig) {\n\t\t// Configure with provided config or defaults\n\t\tif (translationConfig) {\n\t\t\tthis.configure(translationConfig);\n\t\t} else {\n\t\t\t// Initialize with defaults immediately\n\t\t\tthis.initializeFromStorage();\n\t\t\tthis.applyLanguage();\n\t\t\tthis.initialized = true;\n\t\t}\n\t}\n\n\t/**\n\t * Configure and initialize the translation service (used by provider)\n\t */\n\tpublic configure(config: TranslationConfig = {}): void {\n\t\t// Start with default base languages (en, es, pt)\n\t\tlet availableLanguages = [...DEFAULT_LANGUAGES];\n\n\t\t// Handle additional languages\n\t\tif (config.additionalLanguages) {\n\t\t\tavailableLanguages = [...DEFAULT_LANGUAGES, ...config.additionalLanguages];\n\t\t}\n\n\t\t// Apply language exclusions if specified\n\t\tif (config.excludeLanguages) {\n\t\t\tconst excludeCodes = config.excludeLanguages as string[];\n\t\t\tavailableLanguages = availableLanguages.filter((lang) => !excludeCodes.includes(lang.code));\n\t\t}\n\n\t\t// Determine default language\n\t\tconst defaultLang = config.defaultLang || DEFAULT_LANGUAGE_CODE;\n\n\t\t// Update configuration\n\t\tthis.config = {\n\t\t\tavailableLanguages,\n\t\t\tdefaultLang,\n\t\t\ttranslationPaths: config.translationPaths || this.config.translationPaths,\n\t\t};\n\n\t\t// Validate defaultLang is in available languages\n\t\tconst availableCodes = this.config.availableLanguages.map((lang) => lang.code);\n\t\tif (!availableCodes.includes(this.config.defaultLang)) {\n\t\t\tconsole.warn(\n\t\t\t\t`TranslationService: defaultLang '${this.config.defaultLang}' not in availableLanguages, using '${availableCodes[0] || DEFAULT_LANGUAGE_CODE}'`,\n\t\t\t);\n\t\t\tthis.config.defaultLang = availableCodes[0] || DEFAULT_LANGUAGE_CODE;\n\t\t}\n\n\t\t// If this is called after constructor (provider case), re-initialize with new config\n\t\tif (this.initialized) {\n\t\t\tthis.initializeFromStorage();\n\t\t} else {\n\t\t\tthis.initializeFromStorage();\n\t\t\tthis.initialized = true;\n\t\t}\n\t}\n\n\t/**\n\t * Initialize translation from localStorage and apply it immediately\n\t */\n\tprivate initializeFromStorage(): void {\n\t\t// Safety checks for browser environment\n\t\tif (typeof window === 'undefined' || typeof localStorage === 'undefined') {\n\t\t\tconsole.warn('TranslationService: Browser environment not available, using defaults');\n\t\t\tthis.applyLanguage();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// Set up translate service with available languages\n\t\t\tthis.translate.setDefaultLang(this.config.defaultLang);\n\n\t\t\t// Load available translations\n\t\t\tconst languageCodes = this.config.availableLanguages.map((lang) => lang.code);\n\t\t\tthis.translate.addLangs(languageCodes);\n\n\t\t\t// Get current language from storage or use default\n\t\t\tconst savedLang = localStorage.getItem(LOCALIZATION_LOCAL_STORAGE_KEY);\n\t\t\tconst currentLang = savedLang && languageCodes.includes(savedLang) ? savedLang : this.config.defaultLang;\n\n\t\t\t// Apply language immediately\n\t\t\tthis.applyLanguage(currentLang);\n\t\t} catch (error) {\n\t\t\tconsole.error('TranslationService: Failed to initialize from storage:', error);\n\t\t\tthis.applyLanguage();\n\t\t}\n\t}\n\n\t/**\n\t * Apply the current language to the translate service and document\n\t */\n\tprivate applyLanguage(lang?: string): void {\n\t\tconst targetLang = lang || this.config.defaultLang;\n\n\t\t// Set the language in translate service\n\t\tthis.translate.use(targetLang);\n\n\t\t// Update HTML lang attribute for accessibility and SEO\n\t\tthis.document.documentElement.lang = targetLang;\n\n\t\t// Persist to localStorage\n\t\tif (typeof localStorage !== 'undefined') {\n\t\t\tlocalStorage.setItem(LOCALIZATION_LOCAL_STORAGE_KEY, targetLang);\n\t\t}\n\t}\n\n\t/**\n\t * Set the current language and persist to localStorage\n\t */\n\tsetLanguage(lang: string): void {\n\t\tif (lang) {\n\t\t\t// Validate language is available\n\t\t\tconst availableCodes = this.config.availableLanguages.map((l) => l.code);\n\t\t\tif (!availableCodes.includes(lang)) {\n\t\t\t\tconsole.warn(`TranslationService: Language '${lang}' not available, using default '${this.config.defaultLang}'`);\n\t\t\t\tlang = this.config.defaultLang;\n\t\t\t}\n\n\t\t\tthis.applyLanguage(lang);\n\t\t}\n\t}\n\n\t/**\n\t * Get the current language from localStorage or default\n\t */\n\tgetCurrentLanguage(): string {\n\t\tif (typeof localStorage === 'undefined') {\n\t\t\treturn this.config.defaultLang;\n\t\t}\n\n\t\tconst saved = localStorage.getItem(LOCALIZATION_LOCAL_STORAGE_KEY);\n\t\tconst availableCodes = this.config.availableLanguages.map((l) => l.code);\n\n\t\treturn saved && availableCodes.includes(saved) ? saved : this.config.defaultLang;\n\t}\n\n\t/**\n\t * Get the current HTML lang attribute\n\t */\n\tgetCurrentHtmlLanguage(): string {\n\t\treturn this.document.documentElement.lang || this.config.defaultLang;\n\t}\n\n\t/**\n\t * Get available languages\n\t */\n\tgetAvailableLanguages(): string[] {\n\t\treturn this.translate.getLangs();\n\t}\n\n\t/**\n\t * Get default language\n\t */\n\tgetDefaultLanguage(): string {\n\t\treturn this.config.defaultLang;\n\t}\n\n\t/**\n\t * Instantly translate a key with optional parameters\n\t */\n\tinstant(key: string, params?: object | undefined): string {\n\t\tif (params) {\n\t\t\treturn this.translate.instant(key, params);\n\t\t}\n\n\t\treturn this.translate.instant(key);\n\t}\n\n\t/**\n\t * Get observable translation for a key\n\t */\n\tget(key: string, params?: object | undefined) {\n\t\tif (params) {\n\t\t\treturn this.translate.get(key, params);\n\t\t}\n\n\t\treturn this.translate.get(key);\n\t}\n\n\t/**\n\t * Get stream of translations for a key\n\t */\n\tstream(key: string, params?: object | undefined) {\n\t\tif (params) {\n\t\t\treturn this.translate.stream(key, params);\n\t\t}\n\n\t\treturn this.translate.stream(key);\n\t}\n\n\t/**\n\t * Get available languages configuration\n\t */\n\tgetAvailableLanguagesConfig(): LanguageDefinition[] {\n\t\treturn this.config.availableLanguages;\n\t}\n\n\t/**\n\t * Get available language codes\n\t */\n\tgetAvailableLanguageCodes(): string[] {\n\t\treturn this.config.availableLanguages.map((lang) => lang.code);\n\t}\n\n\t/**\n\t * Get language configuration by code\n\t */\n\tgetLanguageByCode(code: string): LanguageDefinition | undefined {\n\t\treturn this.config.availableLanguages.find((lang) => lang.code === code);\n\t}\n\n\t/**\n\t * Get language display name by code\n\t */\n\tgetLanguageDisplayName(code: string): string {\n\t\tconst language = this.getLanguageByCode(code);\n\t\treturn language ? language.name : code.toUpperCase();\n\t}\n\n\t/**\n\t * Get localized language name by code using translations\n\t * This automatically returns the localized name based on the current language\n\t */\n\tgetLocalizedLanguageName(code: string): string {\n\t\tconst translationKey = `sdk.language.languages.${code}`;\n\t\tconst translatedName = this.translate.instant(translationKey);\n\n\t\tif (translatedName && translatedName !== translationKey) {\n\t\t\treturn translatedName;\n\t\t}\n\n\t\tconst language = this.getLanguageByCode(code);\n\t\treturn language ? language.name : code.toUpperCase();\n\t}\n\n\t/**\n\t * Force initialization method for MFE environments\n\t */\n\tpublic init(): void {\n\t\t// This method just ensures the service is instantiated and initialized\n\t\tthis.getAvailableLanguagesConfig(); // Trigger any lazy initialization\n\t}\n}\n\n/**\n * Provider function for translation configuration in Angular applications\n * This provides the translation configuration through dependency injection\n *\n * @example\n * ```typescript\n * // Basic usage - only default languages available (en, es, pt)\n * provideTranslation({\n * defaultLang: 'es' // IntelliSense shows: 'en', 'es', 'pt'\n * }),\n *\n * // With additional languages - IntelliSense includes base + additional languages\n * provideTranslation({\n * additionalLanguages: [\n * { code: 'de', name: 'Deutsch' },\n * { code: 'fr', name: 'Français' }\n * ] as const,\n * defaultLang: 'de', // IntelliSense shows: 'en', 'es', 'pt', 'de', 'fr'\n * excludeLanguages: ['pt'] as const // IntelliSense shows: 'en', 'es', 'pt', 'de', 'fr'\n * })\n * ```\n */\n\n// Overload 1: No config provided - use all defaults\nexport function provideTranslation(): (Provider | EnvironmentProviders)[];\n\n// Overload 2: Config without additionalLanguages - provides IntelliSense for base languages only\nexport function provideTranslation(config: {\n\t/**\n\t * Default language code (from base languages: en, es, pt)\n\t */\n\tdefaultLang?: DefaultLanguageCode;\n\t/**\n\t * Languages to exclude from the default base languages (en, es, pt)\n\t */\n\texcludeLanguages?: readonly DefaultLanguageCode[];\n\t/** Translation file paths */\n\ttranslationPaths?: string[];\n\tadditionalLanguages?: never;\n}): (Provider | EnvironmentProviders)[];\n\n// Overload 3: Config with additionalLanguages - provides IntelliSense for base + additional languages\nexport function provideTranslation<const T extends readonly LanguageDefinition[]>(config: {\n\t/**\n\t * Additional languages to make available beyond the default base languages (en, es, pt)\n\t */\n\tadditionalLanguages: T;\n\t/**\n\t * Default language code (includes both base and additional languages)\n\t */\n\tdefaultLang?: DefaultLanguageCode | ExtractLanguageCode<T>;\n\t/**\n\t * Languages to exclude from the available set (includes both base and additional languages)\n\t */\n\texcludeLanguages?: readonly (DefaultLanguageCode | ExtractLanguageCode<T>)[];\n\t/** Translation file paths */\n\ttranslationPaths?: string[];\n}): (Provider | EnvironmentProviders)[];\n\n// Implementation\nexport function provideTranslation(config?: TranslationConfig): (Provider | EnvironmentProviders)[] {\n\t// Determine which loader to use based on configuration\n\tconst loaderProvider =\n\t\tconfig?.translationPaths && config.translationPaths.length > 0\n\t\t\t? {\n\t\t\t\t\tprovide: TranslateLoader,\n\t\t\t\t\tuseFactory: (httpBackend: HttpBackend) => MultiPathHttpLoaderFactory(httpBackend, config.translationPaths!),\n\t\t\t\t\tdeps: [HttpBackend],\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tprovide: TranslateLoader,\n\t\t\t\t\tuseFactory: HttpLoaderFactory,\n\t\t\t\t\tdeps: [HttpClient],\n\t\t\t\t};\n\n\treturn [\n\t\t// Provide the complete ngx-translate setup with appropriate loader and missing translation handler\n\t\tprovideTranslateService({\n\t\t\tloader: loaderProvider,\n\t\t\tmissingTranslationHandler: {\n\t\t\t\tprovide: MissingTranslationHandler,\n\t\t\t\tuseClass: PlaceholderMissingTranslationHandler,\n\t\t\t},\n\t\t\tuseDefaultLang: false, // Don't fall back to default language, use missing translation handler instead\n\t\t}),\n\t\t// Provide our translation configuration\n\t\t{\n\t\t\tprovide: TRANSLATION_CONFIG_TOKEN,\n\t\t\tuseValue: config || {},\n\t\t},\n\t\t// Automatically initialize translation service for MFE compatibility\n\t\tprovideAppInitializer(() => inject(TranslationService).init()),\n\t];\n}\n","// Export our translation service and types\nexport * from './src/translation.service';\n\n// Re-export useful ngx-translate components and services for convenience\nexport * from '@ngx-translate/core';\n\n// Re-export the HTTP loader for advanced use cases\nexport * from '@ngx-translate/http-loader';\n\nexport * from 'ngx-translate-multi-http-loader';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAuBA;;AAEG;AACG,SAAU,cAAc,CAAC,MAA0B,EAAA;IACxD,OAAO;QACN,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;KACjB;AACF;AAEA;AACa,MAAA,iBAAiB,GAAkC;AAC/D,IAAA,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;AAC/B,IAAA,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;AAC/B,IAAA,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE;;AAG3B,MAAM,qBAAqB,GAAG;AAErC;AACa,MAAA,sBAAsB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI;AAMvD;MACa,oCAAoC,CAAA;AAChD,IAAA,MAAM,CAAC,MAAuC,EAAA;;QAE7C,OAAO,MAAM,CAAC,GAA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E,CAAC,WAAwB,KAAK,0BAA0B,CAAC,WAAW,EAAE,MAAM,CAAC,gBAAiB,CAAC;YAC3G,IAAI,EAAE,CAAC,WAAW,CAAC;AACnB;AACF,UAAE;AACA,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,UAAU,EAAE,iBAAiB;YAC7B,IAAI,EAAE,CAAC,UAAU,CAAC;SAClB;IAEJ,OAAO;;AAEN,QAAA,uBAAuB,CAAC;AACvB,YAAA,MAAM,EAAE,cAAc;AACtB,YAAA,yBAAyB,EAAE;AAC1B,gBAAA,OAAO,EAAE,yBAAyB;AAClC,gBAAA,QAAQ,EAAE,oCAAoC;AAC9C,aAAA;YACD,cAAc,EAAE,KAAK;SACrB,CAAC;;AAEF,QAAA;AACC,YAAA,OAAO,EAAE,wBAAwB;YACjC,QAAQ,EAAE,MAAM,IAAI,EAAE;AACtB,SAAA;;QAED,qBAAqB,CAAC,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,EAAE,CAAC;KAC9D;AACF;;ACldA;;ACAA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sixbell-telco/sdk",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A collection of reusable components designed for use in Sixbell Telco Angular projects",
5
5
  "keywords": [
6
6
  "sixbell",
@@ -150,38 +150,38 @@
150
150
  "types": "./utils/translation/index.d.ts",
151
151
  "default": "./fesm2022/sixbell-telco-sdk-utils-translation.mjs"
152
152
  },
153
- "./components/dropdown-menu/context": {
154
- "types": "./components/dropdown-menu/context/index.d.ts",
155
- "default": "./fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs"
156
- },
157
153
  "./components/dropdown-menu/bar": {
158
154
  "types": "./components/dropdown-menu/bar/index.d.ts",
159
155
  "default": "./fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs"
160
156
  },
157
+ "./components/dropdown-menu/context": {
158
+ "types": "./components/dropdown-menu/context/index.d.ts",
159
+ "default": "./fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs"
160
+ },
161
161
  "./components/forms/checkbox": {
162
162
  "types": "./components/forms/checkbox/index.d.ts",
163
163
  "default": "./fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs"
164
164
  },
165
- "./components/forms/combobox": {
166
- "types": "./components/forms/combobox/index.d.ts",
167
- "default": "./fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs"
168
- },
169
165
  "./components/forms/datepicker": {
170
166
  "types": "./components/forms/datepicker/index.d.ts",
171
167
  "default": "./fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs"
172
168
  },
169
+ "./components/forms/combobox": {
170
+ "types": "./components/forms/combobox/index.d.ts",
171
+ "default": "./fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs"
172
+ },
173
173
  "./components/forms/form-error": {
174
174
  "types": "./components/forms/form-error/index.d.ts",
175
175
  "default": "./fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs"
176
176
  },
177
- "./components/forms/input": {
178
- "types": "./components/forms/input/index.d.ts",
179
- "default": "./fesm2022/sixbell-telco-sdk-components-forms-input.mjs"
180
- },
181
177
  "./components/forms/radio": {
182
178
  "types": "./components/forms/radio/index.d.ts",
183
179
  "default": "./fesm2022/sixbell-telco-sdk-components-forms-radio.mjs"
184
180
  },
181
+ "./components/forms/input": {
182
+ "types": "./components/forms/input/index.d.ts",
183
+ "default": "./fesm2022/sixbell-telco-sdk-components-forms-input.mjs"
184
+ },
185
185
  "./components/forms/range": {
186
186
  "types": "./components/forms/range/index.d.ts",
187
187
  "default": "./fesm2022/sixbell-telco-sdk-components-forms-range.mjs"
@@ -210,14 +210,14 @@
210
210
  "types": "./utils/generators/uuid/index.d.ts",
211
211
  "default": "./fesm2022/sixbell-telco-sdk-utils-generators-uuid.mjs"
212
212
  },
213
- "./utils/pipes/time": {
214
- "types": "./utils/pipes/time/index.d.ts",
215
- "default": "./fesm2022/sixbell-telco-sdk-utils-pipes-time.mjs"
216
- },
217
213
  "./utils/pipes/extract-extension": {
218
214
  "types": "./utils/pipes/extract-extension/index.d.ts",
219
215
  "default": "./fesm2022/sixbell-telco-sdk-utils-pipes-extract-extension.mjs"
220
216
  },
217
+ "./utils/pipes/time": {
218
+ "types": "./utils/pipes/time/index.d.ts",
219
+ "default": "./fesm2022/sixbell-telco-sdk-utils-pipes-time.mjs"
220
+ },
221
221
  "./utils/pipes/to-bytes-extesion": {
222
222
  "types": "./utils/pipes/to-bytes-extesion/index.d.ts",
223
223
  "default": "./fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs"
@@ -234,10 +234,6 @@
234
234
  "types": "./components/icon/heroicons/solid/index.d.ts",
235
235
  "default": "./fesm2022/sixbell-telco-sdk-components-icon-heroicons-solid.mjs"
236
236
  },
237
- "./components/icon/material/baseline": {
238
- "types": "./components/icon/material/baseline/index.d.ts",
239
- "default": "./fesm2022/sixbell-telco-sdk-components-icon-material-baseline.mjs"
240
- },
241
237
  "./components/icon/material/outline": {
242
238
  "types": "./components/icon/material/outline/index.d.ts",
243
239
  "default": "./fesm2022/sixbell-telco-sdk-components-icon-material-outline.mjs"
@@ -249,6 +245,10 @@
249
245
  "./components/icon/material/sharp": {
250
246
  "types": "./components/icon/material/sharp/index.d.ts",
251
247
  "default": "./fesm2022/sixbell-telco-sdk-components-icon-material-sharp.mjs"
248
+ },
249
+ "./components/icon/material/baseline": {
250
+ "types": "./components/icon/material/baseline/index.d.ts",
251
+ "default": "./fesm2022/sixbell-telco-sdk-components-icon-material-baseline.mjs"
252
252
  }
253
253
  },
254
254
  "peerDependencies": {
@@ -1,5 +1,4 @@
1
1
  export * from './src/translation.service';
2
- export { DefaultLangChangeEvent, FakeMissingTranslationHandler, LangChangeEvent, MissingTranslationHandler, TranslateCompiler, TranslateDefaultParser, TranslateDirective, TranslateFakeCompiler, TranslateLoader, TranslateModule, TranslateParser, TranslatePipe, TranslateService, TranslateStore, TranslationChangeEvent, provideTranslateService, } from '@ngx-translate/core';
3
- export { TranslateHttpLoader } from '@ngx-translate/http-loader';
4
- export { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';
5
- export { HttpBackend } from '@angular/common/http';
2
+ export * from '@ngx-translate/core';
3
+ export * from '@ngx-translate/http-loader';
4
+ export * from 'ngx-translate-multi-http-loader';
Binary file