@digitalculture/ochre-sdk 0.2.10 → 0.2.11
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/dist/index.cjs +38 -28
- package/dist/index.js +38 -28
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1548,37 +1548,47 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1548
1548
|
if (altTextSource === null) {
|
|
1549
1549
|
altTextSource = "name";
|
|
1550
1550
|
}
|
|
1551
|
-
let
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
secondsPerImage =
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1551
|
+
let carouselOptions = null;
|
|
1552
|
+
if (images.length > 1) {
|
|
1553
|
+
const variantProperty = getPropertyByLabel(
|
|
1554
|
+
componentProperty.properties,
|
|
1555
|
+
"variant"
|
|
1556
|
+
);
|
|
1557
|
+
let secondsPerImage = 5;
|
|
1558
|
+
let isFullWidth = false;
|
|
1559
|
+
let isFullHeight = false;
|
|
1560
|
+
if (variantProperty && variantProperty.values[0].content === "carousel") {
|
|
1561
|
+
const secondsPerImageProperty = getPropertyValueByLabel(
|
|
1562
|
+
variantProperty.properties,
|
|
1563
|
+
"seconds-per-image"
|
|
1564
|
+
);
|
|
1565
|
+
if (secondsPerImageProperty !== null) {
|
|
1566
|
+
secondsPerImage = Number.parseFloat(secondsPerImageProperty);
|
|
1567
|
+
}
|
|
1568
|
+
const isFullWidthProperty = getPropertyValueByLabel(
|
|
1569
|
+
variantProperty.properties,
|
|
1570
|
+
"is-full-width"
|
|
1571
|
+
);
|
|
1572
|
+
if (isFullWidthProperty !== null) {
|
|
1573
|
+
isFullWidth = isFullWidthProperty === "Yes";
|
|
1574
|
+
}
|
|
1575
|
+
const isFullHeightProperty = getPropertyValueByLabel(
|
|
1576
|
+
variantProperty.properties,
|
|
1577
|
+
"is-full-height"
|
|
1578
|
+
);
|
|
1579
|
+
if (isFullHeightProperty !== null) {
|
|
1580
|
+
isFullHeight = isFullHeightProperty === "Yes";
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
carouselOptions = {
|
|
1584
|
+
secondsPerImage,
|
|
1585
|
+
isFullWidth,
|
|
1586
|
+
isFullHeight
|
|
1587
|
+
};
|
|
1574
1588
|
}
|
|
1575
1589
|
properties.images = images;
|
|
1576
1590
|
properties.variant = variant;
|
|
1577
|
-
properties.carouselOptions =
|
|
1578
|
-
secondsPerImage,
|
|
1579
|
-
isFullWidth,
|
|
1580
|
-
isFullHeight
|
|
1581
|
-
} : null;
|
|
1591
|
+
properties.carouselOptions = carouselOptions;
|
|
1582
1592
|
properties.imageQuality = imageQuality;
|
|
1583
1593
|
properties.captionLayout = captionLayout;
|
|
1584
1594
|
properties.captionSource = captionSource;
|
package/dist/index.js
CHANGED
|
@@ -1470,37 +1470,47 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1470
1470
|
if (altTextSource === null) {
|
|
1471
1471
|
altTextSource = "name";
|
|
1472
1472
|
}
|
|
1473
|
-
let
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
secondsPerImage =
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1473
|
+
let carouselOptions = null;
|
|
1474
|
+
if (images.length > 1) {
|
|
1475
|
+
const variantProperty = getPropertyByLabel(
|
|
1476
|
+
componentProperty.properties,
|
|
1477
|
+
"variant"
|
|
1478
|
+
);
|
|
1479
|
+
let secondsPerImage = 5;
|
|
1480
|
+
let isFullWidth = false;
|
|
1481
|
+
let isFullHeight = false;
|
|
1482
|
+
if (variantProperty && variantProperty.values[0].content === "carousel") {
|
|
1483
|
+
const secondsPerImageProperty = getPropertyValueByLabel(
|
|
1484
|
+
variantProperty.properties,
|
|
1485
|
+
"seconds-per-image"
|
|
1486
|
+
);
|
|
1487
|
+
if (secondsPerImageProperty !== null) {
|
|
1488
|
+
secondsPerImage = Number.parseFloat(secondsPerImageProperty);
|
|
1489
|
+
}
|
|
1490
|
+
const isFullWidthProperty = getPropertyValueByLabel(
|
|
1491
|
+
variantProperty.properties,
|
|
1492
|
+
"is-full-width"
|
|
1493
|
+
);
|
|
1494
|
+
if (isFullWidthProperty !== null) {
|
|
1495
|
+
isFullWidth = isFullWidthProperty === "Yes";
|
|
1496
|
+
}
|
|
1497
|
+
const isFullHeightProperty = getPropertyValueByLabel(
|
|
1498
|
+
variantProperty.properties,
|
|
1499
|
+
"is-full-height"
|
|
1500
|
+
);
|
|
1501
|
+
if (isFullHeightProperty !== null) {
|
|
1502
|
+
isFullHeight = isFullHeightProperty === "Yes";
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
carouselOptions = {
|
|
1506
|
+
secondsPerImage,
|
|
1507
|
+
isFullWidth,
|
|
1508
|
+
isFullHeight
|
|
1509
|
+
};
|
|
1496
1510
|
}
|
|
1497
1511
|
properties.images = images;
|
|
1498
1512
|
properties.variant = variant;
|
|
1499
|
-
properties.carouselOptions =
|
|
1500
|
-
secondsPerImage,
|
|
1501
|
-
isFullWidth,
|
|
1502
|
-
isFullHeight
|
|
1503
|
-
} : null;
|
|
1513
|
+
properties.carouselOptions = carouselOptions;
|
|
1504
1514
|
properties.imageQuality = imageQuality;
|
|
1505
1515
|
properties.captionLayout = captionLayout;
|
|
1506
1516
|
properties.captionSource = captionSource;
|
package/package.json
CHANGED