@ethlete/cdk 4.23.5 → 4.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/esm2022/lib/components/carousel/controls/carousel-item-nav.component.mjs +11 -12
- package/esm2022/lib/components/overlay/components/menu/components/menu/menu.component.mjs +1 -1
- package/esm2022/lib/components/scrollable/components/scrollable/scrollable.component.mjs +8 -4
- package/esm2022/lib/components/scrollable/components/scrollable-placeholder/index.mjs +2 -0
- package/esm2022/lib/components/scrollable/components/scrollable-placeholder/scrollable-placeholder.component.mjs +26 -0
- package/esm2022/lib/components/scrollable/directives/scrollable-loading-template/index.mjs +2 -0
- package/esm2022/lib/components/scrollable/directives/scrollable-loading-template/scrollable-loading-template.directive.mjs +31 -0
- package/esm2022/lib/components/scrollable/directives/scrollable-placeholder-item-template/index.mjs +2 -0
- package/esm2022/lib/components/scrollable/directives/scrollable-placeholder-item-template/scrollable-placeholder-item-template.directive.mjs +26 -0
- package/esm2022/lib/components/scrollable/directives/scrollable-placeholder-overlay-template/index.mjs +2 -0
- package/esm2022/lib/components/scrollable/directives/scrollable-placeholder-overlay-template/scrollable-placeholder-overlay-template.directive.mjs +26 -0
- package/esm2022/lib/components/scrollable/public-api/index.mjs +5 -1
- package/esm2022/lib/components/scrollable/scrollable.imports.mjs +9 -1
- package/esm2022/lib/components/tabs/components/nav-tabs/nav-tabs.component.mjs +1 -1
- package/esm2022/lib/components/tabs/partials/inline-tabs/inline-tab-header/inline-tab-header.component.mjs +1 -1
- package/fesm2022/ethlete-cdk.mjs +121 -18
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/lib/components/carousel/controls/carousel-item-nav.component.d.ts +10 -0
- package/lib/components/scrollable/components/scrollable/scrollable.component.d.ts +5 -1
- package/lib/components/scrollable/components/scrollable-placeholder/index.d.ts +1 -0
- package/lib/components/scrollable/components/scrollable-placeholder/scrollable-placeholder.component.d.ts +15 -0
- package/lib/components/scrollable/directives/scrollable-loading-template/index.d.ts +1 -0
- package/lib/components/scrollable/directives/scrollable-loading-template/scrollable-loading-template.directive.d.ts +10 -0
- package/lib/components/scrollable/directives/scrollable-placeholder-item-template/index.d.ts +1 -0
- package/lib/components/scrollable/directives/scrollable-placeholder-item-template/scrollable-placeholder-item-template.directive.d.ts +7 -0
- package/lib/components/scrollable/directives/scrollable-placeholder-overlay-template/index.d.ts +1 -0
- package/lib/components/scrollable/directives/scrollable-placeholder-overlay-template/scrollable-placeholder-overlay-template.directive.d.ts +7 -0
- package/lib/components/scrollable/public-api/index.d.ts +4 -0
- package/lib/components/scrollable/scrollable.imports.d.ts +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ethlete/cdk
|
|
2
2
|
|
|
3
|
+
## 4.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`585d406`](https://github.com/ethlete-io/ethdk/commit/585d406c992c9afd537eeaace3e28ddeb518cdf6) Thanks [@TomTomB](https://github.com/TomTomB)! - Add a scrollable loading template directive (`ng-template[etScrollableLoadingTemplate]`) that can be used to show loading uis inside an already rendered scrollable component. Visibility is controlled via the `showLoadingTemplate` input. Positioning can be controlled via the `loadingTemplatePosition` input.
|
|
8
|
+
|
|
9
|
+
- [`585d406`](https://github.com/ethlete-io/ethdk/commit/585d406c992c9afd537eeaace3e28ddeb518cdf6) Thanks [@TomTomB](https://github.com/TomTomB)! - Add scrollable placeholder component for displaying initial loading states or using it inside deferred views. The component that should be rendered inside the placeholder can be configured using the scrollable placeholder item template directive (`ng-template[etScrollablePlaceholderItemTemplate]`). Additionally you can also supply a scrollable placeholder overlay template directive (`ng-template[etScrollablePlaceholderOverlayTemplate]`) that will be positioned on top of the placeholder.
|
|
10
|
+
|
|
11
|
+
## 4.23.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`8a08672`](https://github.com/ethlete-io/ethdk/commit/8a086726225de55877358780bfbc5a624d8f56d5) Thanks [@TomTomB](https://github.com/TomTomB)! - Make sure the carousel progressing does not trigger change detection every 100ms
|
|
16
|
+
|
|
3
17
|
## 4.23.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, viewChildren, } from '@angular/core';
|
|
2
|
+
import { signalStyles } from '@ethlete/core';
|
|
2
3
|
import { CAROUSEL_ITEM_NAV_TOKEN, CarouselItemNavDirective } from './carousel-item-nav.directive';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
import * as i1 from "./carousel-item-nav.directive";
|
|
5
6
|
export class CarouselItemNavComponent {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.nav = inject(CAROUSEL_ITEM_NAV_TOKEN);
|
|
9
|
+
this.progressBars = viewChildren('progress');
|
|
10
|
+
this.activeProgressBar = computed(() => this.progressBars()[this.nav.carousel.activeIndex()]);
|
|
11
|
+
this.progressBarStyleBindings = signalStyles(this.activeProgressBar, {
|
|
12
|
+
'--_et-carousel-item-nav-button-progress': this.nav.autoPlayProgress,
|
|
13
|
+
});
|
|
8
14
|
}
|
|
9
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: CarouselItemNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: CarouselItemNavComponent, isStandalone: true, selector: "et-carousel-item-nav", host: { classAttribute: "et-carousel-item-nav-host" }, hostDirectives: [{ directive: i1.CarouselItemNavDirective }], ngImport: i0, template: `
|
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: CarouselItemNavComponent, isStandalone: true, selector: "et-carousel-item-nav", host: { classAttribute: "et-carousel-item-nav-host" }, viewQueries: [{ propertyName: "progressBars", predicate: ["progress"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.CarouselItemNavDirective }], ngImport: i0, template: `
|
|
11
17
|
<ul class="et-carousel-item-nav">
|
|
12
18
|
@for (item of nav.carousel.items(); track $index) {
|
|
13
19
|
<li class="et-carousel-item-nav-item">
|
|
@@ -18,10 +24,7 @@ export class CarouselItemNavComponent {
|
|
|
18
24
|
class="et-carousel-item-nav-button"
|
|
19
25
|
type="button"
|
|
20
26
|
>
|
|
21
|
-
<div
|
|
22
|
-
[style.--_et-carousel-item-nav-button-progress]="item.isActive() ? nav.autoPlayProgress() : 0"
|
|
23
|
-
class="et-carousel-item-nav-button-progress"
|
|
24
|
-
></div>
|
|
27
|
+
<div #progress class="et-carousel-item-nav-button-progress"></div>
|
|
25
28
|
</button>
|
|
26
29
|
</li>
|
|
27
30
|
}
|
|
@@ -43,10 +46,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
43
46
|
class="et-carousel-item-nav-button"
|
|
44
47
|
type="button"
|
|
45
48
|
>
|
|
46
|
-
<div
|
|
47
|
-
[style.--_et-carousel-item-nav-button-progress]="item.isActive() ? nav.autoPlayProgress() : 0"
|
|
48
|
-
class="et-carousel-item-nav-button-progress"
|
|
49
|
-
></div>
|
|
49
|
+
<div #progress class="et-carousel-item-nav-button-progress"></div>
|
|
50
50
|
</button>
|
|
51
51
|
</li>
|
|
52
52
|
}
|
|
@@ -58,8 +58,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
58
58
|
host: {
|
|
59
59
|
class: 'et-carousel-item-nav-host',
|
|
60
60
|
},
|
|
61
|
-
imports: [],
|
|
62
61
|
hostDirectives: [{ directive: CarouselItemNavDirective }],
|
|
63
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XRlbS1uYXYtaG9zdCcsXG4gIH0sXG4gIGhvc3REaXJlY3RpdmVzOiBbeyBkaXJlY3RpdmU6IENhcm91c2VsSXRlbU5hdkRpcmVjdGl2ZSB9XSxcbn0pXG5leHBvcnQgY2xhc3MgQ2Fyb3VzZWxJdGVtTmF2Q29tcG9uZW50IHtcbiAgbmF2ID0gaW5qZWN0KENBUk9VU0VMX0lURU1fTkFWX1RPS0VOKTtcblxuICBwcm9ncmVzc0JhcnMgPSB2aWV3Q2hpbGRyZW48RWxlbWVudFJlZjxIVE1MRWxlbWVudD5bXT4oJ3Byb2dyZXNzJyk7XG4gIGFjdGl2ZVByb2dyZXNzQmFyID0gY29tcHV0ZWQoKCkgPT4gdGhpcy5wcm9ncmVzc0JhcnMoKVt0aGlzLm5hdi5jYXJvdXNlbC5hY3RpdmVJbmRleCgpXSk7XG5cbiAgcHJvZ3Jlc3NCYXJTdHlsZUJpbmRpbmdzID0gc2lnbmFsU3R5bGVzKHRoaXMuYWN0aXZlUHJvZ3Jlc3NCYXIsIHtcbiAgICAnLS1fZXQtY2Fyb3VzZWwtaXRlbS1uYXYtYnV0dG9uLXByb2dyZXNzJzogdGhpcy5uYXYuYXV0b1BsYXlQcm9ncmVzcyxcbiAgfSk7XG59XG4iXX0=
|
|
@@ -132,7 +132,7 @@ export class MenuComponent {
|
|
|
132
132
|
provide: MENU,
|
|
133
133
|
useExisting: MenuComponent,
|
|
134
134
|
},
|
|
135
|
-
], queries: [{ propertyName: "__menuItemList", predicate: MENU_ITEM_TOKEN, descendants: true }], ngImport: i0, template: "<et-scrollable\n [direction]=\"orientation()\"\n [renderButtons]=\"renderScrollableButtons()\"\n [renderMasks]=\"renderScrollableMasks()\"\n [cursorDragScroll]=\"orientation() === 'horizontal'\"\n [scrollableClass]=\"scrollableClass()\"\n renderScrollbars\n>\n <ng-content />\n</et-scrollable>\n", styles: [".et-menu{--et-menu-max-inline-size: 300px;--et-menu-max-block-size: 200px;--et-menu-background-color: #b3b3b3;--et-menu-border-radius: 10px}.et-scrollable-container{max-inline-size:var(--et-menu-max-inline-size);max-block-size:min(var(--et-menu-max-block-size),var(--et-floating-max-height, var(--et-menu-max-block-size)));background-color:var(--et-menu-background-color);border-radius:var(--et-menu-border-radius);box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: ScrollableComponent, selector: "et-scrollable", inputs: ["itemSize", "direction", "scrollableRole", "scrollableClass", "renderNavigation", "renderMasks", "renderButtons", "buttonPosition", "renderScrollbars", "stickyButtons", "cursorDragScroll", "disableActiveElementScrolling", "scrollMode", "snap", "scrollMargin", "scrollOrigin", "darkenNonIntersectingItems"], outputs: ["intersectionChange", "scrollStateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
135
|
+
], queries: [{ propertyName: "__menuItemList", predicate: MENU_ITEM_TOKEN, descendants: true }], ngImport: i0, template: "<et-scrollable\n [direction]=\"orientation()\"\n [renderButtons]=\"renderScrollableButtons()\"\n [renderMasks]=\"renderScrollableMasks()\"\n [cursorDragScroll]=\"orientation() === 'horizontal'\"\n [scrollableClass]=\"scrollableClass()\"\n renderScrollbars\n>\n <ng-content />\n</et-scrollable>\n", styles: [".et-menu{--et-menu-max-inline-size: 300px;--et-menu-max-block-size: 200px;--et-menu-background-color: #b3b3b3;--et-menu-border-radius: 10px}.et-scrollable-container{max-inline-size:var(--et-menu-max-inline-size);max-block-size:min(var(--et-menu-max-block-size),var(--et-floating-max-height, var(--et-menu-max-block-size)));background-color:var(--et-menu-background-color);border-radius:var(--et-menu-border-radius);box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: ScrollableComponent, selector: "et-scrollable", inputs: ["itemSize", "direction", "scrollableRole", "scrollableClass", "renderNavigation", "renderMasks", "renderButtons", "buttonPosition", "renderScrollbars", "stickyButtons", "cursorDragScroll", "disableActiveElementScrolling", "scrollMode", "snap", "scrollMargin", "scrollOrigin", "darkenNonIntersectingItems", "showLoadingTemplate", "loadingTemplatePosition"], outputs: ["intersectionChange", "scrollStateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
136
136
|
}
|
|
137
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: MenuComponent, decorators: [{
|
|
138
138
|
type: Component,
|