@vectoriox/iox-ui 4.7.4 → 4.8.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.
|
@@ -1497,6 +1497,10 @@ class ClientSliderContainerComponent {
|
|
|
1497
1497
|
constructor(platformId) {
|
|
1498
1498
|
this.platformId = platformId;
|
|
1499
1499
|
this.nodeId = '';
|
|
1500
|
+
/** Language (writing) direction. Rendered as the `dir` attribute so it survives SSR and drives
|
|
1501
|
+
* Swiper's RTL layout — must match the builder's app-slider-container, which had `dir` while
|
|
1502
|
+
* this engine-runtime component did not (RTL showed in the editor but never on the live site). */
|
|
1503
|
+
this.dir = 'ltr';
|
|
1500
1504
|
this.direction = 'horizontal';
|
|
1501
1505
|
this.loop = false;
|
|
1502
1506
|
this.slidesPerView = 1;
|
|
@@ -1576,6 +1580,9 @@ class ClientSliderContainerComponent {
|
|
|
1576
1580
|
}
|
|
1577
1581
|
const config = {
|
|
1578
1582
|
modules,
|
|
1583
|
+
// Swiper reads the container's `dir` attribute, but pass it explicitly so RTL is applied
|
|
1584
|
+
// on init regardless of attribute timing.
|
|
1585
|
+
dir: this.dir,
|
|
1579
1586
|
direction: this.direction,
|
|
1580
1587
|
loop: this.loop,
|
|
1581
1588
|
slidesPerView: this.slidesPerView,
|
|
@@ -1606,8 +1613,8 @@ class ClientSliderContainerComponent {
|
|
|
1606
1613
|
this.instanceRegistry.register(this.nodeId, this._swiper);
|
|
1607
1614
|
}
|
|
1608
1615
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ClientSliderContainerComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1609
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: ClientSliderContainerComponent, isStandalone: false, selector: "iox-slider-container", inputs: { nodeId: "nodeId", direction: "direction", loop: "loop", slidesPerView: "slidesPerView", spaceBetween: "spaceBetween", speed: "speed", effect: "effect", grabCursor: "grabCursor", centeredSlides: "centeredSlides", initialSlide: "initialSlide", 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", gridRows: "gridRows", breakpoints: "breakpoints" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "swiperEl", first: true, predicate: ["swiperEl"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1610
|
-
<div class="swiper" [class]="'iox-node-' + nodeId" #swiperEl>
|
|
1616
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: ClientSliderContainerComponent, isStandalone: false, selector: "iox-slider-container", inputs: { nodeId: "nodeId", dir: "dir", direction: "direction", loop: "loop", slidesPerView: "slidesPerView", spaceBetween: "spaceBetween", speed: "speed", effect: "effect", grabCursor: "grabCursor", centeredSlides: "centeredSlides", initialSlide: "initialSlide", 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", gridRows: "gridRows", breakpoints: "breakpoints" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "swiperEl", first: true, predicate: ["swiperEl"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1617
|
+
<div class="swiper" [class]="'iox-node-' + nodeId" [attr.dir]="dir" [style.direction]="dir" #swiperEl>
|
|
1611
1618
|
<div class="swiper-wrapper">
|
|
1612
1619
|
<ng-container #childrenHost></ng-container>
|
|
1613
1620
|
</div>
|
|
@@ -1621,7 +1628,7 @@ class ClientSliderContainerComponent {
|
|
|
1621
1628
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ClientSliderContainerComponent, decorators: [{
|
|
1622
1629
|
type: Component,
|
|
1623
1630
|
args: [{ selector: 'iox-slider-container', template: `
|
|
1624
|
-
<div class="swiper" [class]="'iox-node-' + nodeId" #swiperEl>
|
|
1631
|
+
<div class="swiper" [class]="'iox-node-' + nodeId" [attr.dir]="dir" [style.direction]="dir" #swiperEl>
|
|
1625
1632
|
<div class="swiper-wrapper">
|
|
1626
1633
|
<ng-container #childrenHost></ng-container>
|
|
1627
1634
|
</div>
|
|
@@ -1636,6 +1643,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1636
1643
|
args: [PLATFORM_ID]
|
|
1637
1644
|
}] }], propDecorators: { nodeId: [{
|
|
1638
1645
|
type: Input
|
|
1646
|
+
}], dir: [{
|
|
1647
|
+
type: Input
|
|
1639
1648
|
}], direction: [{
|
|
1640
1649
|
type: Input
|
|
1641
1650
|
}], loop: [{
|
|
@@ -2249,8 +2258,9 @@ function matchRouteParams(template, actual) {
|
|
|
2249
2258
|
/**
|
|
2250
2259
|
* Build the query filter for a data-source request from its filterByRouteParam / filterByQueryParams
|
|
2251
2260
|
* config. `field` is filtered by the route-param value (falling back to `defaultId`); query filters
|
|
2252
|
-
* map each `field` to a query-param value (falling back to `defaultValue`)
|
|
2253
|
-
* so the source isn't
|
|
2261
|
+
* map each `field` to a query-param value (falling back to `defaultValue`), and a filter with NO
|
|
2262
|
+
* `queryParam` is a constant on `defaultValue`. Empty values are omitted so the source isn't
|
|
2263
|
+
* accidentally filtered to nothing.
|
|
2254
2264
|
*/
|
|
2255
2265
|
function buildDataSourceFilter(req, routeParams = {}, queryParams = {}) {
|
|
2256
2266
|
const params = {};
|
|
@@ -2261,9 +2271,11 @@ function buildDataSourceFilter(req, routeParams = {}, queryParams = {}) {
|
|
|
2261
2271
|
params[byRoute.field] = value;
|
|
2262
2272
|
}
|
|
2263
2273
|
for (const q of req?.filterByQueryParams ?? []) {
|
|
2264
|
-
if (!q?.field
|
|
2274
|
+
if (!q?.field)
|
|
2265
2275
|
continue;
|
|
2266
|
-
|
|
2276
|
+
// No queryParam → a CONSTANT filter: defaultValue is the value, in the builder preview and
|
|
2277
|
+
// on the live site alike. With a queryParam the URL wins and defaultValue is the fallback.
|
|
2278
|
+
const value = q.queryParam ? (queryParams[q.queryParam] ?? q.defaultValue) : q.defaultValue;
|
|
2267
2279
|
if (value !== undefined && value !== null && value !== '')
|
|
2268
2280
|
params[q.field] = value;
|
|
2269
2281
|
}
|