@ngbase/adk 0.1.1 → 0.1.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 (152) hide show
  1. package/accordion/accordion-item.d.ts +4 -0
  2. package/accordion/public-api.d.ts +1 -1
  3. package/autocomplete/autocomplete.d.ts +2 -2
  4. package/avatar/avatar.d.ts +1 -1
  5. package/breadcrumb/breadcrumb.d.ts +2 -3
  6. package/breadcrumb/public-api.d.ts +1 -1
  7. package/carousel/carousel.d.ts +1 -1
  8. package/chip/chip.d.ts +2 -2
  9. package/datepicker/calendar.d.ts +3 -3
  10. package/datepicker/datepicker.d.ts +2 -2
  11. package/datepicker/time.d.ts +2 -2
  12. package/dialog/dialog.d.ts +1 -1
  13. package/fesm2022/ngbase-adk-accordion.mjs +4 -1
  14. package/fesm2022/ngbase-adk-accordion.mjs.map +1 -1
  15. package/fesm2022/ngbase-adk-autocomplete.mjs +7 -36
  16. package/fesm2022/ngbase-adk-autocomplete.mjs.map +1 -1
  17. package/fesm2022/ngbase-adk-avatar.mjs +2 -2
  18. package/fesm2022/ngbase-adk-avatar.mjs.map +1 -1
  19. package/fesm2022/ngbase-adk-breadcrumb.mjs +2 -2
  20. package/fesm2022/ngbase-adk-breadcrumb.mjs.map +1 -1
  21. package/fesm2022/ngbase-adk-carousel.mjs +2 -2
  22. package/fesm2022/ngbase-adk-carousel.mjs.map +1 -1
  23. package/fesm2022/ngbase-adk-chip.mjs +4 -2
  24. package/fesm2022/ngbase-adk-chip.mjs.map +1 -1
  25. package/fesm2022/ngbase-adk-datepicker.mjs +114 -328
  26. package/fesm2022/ngbase-adk-datepicker.mjs.map +1 -1
  27. package/fesm2022/ngbase-adk-dialog.mjs +12 -13
  28. package/fesm2022/ngbase-adk-dialog.mjs.map +1 -1
  29. package/fesm2022/ngbase-adk-form-field.mjs +2 -156
  30. package/fesm2022/ngbase-adk-form-field.mjs.map +1 -1
  31. package/fesm2022/ngbase-adk-menu.mjs +15 -30
  32. package/fesm2022/ngbase-adk-menu.mjs.map +1 -1
  33. package/fesm2022/ngbase-adk-otp.mjs +164 -0
  34. package/fesm2022/ngbase-adk-otp.mjs.map +1 -0
  35. package/fesm2022/ngbase-adk-pagination.mjs +8 -65
  36. package/fesm2022/ngbase-adk-pagination.mjs.map +1 -1
  37. package/fesm2022/ngbase-adk-popover.mjs +423 -548
  38. package/fesm2022/ngbase-adk-popover.mjs.map +1 -1
  39. package/fesm2022/ngbase-adk-portal.mjs +0 -1
  40. package/fesm2022/ngbase-adk-portal.mjs.map +1 -1
  41. package/fesm2022/ngbase-adk-radio.mjs +2 -16
  42. package/fesm2022/ngbase-adk-radio.mjs.map +1 -1
  43. package/fesm2022/ngbase-adk-resizable.mjs +10 -43
  44. package/fesm2022/ngbase-adk-resizable.mjs.map +1 -1
  45. package/fesm2022/ngbase-adk-select.mjs +67 -173
  46. package/fesm2022/ngbase-adk-select.mjs.map +1 -1
  47. package/fesm2022/ngbase-adk-sheet.mjs +95 -0
  48. package/fesm2022/ngbase-adk-sheet.mjs.map +1 -0
  49. package/fesm2022/ngbase-adk-sidenav.mjs +2 -2
  50. package/fesm2022/ngbase-adk-sidenav.mjs.map +1 -1
  51. package/fesm2022/ngbase-adk-slider.mjs +9 -23
  52. package/fesm2022/ngbase-adk-slider.mjs.map +1 -1
  53. package/fesm2022/ngbase-adk-sonner.mjs +13 -63
  54. package/fesm2022/ngbase-adk-sonner.mjs.map +1 -1
  55. package/fesm2022/ngbase-adk-stepper.mjs +16 -114
  56. package/fesm2022/ngbase-adk-stepper.mjs.map +1 -1
  57. package/fesm2022/ngbase-adk-switch.mjs +2 -2
  58. package/fesm2022/ngbase-adk-switch.mjs.map +1 -1
  59. package/fesm2022/ngbase-adk-table.mjs +10 -30
  60. package/fesm2022/ngbase-adk-table.mjs.map +1 -1
  61. package/fesm2022/ngbase-adk-tabs.mjs +14 -94
  62. package/fesm2022/ngbase-adk-tabs.mjs.map +1 -1
  63. package/fesm2022/ngbase-adk-tooltip.mjs +49 -39
  64. package/fesm2022/ngbase-adk-tooltip.mjs.map +1 -1
  65. package/fesm2022/ngbase-adk-tour.mjs +1 -1
  66. package/fesm2022/ngbase-adk-tour.mjs.map +1 -1
  67. package/fesm2022/ngbase-adk-tree.mjs +11 -43
  68. package/fesm2022/ngbase-adk-tree.mjs.map +1 -1
  69. package/form-field/public-api.d.ts +0 -1
  70. package/menu/menu-trigger.d.ts +2 -2
  71. package/menu/menu.d.ts +6 -6
  72. package/otp/index.d.ts +5 -0
  73. package/{form-field → otp}/otp.d.ts +1 -1
  74. package/otp/public-api.d.ts +1 -0
  75. package/package.json +25 -17
  76. package/pagination/pagination.d.ts +5 -1
  77. package/popover/popover-arrow.ng.d.ts +34 -0
  78. package/popover/popover.d.ts +12 -3
  79. package/popover/popover.service.d.ts +5 -4
  80. package/popover/public-api.d.ts +1 -0
  81. package/popover/utils.d.ts +32 -48
  82. package/portal/dialog-ref.d.ts +0 -1
  83. package/resizable/resizable-group.d.ts +2 -2
  84. package/resizable/resizable.d.ts +2 -2
  85. package/schematics/components/files/accordion/accordion.ts.template +6 -8
  86. package/schematics/components/files/autocomplete/autocomplete.ts.template +2 -6
  87. package/schematics/components/files/avatar/avatar.ts.template +2 -2
  88. package/schematics/components/files/breadcrumb/breadcrumb.ts.template +5 -5
  89. package/schematics/components/files/carousel/carousel.ts.template +2 -2
  90. package/schematics/components/files/chip/chip.ts.template +2 -2
  91. package/schematics/components/files/datepicker/calendar.ts.template +6 -6
  92. package/schematics/components/files/datepicker/datepicker.ts.template +33 -3
  93. package/schematics/components/files/datepicker/index.ts.template +0 -1
  94. package/schematics/components/files/datepicker/time.ts.template +12 -4
  95. package/schematics/components/files/dialog/dialog.ts.template +8 -8
  96. package/schematics/components/files/form-field/{input.ts.template → form-field.ts.template} +13 -2
  97. package/schematics/components/files/form-field/index.ts.template +1 -2
  98. package/schematics/components/files/form-field/input-style.directive.ts.template +1 -1
  99. package/schematics/components/files/menu/menu.ts.template +3 -3
  100. package/schematics/components/files/otp/index.ts.template +5 -0
  101. package/schematics/components/files/{form-field → otp}/otp.ts.template +3 -3
  102. package/schematics/components/files/pagination/pagination.ts.template +2 -2
  103. package/schematics/components/files/popover/popover.ts.template +7 -30
  104. package/schematics/components/files/radio/radio.ts.template +3 -8
  105. package/schematics/components/files/resizable/resizable.ts.template +7 -7
  106. package/schematics/components/files/select/option.ts.template +1 -0
  107. package/schematics/components/files/select/select.ts.template +8 -8
  108. package/schematics/components/files/sheet/sheet.ts.template +11 -76
  109. package/schematics/components/files/sidenav/sidenav.ts.template +3 -3
  110. package/schematics/components/files/slider/slider.ts.template +3 -10
  111. package/schematics/components/files/sonner/sonner.ts.template +3 -2
  112. package/schematics/components/files/stepper/stepper.ts.template +4 -4
  113. package/schematics/components/files/switch/switch.ts.template +1 -1
  114. package/schematics/components/files/tabs/tab.ts.template +11 -8
  115. package/schematics/components/files/theme/theme.service.ts.template +0 -11
  116. package/schematics/components/files/tooltip/tooltip.ts.template +8 -3
  117. package/schematics/components/files/tour/index.ts.template +0 -2
  118. package/schematics/components/files/tour/tour.ts.template +13 -2
  119. package/schematics/components/files/tree/tree.ts.template +3 -3
  120. package/schematics/components/schema.json +8 -0
  121. package/select/option-group.d.ts +3 -3
  122. package/select/select.d.ts +2 -2
  123. package/sheet/index.d.ts +5 -0
  124. package/sheet/public-api.d.ts +2 -0
  125. package/sheet/sheet.d.ts +26 -0
  126. package/sheet/sheet.service.d.ts +13 -0
  127. package/sidenav/public-api.d.ts +1 -1
  128. package/sidenav/sidenav.d.ts +1 -1
  129. package/slider/public-api.d.ts +1 -1
  130. package/slider/slider.d.ts +5 -5
  131. package/sonner/sonner.d.ts +2 -1
  132. package/stepper/animation.d.ts +1 -1
  133. package/stepper/step.d.ts +1 -1
  134. package/stepper/stepper.d.ts +2 -2
  135. package/switch/switch.d.ts +1 -1
  136. package/table/body-row.d.ts +3 -3
  137. package/table/head-row.d.ts +3 -3
  138. package/table/table.d.ts +1 -1
  139. package/tabs/tab-group.d.ts +4 -4
  140. package/tabs/tab.d.ts +2 -2
  141. package/tooltip/public-api.d.ts +1 -1
  142. package/tooltip/tooltip.d.ts +5 -1
  143. package/tooltip/tooltip.directive.d.ts +1 -1
  144. package/tooltip/tooltip.service.d.ts +4 -2
  145. package/tour/tour.service.d.ts +3 -4
  146. package/tree/public-api.d.ts +2 -2
  147. package/tree/tree-node.d.ts +2 -2
  148. package/tree/tree.d.ts +2 -2
  149. package/schematics/components/files/datepicker/datepicker-trigger.ts.template +0 -27
  150. package/schematics/components/files/theme/theme.component.ts.template +0 -165
  151. package/schematics/components/files/tour/tour-step.ts.template +0 -8
  152. package/schematics/components/files/tour/tour.service.ts.template +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"ngbase-adk-tour.mjs","sources":["../../../projects/adk/tour/tour.service.ts","../../../projects/adk/tour/tour-step.ts","../../../projects/adk/tour/tour.ts","../../../projects/adk/tour/animation.ts","../../../projects/adk/tour/tour-base.ts","../../../projects/adk/tour/ngbase-adk-tour.ts"],"sourcesContent":["import { Injectable, computed, signal } from '@angular/core';\nimport { DialogInput } from '@ngbase/adk/portal';\nimport { PopoverOpen, ngbPopoverPortal } from '@ngbase/adk/popover';\nimport { NgbTourStep } from './tour-step';\n\n@Injectable({ providedIn: 'root' })\nexport class NgbTourService {\n private popover = ngbPopoverPortal();\n readonly steps = signal<NgbTourStep[]>([]);\n readonly step = signal(-1);\n private readonly ids = signal<string[]>([]);\n currentStep = computed(() => {\n const id = this.ids()[this.step()];\n const steps = this.steps();\n return steps.find(x => x.ngbTourStep() === id);\n });\n private diaRef?: PopoverOpen<any>;\n private id = 0;\n private template!: DialogInput<any>;\n readonly showPrev = computed(() => this.step() > 0);\n readonly showNext = computed(() => this.step() < this.ids().length - 1);\n readonly isLast = computed(() => this.step() === this.ids().length - 1);\n readonly totalSteps = computed(() => this.ids().length);\n scrolled = signal(0);\n private clipPath = computed(() => {\n const _ = this.scrolled();\n const currentStep = this.currentStep();\n if (!currentStep) {\n return '';\n }\n const { width, height, top, left } = currentStep.el.nativeElement.getBoundingClientRect();\n return `polygon(\n 0 0,\n 100% 0,\n 100% ${top}px,\n ${left}px ${top}px,\n ${left}px ${top + height}px,\n ${left + width}px ${top + height}px,\n ${left + width}px ${top}px,\n 100% ${top}px,\n 100% 100%,\n 0 100%,\n 0 0\n )`;\n });\n\n constructor() {}\n\n addStep(step: NgbTourStep) {\n this.steps.update(x => [...x, step]);\n }\n\n start<T>(comp: DialogInput<T>, ids: string[]) {\n this.template = comp;\n this.ids.set(ids);\n this.step.set(-1);\n this.next();\n }\n\n prev() {\n const steps = this.ids();\n const prevStep = this.step();\n if (steps.length) {\n const step = (prevStep - 1 + steps.length) % steps.length;\n this.go(step);\n }\n }\n\n next() {\n const steps = this.ids();\n const prevStep = this.step();\n if (steps.length) {\n const step = (prevStep + 1) % steps.length;\n if (prevStep > step) {\n this.stop();\n return;\n }\n this.go(step);\n }\n }\n\n go(id: number) {\n const steps = this.steps();\n const ids = this.ids();\n if (steps.length) {\n // validate the step number is within the range\n if (id < 0 || id >= ids.length) {\n return;\n }\n this.step.set(id);\n const step = steps.find(x => x.ngbTourStep() === ids[id]);\n if (!step) {\n return;\n }\n if (this.diaRef) {\n this.diaRef.parent.target.set(step.el.nativeElement);\n } else {\n this.showOverlay(step.el.nativeElement);\n }\n }\n }\n\n stop() {\n this.hideOverlay();\n clearInterval(this.id);\n }\n\n private showOverlay(el: HTMLElement) {\n this.diaRef?.diaRef.close();\n\n this.diaRef = this.popover.open(this.template, {\n target: el,\n position: 'right',\n className: 'transition-all',\n backdropClassName: 'bg-black/20',\n clipPath: this.clipPath,\n smoothScroll: true,\n anchor: true,\n backdropColor: true,\n width: '400px',\n disableClose: true,\n });\n this.scrolled = this.diaRef.parent.scrolled;\n }\n\n private hideOverlay() {\n this.diaRef?.diaRef.close();\n this.diaRef = undefined;\n }\n}\n","import { Directive, ElementRef, inject, input } from '@angular/core';\nimport { NgbTourService } from './tour.service';\n\n@Directive({\n selector: '[ngbTourStep]',\n})\nexport class NgbTourStep {\n readonly el = inject<ElementRef>(ElementRef);\n readonly tourService = inject(NgbTourService);\n\n // Inputs\n readonly ngbTourStep = input.required<string>();\n\n constructor() {\n this.tourService.addStep(this);\n }\n}\n","import { inject, contentChildren, Directive } from '@angular/core';\nimport { NgbTourService } from './tour.service';\nimport { NgbTourStep } from './tour-step';\n\n@Directive({\n selector: '[ngbTour]',\n})\nexport class NgbTour {\n readonly tourService = inject(NgbTourService);\n readonly steps = contentChildren(NgbTourStep, { descendants: true });\n}\n","import { trigger, state, style, transition, animate } from '@angular/animations';\nimport { createHostAnimation, fadeAnimation } from '@ngbase/adk/utils';\n\nexport const slideInOutAnimation = trigger('slideInOutAnimation', [\n state('1', style({ transform: 'none', opacity: 1 })),\n state('void', style({ transform: 'translateY(-20px)', opacity: 0 })),\n state('0', style({ transform: 'translateY(-20px)', opacity: 0 })),\n transition('* => *', animate('100ms ease-out')),\n]);\n\nexport const tourAnimation = [\n createHostAnimation(['@slideInOutAnimation', '@fadeAnimation']),\n slideInOutAnimation,\n fadeAnimation('200ms'),\n];\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n OnDestroy,\n signal,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { PopoverOptions, PopoverPosition, tooltipPosition } from '@ngbase/adk/popover';\nimport { BaseDialog, DialogOptions } from '@ngbase/adk/portal';\nimport { debounceTime, fromEvent, startWith, take } from 'rxjs';\nimport { NgbTourService } from './tour.service';\nimport { tourAnimation } from './animation';\n\n@Component({\n selector: '[ngbTour]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n #container\n class=\"pointer-events-auto fixed z-10 overflow-auto rounded-md border bg-foreground p-1 shadow-md\"\n [@slideInOutAnimation]\n >\n <ng-container #myDialog />\n </div>\n <div class=\"pointer-events-auto fixed top-0 h-full w-full bg-black/20\" [@fadeAnimation]></div>\n `,\n host: {\n '[@parentAnimation]': '',\n '(@parentAnimation.done)': 'animationDone()',\n },\n animations: [tourAnimation],\n})\nexport class NgbBaseTour extends BaseDialog implements OnDestroy {\n readonly tourService = inject(NgbTourService);\n readonly myDialog = viewChild('myDialog', { read: ViewContainerRef });\n readonly container = viewChild<ElementRef<HTMLElement>>('container');\n\n options!: DialogOptions;\n tooltipOptions!: PopoverOptions;\n private lastPosition: PopoverPosition = 'top';\n readonly scrolled = signal(0);\n\n readonly clipPath = computed(() => {\n const _ = this.scrolled();\n const currentStep = this.tourService.currentStep()!;\n const { width, height, top, left } = currentStep.el.nativeElement.getBoundingClientRect();\n return `polygon(\n 0 0,\n 100% 0,\n 100% ${top}px,\n ${left}px ${top}px,\n ${left}px ${top + height}px,\n ${left + width}px ${top + height}px,\n ${left + width}px ${top}px,\n 100% ${top}px,\n 100% 100%,\n 0 100%,\n 0 0\n )`;\n });\n\n constructor() {\n super();\n setTimeout(() => {\n this._afterViewSource.next(this.myDialog()!);\n this.container()!.nativeElement.classList.add('transition-all');\n }, 5000);\n // (() => {\n\n // // setTimeout(() => {\n // // }, 1000);\n // });\n\n effect(() => {\n const target = this.target() || this.tooltipOptions.target;\n this.tooltipOptions.target = target;\n target.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n\n fromEvent(window, 'scroll')\n .pipe(startWith(1), debounceTime(50), take(1))\n .subscribe(() => {\n this.lastPosition = this.tooltipOptions.position || 'bottom';\n const el = this.container()!.nativeElement;\n if (this.options.backdrop) {\n this.document.body.style.overflow = 'hidden';\n }\n if (this.options.width === 'target') {\n // update the width of the container to be the same as the target\n el.style.width = `${this.tooltipOptions.target.offsetWidth}px`;\n } else if (this.options.width) {\n el.style.width = this.options.width;\n }\n if (this.options.height) {\n el.style.height = this.options.height;\n }\n if (this.options.maxHeight) {\n el.style.maxHeight = this.options.maxHeight;\n }\n this.scrolled.update(x => x + 1);\n this.updateDimension();\n });\n // if (!this.options.backdrop) {\n // // window.addEventListener('wheel', this.updateDimension);\n // }\n });\n }\n\n private updateDimension = () => {\n requestAnimationFrame(() => {\n const el = this.container()!.nativeElement;\n const { top, left, bottom, position } = tooltipPosition({\n target: this.tooltipOptions.target,\n el,\n position: this.lastPosition,\n client: this.tooltipOptions.client,\n offset: this.tooltipOptions.offset,\n });\n this.lastPosition = position;\n // we need to update the values directly instead of signal to avoid too many CD checks\n if (bottom) {\n el.style.bottom = `${bottom}px`;\n el.style.top = '';\n } else if (top) {\n el.style.top = `${top}px`;\n el.style.bottom = '';\n }\n el.style.left = `${left}px`;\n });\n };\n\n override setOptions(options: DialogOptions): void {\n this.options = options;\n }\n\n ngOnDestroy(): void {\n window.removeEventListener('wheel', this.updateDimension);\n this.document.body.style.overflow = '';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAMa,cAAc,CAAA;AAwCzB,IAAA,WAAA,GAAA;QAvCQ,IAAO,CAAA,OAAA,GAAG,gBAAgB,EAAE;AAC3B,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAgB,EAAE,CAAC;AACjC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACT,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAW,EAAE,CAAC;AAC3C,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAC1B,YAAA,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAClC,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC1B,YAAA,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC;AAChD,SAAC,CAAC;QAEM,IAAE,CAAA,EAAA,GAAG,CAAC;AAEL,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,GAAG,CA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AAE;;;;;;;;;AAST,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,oBAAoB,EAAE,EAAE;AACxB,wBAAA,yBAAyB,EAAE,iBAAiB;AAC7C,qBAAA;oBACD,UAAU,EAAE,CAAC,aAAa,CAAC;AAC5B,iBAAA;;;ACpCD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngbase-adk-tour.mjs","sources":["../../../projects/adk/tour/tour.service.ts","../../../projects/adk/tour/tour-step.ts","../../../projects/adk/tour/tour.ts","../../../projects/adk/tour/animation.ts","../../../projects/adk/tour/tour-base.ts","../../../projects/adk/tour/ngbase-adk-tour.ts"],"sourcesContent":["import { Injectable, computed, signal } from '@angular/core';\nimport { DialogInput } from '@ngbase/adk/portal';\nimport { PopoverOpen, ngbPopoverPortal } from '@ngbase/adk/popover';\nimport { NgbTourStep } from './tour-step';\n\n@Injectable({ providedIn: 'root' })\nexport class NgbTourService {\n private readonly popover = ngbPopoverPortal();\n readonly steps = signal<NgbTourStep[]>([]);\n readonly step = signal(-1);\n private readonly ids = signal<string[]>([]);\n readonly currentStep = computed(() => {\n const id = this.ids()[this.step()];\n const steps = this.steps();\n return steps.find(x => x.ngbTourStep() === id);\n });\n private diaRef?: PopoverOpen<any>;\n private id = 0;\n private template!: DialogInput<any>;\n readonly showPrev = computed(() => this.step() > 0);\n readonly showNext = computed(() => this.step() < this.ids().length - 1);\n readonly isLast = computed(() => this.step() === this.ids().length - 1);\n readonly totalSteps = computed(() => this.ids().length);\n scrolled = signal(0);\n private readonly clipPath = computed(() => {\n const _ = this.scrolled();\n const currentStep = this.currentStep();\n if (!currentStep) {\n return '';\n }\n const { width, height, top, left } = currentStep.el.nativeElement.getBoundingClientRect();\n return `polygon(\n 0 0,\n 100% 0,\n 100% ${top}px,\n ${left}px ${top}px,\n ${left}px ${top + height}px,\n ${left + width}px ${top + height}px,\n ${left + width}px ${top}px,\n 100% ${top}px,\n 100% 100%,\n 0 100%,\n 0 0\n )`;\n });\n\n addStep(step: NgbTourStep) {\n this.steps.update(x => [...x, step]);\n }\n\n start<T>(comp: DialogInput<T>, ids: string[]) {\n this.template = comp;\n this.ids.set(ids);\n this.step.set(-1);\n this.next();\n }\n\n prev() {\n const steps = this.ids();\n const prevStep = this.step();\n if (steps.length) {\n const step = (prevStep - 1 + steps.length) % steps.length;\n this.go(step);\n }\n }\n\n next() {\n const steps = this.ids();\n const prevStep = this.step();\n if (steps.length) {\n const step = (prevStep + 1) % steps.length;\n if (prevStep > step) {\n this.stop();\n return;\n }\n this.go(step);\n }\n }\n\n go(id: number) {\n const steps = this.steps();\n const ids = this.ids();\n if (steps.length) {\n // validate the step number is within the range\n if (id < 0 || id >= ids.length) {\n return;\n }\n this.step.set(id);\n const step = steps.find(x => x.ngbTourStep() === ids[id]);\n if (!step) {\n return;\n }\n if (this.diaRef) {\n this.diaRef.parent.target.set(step.el.nativeElement);\n } else {\n this.showOverlay(step.el.nativeElement);\n }\n }\n }\n\n stop() {\n this.hideOverlay();\n clearInterval(this.id);\n }\n\n private showOverlay(el: HTMLElement) {\n this.diaRef?.diaRef.close();\n\n this.diaRef = this.popover.open(this.template, {\n target: el,\n position: 'right',\n className: 'transition-all',\n backdropClassName: 'bg-black/20',\n clipPath: this.clipPath,\n smoothScroll: true,\n anchor: true,\n backdropColor: true,\n width: '400px',\n disableClose: true,\n });\n this.scrolled = this.diaRef.parent.scrolled;\n }\n\n private hideOverlay() {\n this.diaRef?.diaRef.close();\n this.diaRef = undefined;\n }\n}\n","import { Directive, ElementRef, inject, input } from '@angular/core';\nimport { NgbTourService } from './tour.service';\n\n@Directive({\n selector: '[ngbTourStep]',\n})\nexport class NgbTourStep {\n readonly el = inject<ElementRef>(ElementRef);\n readonly tourService = inject(NgbTourService);\n\n // Inputs\n readonly ngbTourStep = input.required<string>();\n\n constructor() {\n this.tourService.addStep(this);\n }\n}\n","import { inject, contentChildren, Directive } from '@angular/core';\nimport { NgbTourService } from './tour.service';\nimport { NgbTourStep } from './tour-step';\n\n@Directive({\n selector: '[ngbTour]',\n})\nexport class NgbTour {\n readonly tourService = inject(NgbTourService);\n readonly steps = contentChildren(NgbTourStep, { descendants: true });\n}\n","import { trigger, state, style, transition, animate } from '@angular/animations';\nimport { createHostAnimation, fadeAnimation } from '@ngbase/adk/utils';\n\nexport const slideInOutAnimation = trigger('slideInOutAnimation', [\n state('1', style({ transform: 'none', opacity: 1 })),\n state('void', style({ transform: 'translateY(-20px)', opacity: 0 })),\n state('0', style({ transform: 'translateY(-20px)', opacity: 0 })),\n transition('* => *', animate('100ms ease-out')),\n]);\n\nexport const tourAnimation = [\n createHostAnimation(['@slideInOutAnimation', '@fadeAnimation']),\n slideInOutAnimation,\n fadeAnimation('200ms'),\n];\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n OnDestroy,\n signal,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { PopoverOptions, PopoverPosition, tooltipPosition } from '@ngbase/adk/popover';\nimport { BaseDialog, DialogOptions } from '@ngbase/adk/portal';\nimport { debounceTime, fromEvent, startWith, take } from 'rxjs';\nimport { NgbTourService } from './tour.service';\nimport { tourAnimation } from './animation';\n\n@Component({\n selector: '[ngbTour]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n #container\n class=\"pointer-events-auto fixed z-10 overflow-auto rounded-md border bg-foreground p-1 shadow-md\"\n [@slideInOutAnimation]\n >\n <ng-container #myDialog />\n </div>\n <div class=\"pointer-events-auto fixed top-0 h-full w-full bg-black/20\" [@fadeAnimation]></div>\n `,\n host: {\n '[@parentAnimation]': '',\n '(@parentAnimation.done)': 'animationDone()',\n },\n animations: [tourAnimation],\n})\nexport class NgbBaseTour extends BaseDialog implements OnDestroy {\n readonly tourService = inject(NgbTourService);\n readonly myDialog = viewChild('myDialog', { read: ViewContainerRef });\n readonly container = viewChild<ElementRef<HTMLElement>>('container');\n\n options!: DialogOptions;\n tooltipOptions!: PopoverOptions;\n private lastPosition: PopoverPosition = 'top';\n readonly scrolled = signal(0);\n\n readonly clipPath = computed(() => {\n const _ = this.scrolled();\n const currentStep = this.tourService.currentStep()!;\n const { width, height, top, left } = currentStep.el.nativeElement.getBoundingClientRect();\n return `polygon(\n 0 0,\n 100% 0,\n 100% ${top}px,\n ${left}px ${top}px,\n ${left}px ${top + height}px,\n ${left + width}px ${top + height}px,\n ${left + width}px ${top}px,\n 100% ${top}px,\n 100% 100%,\n 0 100%,\n 0 0\n )`;\n });\n\n constructor() {\n super();\n setTimeout(() => {\n this._afterViewSource.next(this.myDialog()!);\n this.container()!.nativeElement.classList.add('transition-all');\n }, 5000);\n // (() => {\n\n // // setTimeout(() => {\n // // }, 1000);\n // });\n\n effect(() => {\n const target = this.target() || this.tooltipOptions.target;\n this.tooltipOptions.target = target;\n target.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n\n fromEvent(window, 'scroll')\n .pipe(startWith(1), debounceTime(50), take(1))\n .subscribe(() => {\n this.lastPosition = this.tooltipOptions.position || 'bottom';\n const el = this.container()!.nativeElement;\n if (this.options.backdrop) {\n this.document.body.style.overflow = 'hidden';\n }\n if (this.options.width === 'target') {\n // update the width of the container to be the same as the target\n el.style.width = `${this.tooltipOptions.target.offsetWidth}px`;\n } else if (this.options.width) {\n el.style.width = this.options.width;\n }\n if (this.options.height) {\n el.style.height = this.options.height;\n }\n if (this.options.maxHeight) {\n el.style.maxHeight = this.options.maxHeight;\n }\n this.scrolled.update(x => x + 1);\n this.updateDimension();\n });\n // if (!this.options.backdrop) {\n // // window.addEventListener('wheel', this.updateDimension);\n // }\n });\n }\n\n private updateDimension = () => {\n requestAnimationFrame(() => {\n const el = this.container()!.nativeElement;\n const { top, left, bottom, position } = tooltipPosition({\n target: this.tooltipOptions.target,\n el,\n position: this.lastPosition,\n client: this.tooltipOptions.client,\n offset: this.tooltipOptions.offset,\n });\n this.lastPosition = position;\n // we need to update the values directly instead of signal to avoid too many CD checks\n if (bottom) {\n el.style.bottom = `${bottom}px`;\n el.style.top = '';\n } else if (top) {\n el.style.top = `${top}px`;\n el.style.bottom = '';\n }\n el.style.left = `${left}px`;\n });\n };\n\n override setOptions(options: DialogOptions): void {\n this.options = options;\n }\n\n ngOnDestroy(): void {\n window.removeEventListener('wheel', this.updateDimension);\n this.document.body.style.overflow = '';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAMa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;QAEmB,IAAO,CAAA,OAAA,GAAG,gBAAgB,EAAE;AACpC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAgB,EAAE,CAAC;AACjC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACT,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAW,EAAE,CAAC;AAClC,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AACnC,YAAA,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAClC,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC1B,YAAA,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC;AAChD,SAAC,CAAC;QAEM,IAAE,CAAA,EAAA,GAAG,CAAC;AAEL,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC1C,IAAQ,CAAA,QAAA,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9D,IAAM,CAAA,MAAA,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,CAAC,GAAG,E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* as i0 from '@angular/core';
2
- import { inject, viewChild, ViewContainerRef, computed, signal, linkedSignal, Component, ChangeDetectionStrategy, Directive, InjectionToken, Injector, IterableDiffers, contentChild, TemplateRef, input, effect } from '@angular/core';
2
+ import { inject, viewChild, ViewContainerRef, computed, signal, linkedSignal, Directive, InjectionToken, Injector, IterableDiffers, contentChild, TemplateRef, input, effect } from '@angular/core';
3
3
  import * as i1 from '@ngbase/adk/a11y';
4
4
  import { AccessibleItem, AccessibleGroup } from '@ngbase/adk/a11y';
5
5
  import { uniqueId } from '@ngbase/adk/utils';
@@ -39,54 +39,23 @@ class NgbTreeNode {
39
39
  this.tree.toggle(this.data.details);
40
40
  }
41
41
  }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbTreeNode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.0", type: NgbTreeNode, isStandalone: true, selector: "[ngbTreeNode]", host: { attributes: { "role": "treeitem" }, listeners: { "selectedChange": "toggle()" }, properties: { "style": "padding()", "ayId": "tree.ayId", "level": "data.level", "expandable": "hasChildren()", "expanded": "isOpen()", "attr.aria-expanded": "isOpen()" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], exportAs: ["ngbTreeNode"], hostDirectives: [{ directive: i1.AccessibleItem }], ngImport: i0, template: `
44
- <style>
45
- .tree-node {
46
- display: flex;
47
- align-items: start;
48
- }
49
- </style>
50
- <div class="tree-node">
51
- <ng-content />
52
- </div>
53
- <ng-content select="[ngbTreeNodeContent]" />
54
- <ng-container #container />
55
- `, isInline: true, styles: [".tree-node{display:flex;align-items:start}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbTreeNode, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
43
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.0.0", type: NgbTreeNode, isStandalone: true, selector: "[ngbTreeNode]", host: { attributes: { "role": "treeitem" }, properties: { "style": "padding()", "attr.aria-expanded": "isOpen()" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], exportAs: ["ngbTreeNode"], hostDirectives: [{ directive: i1.AccessibleItem }], ngImport: i0 }); }
56
44
  }
57
45
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbTreeNode, decorators: [{
58
- type: Component,
46
+ type: Directive,
59
47
  args: [{
60
48
  selector: '[ngbTreeNode]',
61
49
  exportAs: 'ngbTreeNode',
62
- changeDetection: ChangeDetectionStrategy.OnPush,
63
- template: `
64
- <style>
65
- .tree-node {
66
- display: flex;
67
- align-items: start;
68
- }
69
- </style>
70
- <div class="tree-node">
71
- <ng-content />
72
- </div>
73
- <ng-content select="[ngbTreeNodeContent]" />
74
- <ng-container #container />
75
- `,
76
50
  hostDirectives: [AccessibleItem],
77
51
  host: {
78
- '[style]': 'padding()',
79
- '(selectedChange)': 'toggle()',
80
- '[ayId]': 'tree.ayId',
81
- '[level]': 'data.level',
82
- '[expandable]': 'hasChildren()',
83
- '[expanded]': 'isOpen()',
84
52
  role: 'treeitem',
53
+ '[style]': 'padding()',
85
54
  '[attr.aria-expanded]': 'isOpen()',
86
55
  },
87
56
  }]
88
57
  }], ctorParameters: () => [] });
89
- function provideTreeNode(treeNode) {
58
+ function aliasTreeNode(treeNode) {
90
59
  return { provide: NgbTreeNode, useExisting: treeNode };
91
60
  }
92
61
 
@@ -274,22 +243,21 @@ class NgbTree {
274
243
  this.expanded = true;
275
244
  this.opened.set(new Set());
276
245
  }
277
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbTree, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
278
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.0", type: NgbTree, isStandalone: true, selector: "[ngbTree]", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: true, transformFunction: null }, children: { classPropertyName: "children", publicName: "children", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "tree" } }, queries: [{ propertyName: "treeNodeDef", first: true, predicate: NgbTreeNodeDef, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], exportAs: ["ngbTree"], hostDirectives: [{ directive: i1.AccessibleGroup }], ngImport: i0, template: `<ng-container #container />`, isInline: true }); }
246
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbTree, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
247
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.0.0", type: NgbTree, isStandalone: true, selector: "[ngbTree]", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: true, transformFunction: null }, children: { classPropertyName: "children", publicName: "children", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "tree" } }, queries: [{ propertyName: "treeNodeDef", first: true, predicate: NgbTreeNodeDef, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], exportAs: ["ngbTree"], hostDirectives: [{ directive: i1.AccessibleGroup }], ngImport: i0 }); }
279
248
  }
