@vectoriox/iox-ui 5.86.0 → 5.86.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.
@@ -3166,6 +3166,16 @@ function sliderInputsFromProps(props, responsive) {
3166
3166
  * (premium M4) sits in its runway — the string path writes the same `iox-slider-runway` wrapper.
3167
3167
  */
3168
3168
  class ClientSliderContainerComponent {
3169
+ /** Written as each slide is placed — never a template binding: the renderer places slides AFTER this component's
3170
+ * first check, and a binding that changes then is an ExpressionChanged error in dev mode. */
3171
+ writeRunwaySteps() {
3172
+ const el = this.runwayEl?.nativeElement;
3173
+ if (!el || !this.scrollPlays)
3174
+ return;
3175
+ // The style ATTRIBUTE, so the server's DOM serialises it (a custom property set through `style` may not be).
3176
+ const rest = (el.getAttribute('style') ?? '').split(';').map(d => d.trim()).filter(d => d && !d.startsWith(SLIDER_STEPS_PROPERTY));
3177
+ el.setAttribute('style', [...rest, `${SLIDER_STEPS_PROPERTY}: ${Math.max(0, this.slideTotal - 1)}`].join('; '));
3178
+ }
3169
3179
  constructor(platformId) {
3170
3180
  this.platformId = platformId;
3171
3181
  this.nodeId = '';
@@ -3214,6 +3224,9 @@ class ClientSliderContainerComponent {
3214
3224
  this.scrollPlays = false;
3215
3225
  this.swiper = null;
3216
3226
  this.slidesSeen = false;
3227
+ /** The slides the renderer placed (it asks `childHostFor` for each, before the first change detection), so a played
3228
+ * slider's runway reserves its steps in the SERVER render — the page never shifts when the slider boots. */
3229
+ this.slideTotal = 0;
3217
3230
  this.instanceRegistry = inject(ComponentInstanceRegistryService);
3218
3231
  }
3219
3232
  /** Swiper draws its own arrows / dots only for a saved slider whose controls are not parts yet. */
@@ -3225,6 +3238,8 @@ class ClientSliderContainerComponent {
3225
3238
  childHostFor(child) {
3226
3239
  if (!isSliderPart(child)) {
3227
3240
  this.slidesSeen = true;
3241
+ this.slideTotal++;
3242
+ this.writeRunwaySteps();
3228
3243
  return this.childrenHost;
3229
3244
  }
3230
3245
  return this.slidesSeen ? this.trailHost : this.leadHost;
@@ -3264,8 +3279,8 @@ class ClientSliderContainerComponent {
3264
3279
  };
3265
3280
  }
3266
3281
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: ClientSliderContainerComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
3267
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.31", type: ClientSliderContainerComponent, isStandalone: false, selector: "iox-slider-container", inputs: { nodeId: "nodeId", dir: "dir", direction: "direction", loop: "loop", slidesPerView: "slidesPerView", slidesPerGroup: "slidesPerGroup", spaceBetween: "spaceBetween", speed: "speed", effect: "effect", grabCursor: "grabCursor", centeredSlides: "centeredSlides", initialSlide: "initialSlide", autoHeight: "autoHeight", slideToClickedSlide: "slideToClickedSlide", freeMode: "freeMode", enableNavigation: "enableNavigation", enablePagination: "enablePagination", enableScrollbar: "enableScrollbar", enableAutoplay: "enableAutoplay", enableKeyboard: "enableKeyboard", enableMousewheel: "enableMousewheel", enableZoom: "enableZoom", enableGrid: "enableGrid", enableParallax: "enableParallax", autoplayDelay: "autoplayDelay", autoplayPauseOnMouseEnter: "autoplayPauseOnMouseEnter", autoplayDisableOnInteraction: "autoplayDisableOnInteraction", paginationType: "paginationType", paginationClickable: "paginationClickable", paginationDynamicBullets: "paginationDynamicBullets", navigationColor: "navigationColor", paginationColor: "paginationColor", gridRows: "gridRows", breakpoints: "breakpoints", responsive: "responsive", controlParts: "controlParts", scrollPlays: "scrollPlays" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "leadHost", first: true, predicate: ["leadHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "trailHost", first: true, predicate: ["trailHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "swiperEl", first: true, predicate: ["swiperEl"], descendants: true, static: true }], ngImport: i0, template: `
3268
- <div [class.iox-slider-runway]="scrollPlays" [attr.data-iox-scene]="scrollPlays ? '' : null" [style.display]="scrollPlays ? null : 'contents'">
3282
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.31", type: ClientSliderContainerComponent, isStandalone: false, selector: "iox-slider-container", inputs: { nodeId: "nodeId", dir: "dir", direction: "direction", loop: "loop", slidesPerView: "slidesPerView", slidesPerGroup: "slidesPerGroup", spaceBetween: "spaceBetween", speed: "speed", effect: "effect", grabCursor: "grabCursor", centeredSlides: "centeredSlides", initialSlide: "initialSlide", autoHeight: "autoHeight", slideToClickedSlide: "slideToClickedSlide", freeMode: "freeMode", enableNavigation: "enableNavigation", enablePagination: "enablePagination", enableScrollbar: "enableScrollbar", enableAutoplay: "enableAutoplay", enableKeyboard: "enableKeyboard", enableMousewheel: "enableMousewheel", enableZoom: "enableZoom", enableGrid: "enableGrid", enableParallax: "enableParallax", autoplayDelay: "autoplayDelay", autoplayPauseOnMouseEnter: "autoplayPauseOnMouseEnter", autoplayDisableOnInteraction: "autoplayDisableOnInteraction", paginationType: "paginationType", paginationClickable: "paginationClickable", paginationDynamicBullets: "paginationDynamicBullets", navigationColor: "navigationColor", paginationColor: "paginationColor", gridRows: "gridRows", breakpoints: "breakpoints", responsive: "responsive", controlParts: "controlParts", scrollPlays: "scrollPlays" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "leadHost", first: true, predicate: ["leadHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "trailHost", first: true, predicate: ["trailHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "swiperEl", first: true, predicate: ["swiperEl"], descendants: true, static: true }, { propertyName: "runwayEl", first: true, predicate: ["runwayEl"], descendants: true, static: true }], ngImport: i0, template: `
3283
+ <div #runwayEl [class.iox-slider-runway]="scrollPlays" [attr.data-iox-scene]="scrollPlays ? '' : null" [style.display]="scrollPlays ? null : 'contents'">
3269
3284
  <div class="swiper" [class]="'swiper iox-node-' + nodeId" [attr.dir]="dir" [style.direction]="dir"
3270
3285
  [style.--swiper-navigation-color]="legacyControls ? (navigationColor || null) : null"
3271
3286
  [style.--swiper-pagination-color]="legacyControls ? (paginationColor || null) : null" #swiperEl>
@@ -3285,7 +3300,7 @@ class ClientSliderContainerComponent {
3285
3300
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: ClientSliderContainerComponent, decorators: [{
3286
3301
  type: Component,
3287
3302
  args: [{ selector: 'iox-slider-container', template: `
3288
- <div [class.iox-slider-runway]="scrollPlays" [attr.data-iox-scene]="scrollPlays ? '' : null" [style.display]="scrollPlays ? null : 'contents'">
3303
+ <div #runwayEl [class.iox-slider-runway]="scrollPlays" [attr.data-iox-scene]="scrollPlays ? '' : null" [style.display]="scrollPlays ? null : 'contents'">
3289
3304
  <div class="swiper" [class]="'swiper iox-node-' + nodeId" [attr.dir]="dir" [style.direction]="dir"
3290
3305
  [style.--swiper-navigation-color]="legacyControls ? (navigationColor || null) : null"
3291
3306
  [style.--swiper-pagination-color]="legacyControls ? (paginationColor || null) : null" #swiperEl>
@@ -3390,6 +3405,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
3390
3405
  }], swiperEl: [{
3391
3406
  type: ViewChild,
3392
3407
  args: ['swiperEl', { static: true }]
3408
+ }], runwayEl: [{
3409
+ type: ViewChild,
3410
+ args: ['runwayEl', { static: true }]
3393
3411
  }] } });
3394
3412
 
3395
3413
  /**