@ngbase/adk 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/accessibility-group.d.ts +2 -5
- package/accordion/accordion-item.d.ts +7 -1
- package/accordion/public-api.d.ts +1 -1
- package/autocomplete/autocomplete-input.d.ts +2 -4
- package/autocomplete/autocomplete.d.ts +13 -4
- package/avatar/avatar.d.ts +1 -1
- package/breadcrumb/breadcrumb.d.ts +2 -3
- package/breadcrumb/public-api.d.ts +1 -1
- package/carousel/carousel.d.ts +3 -3
- package/checkbox/checkbox.d.ts +11 -3
- package/checkbox/public-api.d.ts +1 -1
- package/chip/chip.d.ts +2 -2
- package/datepicker/calendar.d.ts +3 -3
- package/datepicker/datepicker-trigger.d.ts +22 -5
- package/datepicker/datepicker.d.ts +4 -3
- package/datepicker/time.d.ts +2 -2
- package/dialog/dialog.d.ts +1 -1
- package/drag/drag.d.ts +1 -2
- package/fesm2022/ngbase-adk-a11y.mjs +29 -26
- package/fesm2022/ngbase-adk-a11y.mjs.map +1 -1
- package/fesm2022/ngbase-adk-accordion.mjs +16 -3
- package/fesm2022/ngbase-adk-accordion.mjs.map +1 -1
- package/fesm2022/ngbase-adk-autocomplete.mjs +23 -52
- package/fesm2022/ngbase-adk-autocomplete.mjs.map +1 -1
- package/fesm2022/ngbase-adk-avatar.mjs +2 -2
- package/fesm2022/ngbase-adk-avatar.mjs.map +1 -1
- package/fesm2022/ngbase-adk-breadcrumb.mjs +2 -2
- package/fesm2022/ngbase-adk-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngbase-adk-carousel.mjs +7 -7
- package/fesm2022/ngbase-adk-carousel.mjs.map +1 -1
- package/fesm2022/ngbase-adk-checkbox.mjs +8 -6
- package/fesm2022/ngbase-adk-checkbox.mjs.map +1 -1
- package/fesm2022/ngbase-adk-chip.mjs +4 -2
- package/fesm2022/ngbase-adk-chip.mjs.map +1 -1
- package/fesm2022/ngbase-adk-datepicker.mjs +187 -350
- package/fesm2022/ngbase-adk-datepicker.mjs.map +1 -1
- package/fesm2022/ngbase-adk-dialog.mjs +14 -15
- package/fesm2022/ngbase-adk-dialog.mjs.map +1 -1
- package/fesm2022/ngbase-adk-drag.mjs +1 -2
- package/fesm2022/ngbase-adk-drag.mjs.map +1 -1
- package/fesm2022/ngbase-adk-form-field.mjs +2 -156
- package/fesm2022/ngbase-adk-form-field.mjs.map +1 -1
- package/fesm2022/ngbase-adk-list.mjs +2 -2
- package/fesm2022/ngbase-adk-list.mjs.map +1 -1
- package/fesm2022/ngbase-adk-mask.mjs +5 -3
- package/fesm2022/ngbase-adk-mask.mjs.map +1 -1
- package/fesm2022/ngbase-adk-menu.mjs +34 -34
- package/fesm2022/ngbase-adk-menu.mjs.map +1 -1
- package/fesm2022/ngbase-adk-otp.mjs +164 -0
- package/fesm2022/ngbase-adk-otp.mjs.map +1 -0
- package/fesm2022/ngbase-adk-pagination.mjs +10 -67
- package/fesm2022/ngbase-adk-pagination.mjs.map +1 -1
- package/fesm2022/ngbase-adk-popover.mjs +434 -556
- package/fesm2022/ngbase-adk-popover.mjs.map +1 -1
- package/fesm2022/ngbase-adk-portal.mjs +5 -10
- package/fesm2022/ngbase-adk-portal.mjs.map +1 -1
- package/fesm2022/ngbase-adk-radio.mjs +8 -19
- package/fesm2022/ngbase-adk-radio.mjs.map +1 -1
- package/fesm2022/ngbase-adk-resizable.mjs +10 -43
- package/fesm2022/ngbase-adk-resizable.mjs.map +1 -1
- package/fesm2022/ngbase-adk-select.mjs +87 -185
- package/fesm2022/ngbase-adk-select.mjs.map +1 -1
- package/fesm2022/ngbase-adk-sheet.mjs +95 -0
- package/fesm2022/ngbase-adk-sheet.mjs.map +1 -0
- package/fesm2022/ngbase-adk-sidenav.mjs +2 -2
- package/fesm2022/ngbase-adk-sidenav.mjs.map +1 -1
- package/fesm2022/ngbase-adk-slider.mjs +12 -23
- package/fesm2022/ngbase-adk-slider.mjs.map +1 -1
- package/fesm2022/ngbase-adk-sonner.mjs +13 -63
- package/fesm2022/ngbase-adk-sonner.mjs.map +1 -1
- package/fesm2022/ngbase-adk-stepper.mjs +16 -114
- package/fesm2022/ngbase-adk-stepper.mjs.map +1 -1
- package/fesm2022/ngbase-adk-switch.mjs +2 -2
- package/fesm2022/ngbase-adk-switch.mjs.map +1 -1
- package/fesm2022/ngbase-adk-table.mjs +17 -35
- package/fesm2022/ngbase-adk-table.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tabs.mjs +14 -94
- package/fesm2022/ngbase-adk-tabs.mjs.map +1 -1
- package/fesm2022/ngbase-adk-test.mjs +11 -1
- package/fesm2022/ngbase-adk-test.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tooltip.mjs +49 -39
- package/fesm2022/ngbase-adk-tooltip.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tour.mjs +3 -3
- package/fesm2022/ngbase-adk-tour.mjs.map +1 -1
- package/fesm2022/ngbase-adk-tree.mjs +11 -43
- package/fesm2022/ngbase-adk-tree.mjs.map +1 -1
- package/fesm2022/ngbase-adk-utils.mjs +12 -9
- package/fesm2022/ngbase-adk-utils.mjs.map +1 -1
- package/form-field/public-api.d.ts +0 -1
- package/mask/mask.d.ts +1 -2
- package/menu/menu-trigger.d.ts +3 -3
- package/menu/menu.d.ts +13 -7
- package/otp/index.d.ts +5 -0
- package/{form-field → otp}/otp.d.ts +1 -1
- package/otp/public-api.d.ts +1 -0
- package/package.json +27 -19
- package/pagination/pagination.d.ts +7 -3
- package/popover/base-popover.service.d.ts +1 -1
- package/popover/popover-arrow.ng.d.ts +34 -0
- package/popover/popover.d.ts +17 -7
- package/popover/popover.service.d.ts +5 -4
- package/popover/public-api.d.ts +1 -0
- package/popover/utils.d.ts +32 -48
- package/portal/dialog-ref.d.ts +0 -1
- package/portal/portal-base.service.d.ts +3 -3
- package/portal/portal-close.directive.d.ts +3 -2
- package/radio/radio.d.ts +5 -1
- package/resizable/resizable-group.d.ts +2 -2
- package/resizable/resizable.d.ts +2 -2
- package/select/option-group.d.ts +3 -3
- package/select/option.d.ts +1 -1
- package/select/select-base.d.ts +8 -6
- package/select/select.d.ts +6 -3
- package/sheet/index.d.ts +5 -0
- package/sheet/public-api.d.ts +2 -0
- package/sheet/sheet.d.ts +26 -0
- package/sheet/sheet.service.d.ts +13 -0
- package/sidenav/public-api.d.ts +1 -1
- package/sidenav/sidenav.d.ts +1 -1
- package/slider/public-api.d.ts +1 -1
- package/slider/slider.d.ts +6 -5
- package/sonner/sonner.d.ts +2 -1
- package/stepper/animation.d.ts +1 -1
- package/stepper/step.d.ts +1 -1
- package/stepper/stepper.d.ts +2 -2
- package/switch/switch.d.ts +1 -1
- package/table/body-row.d.ts +3 -3
- package/table/head-row.d.ts +3 -3
- package/table/table.d.ts +3 -3
- package/tabs/tab-group.d.ts +4 -4
- package/tabs/tab.d.ts +2 -2
- package/test/utils.d.ts +19 -3
- package/tooltip/public-api.d.ts +1 -1
- package/tooltip/tooltip.d.ts +5 -1
- package/tooltip/tooltip.directive.d.ts +1 -1
- package/tooltip/tooltip.service.d.ts +4 -2
- package/tour/tour.service.d.ts +3 -4
- package/tree/public-api.d.ts +2 -2
- package/tree/tree-node.d.ts +2 -2
- package/tree/tree.d.ts +2 -2
- package/utils/utils.d.ts +5 -4
- package/schematics/collection.json +0 -15
- package/schematics/components/files/accordion/accordion.ts.template +0 -55
- package/schematics/components/files/accordion/index.ts.template +0 -5
- package/schematics/components/files/alert/alert.ts.template +0 -62
- package/schematics/components/files/alert/index.ts.template +0 -1
- package/schematics/components/files/autocomplete/autocomplete.ts.template +0 -48
- package/schematics/components/files/autocomplete/index.ts.template +0 -5
- package/schematics/components/files/avatar/avatar.ts.template +0 -31
- package/schematics/components/files/avatar/index.ts.template +0 -1
- package/schematics/components/files/badge/badge.ts.template +0 -11
- package/schematics/components/files/badge/index.ts.template +0 -1
- package/schematics/components/files/breadcrumb/breadcrumb.ts.template +0 -49
- package/schematics/components/files/breadcrumb/index.ts.template +0 -1
- package/schematics/components/files/button/button.ts.template +0 -29
- package/schematics/components/files/button/index.ts.template +0 -5
- package/schematics/components/files/card/card.ts.template +0 -11
- package/schematics/components/files/card/index.ts.template +0 -5
- package/schematics/components/files/carousel/carousel.ts.template +0 -44
- package/schematics/components/files/carousel/index.ts.template +0 -1
- package/schematics/components/files/checkbox/checkbox.ts.template +0 -46
- package/schematics/components/files/checkbox/focus-style.directive.ts.template +0 -12
- package/schematics/components/files/checkbox/index.ts.template +0 -6
- package/schematics/components/files/chip/chip.ts.template +0 -36
- package/schematics/components/files/chip/index.ts.template +0 -1
- package/schematics/components/files/color-picker/color-picker.ts.template +0 -104
- package/schematics/components/files/color-picker/index.ts.template +0 -5
- package/schematics/components/files/command/command.ts.template +0 -82
- package/schematics/components/files/command/index.ts.template +0 -1
- package/schematics/components/files/datepicker/calendar.ts.template +0 -117
- package/schematics/components/files/datepicker/datepicker-trigger.ts.template +0 -27
- package/schematics/components/files/datepicker/datepicker.ts.template +0 -28
- package/schematics/components/files/datepicker/index.ts.template +0 -3
- package/schematics/components/files/datepicker/time.ts.template +0 -46
- package/schematics/components/files/dialog/dialog.ts.template +0 -89
- package/schematics/components/files/dialog/index.ts.template +0 -5
- package/schematics/components/files/drawer/drawer.ts.template +0 -104
- package/schematics/components/files/drawer/index.ts.template +0 -5
- package/schematics/components/files/form-field/index.ts.template +0 -7
- package/schematics/components/files/form-field/input-style.directive.ts.template +0 -11
- package/schematics/components/files/form-field/input.ts.template +0 -100
- package/schematics/components/files/form-field/otp.ts.template +0 -37
- package/schematics/components/files/hover-card/hover-card.ts.template +0 -13
- package/schematics/components/files/hover-card/index.ts.template +0 -5
- package/schematics/components/files/icon/icon.ts.template +0 -16
- package/schematics/components/files/icon/index.ts.template +0 -1
- package/schematics/components/files/inline-edit/index.ts.template +0 -1
- package/schematics/components/files/inline-edit/inline-edit.ts.template +0 -24
- package/schematics/components/files/keys/index.ts.template +0 -5
- package/schematics/components/files/keys/key.ts.template +0 -35
- package/schematics/components/files/list/index.ts.template +0 -5
- package/schematics/components/files/list/list.ts.template +0 -28
- package/schematics/components/files/mask/index.ts.template +0 -1
- package/schematics/components/files/mask/mask.ts.template +0 -8
- package/schematics/components/files/menu/context-menu.ts.template +0 -14
- package/schematics/components/files/menu/index.ts.template +0 -8
- package/schematics/components/files/menu/mention.ts.template +0 -14
- package/schematics/components/files/menu/menu.ts.template +0 -37
- package/schematics/components/files/menu/navigation-menu.ts.template +0 -8
- package/schematics/components/files/pagination/index.ts.template +0 -1
- package/schematics/components/files/pagination/pagination.ts.template +0 -71
- package/schematics/components/files/picasa/index.ts.template +0 -1
- package/schematics/components/files/picasa/picasa-base.component.ts.template +0 -80
- package/schematics/components/files/picasa/picasa.component.ts.template +0 -57
- package/schematics/components/files/picasa/picasa.directive.ts.template +0 -41
- package/schematics/components/files/picasa/picase.service.ts.template +0 -24
- package/schematics/components/files/popover/index.ts.template +0 -1
- package/schematics/components/files/popover/popover.ts.template +0 -87
- package/schematics/components/files/progress/index.ts.template +0 -5
- package/schematics/components/files/progress/progress.ts.template +0 -14
- package/schematics/components/files/radio/index.ts.template +0 -5
- package/schematics/components/files/radio/radio.ts.template +0 -40
- package/schematics/components/files/resizable/index.ts.template +0 -5
- package/schematics/components/files/resizable/resizable.ts.template +0 -56
- package/schematics/components/files/scroll-area/index.ts.template +0 -1
- package/schematics/components/files/scroll-area/scroll-area.ts.template +0 -40
- package/schematics/components/files/select/index.ts.template +0 -8
- package/schematics/components/files/select/list-selection.ts.template +0 -15
- package/schematics/components/files/select/option.ts.template +0 -34
- package/schematics/components/files/select/select-input.ts.template +0 -21
- package/schematics/components/files/select/select.ts.template +0 -96
- package/schematics/components/files/selectable/index.ts.template +0 -1
- package/schematics/components/files/selectable/selectable.ts.template +0 -34
- package/schematics/components/files/separator/index.ts.template +0 -5
- package/schematics/components/files/separator/separator.ts.template +0 -19
- package/schematics/components/files/sheet/index.ts.template +0 -5
- package/schematics/components/files/sheet/sheet.ts.template +0 -134
- package/schematics/components/files/sidenav/index.ts.template +0 -1
- package/schematics/components/files/sidenav/sidenav.ts.template +0 -48
- package/schematics/components/files/skeleton/index.ts.template +0 -1
- package/schematics/components/files/skeleton/skeleton.ts.template +0 -15
- package/schematics/components/files/slider/index.ts.template +0 -5
- package/schematics/components/files/slider/slider.ts.template +0 -42
- package/schematics/components/files/sonner/index.ts.template +0 -5
- package/schematics/components/files/sonner/sonner.ts.template +0 -58
- package/schematics/components/files/spinner/index.ts.template +0 -1
- package/schematics/components/files/spinner/spinner.ts.template +0 -79
- package/schematics/components/files/stepper/index.ts.template +0 -1
- package/schematics/components/files/stepper/stepper.ts.template +0 -88
- package/schematics/components/files/switch/index.ts.template +0 -5
- package/schematics/components/files/switch/switch.ts.template +0 -29
- package/schematics/components/files/table/body-cell.ts.template +0 -19
- package/schematics/components/files/table/body-row.ts.template +0 -21
- package/schematics/components/files/table/column.ts.template +0 -8
- package/schematics/components/files/table/head-cell.ts.template +0 -19
- package/schematics/components/files/table/head-row.ts.template +0 -27
- package/schematics/components/files/table/index.ts.template +0 -26
- package/schematics/components/files/table/table.ts.template +0 -20
- package/schematics/components/files/tabs/index.ts.template +0 -5
- package/schematics/components/files/tabs/tab.ts.template +0 -89
- package/schematics/components/files/theme/index.ts.template +0 -2
- package/schematics/components/files/theme/theme-button.component.ts.template +0 -26
- package/schematics/components/files/theme/theme.component.ts.template +0 -165
- package/schematics/components/files/theme/theme.service.ts.template +0 -44
- package/schematics/components/files/toggle/index.ts.template +0 -5
- package/schematics/components/files/toggle/toggle.ts.template +0 -13
- package/schematics/components/files/toggle-group/index.ts.template +0 -5
- package/schematics/components/files/toggle-group/toggle-group.ts.template +0 -25
- package/schematics/components/files/tooltip/index.ts.template +0 -5
- package/schematics/components/files/tooltip/tooltip.ts.template +0 -40
- package/schematics/components/files/tour/index.ts.template +0 -3
- package/schematics/components/files/tour/tour-step.ts.template +0 -8
- package/schematics/components/files/tour/tour.service.ts.template +0 -7
- package/schematics/components/files/tour/tour.ts.template +0 -8
- package/schematics/components/files/tree/index.ts.template +0 -1
- package/schematics/components/files/tree/tree.ts.template +0 -66
- package/schematics/components/index.d.ts +0 -3
- package/schematics/components/index.js +0 -17
- package/schematics/components/index.js.map +0 -1
- package/schematics/components/index.ts +0 -29
- package/schematics/components/schema.d.ts +0 -6
- package/schematics/components/schema.js +0 -3
- package/schematics/components/schema.js.map +0 -1
- package/schematics/components/schema.json +0 -137
- package/schematics/components/schema.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngbase-adk-breadcrumb.mjs","sources":["../../../projects/adk/breadcrumb/breadcrumb.ts","../../../projects/adk/breadcrumb/breadcrumbs.ts","../../../projects/adk/breadcrumb/breadcrumb-link.ts","../../../projects/adk/breadcrumb/breadcrumb-separator.ts","../../../projects/adk/breadcrumb/ngbase-adk-breadcrumb.ts"],"sourcesContent":["import { computed, Directive, inject
|
|
1
|
+
{"version":3,"file":"ngbase-adk-breadcrumb.mjs","sources":["../../../projects/adk/breadcrumb/breadcrumb.ts","../../../projects/adk/breadcrumb/breadcrumbs.ts","../../../projects/adk/breadcrumb/breadcrumb-link.ts","../../../projects/adk/breadcrumb/breadcrumb-separator.ts","../../../projects/adk/breadcrumb/ngbase-adk-breadcrumb.ts"],"sourcesContent":["import { computed, Directive, inject } from '@angular/core';\nimport { NgbBreadcrumbs } from './breadcrumbs';\n\n@Directive({\n selector: '[ngbBreadcrumb]',\n host: {\n '[attr.aria-current]': \"active() ? 'page' : null\",\n '[attr.aria-disabled]': 'active()',\n role: 'link',\n },\n})\nexport class NgbBreadcrumb {\n private breadcrumbs = inject(NgbBreadcrumbs);\n readonly active = computed(() => {\n const items = this.breadcrumbs.items();\n return items.indexOf(this) === items.length - 1;\n });\n}\n\nexport function aliasBreadcrumb(breadcrumb: typeof NgbBreadcrumb) {\n return { provide: NgbBreadcrumb, useExisting: breadcrumb };\n}\n","import { contentChildren, Directive } from '@angular/core';\nimport { NgbBreadcrumb } from './breadcrumb';\n\n@Directive({\n selector: '[ngbBreadcrumbs]',\n host: {\n 'aria-label': 'breadcrumb',\n },\n})\nexport class NgbBreadcrumbs {\n readonly items = contentChildren(NgbBreadcrumb);\n}\n","import { Directive, inject } from '@angular/core';\nimport { NgbBreadcrumb } from './public-api';\n\n@Directive({\n selector: '[ngbBreadcrumbLink]',\n host: {\n '[tabIndex]': 'breadcrumb.active() ? -1 : 0',\n '[attr.aria-current]': \"breadcrumb.active() ? 'page' : null\",\n '[attr.aria-disabled]': 'breadcrumb.active() || null',\n role: 'link',\n },\n})\nexport class NgbBreadcrumbLink {\n readonly breadcrumb = inject(NgbBreadcrumb);\n}\n","import { Directive } from '@angular/core';\nimport { injectDirectionality } from '@ngbase/adk/bidi';\n\n@Directive({\n selector: '[ngbBreadcrumbSeparatorAria]',\n host: {\n tabindex: '-1',\n 'aria-hidden': 'true',\n role: 'presentation',\n '[style.transform]': 'dir.isRtl() ? \"rotate(180deg)\" : \"\"',\n },\n})\nexport class NgbBreadcrumbSeparatorAria {\n readonly dir = injectDirectionality();\n}\n\n@Directive({\n selector: '[ngbBreadcrumbsSeparator]',\n})\nexport class NgbBreadcrumbSeparator {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAWa,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;AASU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC;AACnC,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAK;YAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;AACtC,YAAA,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC;AACjD,SAAC,CAAC;AACH;8GANY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAb,aAAa,E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AA,UAAA,EAAA,EAAA,iBAAA,EAAA,yCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBATtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACxC,oBAAA,IAAI,EAAE;AACJ,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,mBAAmB,EAAE,qCAAqC;AAC3D,qBAAA;AACF,iBAAA;;MAQY,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;AACtC,iBAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -44,9 +44,9 @@ class NgbCarouselSubContainer {
|
|
|
44
44
|
this.el = inject((ElementRef));
|
|
45
45
|
this.dir = injectDirectionality();
|
|
46
46
|
}
|
|
47
|
-
updateScrollPosition(x
|
|
47
|
+
updateScrollPosition(x) {
|
|
48
48
|
const el = this.el.nativeElement;
|
|
49
|
-
if (this.dir.isRtl()
|
|
49
|
+
if (this.dir.isRtl()) {
|
|
50
50
|
el.style.transform = `translate3d(${x}px, 0, 0)`;
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
@@ -64,8 +64,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
64
64
|
}] });
|
|
65
65
|
class NgbCarousel {
|
|
66
66
|
constructor() {
|
|
67
|
-
this.drag = viewChild.required(Drag);
|
|
68
67
|
this.dir = injectDirectionality();
|
|
68
|
+
this.drag = viewChild.required(Drag);
|
|
69
69
|
this.mainContainer = viewChild.required(NgbCarouselContainer);
|
|
70
70
|
this.subContainer = viewChild.required(NgbCarouselSubContainer);
|
|
71
71
|
this.items = contentChildren(NgbCarouselItem);
|
|
@@ -127,8 +127,8 @@ class NgbCarousel {
|
|
|
127
127
|
this.currentScroll = this.x();
|
|
128
128
|
}
|
|
129
129
|
else if (event.type === 'move') {
|
|
130
|
-
this.currentScroll = this.x()
|
|
131
|
-
this.subContainer().updateScrollPosition(this.currentScroll
|
|
130
|
+
this.currentScroll = this.x() + (this.dir.isRtl() ? event.x : -event.x);
|
|
131
|
+
this.subContainer().updateScrollPosition(this.currentScroll);
|
|
132
132
|
}
|
|
133
133
|
else if (event.type === 'end') {
|
|
134
134
|
const step = this.getStepBasedOnX(this.currentScroll, event.direction, event.velocity);
|
|
@@ -294,7 +294,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
294
294
|
exportAs: 'ngbCarousel',
|
|
295
295
|
}]
|
|
296
296
|
}], ctorParameters: () => [] });
|
|
297
|
-
function
|
|
297
|
+
function aliasCarousel(carousel) {
|
|
298
298
|
return { provide: NgbCarousel, useExisting: carousel };
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -333,5 +333,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
333
333
|
* Generated bundle index. Do not edit.
|
|
334
334
|
*/
|
|
335
335
|
|
|
336
|
-
export { NgbCarousel, NgbCarouselButton, NgbCarouselContainer, NgbCarouselItem, NgbCarouselSubContainer,
|
|
336
|
+
export { NgbCarousel, NgbCarouselButton, NgbCarouselContainer, NgbCarouselItem, NgbCarouselSubContainer, aliasCarousel };
|
|
337
337
|
//# sourceMappingURL=ngbase-adk-carousel.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngbase-adk-carousel.mjs","sources":["../../../projects/adk/carousel/carousel-item.ts","../../../projects/adk/carousel/carousel.ts","../../../projects/adk/carousel/carousel-next.ts","../../../projects/adk/carousel/ngbase-adk-carousel.ts"],"sourcesContent":["import { Directive, ElementRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[ngbCarouselItem]',\n})\nexport class NgbCarouselItem {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n get width() {\n const el = this.el.nativeElement;\n return el.getBoundingClientRect?.().width ?? el.offsetWidth; // SSR: fallback to offsetWidth\n }\n}\n","import {\n Directive,\n ElementRef,\n afterNextRender,\n computed,\n contentChildren,\n effect,\n inject,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { injectDirectionality } from '@ngbase/adk/bidi';\nimport { Drag } from '@ngbase/adk/drag';\nimport { NgbCarouselItem } from './carousel-item';\n\n@Directive({\n selector: '[ngbCarouselContainer]',\n hostDirectives: [Drag],\n})\nexport class NgbCarouselContainer {\n readonly el = inject(ElementRef<HTMLElement>);\n\n get width() {\n return this.el.nativeElement.clientWidth;\n }\n}\n\n@Directive({\n selector: '[ngbCarouselSubContainer]',\n})\nexport class NgbCarouselSubContainer {\n private el = inject(ElementRef<HTMLElement>);\n private dir = injectDirectionality();\n\n updateScrollPosition(x: number, skipDirection = false) {\n const el = this.el.nativeElement;\n if (this.dir.isRtl() && !skipDirection) {\n el.style.transform = `translate3d(${x}px, 0, 0)`;\n } else {\n el.style.transform = `translate3d(${-x}px, 0, 0)`;\n }\n }\n}\n\n@Directive({\n selector: '[ngbCarousel]',\n exportAs: 'ngbCarousel',\n})\nexport class NgbCarousel {\n private drag = viewChild.required(Drag);\n private dir = injectDirectionality();\n private mainContainer = viewChild.required(NgbCarouselContainer);\n private subContainer = viewChild.required(NgbCarouselSubContainer);\n private items = contentChildren(NgbCarouselItem);\n readonly current = signal(0);\n private animationId = 0;\n // this can be overridden by the ui carousel component\n velocity = 1.1;\n\n readonly itemsPerStep = computed(() => {\n const _ = this.isReady();\n const items = this.items();\n // const totalWidth = this.totalWidth();\n const containerWidth = this.containerWidth;\n // const scrollableWidth = totalWidth - containerWidth || 1;\n const v = Math.ceil(containerWidth / (items[0].width || 1));\n return v;\n });\n\n private readonly totalWidth = computed(() => {\n const _ = this.isReady();\n const items = this.items();\n return items.reduce((acc, item) => acc + item.width, 0);\n });\n\n /**\n * This is the total number of steps that can be taken.\n * It is computed based on the container width and the width of the last item.\n * It is used to determine the number of steps that can be taken.\n * We have to consider gap between items like padding or margin or flex gap.\n */\n readonly totalSteps = computed(() => {\n // const containerWidth = this.containerWidth;\n const items = this.items();\n if (!items.length || !this.itemsPerStep()) return 0;\n\n // console.log('totalSteps', items.length, this.itemsPerStep());\n\n // const totalWidth = this.totalWidth();\n // const scrollableWidth = totalWidth;\n\n // if (scrollableWidth <= 0) return 1; // All items fit in container\n\n // // Calculate effective step size based on the smallest item width\n // // const minItemWidth = Math.min(...items.map(item => item.width));\n // const v = Math.max(1, Math.floor(scrollableWidth / containerWidth));\n // console.log('totalSteps', v, scrollableWidth, containerWidth, scrollableWidth / containerWidth);\n // return v;\n const itemsPerStep = this.itemsPerStep();\n // const totalWidth = this.totalWidth();\n // const scrollableWidth = totalWidth - this.containerWidth;\n // return Math.max(1, Math.floor(scrollableWidth / itemsPerStep));\n return Math.ceil(items.length / itemsPerStep);\n });\n\n private readonly isReady = signal(false, { equal: () => false });\n readonly isFirst = computed(() => this.current() === 0);\n readonly isLast = computed(() => this.current() === this.totalSteps() - 1);\n private currentScroll = 0;\n\n constructor() {\n afterNextRender(() => {\n this.isReady.set(true);\n this.drag().events.subscribe(event => {\n event.event?.preventDefault();\n requestAnimationFrame(() => {\n if (event.type === 'start') {\n cancelAnimationFrame(this.animationId);\n this.currentScroll = this.x();\n } else if (event.type === 'move') {\n this.currentScroll = this.x() - event.x;\n this.subContainer().updateScrollPosition(this.currentScroll, true);\n } else if (event.type === 'end') {\n const step = this.getStepBasedOnX(\n this.currentScroll,\n event.direction!,\n event.velocity!, // Convert to pixels/second\n );\n this.go(step, event.velocity!);\n }\n });\n });\n });\n\n effect(cleanup => {\n if (typeof ResizeObserver !== 'undefined') {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => this.isReady.set(true));\n });\n observer.observe(this.mainContainer().el.nativeElement);\n cleanup(() => observer.disconnect());\n }\n });\n\n // if the total steps changes, we need to update the current step\n // also make sure the most visible item is the current item\n effect(() => {\n const totalSteps = this.totalSteps();\n const _ = this.dir.isRtl();\n const __ = this.isReady();\n // console.log('effect', totalSteps, this.itemsPerStep());\n untracked(() => {\n const current = this.current();\n const step = current >= totalSteps ? totalSteps - 1 : current;\n this.go(step, this.velocity, true);\n });\n });\n }\n\n x() {\n const current = this.current() * this.itemsPerStep();\n const items = this.items();\n if (this.containerWidth > this.totalWidth()) return 0;\n\n const totalWidth = this.totalWidth() - this.containerWidth;\n\n const x = items.slice(0, current).reduce((a, item) => a + item.width, 0);\n return Math.min(x, totalWidth);\n }\n\n private get containerWidth() {\n return this.mainContainer().width;\n }\n\n next(step = 1) {\n const current = this.current();\n const nextStep = Math.min(current + step, this.totalSteps() - 1);\n this.go(nextStep);\n }\n\n prev(step = 1) {\n const current = this.current();\n const index = Math.max(current - step, 0);\n this.go(index);\n }\n\n go(step: number, velocity = this.velocity, withoutAnimation = false) {\n // const totalSteps = this.totalSteps();\n if (step < 0 || step >= this.totalSteps()) {\n console.log('out of bounds step', step, this.totalSteps());\n return;\n }\n this.current.set(step);\n this.animateToX(velocity, withoutAnimation); // Adjust the scaling factor as needed\n }\n\n /**\n * Determines the appropriate step based on scroll position, direction and velocity\n * @param scrollX Current scroll position\n * @param direction Drag direction\n * @param velocity Drag velocity\n * @returns The calculated step index\n */\n private getStepBasedOnX(scrollX: number, direction: 'left' | 'right', velocity: number): number {\n const currentStep = this.current();\n const totalSteps = this.totalSteps();\n const isRtl = this.dir.isRtl();\n\n // In RTL mode, invert the direction\n const effectiveDirection = isRtl ? (direction === 'left' ? 'right' : 'left') : direction;\n\n // Prevent movement on last step when trying to go forward\n if (currentStep === totalSteps - 1 && effectiveDirection === 'left') {\n return currentStep;\n }\n\n // Use velocity to determine step change\n const VELOCITY_THRESHOLD = 0.3;\n if (Math.abs(velocity) > VELOCITY_THRESHOLD) {\n if (effectiveDirection === 'left') {\n return Math.min(currentStep + 1, totalSteps - 1);\n } else {\n return Math.max(currentStep - 1, 0);\n }\n }\n\n // If velocity is low, stay at current step\n return currentStep;\n }\n\n // private updateScrollPosition(x = this.currentScroll) {\n // const el = this.subContainer().nativeElement;\n // if (this.dir.isRtl()) {\n // el.style.transform = `translate3d(${x}px, 0, 0)`;\n // } else {\n // el.style.transform = `translate3d(${-x}px, 0, 0)`;\n // }\n // }\n\n private animateToX(velocity: number, withoutAnimation = false) {\n velocity = Math.max(velocity, this.velocity);\n let lastTime = Date.now();\n const targetScroll = this.x();\n const startScroll = this.currentScroll;\n const isRtl = this.dir.isRtl();\n\n // In RTL, invert the distance calculation\n const distance = isRtl ? startScroll - targetScroll : targetScroll - startScroll;\n const duration = Math.abs(distance / velocity);\n let elapsedTime = 0;\n\n const easeOutQuad = (t: number) => t * (2 - t);\n const subContainer = this.subContainer();\n\n const animate = () => {\n const now = Date.now();\n const dt = now - lastTime;\n lastTime = now;\n elapsedTime += dt;\n\n const progress = Math.min(elapsedTime / duration, 1);\n const easedProgress = easeOutQuad(progress);\n\n // Calculate scroll position based on direction\n this.currentScroll = isRtl\n ? startScroll - distance * easedProgress\n : startScroll + distance * easedProgress;\n\n subContainer.updateScrollPosition(this.currentScroll);\n\n if (progress < 1) {\n this.animationId = requestAnimationFrame(animate);\n }\n };\n\n cancelAnimationFrame(this.animationId);\n if (!withoutAnimation) {\n this.animationId = requestAnimationFrame(animate);\n } else {\n this.currentScroll = targetScroll;\n subContainer.updateScrollPosition(this.currentScroll);\n }\n }\n\n private snapToNearest(velocity = this.velocity) {\n const items = this.items();\n let nearestIndex = 0;\n let minDistance = Infinity;\n\n for (let i = 0; i < items.length; i++) {\n const itemPosition = items.slice(0, i).reduce((acc, item) => acc + item.width, 0);\n const distance = Math.abs(this.currentScroll - itemPosition);\n if (distance < minDistance) {\n minDistance = distance;\n nearestIndex = i;\n }\n }\n\n const step = Math.floor(nearestIndex / this.itemsPerStep());\n\n this.go(step, velocity);\n // this.current.set(nearestIndex);\n // this.currentScroll = this.x();\n // this.updateScrollPosition();\n }\n}\n\nexport function provideCarousel(carousel: typeof NgbCarousel) {\n return { provide: NgbCarousel, useExisting: carousel };\n}\n","import { Directive, inject, input } from '@angular/core';\nimport { NgbCarousel } from './carousel';\n\n@Directive({\n selector: '[ngbCarouselButton]',\n host: {\n '(click)': 'clicked($event)',\n },\n})\nexport class NgbCarouselButton {\n private readonly carousel = inject(NgbCarousel);\n\n readonly ngbCarouselButton = input.required<number | 'next' | 'prev'>();\n\n clicked(event: Event) {\n event.preventDefault();\n const no = this.ngbCarouselButton();\n if (no === 'next') {\n this.carousel.next();\n } else if (no === 'prev') {\n this.carousel.prev();\n } else {\n this.carousel.go(no);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAKa,eAAe,CAAA;AAH5B,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAMlE;AAJC,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa;AAChC,QAAA,OAAO,EAAE,CAAC,qBAAqB,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC;;8GALnD,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAA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AAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,iBAAiB;AAC7B,qBAAA;AACF,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngbase-adk-carousel.mjs","sources":["../../../projects/adk/carousel/carousel-item.ts","../../../projects/adk/carousel/carousel.ts","../../../projects/adk/carousel/carousel-next.ts","../../../projects/adk/carousel/ngbase-adk-carousel.ts"],"sourcesContent":["import { Directive, ElementRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[ngbCarouselItem]',\n})\nexport class NgbCarouselItem {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n get width() {\n const el = this.el.nativeElement;\n return el.getBoundingClientRect?.().width ?? el.offsetWidth; // SSR: fallback to offsetWidth\n }\n}\n","import {\n Directive,\n ElementRef,\n afterNextRender,\n computed,\n contentChildren,\n effect,\n inject,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { injectDirectionality } from '@ngbase/adk/bidi';\nimport { Drag } from '@ngbase/adk/drag';\nimport { NgbCarouselItem } from './carousel-item';\n\n@Directive({\n selector: '[ngbCarouselContainer]',\n hostDirectives: [Drag],\n})\nexport class NgbCarouselContainer {\n readonly el = inject(ElementRef<HTMLElement>);\n\n get width() {\n return this.el.nativeElement.clientWidth;\n }\n}\n\n@Directive({\n selector: '[ngbCarouselSubContainer]',\n})\nexport class NgbCarouselSubContainer {\n private el = inject(ElementRef<HTMLElement>);\n private dir = injectDirectionality();\n\n updateScrollPosition(x: number) {\n const el = this.el.nativeElement;\n if (this.dir.isRtl()) {\n el.style.transform = `translate3d(${x}px, 0, 0)`;\n } else {\n el.style.transform = `translate3d(${-x}px, 0, 0)`;\n }\n }\n}\n\n@Directive({\n selector: '[ngbCarousel]',\n exportAs: 'ngbCarousel',\n})\nexport class NgbCarousel {\n private dir = injectDirectionality();\n private drag = viewChild.required(Drag);\n private mainContainer = viewChild.required(NgbCarouselContainer);\n private subContainer = viewChild.required(NgbCarouselSubContainer);\n private items = contentChildren(NgbCarouselItem);\n readonly current = signal(0);\n private animationId = 0;\n // this can be overridden by the ui carousel component\n velocity = 1.1;\n\n readonly itemsPerStep = computed(() => {\n const _ = this.isReady();\n const items = this.items();\n // const totalWidth = this.totalWidth();\n const containerWidth = this.containerWidth;\n // const scrollableWidth = totalWidth - containerWidth || 1;\n const v = Math.ceil(containerWidth / (items[0].width || 1));\n return v;\n });\n\n private readonly totalWidth = computed(() => {\n const _ = this.isReady();\n const items = this.items();\n return items.reduce((acc, item) => acc + item.width, 0);\n });\n\n /**\n * This is the total number of steps that can be taken.\n * It is computed based on the container width and the width of the last item.\n * It is used to determine the number of steps that can be taken.\n * We have to consider gap between items like padding or margin or flex gap.\n */\n readonly totalSteps = computed(() => {\n // const containerWidth = this.containerWidth;\n const items = this.items();\n if (!items.length || !this.itemsPerStep()) return 0;\n\n // console.log('totalSteps', items.length, this.itemsPerStep());\n\n // const totalWidth = this.totalWidth();\n // const scrollableWidth = totalWidth;\n\n // if (scrollableWidth <= 0) return 1; // All items fit in container\n\n // // Calculate effective step size based on the smallest item width\n // // const minItemWidth = Math.min(...items.map(item => item.width));\n // const v = Math.max(1, Math.floor(scrollableWidth / containerWidth));\n // console.log('totalSteps', v, scrollableWidth, containerWidth, scrollableWidth / containerWidth);\n // return v;\n const itemsPerStep = this.itemsPerStep();\n // const totalWidth = this.totalWidth();\n // const scrollableWidth = totalWidth - this.containerWidth;\n // return Math.max(1, Math.floor(scrollableWidth / itemsPerStep));\n return Math.ceil(items.length / itemsPerStep);\n });\n\n private readonly isReady = signal(false, { equal: () => false });\n readonly isFirst = computed(() => this.current() === 0);\n readonly isLast = computed(() => this.current() === this.totalSteps() - 1);\n private currentScroll = 0;\n\n constructor() {\n afterNextRender(() => {\n this.isReady.set(true);\n this.drag().events.subscribe(event => {\n event.event?.preventDefault();\n requestAnimationFrame(() => {\n if (event.type === 'start') {\n cancelAnimationFrame(this.animationId);\n this.currentScroll = this.x();\n } else if (event.type === 'move') {\n this.currentScroll = this.x() + (this.dir.isRtl() ? event.x : -event.x);\n this.subContainer().updateScrollPosition(this.currentScroll);\n } else if (event.type === 'end') {\n const step = this.getStepBasedOnX(\n this.currentScroll,\n event.direction!,\n event.velocity!, // Convert to pixels/second\n );\n this.go(step, event.velocity!);\n }\n });\n });\n });\n\n effect(cleanup => {\n if (typeof ResizeObserver !== 'undefined') {\n const observer = new ResizeObserver(() => {\n requestAnimationFrame(() => this.isReady.set(true));\n });\n observer.observe(this.mainContainer().el.nativeElement);\n cleanup(() => observer.disconnect());\n }\n });\n\n // if the total steps changes, we need to update the current step\n // also make sure the most visible item is the current item\n effect(() => {\n const totalSteps = this.totalSteps();\n const _ = this.dir.isRtl();\n const __ = this.isReady();\n // console.log('effect', totalSteps, this.itemsPerStep());\n untracked(() => {\n const current = this.current();\n const step = current >= totalSteps ? totalSteps - 1 : current;\n this.go(step, this.velocity, true);\n });\n });\n }\n\n x() {\n const current = this.current() * this.itemsPerStep();\n const items = this.items();\n if (this.containerWidth > this.totalWidth()) return 0;\n\n const totalWidth = this.totalWidth() - this.containerWidth;\n\n const x = items.slice(0, current).reduce((a, item) => a + item.width, 0);\n return Math.min(x, totalWidth);\n }\n\n private get containerWidth() {\n return this.mainContainer().width;\n }\n\n next(step = 1) {\n const current = this.current();\n const nextStep = Math.min(current + step, this.totalSteps() - 1);\n this.go(nextStep);\n }\n\n prev(step = 1) {\n const current = this.current();\n const index = Math.max(current - step, 0);\n this.go(index);\n }\n\n go(step: number, velocity = this.velocity, withoutAnimation = false) {\n // const totalSteps = this.totalSteps();\n if (step < 0 || step >= this.totalSteps()) {\n console.log('out of bounds step', step, this.totalSteps());\n return;\n }\n this.current.set(step);\n this.animateToX(velocity, withoutAnimation); // Adjust the scaling factor as needed\n }\n\n /**\n * Determines the appropriate step based on scroll position, direction and velocity\n * @param scrollX Current scroll position\n * @param direction Drag direction\n * @param velocity Drag velocity\n * @returns The calculated step index\n */\n private getStepBasedOnX(scrollX: number, direction: 'left' | 'right', velocity: number): number {\n const currentStep = this.current();\n const totalSteps = this.totalSteps();\n const isRtl = this.dir.isRtl();\n\n // In RTL mode, invert the direction\n const effectiveDirection = isRtl ? (direction === 'left' ? 'right' : 'left') : direction;\n\n // Prevent movement on last step when trying to go forward\n if (currentStep === totalSteps - 1 && effectiveDirection === 'left') {\n return currentStep;\n }\n\n // Use velocity to determine step change\n const VELOCITY_THRESHOLD = 0.3;\n if (Math.abs(velocity) > VELOCITY_THRESHOLD) {\n if (effectiveDirection === 'left') {\n return Math.min(currentStep + 1, totalSteps - 1);\n } else {\n return Math.max(currentStep - 1, 0);\n }\n }\n\n // If velocity is low, stay at current step\n return currentStep;\n }\n\n // private updateScrollPosition(x = this.currentScroll) {\n // const el = this.subContainer().nativeElement;\n // if (this.dir.isRtl()) {\n // el.style.transform = `translate3d(${x}px, 0, 0)`;\n // } else {\n // el.style.transform = `translate3d(${-x}px, 0, 0)`;\n // }\n // }\n\n private animateToX(velocity: number, withoutAnimation = false) {\n velocity = Math.max(velocity, this.velocity);\n let lastTime = Date.now();\n const targetScroll = this.x();\n const startScroll = this.currentScroll;\n const isRtl = this.dir.isRtl();\n\n // In RTL, invert the distance calculation\n const distance = isRtl ? startScroll - targetScroll : targetScroll - startScroll;\n const duration = Math.abs(distance / velocity);\n let elapsedTime = 0;\n\n const easeOutQuad = (t: number) => t * (2 - t);\n const subContainer = this.subContainer();\n\n const animate = () => {\n const now = Date.now();\n const dt = now - lastTime;\n lastTime = now;\n elapsedTime += dt;\n\n const progress = Math.min(elapsedTime / duration, 1);\n const easedProgress = easeOutQuad(progress);\n\n // Calculate scroll position based on direction\n this.currentScroll = isRtl\n ? startScroll - distance * easedProgress\n : startScroll + distance * easedProgress;\n\n subContainer.updateScrollPosition(this.currentScroll);\n\n if (progress < 1) {\n this.animationId = requestAnimationFrame(animate);\n }\n };\n\n cancelAnimationFrame(this.animationId);\n if (!withoutAnimation) {\n this.animationId = requestAnimationFrame(animate);\n } else {\n this.currentScroll = targetScroll;\n subContainer.updateScrollPosition(this.currentScroll);\n }\n }\n\n private snapToNearest(velocity = this.velocity) {\n const items = this.items();\n let nearestIndex = 0;\n let minDistance = Infinity;\n\n for (let i = 0; i < items.length; i++) {\n const itemPosition = items.slice(0, i).reduce((acc, item) => acc + item.width, 0);\n const distance = Math.abs(this.currentScroll - itemPosition);\n if (distance < minDistance) {\n minDistance = distance;\n nearestIndex = i;\n }\n }\n\n const step = Math.floor(nearestIndex / this.itemsPerStep());\n\n this.go(step, velocity);\n // this.current.set(nearestIndex);\n // this.currentScroll = this.x();\n // this.updateScrollPosition();\n }\n}\n\nexport function aliasCarousel(carousel: typeof NgbCarousel) {\n return { provide: NgbCarousel, useExisting: carousel };\n}\n","import { Directive, inject, input } from '@angular/core';\nimport { NgbCarousel } from './carousel';\n\n@Directive({\n selector: '[ngbCarouselButton]',\n host: {\n '(click)': 'clicked($event)',\n },\n})\nexport class NgbCarouselButton {\n private readonly carousel = inject(NgbCarousel);\n\n readonly ngbCarouselButton = input.required<number | 'next' | 'prev'>();\n\n clicked(event: Event) {\n event.preventDefault();\n const no = this.ngbCarouselButton();\n if (no === 'next') {\n this.carousel.next();\n } else if (no === 'prev') {\n this.carousel.prev();\n } else {\n this.carousel.go(no);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAKa,eAAe,CAAA;AAH5B,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAMlE;AAJC,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa;AAChC,QAAA,OAAO,EAAE,CAAC,qBAAqB,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC;;8GALnD,eAAe,EAAA,IAAA,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AA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,iBAAiB;AAC7B,qBAAA;AACF,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Directive,
|
|
2
|
+
import { inject, Directive, model, input, output } from '@angular/core';
|
|
3
3
|
import { uniqueId, provideValueAccessor } from '@ngbase/adk/utils';
|
|
4
4
|
|
|
5
5
|
class CheckboxButton {
|
|
@@ -26,10 +26,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
26
26
|
class NgbCheckbox {
|
|
27
27
|
constructor() {
|
|
28
28
|
this.id = uniqueId();
|
|
29
|
-
this.disabled = input(false);
|
|
30
29
|
this.checked = model(false);
|
|
31
|
-
this.
|
|
30
|
+
this.disabled = input(false);
|
|
32
31
|
this.indeterminate = input(false);
|
|
32
|
+
this.change = output();
|
|
33
33
|
this.onChange = (_) => { };
|
|
34
34
|
this.onTouched = () => { };
|
|
35
35
|
}
|
|
@@ -53,7 +53,7 @@ class NgbCheckbox {
|
|
|
53
53
|
this.onTouched = fn;
|
|
54
54
|
}
|
|
55
55
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
56
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.0", type: NgbCheckbox, isStandalone: true, selector: "[ngbCheckbox]", inputs: {
|
|
56
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.0", type: NgbCheckbox, isStandalone: true, selector: "[ngbCheckbox]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", change: "change" }, host: { listeners: { "click": "updateValue()" } }, ngImport: i0 }); }
|
|
57
57
|
}
|
|
58
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: NgbCheckbox, decorators: [{
|
|
59
59
|
type: Directive,
|
|
@@ -62,9 +62,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
62
62
|
host: {
|
|
63
63
|
'(click)': 'updateValue()',
|
|
64
64
|
},
|
|
65
|
-
providers: [provideValueAccessor(NgbCheckbox)],
|
|
66
65
|
}]
|
|
67
66
|
}] });
|
|
67
|
+
function aliasCheckbox(checkbox) {
|
|
68
|
+
return [{ provide: NgbCheckbox, useExisting: checkbox }, provideValueAccessor(checkbox)];
|
|
69
|
+
}
|
|
68
70
|
|
|
69
71
|
/*
|
|
70
72
|
* Public API Surface of checkbox
|
|
@@ -74,5 +76,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
74
76
|
* Generated bundle index. Do not edit.
|
|
75
77
|
*/
|
|
76
78
|
|
|
77
|
-
export { CheckboxButton, NgbCheckbox };
|
|
79
|
+
export { CheckboxButton, NgbCheckbox, aliasCheckbox };
|
|
78
80
|
//# sourceMappingURL=ngbase-adk-checkbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngbase-adk-checkbox.mjs","sources":["../../../projects/adk/checkbox/checkbox.ts","../../../projects/adk/checkbox/public-api.ts","../../../projects/adk/checkbox/ngbase-adk-checkbox.ts"],"sourcesContent":["import { Directive, inject, input, model, output } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { provideValueAccessor, uniqueId } from '@ngbase/adk/utils';\n\n@Directive({\n selector: '[ngbCheckboxButton]',\n host: {\n role: 'checkbox',\n type: 'button',\n '[disabled]': 'checkbox.disabled()',\n '[tabIndex]': 'checkbox.disabled() ? -1 : 0',\n '[attr.aria-checked]': 'checkbox.checked()',\n '[attr.aria-disabled]': 'checkbox.disabled()',\n },\n})\nexport class CheckboxButton {\n readonly checkbox = inject(NgbCheckbox);\n}\n\n@Directive({\n selector: '[ngbCheckbox]',\n host: {\n '(click)': 'updateValue()',\n },\n
|
|
1
|
+
{"version":3,"file":"ngbase-adk-checkbox.mjs","sources":["../../../projects/adk/checkbox/checkbox.ts","../../../projects/adk/checkbox/public-api.ts","../../../projects/adk/checkbox/ngbase-adk-checkbox.ts"],"sourcesContent":["import { Directive, inject, input, model, output } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { provideValueAccessor, uniqueId } from '@ngbase/adk/utils';\n\n@Directive({\n selector: '[ngbCheckboxButton]',\n host: {\n role: 'checkbox',\n type: 'button',\n '[disabled]': 'checkbox.disabled()',\n '[tabIndex]': 'checkbox.disabled() ? -1 : 0',\n '[attr.aria-checked]': 'checkbox.checked()',\n '[attr.aria-disabled]': 'checkbox.disabled()',\n },\n})\nexport class CheckboxButton {\n readonly checkbox = inject(NgbCheckbox);\n}\n\n@Directive({\n selector: '[ngbCheckbox]',\n host: {\n '(click)': 'updateValue()',\n },\n})\nexport class NgbCheckbox implements ControlValueAccessor {\n readonly id = uniqueId();\n\n readonly checked = model(false);\n readonly disabled = input(false);\n readonly indeterminate = input(false);\n\n readonly change = output<boolean>();\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n updateValue() {\n if (this.disabled()) {\n return;\n }\n const value = !this.checked();\n this.checked.set(value);\n this.onChange(value);\n this.onTouched();\n this.change.emit(value);\n }\n\n writeValue(value: any): void {\n this.checked.set(value);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n}\n\nexport function aliasCheckbox(checkbox: typeof NgbCheckbox) {\n return [{ provide: NgbCheckbox, useExisting: checkbox }, provideValueAccessor(checkbox)];\n}\n","/*\n * Public API Surface of checkbox\n */\n\nexport { aliasCheckbox, CheckboxButton, NgbCheckbox } from './checkbox';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAea,cAAc,CAAA;AAX3B,IAAA,WAAA,GAAA;AAYW,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AACxC;8GAFY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,mBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAX1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,YAAY,EAAE,qBAAqB;AACnC,wBAAA,YAAY,EAAE,8BAA8B;AAC5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
37
|
}]
|
|
38
38
|
}] });
|
|
39
|
-
|
|
39
|
+
function aliasChip(chip) {
|
|
40
|
+
return { provide: NgbChip, useExisting: chip };
|
|
41
|
+
}
|
|
40
42
|
|
|
41
43
|
class NgbChipGroup {
|
|
42
44
|
constructor() {
|
|
@@ -56,5 +58,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
56
58
|
* Generated bundle index. Do not edit.
|
|
57
59
|
*/
|
|
58
60
|
|
|
59
|
-
export { NgbChip, NgbChipGroup, NgbChipRemove,
|
|
61
|
+
export { NgbChip, NgbChipGroup, NgbChipRemove, aliasChip };
|
|
60
62
|
//# sourceMappingURL=ngbase-adk-chip.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngbase-adk-chip.mjs","sources":["../../../projects/adk/chip/chip.ts","../../../projects/adk/chip/chip-group.ts","../../../projects/adk/chip/ngbase-adk-chip.ts"],"sourcesContent":["import { booleanAttribute, Directive, inject, input, output } from '@angular/core';\nimport { Directionality } from '@ngbase/adk/bidi';\n\n@Directive({\n selector: '[ngbChipRemove]',\n host: {\n type: 'button',\n '(click)': 'chip.close.emit()',\n '[attr.data-dir]': 'chip.dir.isRtl() ? \"rtl\" : \"ltr\"',\n },\n})\nexport class NgbChipRemove {\n readonly chip = inject(NgbChip<any>);\n}\n\n@Directive({\n selector: '[ngbChip]',\n})\nexport class NgbChip<T = any> {\n readonly dir = inject(Directionality);\n\n readonly removable = input(true, { transform: booleanAttribute });\n readonly value = input<T>();\n readonly close = output();\n}\n\nexport
|
|
1
|
+
{"version":3,"file":"ngbase-adk-chip.mjs","sources":["../../../projects/adk/chip/chip.ts","../../../projects/adk/chip/chip-group.ts","../../../projects/adk/chip/ngbase-adk-chip.ts"],"sourcesContent":["import { booleanAttribute, Directive, inject, input, output } from '@angular/core';\nimport { Directionality } from '@ngbase/adk/bidi';\n\n@Directive({\n selector: '[ngbChipRemove]',\n host: {\n type: 'button',\n '(click)': 'chip.close.emit()',\n '[attr.data-dir]': 'chip.dir.isRtl() ? \"rtl\" : \"ltr\"',\n },\n})\nexport class NgbChipRemove {\n readonly chip = inject(NgbChip<any>);\n}\n\n@Directive({\n selector: '[ngbChip]',\n})\nexport class NgbChip<T = any> {\n readonly dir = inject(Directionality);\n\n readonly removable = input(true, { transform: booleanAttribute });\n readonly value = input<T>();\n readonly close = output();\n}\n\nexport function aliasChip(chip: typeof NgbChip) {\n return { provide: NgbChip, useExisting: chip };\n}\n","import { contentChildren, Directive, effect, untracked } from '@angular/core';\n// import { Autocomplete } from '@ngbase/adk/autocomplete';\nimport { NgbChip } from './chip';\n\n@Directive({\n selector: '[ngbChipGroup]',\n})\nexport class NgbChipGroup<T> {\n readonly chips = contentChildren(NgbChip<T>);\n // readonly autoComplete = inject(Autocomplete);\n\n // constructor() {\n // effect(() => {\n // const chips = this.chips();\n // untracked(() => {\n // chips.forEach(chip => {\n // chip.close.subscribe(() => {\n // this.autoComplete.removeValue(chip.value());\n // });\n // });\n // });\n // });\n // }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAWa,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;AASW,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,EAAC,OAAY,EAAC;AACrC;8GAFY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,sCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,E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