@brickclay-org/ui 0.0.50 → 0.0.51
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/fesm2022/brickclay-org-ui.mjs +57 -57
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +58 -58
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
|
11
11
|
import * as i1$2 from '@angular/cdk/scrolling';
|
|
12
12
|
import { ScrollingModule, CdkScrollable } from '@angular/cdk/scrolling';
|
|
13
13
|
import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
|
|
14
|
-
import { DIALOG_DATA
|
|
14
|
+
import { DIALOG_DATA, CdkDialogContainer, Dialog, DialogModule } from '@angular/cdk/dialog';
|
|
15
15
|
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
16
16
|
import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
|
|
17
17
|
|
|
@@ -4336,8 +4336,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4336
4336
|
* as before.
|
|
4337
4337
|
*
|
|
4338
4338
|
* • `INTERNAL_DIALOG_CONFIG` — Internal-only token used to pass our
|
|
4339
|
-
* full `
|
|
4340
|
-
* `
|
|
4339
|
+
* full `BkDialogConfig` (including animation fields) to the custom
|
|
4340
|
+
* `BkDialogContainerComponent`. Not part of the public API.
|
|
4341
4341
|
*/
|
|
4342
4342
|
// ──── Public ─────────────────────────────────────────────────────────────
|
|
4343
4343
|
/**
|
|
@@ -4349,10 +4349,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4349
4349
|
*
|
|
4350
4350
|
* Usage inside a dialog component:
|
|
4351
4351
|
* ```ts
|
|
4352
|
-
* constructor(@Inject(
|
|
4352
|
+
* constructor(@Inject(BK_DIALOG_DATA) public data: MyDataType) {}
|
|
4353
4353
|
* ```
|
|
4354
4354
|
*/
|
|
4355
|
-
const
|
|
4355
|
+
const BK_DIALOG_DATA = DIALOG_DATA;
|
|
4356
4356
|
/**
|
|
4357
4357
|
* Optional token for providing global dialog defaults at the
|
|
4358
4358
|
* application level.
|
|
@@ -4360,19 +4360,19 @@ const DIALOG_DATA = DIALOG_DATA$1;
|
|
|
4360
4360
|
* Usage in `app.config.ts` or a module's `providers` array:
|
|
4361
4361
|
* ```ts
|
|
4362
4362
|
* providers: [
|
|
4363
|
-
* { provide:
|
|
4363
|
+
* { provide: BK_DIALOG_GLOBAL_CONFIG, useValue: { animation: 'zoom', width: '600px' } }
|
|
4364
4364
|
* ]
|
|
4365
4365
|
* ```
|
|
4366
4366
|
*/
|
|
4367
|
-
const
|
|
4367
|
+
const BK_DIALOG_GLOBAL_CONFIG = new InjectionToken('BK_DIALOG_GLOBAL_CONFIG');
|
|
4368
4368
|
// ──── Internal ───────────────────────────────────────────────────────────
|
|
4369
4369
|
/**
|
|
4370
|
-
* Internal token that carries our full `
|
|
4371
|
-
* settings, position offsets, etc.) into the `
|
|
4370
|
+
* Internal token that carries our full `BkDialogConfig` (with animation
|
|
4371
|
+
* settings, position offsets, etc.) into the `BkDialogContainerComponent`.
|
|
4372
4372
|
*
|
|
4373
4373
|
* @internal — not exported from the barrel; do not depend on it.
|
|
4374
4374
|
*/
|
|
4375
|
-
const
|
|
4375
|
+
const BK_INTERNAL_DIALOG_CONFIG = new InjectionToken('BK_INTERNAL_DIALOG_CONFIG');
|
|
4376
4376
|
|
|
4377
4377
|
/**
|
|
4378
4378
|
* Dialog Animations
|
|
@@ -4387,7 +4387,7 @@ const INTERNAL_DIALOG_CONFIG = new InjectionToken('INTERNAL_DIALOG_CONFIG');
|
|
|
4387
4387
|
* 3. Future presets can be added without touching the component template.
|
|
4388
4388
|
*
|
|
4389
4389
|
* Each preset exports an `enter` and `leave` keyframe array plus a
|
|
4390
|
-
* recommended timing object. The
|
|
4390
|
+
* recommended timing object. The BkDialogContainerComponent plays these
|
|
4391
4391
|
* via `element.animate()`.
|
|
4392
4392
|
*/
|
|
4393
4393
|
/**
|
|
@@ -4539,7 +4539,7 @@ function getDialogBackdropAnimation(enterDuration, leaveDuration) {
|
|
|
4539
4539
|
}
|
|
4540
4540
|
|
|
4541
4541
|
/**
|
|
4542
|
-
*
|
|
4542
|
+
* BkDialogContainerComponent
|
|
4543
4543
|
*
|
|
4544
4544
|
* Architecture Decision:
|
|
4545
4545
|
* ─────────────────────
|
|
@@ -4559,19 +4559,19 @@ function getDialogBackdropAnimation(enterDuration, leaveDuration) {
|
|
|
4559
4559
|
* • Position-offset application via CSS margin.
|
|
4560
4560
|
*
|
|
4561
4561
|
* This component is **never** used directly — it is created internally
|
|
4562
|
-
* by `
|
|
4562
|
+
* by `BkDialogService` via CDK's `Dialog.open()`.
|
|
4563
4563
|
*/
|
|
4564
|
-
class
|
|
4564
|
+
class BkDialogContainerComponent extends CdkDialogContainer {
|
|
4565
4565
|
/**
|
|
4566
4566
|
* Our full config (including animation fields).
|
|
4567
|
-
* Provided by
|
|
4567
|
+
* Provided by BkDialogService via the INTERNAL_DIALOG_CONFIG token.
|
|
4568
4568
|
*/
|
|
4569
|
-
_dialogConfig = inject(
|
|
4569
|
+
_dialogConfig = inject(BK_INTERNAL_DIALOG_CONFIG);
|
|
4570
4570
|
// ──── Opened promise ─────────────────────────────────────────────────
|
|
4571
4571
|
/**
|
|
4572
4572
|
* Resolves when the enter animation finishes (or immediately for 'none').
|
|
4573
|
-
* `
|
|
4574
|
-
* `
|
|
4573
|
+
* `BkDialogService` subscribes via `.then()` to emit `afterOpened` on the
|
|
4574
|
+
* `BkDialogRef`.
|
|
4575
4575
|
*/
|
|
4576
4576
|
_resolveOpened;
|
|
4577
4577
|
opened = new Promise(resolve => {
|
|
@@ -4629,7 +4629,7 @@ class DialogContainerComponent extends CdkDialogContainer {
|
|
|
4629
4629
|
}
|
|
4630
4630
|
/**
|
|
4631
4631
|
* Play the leave animation. Returns a Promise that resolves when done.
|
|
4632
|
-
* Called by `
|
|
4632
|
+
* Called by `BkDialogRef._runCloseSequence()` before CDK tears down the
|
|
4633
4633
|
* overlay.
|
|
4634
4634
|
*/
|
|
4635
4635
|
playLeaveAnimation() {
|
|
@@ -4681,10 +4681,10 @@ class DialogContainerComponent extends CdkDialogContainer {
|
|
|
4681
4681
|
const pane = this._elementRef.nativeElement.closest('.cdk-overlay-pane');
|
|
4682
4682
|
return pane?.parentElement?.querySelector('.cdk-overlay-backdrop') ?? null;
|
|
4683
4683
|
}
|
|
4684
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
4685
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type:
|
|
4684
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BkDialogContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4685
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: BkDialogContainerComponent, isStandalone: true, selector: "bk-dialog-container", host: { classAttribute: "bk-dialog-container" }, usesInheritance: true, ngImport: i0, template: "<!--\r\n Dialog Container Template (CDK-based)\r\n\r\n Architecture:\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n CDK Overlay manages the full overlay stack:\r\n\r\n \u250C\u2500 .cdk-overlay-container (fixed, z-index managed by CDK) \u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n \u2502 \u250C\u2500 .cdk-global-overlay-wrapper (flex-center) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\r\n \u2502 \u2502 .cdk-overlay-backdrop (click \u2192 close, CDK transition) \u2502 \u2502\r\n \u2502 \u2502 \u250C\u2500 .cdk-overlay-pane (width/height from config) \u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502 \u2502\r\n \u2502 \u2502 \u2502 <bk-dialog-container> \u2190 this component (panel) \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2502 <ng-template cdkPortalOutlet /> \u2190 user component \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2502 <UserDialogComponent> \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2502 <h2 bk-dialog-title>Title</h2> \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2502 <div bk-dialog-content>Scrollable body</div> \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2502 <div bk-dialog-actions>Pinned buttons</div> \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2502 </UserDialogComponent> \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2502 </bk-dialog-container> \u2502 \u2502 \u2502\r\n \u2502 \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502 \u2502\r\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\r\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\n The host element IS the visible panel (background, radius, shadow).\r\n CDK Portal projects the caller's component as a direct child.\r\n\r\n Directives (BkDialogTitle, BkDialogContent, BkDialogActions, BkDialogClose)\r\n apply the corresponding CSS classes and add accessibility features.\r\n-->\r\n\r\n<ng-template cdkPortalOutlet />\r\n", styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0;max-height:inherit;background:var(--bk-dialog-panel-bg, #ffffff);border-radius:var(--bk-dialog-panel-radius, 8px);box-shadow:var( --bk-dialog-panel-shadow, 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12) );outline:0;box-sizing:border-box;overflow:hidden;will-change:transform,opacity}:host ::ng-deep>:first-child{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}:host ::ng-deep .bk-dialog-content{flex:1 1 auto;overflow:auto;min-height:0;display:block;-webkit-overflow-scrolling:touch}:host ::ng-deep .bk-dialog-actions{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;min-height:52px}:host ::ng-deep .bk-dialog-title{flex:0 0 auto;margin:0}:host ::ng-deep .bk-dialog-actions-align-start{justify-content:flex-start}:host ::ng-deep .bk-dialog-actions-align-center{justify-content:center}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
|
|
4686
4686
|
}
|
|
4687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
4687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BkDialogContainerComponent, decorators: [{
|
|
4688
4688
|
type: Component,
|
|
4689
4689
|
args: [{ selector: 'bk-dialog-container', standalone: true, imports: [CdkPortalOutlet], host: {
|
|
4690
4690
|
'class': 'bk-dialog-container',
|
|
@@ -4692,7 +4692,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4692
4692
|
}] });
|
|
4693
4693
|
|
|
4694
4694
|
/**
|
|
4695
|
-
*
|
|
4695
|
+
* BkDialogRef — Handle returned to callers by `BkDialogService.open()`.
|
|
4696
4696
|
*
|
|
4697
4697
|
* Architecture Decision:
|
|
4698
4698
|
* ─────────────────────
|
|
@@ -4707,13 +4707,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4707
4707
|
* Ours keeps `<T, R>` (Component first, Result second) to match the
|
|
4708
4708
|
* convention consumers already use.
|
|
4709
4709
|
*/
|
|
4710
|
-
class
|
|
4710
|
+
class BkDialogRef {
|
|
4711
4711
|
_cdkRef;
|
|
4712
4712
|
/** Unique dialog identifier (managed by CDK). */
|
|
4713
4713
|
id;
|
|
4714
4714
|
/** Instance of the component rendered inside the dialog. */
|
|
4715
4715
|
componentInstance;
|
|
4716
|
-
// ──── Internal wiring (set by
|
|
4716
|
+
// ──── Internal wiring (set by BkDialogService) ──────────────────────────
|
|
4717
4717
|
/** @internal Container reference for leave animation. */
|
|
4718
4718
|
_containerInstance;
|
|
4719
4719
|
/** @internal Prevent double-close. */
|
|
@@ -4791,14 +4791,14 @@ class DialogRef {
|
|
|
4791
4791
|
*
|
|
4792
4792
|
* Architecture Decision:
|
|
4793
4793
|
* ─────────────────────
|
|
4794
|
-
* Our `
|
|
4794
|
+
* Our `BkDialogConfig` mirrors the fields from CDK's `DialogConfig` that we
|
|
4795
4795
|
* expose, plus adds custom animation properties powered by WAAPI.
|
|
4796
4796
|
*
|
|
4797
|
-
* When `
|
|
4797
|
+
* When `BkDialogService.open()` is called these values are:
|
|
4798
4798
|
* 1. Merged with global defaults and per-call overrides.
|
|
4799
4799
|
* 2. Mapped onto CDK's native `DialogConfig` for overlay, backdrop, scroll,
|
|
4800
4800
|
* position, ARIA, and focus-trap management.
|
|
4801
|
-
* 3. Passed to `
|
|
4801
|
+
* 3. Passed to `BkDialogContainerComponent` via an internal token for
|
|
4802
4802
|
* animation playback and position offsets.
|
|
4803
4803
|
*
|
|
4804
4804
|
* CDK handles: unique IDs, z-index stacking, scroll blocking, focus trap,
|
|
@@ -4806,7 +4806,7 @@ class DialogRef {
|
|
|
4806
4806
|
* We handle: WAAPI animations, panel appearance, convenience config sugar.
|
|
4807
4807
|
*/
|
|
4808
4808
|
// ──── Defaults ───────────────────────────────────────────────────────────
|
|
4809
|
-
const
|
|
4809
|
+
const BK_DEFAULT_DIALOG_CONFIG = {
|
|
4810
4810
|
id: undefined,
|
|
4811
4811
|
width: undefined,
|
|
4812
4812
|
height: undefined,
|
|
@@ -4836,7 +4836,7 @@ const DEFAULT_DIALOG_CONFIG = {
|
|
|
4836
4836
|
};
|
|
4837
4837
|
|
|
4838
4838
|
/**
|
|
4839
|
-
*
|
|
4839
|
+
* BkDialogService — The core engine of the custom dialog system.
|
|
4840
4840
|
*
|
|
4841
4841
|
* Architecture Decision:
|
|
4842
4842
|
* ─────────────────────
|
|
@@ -4847,10 +4847,10 @@ const DEFAULT_DIALOG_CONFIG = {
|
|
|
4847
4847
|
* z-index stacking, and unique ID management — battle-tested infra
|
|
4848
4848
|
* shared with every Angular Material dialog in the ecosystem.
|
|
4849
4849
|
*
|
|
4850
|
-
* 2. We provide our own `
|
|
4850
|
+
* 2. We provide our own `BkDialogContainerComponent` (extending
|
|
4851
4851
|
* `CdkDialogContainer`) for WAAPI animations and panel styling.
|
|
4852
4852
|
*
|
|
4853
|
-
* 3. We wrap CDK's `DialogRef` in our own `
|
|
4853
|
+
* 3. We wrap CDK's `DialogRef` in our own `BkDialogRef` to add the
|
|
4854
4854
|
* leave-animation step before CDK tears down the overlay, and to
|
|
4855
4855
|
* expose the same familiar API shape (`afterClosed()`, etc.).
|
|
4856
4856
|
*
|
|
@@ -4873,13 +4873,13 @@ const DEFAULT_DIALOG_CONFIG = {
|
|
|
4873
4873
|
* ─────────────
|
|
4874
4874
|
* CDK manages the full lifecycle: on close it detaches the overlay,
|
|
4875
4875
|
* destroys the container, and disposes the overlay ref.
|
|
4876
|
-
* Our
|
|
4876
|
+
* Our BkDialogRef subjects complete via CDK's `closed` observable,
|
|
4877
4877
|
* preventing lingering subscriptions.
|
|
4878
4878
|
*/
|
|
4879
|
-
class
|
|
4879
|
+
class BkDialogService {
|
|
4880
4880
|
_cdkDialog = inject(Dialog);
|
|
4881
4881
|
_overlay = inject(Overlay);
|
|
4882
|
-
_globalConfig = inject(
|
|
4882
|
+
_globalConfig = inject(BK_DIALOG_GLOBAL_CONFIG, { optional: true });
|
|
4883
4883
|
/** Stack of currently open dialog refs (most recent = last). */
|
|
4884
4884
|
_openDialogRefs = [];
|
|
4885
4885
|
// ════════════════════════════════════════════════════════════════════
|
|
@@ -4891,7 +4891,7 @@ class DialogService {
|
|
|
4891
4891
|
* @param component The component class to render inside the dialog.
|
|
4892
4892
|
* @param config Optional per-dialog configuration (merged on top
|
|
4893
4893
|
* of global and default settings).
|
|
4894
|
-
* @returns A strongly-typed `
|
|
4894
|
+
* @returns A strongly-typed `BkDialogRef` to interact with.
|
|
4895
4895
|
*
|
|
4896
4896
|
* @example
|
|
4897
4897
|
* ```ts
|
|
@@ -4905,7 +4905,7 @@ class DialogService {
|
|
|
4905
4905
|
open(component, config) {
|
|
4906
4906
|
// ── 1. Merge configs: DEFAULT ← GLOBAL ← per-call ──────────────
|
|
4907
4907
|
const mergedConfig = {
|
|
4908
|
-
...
|
|
4908
|
+
...BK_DEFAULT_DIALOG_CONFIG,
|
|
4909
4909
|
...(this._globalConfig ?? {}),
|
|
4910
4910
|
...(config ?? {}),
|
|
4911
4911
|
};
|
|
@@ -4947,23 +4947,23 @@ class DialogService {
|
|
|
4947
4947
|
positionStrategy: this._buildPositionStrategy(mergedConfig),
|
|
4948
4948
|
// ── Custom container ──────────────────────────────────────────
|
|
4949
4949
|
container: {
|
|
4950
|
-
type:
|
|
4950
|
+
type: BkDialogContainerComponent,
|
|
4951
4951
|
providers: () => [
|
|
4952
|
-
{ provide:
|
|
4952
|
+
{ provide: BK_INTERNAL_DIALOG_CONFIG, useValue: mergedConfig },
|
|
4953
4953
|
],
|
|
4954
4954
|
},
|
|
4955
4955
|
// ── Provider callback ─────────────────────────────────────────
|
|
4956
4956
|
// Runs after the container is created but before the user
|
|
4957
|
-
// component. We create our `
|
|
4957
|
+
// component. We create our `BkDialogRef` wrapper here and make
|
|
4958
4958
|
// it available for injection in the user component.
|
|
4959
4959
|
providers: (cdkRef, _cdkConfig, containerInstance) => {
|
|
4960
|
-
ourRef = new
|
|
4960
|
+
ourRef = new BkDialogRef(cdkRef);
|
|
4961
4961
|
ourRef._containerInstance = containerInstance;
|
|
4962
4962
|
// Wire up afterOpened emission.
|
|
4963
4963
|
containerInstance.opened
|
|
4964
4964
|
.then(() => ourRef._emitOpened());
|
|
4965
4965
|
return [
|
|
4966
|
-
{ provide:
|
|
4966
|
+
{ provide: BkDialogRef, useValue: ourRef },
|
|
4967
4967
|
];
|
|
4968
4968
|
},
|
|
4969
4969
|
};
|
|
@@ -4992,7 +4992,7 @@ class DialogService {
|
|
|
4992
4992
|
}
|
|
4993
4993
|
}
|
|
4994
4994
|
/**
|
|
4995
|
-
* Returns the `
|
|
4995
|
+
* Returns the `BkDialogRef` of the most recently opened dialog,
|
|
4996
4996
|
* or `undefined` if none are open.
|
|
4997
4997
|
*/
|
|
4998
4998
|
getTopDialog() {
|
|
@@ -5013,7 +5013,7 @@ class DialogService {
|
|
|
5013
5013
|
/**
|
|
5014
5014
|
* Read-only snapshot of currently open dialog refs.
|
|
5015
5015
|
* Used internally by content directives (`BkDialogTitle`, `BkDialogActions`,
|
|
5016
|
-
* `BkDialogClose`) for the DOM-walk fallback when `
|
|
5016
|
+
* `BkDialogClose`) for the DOM-walk fallback when `BkDialogRef` is not
|
|
5017
5017
|
* available via injection (e.g. inside `<ng-template>`).
|
|
5018
5018
|
*/
|
|
5019
5019
|
get openDialogsRef() {
|
|
@@ -5135,10 +5135,10 @@ class DialogService {
|
|
|
5135
5135
|
}
|
|
5136
5136
|
return strategy;
|
|
5137
5137
|
}
|
|
5138
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5139
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BkDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5139
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BkDialogService, providedIn: 'root' });
|
|
5140
5140
|
}
|
|
5141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BkDialogService, decorators: [{
|
|
5142
5142
|
type: Injectable,
|
|
5143
5143
|
args: [{ providedIn: 'root' }]
|
|
5144
5144
|
}] });
|
|
@@ -5172,7 +5172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5172
5172
|
let nextTitleId = 0;
|
|
5173
5173
|
// ──── Helper ─────────────────────────────────────────────────────────────
|
|
5174
5174
|
/**
|
|
5175
|
-
* Finds the closest `
|
|
5175
|
+
* Finds the closest `BkDialogRef` by walking up the DOM from the given
|
|
5176
5176
|
* element to the nearest `bk-dialog-container` host, then matching its
|
|
5177
5177
|
* `id` attribute against the currently open dialogs.
|
|
5178
5178
|
*
|
|
@@ -5193,15 +5193,15 @@ function getClosestDialog(element, openDialogs) {
|
|
|
5193
5193
|
}
|
|
5194
5194
|
// ──── Base for Title / Actions ───────────────────────────────────────────
|
|
5195
5195
|
/**
|
|
5196
|
-
* Shared abstract base that resolves the owning `
|
|
5196
|
+
* Shared abstract base that resolves the owning `BkDialogRef` (via DI or
|
|
5197
5197
|
* DOM walk) and invokes `_onAdd()` / `_onRemove()` lifecycle hooks.
|
|
5198
5198
|
*
|
|
5199
5199
|
* Same pattern as Material's internal `MatDialogLayoutSection`.
|
|
5200
5200
|
*/
|
|
5201
5201
|
class BkDialogLayoutSection {
|
|
5202
|
-
_dialogRef = inject(
|
|
5202
|
+
_dialogRef = inject(BkDialogRef, { optional: true });
|
|
5203
5203
|
_elementRef = inject((ElementRef));
|
|
5204
|
-
_dialogService = inject(
|
|
5204
|
+
_dialogService = inject(BkDialogService);
|
|
5205
5205
|
ngOnInit() {
|
|
5206
5206
|
if (!this._dialogRef) {
|
|
5207
5207
|
this._dialogRef = getClosestDialog(this._elementRef, this._dialogService.openDialogsRef);
|
|
@@ -5375,9 +5375,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5375
5375
|
* ```
|
|
5376
5376
|
*/
|
|
5377
5377
|
class BkDialogClose {
|
|
5378
|
-
_dialogRef = inject(
|
|
5378
|
+
_dialogRef = inject(BkDialogRef, { optional: true });
|
|
5379
5379
|
_elementRef = inject((ElementRef));
|
|
5380
|
-
_dialogService = inject(
|
|
5380
|
+
_dialogService = inject(BkDialogService);
|
|
5381
5381
|
/** Screen-reader label for the button. */
|
|
5382
5382
|
ariaLabel;
|
|
5383
5383
|
/** Prevents accidental form submits. Default: `'button'`. */
|
|
@@ -5440,7 +5440,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5440
5440
|
*
|
|
5441
5441
|
* • All components/directives are **standalone**.
|
|
5442
5442
|
* • This module simply imports + re-exports them for convenience.
|
|
5443
|
-
* • `
|
|
5443
|
+
* • `BkDialogService` is `providedIn: 'root'`, so it does NOT need to
|
|
5444
5444
|
* be listed in `providers` here — it is tree-shakeable and available
|
|
5445
5445
|
* app-wide automatically.
|
|
5446
5446
|
*
|
|
@@ -5473,7 +5473,7 @@ class BkDialogModule {
|
|
|
5473
5473
|
OverlayModule,
|
|
5474
5474
|
PortalModule,
|
|
5475
5475
|
// ── Our standalone pieces ───────────────────────────────────────
|
|
5476
|
-
|
|
5476
|
+
BkDialogContainerComponent,
|
|
5477
5477
|
BkDialogTitle,
|
|
5478
5478
|
BkDialogContent,
|
|
5479
5479
|
BkDialogActions,
|
|
@@ -5500,7 +5500,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5500
5500
|
OverlayModule,
|
|
5501
5501
|
PortalModule,
|
|
5502
5502
|
// ── Our standalone pieces ───────────────────────────────────────
|
|
5503
|
-
|
|
5503
|
+
BkDialogContainerComponent,
|
|
5504
5504
|
BkDialogTitle,
|
|
5505
5505
|
BkDialogContent,
|
|
5506
5506
|
BkDialogActions,
|
|
@@ -5777,5 +5777,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5777
5777
|
* Generated bundle index. Do not edit.
|
|
5778
5778
|
*/
|
|
5779
5779
|
|
|
5780
|
-
export { AvatarProfile, BKTooltipDirective, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogTitle, BkGrid, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule,
|
|
5780
|
+
export { AvatarProfile, BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkGrid, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, getDialogBackdropAnimation, getDialogPanelAnimation };
|
|
5781
5781
|
//# sourceMappingURL=brickclay-org-ui.mjs.map
|