@citygross/components 0.7.192 → 0.7.193

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.
@@ -1,7 +1,7 @@
1
- import { TMaxHeightText } from './MaxHeightText';
1
+ import { MaxHeightText, TMaxHeightText } from './MaxHeightText';
2
2
  import { Story } from '@storybook/react';
3
3
  declare const _default: {
4
- component: any;
4
+ component: typeof MaxHeightText;
5
5
  title: string;
6
6
  };
7
7
  export default _default;
@@ -375,6 +375,25 @@ var zipRegex = /(^\d{5}$)|(^\d{3} \d{2}$)/;
375
375
  var emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
376
376
  var validateInput = function (input, regex) { return regex.test(input); };
377
377
 
378
+ var makeCateringPortionsString = function (variant, cartItem, unit) {
379
+ var _a, _b;
380
+ if (unit !== 'per person')
381
+ return;
382
+ var qString = '';
383
+ if ((variant === null || variant === void 0 ? void 0 : variant.quantityFrom) || (variant === null || variant === void 0 ? void 0 : variant.quantityTo)) {
384
+ if (variant === null || variant === void 0 ? void 0 : variant.quantityFrom)
385
+ qString += variant === null || variant === void 0 ? void 0 : variant.quantityFrom;
386
+ if (variant === null || variant === void 0 ? void 0 : variant.quantityTo)
387
+ qString += " - ".concat(variant === null || variant === void 0 ? void 0 : variant.quantityTo);
388
+ }
389
+ else {
390
+ qString = (variant === null || variant === void 0 ? void 0 : variant.quantityFrom)
391
+ ? (_a = variant === null || variant === void 0 ? void 0 : variant.quantityFrom) === null || _a === void 0 ? void 0 : _a.toString()
392
+ : (_b = cartItem === null || cartItem === void 0 ? void 0 : cartItem.value) === null || _b === void 0 ? void 0 : _b.toString();
393
+ }
394
+ return qString;
395
+ };
396
+
378
397
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof _commonjsHelpers.commonjsGlobal !== 'undefined' ? _commonjsHelpers.commonjsGlobal : typeof self !== 'undefined' ? self : {};
379
398
 
380
399
  function commonjsRequire (path) {
@@ -18649,6 +18668,7 @@ index.__exports.formatPrice = formatPrice;
18649
18668
  index.__exports.formatPriceWithDecimalsReduced = formatPriceWithDecimalsReduced;
18650
18669
  index.__exports.getCountryFromLanguageCode = getCountryFromLanguageCode;
18651
18670
  index.__exports.languageCodeToCountryMap = languageCodeToCountryMap;
18671
+ index.__exports.makeCateringPortionsString = makeCateringPortionsString;
18652
18672
  index.__exports.moment = moment;
18653
18673
  index.__exports.nameRegex = nameRegex;
18654
18674
  index.__exports.phoneRegex = phoneRegex;