@trafilea/afrodita-components 6.11.0 → 6.11.1
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/build/index.d.ts +26 -11
- package/build/index.esm.js +36 -34
- package/build/index.esm.js.map +1 -1
- package/build/index.js +37 -33
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3377,7 +3377,9 @@ var buildImageUrl = function (_a) {
|
|
|
3377
3377
|
var source = "/external/".concat(baseUrl.host.replaceAll('.', ''));
|
|
3378
3378
|
var width = getValidSize(widthString);
|
|
3379
3379
|
var height = getValidSize(heightString);
|
|
3380
|
-
|
|
3380
|
+
var format = src.includes('.svg') ? '&format=svg' : '';
|
|
3381
|
+
var params = "width=".concat(width, "&height=").concat(height, "&quality=").concat(quality, "&url=").concat(url).concat(format);
|
|
3382
|
+
return "".concat(cdn).concat(source, "/images").concat(baseUrl.pathname, "?").concat(params);
|
|
3381
3383
|
}
|
|
3382
3384
|
catch (e) {
|
|
3383
3385
|
console.warn("[Afrodita][buildImageUrl] [src:".concat(src, "] ERROR:").concat(e));
|
|
@@ -4528,38 +4530,6 @@ var decimalFormat = function (number) {
|
|
|
4528
4530
|
return number.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
|
4529
4531
|
};
|
|
4530
4532
|
|
|
4531
|
-
var isEmpty = function (value) {
|
|
4532
|
-
return value.length === 0;
|
|
4533
|
-
};
|
|
4534
|
-
var isEmail = function (value) {
|
|
4535
|
-
return /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(value);
|
|
4536
|
-
};
|
|
4537
|
-
var isNumber$1 = function (value) {
|
|
4538
|
-
return /^[0-9]*$/.test(value);
|
|
4539
|
-
};
|
|
4540
|
-
var isPhoneNumber = function (value) {
|
|
4541
|
-
return /^\d{10}$/.test(value);
|
|
4542
|
-
};
|
|
4543
|
-
var isValidDate = function (value) {
|
|
4544
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(value);
|
|
4545
|
-
};
|
|
4546
|
-
|
|
4547
|
-
var mouseClickEvents = ['mousedown', 'click', 'mouseup'];
|
|
4548
|
-
var simulateMouseClick = function (element) {
|
|
4549
|
-
mouseClickEvents.forEach(function (mouseEventType) {
|
|
4550
|
-
return element.dispatchEvent(new MouseEvent(mouseEventType, {
|
|
4551
|
-
view: window,
|
|
4552
|
-
bubbles: true,
|
|
4553
|
-
cancelable: true,
|
|
4554
|
-
buttons: 1,
|
|
4555
|
-
}));
|
|
4556
|
-
});
|
|
4557
|
-
};
|
|
4558
|
-
|
|
4559
|
-
var sliceString = function (str, maxLength) {
|
|
4560
|
-
return str.length > maxLength ? "".concat(str.slice(0, maxLength), "...") : str;
|
|
4561
|
-
};
|
|
4562
|
-
|
|
4563
4533
|
var getSrcSet = function (imgLink) {
|
|
4564
4534
|
var breakpoints = [];
|
|
4565
4535
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -4655,6 +4625,38 @@ var mediaQueries = index$2(["@media(max-width: 900px)", "@media(min-width: 900px
|
|
|
4655
4625
|
literal: true,
|
|
4656
4626
|
});
|
|
4657
4627
|
|
|
4628
|
+
var mouseClickEvents = ['mousedown', 'click', 'mouseup'];
|
|
4629
|
+
var simulateMouseClick = function (element) {
|
|
4630
|
+
mouseClickEvents.forEach(function (mouseEventType) {
|
|
4631
|
+
return element.dispatchEvent(new MouseEvent(mouseEventType, {
|
|
4632
|
+
view: window,
|
|
4633
|
+
bubbles: true,
|
|
4634
|
+
cancelable: true,
|
|
4635
|
+
buttons: 1,
|
|
4636
|
+
}));
|
|
4637
|
+
});
|
|
4638
|
+
};
|
|
4639
|
+
|
|
4640
|
+
var sliceString = function (str, maxLength) {
|
|
4641
|
+
return str.length > maxLength ? "".concat(str.slice(0, maxLength), "...") : str;
|
|
4642
|
+
};
|
|
4643
|
+
|
|
4644
|
+
var isEmpty = function (value) {
|
|
4645
|
+
return value.length === 0;
|
|
4646
|
+
};
|
|
4647
|
+
var isEmail = function (value) {
|
|
4648
|
+
return /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(value);
|
|
4649
|
+
};
|
|
4650
|
+
var isNumber$1 = function (value) {
|
|
4651
|
+
return /^[0-9]*$/.test(value);
|
|
4652
|
+
};
|
|
4653
|
+
var isPhoneNumber = function (value) {
|
|
4654
|
+
return /^\d{10}$/.test(value);
|
|
4655
|
+
};
|
|
4656
|
+
var isValidDate = function (value) {
|
|
4657
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(value);
|
|
4658
|
+
};
|
|
4659
|
+
|
|
4658
4660
|
var ErrorText = newStyled.h3(templateObject_1$1O || (templateObject_1$1O = __makeTemplateObject(["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"], ["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"])), function (props) { return props.color; });
|
|
4659
4661
|
var ErrorContainer = newStyled.div(templateObject_2$1c || (templateObject_2$1c = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 12px;\n"], ["\n display: flex;\n align-items: center;\n margin-top: 12px;\n"])));
|
|
4660
4662
|
var Error$1 = function (_a) {
|
|
@@ -19951,6 +19953,8 @@ exports.Tooltip = Tooltip;
|
|
|
19951
19953
|
exports.Totals = Totals;
|
|
19952
19954
|
exports.TrackingProgress = TrackingProgress;
|
|
19953
19955
|
exports.TrackingProgressV2 = TrackingProgressV2;
|
|
19956
|
+
exports.Video = Video$1;
|
|
19957
|
+
exports.buildImageUrl = buildImageUrl;
|
|
19954
19958
|
exports.componentSizeMapper = componentSizeMapper;
|
|
19955
19959
|
exports.css = css;
|
|
19956
19960
|
exports.decimalFormat = decimalFormat;
|