@bigbinary/neeto-site-blocks 1.8.27 → 1.8.28
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.js +36 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +36 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4937,20 +4937,20 @@ var blendColors = function blendColors(_ref2) {
|
|
|
4937
4937
|
// Generate the final blended color string in hex format
|
|
4938
4938
|
return "#".concat((r << 16 | g << 8 | b).toString(16).padStart(6, "0"));
|
|
4939
4939
|
};
|
|
4940
|
-
var validateUrl = function validateUrl(url) {
|
|
4941
|
-
return url ? validateYouTubeUrl(url) || validateLoomUrl(url) || validateVimeoUrl(url) : false;
|
|
4940
|
+
var validateUrl = function validateUrl(url, autoPlay) {
|
|
4941
|
+
return url ? validateYouTubeUrl(url, autoPlay) || validateLoomUrl(url, autoPlay) || validateVimeoUrl(url, autoPlay) : false;
|
|
4942
4942
|
};
|
|
4943
|
-
var validateYouTubeUrl = function validateYouTubeUrl(url) {
|
|
4943
|
+
var validateYouTubeUrl = function validateYouTubeUrl(url, autoPlay) {
|
|
4944
4944
|
var match = url.match(YOUTUBE_URL_REGEXP);
|
|
4945
|
-
return match && "https://www.youtube.com/embed/".concat(match[5]);
|
|
4945
|
+
return match && "https://www.youtube.com/embed/".concat(match[5]).concat(autoPlay ? "?autoplay=1" : "");
|
|
4946
4946
|
};
|
|
4947
|
-
var validateVimeoUrl = function validateVimeoUrl(url) {
|
|
4947
|
+
var validateVimeoUrl = function validateVimeoUrl(url, autoPlay) {
|
|
4948
4948
|
var match = url.match(VIMEO_URL_REGEXP);
|
|
4949
|
-
return match && "https://player.vimeo.com/video/".concat(match[4], "?h=").concat(match[5]);
|
|
4949
|
+
return match && "https://player.vimeo.com/video/".concat(match[4], "?h=").concat(match[5]).concat(autoPlay ? "&autoplay=1" : "");
|
|
4950
4950
|
};
|
|
4951
|
-
var validateLoomUrl = function validateLoomUrl(url) {
|
|
4951
|
+
var validateLoomUrl = function validateLoomUrl(url, autoPlay) {
|
|
4952
4952
|
var match = url.match(LOOM_URL_REGEXP);
|
|
4953
|
-
return match && "https://www.loom.com/embed/".concat(match[4], "?t=").concat(match[5] || "");
|
|
4953
|
+
return match && "https://www.loom.com/embed/".concat(match[4], "?t=").concat(match[5] || "").concat(autoPlay ? "&autoplay=1" : "");
|
|
4954
4954
|
};
|
|
4955
4955
|
var applyResponsiveClasses = function applyResponsiveClasses(_ref3) {
|
|
4956
4956
|
var fieldValue = _ref3.fieldValue,
|
|
@@ -16265,7 +16265,7 @@ var useBreakpoints = function useBreakpoints(breakpointOverrides) {
|
|
|
16265
16265
|
};
|
|
16266
16266
|
var useBreakpoints$1 = useBreakpoints;
|
|
16267
16267
|
|
|
16268
|
-
var _excluded$v = ["isEmbedded", "src", "design", "videoUrl"];
|
|
16268
|
+
var _excluded$v = ["isEmbedded", "src", "design", "videoUrl", "autoPlay"];
|
|
16269
16269
|
function ownKeys$i(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16270
16270
|
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16271
16271
|
var Media = function Media(_ref) {
|
|
@@ -16273,17 +16273,21 @@ var Media = function Media(_ref) {
|
|
|
16273
16273
|
src = _ref.src,
|
|
16274
16274
|
design = _ref.design,
|
|
16275
16275
|
videoUrl = _ref.videoUrl,
|
|
16276
|
+
autoPlay = _ref.autoPlay,
|
|
16276
16277
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$v);
|
|
16277
16278
|
if (isEmbedded) {
|
|
16278
16279
|
var _design$width;
|
|
16279
|
-
return videoUrl && /*#__PURE__*/React__default["default"].createElement(
|
|
16280
|
+
return videoUrl && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
16281
|
+
className: "relative h-0 w-full overflow-hidden pb-[56.25%]"
|
|
16282
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
|
|
16280
16283
|
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
16281
16284
|
as: "iframe",
|
|
16285
|
+
className: "absolute left-0 top-0 h-full w-full border-0",
|
|
16282
16286
|
design: dissoc("width", design),
|
|
16283
16287
|
height: "300px",
|
|
16284
|
-
src: validateUrl(videoUrl),
|
|
16288
|
+
src: validateUrl(videoUrl, autoPlay),
|
|
16285
16289
|
width: "".concat((_design$width = design === null || design === void 0 ? void 0 : design.width) !== null && _design$width !== void 0 ? _design$width : "100", "%")
|
|
16286
|
-
});
|
|
16290
|
+
}));
|
|
16287
16291
|
}
|
|
16288
16292
|
return /*#__PURE__*/React__default["default"].createElement(StyledImage$1, _objectSpread$i({
|
|
16289
16293
|
design: design,
|
|
@@ -39462,15 +39466,17 @@ var Embed = function Embed(_ref) {
|
|
|
39462
39466
|
enableAnimation = properties.enableAnimation;
|
|
39463
39467
|
return /*#__PURE__*/React__default["default"].createElement(BlockWrapper, {
|
|
39464
39468
|
className: className,
|
|
39465
|
-
design: design.body,
|
|
39466
39469
|
enableAnimation: enableAnimation,
|
|
39467
39470
|
id: id,
|
|
39468
|
-
|
|
39469
|
-
|
|
39471
|
+
design: design.body,
|
|
39472
|
+
nestedClassName: "h-full flex items-center justify-center"
|
|
39473
|
+
}, neetoCist.isNotEmpty(content) ? /*#__PURE__*/React__default["default"].createElement(Interweave, {
|
|
39474
|
+
content: content,
|
|
39470
39475
|
allowList: ["iframe"],
|
|
39471
|
-
className: "ns-embed-block flex h-
|
|
39472
|
-
|
|
39473
|
-
|
|
39476
|
+
className: "ns-embed-block relative flex h-0 w-full pb-[56.25%] lg:static lg:pb-0"
|
|
39477
|
+
}) : /*#__PURE__*/React__default["default"].createElement(Typography$1, {
|
|
39478
|
+
className: "text-center font-semibold"
|
|
39479
|
+
}, "No content to display"));
|
|
39474
39480
|
};
|
|
39475
39481
|
|
|
39476
39482
|
var _excluded$l = ["configurations", "className", "id"],
|
|
@@ -39677,6 +39683,7 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
|
|
|
39677
39683
|
mediaPosition = _properties$media.position,
|
|
39678
39684
|
isEmbedded = _properties$media.isEmbedded,
|
|
39679
39685
|
videoUrl = _properties$media.videoUrl,
|
|
39686
|
+
autoPlay = _properties$media.autoPlay,
|
|
39680
39687
|
src = properties.backgroundImage.src;
|
|
39681
39688
|
var mediaURL = isEmbedded ? videoUrl : imageUrl;
|
|
39682
39689
|
var baseClasses = "grid grid-cols-12 items-center sm:gap-x-2 lg:gap-x-4 grid-flow-row-dense";
|
|
@@ -39740,6 +39747,7 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
|
|
|
39740
39747
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
39741
39748
|
className: mediaBaseClasses
|
|
39742
39749
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
39750
|
+
autoPlay: autoPlay,
|
|
39743
39751
|
isEmbedded: isEmbedded,
|
|
39744
39752
|
videoUrl: videoUrl,
|
|
39745
39753
|
design: design.media,
|
|
@@ -39769,6 +39777,7 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
|
|
|
39769
39777
|
imageURL = _properties$media.src,
|
|
39770
39778
|
isEmbedded = _properties$media.isEmbedded,
|
|
39771
39779
|
videoUrl = _properties$media.videoUrl,
|
|
39780
|
+
autoPlay = _properties$media.autoPlay,
|
|
39772
39781
|
src = properties.backgroundImage.src;
|
|
39773
39782
|
var baseClasses = "grid grid-cols-12 gap-4";
|
|
39774
39783
|
var gridClasses = function gridClasses(index) {
|
|
@@ -39798,6 +39807,7 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
|
|
|
39798
39807
|
id: "feature-with-grid-description",
|
|
39799
39808
|
style: design.description
|
|
39800
39809
|
}, otherProps), description), /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
39810
|
+
autoPlay: autoPlay,
|
|
39801
39811
|
isEmbedded: isEmbedded,
|
|
39802
39812
|
videoUrl: videoUrl,
|
|
39803
39813
|
className: "m-auto",
|
|
@@ -39858,6 +39868,7 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
|
|
|
39858
39868
|
mediaPosition = _properties$media.position,
|
|
39859
39869
|
isEmbedded = _properties$media.isEmbedded,
|
|
39860
39870
|
videoUrl = _properties$media.videoUrl,
|
|
39871
|
+
autoPlay = _properties$media.autoPlay,
|
|
39861
39872
|
src = properties.backgroundImage.src;
|
|
39862
39873
|
var mediaURL = isEmbedded ? videoUrl : imageUrl;
|
|
39863
39874
|
var baseClasses = "grid grid-cols-12 items-center grid-flow-row-dense";
|
|
@@ -39891,6 +39902,7 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
|
|
|
39891
39902
|
}, otherProps), description)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
39892
39903
|
className: mediaBaseClasses
|
|
39893
39904
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
39905
|
+
autoPlay: autoPlay,
|
|
39894
39906
|
isEmbedded: isEmbedded,
|
|
39895
39907
|
videoUrl: videoUrl,
|
|
39896
39908
|
design: design.media,
|
|
@@ -39974,6 +39986,7 @@ var FeatureWithList = function FeatureWithList(_ref) {
|
|
|
39974
39986
|
mediaPosition = _properties$media.position,
|
|
39975
39987
|
isEmbedded = _properties$media.isEmbedded,
|
|
39976
39988
|
videoUrl = _properties$media.videoUrl,
|
|
39989
|
+
autoPlay = _properties$media.autoPlay,
|
|
39977
39990
|
src = properties.backgroundImage.src;
|
|
39978
39991
|
var mediaURL = isEmbedded ? videoUrl : imageURL;
|
|
39979
39992
|
var baseClasses = "grid grid-cols-12 lg:gap-x-4 sm:gap-x-2 items-center grid-flow-row-dense";
|
|
@@ -40032,6 +40045,7 @@ var FeatureWithList = function FeatureWithList(_ref) {
|
|
|
40032
40045
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40033
40046
|
className: mediaBaseClasses
|
|
40034
40047
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
40048
|
+
autoPlay: autoPlay,
|
|
40035
40049
|
isEmbedded: isEmbedded,
|
|
40036
40050
|
videoUrl: videoUrl,
|
|
40037
40051
|
design: design.media,
|
|
@@ -40157,6 +40171,7 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
|
|
|
40157
40171
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40158
40172
|
className: imageBaseClasses
|
|
40159
40173
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
40174
|
+
autoPlay: features[selectedTabId - 1].media.autoPlay,
|
|
40160
40175
|
design: design.media,
|
|
40161
40176
|
disableButtonAndLinks: otherProps.disableButtonAndLinks,
|
|
40162
40177
|
id: "feature-with-progress-bar-".concat(selectedTabId - 1, "-media"),
|
|
@@ -43045,6 +43060,7 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
|
|
|
43045
43060
|
mediaPosition = _properties$media.position,
|
|
43046
43061
|
isEmbedded = _properties$media.isEmbedded,
|
|
43047
43062
|
videoUrl = _properties$media.videoUrl,
|
|
43063
|
+
autoPlay = _properties$media.autoPlay,
|
|
43048
43064
|
src = properties.backgroundImage.src;
|
|
43049
43065
|
var mediaURL = isEmbedded ? videoUrl : imageURL;
|
|
43050
43066
|
var baseClasses = "grid sm:gap-x-6 gap-y-6 grid-cols-12 items-center grid-flow-row-dense";
|
|
@@ -43105,6 +43121,7 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
|
|
|
43105
43121
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
43106
43122
|
className: mediaBaseClasses
|
|
43107
43123
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
43124
|
+
autoPlay: autoPlay,
|
|
43108
43125
|
isEmbedded: isEmbedded,
|
|
43109
43126
|
videoUrl: videoUrl,
|
|
43110
43127
|
design: design.media,
|
|
@@ -43232,6 +43249,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
43232
43249
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
43233
43250
|
disableButtonAndLinks: disableButtonAndLinks,
|
|
43234
43251
|
index: index,
|
|
43252
|
+
autoPlay: media.autoPlay,
|
|
43235
43253
|
design: design.media,
|
|
43236
43254
|
id: "hero-with-gallery-slide-".concat(index, "-media"),
|
|
43237
43255
|
isEmbedded: media.isEmbedded,
|