280
249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbTree, decorators: [{
281
- type: Component,
250
+ type: Directive,
282
251
  args: [{
283
252
  selector: '[ngbTree]',
284
253
  exportAs: 'ngbTree',
285
- template: `<ng-container #container />`,
286
254
  hostDirectives: [AccessibleGroup],
287
255
  host: {
288
256
  role: 'tree',
289
257
  },
290
258
  }]
291
259
  }], ctorParameters: () => [] });
292
- function provideTree(tree) {
260
+ function aliasTree(tree) {
293
261
  return { provide: NgbTree, useExisting: tree };
294
262
  }
295
263
 
@@ -297,5 +265,5 @@ function provideTree(tree) {
297
265
  * Generated bundle index. Do not edit.
298
266
  */
299
267
 
300
- export { NgbTree, NgbTreeNode, NgbTreeNodeContent, NgbTreeNodeDef, NgbTreeNodeToggle, provideTree, provideTreeNode };
268
+ export { NgbTree, NgbTreeNode, NgbTreeNodeContent, NgbTreeNodeDef, NgbTreeNodeToggle, aliasTree, aliasTreeNode };
301
269
  //# sourceMappingURL=ngbase-adk-tree.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngbase-adk-tree.mjs","sources":["../../../projects/adk/tree/tree-node.ts","../../../projects/adk/tree/tree-toggle.ts","../../../projects/adk/tree/tree.ts","../../../projects/adk/tree/ngbase-adk-tree.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n linkedSignal,\n signal,\n Type,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { AccessibleItem } from '@ngbase/adk/a11y';\nimport { injectDirectionality } from '@ngbase/adk/bidi';\nimport { NgbTree, TREE_NODE_DATA, TreeNodeData } from './tree';\nimport { NgbTreeNodeDef } from './tree-toggle';\n\n@Component({\n selector: '[ngbTreeNode]',\n exportAs: 'ngbTreeNode',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <style>\n .tree-node {\n display: flex;\n align-items: start;\n }\n </style>\n <div class=\"tree-node\">\n <ng-content />\n </div>\n <ng-content select=\"[ngbTreeNodeContent]\" />\n <ng-container #container />\n `,\n hostDirectives: [AccessibleItem],\n host: {\n '[style]': 'padding()',\n '(selectedChange)': 'toggle()',\n '[ayId]': 'tree.ayId',\n '[level]': 'data.level',\n '[expandable]': 'hasChildren()',\n '[expanded]': 'isOpen()',\n role: 'treeitem',\n '[attr.aria-expanded]': 'isOpen()',\n },\n})\nexport class NgbTreeNode<T> {\n readonly treeNodeDef = inject(NgbTreeNodeDef);\n readonly tree = inject<NgbTree<T>>(NgbTree);\n readonly data = inject<TreeNodeData<T>>(TREE_NODE_DATA);\n readonly container = viewChild('container', { read: ViewContainerRef });\n\n readonly isOpen = computed(() => this.tree.opened().has(this.data.details.id));\n readonly parent = computed(() => this.tree.getNode(this.data.details.parentId!));\n private readonly children = computed(() => {\n const _ = this.tree.dataSource();\n const when = this.tree.children();\n const v = when(this.data.data) || [];\n return v;\n });\n readonly hasChildren = computed(() => this.children().length > 0);\n readonly dir = injectDirectionality();\n readonly size = signal(32);\n readonly padding = computed(() => ({\n [this.dir.isRtl() ? 'paddingRight' : 'paddingLeft']: this.data.level * this.size() + 'px',\n }));\n\n constructor() {\n const a11yItem = inject(AccessibleItem);\n a11yItem._ayId.set(this.tree.ayId);\n a11yItem.level.set(this.data.level);\n a11yItem._expandable = linkedSignal(this.hasChildren);\n a11yItem._expanded = linkedSignal(this.isOpen);\n\n a11yItem.selectedChange.subscribe(() => {\n this.toggle();\n });\n }\n\n toggle() {\n if (this.hasChildren()) {\n this.tree.toggle(this.data.details);\n }\n }\n\n // keyboardEvent(key: 'ArrowRight' | 'ArrowLeft') {\n // // 1. if right arrow, open the node based on the isOpen\n // // 2. if left arrow, close the node based on the isOpen\n // // 3. if left arrow and isOpen, focus the previous sibling\n // // 4. if right arrow and isOpen, focus the next sibling\n\n // if (key === 'ArrowRight') {\n // if (this.isOpen()) {\n // // this.children()?.[0]?.focus();\n // } else {\n // this.toggle();\n // }\n // } else if (key === 'ArrowLeft') {\n // if (this.isOpen()) {\n // this.toggle();\n // } else {\n // // this.parent()?.focus();\n // }\n // }\n // }\n}\n\nexport function provideTreeNode<T>(treeNode: Type<NgbTreeNode<T>>) {\n return { provide: NgbTreeNode, useExisting: treeNode };\n}\n","import { Directive, inject } from '@angular/core';\nimport { NgbTreeNode } from './tree-node';\n\n@Directive({\n selector: '[ngbTreeNodeToggle]',\n host: {\n '(click)': 'toggle()',\n '[attr.aria-hidden]': '!treeNode.hasChildren()',\n tabIndex: '-1',\n },\n})\nexport class NgbTreeNodeToggle {\n treeNode = inject(NgbTreeNode);\n\n toggle() {\n if (this.treeNode.hasChildren()) {\n this.treeNode.toggle();\n }\n }\n}\n\n@Directive({\n selector: '[ngbTreeNodeDef]',\n})\nexport class NgbTreeNodeDef<T> {}\n\n@Directive({\n selector: '[ngbTreeNodeContent]',\n})\nexport class NgbTreeNodeContent {}\n","import {\n Component,\n EmbeddedViewRef,\n InjectionToken,\n Injector,\n IterableDiffers,\n TemplateRef,\n Type,\n ViewContainerRef,\n computed,\n contentChild,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { AccessibleGroup } from '@ngbase/adk/a11y';\nimport { uniqueId } from '@ngbase/adk/utils';\nimport { NgbTreeNodeDef } from './tree-toggle';\n\nexport const TREE_NODE_DATA = new InjectionToken<TreeNodeData<any>>('TREE_NODE_DATA');\n\nexport type TreeAction = 'add' | 'addAll' | 'delete' | 'deleteAll';\n\ninterface FlatNode {\n expandable: boolean;\n id: string;\n level: number;\n isExpanded?: boolean;\n parentId?: string;\n index: number;\n childrenCount: number;\n}\n\nclass TreeFlatNode<T> {\n data: FlatNode[] = [];\n readonly dataMap = new Map<string, T>();\n\n constructor(\n private children: (node: T) => T[],\n private id: (node: T) => any,\n ) {}\n\n setDataSource(data: T[], opened: Set<string>, expanded: boolean) {\n this.data = [];\n this.dataMap.clear();\n this.setChildren(data, 0, '0', opened, expanded);\n }\n\n private setChildren(\n list: T[],\n level: number,\n parentId: any,\n opened: Set<string>,\n expanded: boolean,\n ) {\n if (expanded) {\n opened.add(parentId);\n } else if (level !== 0 && !opened.has(parentId)) {\n return;\n }\n for (let index = 0; index < list.length; index++) {\n const node = list[index];\n const children = this.children(node);\n const childrenId = parentId + '-' + this.id(node);\n const value: FlatNode = {\n level,\n expandable: children.length > 0,\n parentId,\n id: childrenId,\n index,\n childrenCount: children.length,\n };\n this.dataMap.set(childrenId, node);\n this.data.push(value);\n if (children.length) {\n this.setChildren(children, level + 1, childrenId, opened, expanded);\n }\n }\n }\n}\n\nexport interface TreeNodeData<T> {\n level: number;\n details: FlatNode;\n data: T;\n}\n\nexport interface TreeNodeImplicit<T> {\n $implicit: T;\n level: number;\n}\n\n@Component({\n selector: '[ngbTree]',\n exportAs: 'ngbTree',\n template: `<ng-container #container />`,\n hostDirectives: [AccessibleGroup],\n host: {\n role: 'tree',\n },\n})\nexport class NgbTree<T> {\n // Dependencies\n private readonly injector = inject(Injector);\n private readonly differs = inject(IterableDiffers);\n readonly ayId = uniqueId();\n\n readonly treeNodeDef = contentChild.required(NgbTreeNodeDef, { read: TemplateRef });\n readonly container = viewChild.required('container', { read: ViewContainerRef });\n\n // Inputs\n readonly dataSource = input.required<T[]>();\n readonly trackBy = input.required<(index: number, item: T) => any>();\n readonly children = input.required<(node: T) => T[]>();\n\n readonly opened = signal(new Set<string>());\n readonly trace = new Map<\n string,\n { ref: EmbeddedViewRef<TreeNodeImplicit<T>>; parent: FlatNode }\n >();\n private readonly _dataDiffers = this.differs.find([]).create<FlatNode>((index, item) => item.id);\n private readonly flattener = computed(\n () => new TreeFlatNode(this.children(), node => this.trackBy()(0, node)),\n );\n private expanded = false;\n\n constructor() {\n inject(AccessibleGroup).ayId.set(this.ayId);\n effect(() => {\n const flattener = this.flattener();\n const data = this.dataSource();\n const opened = this.opened();\n flattener.setDataSource(data, opened, this.expanded);\n this.expanded = false;\n\n const changes = this._dataDiffers.diff(flattener.data);\n if (!changes) {\n return;\n }\n\n const container = this.container()!;\n const def = this.treeNodeDef();\n changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n if (item.previousIndex == null) {\n // Item added\n // const parent = this.flattener().tempData.get(item.item.parentId!);\n this.renderNode(item.item, container, def, item.item.level, currentIndex!);\n } else if (currentIndex == null) {\n // Item removed\n this.removeNode(item.item);\n } else {\n // Item moved\n const viewRef = this.trace.get(item.item.id)?.ref;\n if (viewRef) {\n container.move(viewRef, currentIndex);\n }\n }\n });\n\n // update the opened nodes\n changes.forEachIdentityChange(item => {\n const viewRef = this.trace.get(item.item.id)?.ref;\n if (viewRef) {\n viewRef.context.level = item.item.level;\n viewRef.context.$implicit = this.flattener().dataMap.get(item.item.id)!;\n }\n });\n });\n }\n\n private removeNode(data: FlatNode) {\n const ref = this.trace.get(data.id);\n if (ref) {\n ref.ref.destroy();\n this.trace.delete(data.id);\n }\n }\n\n getNode(id: string) {\n return this.flattener().dataMap.get(id);\n }\n\n private renderNode(\n details: FlatNode,\n container: ViewContainerRef,\n def: TemplateRef<any>,\n level = 0,\n index: number,\n ) {\n if (!this.trace.has(details.id)) {\n const data = this.flattener().dataMap.get(details.id)!;\n const value: TreeNodeData<T> = { level, details: details, data };\n const injector = Injector.create({\n providers: [{ provide: TREE_NODE_DATA, useValue: value }],\n parent: this.injector,\n });\n const ref = container.createEmbeddedView<TreeNodeImplicit<T>>(\n def,\n { $implicit: data, level },\n { injector, index },\n );\n this.trace.set(details.id, { ref, parent: details });\n ref.detectChanges();\n }\n }\n\n toggle(data: FlatNode) {\n const opened = this.opened();\n const type = opened.has(data.id) ? 'delete' : 'add';\n if (type === 'delete') {\n opened.delete(data.id);\n } else {\n opened.add(data.id);\n }\n this.opened.set(new Set(opened));\n }\n\n foldAll() {\n this.expanded = false;\n this.opened.set(new Set());\n }\n\n expandAll() {\n this.expanded = true;\n this.opened.set(new Set());\n }\n}\n\nexport function provideTree<T>(tree: Type<NgbTree<T>>) {\n return { provide: NgbTree, useExisting: tree };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names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,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,QAAQ,EAAE,CAA6B,2BAAA,CAAA;oBACvC,cAAc,EAAE,CAAC,eAAe,CAAC;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACb,qBAAA;AACF,iBAAA;;AAgIK,SAAU,WAAW,CAAI,IAAsB,EAAA;IACnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE;AAChD;;ACxOA;;AAEG;;;;"}
1
+ {"version":3,"file":"ngbase-adk-tree.mjs","sources":["../../../projects/adk/tree/tree-node.ts","../../../projects/adk/tree/tree-toggle.ts","../../../projects/adk/tree/tree.ts","../../../projects/adk/tree/ngbase-adk-tree.ts"],"sourcesContent":["import {\n computed,\n Directive,\n inject,\n linkedSignal,\n signal,\n Type,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { AccessibleItem } from '@ngbase/adk/a11y';\nimport { injectDirectionality } from '@ngbase/adk/bidi';\nimport { NgbTree, TREE_NODE_DATA, TreeNodeData } from './tree';\nimport { NgbTreeNodeDef } from './tree-toggle';\n\n@Directive({\n selector: '[ngbTreeNode]',\n exportAs: 'ngbTreeNode',\n hostDirectives: [AccessibleItem],\n host: {\n role: 'treeitem',\n '[style]': 'padding()',\n '[attr.aria-expanded]': 'isOpen()',\n },\n})\nexport class NgbTreeNode<T> {\n readonly treeNodeDef = inject(NgbTreeNodeDef);\n readonly tree = inject<NgbTree<T>>(NgbTree);\n readonly data = inject<TreeNodeData<T>>(TREE_NODE_DATA);\n readonly container = viewChild('container', { read: ViewContainerRef });\n\n readonly isOpen = computed(() => this.tree.opened().has(this.data.details.id));\n readonly parent = computed(() => this.tree.getNode(this.data.details.parentId!));\n private readonly children = computed(() => {\n const _ = this.tree.dataSource();\n const when = this.tree.children();\n const v = when(this.data.data) || [];\n return v;\n });\n readonly hasChildren = computed(() => this.children().length > 0);\n readonly dir = injectDirectionality();\n readonly size = signal(32);\n readonly padding = computed(() => ({\n [this.dir.isRtl() ? 'paddingRight' : 'paddingLeft']: this.data.level * this.size() + 'px',\n }));\n\n constructor() {\n const a11yItem = inject(AccessibleItem);\n a11yItem._ayId.set(this.tree.ayId);\n a11yItem.level.set(this.data.level);\n a11yItem._expandable = linkedSignal(this.hasChildren);\n a11yItem._expanded = linkedSignal(this.isOpen);\n\n a11yItem.selectedChange.subscribe(() => {\n this.toggle();\n });\n }\n\n toggle() {\n if (this.hasChildren()) {\n this.tree.toggle(this.data.details);\n }\n }\n\n // keyboardEvent(key: 'ArrowRight' | 'ArrowLeft') {\n // // 1. if right arrow, open the node based on the isOpen\n // // 2. if left arrow, close the node based on the isOpen\n // // 3. if left arrow and isOpen, focus the previous sibling\n // // 4. if right arrow and isOpen, focus the next sibling\n\n // if (key === 'ArrowRight') {\n // if (this.isOpen()) {\n // // this.children()?.[0]?.focus();\n // } else {\n // this.toggle();\n // }\n // } else if (key === 'ArrowLeft') {\n // if (this.isOpen()) {\n // this.toggle();\n // } else {\n // // this.parent()?.focus();\n // }\n // }\n // }\n}\n\nexport function aliasTreeNode<T>(treeNode: Type<NgbTreeNode<T>>) {\n return { provide: NgbTreeNode, useExisting: treeNode };\n}\n","import { Directive, inject } from '@angular/core';\nimport { NgbTreeNode } from './tree-node';\n\n@Directive({\n selector: '[ngbTreeNodeToggle]',\n host: {\n '(click)': 'toggle()',\n '[attr.aria-hidden]': '!treeNode.hasChildren()',\n tabIndex: '-1',\n },\n})\nexport class NgbTreeNodeToggle {\n treeNode = inject(NgbTreeNode);\n\n toggle() {\n if (this.treeNode.hasChildren()) {\n this.treeNode.toggle();\n }\n }\n}\n\n@Directive({\n selector: '[ngbTreeNodeDef]',\n})\nexport class NgbTreeNodeDef<T> {}\n\n@Directive({\n selector: '[ngbTreeNodeContent]',\n})\nexport class NgbTreeNodeContent {}\n","import {\n Directive,\n EmbeddedViewRef,\n InjectionToken,\n Injector,\n IterableDiffers,\n TemplateRef,\n Type,\n ViewContainerRef,\n computed,\n contentChild,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { AccessibleGroup } from '@ngbase/adk/a11y';\nimport { uniqueId } from '@ngbase/adk/utils';\nimport { NgbTreeNodeDef } from './tree-toggle';\n\nexport const TREE_NODE_DATA = new InjectionToken<TreeNodeData<any>>('TREE_NODE_DATA');\n\nexport type TreeAction = 'add' | 'addAll' | 'delete' | 'deleteAll';\n\ninterface FlatNode {\n expandable: boolean;\n id: string;\n level: number;\n isExpanded?: boolean;\n parentId?: string;\n index: number;\n childrenCount: number;\n}\n\nclass TreeFlatNode<T> {\n data: FlatNode[] = [];\n readonly dataMap = new Map<string, T>();\n\n constructor(\n private children: (node: T) => T[],\n private id: (node: T) => any,\n ) {}\n\n setDataSource(data: T[], opened: Set<string>, expanded: boolean) {\n this.data = [];\n this.dataMap.clear();\n this.setChildren(data, 0, '0', opened, expanded);\n }\n\n private setChildren(\n list: T[],\n level: number,\n parentId: any,\n opened: Set<string>,\n expanded: boolean,\n ) {\n if (expanded) {\n opened.add(parentId);\n } else if (level !== 0 && !opened.has(parentId)) {\n return;\n }\n for (let index = 0; index < list.length; index++) {\n const node = list[index];\n const children = this.children(node);\n const childrenId = parentId + '-' + this.id(node);\n const value: FlatNode = {\n level,\n expandable: children.length > 0,\n parentId,\n id: childrenId,\n index,\n childrenCount: children.length,\n };\n this.dataMap.set(childrenId, node);\n this.data.push(value);\n if (children.length) {\n this.setChildren(children, level + 1, childrenId, opened, expanded);\n }\n }\n }\n}\n\nexport interface TreeNodeData<T> {\n level: number;\n details: FlatNode;\n data: T;\n}\n\nexport interface TreeNodeImplicit<T> {\n $implicit: T;\n level: number;\n}\n\n@Directive({\n selector: '[ngbTree]',\n exportAs: 'ngbTree',\n hostDirectives: [AccessibleGroup],\n host: {\n role: 'tree',\n },\n})\nexport class NgbTree<T> {\n // Dependencies\n private readonly injector = inject(Injector);\n private readonly differs = inject(IterableDiffers);\n readonly ayId = uniqueId();\n\n readonly treeNodeDef = contentChild.required(NgbTreeNodeDef, { read: TemplateRef });\n readonly container = viewChild.required('container', { read: ViewContainerRef });\n\n // Inputs\n readonly dataSource = input.required<T[]>();\n readonly trackBy = input.required<(index: number, item: T) => any>();\n readonly children = input.required<(node: T) => T[]>();\n\n readonly opened = signal(new Set<string>());\n readonly trace = new Map<\n string,\n { ref: EmbeddedViewRef<TreeNodeImplicit<T>>; parent: FlatNode }\n >();\n private readonly _dataDiffers = this.differs.find([]).create<FlatNode>((index, item) => item.id);\n private readonly flattener = computed(\n () => new TreeFlatNode(this.children(), node => this.trackBy()(0, node)),\n );\n private expanded = false;\n\n constructor() {\n inject(AccessibleGroup).ayId.set(this.ayId);\n effect(() => {\n const flattener = this.flattener();\n const data = this.dataSource();\n const opened = this.opened();\n flattener.setDataSource(data, opened, this.expanded);\n this.expanded = false;\n\n const changes = this._dataDiffers.diff(flattener.data);\n if (!changes) {\n return;\n }\n\n const container = this.container()!;\n const def = this.treeNodeDef();\n changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n if (item.previousIndex == null) {\n // Item added\n // const parent = this.flattener().tempData.get(item.item.parentId!);\n this.renderNode(item.item, container, def, item.item.level, currentIndex!);\n } else if (currentIndex == null) {\n // Item removed\n this.removeNode(item.item);\n } else {\n // Item moved\n const viewRef = this.trace.get(item.item.id)?.ref;\n if (viewRef) {\n container.move(viewRef, currentIndex);\n }\n }\n });\n\n // update the opened nodes\n changes.forEachIdentityChange(item => {\n const viewRef = this.trace.get(item.item.id)?.ref;\n if (viewRef) {\n viewRef.context.level = item.item.level;\n viewRef.context.$implicit = this.flattener().dataMap.get(item.item.id)!;\n }\n });\n });\n }\n\n private removeNode(data: FlatNode) {\n const ref = this.trace.get(data.id);\n if (ref) {\n ref.ref.destroy();\n this.trace.delete(data.id);\n }\n }\n\n getNode(id: string) {\n return this.flattener().dataMap.get(id);\n }\n\n private renderNode(\n details: FlatNode,\n container: ViewContainerRef,\n def: TemplateRef<any>,\n level = 0,\n index: number,\n ) {\n if (!this.trace.has(details.id)) {\n const data = this.flattener().dataMap.get(details.id)!;\n const value: TreeNodeData<T> = { level, details: details, data };\n const injector = Injector.create({\n providers: [{ provide: TREE_NODE_DATA, useValue: value }],\n parent: this.injector,\n });\n const ref = container.createEmbeddedView<TreeNodeImplicit<T>>(\n def,\n { $implicit: data, level },\n { injector, index },\n );\n this.trace.set(details.id, { ref, parent: details });\n ref.detectChanges();\n }\n }\n\n toggle(data: FlatNode) {\n const opened = this.opened();\n const type = opened.has(data.id) ? 'delete' : 'add';\n if (type === 'delete') {\n opened.delete(data.id);\n } else {\n opened.add(data.id);\n }\n this.opened.set(new Set(opened));\n }\n\n foldAll() {\n this.expanded = false;\n this.opened.set(new Set());\n }\n\n expandAll() {\n this.expanded = true;\n this.opened.set(new Set());\n }\n}\n\nexport function aliasTree<T>(tree: Type<NgbTree<T>>) {\n return { provide: NgbTree, useExisting: tree };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAyBa,WAAW,CAAA;AAqBtB,IAAA,WAAA,GAAA;AApBS,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC;AACpC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAa,OAAO,CAAC;AAClC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAkB,cAAc,CAAC;QAC9C,IAAS,CAAA,SAAA,GAAG,SAAS,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;QAE9D,IAAM,CAAA,MAAA,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACrE,IAAM,CAAA,MAAA,GAAG,QAAQ,CAAC,MAAM,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,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,MAAA,EAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,aAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,cAAc,EAAU,WAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAW,gIACnB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,eAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAPlE,OAAO,EAAA,UAAA,EAAA,CAAA;kBARnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,SAAS;oBACnB,cAAc,EAAE,CAAC,eAAe,CAAC;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACb,qBAAA;AACF,iBAAA;;AAgIK,SAAU,SAAS,CAAI,IAAsB,EAAA;IACjD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE;AAChD;;ACvOA;;AAEG;;;;"}
@@ -3,4 +3,3 @@ export * from './form-field';
3
3
  export { InputBase } from './input';
4
4
  export * from './auto-height';
5
5
  export * from './label';
6
- export * from './otp';
@@ -1,6 +1,6 @@
1
1
  import { ElementRef } from '@angular/core';
2
2
  import { AccessibleItem } from '@ngbase/adk/a11y';
3
- import { DialogOptions } from '@ngbase/adk/portal';
3
+ import { PopoverOptions } from '@ngbase/adk/popover';
4
4
  import { Subject } from 'rxjs';
5
5
  import { NgbMenu } from './menu';
6
6
  import * as i0 from "@angular/core";
@@ -11,7 +11,7 @@ export declare class NgbMenuTrigger {
11
11
  readonly a11y: AccessibleItem<any> | null;
12
12
  readonly ngbMenuTrigger: import("@angular/core").InputSignal<NgbMenu>;
13
13
  readonly ngbMenuTriggerData: import("@angular/core").InputSignal<unknown>;
14
- readonly options: import("@angular/core").InputSignal<DialogOptions<any>>;
14
+ readonly options: import("@angular/core").InputSignal<Partial<PopoverOptions>>;
15
15
  private readonly _menuOpen;
16
16
  readonly menuOpen: import("@angular/core").Signal<boolean>;
17
17
  readonly events: Subject<{
package/menu/menu.d.ts CHANGED
@@ -2,19 +2,19 @@ import { OnDestroy, TemplateRef } from '@angular/core';
2
2
  import { AccessibleGroup } from '@ngbase/adk/a11y';
3
3
  import { Keys } from '@ngbase/adk/keys';
4
4
  import { NgbList } from '@ngbase/adk/list';
5
+ import { PopoverOptions } from '@ngbase/adk/popover';
5
6
  import { DialogRef } from '@ngbase/adk/portal';
6
7
  import { NgbOption } from '@ngbase/adk/select';
7
8
  import { BehaviorSubject, Subject } from 'rxjs';
8
9
  import { NgbMenuTrigger } from './menu-trigger';
9
- import { PopoverOptions } from '@ngbase/adk/popover';
10
10
  import * as i0 from "@angular/core";
11
11
  import * as i1 from "@ngbase/adk/a11y";
12
- export declare class MenuGroup {
12
+ export declare class NgpMenuGroup {
13
13
  readonly menu: NgbMenu;
14
14
  readonly allyGroup: AccessibleGroup;
15
15
  constructor();
16
- static ɵfac: i0.ɵɵFactoryDeclaration<MenuGroup, never>;
17
- static ɵdir: i0.ɵɵDirectiveDeclaration<MenuGroup, "[ngbMenuGroup]", never, {}, {}, never, never, true, [{ directive: typeof i1.AccessibleGroup; inputs: {}; outputs: {}; }]>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgpMenuGroup, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgpMenuGroup, "[ngbMenuGroup]", never, {}, {}, never, never, true, [{ directive: typeof i1.AccessibleGroup; inputs: {}; outputs: {}; }]>;
18
18
  }
19
19
  export declare class NgbMenu implements OnDestroy {
20
20
  readonly dir: import("@ngbase/adk/bidi").Directionality;
@@ -44,9 +44,9 @@ export declare class NgbMenu implements OnDestroy {
44
44
  close: () => void;
45
45
  ngOnDestroy(): void;
46
46
  static ɵfac: i0.ɵɵFactoryDeclaration<NgbMenu, never>;
47
- static ɵcmp: i0.ɵɵComponentDeclaration<NgbMenu, "[ngbMenu]", ["ngbMenu"], {}, { "selected": "selected"; }, ["options", "lists"], ["*"], true, never>;
47
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbMenu, "[ngbMenu]", ["ngbMenu"], {}, { "selected": "selected"; }, ["options", "lists"], never, true, never>;
48
48
  }
49
- export declare const provideMenu: (menu: typeof NgbMenu) => {
49
+ export declare const aliasMenu: (menu: typeof NgbMenu) => {
50
50
  provide: typeof NgbMenu;
51
51
  useExisting: typeof NgbMenu;
52
52
  };
package/otp/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ngbase/adk/otp" />
5
+ export * from './public-api';
@@ -38,7 +38,7 @@ export declare class NgbInputOtp implements ControlValueAccessor {
38
38
  static ɵfac: i0.ɵɵFactoryDeclaration<NgbInputOtp, never>;
39
39
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgbInputOtp, "[ngbInputOtp]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "masked": { "alias": "masked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
40
40
  }
41
- export declare function provideInputOtp(otp: typeof NgbInputOtp): ({
41
+ export declare function aliasInputOtp(otp: typeof NgbInputOtp): ({
42
42
  provide: import("@angular/core").InjectionToken<readonly import("@angular/forms").ControlValueAccessor[]>;
43
43
  useExisting: import("@angular/core").Type<any>;
44
44
  multi: boolean;
@@ -0,0 +1 @@
1
+ export * from './otp';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngbase/adk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/ng-base/ngbase.git"
@@ -40,10 +40,6 @@
40
40
  "types": "./accordion/index.d.ts",
41
41
  "default": "./fesm2022/ngbase-adk-accordion.mjs"
42
42
  },
43
- "./avatar": {
44
- "types": "./avatar/index.d.ts",
45
- "default": "./fesm2022/ngbase-adk-avatar.mjs"
46
- },
47
43
  "./autocomplete": {
48
44
  "types": "./autocomplete/index.d.ts",
49
45
  "default": "./fesm2022/ngbase-adk-autocomplete.mjs"
@@ -52,6 +48,10 @@
52
48
  "types": "./bidi/index.d.ts",
53
49
  "default": "./fesm2022/ngbase-adk-bidi.mjs"
54
50
  },
51
+ "./avatar": {
52
+ "types": "./avatar/index.d.ts",
53
+ "default": "./fesm2022/ngbase-adk-avatar.mjs"
54
+ },
55
55
  "./breadcrumb": {
56
56
  "types": "./breadcrumb/index.d.ts",
57
57
  "default": "./fesm2022/ngbase-adk-breadcrumb.mjs"
@@ -100,14 +100,14 @@
100
100
  "types": "./drag/index.d.ts",
101
101
  "default": "./fesm2022/ngbase-adk-drag.mjs"
102
102
  },
103
- "./hover-card": {
104
- "types": "./hover-card/index.d.ts",
105
- "default": "./fesm2022/ngbase-adk-hover-card.mjs"
106
- },
107
103
  "./form-field": {
108
104
  "types": "./form-field/index.d.ts",
109
105
  "default": "./fesm2022/ngbase-adk-form-field.mjs"
110
106
  },
107
+ "./hover-card": {
108
+ "types": "./hover-card/index.d.ts",
109
+ "default": "./fesm2022/ngbase-adk-hover-card.mjs"
110
+ },
111
111
  "./icon": {
112
112
  "types": "./icon/index.d.ts",
113
113
  "default": "./fesm2022/ngbase-adk-icon.mjs"
@@ -144,6 +144,10 @@
144
144
  "types": "./network/index.d.ts",
145
145
  "default": "./fesm2022/ngbase-adk-network.mjs"
146
146
  },
147
+ "./otp": {
148
+ "types": "./otp/index.d.ts",
149
+ "default": "./fesm2022/ngbase-adk-otp.mjs"
150
+ },
147
151
  "./pagination": {
148
152
  "types": "./pagination/index.d.ts",
149
153
  "default": "./fesm2022/ngbase-adk-pagination.mjs"
@@ -180,6 +184,10 @@
180
184
  "types": "./selectable/index.d.ts",
181
185
  "default": "./fesm2022/ngbase-adk-selectable.mjs"
182
186
  },
187
+ "./sheet": {
188
+ "types": "./sheet/index.d.ts",
189
+ "default": "./fesm2022/ngbase-adk-sheet.mjs"
190
+ },
183
191
  "./sidenav": {
184
192
  "types": "./sidenav/index.d.ts",
185
193
  "default": "./fesm2022/ngbase-adk-sidenav.mjs"
@@ -204,14 +212,14 @@
204
212
  "types": "./table/index.d.ts",
205
213
  "default": "./fesm2022/ngbase-adk-table.mjs"
206
214
  },
207
- "./test": {
208
- "types": "./test/index.d.ts",
209
- "default": "./fesm2022/ngbase-adk-test.mjs"
210
- },
211
215
  "./tabs": {
212
216
  "types": "./tabs/index.d.ts",
213
217
  "default": "./fesm2022/ngbase-adk-tabs.mjs"
214
218
  },
219
+ "./test": {
220
+ "types": "./test/index.d.ts",
221
+ "default": "./fesm2022/ngbase-adk-test.mjs"
222
+ },
215
223
  "./toggle": {
216
224
  "types": "./toggle/index.d.ts",
217
225
  "default": "./fesm2022/ngbase-adk-toggle.mjs"
@@ -228,14 +236,14 @@
228
236
  "types": "./tour/index.d.ts",
229
237
  "default": "./fesm2022/ngbase-adk-tour.mjs"
230
238
  },
231
- "./tree": {
232
- "types": "./tree/index.d.ts",
233
- "default": "./fesm2022/ngbase-adk-tree.mjs"
234
- },
235
239
  "./translate": {
236
240
  "types": "./translate/index.d.ts",
237
241
  "default": "./fesm2022/ngbase-adk-translate.mjs"
238
242
  },
243
+ "./tree": {
244
+ "types": "./tree/index.d.ts",
245
+ "default": "./fesm2022/ngbase-adk-tree.mjs"
246
+ },
239
247
  "./utils": {
240
248
  "types": "./utils/index.d.ts",
241
249
  "default": "./fesm2022/ngbase-adk-utils.mjs"
@@ -24,5 +24,9 @@ export declare class NgbPagination {
24
24
  jump(by: number): void;
25
25
  sizeChanged(size: number): void;
26
26
  static ɵfac: i0.ɵɵFactoryDeclaration<NgbPagination, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<NgbPagination, "[ngbPagination]", never, { "total": { "alias": "total"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": true; "isSignal": true; }; "sizeOptions": { "alias": "sizeOptions"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": true; "isSignal": true; }; }, { "size": "sizeChange"; "active": "activeChange"; "valueChanged": "valueChanged"; }, never, never, true, never>;
27
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPagination, "[ngbPagination]", never, { "total": { "alias": "total"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": true; "isSignal": true; }; "sizeOptions": { "alias": "sizeOptions"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": true; "isSignal": true; }; }, { "size": "sizeChange"; "active": "activeChange"; "valueChanged": "valueChanged"; }, never, never, true, never>;
28
28
  }
29
+ export declare function aliasPagination(pagination: typeof NgbPagination): {
30
+ provide: typeof NgbPagination;
31
+ useExisting: typeof NgbPagination;
32
+ };
@@ -0,0 +1,34 @@
1
+ import { ElementRef, WritableSignal } from '@angular/core';
2
+ import { InjectionToken } from '@angular/core';
3
+ import { PopoverPosition } from './popover.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class PopoverArrowTracker {
6
+ top?: number | undefined;
7
+ left?: number | undefined;
8
+ right?: number | undefined;
9
+ bottom?: number | undefined;
10
+ target?: HTMLElement;
11
+ position?: PopoverPosition;
12
+ }
13
+ export declare const POPOVER_ARROW_TRACKER: InjectionToken<{
14
+ values: WritableSignal<PopoverArrowTracker>;
15
+ }>;
16
+ export declare function providePopoverArrowTracker(): {
17
+ provide: InjectionToken<{
18
+ values: WritableSignal<PopoverArrowTracker>;
19
+ }>;
20
+ useFactory: () => {
21
+ values: WritableSignal<PopoverArrowTracker>;
22
+ };
23
+ };
24
+ export declare class NgbPopoverArrow {
25
+ readonly arrowTracker: {
26
+ values: WritableSignal<PopoverArrowTracker>;
27
+ };
28
+ readonly anchor: import("@angular/core").InputSignal<boolean>;
29
+ readonly el: ElementRef<any>;
30
+ readonly styles: import("@angular/core").Signal<{}>;
31
+ private updateAnchorPosition;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgbPopoverArrow, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgbPopoverArrow, "[ngbPopoverArrow]", never, { "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
34
+ }
@@ -19,6 +19,9 @@ export declare class NgbPopoverMain {
19
19
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPopoverMain, "[ngbPopoverMain]", never, {}, {}, never, never, true, never>;
20
20
  }
21
21
  export declare class NgbPopover extends BaseDialog {
22
+ readonly arrowTracker: {
23
+ values: import("@angular/core").WritableSignal<import("@ngbase/adk/popover").PopoverArrowTracker>;
24
+ };
22
25
  private readonly disposals;
23
26
  readonly myDialog: import("@angular/core").Signal<ViewContainerRef>;
24
27
  readonly container: import("@angular/core").Signal<ElementRef<HTMLElement>>;
@@ -35,7 +38,6 @@ export declare class NgbPopover extends BaseDialog {
35
38
  private scheduleUpdateDimension;
36
39
  private schedulePopoverUpdate;
37
40
  private updateDimension;
38
- private updateAnchorPosition;
39
41
  setOptions(options: PopoverOptions): void;
40
42
  static ɵfac: i0.ɵɵFactoryDeclaration<NgbPopover, never>;
41
43
  static ɵcmp: i0.ɵɵComponentDeclaration<NgbPopover, "ngb-popover", never, {}, {}, never, never, true, never>;
@@ -44,7 +46,14 @@ export declare class NgbPopoverClose {
44
46
  static ɵfac: i0.ɵɵFactoryDeclaration<NgbPopoverClose, never>;
45
47
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPopoverClose, "[ngbPopoverClose]", never, {}, {}, never, never, true, [{ directive: typeof i2.NgbPortalClose; inputs: { "ngbPortalClose": "ngbPopoverClose"; }; outputs: {}; }]>;
46
48
  }
47
- export declare function providePopover(popover: typeof NgbPopover): {
49
+ export declare function aliasPopover(popover: typeof NgbPopover): ({
50
+ provide: import("@angular/core").InjectionToken<{
51
+ values: import("@angular/core").WritableSignal<import("@ngbase/adk/popover").PopoverArrowTracker>;
52
+ }>;
53
+ useFactory: () => {
54
+ values: import("@angular/core").WritableSignal<import("@ngbase/adk/popover").PopoverArrowTracker>;
55
+ };
56
+ } | {
48
57
  provide: typeof NgbPopover;
49
58
  useExisting: typeof NgbPopover;
50
- };
59
+ })[];
@@ -2,8 +2,9 @@ import { InjectionToken, Signal, Type, WritableSignal } from '@angular/core';
2
2
  import { DialogInput, DialogOptions, DialogRef } from '@ngbase/adk/portal';
3
3
  import { Observable } from 'rxjs';
4
4
  import { NgbPopover } from './popover';
5
- export type PopoverPosition = 'top' | 'bottom' | 'left' | 'right' | 'tl' | 'tr' | 'bl' | 'br';
6
- export declare class PopoverOptions extends DialogOptions {
5
+ import { OverlayPosition, PopoverUtilConfig } from './utils';
6
+ export type PopoverPosition = OverlayPosition;
7
+ export declare class PopoverOptions extends DialogOptions implements PopoverUtilConfig {
7
8
  target: HTMLElement;
8
9
  el?: HTMLElement;
9
10
  position?: PopoverPosition;
@@ -36,7 +37,7 @@ export declare function ngbPopoverPortal(): {
36
37
  open: <T>(component: DialogInput<T>, options: PopoverOptions) => PopoverOpen<T>;
37
38
  closeAll: () => void;
38
39
  };
39
- export declare const registerNgbPopover: (popover: Type<NgbPopover>) => {
40
+ export declare const registerNgbPopover: (popover: typeof NgbPopover) => {
40
41
  provide: InjectionToken<Type<NgbPopover>>;
41
- useValue: Type<NgbPopover>;
42
+ useValue: typeof NgbPopover;
42
43
  };
@@ -2,4 +2,5 @@ export * from './popover.service';
2
2
  export * from './popover';
3
3
  export * from './popover-trigger';
4
4
  export * from './base-popover.service';
5
+ export * from './popover-arrow.ng';
5
6
  export { tooltipPosition } from './utils';