ng-primitives 0.7.0 → 0.7.2

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.
Files changed (39) hide show
  1. package/dialog/config/dialog.config.d.ts +43 -0
  2. package/dialog/dialog/dialog-ref.d.ts +40 -0
  3. package/dialog/dialog/dialog.directive.d.ts +29 -21
  4. package/dialog/dialog/dialog.service.d.ts +66 -0
  5. package/dialog/dialog-description/dialog-description.directive.d.ts +19 -0
  6. package/dialog/dialog-description/dialog-description.token.d.ts +14 -0
  7. package/dialog/dialog-overlay/dialog-overlay.directive.d.ts +8 -0
  8. package/dialog/{dialog-panel/dialog-panel.token.d.ts → dialog-overlay/dialog-overlay.token.d.ts} +4 -4
  9. package/dialog/dialog-title/dialog-title.directive.d.ts +14 -4
  10. package/dialog/dialog-trigger/dialog-trigger.directive.d.ts +24 -0
  11. package/dialog/dialog-trigger/dialog-trigger.token.d.ts +14 -0
  12. package/dialog/index.d.ts +8 -3
  13. package/esm2022/date-picker/date-picker-row-render/date-picker-row-render.directive.mjs +1 -2
  14. package/esm2022/dialog/config/dialog.config.mjs +28 -0
  15. package/esm2022/dialog/dialog/dialog-ref.mjs +44 -0
  16. package/esm2022/dialog/dialog/dialog.directive.mjs +59 -27
  17. package/esm2022/dialog/dialog/dialog.service.mjs +202 -0
  18. package/esm2022/dialog/dialog-description/dialog-description.directive.mjs +46 -0
  19. package/esm2022/dialog/dialog-description/dialog-description.token.mjs +16 -0
  20. package/esm2022/dialog/dialog-overlay/dialog-overlay.directive.mjs +35 -0
  21. package/esm2022/dialog/dialog-overlay/dialog-overlay.token.mjs +16 -0
  22. package/esm2022/dialog/dialog-title/dialog-title.directive.mjs +22 -7
  23. package/esm2022/dialog/dialog-trigger/dialog-trigger.directive.mjs +61 -0
  24. package/esm2022/dialog/dialog-trigger/dialog-trigger.token.mjs +16 -0
  25. package/esm2022/dialog/index.mjs +8 -3
  26. package/esm2022/internal/disabled/disabled.mjs +2 -2
  27. package/esm2022/utils/signals/async.mjs +3 -1
  28. package/fesm2022/ng-primitives-date-picker.mjs +0 -1
  29. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  30. package/fesm2022/ng-primitives-dialog.mjs +495 -46
  31. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  32. package/fesm2022/ng-primitives-internal.mjs +1 -1
  33. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  34. package/fesm2022/ng-primitives-utils.mjs +2 -0
  35. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  36. package/package.json +7 -7
  37. package/dialog/dialog-panel/dialog-panel.directive.d.ts +0 -5
  38. package/esm2022/dialog/dialog-panel/dialog-panel.directive.mjs +0 -24
  39. package/esm2022/dialog/dialog-panel/dialog-panel.token.mjs +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-dialog.mjs","sources":["../../../../packages/ng-primitives/dialog/src/dialog-panel/dialog-panel.token.ts","../../../../packages/ng-primitives/dialog/src/dialog-panel/dialog-panel.directive.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title.token.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title.directive.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.token.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.directive.ts","../../../../packages/ng-primitives/dialog/src/index.ts","../../../../packages/ng-primitives/dialog/src/ng-primitives-dialog.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialogPanel } from './dialog-panel.directive';\n\nexport const NgpDialogPanelToken = new InjectionToken<NgpDialogPanel>('NgpDialogPanelToken');\n\n/**\n * Inject the DialogPanel directive instance\n */\nexport function injectDialogPanel(): NgpDialogPanel {\n return inject(NgpDialogPanelToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive } from '@angular/core';\nimport { NgpDialogPanelToken } from './dialog-panel.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialogPanel]',\n exportAs: 'ngpDialogPanel',\n providers: [{ provide: NgpDialogPanelToken, useExisting: NgpDialogPanel }],\n})\nexport class NgpDialogPanel {}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialogTitle } from './dialog-title.directive';\n\nexport const NgpDialogTitleToken = new InjectionToken<NgpDialogTitle>('NgpDialogTitleToken');\n\n/**\n * Inject the DialogTitle directive instance\n */\nexport function injectDialogTitle(): NgpDialogTitle {\n return inject(NgpDialogTitleToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpDialogTitleToken } from './dialog-title.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialogTitle]',\n exportAs: 'ngpDialogTitle',\n providers: [{ provide: NgpDialogTitleToken, useExisting: NgpDialogTitle }],\n})\nexport class NgpDialogTitle {\n /**\n * The id of the dialog title.\n */\n readonly id = input(uniqueId('ngp-dialog-title'));\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialog } from './dialog.directive';\n\nexport const NgpDialogToken = new InjectionToken<NgpDialog>('NgpDialogToken');\n\n/**\n * Inject the Dialog directive instance\n */\nexport function injectDialog(): NgpDialog {\n return inject(NgpDialogToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, contentChild, Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpDialogTitleToken } from '../dialog-title/dialog-title.token';\nimport { NgpDialogToken } from './dialog.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialog]',\n exportAs: 'ngpDialog',\n providers: [{ provide: NgpDialogToken, useExisting: NgpDialog }],\n host: {\n role: 'dialog',\n '[id]': 'id()',\n '[attr.tabindex]': '-1',\n '[attr.data-open]': 'open()',\n '[attr.aria-labelledby]': 'title() ?? null',\n },\n})\nexport class NgpDialog {\n /**\n * Define the id of the dialog.\n */\n readonly id = input(uniqueId('ngp-dialog'));\n\n /**\n * The open state of the dialog.\n */\n readonly open = input<boolean, BooleanInput>(false, {\n alias: 'ngpDialogOpen',\n transform: booleanAttribute,\n });\n\n /**\n * The type of the dialog.\n */\n readonly type = input<NgpDialogRole>('dialog', {\n alias: 'ngpDialogRole',\n });\n\n /**\n * Access the title of the dialog.\n */\n protected readonly title = contentChild(NgpDialogTitleToken, { descendants: true });\n}\n\n/**\n * The type of the dialog.\n */\nexport type NgpDialogRole = 'dialog' | 'alertdialog';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpDialogPanel } from './dialog-panel/dialog-panel.directive';\nexport { NgpDialogPanelToken } from './dialog-panel/dialog-panel.token';\nexport { NgpDialogTitle } from './dialog-title/dialog-title.directive';\nexport { NgpDialogTitleToken } from './dialog-title/dialog-title.token';\nexport { NgpDialog, NgpDialogRole } from './dialog/dialog.directive';\nexport { NgpDialogToken } from './dialog/dialog.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;AAMG;MAIU,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,EAAE;AAE7F;;AAEG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACrC;;ACjBA;;;;;;AAMG;MAUU,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,SAAA,EAFd,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAE/D,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAgB,cAAA,EAAE,CAAC;AAC3E,iBAAA,CAAA;;;ACfD;;;;;;AAMG;MAIU,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,EAAE;AAE7F;;AAEG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACrC;;ACjBA;;;;;;AAMG;MAWU,cAAc,CAAA;AAN3B,IAAA,WAAA,GAAA;AAOE;;AAEG;QACM,IAAE,CAAA,EAAA,GAAG,KAAK,CAA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AA,EAAA,gBAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,6DAiCxB,mBAAmB,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAxBhD,SAAS,EAAA,UAAA,EAAA,CAAA;kBAbrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;oBACrB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAW,SAAA,EAAE,CAAC;AAChE,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,iBAAiB,EAAE,IAAI;AACvB,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,wBAAwB,EAAE,iBAAiB;AAC5C,qBAAA;AACF,iBAAA,CAAA;;;ACzBD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-dialog.mjs","sources":["../../../../packages/ng-primitives/dialog/src/config/dialog.config.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.token.ts","../../../../packages/ng-primitives/dialog/src/dialog-description/dialog-description.token.ts","../../../../packages/ng-primitives/dialog/src/dialog-description/dialog-description.directive.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog-ref.ts","../../../../packages/ng-primitives/dialog/src/dialog-overlay/dialog-overlay.token.ts","../../../../packages/ng-primitives/dialog/src/dialog-overlay/dialog-overlay.directive.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title.token.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title.directive.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.service.ts","../../../../packages/ng-primitives/dialog/src/dialog-trigger/dialog-trigger.token.ts","../../../../packages/ng-primitives/dialog/src/dialog-trigger/dialog-trigger.directive.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.directive.ts","../../../../packages/ng-primitives/dialog/src/index.ts","../../../../packages/ng-primitives/dialog/src/ng-primitives-dialog.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { ScrollStrategy } from '@angular/cdk/overlay';\nimport { InjectionToken, Injector, Provider, ViewContainerRef, inject } from '@angular/core';\n\n/** Valid ARIA roles for a dialog. */\nexport type NgpDialogRole = 'dialog' | 'alertdialog';\n\nexport interface NgpDialogConfig {\n /** The view container to attach the dialog to. */\n viewContainerRef?: ViewContainerRef;\n\n /** The injector to use for the dialog. Defaults to the view container's injector.*/\n injector?: Injector;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The role of the dialog. */\n role?: NgpDialogRole;\n\n /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n modal?: boolean;\n\n /** Scroll strategy to be used for the dialog. This determines how the dialog responds to scrolling underneath the panel element. */\n scrollStrategy?: ScrollStrategy;\n\n /**\n * Whether the dialog should close when the user navigates backwards or forwards through browser\n * history.\n */\n closeOnNavigation?: boolean;\n}\n\nexport const defaultDialogConfig: NgpDialogConfig = {\n role: 'dialog',\n modal: true,\n closeOnNavigation: true,\n};\n\nexport const NgpDialogConfigToken = new InjectionToken<NgpDialogConfig>('NgpDialogConfigToken');\n\n/**\n * Provide the default Dialog configuration\n * @param config The Dialog configuration\n * @returns The provider\n */\nexport function provideDialogConfig(config: Partial<NgpDialogConfig>): Provider[] {\n return [\n {\n provide: NgpDialogConfigToken,\n useValue: { ...defaultDialogConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Dialog configuration\n * @returns The global Dialog configuration\n */\nexport function injectDialogConfig(): NgpDialogConfig {\n return inject(NgpDialogConfigToken, { optional: true }) ?? defaultDialogConfig;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialog } from './dialog.directive';\n\nexport const NgpDialogToken = new InjectionToken<NgpDialog>('NgpDialogToken');\n\n/**\n * Inject the Dialog directive instance\n */\nexport function injectDialog(): NgpDialog {\n return inject(NgpDialogToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialogDescription } from './dialog-description.directive';\n\nexport const NgpDialogDescriptionToken = new InjectionToken<NgpDialogDescription>(\n 'NgpDialogDescriptionToken',\n);\n\n/**\n * Inject the DialogDescription directive instance\n */\nexport function injectDialogDescription(): NgpDialogDescription {\n return inject(NgpDialogDescriptionToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, input, OnDestroy } from '@angular/core';\nimport { onChange, uniqueId } from 'ng-primitives/utils';\nimport { injectDialog } from '../dialog/dialog.token';\nimport { NgpDialogDescriptionToken } from './dialog-description.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialogDescription]',\n exportAs: 'ngpDialogDescription',\n providers: [{ provide: NgpDialogDescriptionToken, useExisting: NgpDialogDescription }],\n host: {\n '[id]': 'id()',\n },\n})\nexport class NgpDialogDescription implements OnDestroy {\n /** Access the dialog */\n private readonly dialog = injectDialog();\n\n /** The id of the descriptions. */\n readonly id = input<string>(uniqueId('ngp-dialog-description'));\n\n constructor() {\n onChange(this.id, (id, prevId) => {\n if (prevId) {\n this.dialog.removeDescribedBy(prevId);\n }\n\n if (id) {\n this.dialog.setDescribedBy(id);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dialog.removeDescribedBy(this.id());\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { hasModifierKey } from '@angular/cdk/keycodes';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { inject } from '@angular/core';\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { NgpDialogConfig } from '../config/dialog.config';\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nexport class NgpDialogRef {\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined;\n\n /** Emits when the dialog has been closed. */\n readonly closed = new Subject<FocusOrigin | null>();\n\n /** Emits when on keyboard events within the dialog. */\n readonly keydownEvents: Observable<KeyboardEvent>;\n\n /** Emits on pointer events that happen outside of the dialog. */\n readonly outsidePointerEvents: Observable<MouseEvent>;\n\n /** Unique ID for the dialog. */\n readonly id: string;\n\n /** Subscription to external detachments of the dialog. */\n private detachSubscription: Subscription;\n\n constructor(\n readonly overlayRef: OverlayRef,\n readonly config: NgpDialogConfig,\n ) {\n this.keydownEvents = overlayRef.keydownEvents();\n this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n this.id = config.id!; // By the time the dialog is created we are guaranteed to have an ID.\n\n this.keydownEvents.subscribe(event => {\n if (event.key === 'Escape' && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this.close('keyboard');\n }\n });\n\n this.detachSubscription = overlayRef.detachments().subscribe(() => this.close());\n }\n\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param options Additional options to customize the closing behavior.\n */\n close(focusOrigin?: FocusOrigin): void {\n this.overlayRef.dispose();\n this.detachSubscription.unsubscribe();\n this.closed.next(focusOrigin ?? null);\n this.closed.complete();\n }\n\n /** Updates the position of the dialog based on the current position strategy. */\n updatePosition(): this {\n this.overlayRef.updatePosition();\n return this;\n }\n}\n\nexport function injectDialogRef(): NgpDialogRef {\n return inject(NgpDialogRef);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialogOverlay } from './dialog-overlay.directive';\n\nexport const NgpDialogOverlayToken = new InjectionToken<NgpDialogOverlay>('NgpDialogOverlayToken');\n\n/**\n * Inject the DialogOverlay directive instance\n */\nexport function injectDialogOverlay(): NgpDialogOverlay {\n return inject(NgpDialogOverlayToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, HostListener } from '@angular/core';\nimport { injectDialogRef } from '../dialog/dialog-ref';\nimport { NgpDialogOverlayToken } from './dialog-overlay.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialogOverlay]',\n exportAs: 'ngpDialogOverlay',\n providers: [{ provide: NgpDialogOverlayToken, useExisting: NgpDialogOverlay }],\n})\nexport class NgpDialogOverlay {\n /** Access the dialog ref. */\n private readonly dialogRef = injectDialogRef();\n\n @HostListener('click')\n protected close(): void {\n this.dialogRef.close();\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialogTitle } from './dialog-title.directive';\n\nexport const NgpDialogTitleToken = new InjectionToken<NgpDialogTitle>('NgpDialogTitleToken');\n\n/**\n * Inject the DialogTitle directive instance\n */\nexport function injectDialogTitle(): NgpDialogTitle {\n return inject(NgpDialogTitleToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, input, OnDestroy } from '@angular/core';\nimport { onChange, uniqueId } from 'ng-primitives/utils';\nimport { injectDialog } from '../dialog/dialog.token';\nimport { NgpDialogTitleToken } from './dialog-title.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialogTitle]',\n exportAs: 'ngpDialogTitle',\n providers: [{ provide: NgpDialogTitleToken, useExisting: NgpDialogTitle }],\n host: {\n '[id]': 'id()',\n },\n})\nexport class NgpDialogTitle implements OnDestroy {\n /** Access the dialog. */\n private readonly dialog = injectDialog();\n\n /** The id of the title. */\n readonly id = input<string>(uniqueId('ngp-dialog-title'));\n\n constructor() {\n onChange(this.id, (id, prevId) => {\n if (prevId) {\n this.dialog.removeLabelledBy(prevId);\n }\n\n if (id) {\n this.dialog.setLabelledBy(id);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dialog.removeLabelledBy(this.id());\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Overlay, OverlayConfig, OverlayContainer, ScrollStrategy } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n Injectable,\n Injector,\n OnDestroy,\n StaticProvider,\n TemplateRef,\n inject,\n isDevMode,\n} from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable, Subject, defer } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { NgpDialogConfig, injectDialogConfig } from '../config/dialog.config';\nimport { NgpDialogRef } from './dialog-ref';\n\n/**\n * This is based on the Angular CDK Dialog service.\n * https://github.com/angular/components/blob/main/src/cdk/dialog/dialog.ts\n */\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgpDialogManager implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly defaultOptions = injectDialogConfig();\n private readonly parentDialogManager = inject(NgpDialogManager, {\n optional: true,\n skipSelf: true,\n });\n private readonly overlayContainer = inject(OverlayContainer);\n private readonly scrollStrategy: ScrollStrategy =\n this.defaultOptions.scrollStrategy ?? this.overlay.scrollStrategies.block();\n\n private openDialogsAtThisLevel: NgpDialogRef[] = [];\n private readonly afterAllClosedAtThisLevel = new Subject<void>();\n private readonly afterOpenedAtThisLevel = new Subject<NgpDialogRef>();\n private ariaHiddenElements = new Map<Element, string | null>();\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): readonly NgpDialogRef[] {\n return this.parentDialogManager\n ? this.parentDialogManager.openDialogs\n : this.openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<NgpDialogRef> {\n return this.parentDialogManager\n ? this.parentDialogManager.afterOpened\n : this.afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs.length\n ? this.getAfterAllClosed()\n : this.getAfterAllClosed().pipe(startWith(undefined)),\n );\n\n /**\n * Opens a modal dialog containing the given template.\n */\n open(templateRef: TemplateRef<NgpDialogContext>, config?: NgpDialogConfig): NgpDialogRef {\n const defaults = this.defaultOptions;\n config = { ...defaults, ...config };\n config.id = config.id ?? uniqueId('ngp-dialog');\n\n if (config.id && this.getDialogById(config.id) && isDevMode()) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const overlayConfig = this.getOverlayConfig(config);\n const overlayRef = this.overlay.create(overlayConfig);\n const dialogRef = new NgpDialogRef(overlayRef, config);\n const injector = this.createInjector(config, dialogRef, undefined);\n const context: NgpDialogContext = {\n $implicit: dialogRef,\n close: dialogRef.close.bind(dialogRef),\n };\n\n overlayRef.attach(new TemplatePortal(templateRef, config.viewContainerRef!, context, injector));\n\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n this.hideNonDialogContentFromAssistiveTechnology();\n }\n\n (this.openDialogs as NgpDialogRef[]).push(dialogRef);\n dialogRef.closed.subscribe(() => this.removeOpenDialog(dialogRef, true));\n this.afterOpened.next(dialogRef);\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): NgpDialogRef | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n ngOnDestroy(): void {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this.openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n this.removeOpenDialog(dialog, false);\n });\n\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this.openDialogsAtThisLevel, dialog => dialog.close());\n\n this.afterAllClosedAtThisLevel.complete();\n this.afterOpenedAtThisLevel.complete();\n this.openDialogsAtThisLevel = [];\n }\n\n /**\n * Creates an overlay config from a dialog config.\n */\n private getOverlayConfig(config: NgpDialogConfig): OverlayConfig {\n const state = new OverlayConfig({\n positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),\n scrollStrategy: config.scrollStrategy || this.scrollStrategy,\n hasBackdrop: false,\n disposeOnNavigation: config.closeOnNavigation,\n });\n\n return state;\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n */\n private createInjector(\n config: NgpDialogConfig,\n dialogRef: NgpDialogRef,\n fallbackInjector: Injector | undefined,\n ): Injector {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [{ provide: NgpDialogRef, useValue: dialogRef }];\n\n return Injector.create({ parent: userInjector || fallbackInjector, providers });\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n */\n private removeOpenDialog(dialogRef: NgpDialogRef, emitEvent: boolean) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n (this.openDialogs as NgpDialogRef[]).splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this.ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this.ariaHiddenElements.clear();\n\n if (emitEvent) {\n this.getAfterAllClosed().next();\n }\n }\n }\n }\n\n /** Hides all of the content that isn't an overlay from assistive technology. */\n private hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this.overlayContainer.getContainerElement();\n\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n\n if (\n sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')\n ) {\n this.ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n private getAfterAllClosed(): Subject<void> {\n const parent = this.parentDialogManager;\n return parent ? parent.getAfterAllClosed() : this.afterAllClosedAtThisLevel;\n }\n}\n\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach<T>(items: T[] | readonly T[], callback: (current: T) => void) {\n let i = items.length;\n\n while (i--) {\n callback(items[i]);\n }\n}\n\nexport interface NgpDialogContext {\n $implicit: NgpDialogRef;\n close: () => void;\n}\n\nexport function injectDialogManager(): NgpDialogManager {\n return inject(NgpDialogManager);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpDialogTrigger } from './dialog-trigger.directive';\n\nexport const NgpDialogTriggerToken = new InjectionToken<NgpDialogTrigger>('NgpDialogTriggerToken');\n\n/**\n * Inject the DialogTrigger directive instance\n */\nexport function injectDialogTrigger(): NgpDialogTrigger {\n return inject(NgpDialogTriggerToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgpButton } from 'ng-primitives/button';\nimport { NgpDialogRef } from '../dialog/dialog-ref';\nimport { NgpDialogContext, NgpDialogManager } from '../dialog/dialog.service';\nimport { NgpDialogTriggerToken } from './dialog-trigger.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialogTrigger]',\n exportAs: 'ngpDialogTrigger',\n providers: [{ provide: NgpDialogTriggerToken, useExisting: NgpDialogTrigger }],\n hostDirectives: [NgpButton],\n})\nexport class NgpDialogTrigger {\n /** Access the dialog manager. */\n private readonly dialogManager = inject(NgpDialogManager);\n\n /** Access the view container ref. */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the focus monitor. */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /** Access the element ref. */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The template to launch. */\n readonly template = input.required<TemplateRef<NgpDialogContext>>({\n alias: 'ngpDialogTrigger',\n });\n\n /**\n * Store the dialog ref.\n * @internal\n */\n private dialogRef: NgpDialogRef | null = null;\n\n @HostListener('click')\n protected launch(): void {\n this.dialogRef = this.dialogManager.open(this.template(), {\n viewContainerRef: this.viewContainerRef,\n });\n\n this.dialogRef.closed.subscribe(focusOrigin => {\n this.dialogRef = null;\n // Focus the trigger element after the dialog closes.\n this.focusMonitor.focusVia(this.elementRef.nativeElement, focusOrigin);\n });\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input, OnDestroy, signal } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectDialogConfig } from '../config/dialog.config';\nimport { injectDialogRef } from './dialog-ref';\nimport { NgpDialogToken } from './dialog.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpDialog]',\n exportAs: 'ngpDialog',\n providers: [{ provide: NgpDialogToken, useExisting: NgpDialog }],\n hostDirectives: [NgpFocusTrap],\n host: {\n tabindex: '-1',\n '[id]': 'id()',\n '[attr.role]': 'role()',\n '[attr.aria-modal]': 'modal()',\n '[attr.aria-labelledby]': 'labelledBy().join(\" \")',\n '[attr.aria-describedby]': 'describedBy().join(\" \")',\n },\n})\nexport class NgpDialog implements OnDestroy {\n private readonly config = injectDialogConfig();\n\n /** Access the dialog ref */\n private readonly dialogRef = injectDialogRef();\n\n /** The id of the dialog */\n readonly id = input<string>(uniqueId('ngp-dialog'));\n\n /** The dialog role. */\n readonly role = input(this.config.role, {\n alias: 'ngpDialogRole',\n });\n\n /** Whether the dialog is a modal. */\n readonly modal = input<boolean, BooleanInput>(this.config.modal ?? false, {\n alias: 'ngpDialogModal',\n transform: booleanAttribute,\n });\n\n /** The labelledby ids */\n protected readonly labelledBy = signal<string[]>([]);\n\n /** The describedby ids */\n protected readonly describedBy = signal<string[]>([]);\n\n ngOnDestroy(): void {\n this.close();\n }\n\n /** Close the dialog. */\n close(): void {\n this.dialogRef.close();\n }\n\n /** Stop click events from propagating to the overlay */\n @HostListener('click', ['$event'])\n protected onClick(event: Event): void {\n event.stopPropagation();\n }\n\n /** @internal register a labelledby id */\n setLabelledBy(id: string): void {\n this.labelledBy.update(ids => [...ids, id]);\n }\n\n /** @internal register a describedby id */\n setDescribedBy(id: string): void {\n this.describedBy.update(ids => [...ids, id]);\n }\n\n /** @internal remove a labelledby id */\n removeLabelledBy(id: string): void {\n this.labelledBy.update(ids => ids.filter(i => i !== id));\n }\n\n /** @internal remove a describedby id */\n removeDescribedBy(id: string): void {\n this.describedBy.update(ids => ids.filter(i => i !== id));\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpDialogConfig, provideDialogConfig } from './config/dialog.config';\nexport { NgpDialogDescription } from './dialog-description/dialog-description.directive';\nexport { NgpDialogDescriptionToken } from './dialog-description/dialog-description.token';\nexport { NgpDialogOverlay } from './dialog-overlay/dialog-overlay.directive';\nexport { NgpDialogOverlayToken } from './dialog-overlay/dialog-overlay.token';\nexport { NgpDialogTitle } from './dialog-title/dialog-title.directive';\nexport { NgpDialogTitleToken } from './dialog-title/dialog-title.token';\nexport { NgpDialogTrigger } from './dialog-trigger/dialog-trigger.directive';\nexport { NgpDialogTriggerToken } from './dialog-trigger/dialog-trigger.token';\nexport { NgpDialog } from './dialog/dialog.directive';\nexport { NgpDialogToken } from './dialog/dialog.token';\n","/**\n * Generated bundle index. Do not edit.\n */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WrD,SAAS,EAAA,UAAA,EAAA,CAAA;kBAfrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;oBACrB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAW,SAAA,EAAE,CAAC;oBAChE,cAAc,EAAE,CAAC,YAAY,CAAC;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,wBAAwB,EAAE,wBAAwB;AAClD,wBAAA,yBAAyB,EAAE,yBAAyB;AACrD,qBAAA;AACF,iBAAA,CAAA;8BAsCW,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;;;AClEnC;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -16,7 +16,7 @@ const NgpDisabledToken = new InjectionToken('NgpDisabledToken');
16
16
  * @returns The disabled signal.
17
17
  */
18
18
  function injectDisabled(disabled = signal(false)) {
19
- const provider = inject(NgpDisabledToken, { optional: true });
19
+ const provider = inject(NgpDisabledToken, { optional: true, self: true });
20
20
  return provider ? provider.disabled : disabled;
21
21
  }
22
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-internal.mjs","sources":["../../../../packages/ng-primitives/internal/src/disabled/disabled.ts","../../../../packages/ng-primitives/internal/src/orientation/orientation.ts","../../../../packages/ng-primitives/internal/src/style-injector/style-injector.ts","../../../../packages/ng-primitives/internal/src/index.ts","../../../../packages/ng-primitives/internal/src/ng-primitives-internal.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { inject, InjectionToken, signal, Signal } from '@angular/core';\n\nexport const NgpDisabledToken = new InjectionToken<NgpCanDisable>('NgpDisabledToken');\n\nexport interface NgpCanDisable {\n /**\n * Whether the element is disabled.\n */\n readonly disabled: Signal<boolean>;\n}\n\n/**\n * Determine if we are in a disabled context.\n * @param disabled The disabled signal for the local context.\n * @returns The disabled signal.\n */\nexport function injectDisabled(\n disabled: Signal<boolean> = signal<boolean>(false),\n): Signal<boolean> {\n const provider = inject(NgpDisabledToken, { optional: true });\n\n return provider ? provider.disabled : disabled;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { inject, InjectionToken, signal, Signal } from '@angular/core';\n\nexport const NgpOrientationToken = new InjectionToken<NgpCanOrientate>('NgpOrientationToken');\n\nexport interface NgpCanOrientate {\n /**\n * The desired orientation.\n */\n readonly orientation: Signal<NgpOrientation>;\n}\n\n/**\n * Determine if we are in a orientation context.\n * @param orientation The orientation signal for the local context.\n * @returns The orientation signal.\n */\nexport function injectOrientation(\n orientation: Signal<NgpOrientation> = signal<NgpOrientation>('horizontal'),\n): Signal<NgpOrientation> {\n const provider = inject(NgpOrientationToken, { optional: true });\n\n return provider ? provider.orientation : orientation;\n}\n\nexport type NgpOrientation = 'horizontal' | 'vertical';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, PLATFORM_ID } from '@angular/core';\n\n/**\n * A utility service for injecting styles into the document.\n * Angular doesn't allow directives to specify styles, only components.\n * As we ship directives, occasionally we need to associate styles with them.\n * This service allows us to programmatically inject styles into the document.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class StyleInjector {\n /**\n * Detect the platform.\n */\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Store the map of style elements with their unique identifiers.\n */\n private readonly styleElements = new Map<string, HTMLStyleElement>();\n\n constructor() {\n if (isPlatformBrowser(this.platformId)) {\n this.collectServerStyles();\n }\n }\n\n /**\n * Inject a style into the document.\n * @param id The unique identifier for the style.\n * @param style The style to inject.\n */\n add(id: string, style: string): void {\n if (this.styleElements.has(id)) {\n return;\n }\n\n const styleElement = document.createElement('style');\n styleElement.setAttribute('data-ngp-style', id);\n styleElement.textContent = style;\n\n document.head.appendChild(styleElement);\n this.styleElements.set(id, styleElement);\n }\n\n /**\n * Remove a style from the document.\n * @param id The unique identifier for the style.\n */\n remove(id: string): void {\n const styleElement = this.styleElements.get(id);\n\n if (styleElement) {\n document.head.removeChild(styleElement);\n this.styleElements.delete(id);\n }\n }\n\n /**\n * Collect any styles that were rendered by the server.\n */\n private collectServerStyles(): void {\n const styleElements = document.querySelectorAll<HTMLStyleElement>('style[data-ngp-style]');\n\n styleElements.forEach(styleElement => {\n const id = styleElement.getAttribute('data-ngp-style');\n\n if (id) {\n this.styleElements.set(id, styleElement);\n }\n });\n }\n}\n\nexport function injectStyleInjector(): StyleInjector {\n return inject(StyleInjector);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport * from './disabled/disabled';\nexport * from './orientation/orientation';\nexport * from './style-injector/style-injector';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;AAMG;MAGU,gBAAgB,GAAG,IAAI,cAAc,CAAgB,kBAAkB,EAAE;AAStF;;;;AAIG;SACa,cAAc,CAC5B,WAA4B,MAAM,CAAU,KAAK,CAAC,EAAA;AAElD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,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{"version":3,"file":"ng-primitives-internal.mjs","sources":["../../../../packages/ng-primitives/internal/src/disabled/disabled.ts","../../../../packages/ng-primitives/internal/src/orientation/orientation.ts","../../../../packages/ng-primitives/internal/src/style-injector/style-injector.ts","../../../../packages/ng-primitives/internal/src/index.ts","../../../../packages/ng-primitives/internal/src/ng-primitives-internal.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { inject, InjectionToken, signal, Signal } from '@angular/core';\n\nexport const NgpDisabledToken = new InjectionToken<NgpCanDisable>('NgpDisabledToken');\n\nexport interface NgpCanDisable {\n /**\n * Whether the element is disabled.\n */\n readonly disabled: Signal<boolean>;\n}\n\n/**\n * Determine if we are in a disabled context.\n * @param disabled The disabled signal for the local context.\n * @returns The disabled signal.\n */\nexport function injectDisabled(\n disabled: Signal<boolean> = signal<boolean>(false),\n): Signal<boolean> {\n const provider = inject(NgpDisabledToken, { optional: true, self: true });\n\n return provider ? provider.disabled : disabled;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { inject, InjectionToken, signal, Signal } from '@angular/core';\n\nexport const NgpOrientationToken = new InjectionToken<NgpCanOrientate>('NgpOrientationToken');\n\nexport interface NgpCanOrientate {\n /**\n * The desired orientation.\n */\n readonly orientation: Signal<NgpOrientation>;\n}\n\n/**\n * Determine if we are in a orientation context.\n * @param orientation The orientation signal for the local context.\n * @returns The orientation signal.\n */\nexport function injectOrientation(\n orientation: Signal<NgpOrientation> = signal<NgpOrientation>('horizontal'),\n): Signal<NgpOrientation> {\n const provider = inject(NgpOrientationToken, { optional: true });\n\n return provider ? provider.orientation : orientation;\n}\n\nexport type NgpOrientation = 'horizontal' | 'vertical';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, PLATFORM_ID } from '@angular/core';\n\n/**\n * A utility service for injecting styles into the document.\n * Angular doesn't allow directives to specify styles, only components.\n * As we ship directives, occasionally we need to associate styles with them.\n * This service allows us to programmatically inject styles into the document.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class StyleInjector {\n /**\n * Detect the platform.\n */\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Store the map of style elements with their unique identifiers.\n */\n private readonly styleElements = new Map<string, HTMLStyleElement>();\n\n constructor() {\n if (isPlatformBrowser(this.platformId)) {\n this.collectServerStyles();\n }\n }\n\n /**\n * Inject a style into the document.\n * @param id The unique identifier for the style.\n * @param style The style to inject.\n */\n add(id: string, style: string): void {\n if (this.styleElements.has(id)) {\n return;\n }\n\n const styleElement = document.createElement('style');\n styleElement.setAttribute('data-ngp-style', id);\n styleElement.textContent = style;\n\n document.head.appendChild(styleElement);\n this.styleElements.set(id, styleElement);\n }\n\n /**\n * Remove a style from the document.\n * @param id The unique identifier for the style.\n */\n remove(id: string): void {\n const styleElement = this.styleElements.get(id);\n\n if (styleElement) {\n document.head.removeChild(styleElement);\n this.styleElements.delete(id);\n }\n }\n\n /**\n * Collect any styles that were rendered by the server.\n */\n private collectServerStyles(): void {\n const styleElements = document.querySelectorAll<HTMLStyleElement>('style[data-ngp-style]');\n\n styleElements.forEach(styleElement => {\n const id = styleElement.getAttribute('data-ngp-style');\n\n if (id) {\n this.styleElements.set(id, styleElement);\n }\n });\n }\n}\n\nexport function injectStyleInjector(): StyleInjector {\n return inject(StyleInjector);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport * from './disabled/disabled';\nexport * from './orientation/orientation';\nexport * from './style-injector/style-injector';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;AAMG;MAGU,gBAAgB,GAAG,IAAI,cAAc,CAAgB,kBAAkB,EAAE;AAStF;;;;AAIG;SACa,cAAc,CAC5B,WAA4B,MAAM,CAAU,KAAK,CAAC,EAAA;AAElD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1E,OAAO,QAAQ,GAAG,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjD;;AC7BA;;;;;;AAMG;MAGU,mBAAmB,GAAG,IAAI,cAAc,CAAkB,qBAAqB,EAAE;AAS9F;;;;AAIG;SACa,iBAAiB,CAC/B,cAAsC,MAAM,CAAiB,YAAY,CAAC,EAAA;AAE1E,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAEjE,OAAO,QAAQ,GAAG,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;AACvD;;AC7BA;;;;;;AAMG;AAIH;;;;;AAKG;MAIU,aAAa,CAAA;AAWxB,IAAA,WAAA,GAAA;AAVA;;AAEG;AACc,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAElD;;AAEG;AACc,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAA4B,CAAC;AAGnE,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACtC,IAAI,CAAC,mBAAmB,EAAE,CAAC;SAC5B;KACF;AAED;;;;AAIG;IACH,GAAG,CAAC,EAAU,EAAE,KAAa,EAAA;QAC3B,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YAC9B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,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;SAiEe,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC;AAC/B;;ACrFA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -144,6 +144,8 @@ function onChange(source, fn, options) {
144
144
  previousValue.set(value);
145
145
  }
146
146
  }, { allowSignalWrites: true, injector: options?.injector });
147
+ // call the fn with the initial value
148
+ fn(source(), null);
147
149
  }
148
150
  /**
149
151
  * Listen for changes to a boolean signal and call one of two functions when the signal changes.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-utils.mjs","sources":["../../../../packages/ng-primitives/utils/src/helpers/disposables.ts","../../../../packages/ng-primitives/utils/src/helpers/focus-manager.ts","../../../../packages/ng-primitives/utils/src/helpers/unique-id.ts","../../../../packages/ng-primitives/utils/src/signals/async.ts","../../../../packages/ng-primitives/utils/src/ui/dimensions.ts","../../../../packages/ng-primitives/utils/src/index.ts","../../../../packages/ng-primitives/utils/src/ng-primitives-utils.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { DestroyRef, inject } from '@angular/core';\n\n/**\n * Disposable functions are a way to manage timers, intervals, and event listeners\n * that should be cleared when a component is destroyed.\n *\n * This is heavily inspired by Headless UI disposables:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/utils/disposables.ts\n */\nexport function injectDisposables() {\n const destroyRef = inject(DestroyRef);\n\n return {\n /**\n * Set a timeout that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the timeout\n */\n setTimeout: (callback: () => void, delay: number) => {\n const id = setTimeout(callback, delay);\n const cleanup = () => clearTimeout(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @param target\n * @param type\n * @param listener\n * @param options\n * @returns A function to clear the interval\n */\n addEventListener: (\n target: EventTarget,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => {\n target.addEventListener(type, listener, options);\n const cleanup = () => target.removeEventListener(type, listener, options);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the interval\n */\n setInterval: (callback: () => void, delay: number) => {\n const id = setInterval(callback, delay);\n const cleanup = () => clearInterval(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set a requestAnimationFrame that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @returns A function to clear the requestAnimationFrame\n */\n requestAnimationFrame: (callback: FrameRequestCallback) => {\n const id = requestAnimationFrame(callback);\n const cleanup = () => cancelAnimationFrame(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n };\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { ElementRef, Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FocusManager {\n /**\n * Focus an element with an optional origin.\n */\n focus(element: ElementRef<HTMLElement>, origin?: FocusOrigin): void;\n focus(element: HTMLElement, origin?: FocusOrigin): void;\n focus(element: ElementRef<HTMLElement> | HTMLElement, origin: FocusOrigin = 'program'): void {\n element = coerceElement(element);\n\n switch (origin) {\n case 'keyboard':\n // trigger the focus-visible state for keyboard users\n element.contentEditable = 'true';\n element.focus({ preventScroll: true });\n element.contentEditable = 'false';\n break;\n default:\n element.focus();\n break;\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Store a map of unique ids for elements so that there are no collisions.\n */\nconst uniqueIdMap = new Map<string, number>();\n\n/**\n * Generate a unique id for an element\n * @param prefix - The prefix to use for the id\n * @returns The generated id\n */\nexport function uniqueId(prefix: string): string {\n const id = uniqueIdMap.get(prefix) ?? 0;\n uniqueIdMap.set(prefix, id + 1);\n return `${prefix}-${id}`;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Injector, Signal, effect, signal } from '@angular/core';\n\n/**\n * Listen for changes to a signal and call a function when the signal changes.\n * @param source\n * @param fn\n * @param options\n * @param options.injector\n * @internal\n */\nexport function onChange<T>(\n source: Signal<T | null | undefined>,\n fn: (value: T | null | undefined, previousValue: T | null | undefined) => void,\n options?: { injector: Injector },\n): void {\n const previousValue = signal(source());\n\n effect(\n () => {\n const value = source();\n if (value !== previousValue()) {\n fn(value, previousValue());\n previousValue.set(value);\n }\n },\n { allowSignalWrites: true, injector: options?.injector },\n );\n}\n\n/**\n * Listen for changes to a boolean signal and call one of two functions when the signal changes.\n * @param source\n * @param onTrue\n * @param onFalse\n * @param options\n */\nexport function onBooleanChange(\n source: Signal<boolean>,\n onTrue: () => void,\n onFalse: () => void,\n options?: { injector: Injector },\n): void {\n onChange(source, value => (value ? onTrue() : onFalse()), options);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport {\n AfterRenderPhase,\n ElementRef,\n Renderer2,\n afterNextRender,\n inject,\n signal,\n} from '@angular/core';\n\n/**\n * Injects the dimensions of the element\n * @returns The dimensions of the element\n */\nexport function injectDimensions() {\n const renderer = inject(Renderer2);\n const element = inject<ElementRef<HTMLElement>>(ElementRef);\n const size = signal<{ width: number; height: number; mounted: boolean }>({\n width: 0,\n height: 0,\n mounted: false,\n });\n let transitionDuration: string | undefined, animationName: string | undefined;\n\n afterNextRender(\n () => {\n transitionDuration = element.nativeElement.style.transitionDuration;\n animationName = element.nativeElement.style.animationName;\n },\n { phase: AfterRenderPhase.EarlyRead },\n );\n\n afterNextRender(\n () => {\n // block any animations/transitions so the element renders at its full dimensions\n renderer.setStyle(element.nativeElement, 'transitionDuration', '0s');\n renderer.setStyle(element.nativeElement, 'animationName', 'none');\n },\n { phase: AfterRenderPhase.Write },\n );\n\n afterNextRender(\n () => {\n const { width, height } = element.nativeElement.getBoundingClientRect();\n size.set({ width, height, mounted: true });\n\n // restore the original transition duration and animation name\n renderer.setStyle(element.nativeElement, 'transitionDuration', transitionDuration);\n renderer.setStyle(element.nativeElement, 'animationName', animationName);\n },\n { phase: AfterRenderPhase.Read },\n );\n\n return size;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { injectDisposables } from './helpers/disposables';\nexport { FocusManager } from './helpers/focus-manager';\nexport { uniqueId } from './helpers/unique-id';\nexport { onBooleanChange, onChange } from './signals/async';\nexport { injectDimensions } from './ui/dimensions';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;AAMG;AAGH;;;;;;AAMG;SACa,iBAAiB,GAAA;AAC/B,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;I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C;QACpE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC;KAC3D,EACD,EAAE,KAAK,EAAE,gBAAgB,CAAC,SAAS,EAAE,CACtC,CAAC;IAEF,eAAe,CACb,MAAK;;QAEH,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC;QACrE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;KACnE,EACD,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAClC,CAAC;IAEF,eAAe,CACb,MAAK;AACH,QAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;AACxE,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;QAG3C,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;QACnF,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;KAC1E,EACD,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,CACjC,CAAC;AAEF,IAAA,OAAO,IAAI,CAAC;AACd;;AC5DA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-utils.mjs","sources":["../../../../packages/ng-primitives/utils/src/helpers/disposables.ts","../../../../packages/ng-primitives/utils/src/helpers/focus-manager.ts","../../../../packages/ng-primitives/utils/src/helpers/unique-id.ts","../../../../packages/ng-primitives/utils/src/signals/async.ts","../../../../packages/ng-primitives/utils/src/ui/dimensions.ts","../../../../packages/ng-primitives/utils/src/index.ts","../../../../packages/ng-primitives/utils/src/ng-primitives-utils.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { DestroyRef, inject } from '@angular/core';\n\n/**\n * Disposable functions are a way to manage timers, intervals, and event listeners\n * that should be cleared when a component is destroyed.\n *\n * This is heavily inspired by Headless UI disposables:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/utils/disposables.ts\n */\nexport function injectDisposables() {\n const destroyRef = inject(DestroyRef);\n\n return {\n /**\n * Set a timeout that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the timeout\n */\n setTimeout: (callback: () => void, delay: number) => {\n const id = setTimeout(callback, delay);\n const cleanup = () => clearTimeout(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @param target\n * @param type\n * @param listener\n * @param options\n * @returns A function to clear the interval\n */\n addEventListener: (\n target: EventTarget,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => {\n target.addEventListener(type, listener, options);\n const cleanup = () => target.removeEventListener(type, listener, options);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the interval\n */\n setInterval: (callback: () => void, delay: number) => {\n const id = setInterval(callback, delay);\n const cleanup = () => clearInterval(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set a requestAnimationFrame that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @returns A function to clear the requestAnimationFrame\n */\n requestAnimationFrame: (callback: FrameRequestCallback) => {\n const id = requestAnimationFrame(callback);\n const cleanup = () => cancelAnimationFrame(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n };\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { ElementRef, Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FocusManager {\n /**\n * Focus an element with an optional origin.\n */\n focus(element: ElementRef<HTMLElement>, origin?: FocusOrigin): void;\n focus(element: HTMLElement, origin?: FocusOrigin): void;\n focus(element: ElementRef<HTMLElement> | HTMLElement, origin: FocusOrigin = 'program'): void {\n element = coerceElement(element);\n\n switch (origin) {\n case 'keyboard':\n // trigger the focus-visible state for keyboard users\n element.contentEditable = 'true';\n element.focus({ preventScroll: true });\n element.contentEditable = 'false';\n break;\n default:\n element.focus();\n break;\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Store a map of unique ids for elements so that there are no collisions.\n */\nconst uniqueIdMap = new Map<string, number>();\n\n/**\n * Generate a unique id for an element\n * @param prefix - The prefix to use for the id\n * @returns The generated id\n */\nexport function uniqueId(prefix: string): string {\n const id = uniqueIdMap.get(prefix) ?? 0;\n uniqueIdMap.set(prefix, id + 1);\n return `${prefix}-${id}`;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Injector, Signal, effect, signal } from '@angular/core';\n\n/**\n * Listen for changes to a signal and call a function when the signal changes.\n * @param source\n * @param fn\n * @param options\n * @param options.injector\n * @internal\n */\nexport function onChange<T>(\n source: Signal<T | null | undefined>,\n fn: (value: T | null | undefined, previousValue: T | null | undefined) => void,\n options?: { injector: Injector },\n): void {\n const previousValue = signal(source());\n\n effect(\n () => {\n const value = source();\n if (value !== previousValue()) {\n fn(value, previousValue());\n previousValue.set(value);\n }\n },\n { allowSignalWrites: true, injector: options?.injector },\n );\n\n // call the fn with the initial value\n fn(source(), null);\n}\n\n/**\n * Listen for changes to a boolean signal and call one of two functions when the signal changes.\n * @param source\n * @param onTrue\n * @param onFalse\n * @param options\n */\nexport function onBooleanChange(\n source: Signal<boolean>,\n onTrue: () => void,\n onFalse: () => void,\n options?: { injector: Injector },\n): void {\n onChange(source, value => (value ? onTrue() : onFalse()), options);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport {\n AfterRenderPhase,\n ElementRef,\n Renderer2,\n afterNextRender,\n inject,\n signal,\n} from '@angular/core';\n\n/**\n * Injects the dimensions of the element\n * @returns The dimensions of the element\n */\nexport function injectDimensions() {\n const renderer = inject(Renderer2);\n const element = inject<ElementRef<HTMLElement>>(ElementRef);\n const size = signal<{ width: number; height: number; mounted: boolean }>({\n width: 0,\n height: 0,\n mounted: false,\n });\n let transitionDuration: string | undefined, animationName: string | undefined;\n\n afterNextRender(\n () => {\n transitionDuration = element.nativeElement.style.transitionDuration;\n animationName = element.nativeElement.style.animationName;\n },\n { phase: AfterRenderPhase.EarlyRead },\n );\n\n afterNextRender(\n () => {\n // block any animations/transitions so the element renders at its full dimensions\n renderer.setStyle(element.nativeElement, 'transitionDuration', '0s');\n renderer.setStyle(element.nativeElement, 'animationName', 'none');\n },\n { phase: AfterRenderPhase.Write },\n );\n\n afterNextRender(\n () => {\n const { width, height } = element.nativeElement.getBoundingClientRect();\n size.set({ width, height, mounted: true });\n\n // restore the original transition duration and animation name\n renderer.setStyle(element.nativeElement, 'transitionDuration', transitionDuration);\n renderer.setStyle(element.nativeElement, 'animationName', animationName);\n },\n { phase: AfterRenderPhase.Read },\n );\n\n return size;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { injectDisposables } from './helpers/disposables';\nexport { FocusManager } from './helpers/focus-manager';\nexport { uniqueId } from './helpers/unique-id';\nexport { onBooleanChange, onChange } from './signals/async';\nexport { injectDimensions } from './ui/dimensions';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;AAMG;AAGH;;;;;;AAMG;SACa,iBAAiB,GAAA;AAC/B,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO;AACL;;;;;AAKG;AACH,QAAA,UAAU,EAAE,CAAC,QAAoB,EAAE,KAAa,KAAI;YAClD,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,EAAE,CAAC,CAAC;AACvC,YAAA,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9B,YAAA,OAAO,OAAO,CAAC;SAChB;AACD;;;;;;;;;AASG;QACH,gBAAgB,EAAE,CAChB,MAAmB,EACnB,IAAY,EACZ,QAA4C,EAC5C,OAA2C,KACzC;YACF,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACjD,YAAA,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC1E,YAAA,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9B,YAAA,OAAO,OAAO,CAAC;SAChB;AACD;;;;;AAKG;AACH,QAAA,WAAW,EAAE,CAAC,QAAoB,EAAE,KAAa,KAAI;YACnD,MAAM,EAAE,GAAG,WAAW,CAAC,QAA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C;QACnF,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;KAC1E,EACD,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,CACjC,CAAC;AAEF,IAAA,OAAO,IAAI,CAAC;AACd;;AC5DA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ng-primitives",
3
3
  "license": "Apache-2.0",
4
- "version": "0.7.0",
4
+ "version": "0.7.2",
5
5
  "peerDependencies": {
6
6
  "@angular/core": ">=18.0.0",
7
7
  "@angular/cdk": ">=18.0.0",
@@ -49,18 +49,18 @@
49
49
  "esm": "./esm2022/accordion/ng-primitives-accordion.mjs",
50
50
  "default": "./fesm2022/ng-primitives-accordion.mjs"
51
51
  },
52
- "./autofill": {
53
- "types": "./autofill/index.d.ts",
54
- "esm2022": "./esm2022/autofill/ng-primitives-autofill.mjs",
55
- "esm": "./esm2022/autofill/ng-primitives-autofill.mjs",
56
- "default": "./fesm2022/ng-primitives-autofill.mjs"
57
- },
58
52
  "./avatar": {
59
53
  "types": "./avatar/index.d.ts",
60
54
  "esm2022": "./esm2022/avatar/ng-primitives-avatar.mjs",
61
55
  "esm": "./esm2022/avatar/ng-primitives-avatar.mjs",
62
56
  "default": "./fesm2022/ng-primitives-avatar.mjs"
63
57
  },
58
+ "./autofill": {
59
+ "types": "./autofill/index.d.ts",
60
+ "esm2022": "./esm2022/autofill/ng-primitives-autofill.mjs",
61
+ "esm": "./esm2022/autofill/ng-primitives-autofill.mjs",
62
+ "default": "./fesm2022/ng-primitives-autofill.mjs"
63
+ },
64
64
  "./button": {
65
65
  "types": "./button/index.d.ts",
66
66
  "esm2022": "./esm2022/button/ng-primitives-button.mjs",
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class NgpDialogPanel {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<NgpDialogPanel, never>;
4
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgpDialogPanel, "[ngpDialogPanel]", ["ngpDialogPanel"], {}, {}, never, never, true, never>;
5
- }
@@ -1,24 +0,0 @@
1
- /**
2
- * Copyright © 2024 Angular Primitives.
3
- * https://github.com/ng-primitives/ng-primitives
4
- *
5
- * This source code is licensed under the Apache 2.0 license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- */
8
- import { Directive } from '@angular/core';
9
- import { NgpDialogPanelToken } from './dialog-panel.token';
10
- import * as i0 from "@angular/core";
11
- export class NgpDialogPanel {
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpDialogPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.1", type: NgpDialogPanel, isStandalone: true, selector: "[ngpDialogPanel]", providers: [{ provide: NgpDialogPanelToken, useExisting: NgpDialogPanel }], exportAs: ["ngpDialogPanel"], ngImport: i0 }); }
14
- }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpDialogPanel, decorators: [{
16
- type: Directive,
17
- args: [{
18
- standalone: true,
19
- selector: '[ngpDialogPanel]',
20
- exportAs: 'ngpDialogPanel',
21
- providers: [{ provide: NgpDialogPanelToken, useExisting: NgpDialogPanel }],
22
- }]
23
- }] });
24
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLXBhbmVsLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL25nLXByaW1pdGl2ZXMvZGlhbG9nL3NyYy9kaWFsb2ctcGFuZWwvZGlhbG9nLXBhbmVsLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcH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WxlY3RvcjogJ1tuZ3BEaWFsb2dQYW5lbF0nLFxuICBleHBvcnRBczogJ25ncERpYWxvZ1BhbmVsJyxcbiAgcHJvdmlkZXJzOiBbeyBwcm92aWRlOiBOZ3BEaWFsb2dQYW5lbFRva2VuLCB1c2VFeGlzdGluZzogTmdwRGlhbG9nUGFuZWwgfV0sXG59KVxuZXhwb3J0IGNsYXNzIE5ncERpYWxvZ1BhbmVsIHt9XG4iXX0=
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright © 2024 Angular Primitives.
3
- * https://github.com/ng-primitives/ng-primitives
4
- *
5
- * This source code is licensed under the Apache 2.0 license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- */
8
- import { InjectionToken, inject } from '@angular/core';
9
- export const NgpDialogPanelToken = new InjectionToken('NgpDialogPanelToken');
10
- /**
11
- * Inject the DialogPanel directive instance
12
- */
13
- export function injectDialogPanel() {
14
- return inject(NgpDialogPanelToken);
15
- }
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLXBhbmVsLnRva2VuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvbmctcHJpbWl0aXZlcy9kaWFsb2cvc3JjL2RpYWxvZy1wYW5lbC9kaWFsb2ctcGFuZWwudG9rZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBQ0gsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHdkQsTUFBTSxDQUFDLE1BQU0sbUJBQW1CLEdBQUcsSUFBSSxjQUFjLENBQWlCLHFCQUFxQixDQUFDLENBQUM7QUFFN0Y7O0dBRUc7QUFDSCxNQUFNLFVBQVUsaUJBQWlCO0lBQy9CLE9BQU8sTUFBTSxDQUFDLG1CQUFtQixDQUFDLENBQUM7QUFDckMs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