@commercetools-frontend/experimental-components 6.4.5 → 6.4.6

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.
@@ -2513,1930 +2513,211 @@ const useProductSelectionsFetcher = props => {
2513
2513
  };
2514
2514
  var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
2515
2515
 
2516
- const setToArray = function () {
2517
- let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
2518
- return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
2519
- };
2516
+ const _excluded$d = ["action"];
2517
+ function ownKeys$16(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
2518
+ function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context0 = ownKeys$16(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context1 = ownKeys$16(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2520
2519
 
2521
- function capitalizeFirst(text) {
2522
- return text.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](text).call(text, 1);
2523
- }
2520
+ /**
2521
+ * Checks if a value is a LocalizedString
2522
+ *
2523
+ * { en: 'Hello' } -> true
2524
+ * 'Hello' -> false
2525
+ */
2524
2526
 
2525
- const PRODUCT_STATUSES = {
2526
- PUBLISHED: 'published',
2527
- UNPUBLISHED: 'unpublished',
2528
- MODIFIED: 'modified'
2529
- };
2530
- const FILTER_TYPES = {
2531
- lessThan: 'lessThan',
2532
- moreThan: 'moreThan',
2533
- equalTo: 'equalTo',
2534
- range: 'range',
2535
- missing: 'missing',
2536
- missingIn: 'missingIn',
2537
- in: 'in'
2538
- };
2539
- const FIELD_TYPES = {
2540
- Money: 'Money',
2541
- LocalizedString: 'LocalizedString',
2542
- Time: 'Time',
2543
- DateTime: 'DateTime',
2544
- Boolean: 'Boolean',
2545
- String: 'String',
2546
- Enum: 'Enum',
2547
- LocalizedEnum: 'LocalizedEnum',
2548
- Number: 'Number',
2549
- Date: 'Date',
2550
- Reference: 'Reference',
2551
- Set: 'Set'
2552
- };
2553
- const PRECISION_TYPES = {
2554
- highPrecision: 'highPrecision',
2555
- centPrecision: 'centPrecision'
2527
+ const getIsLocalizedString = maybeLocalizedString => {
2528
+ if (typeof maybeLocalizedString === 'string') return false;
2529
+ if (!maybeLocalizedString || typeof maybeLocalizedString === 'object' && _Object$keys__default["default"](maybeLocalizedString).length === 0) return false;
2530
+ return true;
2556
2531
  };
2557
- const ERROR_CODES = {
2558
- semanticError: 'SemanticError',
2559
- invalidInput: 'InvalidInput'
2532
+
2533
+ /**
2534
+ * Transforms a list of `CustomField` into a `CustomField` object
2535
+ *
2536
+ * [{ name: 'fieldA', value: 'Hello' }] -> { fieldA: 'Hello' }
2537
+ */
2538
+ const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
2539
+ if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
2540
+ return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$16(_objectSpread$16({}, customFields), {}, {
2541
+ [customField.name]: customField.value
2542
+ }), {});
2560
2543
  };
2561
- const DefaultPageSizes = [20, 50, 100];
2562
- DefaultPageSizes[0];
2563
2544
 
2564
- const regexpData = /^data-/;
2565
- function filterDataAttributes(obj) {
2566
- var _context, _context2;
2567
- return _reduceInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](obj)).call(_context2, p => regexpData.test(p))).call(_context, (acc, p) => {
2568
- // eslint-disable-next-line no-param-reassign
2569
- acc[p] = obj[p];
2570
- return acc;
2571
- }, {});
2572
- }
2545
+ // --- Types mapping ---
2573
2546
 
2574
- const invalidValues$1 = [null, undefined, ''];
2575
- function isEmpty$2(_ref) {
2576
- let value = _ref.value;
2577
- return _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value) || _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.from) && _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.to);
2547
+ /**
2548
+ * Map category GraphQL shape with nameAllLocales to reference shape
2549
+ * Includes ancestors and parent
2550
+ *
2551
+ * @param {Object} category - A category result object from graphql
2552
+ * @return {Object} Category (as a REST API representation):
2553
+ * `{ id, obj: { id, name } }`
2554
+ */
2555
+ function transformLocalizedFieldsForCategory(category) {
2556
+ var _context;
2557
+ let transformationOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
2558
+ from: 'nameAllLocales',
2559
+ to: 'name'
2560
+ }];
2561
+ const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
2562
+ const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
2563
+ const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
2564
+ return _objectSpread$16(_objectSpread$16(_objectSpread$16({}, transformedData), parent ? {
2565
+ parent
2566
+ } : {}), ancestors ? {
2567
+ ancestors
2568
+ } : {});
2578
2569
  }
2579
-
2580
- const invalidValues = [null, undefined, ''];
2581
- function validateSingleFilter(_ref) {
2582
- let value = _ref.value;
2583
- return _includesInstanceProperty__default["default"](invalidValues).call(invalidValues, value);
2570
+ function transformLocalizedFieldsForCartDiscount(cartDiscount) {
2571
+ const transformationOptions = [{
2572
+ from: 'nameAllLocales',
2573
+ to: 'name'
2574
+ }];
2575
+ return l10n.applyTransformedLocalizedFields(cartDiscount, transformationOptions);
2584
2576
  }
2585
-
2586
- const dateFormatDayStart$1 = 'YYYY-MM-DDT00:00:00.000';
2587
- const dateFormatDayEnd$1 = 'YYYY-MM-DDT23:59:59.999';
2588
- const getDateTimeInUTC = (date, timezone, format) => {
2589
- const dateFormat = 'YYYY-MM-DDTHH:mm:ss.SSS';
2590
- const momentDate = moment__default["default"](date);
2591
- // check if the date is date only or datetime
2592
- const noTimeSpecified = momentDate.hours() === 0 && momentDate.minutes() === 0 && momentDate.seconds() === 0;
2593
- // if it's a date then convert it to UTC datetime based on timezone
2594
- if (noTimeSpecified) {
2595
- const offset = moment__default["default"](date).tz(timezone)?.utcOffset() || 0;
2596
- const formattedDate = momentDate.format(format);
2597
- const formattedDateWithOffset = moment__default["default"](formattedDate).add(offset, 'minutes').format(dateFormat);
2598
- // console.log(formattedDateWithOffset);
2599
- return formattedDateWithOffset;
2600
- }
2601
- // if it's a datetime we assume that it's already in UTC
2602
- // and just return it
2603
- return date;
2604
- };
2605
- function dateTransformer$1(filterKey, filters) {
2606
- let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator$1;
2607
- const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
2608
- let type = _ref.type,
2609
- value = _ref.value,
2610
- timezone = _ref.timezone;
2611
- if (!filterValidator({
2612
- type,
2613
- value
2614
- })) return '';
2615
- switch (type) {
2616
- case FILTER_TYPES.lessThan:
2617
- return `${filterKey} < "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"`;
2618
- case FILTER_TYPES.moreThan:
2619
- return `${filterKey} > "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}"`;
2620
- case FILTER_TYPES.equalTo:
2621
- return oneLine__default["default"]`
2622
- (${filterKey} >= "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"
2623
- and ${filterKey} <= "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}")
2624
- `;
2625
- case FILTER_TYPES.range:
2626
- return oneLine__default["default"]`
2627
- (${filterKey} >= "${getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1)}"
2628
- and ${filterKey} <= "${getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1)}")
2629
- `;
2630
- default:
2631
- return '';
2577
+ function mapShippingRateTierToGraphQL(tiers) {
2578
+ return _reduceInstanceProperty__default["default"](tiers).call(tiers, (graphQlTiers, tier) => [...graphQlTiers, {
2579
+ [tier.type]: {
2580
+ price: tier.price ? {
2581
+ centAmount: tier.price.centAmount,
2582
+ currencyCode: tier.price.currencyCode
2583
+ } : undefined,
2584
+ minimumCentAmount: tier.minimumCentAmount,
2585
+ value: tier.value || undefined,
2586
+ priceFunction: tier.priceFunction ? {
2587
+ function: tier.priceFunction.function,
2588
+ currencyCode: tier.priceFunction.currencyCode
2589
+ } : undefined,
2590
+ score: tier.score
2632
2591
  }
2633
- });
2634
-
2635
- // The separator is and `or` as they are the same filter
2636
- const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
2637
-
2638
- /* The parenthesis involing the `queryString` are needed since they are all part of the
2639
- * same filter so we need something to work with
2640
- * (
2641
- * (createdAt >= "2018-04-25T00:00:00.000+02:00" and createdAt <= "2018-04-25T23:59:59.999+02:00") o
2642
- * (createdAt >= "2018-02-15T00:00:00.000+01:00" and createdAt <= "2018-02-15T23:59:59.999+01:00")
2643
- * ) or some_more_filters
2644
- */
2645
- return queryString === '' ? null : `(${queryString})`;
2646
- }
2647
- function defaultFilterValidator$1(_ref2) {
2648
- let type = _ref2.type,
2649
- value = _ref2.value;
2650
- if (type !== 'range' && (validateSingleFilter({
2651
- value
2652
- }) || !moment__default["default"](value).isValid())) return false;
2653
- if (type === 'range' && (isEmpty$2({
2654
- value
2655
- }) || !moment__default["default"](value.from).isValid() || !moment__default["default"](value.to).isValid())) return false;
2656
- return true;
2592
+ }], []);
2657
2593
  }
2658
2594
 
2659
- var localizedTextTransformer = localizedString => {
2660
- var _context;
2661
- return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
2595
+ /**
2596
+ * NOTE:
2597
+ * This module massages update actions produced by the JS SDK
2598
+ * to be compatible with CTP GraphQL mutations. This logic should be
2599
+ * moved into the JS SDK once discounts is fully 100% migrated to
2600
+ * GraphQL or any other plugin/app needs this functionality. Until
2601
+ * then this serves as a collective set of requirements before
2602
+ * prematurely adding a not fully working set of conversions to the
2603
+ * JS SDK.
2604
+ */
2605
+
2606
+ const createAttributeTypeValue = attribute => {
2607
+ switch (attribute.type.name) {
2608
+ case 'set':
2609
+ return {
2610
+ set: {
2611
+ elementType: createAttributeTypeValue({
2612
+ type: attribute.type.elementType
2613
+ })
2614
+ }
2615
+ };
2616
+ case 'boolean':
2617
+ case 'date':
2618
+ case 'datetime':
2619
+ case 'ltext':
2620
+ case 'money':
2621
+ case 'number':
2622
+ case 'text':
2623
+ case 'time':
2624
+ return {
2625
+ [attribute.type.name]: {}
2626
+ };
2627
+ case 'enum':
2628
+ case 'lenum':
2629
+ return {
2630
+ [attribute.type.name]: {
2631
+ values: []
2632
+ }
2633
+ };
2634
+ case 'reference':
2635
+ {
2636
+ return {
2637
+ [attribute.type.name]: {
2638
+ referenceTypeId: attribute.type.referenceTypeId
2639
+ }
2640
+ };
2641
+ }
2642
+ default:
2643
+ return attribute.type;
2644
+ }
2662
2645
  };
2663
2646
 
2664
- const getCentAmountClause = (value, operator, locale) => `centAmount ${operator} ${uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount}`;
2665
- function moneyTransformer(value, option, locale) {
2666
- const clauses = [];
2667
- if (option === FILTER_TYPES.range) {
2668
- clauses[0] = `currencyCode = "${value.from.currencyCode}"`;
2669
- clauses[1] = getCentAmountClause(value.from, '>=', locale);
2670
- clauses[2] = getCentAmountClause(value.to, '<=', locale);
2671
- return clauses.join(' and ');
2672
- }
2673
- clauses[0] = `currencyCode = "${value.currencyCode}"`;
2674
- switch (option) {
2675
- case FILTER_TYPES.lessThan:
2676
- clauses[1] = getCentAmountClause(value, '<', locale);
2677
- break;
2678
- case FILTER_TYPES.moreThan:
2679
- clauses[1] = getCentAmountClause(value, '>', locale);
2680
- break;
2681
- case FILTER_TYPES.equalTo:
2682
- clauses[1] = getCentAmountClause(value, '=', locale);
2683
- break;
2647
+ /*
2648
+ * Fixed price supports high precision. Action format is nested with the
2649
+ * the type of the money. Absolute discount only works with cent precision,
2650
+ * hence the action structure is flat.
2651
+ */
2652
+ const formatMoney$2 = valueType => money => {
2653
+ switch (valueType) {
2654
+ case 'fixed':
2655
+ case 'fixedCart':
2656
+ return {
2657
+ [money.type]: _objectSpread$16({
2658
+ centAmount: money.centAmount,
2659
+ currencyCode: money.currencyCode
2660
+ }, money.type === PRECISION_TYPES.highPrecision && {
2661
+ preciseAmount: money.preciseAmount,
2662
+ fractionDigits: money.fractionDigits
2663
+ })
2664
+ };
2665
+ case 'absolute':
2666
+ case 'absoluteCart':
2667
+ return {
2668
+ centAmount: money.centAmount,
2669
+ currencyCode: money.currencyCode
2670
+ };
2684
2671
  default:
2685
- return '';
2672
+ throw new Error('Unexpected value type for money.');
2686
2673
  }
2687
- return clauses.join(' and ');
2688
- }
2689
-
2690
- const formatTime = 'HH:mm:ss.SSS';
2674
+ };
2691
2675
 
2692
- /* TimeInput only allows HH:mm:ss and adds the seconds as 00 and
2693
- * the milliseconds always as 000.
2694
- * This function returns the same time with the
2676
+ /**
2677
+ * converts the `changeValue` action to GraphQL actions variable
2678
+ * @param {Object} actionPayload
2695
2679
  */
2696
- const getEndOfSecond = value => moment__default["default"](value, formatTime).endOf('minute').format(formatTime);
2697
- const defaultFilterValidator = _ref => {
2698
- let type = _ref.type,
2699
- value = _ref.value;
2700
- if (type !== FILTER_TYPES.range && validateSingleFilter({
2701
- value
2702
- })) return false;
2703
- if (type === FILTER_TYPES.range && isEmpty$2({
2704
- value
2705
- })) return false;
2706
- return true;
2707
- };
2708
- const timeTransformer = function (filterKey, filters) {
2709
- let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator;
2710
- const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref2 => {
2711
- let type = _ref2.type,
2712
- value = _ref2.value;
2713
- if (!filterValidator({
2714
- type,
2715
- value
2716
- })) return '';
2717
- switch (type) {
2718
- case FILTER_TYPES.lessThan:
2719
- return `${filterKey} < "${value}"`;
2720
- case FILTER_TYPES.moreThan:
2721
- return `${filterKey} > "${value}"`;
2722
- case FILTER_TYPES.equalTo:
2723
- return oneLine__default["default"]`
2724
- (${filterKey} >= "${value}"
2725
- and ${filterKey} <= "${getEndOfSecond(value)}")
2726
- `;
2727
- case FILTER_TYPES.range:
2728
- return oneLine__default["default"]`
2729
- (${filterKey} >= "${value.from}"
2730
- and ${filterKey} <= "${getEndOfSecond(value.to)}")
2731
- `;
2732
- default:
2733
- return '';
2680
+ const convertChangeValueAction = actionPayload => {
2681
+ const valueType = actionPayload.value.type;
2682
+ const possibleTypeKeys = {
2683
+ relative: ['permyriad'],
2684
+ absolute: ['money'],
2685
+ absoluteCart: ['money', 'applicationMode'],
2686
+ fixed: ['money'],
2687
+ fixedCart: ['money', 'applicationMode'],
2688
+ giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
2689
+ };
2690
+ const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
2691
+ if (filteredValue.money) {
2692
+ var _context2;
2693
+ const moneyFormatter = formatMoney$2(valueType);
2694
+ filteredValue.money = _mapInstanceProperty__default["default"](_context2 = filteredValue.money).call(_context2, moneyFormatter);
2695
+ }
2696
+ return {
2697
+ changeValue: {
2698
+ value: {
2699
+ [valueType]: filteredValue
2700
+ }
2734
2701
  }
2735
- });
2736
-
2737
- // The separator is and `or` as they are the same filter
2738
- const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
2739
-
2740
- /* The parenthesis involing the `queryString` are needed since they are all part of the
2741
- * same filter so we need something to work with
2742
- * (
2743
- * (pickUpTime >= "12:00" and pickUpTime <= "13:00") o
2744
- * (pickUpTime >= "14:00" and pickUpTime <= "15:00")
2745
- * ) or some_more_filters
2746
- */
2747
- return queryString === '' ? null : `(${queryString})`;
2702
+ };
2748
2703
  };
2749
2704
 
2750
- function formatDateRangeValue(value, type) {
2751
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
2752
- locale: 'en',
2753
- timeZone: moment__default$1["default"].tz.guess()
2754
- };
2755
- if (value.from === value.to) return formatDateTime$1(type, value.from, options);
2756
- if (value.from && value.to) return oneLine__default["default"]`
2757
- ${formatDateTime$1(type, value.from, options)} -
2758
- ${formatDateTime$1(type, value.to, options)}
2759
- `;
2760
- if (value.from) return `from ${formatDateTime$1(type, value.from, options)}`;
2761
- if (value.to) return `to ${formatDateTime$1(type, value.to, options)}`;
2762
- return '';
2763
- }
2764
- function formatDateTime$1(type, value) {
2765
- let _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
2766
- _ref$locale = _ref.locale,
2767
- locale = _ref$locale === void 0 ? 'en' : _ref$locale,
2768
- _ref$timeZone = _ref.timeZone,
2769
- timeZone = _ref$timeZone === void 0 ? moment__default$1["default"].tz.guess() : _ref$timeZone;
2770
- switch (type) {
2771
- case 'time':
2772
- return moment__default$1["default"](value).tz(timeZone).locale(locale).format('LT');
2773
- case 'datetime':
2774
- return moment__default$1["default"](value).tz(timeZone).locale(locale).format('L LT');
2775
- case 'date':
2776
- return moment__default$1["default"](value).tz(timeZone).locale(locale).format('L');
2777
- default:
2778
- return value;
2779
- }
2780
- }
2781
-
2782
- /* This is is short-term solution that patches fraction digits not being available from the Dashboard backend.
2783
-
2784
- MIT License
2785
-
2786
- Copyright (c) 2020 Santosh Yadav
2787
-
2788
- Permission is hereby granted, free of charge, to any person obtaining a copy
2789
- of this software and associated documentation files (the "Software"), to deal
2790
- in the Software without restriction, including without limitation the rights
2791
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2792
- copies of the Software, and to permit persons to whom the Software is
2793
- furnished to do so, subject to the following conditions:
2794
- The above copyright notice and this permission notice shall be included in all
2795
- copies or substantial portions of the Software.
2796
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2797
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2798
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2799
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2800
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2801
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2802
- SOFTWARE.
2803
- */
2804
-
2805
- const currencyData = {
2806
- AED: {
2807
- isoCode: '784',
2808
- fractionDigit: 2,
2809
- currencyName: 'UAE Dirham',
2810
- countries: ['United Arab Emirates (The)']
2811
- },
2812
- AFN: {
2813
- isoCode: '971',
2814
- fractionDigit: 2,
2815
- currencyName: 'Afghani',
2816
- countries: ['Afghanistan']
2817
- },
2818
- ALL: {
2819
- isoCode: '008',
2820
- fractionDigit: 2,
2821
- currencyName: 'Lek',
2822
- countries: ['Albania']
2823
- },
2824
- AMD: {
2825
- isoCode: '051',
2826
- fractionDigit: 2,
2827
- currencyName: 'Armenian Dram',
2828
- countries: ['Armenia']
2829
- },
2830
- ANG: {
2831
- isoCode: '532',
2832
- fractionDigit: 2,
2833
- currencyName: 'Netherlands Antillean Guilder',
2834
- countries: ['Curaçao', 'Sint Maarten (Dutch Part)']
2835
- },
2836
- AOA: {
2837
- isoCode: '973',
2838
- fractionDigit: 2,
2839
- currencyName: 'Kwanza',
2840
- countries: ['Angola']
2841
- },
2842
- ARS: {
2843
- isoCode: '032',
2844
- fractionDigit: 2,
2845
- currencyName: 'Argentine Peso',
2846
- countries: ['Argentina']
2847
- },
2848
- AUD: {
2849
- isoCode: '036',
2850
- fractionDigit: 2,
2851
- currencyName: 'Australian Dollar',
2852
- countries: ['Australia', 'Christmas Island', 'Cocos (Keeling) Islands (The)', 'Heard Island and Mcdonald Islands', 'Kiribati', 'Nauru', 'Norfolk Island', 'Tuvalu']
2853
- },
2854
- AWG: {
2855
- isoCode: '533',
2856
- fractionDigit: 2,
2857
- currencyName: 'Aruban Florin',
2858
- countries: ['Aruba']
2859
- },
2860
- AZN: {
2861
- isoCode: '944',
2862
- fractionDigit: 2,
2863
- currencyName: 'Azerbaijan Manat',
2864
- countries: ['Azerbaijan']
2865
- },
2866
- BAM: {
2867
- isoCode: '977',
2868
- fractionDigit: 2,
2869
- currencyName: 'Convertible Mark',
2870
- countries: ['Bosnia and Herzegovina']
2871
- },
2872
- BBD: {
2873
- isoCode: '052',
2874
- fractionDigit: 2,
2875
- currencyName: 'Barbados Dollar',
2876
- countries: ['Barbados']
2877
- },
2878
- BDT: {
2879
- isoCode: '050',
2880
- fractionDigit: 2,
2881
- currencyName: 'Taka',
2882
- countries: ['Bangladesh']
2883
- },
2884
- BGN: {
2885
- isoCode: '975',
2886
- fractionDigit: 2,
2887
- symbol: 'лв',
2888
- unicode: 'лв',
2889
- htmlCode: 'лв',
2890
- hexCode: 'лв',
2891
- currencyName: 'Bulgarian Lev',
2892
- countries: ['Bulgaria']
2893
- },
2894
- BHD: {
2895
- isoCode: '048',
2896
- fractionDigit: 3,
2897
- currencyName: 'Bahraini Dinar',
2898
- countries: ['Bahrain']
2899
- },
2900
- BIF: {
2901
- isoCode: '108',
2902
- fractionDigit: 0,
2903
- currencyName: 'Burundi Franc',
2904
- countries: ['Burundi']
2905
- },
2906
- BMD: {
2907
- isoCode: '060',
2908
- fractionDigit: 2,
2909
- currencyName: 'Bermudian Dollar',
2910
- countries: ['Bermuda']
2911
- },
2912
- BND: {
2913
- isoCode: '096',
2914
- fractionDigit: 2,
2915
- currencyName: 'Brunei Dollar',
2916
- countries: ['Brunei Darussalam']
2917
- },
2918
- BOB: {
2919
- isoCode: '068',
2920
- fractionDigit: 2,
2921
- currencyName: 'Boliviano',
2922
- countries: ['Bolivia (Plurinational State Of)']
2923
- },
2924
- BOV: {
2925
- isoCode: '984',
2926
- fractionDigit: 2,
2927
- currencyName: 'Mvdol',
2928
- countries: ['Bolivia (Plurinational State Of)']
2929
- },
2930
- BRL: {
2931
- isoCode: '986',
2932
- fractionDigit: 2,
2933
- currencyName: 'Brazilian Real',
2934
- countries: ['Brazil']
2935
- },
2936
- BSD: {
2937
- isoCode: '044',
2938
- fractionDigit: 2,
2939
- currencyName: 'Bahamian Dollar',
2940
- countries: ['Bahamas (The)']
2941
- },
2942
- BTN: {
2943
- isoCode: '064',
2944
- fractionDigit: 2,
2945
- currencyName: 'Ngultrum',
2946
- countries: ['Bhutan']
2947
- },
2948
- BWP: {
2949
- isoCode: '072',
2950
- fractionDigit: 2,
2951
- currencyName: 'Pula',
2952
- countries: ['Botswana']
2953
- },
2954
- BYN: {
2955
- isoCode: '933',
2956
- fractionDigit: 2,
2957
- currencyName: 'Belarusian Ruble',
2958
- countries: ['Belarus']
2959
- },
2960
- BZD: {
2961
- isoCode: '084',
2962
- fractionDigit: 2,
2963
- currencyName: 'Belize Dollar',
2964
- countries: ['Belize']
2965
- },
2966
- CAD: {
2967
- isoCode: '124',
2968
- fractionDigit: 2,
2969
- currencyName: 'Canadian Dollar',
2970
- countries: ['Canada']
2971
- },
2972
- CDF: {
2973
- isoCode: '976',
2974
- fractionDigit: 2,
2975
- currencyName: 'Congolese Franc',
2976
- countries: ['Congo (The Democratic Republic of The)']
2977
- },
2978
- CHE: {
2979
- isoCode: '947',
2980
- fractionDigit: 2,
2981
- currencyName: 'WIR Euro',
2982
- countries: ['Switzerland']
2983
- },
2984
- CHF: {
2985
- isoCode: '756',
2986
- fractionDigit: 2,
2987
- symbol: 'CHF',
2988
- unicode: 'CHF',
2989
- htmlCode: 'CHF',
2990
- hexCode: 'CHF',
2991
- currencyName: 'Swiss Franc',
2992
- countries: ['Liechtenstein', 'Switzerland']
2993
- },
2994
- CHW: {
2995
- isoCode: '948',
2996
- fractionDigit: 2,
2997
- currencyName: 'WIR Franc',
2998
- countries: ['Switzerland']
2999
- },
3000
- CLF: {
3001
- isoCode: '990',
3002
- fractionDigit: 4,
3003
- currencyName: 'Unidad de Fomento',
3004
- countries: ['Chile']
3005
- },
3006
- CLP: {
3007
- isoCode: '152',
3008
- fractionDigit: 0,
3009
- currencyName: 'Chilean Peso',
3010
- countries: ['Chile']
3011
- },
3012
- CNY: {
3013
- isoCode: '156',
3014
- fractionDigit: 2,
3015
- currencyName: 'Yuan Renminbi',
3016
- countries: ['China']
3017
- },
3018
- COP: {
3019
- isoCode: '170',
3020
- fractionDigit: 2,
3021
- currencyName: 'Colombian Peso',
3022
- countries: ['Colombia']
3023
- },
3024
- COU: {
3025
- isoCode: '970',
3026
- fractionDigit: 2,
3027
- currencyName: 'Unidad de Valor Real',
3028
- countries: ['Colombia']
3029
- },
3030
- CRC: {
3031
- isoCode: '188',
3032
- fractionDigit: 2,
3033
- currencyName: 'Costa Rican Colon',
3034
- countries: ['Costa Rica']
3035
- },
3036
- CUC: {
3037
- isoCode: '931',
3038
- fractionDigit: 2,
3039
- currencyName: 'Peso Convertible',
3040
- countries: ['Cuba']
3041
- },
3042
- CUP: {
3043
- isoCode: '192',
3044
- fractionDigit: 2,
3045
- currencyName: 'Cuban Peso',
3046
- countries: ['Cuba']
3047
- },
3048
- CVE: {
3049
- isoCode: '132',
3050
- fractionDigit: 2,
3051
- currencyName: 'Cabo Verde Escudo',
3052
- countries: ['Cabo Verde']
3053
- },
3054
- CZK: {
3055
- isoCode: '203',
3056
- fractionDigit: 2,
3057
- symbol: 'Kč',
3058
- unicode: 'Kč',
3059
- htmlCode: 'Kč',
3060
- hexCode: 'Kč',
3061
- currencyName: 'Czech Koruna',
3062
- countries: ['Czechia']
3063
- },
3064
- DJF: {
3065
- isoCode: '262',
3066
- fractionDigit: 0,
3067
- currencyName: 'Djibouti Franc',
3068
- countries: ['Djibouti']
3069
- },
3070
- DKK: {
3071
- isoCode: '208',
3072
- fractionDigit: 2,
3073
- symbol: 'kr',
3074
- unicode: 'kr',
3075
- htmlCode: 'kr',
3076
- hexCode: 'kr',
3077
- currencyName: 'Danish Krone',
3078
- countries: ['Denmark', 'Faroe Islands (The)', 'Greenland']
3079
- },
3080
- DOP: {
3081
- isoCode: '214',
3082
- fractionDigit: 2,
3083
- currencyName: 'Dominican Peso',
3084
- countries: ['Dominican Republic (The)']
3085
- },
3086
- DZD: {
3087
- isoCode: '012',
3088
- fractionDigit: 2,
3089
- currencyName: 'Algerian Dinar',
3090
- countries: ['Algeria']
3091
- },
3092
- EGP: {
3093
- isoCode: '818',
3094
- fractionDigit: 2,
3095
- currencyName: 'Egyptian Pound',
3096
- countries: ['Egypt']
3097
- },
3098
- ERN: {
3099
- isoCode: '232',
3100
- fractionDigit: 2,
3101
- currencyName: 'Nakfa',
3102
- countries: ['Eritrea']
3103
- },
3104
- ETB: {
3105
- isoCode: '230',
3106
- fractionDigit: 2,
3107
- currencyName: 'Ethiopian Birr',
3108
- countries: ['Ethiopia']
3109
- },
3110
- EUR: {
3111
- isoCode: '978',
3112
- fractionDigit: 2,
3113
- symbol: '€',
3114
- unicode: 'U+020AC',
3115
- htmlCode: '&#x20AC;',
3116
- hexCode: '&#8364;',
3117
- currencyName: 'Euro',
3118
- countries: ['Åland Islands', 'Andorra', 'Austria', 'Belgium', 'Cyprus', 'Estonia', 'European Union', 'Finland', 'France', 'French Guiana', 'French Southern Territories (The)', 'Germany', 'Greece', 'Guadeloupe', 'Holy See (The)', 'Ireland', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Martinique', 'Mayotte', 'Monaco', 'Montenegro', 'Netherlands (The)', 'Portugal', 'Réunion', 'Saint Barthélemy', 'Saint Martin (French Part)', 'Saint Pierre and Miquelon', 'San Marino', 'Slovakia', 'Slovenia', 'Spain']
3119
- },
3120
- FJD: {
3121
- isoCode: '242',
3122
- fractionDigit: 2,
3123
- currencyName: 'Fiji Dollar',
3124
- countries: ['Fiji']
3125
- },
3126
- FKP: {
3127
- isoCode: '238',
3128
- fractionDigit: 2,
3129
- currencyName: 'Falkland Islands Pound',
3130
- countries: ['Falkland Islands (The) [Malvinas]']
3131
- },
3132
- GBP: {
3133
- isoCode: '826',
3134
- fractionDigit: 2,
3135
- symbol: '£',
3136
- unicode: 'U+000A3',
3137
- htmlCode: '&#xA3;',
3138
- hexCode: '&#163;',
3139
- currencyName: 'Pound Sterling',
3140
- countries: ['Guernsey', 'Isle of Man', 'Jersey', 'United Kingdom of Great Britain and Northern Ireland (The)']
3141
- },
3142
- GEL: {
3143
- isoCode: '981',
3144
- fractionDigit: 2,
3145
- symbol: '₾',
3146
- unicode: 'U+20BE',
3147
- htmlCode: '&#x20BE;',
3148
- hexCode: '&#8382;',
3149
- currencyName: 'Lari',
3150
- countries: ['Georgia']
3151
- },
3152
- GHS: {
3153
- isoCode: '936',
3154
- fractionDigit: 2,
3155
- currencyName: 'Ghana Cedi',
3156
- countries: ['Ghana']
3157
- },
3158
- GIP: {
3159
- isoCode: '292',
3160
- fractionDigit: 2,
3161
- currencyName: 'Gibraltar Pound',
3162
- countries: ['Gibraltar']
3163
- },
3164
- GMD: {
3165
- isoCode: '270',
3166
- fractionDigit: 2,
3167
- currencyName: 'Dalasi',
3168
- countries: ['Gambia (The)']
3169
- },
3170
- GNF: {
3171
- isoCode: '324',
3172
- fractionDigit: 0,
3173
- currencyName: 'Guinean Franc',
3174
- countries: ['Guinea']
3175
- },
3176
- GTQ: {
3177
- isoCode: '320',
3178
- fractionDigit: 2,
3179
- currencyName: 'Quetzal',
3180
- countries: ['Guatemala']
3181
- },
3182
- GYD: {
3183
- isoCode: '328',
3184
- fractionDigit: 2,
3185
- currencyName: 'Guyana Dollar',
3186
- countries: ['Guyana']
3187
- },
3188
- HKD: {
3189
- isoCode: '344',
3190
- fractionDigit: 2,
3191
- currencyName: 'Hong Kong Dollar',
3192
- countries: ['Hong Kong']
3193
- },
3194
- HNL: {
3195
- isoCode: '340',
3196
- fractionDigit: 2,
3197
- currencyName: 'Lempira',
3198
- countries: ['Honduras']
3199
- },
3200
- HRK: {
3201
- isoCode: '191',
3202
- fractionDigit: 2,
3203
- symbol: 'kn',
3204
- unicode: 'kn',
3205
- htmlCode: 'kn',
3206
- hexCode: 'kn',
3207
- currencyName: 'Kuna',
3208
- countries: ['Croatia']
3209
- },
3210
- HTG: {
3211
- isoCode: '332',
3212
- fractionDigit: 2,
3213
- currencyName: 'Gourde',
3214
- countries: ['Haiti']
3215
- },
3216
- HUF: {
3217
- isoCode: '348',
3218
- fractionDigit: 2,
3219
- currencyName: 'Forint',
3220
- countries: ['Hungary']
3221
- },
3222
- IDR: {
3223
- isoCode: '360',
3224
- fractionDigit: 2,
3225
- currencyName: 'Rupiah',
3226
- countries: ['Indonesia']
3227
- },
3228
- ILS: {
3229
- isoCode: '376',
3230
- fractionDigit: 2,
3231
- currencyName: 'New Israeli Sheqel',
3232
- countries: ['Israel']
3233
- },
3234
- INR: {
3235
- isoCode: '356',
3236
- fractionDigit: 2,
3237
- symbol: '₹',
3238
- unicode: 'U+020B9',
3239
- htmlCode: '&#x20B9;',
3240
- hexCode: '&#8377;',
3241
- currencyName: 'Indian Rupee',
3242
- countries: ['Bhutan', 'India']
3243
- },
3244
- IQD: {
3245
- isoCode: '368',
3246
- fractionDigit: 3,
3247
- currencyName: 'Iraqi Dinar',
3248
- countries: ['Iraq']
3249
- },
3250
- IRR: {
3251
- isoCode: '364',
3252
- fractionDigit: 2,
3253
- currencyName: 'Iranian Rial',
3254
- countries: ['Iran (Islamic Republic Of)']
3255
- },
3256
- ISK: {
3257
- isoCode: '352',
3258
- fractionDigit: 0,
3259
- currencyName: 'Iceland Krona',
3260
- countries: ['Iceland']
3261
- },
3262
- JMD: {
3263
- isoCode: '388',
3264
- fractionDigit: 2,
3265
- currencyName: 'Jamaican Dollar',
3266
- countries: ['Jamaica']
3267
- },
3268
- JOD: {
3269
- isoCode: '400',
3270
- fractionDigit: 3,
3271
- currencyName: 'Jordanian Dinar',
3272
- countries: ['Jordan']
3273
- },
3274
- JPY: {
3275
- isoCode: '392',
3276
- fractionDigit: 0,
3277
- symbol: '¥',
3278
- unicode: 'U+000A5',
3279
- htmlCode: '&#xa5;',
3280
- hexCode: '&#165;',
3281
- currencyName: 'Yen',
3282
- countries: ['Japan']
3283
- },
3284
- KES: {
3285
- isoCode: '404',
3286
- fractionDigit: 2,
3287
- currencyName: 'Kenyan Shilling',
3288
- countries: ['Kenya']
3289
- },
3290
- KGS: {
3291
- isoCode: '417',
3292
- fractionDigit: 2,
3293
- currencyName: 'Som',
3294
- countries: ['Kyrgyzstan']
3295
- },
3296
- KHR: {
3297
- isoCode: '116',
3298
- fractionDigit: 2,
3299
- currencyName: 'Riel',
3300
- countries: ['Cambodia']
3301
- },
3302
- KMF: {
3303
- isoCode: '174',
3304
- fractionDigit: 0,
3305
- currencyName: 'Comorian Franc ',
3306
- countries: ['Comoros (The)']
3307
- },
3308
- KPW: {
3309
- isoCode: '408',
3310
- fractionDigit: 2,
3311
- currencyName: 'North Korean Won',
3312
- countries: ['Korea (The Democratic People’s Republic Of)']
3313
- },
3314
- KRW: {
3315
- isoCode: '410',
3316
- fractionDigit: 0,
3317
- currencyName: 'Won',
3318
- countries: ['Korea (The Republic Of)']
3319
- },
3320
- KWD: {
3321
- isoCode: '414',
3322
- fractionDigit: 3,
3323
- currencyName: 'Kuwaiti Dinar',
3324
- countries: ['Kuwait']
3325
- },
3326
- KYD: {
3327
- isoCode: '136',
3328
- fractionDigit: 2,
3329
- currencyName: 'Cayman Islands Dollar',
3330
- countries: ['Cayman Islands (The)']
3331
- },
3332
- KZT: {
3333
- isoCode: '398',
3334
- fractionDigit: 2,
3335
- currencyName: 'Tenge',
3336
- countries: ['Kazakhstan']
3337
- },
3338
- LAK: {
3339
- isoCode: '418',
3340
- fractionDigit: 2,
3341
- currencyName: 'Lao Kip',
3342
- countries: ['Lao People’s Democratic Republic (The)']
3343
- },
3344
- LBP: {
3345
- isoCode: '422',
3346
- fractionDigit: 2,
3347
- currencyName: 'Lebanese Pound',
3348
- countries: ['Lebanon']
3349
- },
3350
- LKR: {
3351
- isoCode: '144',
3352
- fractionDigit: 2,
3353
- currencyName: 'Sri Lanka Rupee',
3354
- countries: ['Sri Lanka']
3355
- },
3356
- LRD: {
3357
- isoCode: '430',
3358
- fractionDigit: 2,
3359
- currencyName: 'Liberian Dollar',
3360
- countries: ['Liberia']
3361
- },
3362
- LSL: {
3363
- isoCode: '426',
3364
- fractionDigit: 2,
3365
- currencyName: 'Loti',
3366
- countries: ['Lesotho']
3367
- },
3368
- LYD: {
3369
- isoCode: '434',
3370
- fractionDigit: 3,
3371
- currencyName: 'Libyan Dinar',
3372
- countries: ['Libya']
3373
- },
3374
- MAD: {
3375
- isoCode: '504',
3376
- fractionDigit: 2,
3377
- currencyName: 'Moroccan Dirham',
3378
- countries: ['Morocco', 'Western Sahara']
3379
- },
3380
- MDL: {
3381
- isoCode: '498',
3382
- fractionDigit: 2,
3383
- currencyName: 'Moldovan Leu',
3384
- countries: ['Moldova (The Republic Of)']
3385
- },
3386
- MGA: {
3387
- isoCode: '969',
3388
- fractionDigit: 2,
3389
- currencyName: 'Malagasy Ariary',
3390
- countries: ['Madagascar']
3391
- },
3392
- MKD: {
3393
- isoCode: '807',
3394
- fractionDigit: 2,
3395
- currencyName: 'Denar',
3396
- countries: ['Macedonia (The Former Yugoslav Republic Of)']
3397
- },
3398
- MMK: {
3399
- isoCode: '104',
3400
- fractionDigit: 2,
3401
- currencyName: 'Kyat',
3402
- countries: ['Myanmar']
3403
- },
3404
- MNT: {
3405
- isoCode: '496',
3406
- fractionDigit: 2,
3407
- currencyName: 'Tugrik',
3408
- countries: ['Mongolia']
3409
- },
3410
- MOP: {
3411
- isoCode: '446',
3412
- fractionDigit: 2,
3413
- currencyName: 'Pataca',
3414
- countries: ['Macao']
3415
- },
3416
- MRU: {
3417
- isoCode: '929',
3418
- fractionDigit: 2,
3419
- currencyName: 'Ouguiya',
3420
- countries: ['Mauritania']
3421
- },
3422
- MUR: {
3423
- isoCode: '480',
3424
- fractionDigit: 2,
3425
- currencyName: 'Mauritius Rupee',
3426
- countries: ['Mauritius']
3427
- },
3428
- MVR: {
3429
- isoCode: '462',
3430
- fractionDigit: 2,
3431
- currencyName: 'Rufiyaa',
3432
- countries: ['Maldives']
3433
- },
3434
- MWK: {
3435
- isoCode: '454',
3436
- fractionDigit: 2,
3437
- currencyName: 'Malawi Kwacha',
3438
- countries: ['Malawi']
3439
- },
3440
- MXN: {
3441
- isoCode: '484',
3442
- fractionDigit: 2,
3443
- currencyName: 'Mexican Peso',
3444
- countries: ['Mexico']
3445
- },
3446
- MXV: {
3447
- isoCode: '979',
3448
- fractionDigit: 2,
3449
- currencyName: 'Mexican Unidad de Inversion (UDI)',
3450
- countries: ['Mexico']
3451
- },
3452
- MYR: {
3453
- isoCode: '458',
3454
- fractionDigit: 2,
3455
- currencyName: 'Malaysian Ringgit',
3456
- countries: ['Malaysia']
3457
- },
3458
- MZN: {
3459
- isoCode: '943',
3460
- fractionDigit: 2,
3461
- currencyName: 'Mozambique Metical',
3462
- countries: ['Mozambique']
3463
- },
3464
- NAD: {
3465
- isoCode: '516',
3466
- fractionDigit: 2,
3467
- currencyName: 'Namibia Dollar',
3468
- countries: ['Namibia']
3469
- },
3470
- NGN: {
3471
- isoCode: '566',
3472
- fractionDigit: 2,
3473
- currencyName: 'Naira',
3474
- countries: ['Nigeria']
3475
- },
3476
- NIO: {
3477
- isoCode: '558',
3478
- fractionDigit: 2,
3479
- currencyName: 'Cordoba Oro',
3480
- countries: ['Nicaragua']
3481
- },
3482
- NOK: {
3483
- isoCode: '578',
3484
- fractionDigit: 2,
3485
- currencyName: 'Norwegian Krone',
3486
- countries: ['Bouvet Island', 'Norway', 'Svalbard and Jan Mayen']
3487
- },
3488
- NPR: {
3489
- isoCode: '524',
3490
- fractionDigit: 2,
3491
- currencyName: 'Nepalese Rupee',
3492
- countries: ['Nepal']
3493
- },
3494
- NZD: {
3495
- isoCode: '554',
3496
- fractionDigit: 2,
3497
- currencyName: 'New Zealand Dollar',
3498
- countries: ['Cook Islands (The)', 'New Zealand', 'Niue', 'Pitcairn', 'Tokelau']
3499
- },
3500
- OMR: {
3501
- isoCode: '512',
3502
- fractionDigit: 3,
3503
- currencyName: 'Rial Omani',
3504
- countries: ['Oman']
3505
- },
3506
- PAB: {
3507
- isoCode: '590',
3508
- fractionDigit: 2,
3509
- currencyName: 'Balboa',
3510
- countries: ['Panama']
3511
- },
3512
- PEN: {
3513
- isoCode: '604',
3514
- fractionDigit: 2,
3515
- currencyName: 'Sol',
3516
- countries: ['Peru']
3517
- },
3518
- PGK: {
3519
- isoCode: '598',
3520
- fractionDigit: 2,
3521
- currencyName: 'Kina',
3522
- countries: ['Papua New Guinea']
3523
- },
3524
- PHP: {
3525
- isoCode: '608',
3526
- fractionDigit: 2,
3527
- currencyName: 'Philippine Peso',
3528
- countries: ['Philippines (The)']
3529
- },
3530
- PKR: {
3531
- isoCode: '586',
3532
- fractionDigit: 2,
3533
- currencyName: 'Pakistan Rupee',
3534
- countries: ['Pakistan']
3535
- },
3536
- PLN: {
3537
- isoCode: '985',
3538
- fractionDigit: 2,
3539
- currencyName: 'Zloty',
3540
- countries: ['Poland']
3541
- },
3542
- PYG: {
3543
- isoCode: '600',
3544
- fractionDigit: 0,
3545
- currencyName: 'Guarani',
3546
- countries: ['Paraguay']
3547
- },
3548
- QAR: {
3549
- isoCode: '634',
3550
- fractionDigit: 2,
3551
- currencyName: 'Qatari Rial',
3552
- countries: ['Qatar']
3553
- },
3554
- RON: {
3555
- isoCode: '946',
3556
- fractionDigit: 2,
3557
- currencyName: 'Romanian Leu',
3558
- countries: ['Romania']
3559
- },
3560
- RSD: {
3561
- isoCode: '941',
3562
- fractionDigit: 2,
3563
- currencyName: 'Serbian Dinar',
3564
- countries: ['Serbia']
3565
- },
3566
- RUB: {
3567
- isoCode: '643',
3568
- fractionDigit: 2,
3569
- currencyName: 'Russian Ruble',
3570
- countries: ['Russian Federation (The)']
3571
- },
3572
- RWF: {
3573
- isoCode: '646',
3574
- fractionDigit: 0,
3575
- currencyName: 'Rwanda Franc',
3576
- countries: ['Rwanda']
3577
- },
3578
- SAR: {
3579
- isoCode: '682',
3580
- fractionDigit: 2,
3581
- currencyName: 'Saudi Riyal',
3582
- countries: ['Saudi Arabia']
3583
- },
3584
- SBD: {
3585
- isoCode: '090',
3586
- fractionDigit: 2,
3587
- currencyName: 'Solomon Islands Dollar',
3588
- countries: ['Solomon Islands']
3589
- },
3590
- SCR: {
3591
- isoCode: '690',
3592
- fractionDigit: 2,
3593
- currencyName: 'Seychelles Rupee',
3594
- countries: ['Seychelles']
3595
- },
3596
- SDG: {
3597
- isoCode: '938',
3598
- fractionDigit: 2,
3599
- currencyName: 'Sudanese Pound',
3600
- countries: ['Sudan (The)']
3601
- },
3602
- SEK: {
3603
- isoCode: '752',
3604
- fractionDigit: 2,
3605
- currencyName: 'Swedish Krona',
3606
- countries: ['Sweden']
3607
- },
3608
- SGD: {
3609
- isoCode: '702',
3610
- fractionDigit: 2,
3611
- currencyName: 'Singapore Dollar',
3612
- countries: ['Singapore']
3613
- },
3614
- SHP: {
3615
- isoCode: '654',
3616
- fractionDigit: 2,
3617
- currencyName: 'Saint Helena Pound',
3618
- countries: ['Saint Helena, Ascension and Tristan Da Cunha']
3619
- },
3620
- SLL: {
3621
- isoCode: '694',
3622
- fractionDigit: 2,
3623
- currencyName: 'Leone',
3624
- countries: ['Sierra Leone']
3625
- },
3626
- SOS: {
3627
- isoCode: '706',
3628
- fractionDigit: 2,
3629
- currencyName: 'Somali Shilling',
3630
- countries: ['Somalia']
3631
- },
3632
- SRD: {
3633
- isoCode: '968',
3634
- fractionDigit: 2,
3635
- currencyName: 'Surinam Dollar',
3636
- countries: ['Suriname']
3637
- },
3638
- SSP: {
3639
- isoCode: '728',
3640
- fractionDigit: 2,
3641
- currencyName: 'South Sudanese Pound',
3642
- countries: ['South Sudan']
3643
- },
3644
- STN: {
3645
- isoCode: '930',
3646
- fractionDigit: 2,
3647
- currencyName: 'Dobra',
3648
- countries: ['Sao Tome and Principe']
3649
- },
3650
- SVC: {
3651
- isoCode: '222',
3652
- fractionDigit: 2,
3653
- currencyName: 'El Salvador Colon',
3654
- countries: ['El Salvador']
3655
- },
3656
- SYP: {
3657
- isoCode: '760',
3658
- fractionDigit: 2,
3659
- currencyName: 'Syrian Pound',
3660
- countries: ['Syrian Arab Republic']
3661
- },
3662
- SZL: {
3663
- isoCode: '748',
3664
- fractionDigit: 2,
3665
- currencyName: 'Lilangeni',
3666
- countries: ['Eswatini']
3667
- },
3668
- THB: {
3669
- isoCode: '764',
3670
- fractionDigit: 2,
3671
- currencyName: 'Baht',
3672
- countries: ['Thailand']
3673
- },
3674
- TJS: {
3675
- isoCode: '972',
3676
- fractionDigit: 2,
3677
- currencyName: 'Somoni',
3678
- countries: ['Tajikistan']
3679
- },
3680
- TMT: {
3681
- isoCode: '934',
3682
- fractionDigit: 2,
3683
- currencyName: 'Turkmenistan New Manat',
3684
- countries: ['Turkmenistan']
3685
- },
3686
- TND: {
3687
- isoCode: '788',
3688
- fractionDigit: 3,
3689
- currencyName: 'Tunisian Dinar',
3690
- countries: ['Tunisia']
3691
- },
3692
- TOP: {
3693
- isoCode: '776',
3694
- fractionDigit: 2,
3695
- currencyName: 'Pa’anga',
3696
- countries: ['Tonga']
3697
- },
3698
- TRY: {
3699
- isoCode: '949',
3700
- fractionDigit: 2,
3701
- currencyName: 'Turkish Lira',
3702
- countries: ['Turkey']
3703
- },
3704
- TTD: {
3705
- isoCode: '780',
3706
- fractionDigit: 2,
3707
- currencyName: 'Trinidad and Tobago Dollar',
3708
- countries: ['Trinidad and Tobago']
3709
- },
3710
- TWD: {
3711
- isoCode: '901',
3712
- fractionDigit: 2,
3713
- currencyName: 'New Taiwan Dollar',
3714
- countries: ['Taiwan (Province of China)']
3715
- },
3716
- TZS: {
3717
- isoCode: '834',
3718
- fractionDigit: 2,
3719
- currencyName: 'Tanzanian Shilling',
3720
- countries: ['Tanzania, United Republic Of']
3721
- },
3722
- UAH: {
3723
- isoCode: '980',
3724
- fractionDigit: 2,
3725
- currencyName: 'Hryvnia',
3726
- countries: ['Ukraine']
3727
- },
3728
- UGX: {
3729
- isoCode: '800',
3730
- fractionDigit: 0,
3731
- currencyName: 'Uganda Shilling',
3732
- countries: ['Uganda']
3733
- },
3734
- USD: {
3735
- isoCode: '840',
3736
- fractionDigit: 2,
3737
- symbol: '$',
3738
- unicode: 'U+00024',
3739
- htmlCode: '&#x24;',
3740
- hexCode: '&#36;',
3741
- currencyName: 'US Dollar',
3742
- countries: ['American Samoa', 'Bonaire, Sint Eustatius and Saba', 'British Indian Ocean Territory (The)', 'Ecuador', 'El Salvador', 'Guam', 'Haiti', 'Marshall Islands (The)', 'Micronesia (Federated States Of)', 'Northern Mariana Islands (The)', 'Palau', 'Panama', 'Puerto Rico', 'Timor-Leste', 'Turks and Caicos Islands (The)', 'United States Minor Outlying Islands (The)', 'United States of America (The)', 'Virgin Islands (British)', 'Virgin Islands (U.S.)']
3743
- },
3744
- USN: {
3745
- isoCode: '997',
3746
- fractionDigit: 2,
3747
- currencyName: 'US Dollar (Next day)',
3748
- countries: ['United States of America (The)']
3749
- },
3750
- UYI: {
3751
- isoCode: '940',
3752
- fractionDigit: 0,
3753
- currencyName: 'Uruguay Peso en Unidades Indexadas (UI)',
3754
- countries: ['Uruguay']
3755
- },
3756
- UYU: {
3757
- isoCode: '858',
3758
- fractionDigit: 2,
3759
- currencyName: 'Peso Uruguayo',
3760
- countries: ['Uruguay']
3761
- },
3762
- UYW: {
3763
- isoCode: '927',
3764
- fractionDigit: 4,
3765
- currencyName: 'Unidad Previsional',
3766
- countries: ['Uruguay']
3767
- },
3768
- UZS: {
3769
- isoCode: '860',
3770
- fractionDigit: 2,
3771
- currencyName: 'Uzbekistan Sum',
3772
- countries: ['Uzbekistan']
3773
- },
3774
- VES: {
3775
- isoCode: '928',
3776
- fractionDigit: 2,
3777
- currencyName: 'Bolívar Soberano',
3778
- countries: ['Venezuela (Bolivarian Republic Of)']
3779
- },
3780
- VND: {
3781
- isoCode: '704',
3782
- fractionDigit: 0,
3783
- currencyName: 'Dong',
3784
- countries: ['Viet Nam']
3785
- },
3786
- VUV: {
3787
- isoCode: '548',
3788
- fractionDigit: 0,
3789
- currencyName: 'Vatu',
3790
- countries: ['Vanuatu']
3791
- },
3792
- WST: {
3793
- isoCode: '882',
3794
- fractionDigit: 2,
3795
- currencyName: 'Tala',
3796
- countries: ['Samoa']
3797
- },
3798
- XAF: {
3799
- isoCode: '950',
3800
- fractionDigit: 0,
3801
- currencyName: 'CFA Franc BEAC',
3802
- countries: ['Cameroon', 'Central African Republic (The)', 'Chad', 'Congo (The)', 'Equatorial Guinea', 'Gabon']
3803
- },
3804
- XAG: {
3805
- isoCode: '961',
3806
- fractionDigit: 0,
3807
- currencyName: 'Silver',
3808
- countries: ['Zz11_silver']
3809
- },
3810
- XAU: {
3811
- isoCode: '959',
3812
- fractionDigit: 0,
3813
- currencyName: 'Gold',
3814
- countries: ['Zz08_gold']
3815
- },
3816
- XBA: {
3817
- isoCode: '955',
3818
- fractionDigit: 0,
3819
- currencyName: 'Bond Markets Unit European Composite Unit (EURCO)',
3820
- countries: ['Zz01_bond Markets Unit European_eurco']
3821
- },
3822
- XBB: {
3823
- isoCode: '956',
3824
- fractionDigit: 0,
3825
- currencyName: 'Bond Markets Unit European Monetary Unit (E.M.U.-6)',
3826
- countries: ['Zz02_bond Markets Unit European_emu-6']
3827
- },
3828
- XBC: {
3829
- isoCode: '957',
3830
- fractionDigit: 0,
3831
- currencyName: 'Bond Markets Unit European Unit of Account 9 (E.U.A.-9)',
3832
- countries: ['Zz03_bond Markets Unit European_eua-9']
3833
- },
3834
- XBD: {
3835
- isoCode: '958',
3836
- fractionDigit: 0,
3837
- currencyName: 'Bond Markets Unit European Unit of Account 17 (E.U.A.-17)',
3838
- countries: ['Zz04_bond Markets Unit European_eua-17']
3839
- },
3840
- XCD: {
3841
- isoCode: '951',
3842
- fractionDigit: 2,
3843
- currencyName: 'East Caribbean Dollar',
3844
- countries: ['Anguilla', 'Antigua and Barbuda', 'Dominica', 'Grenada', 'Montserrat', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines']
3845
- },
3846
- XDR: {
3847
- isoCode: '960',
3848
- fractionDigit: 0,
3849
- currencyName: 'SDR (Special Drawing Right)',
3850
- countries: ['International Monetary Fund (Imf) ']
3851
- },
3852
- XOF: {
3853
- isoCode: '952',
3854
- fractionDigit: 0,
3855
- currencyName: 'CFA Franc BCEAO',
3856
- countries: ['Benin', 'Burkina Faso', "Côte d'Ivoire", 'Guinea-Bissau', 'Mali', 'Niger (The)', 'Senegal', 'Togo']
3857
- },
3858
- XPD: {
3859
- isoCode: '964',
3860
- fractionDigit: 0,
3861
- currencyName: 'Palladium',
3862
- countries: ['Zz09_palladium']
3863
- },
3864
- XPF: {
3865
- isoCode: '953',
3866
- fractionDigit: 0,
3867
- currencyName: 'CFP Franc',
3868
- countries: ['French Polynesia', 'New Caledonia', 'Wallis and Futuna']
3869
- },
3870
- XPT: {
3871
- isoCode: '962',
3872
- fractionDigit: 0,
3873
- currencyName: 'Platinum',
3874
- countries: ['Zz10_platinum']
3875
- },
3876
- XSU: {
3877
- isoCode: '994',
3878
- fractionDigit: 0,
3879
- currencyName: 'Sucre',
3880
- countries: ['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']
3881
- },
3882
- XTS: {
3883
- isoCode: '963',
3884
- fractionDigit: 0,
3885
- currencyName: 'Codes specifically reserved for testing purposes',
3886
- countries: ['Zz06_testing_code']
3887
- },
3888
- XUA: {
3889
- isoCode: '965',
3890
- fractionDigit: 0,
3891
- currencyName: 'ADB Unit of Account',
3892
- countries: ['Member Countries of the African Development Bank Group']
3893
- },
3894
- XXX: {
3895
- isoCode: '999',
3896
- fractionDigit: 0,
3897
- currencyName: 'The codes assigned for transactions where no currency is involved',
3898
- countries: ['Zz07_no_currency']
3899
- },
3900
- YER: {
3901
- isoCode: '886',
3902
- fractionDigit: 2,
3903
- currencyName: 'Yemeni Rial',
3904
- countries: ['Yemen']
3905
- },
3906
- ZAR: {
3907
- isoCode: '710',
3908
- fractionDigit: 2,
3909
- currencyName: 'Rand',
3910
- countries: ['Lesotho', 'Namibia', 'South Africa']
3911
- },
3912
- ZMW: {
3913
- isoCode: '967',
3914
- fractionDigit: 2,
3915
- currencyName: 'Zambian Kwacha',
3916
- countries: ['Zambia']
3917
- },
3918
- ZWL: {
3919
- isoCode: '932',
3920
- fractionDigit: 2,
3921
- currencyName: 'Zimbabwe Dollar',
3922
- countries: ['Zimbabwe']
3923
- }
3924
- };
3925
- var currencyData$1 = currencyData;
3926
-
3927
- /* This is is short-term solution that patches fraction digits not being available from the Dashboard backend.
3928
-
3929
- MIT License
3930
-
3931
- Copyright (c) 2020 Santosh Yadav
3932
-
3933
- Permission is hereby granted, free of charge, to any person obtaining a copy
3934
- of this software and associated documentation files (the "Software"), to deal
3935
- in the Software without restriction, including without limitation the rights
3936
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3937
- copies of the Software, and to permit persons to whom the Software is
3938
- furnished to do so, subject to the following conditions:
3939
- The above copyright notice and this permission notice shall be included in all
3940
- copies or substantial portions of the Software.
3941
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3942
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3943
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3944
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3945
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3946
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3947
- SOFTWARE.
3948
- */
3949
-
3950
- const getData = (code, field) => {
3951
- code = code !== undefined && code !== '' ? code.toUpperCase() : code;
3952
- if (currencyData$1[code] !== undefined) {
3953
- if (field === 'all') return currencyData$1[code];else return currencyData$1[code][field];
3954
- } else return undefined;
3955
- };
3956
- const getFractionDigit = code => getData(code, 'fractionDigit');
3957
-
3958
- function ownKeys$16(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
3959
- function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$16(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$16(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
3960
- function formatMoneyRangeValue(value, intl) {
3961
- if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
3962
- if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
3963
- ${formatMoneyValue(value.to, value.currency, intl)}`;
3964
- if (value.from) return `from ${formatMoneyValue(value.from, value.currency, intl)}`;
3965
- if (value.to) return `to ${formatMoneyValue(value.to, value.currency, intl)}`;
3966
- return '';
3967
- }
3968
- function formatMoneyValue(amount, currency, intl) {
3969
- return formatMoney$2(_objectSpread$16({
3970
- centAmount: amount,
3971
- fractionDigits: getFractionDigit(currency)
3972
- }, currency ? {
3973
- currencyCode: currency
3974
- } : {}), intl);
3975
- }
3976
- function getFractionedAmount(moneyValue) {
3977
- const _moneyValue$fractionD = moneyValue.fractionDigits,
3978
- fractionDigits = _moneyValue$fractionD === void 0 ? 2 : _moneyValue$fractionD;
3979
-
3980
- // the amount should be available on preciseAmount for highPrecision
3981
- const amount = moneyValue.type === PRECISION_TYPES.highPrecision ? moneyValue.preciseAmount : moneyValue.centAmount;
3982
- return amount / 10 ** fractionDigits;
3983
- }
3984
- function formatMoney$2(moneyValue, intl, options) {
3985
- return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$16({
3986
- style: 'currency',
3987
- currency: moneyValue.currencyCode,
3988
- minimumFractionDigits: moneyValue.fractionDigits
3989
- }, options));
3990
- }
3991
-
3992
- var messages$K = reactIntl.defineMessages({
3993
- booleanYes: {
3994
- id: 'AttributeTypeFormats.boolean.yes',
3995
- description: 'The label for boolean attribute `true` value',
3996
- defaultMessage: 'YES'
3997
- },
3998
- booleanNo: {
3999
- id: 'AttributeTypeFormats.boolean.no',
4000
- description: 'The label for boolean attribute `false` value',
4001
- defaultMessage: 'NO'
4002
- }
4003
- });
4004
-
4005
- const formatEnum = _ref => {
4006
- let value = _ref.value,
4007
- fallbackValue = _ref.fallbackValue;
4008
- return value.label || `${fallbackValue} (${value.key})`;
4009
- };
4010
- const formatLenum = _ref2 => {
4011
- let value = _ref2.value,
4012
- language = _ref2.language,
4013
- languages = _ref2.languages,
4014
- fallbackValue = _ref2.fallbackValue;
4015
- return l10n.formatLocalizedString(value, {
4016
- key: 'label',
4017
- locale: language,
4018
- fallback: `${fallbackValue} (${value.key})`,
4019
- fallbackOrder: languages
4020
- });
4021
- };
4022
- const formatLtext = _ref3 => {
4023
- let value = _ref3.value,
4024
- language = _ref3.language;
4025
- return l10n.formatLocalizedString({
4026
- value
4027
- }, {
4028
- key: 'value',
4029
- locale: language
4030
- });
4031
- };
4032
- const formatMoney$1 = _ref4 => {
4033
- let value = _ref4.value,
4034
- intl = _ref4.intl;
4035
- return formatMoney$2(value, intl);
4036
- };
4037
- const formatReference = _ref5 => {
4038
- let value = _ref5.value;
4039
- return value.id;
4040
- };
4041
- const formatDate = _ref6 => {
4042
- let value = _ref6.value,
4043
- userTimeZone = _ref6.userTimeZone,
4044
- intl = _ref6.intl;
4045
- return intl.formatDate(Date.parse(value), {
4046
- day: 'numeric',
4047
- month: 'long',
4048
- year: 'numeric',
4049
- // defaults to utc if timeZone is not provided
4050
- timeZone: userTimeZone || 'utc'
4051
- });
4052
- };
4053
- const formatDateTime = _ref7 => {
4054
- let value = _ref7.value,
4055
- userTimeZone = _ref7.userTimeZone,
4056
- intl = _ref7.intl;
4057
- const date = formatDate({
4058
- value,
4059
- userTimeZone,
4060
- intl
4061
- });
4062
- const time = intl.formatTime(Date.parse(value), {
4063
- hour: 'numeric',
4064
- minute: 'numeric',
4065
- second: 'numeric',
4066
- // defaults to utc if timeZone is not provided
4067
- timeZone: userTimeZone || 'utc'
4068
- });
4069
- return `${date} (${time})`;
4070
- };
4071
- const formatBoolean = _ref8 => {
4072
- let value = _ref8.value,
4073
- intl = _ref8.intl;
4074
- return value ? intl.formatMessage(messages$K.booleanYes) : intl.formatMessage(messages$K.booleanNo);
4075
- };
4076
- const formatNilType = _ref9 => {
4077
- let value = _ref9.value,
4078
- fallbackValue = _ref9.fallbackValue;
4079
- sentry.reportErrorToSentry(new Error('Type was not provided'), {
4080
- extra: {
4081
- value
4082
- }
4083
- });
4084
- return fallbackValue;
4085
- };
4086
- const formatUnknown = _ref0 => {
4087
- let type = _ref0.type,
4088
- value = _ref0.value,
4089
- fallbackValue = _ref0.fallbackValue;
4090
- // NOTE This is reporting within the render function, which is supposed to
4091
- // be pure. This is quite bad as this is a side-effect in the render fn.
4092
- sentry.reportErrorToSentry(new Error(`Unhandled custom attribute type '${type.name}' for value`), {
4093
- extra: {
4094
- value
4095
- }
4096
- });
4097
- return fallbackValue;
4098
- };
4099
- const formatNested = _ref1 => {
4100
- let fallbackValue = _ref1.fallbackValue;
4101
- return fallbackValue;
4102
- };
4103
- const formatSet = _ref10 => {
4104
- let type = _ref10.type,
4105
- value = _ref10.value,
4106
- intl = _ref10.intl,
4107
- language = _ref10.language,
4108
- languages = _ref10.languages,
4109
- fallbackValue = _ref10.fallbackValue;
4110
- const formatedElements = _mapInstanceProperty__default["default"](value).call(value, elementValue => formatAttribute({
4111
- type: type.elementType,
4112
- value: elementValue,
4113
- intl,
4114
- language,
4115
- languages,
4116
- fallbackValue
4117
- }));
4118
- return formatedElements.join(', ');
4119
- };
4120
- const doNotFormat = _ref11 => {
4121
- let value = _ref11.value;
4122
- return value;
4123
- };
4124
- const getFormatter = type => {
4125
- if (isNil__default["default"](type)) return formatNilType;else if (type.name === 'nested') return formatNested;else if (type.name === 'set') return formatSet;else if (type.name === 'enum') return formatEnum;else if (type.name === 'lenum') return formatLenum;else if (type.name === 'ltext') return formatLtext;else if (type.name === 'money') return formatMoney$1;else if (type.name === 'reference') return formatReference;else if (type.name === 'date') return formatDate;else if (type.name === 'time') return doNotFormat;else if (type.name === 'datetime') return formatDateTime;else if (type.name === 'boolean') return formatBoolean;else if (type.name === 'text') return doNotFormat;else if (type.name === 'number') return doNotFormat;else return formatUnknown;
4126
- };
4127
- function formatAttribute(_ref12) {
4128
- let type = _ref12.type,
4129
- value = _ref12.value,
4130
- intl = _ref12.intl,
4131
- language = _ref12.language,
4132
- languages = _ref12.languages,
4133
- userTimeZone = _ref12.userTimeZone,
4134
- _ref12$fallbackValue = _ref12.fallbackValue,
4135
- fallbackValue = _ref12$fallbackValue === void 0 ? constants.NO_VALUE_FALLBACK : _ref12$fallbackValue;
4136
- if (isNil__default["default"](value)) {
4137
- return fallbackValue;
4138
- }
4139
- const formatter = getFormatter(type);
4140
- return formatter({
4141
- type,
4142
- value,
4143
- intl,
4144
- language,
4145
- languages,
4146
- userTimeZone,
4147
- fallbackValue
4148
- });
4149
- }
4150
-
4151
- const attributeTypeNames = {
4152
- Boolean: 'boolean',
4153
- Date: 'date',
4154
- DateTime: 'datetime',
4155
- Enum: 'enum',
4156
- LocalizedEnum: 'lenum',
4157
- LocalizedString: 'ltext',
4158
- Money: 'money',
4159
- Nested: 'nested',
4160
- Reference: 'reference',
4161
- Set: 'set',
4162
- String: 'text',
4163
- Time: 'time',
4164
- Number: 'number'
4165
- };
4166
- const convertToAttributeType = customFieldType => {
4167
- if (isNil__default["default"](customFieldType)) return customFieldType;
4168
- const attributeTypeName = attributeTypeNames[customFieldType.name];
4169
- const elementTypeName = attributeTypeNames[customFieldType.elementType?.name];
4170
- return {
4171
- name: attributeTypeName,
4172
- elementType: {
4173
- name: elementTypeName
4174
- }
4175
- };
4176
- };
4177
- const inlineEnumValues = (type, value) => {
4178
- if (isNil__default["default"](type)) return value;
4179
- if (type.name === 'Set') {
4180
- return _mapInstanceProperty__default["default"](value).call(value, setValue => inlineEnumValues(type.elementType, setValue));
4181
- }
4182
- if (type.name === 'Enum' || type.name === 'LocalizedEnum') {
4183
- var _context;
4184
- return _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](type)).call(_context, enumValue => enumValue.key === value);
4185
- }
4186
- return value;
4187
- };
4188
-
4189
- /**
4190
- * Formats `Custom Fields`: https://docs.commercetools.com/api/projects/custom-fields
4191
- * Despite having different names, most of `Custom Field` maps one-to-one with an appropriate
4192
- * `Product Attribute Type`, hence we can reuse product attributes formatting logic.
4193
- *
4194
- * The only exception is `Enum` and `LEnum` types. Unlike when dealing with `Product Attribute Types`,
4195
- * value in `Custom Fields` contains a key of an `Enum` entry, and not an entry itself.
4196
- * Therefore, before passing value to attributes formatter we need to replace value with Enum entry.
4197
- */
4198
- function formatCustomField(_ref) {
4199
- let type = _ref.type,
4200
- value = _ref.value,
4201
- intl = _ref.intl,
4202
- language = _ref.language,
4203
- languages = _ref.languages,
4204
- userTimeZone = _ref.userTimeZone;
4205
- const attributeType = convertToAttributeType(type);
4206
- return formatAttribute({
4207
- type: attributeType,
4208
- value: inlineEnumValues(type, value),
4209
- intl,
4210
- language,
4211
- languages,
4212
- userTimeZone
4213
- });
4214
- }
4215
-
4216
- // FIXME: delete once prefix search is supported in ctp api
4217
-
4218
- // Currently prefix search of products in the ctp is not supported.
4219
- // This is a temporary hack which should be deleted once the feature is
4220
- // supported in ctp.
4221
- // It mimics the prefix search feature by computing lower and upper bounds
4222
- // related to the provided `input`.
4223
- // usage:
4224
- // If I want to do a prefix search of term 'F', I get first the bounds
4225
- // const [lowerBound, upperBound] = getPrefixSearch('F');
4226
- // and then use them in the search
4227
- // e.g
4228
- // where: `masterData(current(name(en >= "${lowerBound}" and en < "${upperBound}")))`
4229
- const getPrefixSearchBounds = input => {
4230
- const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
4231
- return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
4232
- };
4233
- var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4234
-
4235
- const _excluded$d = ["action"];
4236
- function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
4237
- function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context0 = ownKeys$15(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context1 = ownKeys$15(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4238
-
4239
- /**
4240
- * Checks if a value is a LocalizedString
4241
- *
4242
- * { en: 'Hello' } -> true
4243
- * 'Hello' -> false
4244
- */
4245
-
4246
- const getIsLocalizedString = maybeLocalizedString => {
4247
- if (typeof maybeLocalizedString === 'string') return false;
4248
- if (!maybeLocalizedString || typeof maybeLocalizedString === 'object' && _Object$keys__default["default"](maybeLocalizedString).length === 0) return false;
4249
- return true;
4250
- };
4251
-
4252
- /**
4253
- * Transforms a list of `CustomField` into a `CustomField` object
4254
- *
4255
- * [{ name: 'fieldA', value: 'Hello' }] -> { fieldA: 'Hello' }
4256
- */
4257
- const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
4258
- if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
4259
- return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$15(_objectSpread$15({}, customFields), {}, {
4260
- [customField.name]: customField.value
4261
- }), {});
4262
- };
4263
-
4264
- // --- Types mapping ---
4265
-
4266
- /**
4267
- * Map category GraphQL shape with nameAllLocales to reference shape
4268
- * Includes ancestors and parent
4269
- *
4270
- * @param {Object} category - A category result object from graphql
4271
- * @return {Object} Category (as a REST API representation):
4272
- * `{ id, obj: { id, name } }`
4273
- */
4274
- function transformLocalizedFieldsForCategory(category) {
4275
- var _context;
4276
- let transformationOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
4277
- from: 'nameAllLocales',
4278
- to: 'name'
4279
- }];
4280
- const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
4281
- const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
4282
- const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
4283
- return _objectSpread$15(_objectSpread$15(_objectSpread$15({}, transformedData), parent ? {
4284
- parent
4285
- } : {}), ancestors ? {
4286
- ancestors
4287
- } : {});
4288
- }
4289
- function transformLocalizedFieldsForCartDiscount(cartDiscount) {
4290
- const transformationOptions = [{
4291
- from: 'nameAllLocales',
4292
- to: 'name'
4293
- }];
4294
- return l10n.applyTransformedLocalizedFields(cartDiscount, transformationOptions);
4295
- }
4296
- function mapShippingRateTierToGraphQL(tiers) {
4297
- return _reduceInstanceProperty__default["default"](tiers).call(tiers, (graphQlTiers, tier) => [...graphQlTiers, {
4298
- [tier.type]: {
4299
- price: tier.price ? {
4300
- centAmount: tier.price.centAmount,
4301
- currencyCode: tier.price.currencyCode
4302
- } : undefined,
4303
- minimumCentAmount: tier.minimumCentAmount,
4304
- value: tier.value || undefined,
4305
- priceFunction: tier.priceFunction ? {
4306
- function: tier.priceFunction.function,
4307
- currencyCode: tier.priceFunction.currencyCode
4308
- } : undefined,
4309
- score: tier.score
4310
- }
4311
- }], []);
4312
- }
4313
-
4314
- /**
4315
- * NOTE:
4316
- * This module massages update actions produced by the JS SDK
4317
- * to be compatible with CTP GraphQL mutations. This logic should be
4318
- * moved into the JS SDK once discounts is fully 100% migrated to
4319
- * GraphQL or any other plugin/app needs this functionality. Until
4320
- * then this serves as a collective set of requirements before
4321
- * prematurely adding a not fully working set of conversions to the
4322
- * JS SDK.
4323
- */
4324
-
4325
- const createAttributeTypeValue = attribute => {
4326
- switch (attribute.type.name) {
4327
- case 'set':
4328
- return {
4329
- set: {
4330
- elementType: createAttributeTypeValue({
4331
- type: attribute.type.elementType
4332
- })
4333
- }
4334
- };
4335
- case 'boolean':
4336
- case 'date':
4337
- case 'datetime':
4338
- case 'ltext':
4339
- case 'money':
4340
- case 'number':
4341
- case 'text':
4342
- case 'time':
4343
- return {
4344
- [attribute.type.name]: {}
4345
- };
4346
- case 'enum':
4347
- case 'lenum':
4348
- return {
4349
- [attribute.type.name]: {
4350
- values: []
4351
- }
4352
- };
4353
- case 'reference':
4354
- {
4355
- return {
4356
- [attribute.type.name]: {
4357
- referenceTypeId: attribute.type.referenceTypeId
4358
- }
4359
- };
4360
- }
4361
- default:
4362
- return attribute.type;
4363
- }
4364
- };
4365
-
4366
- /*
4367
- * Fixed price supports high precision. Action format is nested with the
4368
- * the type of the money. Absolute discount only works with cent precision,
4369
- * hence the action structure is flat.
4370
- */
4371
- const formatMoney = valueType => money => {
4372
- switch (valueType) {
4373
- case 'fixed':
4374
- case 'fixedCart':
4375
- return {
4376
- [money.type]: _objectSpread$15({
4377
- centAmount: money.centAmount,
4378
- currencyCode: money.currencyCode
4379
- }, money.type === PRECISION_TYPES.highPrecision && {
4380
- preciseAmount: money.preciseAmount,
4381
- fractionDigits: money.fractionDigits
4382
- })
4383
- };
4384
- case 'absolute':
4385
- case 'absoluteCart':
4386
- return {
4387
- centAmount: money.centAmount,
4388
- currencyCode: money.currencyCode
4389
- };
4390
- default:
4391
- throw new Error('Unexpected value type for money.');
4392
- }
4393
- };
4394
-
4395
- /**
4396
- * converts the `changeValue` action to GraphQL actions variable
4397
- * @param {Object} actionPayload
4398
- */
4399
- const convertChangeValueAction = actionPayload => {
4400
- const valueType = actionPayload.value.type;
4401
- const possibleTypeKeys = {
4402
- relative: ['permyriad'],
4403
- absolute: ['money'],
4404
- absoluteCart: ['money', 'applicationMode'],
4405
- fixed: ['money'],
4406
- fixedCart: ['money', 'applicationMode'],
4407
- giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
4408
- };
4409
- const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
4410
- if (filteredValue.money) {
4411
- var _context2;
4412
- const moneyFormatter = formatMoney(valueType);
4413
- filteredValue.money = _mapInstanceProperty__default["default"](_context2 = filteredValue.money).call(_context2, moneyFormatter);
4414
- }
4415
- return {
4416
- changeValue: {
4417
- value: {
4418
- [valueType]: filteredValue
4419
- }
4420
- }
4421
- };
4422
- };
4423
-
4424
- /**
4425
- * This function changes any payload after the actions have been computed.
4426
- * Currently we only need to change the `setCustomField` action payload
4427
- * as its dynamic content can not be typed in SDL for the mutation.
4428
- */
4429
- const convertAction = (actionName, actionPayload) => {
4430
- var _context3, _context4, _context5, _context6, _context7;
4431
- const getNameFromPayload = payload => {
4432
- // changeName for `Organizations`
4433
- if (typeof payload.name === 'string') return payload;
4434
- // changeName for `UserProfile`
4435
- if (payload.firstName || payload.lastName) return payload;
4436
- // assume `changeName` for LocalizedString type
4437
- return {
4438
- name: l10n.transformLocalizedStringToLocalizedField(payload.name)
4439
- };
2705
+ /**
2706
+ * This function changes any payload after the actions have been computed.
2707
+ * Currently we only need to change the `setCustomField` action payload
2708
+ * as its dynamic content can not be typed in SDL for the mutation.
2709
+ */
2710
+ const convertAction = (actionName, actionPayload) => {
2711
+ var _context3, _context4, _context5, _context6, _context7;
2712
+ const getNameFromPayload = payload => {
2713
+ // changeName for `Organizations`
2714
+ if (typeof payload.name === 'string') return payload;
2715
+ // changeName for `UserProfile`
2716
+ if (payload.firstName || payload.lastName) return payload;
2717
+ // assume `changeName` for LocalizedString type
2718
+ return {
2719
+ name: l10n.transformLocalizedStringToLocalizedField(payload.name)
2720
+ };
4440
2721
  };
4441
2722
  switch (actionName) {
4442
2723
  case 'changeName':
@@ -4548,7 +2829,7 @@ const convertAction = (actionName, actionPayload) => {
4548
2829
  case 'addAttributeDefinition':
4549
2830
  return {
4550
2831
  [actionName]: {
4551
- attributeDefinition: _objectSpread$15(_objectSpread$15({}, actionPayload.attribute), {}, {
2832
+ attributeDefinition: _objectSpread$16(_objectSpread$16({}, actionPayload.attribute), {}, {
4552
2833
  label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
4553
2834
  inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
4554
2835
  type: createAttributeTypeValue(actionPayload.attribute)
@@ -4644,7 +2925,7 @@ const convertAction = (actionName, actionPayload) => {
4644
2925
  return {
4645
2926
  [actionName]: {
4646
2927
  attributeName: actionPayload.attributeName,
4647
- value: _objectSpread$15(_objectSpread$15({}, actionPayload.value), {}, {
2928
+ value: _objectSpread$16(_objectSpread$16({}, actionPayload.value), {}, {
4648
2929
  label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
4649
2930
  })
4650
2931
  }
@@ -4653,7 +2934,7 @@ const convertAction = (actionName, actionPayload) => {
4653
2934
  return {
4654
2935
  [actionName]: {
4655
2936
  attributeName: actionPayload.attributeName,
4656
- newValue: _objectSpread$15(_objectSpread$15({}, actionPayload.newValue), {}, {
2937
+ newValue: _objectSpread$16(_objectSpread$16({}, actionPayload.newValue), {}, {
4657
2938
  label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
4658
2939
  })
4659
2940
  }
@@ -4680,7 +2961,7 @@ const convertAction = (actionName, actionPayload) => {
4680
2961
  name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
4681
2962
  taxCategory: actionPayload.taxCategory,
4682
2963
  money: {
4683
- [actionPayload.money.type]: _objectSpread$15({
2964
+ [actionPayload.money.type]: _objectSpread$16({
4684
2965
  centAmount: actionPayload.money.centAmount,
4685
2966
  currencyCode: actionPayload.money.currencyCode
4686
2967
  }, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
@@ -4708,7 +2989,7 @@ const convertAction = (actionName, actionPayload) => {
4708
2989
  return {
4709
2990
  [actionName]: {
4710
2991
  target: {
4711
- [actionPayload.target.type]: _objectSpread$15(_objectSpread$15(_objectSpread$15({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
2992
+ [actionPayload.target.type]: _objectSpread$16(_objectSpread$16(_objectSpread$16({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
4712
2993
  triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
4713
2994
  [pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
4714
2995
  }))
@@ -4743,8 +3024,8 @@ const convertAction = (actionName, actionPayload) => {
4743
3024
  fields: customFields
4744
3025
  } : null;
4745
3026
  return {
4746
- [actionName]: _objectSpread$15(_objectSpread$15({}, actionPayload), {}, {
4747
- address: _objectSpread$15(_objectSpread$15({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
3027
+ [actionName]: _objectSpread$16(_objectSpread$16({}, actionPayload), {}, {
3028
+ address: _objectSpread$16(_objectSpread$16({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
4748
3029
  custom
4749
3030
  })
4750
3031
  })
@@ -4779,25 +3060,1774 @@ const convertAction = (actionName, actionPayload) => {
4779
3060
  };
4780
3061
  }
4781
3062
  default:
4782
- return {
4783
- [actionName]: actionPayload
4784
- };
3063
+ return {
3064
+ [actionName]: actionPayload
3065
+ };
3066
+ }
3067
+ };
3068
+ const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
3069
+ let actionName = _ref9.action,
3070
+ actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
3071
+ return [...previousActions, convertAction(actionName, actionPayload)];
3072
+ }, []);
3073
+ const extractErrorFromGraphQlResponse = graphQlResponse => {
3074
+ if (graphQlResponse.networkError?.result?.errors?.length > 0) {
3075
+ return graphQlResponse.networkError.result.errors;
3076
+ }
3077
+ if (graphQlResponse.graphQLErrors?.length > 0) {
3078
+ return graphQlResponse.graphQLErrors;
3079
+ }
3080
+ return graphQlResponse;
3081
+ };
3082
+
3083
+ var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 160, source: { body: "query FetchRecurrencePolicies {\n recurrencePolicies {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
3084
+ const isRecurringOrdersDisabledError = error => {
3085
+ var _context;
3086
+ return error.extensions?.code === '403' && _includesInstanceProperty__default["default"](_context = error.message).call(_context, "The feature 'recurring-orders' is not enabled for this project. Please contact commercetools support.");
3087
+ };
3088
+ const useRecurrenceIntervals = () => {
3089
+ const _useQuery = client.useQuery(FetchRecurrencePolicies, {
3090
+ context: {
3091
+ target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
3092
+ },
3093
+ fetchPolicy: 'cache-and-network'
3094
+ }),
3095
+ data = _useQuery.data,
3096
+ loading = _useQuery.loading,
3097
+ rawError = _useQuery.error;
3098
+
3099
+ // @TODO: Remove these error checks when the feature is enabled by default
3100
+ const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
3101
+ const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
3102
+ // If the only error is a 403 with the specific message, we assume the feature is disabled
3103
+ _everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
3104
+ const error = isRecurringOrdersDisabled ? undefined : rawError;
3105
+ return {
3106
+ recurrencePolicies: data?.recurrencePolicies?.results ?? [],
3107
+ loading,
3108
+ error,
3109
+ isRecurringOrdersDisabled
3110
+ };
3111
+ };
3112
+
3113
+ const setToArray = function () {
3114
+ let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
3115
+ return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
3116
+ };
3117
+
3118
+ function capitalizeFirst(text) {
3119
+ return text.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](text).call(text, 1);
3120
+ }
3121
+
3122
+ const PRODUCT_STATUSES = {
3123
+ PUBLISHED: 'published',
3124
+ UNPUBLISHED: 'unpublished',
3125
+ MODIFIED: 'modified'
3126
+ };
3127
+ const FILTER_TYPES = {
3128
+ lessThan: 'lessThan',
3129
+ moreThan: 'moreThan',
3130
+ equalTo: 'equalTo',
3131
+ range: 'range',
3132
+ missing: 'missing',
3133
+ missingIn: 'missingIn',
3134
+ in: 'in'
3135
+ };
3136
+ const FIELD_TYPES = {
3137
+ Money: 'Money',
3138
+ LocalizedString: 'LocalizedString',
3139
+ Time: 'Time',
3140
+ DateTime: 'DateTime',
3141
+ Boolean: 'Boolean',
3142
+ String: 'String',
3143
+ Enum: 'Enum',
3144
+ LocalizedEnum: 'LocalizedEnum',
3145
+ Number: 'Number',
3146
+ Date: 'Date',
3147
+ Reference: 'Reference',
3148
+ Set: 'Set'
3149
+ };
3150
+ const PRECISION_TYPES = {
3151
+ highPrecision: 'highPrecision',
3152
+ centPrecision: 'centPrecision'
3153
+ };
3154
+ const ERROR_CODES = {
3155
+ semanticError: 'SemanticError',
3156
+ invalidInput: 'InvalidInput'
3157
+ };
3158
+ const DefaultPageSizes = [20, 50, 100];
3159
+ DefaultPageSizes[0];
3160
+
3161
+ const regexpData = /^data-/;
3162
+ function filterDataAttributes(obj) {
3163
+ var _context, _context2;
3164
+ return _reduceInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](obj)).call(_context2, p => regexpData.test(p))).call(_context, (acc, p) => {
3165
+ // eslint-disable-next-line no-param-reassign
3166
+ acc[p] = obj[p];
3167
+ return acc;
3168
+ }, {});
3169
+ }
3170
+
3171
+ const invalidValues$1 = [null, undefined, ''];
3172
+ function isEmpty$2(_ref) {
3173
+ let value = _ref.value;
3174
+ return _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value) || _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.from) && _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.to);
3175
+ }
3176
+
3177
+ const invalidValues = [null, undefined, ''];
3178
+ function validateSingleFilter(_ref) {
3179
+ let value = _ref.value;
3180
+ return _includesInstanceProperty__default["default"](invalidValues).call(invalidValues, value);
3181
+ }
3182
+
3183
+ const dateFormatDayStart$1 = 'YYYY-MM-DDT00:00:00.000';
3184
+ const dateFormatDayEnd$1 = 'YYYY-MM-DDT23:59:59.999';
3185
+ const getDateTimeInUTC = (date, timezone, format) => {
3186
+ const dateFormat = 'YYYY-MM-DDTHH:mm:ss.SSS';
3187
+ const momentDate = moment__default["default"](date);
3188
+ // check if the date is date only or datetime
3189
+ const noTimeSpecified = momentDate.hours() === 0 && momentDate.minutes() === 0 && momentDate.seconds() === 0;
3190
+ // if it's a date then convert it to UTC datetime based on timezone
3191
+ if (noTimeSpecified) {
3192
+ const offset = moment__default["default"](date).tz(timezone)?.utcOffset() || 0;
3193
+ const formattedDate = momentDate.format(format);
3194
+ const formattedDateWithOffset = moment__default["default"](formattedDate).add(offset, 'minutes').format(dateFormat);
3195
+ // console.log(formattedDateWithOffset);
3196
+ return formattedDateWithOffset;
3197
+ }
3198
+ // if it's a datetime we assume that it's already in UTC
3199
+ // and just return it
3200
+ return date;
3201
+ };
3202
+ function dateTransformer$1(filterKey, filters) {
3203
+ let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator$1;
3204
+ const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
3205
+ let type = _ref.type,
3206
+ value = _ref.value,
3207
+ timezone = _ref.timezone;
3208
+ if (!filterValidator({
3209
+ type,
3210
+ value
3211
+ })) return '';
3212
+ switch (type) {
3213
+ case FILTER_TYPES.lessThan:
3214
+ return `${filterKey} < "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"`;
3215
+ case FILTER_TYPES.moreThan:
3216
+ return `${filterKey} > "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}"`;
3217
+ case FILTER_TYPES.equalTo:
3218
+ return oneLine__default["default"]`
3219
+ (${filterKey} >= "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"
3220
+ and ${filterKey} <= "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}")
3221
+ `;
3222
+ case FILTER_TYPES.range:
3223
+ return oneLine__default["default"]`
3224
+ (${filterKey} >= "${getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1)}"
3225
+ and ${filterKey} <= "${getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1)}")
3226
+ `;
3227
+ default:
3228
+ return '';
3229
+ }
3230
+ });
3231
+
3232
+ // The separator is and `or` as they are the same filter
3233
+ const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
3234
+
3235
+ /* The parenthesis involing the `queryString` are needed since they are all part of the
3236
+ * same filter so we need something to work with
3237
+ * (
3238
+ * (createdAt >= "2018-04-25T00:00:00.000+02:00" and createdAt <= "2018-04-25T23:59:59.999+02:00") o
3239
+ * (createdAt >= "2018-02-15T00:00:00.000+01:00" and createdAt <= "2018-02-15T23:59:59.999+01:00")
3240
+ * ) or some_more_filters
3241
+ */
3242
+ return queryString === '' ? null : `(${queryString})`;
3243
+ }
3244
+ function defaultFilterValidator$1(_ref2) {
3245
+ let type = _ref2.type,
3246
+ value = _ref2.value;
3247
+ if (type !== 'range' && (validateSingleFilter({
3248
+ value
3249
+ }) || !moment__default["default"](value).isValid())) return false;
3250
+ if (type === 'range' && (isEmpty$2({
3251
+ value
3252
+ }) || !moment__default["default"](value.from).isValid() || !moment__default["default"](value.to).isValid())) return false;
3253
+ return true;
3254
+ }
3255
+
3256
+ var localizedTextTransformer = localizedString => {
3257
+ var _context;
3258
+ return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
3259
+ };
3260
+
3261
+ const getCentAmountClause = (value, operator, locale) => `centAmount ${operator} ${uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount}`;
3262
+ function moneyTransformer(value, option, locale) {
3263
+ const clauses = [];
3264
+ if (option === FILTER_TYPES.range) {
3265
+ clauses[0] = `currencyCode = "${value.from.currencyCode}"`;
3266
+ clauses[1] = getCentAmountClause(value.from, '>=', locale);
3267
+ clauses[2] = getCentAmountClause(value.to, '<=', locale);
3268
+ return clauses.join(' and ');
3269
+ }
3270
+ clauses[0] = `currencyCode = "${value.currencyCode}"`;
3271
+ switch (option) {
3272
+ case FILTER_TYPES.lessThan:
3273
+ clauses[1] = getCentAmountClause(value, '<', locale);
3274
+ break;
3275
+ case FILTER_TYPES.moreThan:
3276
+ clauses[1] = getCentAmountClause(value, '>', locale);
3277
+ break;
3278
+ case FILTER_TYPES.equalTo:
3279
+ clauses[1] = getCentAmountClause(value, '=', locale);
3280
+ break;
3281
+ default:
3282
+ return '';
3283
+ }
3284
+ return clauses.join(' and ');
3285
+ }
3286
+
3287
+ const formatTime = 'HH:mm:ss.SSS';
3288
+
3289
+ /* TimeInput only allows HH:mm:ss and adds the seconds as 00 and
3290
+ * the milliseconds always as 000.
3291
+ * This function returns the same time with the
3292
+ */
3293
+ const getEndOfSecond = value => moment__default["default"](value, formatTime).endOf('minute').format(formatTime);
3294
+ const defaultFilterValidator = _ref => {
3295
+ let type = _ref.type,
3296
+ value = _ref.value;
3297
+ if (type !== FILTER_TYPES.range && validateSingleFilter({
3298
+ value
3299
+ })) return false;
3300
+ if (type === FILTER_TYPES.range && isEmpty$2({
3301
+ value
3302
+ })) return false;
3303
+ return true;
3304
+ };
3305
+ const timeTransformer = function (filterKey, filters) {
3306
+ let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator;
3307
+ const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref2 => {
3308
+ let type = _ref2.type,
3309
+ value = _ref2.value;
3310
+ if (!filterValidator({
3311
+ type,
3312
+ value
3313
+ })) return '';
3314
+ switch (type) {
3315
+ case FILTER_TYPES.lessThan:
3316
+ return `${filterKey} < "${value}"`;
3317
+ case FILTER_TYPES.moreThan:
3318
+ return `${filterKey} > "${value}"`;
3319
+ case FILTER_TYPES.equalTo:
3320
+ return oneLine__default["default"]`
3321
+ (${filterKey} >= "${value}"
3322
+ and ${filterKey} <= "${getEndOfSecond(value)}")
3323
+ `;
3324
+ case FILTER_TYPES.range:
3325
+ return oneLine__default["default"]`
3326
+ (${filterKey} >= "${value.from}"
3327
+ and ${filterKey} <= "${getEndOfSecond(value.to)}")
3328
+ `;
3329
+ default:
3330
+ return '';
3331
+ }
3332
+ });
3333
+
3334
+ // The separator is and `or` as they are the same filter
3335
+ const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
3336
+
3337
+ /* The parenthesis involing the `queryString` are needed since they are all part of the
3338
+ * same filter so we need something to work with
3339
+ * (
3340
+ * (pickUpTime >= "12:00" and pickUpTime <= "13:00") o
3341
+ * (pickUpTime >= "14:00" and pickUpTime <= "15:00")
3342
+ * ) or some_more_filters
3343
+ */
3344
+ return queryString === '' ? null : `(${queryString})`;
3345
+ };
3346
+
3347
+ function formatDateRangeValue(value, type) {
3348
+ let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
3349
+ locale: 'en',
3350
+ timeZone: moment__default$1["default"].tz.guess()
3351
+ };
3352
+ if (value.from === value.to) return formatDateTime$1(type, value.from, options);
3353
+ if (value.from && value.to) return oneLine__default["default"]`
3354
+ ${formatDateTime$1(type, value.from, options)} -
3355
+ ${formatDateTime$1(type, value.to, options)}
3356
+ `;
3357
+ if (value.from) return `from ${formatDateTime$1(type, value.from, options)}`;
3358
+ if (value.to) return `to ${formatDateTime$1(type, value.to, options)}`;
3359
+ return '';
3360
+ }
3361
+ function formatDateTime$1(type, value) {
3362
+ let _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
3363
+ _ref$locale = _ref.locale,
3364
+ locale = _ref$locale === void 0 ? 'en' : _ref$locale,
3365
+ _ref$timeZone = _ref.timeZone,
3366
+ timeZone = _ref$timeZone === void 0 ? moment__default$1["default"].tz.guess() : _ref$timeZone;
3367
+ switch (type) {
3368
+ case 'time':
3369
+ return moment__default$1["default"](value).tz(timeZone).locale(locale).format('LT');
3370
+ case 'datetime':
3371
+ return moment__default$1["default"](value).tz(timeZone).locale(locale).format('L LT');
3372
+ case 'date':
3373
+ return moment__default$1["default"](value).tz(timeZone).locale(locale).format('L');
3374
+ default:
3375
+ return value;
3376
+ }
3377
+ }
3378
+
3379
+ /* This is is short-term solution that patches fraction digits not being available from the Dashboard backend.
3380
+
3381
+ MIT License
3382
+
3383
+ Copyright (c) 2020 Santosh Yadav
3384
+
3385
+ Permission is hereby granted, free of charge, to any person obtaining a copy
3386
+ of this software and associated documentation files (the "Software"), to deal
3387
+ in the Software without restriction, including without limitation the rights
3388
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3389
+ copies of the Software, and to permit persons to whom the Software is
3390
+ furnished to do so, subject to the following conditions:
3391
+ The above copyright notice and this permission notice shall be included in all
3392
+ copies or substantial portions of the Software.
3393
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3394
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3395
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3396
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3397
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3398
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3399
+ SOFTWARE.
3400
+ */
3401
+
3402
+ const currencyData = {
3403
+ AED: {
3404
+ isoCode: '784',
3405
+ fractionDigit: 2,
3406
+ currencyName: 'UAE Dirham',
3407
+ countries: ['United Arab Emirates (The)']
3408
+ },
3409
+ AFN: {
3410
+ isoCode: '971',
3411
+ fractionDigit: 2,
3412
+ currencyName: 'Afghani',
3413
+ countries: ['Afghanistan']
3414
+ },
3415
+ ALL: {
3416
+ isoCode: '008',
3417
+ fractionDigit: 2,
3418
+ currencyName: 'Lek',
3419
+ countries: ['Albania']
3420
+ },
3421
+ AMD: {
3422
+ isoCode: '051',
3423
+ fractionDigit: 2,
3424
+ currencyName: 'Armenian Dram',
3425
+ countries: ['Armenia']
3426
+ },
3427
+ ANG: {
3428
+ isoCode: '532',
3429
+ fractionDigit: 2,
3430
+ currencyName: 'Netherlands Antillean Guilder',
3431
+ countries: ['Curaçao', 'Sint Maarten (Dutch Part)']
3432
+ },
3433
+ AOA: {
3434
+ isoCode: '973',
3435
+ fractionDigit: 2,
3436
+ currencyName: 'Kwanza',
3437
+ countries: ['Angola']
3438
+ },
3439
+ ARS: {
3440
+ isoCode: '032',
3441
+ fractionDigit: 2,
3442
+ currencyName: 'Argentine Peso',
3443
+ countries: ['Argentina']
3444
+ },
3445
+ AUD: {
3446
+ isoCode: '036',
3447
+ fractionDigit: 2,
3448
+ currencyName: 'Australian Dollar',
3449
+ countries: ['Australia', 'Christmas Island', 'Cocos (Keeling) Islands (The)', 'Heard Island and Mcdonald Islands', 'Kiribati', 'Nauru', 'Norfolk Island', 'Tuvalu']
3450
+ },
3451
+ AWG: {
3452
+ isoCode: '533',
3453
+ fractionDigit: 2,
3454
+ currencyName: 'Aruban Florin',
3455
+ countries: ['Aruba']
3456
+ },
3457
+ AZN: {
3458
+ isoCode: '944',
3459
+ fractionDigit: 2,
3460
+ currencyName: 'Azerbaijan Manat',
3461
+ countries: ['Azerbaijan']
3462
+ },
3463
+ BAM: {
3464
+ isoCode: '977',
3465
+ fractionDigit: 2,
3466
+ currencyName: 'Convertible Mark',
3467
+ countries: ['Bosnia and Herzegovina']
3468
+ },
3469
+ BBD: {
3470
+ isoCode: '052',
3471
+ fractionDigit: 2,
3472
+ currencyName: 'Barbados Dollar',
3473
+ countries: ['Barbados']
3474
+ },
3475
+ BDT: {
3476
+ isoCode: '050',
3477
+ fractionDigit: 2,
3478
+ currencyName: 'Taka',
3479
+ countries: ['Bangladesh']
3480
+ },
3481
+ BGN: {
3482
+ isoCode: '975',
3483
+ fractionDigit: 2,
3484
+ symbol: 'лв',
3485
+ unicode: 'лв',
3486
+ htmlCode: 'лв',
3487
+ hexCode: 'лв',
3488
+ currencyName: 'Bulgarian Lev',
3489
+ countries: ['Bulgaria']
3490
+ },
3491
+ BHD: {
3492
+ isoCode: '048',
3493
+ fractionDigit: 3,
3494
+ currencyName: 'Bahraini Dinar',
3495
+ countries: ['Bahrain']
3496
+ },
3497
+ BIF: {
3498
+ isoCode: '108',
3499
+ fractionDigit: 0,
3500
+ currencyName: 'Burundi Franc',
3501
+ countries: ['Burundi']
3502
+ },
3503
+ BMD: {
3504
+ isoCode: '060',
3505
+ fractionDigit: 2,
3506
+ currencyName: 'Bermudian Dollar',
3507
+ countries: ['Bermuda']
3508
+ },
3509
+ BND: {
3510
+ isoCode: '096',
3511
+ fractionDigit: 2,
3512
+ currencyName: 'Brunei Dollar',
3513
+ countries: ['Brunei Darussalam']
3514
+ },
3515
+ BOB: {
3516
+ isoCode: '068',
3517
+ fractionDigit: 2,
3518
+ currencyName: 'Boliviano',
3519
+ countries: ['Bolivia (Plurinational State Of)']
3520
+ },
3521
+ BOV: {
3522
+ isoCode: '984',
3523
+ fractionDigit: 2,
3524
+ currencyName: 'Mvdol',
3525
+ countries: ['Bolivia (Plurinational State Of)']
3526
+ },
3527
+ BRL: {
3528
+ isoCode: '986',
3529
+ fractionDigit: 2,
3530
+ currencyName: 'Brazilian Real',
3531
+ countries: ['Brazil']
3532
+ },
3533
+ BSD: {
3534
+ isoCode: '044',
3535
+ fractionDigit: 2,
3536
+ currencyName: 'Bahamian Dollar',
3537
+ countries: ['Bahamas (The)']
3538
+ },
3539
+ BTN: {
3540
+ isoCode: '064',
3541
+ fractionDigit: 2,
3542
+ currencyName: 'Ngultrum',
3543
+ countries: ['Bhutan']
3544
+ },
3545
+ BWP: {
3546
+ isoCode: '072',
3547
+ fractionDigit: 2,
3548
+ currencyName: 'Pula',
3549
+ countries: ['Botswana']
3550
+ },
3551
+ BYN: {
3552
+ isoCode: '933',
3553
+ fractionDigit: 2,
3554
+ currencyName: 'Belarusian Ruble',
3555
+ countries: ['Belarus']
3556
+ },
3557
+ BZD: {
3558
+ isoCode: '084',
3559
+ fractionDigit: 2,
3560
+ currencyName: 'Belize Dollar',
3561
+ countries: ['Belize']
3562
+ },
3563
+ CAD: {
3564
+ isoCode: '124',
3565
+ fractionDigit: 2,
3566
+ currencyName: 'Canadian Dollar',
3567
+ countries: ['Canada']
3568
+ },
3569
+ CDF: {
3570
+ isoCode: '976',
3571
+ fractionDigit: 2,
3572
+ currencyName: 'Congolese Franc',
3573
+ countries: ['Congo (The Democratic Republic of The)']
3574
+ },
3575
+ CHE: {
3576
+ isoCode: '947',
3577
+ fractionDigit: 2,
3578
+ currencyName: 'WIR Euro',
3579
+ countries: ['Switzerland']
3580
+ },
3581
+ CHF: {
3582
+ isoCode: '756',
3583
+ fractionDigit: 2,
3584
+ symbol: 'CHF',
3585
+ unicode: 'CHF',
3586
+ htmlCode: 'CHF',
3587
+ hexCode: 'CHF',
3588
+ currencyName: 'Swiss Franc',
3589
+ countries: ['Liechtenstein', 'Switzerland']
3590
+ },
3591
+ CHW: {
3592
+ isoCode: '948',
3593
+ fractionDigit: 2,
3594
+ currencyName: 'WIR Franc',
3595
+ countries: ['Switzerland']
3596
+ },
3597
+ CLF: {
3598
+ isoCode: '990',
3599
+ fractionDigit: 4,
3600
+ currencyName: 'Unidad de Fomento',
3601
+ countries: ['Chile']
3602
+ },
3603
+ CLP: {
3604
+ isoCode: '152',
3605
+ fractionDigit: 0,
3606
+ currencyName: 'Chilean Peso',
3607
+ countries: ['Chile']
3608
+ },
3609
+ CNY: {
3610
+ isoCode: '156',
3611
+ fractionDigit: 2,
3612
+ currencyName: 'Yuan Renminbi',
3613
+ countries: ['China']
3614
+ },
3615
+ COP: {
3616
+ isoCode: '170',
3617
+ fractionDigit: 2,
3618
+ currencyName: 'Colombian Peso',
3619
+ countries: ['Colombia']
3620
+ },
3621
+ COU: {
3622
+ isoCode: '970',
3623
+ fractionDigit: 2,
3624
+ currencyName: 'Unidad de Valor Real',
3625
+ countries: ['Colombia']
3626
+ },
3627
+ CRC: {
3628
+ isoCode: '188',
3629
+ fractionDigit: 2,
3630
+ currencyName: 'Costa Rican Colon',
3631
+ countries: ['Costa Rica']
3632
+ },
3633
+ CUC: {
3634
+ isoCode: '931',
3635
+ fractionDigit: 2,
3636
+ currencyName: 'Peso Convertible',
3637
+ countries: ['Cuba']
3638
+ },
3639
+ CUP: {
3640
+ isoCode: '192',
3641
+ fractionDigit: 2,
3642
+ currencyName: 'Cuban Peso',
3643
+ countries: ['Cuba']
3644
+ },
3645
+ CVE: {
3646
+ isoCode: '132',
3647
+ fractionDigit: 2,
3648
+ currencyName: 'Cabo Verde Escudo',
3649
+ countries: ['Cabo Verde']
3650
+ },
3651
+ CZK: {
3652
+ isoCode: '203',
3653
+ fractionDigit: 2,
3654
+ symbol: 'Kč',
3655
+ unicode: 'Kč',
3656
+ htmlCode: 'Kč',
3657
+ hexCode: 'Kč',
3658
+ currencyName: 'Czech Koruna',
3659
+ countries: ['Czechia']
3660
+ },
3661
+ DJF: {
3662
+ isoCode: '262',
3663
+ fractionDigit: 0,
3664
+ currencyName: 'Djibouti Franc',
3665
+ countries: ['Djibouti']
3666
+ },
3667
+ DKK: {
3668
+ isoCode: '208',
3669
+ fractionDigit: 2,
3670
+ symbol: 'kr',
3671
+ unicode: 'kr',
3672
+ htmlCode: 'kr',
3673
+ hexCode: 'kr',
3674
+ currencyName: 'Danish Krone',
3675
+ countries: ['Denmark', 'Faroe Islands (The)', 'Greenland']
3676
+ },
3677
+ DOP: {
3678
+ isoCode: '214',
3679
+ fractionDigit: 2,
3680
+ currencyName: 'Dominican Peso',
3681
+ countries: ['Dominican Republic (The)']
3682
+ },
3683
+ DZD: {
3684
+ isoCode: '012',
3685
+ fractionDigit: 2,
3686
+ currencyName: 'Algerian Dinar',
3687
+ countries: ['Algeria']
3688
+ },
3689
+ EGP: {
3690
+ isoCode: '818',
3691
+ fractionDigit: 2,
3692
+ currencyName: 'Egyptian Pound',
3693
+ countries: ['Egypt']
3694
+ },
3695
+ ERN: {
3696
+ isoCode: '232',
3697
+ fractionDigit: 2,
3698
+ currencyName: 'Nakfa',
3699
+ countries: ['Eritrea']
3700
+ },
3701
+ ETB: {
3702
+ isoCode: '230',
3703
+ fractionDigit: 2,
3704
+ currencyName: 'Ethiopian Birr',
3705
+ countries: ['Ethiopia']
3706
+ },
3707
+ EUR: {
3708
+ isoCode: '978',
3709
+ fractionDigit: 2,
3710
+ symbol: '€',
3711
+ unicode: 'U+020AC',
3712
+ htmlCode: '&#x20AC;',
3713
+ hexCode: '&#8364;',
3714
+ currencyName: 'Euro',
3715
+ countries: ['Åland Islands', 'Andorra', 'Austria', 'Belgium', 'Cyprus', 'Estonia', 'European Union', 'Finland', 'France', 'French Guiana', 'French Southern Territories (The)', 'Germany', 'Greece', 'Guadeloupe', 'Holy See (The)', 'Ireland', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Martinique', 'Mayotte', 'Monaco', 'Montenegro', 'Netherlands (The)', 'Portugal', 'Réunion', 'Saint Barthélemy', 'Saint Martin (French Part)', 'Saint Pierre and Miquelon', 'San Marino', 'Slovakia', 'Slovenia', 'Spain']
3716
+ },
3717
+ FJD: {
3718
+ isoCode: '242',
3719
+ fractionDigit: 2,
3720
+ currencyName: 'Fiji Dollar',
3721
+ countries: ['Fiji']
3722
+ },
3723
+ FKP: {
3724
+ isoCode: '238',
3725
+ fractionDigit: 2,
3726
+ currencyName: 'Falkland Islands Pound',
3727
+ countries: ['Falkland Islands (The) [Malvinas]']
3728
+ },
3729
+ GBP: {
3730
+ isoCode: '826',
3731
+ fractionDigit: 2,
3732
+ symbol: '£',
3733
+ unicode: 'U+000A3',
3734
+ htmlCode: '&#xA3;',
3735
+ hexCode: '&#163;',
3736
+ currencyName: 'Pound Sterling',
3737
+ countries: ['Guernsey', 'Isle of Man', 'Jersey', 'United Kingdom of Great Britain and Northern Ireland (The)']
3738
+ },
3739
+ GEL: {
3740
+ isoCode: '981',
3741
+ fractionDigit: 2,
3742
+ symbol: '₾',
3743
+ unicode: 'U+20BE',
3744
+ htmlCode: '&#x20BE;',
3745
+ hexCode: '&#8382;',
3746
+ currencyName: 'Lari',
3747
+ countries: ['Georgia']
3748
+ },
3749
+ GHS: {
3750
+ isoCode: '936',
3751
+ fractionDigit: 2,
3752
+ currencyName: 'Ghana Cedi',
3753
+ countries: ['Ghana']
3754
+ },
3755
+ GIP: {
3756
+ isoCode: '292',
3757
+ fractionDigit: 2,
3758
+ currencyName: 'Gibraltar Pound',
3759
+ countries: ['Gibraltar']
3760
+ },
3761
+ GMD: {
3762
+ isoCode: '270',
3763
+ fractionDigit: 2,
3764
+ currencyName: 'Dalasi',
3765
+ countries: ['Gambia (The)']
3766
+ },
3767
+ GNF: {
3768
+ isoCode: '324',
3769
+ fractionDigit: 0,
3770
+ currencyName: 'Guinean Franc',
3771
+ countries: ['Guinea']
3772
+ },
3773
+ GTQ: {
3774
+ isoCode: '320',
3775
+ fractionDigit: 2,
3776
+ currencyName: 'Quetzal',
3777
+ countries: ['Guatemala']
3778
+ },
3779
+ GYD: {
3780
+ isoCode: '328',
3781
+ fractionDigit: 2,
3782
+ currencyName: 'Guyana Dollar',
3783
+ countries: ['Guyana']
3784
+ },
3785
+ HKD: {
3786
+ isoCode: '344',
3787
+ fractionDigit: 2,
3788
+ currencyName: 'Hong Kong Dollar',
3789
+ countries: ['Hong Kong']
3790
+ },
3791
+ HNL: {
3792
+ isoCode: '340',
3793
+ fractionDigit: 2,
3794
+ currencyName: 'Lempira',
3795
+ countries: ['Honduras']
3796
+ },
3797
+ HRK: {
3798
+ isoCode: '191',
3799
+ fractionDigit: 2,
3800
+ symbol: 'kn',
3801
+ unicode: 'kn',
3802
+ htmlCode: 'kn',
3803
+ hexCode: 'kn',
3804
+ currencyName: 'Kuna',
3805
+ countries: ['Croatia']
3806
+ },
3807
+ HTG: {
3808
+ isoCode: '332',
3809
+ fractionDigit: 2,
3810
+ currencyName: 'Gourde',
3811
+ countries: ['Haiti']
3812
+ },
3813
+ HUF: {
3814
+ isoCode: '348',
3815
+ fractionDigit: 2,
3816
+ currencyName: 'Forint',
3817
+ countries: ['Hungary']
3818
+ },
3819
+ IDR: {
3820
+ isoCode: '360',
3821
+ fractionDigit: 2,
3822
+ currencyName: 'Rupiah',
3823
+ countries: ['Indonesia']
3824
+ },
3825
+ ILS: {
3826
+ isoCode: '376',
3827
+ fractionDigit: 2,
3828
+ currencyName: 'New Israeli Sheqel',
3829
+ countries: ['Israel']
3830
+ },
3831
+ INR: {
3832
+ isoCode: '356',
3833
+ fractionDigit: 2,
3834
+ symbol: '₹',
3835
+ unicode: 'U+020B9',
3836
+ htmlCode: '&#x20B9;',
3837
+ hexCode: '&#8377;',
3838
+ currencyName: 'Indian Rupee',
3839
+ countries: ['Bhutan', 'India']
3840
+ },
3841
+ IQD: {
3842
+ isoCode: '368',
3843
+ fractionDigit: 3,
3844
+ currencyName: 'Iraqi Dinar',
3845
+ countries: ['Iraq']
3846
+ },
3847
+ IRR: {
3848
+ isoCode: '364',
3849
+ fractionDigit: 2,
3850
+ currencyName: 'Iranian Rial',
3851
+ countries: ['Iran (Islamic Republic Of)']
3852
+ },
3853
+ ISK: {
3854
+ isoCode: '352',
3855
+ fractionDigit: 0,
3856
+ currencyName: 'Iceland Krona',
3857
+ countries: ['Iceland']
3858
+ },
3859
+ JMD: {
3860
+ isoCode: '388',
3861
+ fractionDigit: 2,
3862
+ currencyName: 'Jamaican Dollar',
3863
+ countries: ['Jamaica']
3864
+ },
3865
+ JOD: {
3866
+ isoCode: '400',
3867
+ fractionDigit: 3,
3868
+ currencyName: 'Jordanian Dinar',
3869
+ countries: ['Jordan']
3870
+ },
3871
+ JPY: {
3872
+ isoCode: '392',
3873
+ fractionDigit: 0,
3874
+ symbol: '¥',
3875
+ unicode: 'U+000A5',
3876
+ htmlCode: '&#xa5;',
3877
+ hexCode: '&#165;',
3878
+ currencyName: 'Yen',
3879
+ countries: ['Japan']
3880
+ },
3881
+ KES: {
3882
+ isoCode: '404',
3883
+ fractionDigit: 2,
3884
+ currencyName: 'Kenyan Shilling',
3885
+ countries: ['Kenya']
3886
+ },
3887
+ KGS: {
3888
+ isoCode: '417',
3889
+ fractionDigit: 2,
3890
+ currencyName: 'Som',
3891
+ countries: ['Kyrgyzstan']
3892
+ },
3893
+ KHR: {
3894
+ isoCode: '116',
3895
+ fractionDigit: 2,
3896
+ currencyName: 'Riel',
3897
+ countries: ['Cambodia']
3898
+ },
3899
+ KMF: {
3900
+ isoCode: '174',
3901
+ fractionDigit: 0,
3902
+ currencyName: 'Comorian Franc ',
3903
+ countries: ['Comoros (The)']
3904
+ },
3905
+ KPW: {
3906
+ isoCode: '408',
3907
+ fractionDigit: 2,
3908
+ currencyName: 'North Korean Won',
3909
+ countries: ['Korea (The Democratic People’s Republic Of)']
3910
+ },
3911
+ KRW: {
3912
+ isoCode: '410',
3913
+ fractionDigit: 0,
3914
+ currencyName: 'Won',
3915
+ countries: ['Korea (The Republic Of)']
3916
+ },
3917
+ KWD: {
3918
+ isoCode: '414',
3919
+ fractionDigit: 3,
3920
+ currencyName: 'Kuwaiti Dinar',
3921
+ countries: ['Kuwait']
3922
+ },
3923
+ KYD: {
3924
+ isoCode: '136',
3925
+ fractionDigit: 2,
3926
+ currencyName: 'Cayman Islands Dollar',
3927
+ countries: ['Cayman Islands (The)']
3928
+ },
3929
+ KZT: {
3930
+ isoCode: '398',
3931
+ fractionDigit: 2,
3932
+ currencyName: 'Tenge',
3933
+ countries: ['Kazakhstan']
3934
+ },
3935
+ LAK: {
3936
+ isoCode: '418',
3937
+ fractionDigit: 2,
3938
+ currencyName: 'Lao Kip',
3939
+ countries: ['Lao People’s Democratic Republic (The)']
3940
+ },
3941
+ LBP: {
3942
+ isoCode: '422',
3943
+ fractionDigit: 2,
3944
+ currencyName: 'Lebanese Pound',
3945
+ countries: ['Lebanon']
3946
+ },
3947
+ LKR: {
3948
+ isoCode: '144',
3949
+ fractionDigit: 2,
3950
+ currencyName: 'Sri Lanka Rupee',
3951
+ countries: ['Sri Lanka']
3952
+ },
3953
+ LRD: {
3954
+ isoCode: '430',
3955
+ fractionDigit: 2,
3956
+ currencyName: 'Liberian Dollar',
3957
+ countries: ['Liberia']
3958
+ },
3959
+ LSL: {
3960
+ isoCode: '426',
3961
+ fractionDigit: 2,
3962
+ currencyName: 'Loti',
3963
+ countries: ['Lesotho']
3964
+ },
3965
+ LYD: {
3966
+ isoCode: '434',
3967
+ fractionDigit: 3,
3968
+ currencyName: 'Libyan Dinar',
3969
+ countries: ['Libya']
3970
+ },
3971
+ MAD: {
3972
+ isoCode: '504',
3973
+ fractionDigit: 2,
3974
+ currencyName: 'Moroccan Dirham',
3975
+ countries: ['Morocco', 'Western Sahara']
3976
+ },
3977
+ MDL: {
3978
+ isoCode: '498',
3979
+ fractionDigit: 2,
3980
+ currencyName: 'Moldovan Leu',
3981
+ countries: ['Moldova (The Republic Of)']
3982
+ },
3983
+ MGA: {
3984
+ isoCode: '969',
3985
+ fractionDigit: 2,
3986
+ currencyName: 'Malagasy Ariary',
3987
+ countries: ['Madagascar']
3988
+ },
3989
+ MKD: {
3990
+ isoCode: '807',
3991
+ fractionDigit: 2,
3992
+ currencyName: 'Denar',
3993
+ countries: ['Macedonia (The Former Yugoslav Republic Of)']
3994
+ },
3995
+ MMK: {
3996
+ isoCode: '104',
3997
+ fractionDigit: 2,
3998
+ currencyName: 'Kyat',
3999
+ countries: ['Myanmar']
4000
+ },
4001
+ MNT: {
4002
+ isoCode: '496',
4003
+ fractionDigit: 2,
4004
+ currencyName: 'Tugrik',
4005
+ countries: ['Mongolia']
4006
+ },
4007
+ MOP: {
4008
+ isoCode: '446',
4009
+ fractionDigit: 2,
4010
+ currencyName: 'Pataca',
4011
+ countries: ['Macao']
4012
+ },
4013
+ MRU: {
4014
+ isoCode: '929',
4015
+ fractionDigit: 2,
4016
+ currencyName: 'Ouguiya',
4017
+ countries: ['Mauritania']
4018
+ },
4019
+ MUR: {
4020
+ isoCode: '480',
4021
+ fractionDigit: 2,
4022
+ currencyName: 'Mauritius Rupee',
4023
+ countries: ['Mauritius']
4024
+ },
4025
+ MVR: {
4026
+ isoCode: '462',
4027
+ fractionDigit: 2,
4028
+ currencyName: 'Rufiyaa',
4029
+ countries: ['Maldives']
4030
+ },
4031
+ MWK: {
4032
+ isoCode: '454',
4033
+ fractionDigit: 2,
4034
+ currencyName: 'Malawi Kwacha',
4035
+ countries: ['Malawi']
4036
+ },
4037
+ MXN: {
4038
+ isoCode: '484',
4039
+ fractionDigit: 2,
4040
+ currencyName: 'Mexican Peso',
4041
+ countries: ['Mexico']
4042
+ },
4043
+ MXV: {
4044
+ isoCode: '979',
4045
+ fractionDigit: 2,
4046
+ currencyName: 'Mexican Unidad de Inversion (UDI)',
4047
+ countries: ['Mexico']
4048
+ },
4049
+ MYR: {
4050
+ isoCode: '458',
4051
+ fractionDigit: 2,
4052
+ currencyName: 'Malaysian Ringgit',
4053
+ countries: ['Malaysia']
4054
+ },
4055
+ MZN: {
4056
+ isoCode: '943',
4057
+ fractionDigit: 2,
4058
+ currencyName: 'Mozambique Metical',
4059
+ countries: ['Mozambique']
4060
+ },
4061
+ NAD: {
4062
+ isoCode: '516',
4063
+ fractionDigit: 2,
4064
+ currencyName: 'Namibia Dollar',
4065
+ countries: ['Namibia']
4066
+ },
4067
+ NGN: {
4068
+ isoCode: '566',
4069
+ fractionDigit: 2,
4070
+ currencyName: 'Naira',
4071
+ countries: ['Nigeria']
4072
+ },
4073
+ NIO: {
4074
+ isoCode: '558',
4075
+ fractionDigit: 2,
4076
+ currencyName: 'Cordoba Oro',
4077
+ countries: ['Nicaragua']
4078
+ },
4079
+ NOK: {
4080
+ isoCode: '578',
4081
+ fractionDigit: 2,
4082
+ currencyName: 'Norwegian Krone',
4083
+ countries: ['Bouvet Island', 'Norway', 'Svalbard and Jan Mayen']
4084
+ },
4085
+ NPR: {
4086
+ isoCode: '524',
4087
+ fractionDigit: 2,
4088
+ currencyName: 'Nepalese Rupee',
4089
+ countries: ['Nepal']
4090
+ },
4091
+ NZD: {
4092
+ isoCode: '554',
4093
+ fractionDigit: 2,
4094
+ currencyName: 'New Zealand Dollar',
4095
+ countries: ['Cook Islands (The)', 'New Zealand', 'Niue', 'Pitcairn', 'Tokelau']
4096
+ },
4097
+ OMR: {
4098
+ isoCode: '512',
4099
+ fractionDigit: 3,
4100
+ currencyName: 'Rial Omani',
4101
+ countries: ['Oman']
4102
+ },
4103
+ PAB: {
4104
+ isoCode: '590',
4105
+ fractionDigit: 2,
4106
+ currencyName: 'Balboa',
4107
+ countries: ['Panama']
4108
+ },
4109
+ PEN: {
4110
+ isoCode: '604',
4111
+ fractionDigit: 2,
4112
+ currencyName: 'Sol',
4113
+ countries: ['Peru']
4114
+ },
4115
+ PGK: {
4116
+ isoCode: '598',
4117
+ fractionDigit: 2,
4118
+ currencyName: 'Kina',
4119
+ countries: ['Papua New Guinea']
4120
+ },
4121
+ PHP: {
4122
+ isoCode: '608',
4123
+ fractionDigit: 2,
4124
+ currencyName: 'Philippine Peso',
4125
+ countries: ['Philippines (The)']
4126
+ },
4127
+ PKR: {
4128
+ isoCode: '586',
4129
+ fractionDigit: 2,
4130
+ currencyName: 'Pakistan Rupee',
4131
+ countries: ['Pakistan']
4132
+ },
4133
+ PLN: {
4134
+ isoCode: '985',
4135
+ fractionDigit: 2,
4136
+ currencyName: 'Zloty',
4137
+ countries: ['Poland']
4138
+ },
4139
+ PYG: {
4140
+ isoCode: '600',
4141
+ fractionDigit: 0,
4142
+ currencyName: 'Guarani',
4143
+ countries: ['Paraguay']
4144
+ },
4145
+ QAR: {
4146
+ isoCode: '634',
4147
+ fractionDigit: 2,
4148
+ currencyName: 'Qatari Rial',
4149
+ countries: ['Qatar']
4150
+ },
4151
+ RON: {
4152
+ isoCode: '946',
4153
+ fractionDigit: 2,
4154
+ currencyName: 'Romanian Leu',
4155
+ countries: ['Romania']
4156
+ },
4157
+ RSD: {
4158
+ isoCode: '941',
4159
+ fractionDigit: 2,
4160
+ currencyName: 'Serbian Dinar',
4161
+ countries: ['Serbia']
4162
+ },
4163
+ RUB: {
4164
+ isoCode: '643',
4165
+ fractionDigit: 2,
4166
+ currencyName: 'Russian Ruble',
4167
+ countries: ['Russian Federation (The)']
4168
+ },
4169
+ RWF: {
4170
+ isoCode: '646',
4171
+ fractionDigit: 0,
4172
+ currencyName: 'Rwanda Franc',
4173
+ countries: ['Rwanda']
4174
+ },
4175
+ SAR: {
4176
+ isoCode: '682',
4177
+ fractionDigit: 2,
4178
+ currencyName: 'Saudi Riyal',
4179
+ countries: ['Saudi Arabia']
4180
+ },
4181
+ SBD: {
4182
+ isoCode: '090',
4183
+ fractionDigit: 2,
4184
+ currencyName: 'Solomon Islands Dollar',
4185
+ countries: ['Solomon Islands']
4186
+ },
4187
+ SCR: {
4188
+ isoCode: '690',
4189
+ fractionDigit: 2,
4190
+ currencyName: 'Seychelles Rupee',
4191
+ countries: ['Seychelles']
4192
+ },
4193
+ SDG: {
4194
+ isoCode: '938',
4195
+ fractionDigit: 2,
4196
+ currencyName: 'Sudanese Pound',
4197
+ countries: ['Sudan (The)']
4198
+ },
4199
+ SEK: {
4200
+ isoCode: '752',
4201
+ fractionDigit: 2,
4202
+ currencyName: 'Swedish Krona',
4203
+ countries: ['Sweden']
4204
+ },
4205
+ SGD: {
4206
+ isoCode: '702',
4207
+ fractionDigit: 2,
4208
+ currencyName: 'Singapore Dollar',
4209
+ countries: ['Singapore']
4210
+ },
4211
+ SHP: {
4212
+ isoCode: '654',
4213
+ fractionDigit: 2,
4214
+ currencyName: 'Saint Helena Pound',
4215
+ countries: ['Saint Helena, Ascension and Tristan Da Cunha']
4216
+ },
4217
+ SLL: {
4218
+ isoCode: '694',
4219
+ fractionDigit: 2,
4220
+ currencyName: 'Leone',
4221
+ countries: ['Sierra Leone']
4222
+ },
4223
+ SOS: {
4224
+ isoCode: '706',
4225
+ fractionDigit: 2,
4226
+ currencyName: 'Somali Shilling',
4227
+ countries: ['Somalia']
4228
+ },
4229
+ SRD: {
4230
+ isoCode: '968',
4231
+ fractionDigit: 2,
4232
+ currencyName: 'Surinam Dollar',
4233
+ countries: ['Suriname']
4234
+ },
4235
+ SSP: {
4236
+ isoCode: '728',
4237
+ fractionDigit: 2,
4238
+ currencyName: 'South Sudanese Pound',
4239
+ countries: ['South Sudan']
4240
+ },
4241
+ STN: {
4242
+ isoCode: '930',
4243
+ fractionDigit: 2,
4244
+ currencyName: 'Dobra',
4245
+ countries: ['Sao Tome and Principe']
4246
+ },
4247
+ SVC: {
4248
+ isoCode: '222',
4249
+ fractionDigit: 2,
4250
+ currencyName: 'El Salvador Colon',
4251
+ countries: ['El Salvador']
4252
+ },
4253
+ SYP: {
4254
+ isoCode: '760',
4255
+ fractionDigit: 2,
4256
+ currencyName: 'Syrian Pound',
4257
+ countries: ['Syrian Arab Republic']
4258
+ },
4259
+ SZL: {
4260
+ isoCode: '748',
4261
+ fractionDigit: 2,
4262
+ currencyName: 'Lilangeni',
4263
+ countries: ['Eswatini']
4264
+ },
4265
+ THB: {
4266
+ isoCode: '764',
4267
+ fractionDigit: 2,
4268
+ currencyName: 'Baht',
4269
+ countries: ['Thailand']
4270
+ },
4271
+ TJS: {
4272
+ isoCode: '972',
4273
+ fractionDigit: 2,
4274
+ currencyName: 'Somoni',
4275
+ countries: ['Tajikistan']
4276
+ },
4277
+ TMT: {
4278
+ isoCode: '934',
4279
+ fractionDigit: 2,
4280
+ currencyName: 'Turkmenistan New Manat',
4281
+ countries: ['Turkmenistan']
4282
+ },
4283
+ TND: {
4284
+ isoCode: '788',
4285
+ fractionDigit: 3,
4286
+ currencyName: 'Tunisian Dinar',
4287
+ countries: ['Tunisia']
4288
+ },
4289
+ TOP: {
4290
+ isoCode: '776',
4291
+ fractionDigit: 2,
4292
+ currencyName: 'Pa’anga',
4293
+ countries: ['Tonga']
4294
+ },
4295
+ TRY: {
4296
+ isoCode: '949',
4297
+ fractionDigit: 2,
4298
+ currencyName: 'Turkish Lira',
4299
+ countries: ['Turkey']
4300
+ },
4301
+ TTD: {
4302
+ isoCode: '780',
4303
+ fractionDigit: 2,
4304
+ currencyName: 'Trinidad and Tobago Dollar',
4305
+ countries: ['Trinidad and Tobago']
4306
+ },
4307
+ TWD: {
4308
+ isoCode: '901',
4309
+ fractionDigit: 2,
4310
+ currencyName: 'New Taiwan Dollar',
4311
+ countries: ['Taiwan (Province of China)']
4312
+ },
4313
+ TZS: {
4314
+ isoCode: '834',
4315
+ fractionDigit: 2,
4316
+ currencyName: 'Tanzanian Shilling',
4317
+ countries: ['Tanzania, United Republic Of']
4318
+ },
4319
+ UAH: {
4320
+ isoCode: '980',
4321
+ fractionDigit: 2,
4322
+ currencyName: 'Hryvnia',
4323
+ countries: ['Ukraine']
4324
+ },
4325
+ UGX: {
4326
+ isoCode: '800',
4327
+ fractionDigit: 0,
4328
+ currencyName: 'Uganda Shilling',
4329
+ countries: ['Uganda']
4330
+ },
4331
+ USD: {
4332
+ isoCode: '840',
4333
+ fractionDigit: 2,
4334
+ symbol: '$',
4335
+ unicode: 'U+00024',
4336
+ htmlCode: '&#x24;',
4337
+ hexCode: '&#36;',
4338
+ currencyName: 'US Dollar',
4339
+ countries: ['American Samoa', 'Bonaire, Sint Eustatius and Saba', 'British Indian Ocean Territory (The)', 'Ecuador', 'El Salvador', 'Guam', 'Haiti', 'Marshall Islands (The)', 'Micronesia (Federated States Of)', 'Northern Mariana Islands (The)', 'Palau', 'Panama', 'Puerto Rico', 'Timor-Leste', 'Turks and Caicos Islands (The)', 'United States Minor Outlying Islands (The)', 'United States of America (The)', 'Virgin Islands (British)', 'Virgin Islands (U.S.)']
4340
+ },
4341
+ USN: {
4342
+ isoCode: '997',
4343
+ fractionDigit: 2,
4344
+ currencyName: 'US Dollar (Next day)',
4345
+ countries: ['United States of America (The)']
4346
+ },
4347
+ UYI: {
4348
+ isoCode: '940',
4349
+ fractionDigit: 0,
4350
+ currencyName: 'Uruguay Peso en Unidades Indexadas (UI)',
4351
+ countries: ['Uruguay']
4352
+ },
4353
+ UYU: {
4354
+ isoCode: '858',
4355
+ fractionDigit: 2,
4356
+ currencyName: 'Peso Uruguayo',
4357
+ countries: ['Uruguay']
4358
+ },
4359
+ UYW: {
4360
+ isoCode: '927',
4361
+ fractionDigit: 4,
4362
+ currencyName: 'Unidad Previsional',
4363
+ countries: ['Uruguay']
4364
+ },
4365
+ UZS: {
4366
+ isoCode: '860',
4367
+ fractionDigit: 2,
4368
+ currencyName: 'Uzbekistan Sum',
4369
+ countries: ['Uzbekistan']
4370
+ },
4371
+ VES: {
4372
+ isoCode: '928',
4373
+ fractionDigit: 2,
4374
+ currencyName: 'Bolívar Soberano',
4375
+ countries: ['Venezuela (Bolivarian Republic Of)']
4376
+ },
4377
+ VND: {
4378
+ isoCode: '704',
4379
+ fractionDigit: 0,
4380
+ currencyName: 'Dong',
4381
+ countries: ['Viet Nam']
4382
+ },
4383
+ VUV: {
4384
+ isoCode: '548',
4385
+ fractionDigit: 0,
4386
+ currencyName: 'Vatu',
4387
+ countries: ['Vanuatu']
4388
+ },
4389
+ WST: {
4390
+ isoCode: '882',
4391
+ fractionDigit: 2,
4392
+ currencyName: 'Tala',
4393
+ countries: ['Samoa']
4394
+ },
4395
+ XAF: {
4396
+ isoCode: '950',
4397
+ fractionDigit: 0,
4398
+ currencyName: 'CFA Franc BEAC',
4399
+ countries: ['Cameroon', 'Central African Republic (The)', 'Chad', 'Congo (The)', 'Equatorial Guinea', 'Gabon']
4400
+ },
4401
+ XAG: {
4402
+ isoCode: '961',
4403
+ fractionDigit: 0,
4404
+ currencyName: 'Silver',
4405
+ countries: ['Zz11_silver']
4406
+ },
4407
+ XAU: {
4408
+ isoCode: '959',
4409
+ fractionDigit: 0,
4410
+ currencyName: 'Gold',
4411
+ countries: ['Zz08_gold']
4412
+ },
4413
+ XBA: {
4414
+ isoCode: '955',
4415
+ fractionDigit: 0,
4416
+ currencyName: 'Bond Markets Unit European Composite Unit (EURCO)',
4417
+ countries: ['Zz01_bond Markets Unit European_eurco']
4418
+ },
4419
+ XBB: {
4420
+ isoCode: '956',
4421
+ fractionDigit: 0,
4422
+ currencyName: 'Bond Markets Unit European Monetary Unit (E.M.U.-6)',
4423
+ countries: ['Zz02_bond Markets Unit European_emu-6']
4424
+ },
4425
+ XBC: {
4426
+ isoCode: '957',
4427
+ fractionDigit: 0,
4428
+ currencyName: 'Bond Markets Unit European Unit of Account 9 (E.U.A.-9)',
4429
+ countries: ['Zz03_bond Markets Unit European_eua-9']
4430
+ },
4431
+ XBD: {
4432
+ isoCode: '958',
4433
+ fractionDigit: 0,
4434
+ currencyName: 'Bond Markets Unit European Unit of Account 17 (E.U.A.-17)',
4435
+ countries: ['Zz04_bond Markets Unit European_eua-17']
4436
+ },
4437
+ XCD: {
4438
+ isoCode: '951',
4439
+ fractionDigit: 2,
4440
+ currencyName: 'East Caribbean Dollar',
4441
+ countries: ['Anguilla', 'Antigua and Barbuda', 'Dominica', 'Grenada', 'Montserrat', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines']
4442
+ },
4443
+ XDR: {
4444
+ isoCode: '960',
4445
+ fractionDigit: 0,
4446
+ currencyName: 'SDR (Special Drawing Right)',
4447
+ countries: ['International Monetary Fund (Imf) ']
4448
+ },
4449
+ XOF: {
4450
+ isoCode: '952',
4451
+ fractionDigit: 0,
4452
+ currencyName: 'CFA Franc BCEAO',
4453
+ countries: ['Benin', 'Burkina Faso', "Côte d'Ivoire", 'Guinea-Bissau', 'Mali', 'Niger (The)', 'Senegal', 'Togo']
4454
+ },
4455
+ XPD: {
4456
+ isoCode: '964',
4457
+ fractionDigit: 0,
4458
+ currencyName: 'Palladium',
4459
+ countries: ['Zz09_palladium']
4460
+ },
4461
+ XPF: {
4462
+ isoCode: '953',
4463
+ fractionDigit: 0,
4464
+ currencyName: 'CFP Franc',
4465
+ countries: ['French Polynesia', 'New Caledonia', 'Wallis and Futuna']
4466
+ },
4467
+ XPT: {
4468
+ isoCode: '962',
4469
+ fractionDigit: 0,
4470
+ currencyName: 'Platinum',
4471
+ countries: ['Zz10_platinum']
4472
+ },
4473
+ XSU: {
4474
+ isoCode: '994',
4475
+ fractionDigit: 0,
4476
+ currencyName: 'Sucre',
4477
+ countries: ['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']
4478
+ },
4479
+ XTS: {
4480
+ isoCode: '963',
4481
+ fractionDigit: 0,
4482
+ currencyName: 'Codes specifically reserved for testing purposes',
4483
+ countries: ['Zz06_testing_code']
4484
+ },
4485
+ XUA: {
4486
+ isoCode: '965',
4487
+ fractionDigit: 0,
4488
+ currencyName: 'ADB Unit of Account',
4489
+ countries: ['Member Countries of the African Development Bank Group']
4490
+ },
4491
+ XXX: {
4492
+ isoCode: '999',
4493
+ fractionDigit: 0,
4494
+ currencyName: 'The codes assigned for transactions where no currency is involved',
4495
+ countries: ['Zz07_no_currency']
4496
+ },
4497
+ YER: {
4498
+ isoCode: '886',
4499
+ fractionDigit: 2,
4500
+ currencyName: 'Yemeni Rial',
4501
+ countries: ['Yemen']
4502
+ },
4503
+ ZAR: {
4504
+ isoCode: '710',
4505
+ fractionDigit: 2,
4506
+ currencyName: 'Rand',
4507
+ countries: ['Lesotho', 'Namibia', 'South Africa']
4508
+ },
4509
+ ZMW: {
4510
+ isoCode: '967',
4511
+ fractionDigit: 2,
4512
+ currencyName: 'Zambian Kwacha',
4513
+ countries: ['Zambia']
4514
+ },
4515
+ ZWL: {
4516
+ isoCode: '932',
4517
+ fractionDigit: 2,
4518
+ currencyName: 'Zimbabwe Dollar',
4519
+ countries: ['Zimbabwe']
4520
+ }
4521
+ };
4522
+ var currencyData$1 = currencyData;
4523
+
4524
+ /* This is is short-term solution that patches fraction digits not being available from the Dashboard backend.
4525
+
4526
+ MIT License
4527
+
4528
+ Copyright (c) 2020 Santosh Yadav
4529
+
4530
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4531
+ of this software and associated documentation files (the "Software"), to deal
4532
+ in the Software without restriction, including without limitation the rights
4533
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4534
+ copies of the Software, and to permit persons to whom the Software is
4535
+ furnished to do so, subject to the following conditions:
4536
+ The above copyright notice and this permission notice shall be included in all
4537
+ copies or substantial portions of the Software.
4538
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4539
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4540
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4541
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4542
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4543
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4544
+ SOFTWARE.
4545
+ */
4546
+
4547
+ const getData = (code, field) => {
4548
+ code = code !== undefined && code !== '' ? code.toUpperCase() : code;
4549
+ if (currencyData$1[code] !== undefined) {
4550
+ if (field === 'all') return currencyData$1[code];else return currencyData$1[code][field];
4551
+ } else return undefined;
4552
+ };
4553
+ const getFractionDigit = code => getData(code, 'fractionDigit');
4554
+
4555
+ function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
4556
+ function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$15(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$15(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4557
+ function formatMoneyRangeValue(value, intl) {
4558
+ if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
4559
+ if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
4560
+ ${formatMoneyValue(value.to, value.currency, intl)}`;
4561
+ if (value.from) return `from ${formatMoneyValue(value.from, value.currency, intl)}`;
4562
+ if (value.to) return `to ${formatMoneyValue(value.to, value.currency, intl)}`;
4563
+ return '';
4564
+ }
4565
+ function formatMoneyValue(amount, currency, intl) {
4566
+ return formatMoney$1(_objectSpread$15({
4567
+ centAmount: amount,
4568
+ fractionDigits: getFractionDigit(currency)
4569
+ }, currency ? {
4570
+ currencyCode: currency
4571
+ } : {}), intl);
4572
+ }
4573
+ function getFractionedAmount(moneyValue) {
4574
+ const _moneyValue$fractionD = moneyValue.fractionDigits,
4575
+ fractionDigits = _moneyValue$fractionD === void 0 ? 2 : _moneyValue$fractionD;
4576
+
4577
+ // the amount should be available on preciseAmount for highPrecision
4578
+ const amount = moneyValue.type === PRECISION_TYPES.highPrecision ? moneyValue.preciseAmount : moneyValue.centAmount;
4579
+ return amount / 10 ** fractionDigits;
4580
+ }
4581
+ function formatMoney$1(moneyValue, intl, options) {
4582
+ return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$15({
4583
+ style: 'currency',
4584
+ currency: moneyValue.currencyCode,
4585
+ minimumFractionDigits: moneyValue.fractionDigits
4586
+ }, options));
4587
+ }
4588
+
4589
+ var messages$K = reactIntl.defineMessages({
4590
+ booleanYes: {
4591
+ id: 'AttributeTypeFormats.boolean.yes',
4592
+ description: 'The label for boolean attribute `true` value',
4593
+ defaultMessage: 'YES'
4594
+ },
4595
+ booleanNo: {
4596
+ id: 'AttributeTypeFormats.boolean.no',
4597
+ description: 'The label for boolean attribute `false` value',
4598
+ defaultMessage: 'NO'
4785
4599
  }
4600
+ });
4601
+
4602
+ const formatEnum = _ref => {
4603
+ let value = _ref.value,
4604
+ fallbackValue = _ref.fallbackValue;
4605
+ return value.label || `${fallbackValue} (${value.key})`;
4786
4606
  };
4787
- const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
4788
- let actionName = _ref9.action,
4789
- actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
4790
- return [...previousActions, convertAction(actionName, actionPayload)];
4791
- }, []);
4792
- const extractErrorFromGraphQlResponse = graphQlResponse => {
4793
- if (graphQlResponse.networkError?.result?.errors?.length > 0) {
4794
- return graphQlResponse.networkError.result.errors;
4607
+ const formatLenum = _ref2 => {
4608
+ let value = _ref2.value,
4609
+ language = _ref2.language,
4610
+ languages = _ref2.languages,
4611
+ fallbackValue = _ref2.fallbackValue;
4612
+ return l10n.formatLocalizedString(value, {
4613
+ key: 'label',
4614
+ locale: language,
4615
+ fallback: `${fallbackValue} (${value.key})`,
4616
+ fallbackOrder: languages
4617
+ });
4618
+ };
4619
+ const formatLtext = _ref3 => {
4620
+ let value = _ref3.value,
4621
+ language = _ref3.language;
4622
+ return l10n.formatLocalizedString({
4623
+ value
4624
+ }, {
4625
+ key: 'value',
4626
+ locale: language
4627
+ });
4628
+ };
4629
+ const formatMoney = _ref4 => {
4630
+ let value = _ref4.value,
4631
+ intl = _ref4.intl;
4632
+ return formatMoney$1(value, intl);
4633
+ };
4634
+ const formatReference = _ref5 => {
4635
+ let value = _ref5.value;
4636
+ return value.id;
4637
+ };
4638
+ const formatDate = _ref6 => {
4639
+ let value = _ref6.value,
4640
+ userTimeZone = _ref6.userTimeZone,
4641
+ intl = _ref6.intl;
4642
+ return intl.formatDate(Date.parse(value), {
4643
+ day: 'numeric',
4644
+ month: 'long',
4645
+ year: 'numeric',
4646
+ // defaults to utc if timeZone is not provided
4647
+ timeZone: userTimeZone || 'utc'
4648
+ });
4649
+ };
4650
+ const formatDateTime = _ref7 => {
4651
+ let value = _ref7.value,
4652
+ userTimeZone = _ref7.userTimeZone,
4653
+ intl = _ref7.intl;
4654
+ const date = formatDate({
4655
+ value,
4656
+ userTimeZone,
4657
+ intl
4658
+ });
4659
+ const time = intl.formatTime(Date.parse(value), {
4660
+ hour: 'numeric',
4661
+ minute: 'numeric',
4662
+ second: 'numeric',
4663
+ // defaults to utc if timeZone is not provided
4664
+ timeZone: userTimeZone || 'utc'
4665
+ });
4666
+ return `${date} (${time})`;
4667
+ };
4668
+ const formatBoolean = _ref8 => {
4669
+ let value = _ref8.value,
4670
+ intl = _ref8.intl;
4671
+ return value ? intl.formatMessage(messages$K.booleanYes) : intl.formatMessage(messages$K.booleanNo);
4672
+ };
4673
+ const formatNilType = _ref9 => {
4674
+ let value = _ref9.value,
4675
+ fallbackValue = _ref9.fallbackValue;
4676
+ sentry.reportErrorToSentry(new Error('Type was not provided'), {
4677
+ extra: {
4678
+ value
4679
+ }
4680
+ });
4681
+ return fallbackValue;
4682
+ };
4683
+ const formatUnknown = _ref0 => {
4684
+ let type = _ref0.type,
4685
+ value = _ref0.value,
4686
+ fallbackValue = _ref0.fallbackValue;
4687
+ // NOTE This is reporting within the render function, which is supposed to
4688
+ // be pure. This is quite bad as this is a side-effect in the render fn.
4689
+ sentry.reportErrorToSentry(new Error(`Unhandled custom attribute type '${type.name}' for value`), {
4690
+ extra: {
4691
+ value
4692
+ }
4693
+ });
4694
+ return fallbackValue;
4695
+ };
4696
+ const formatNested = _ref1 => {
4697
+ let fallbackValue = _ref1.fallbackValue;
4698
+ return fallbackValue;
4699
+ };
4700
+ const formatSet = _ref10 => {
4701
+ let type = _ref10.type,
4702
+ value = _ref10.value,
4703
+ intl = _ref10.intl,
4704
+ language = _ref10.language,
4705
+ languages = _ref10.languages,
4706
+ fallbackValue = _ref10.fallbackValue;
4707
+ const formatedElements = _mapInstanceProperty__default["default"](value).call(value, elementValue => formatAttribute({
4708
+ type: type.elementType,
4709
+ value: elementValue,
4710
+ intl,
4711
+ language,
4712
+ languages,
4713
+ fallbackValue
4714
+ }));
4715
+ return formatedElements.join(', ');
4716
+ };
4717
+ const doNotFormat = _ref11 => {
4718
+ let value = _ref11.value;
4719
+ return value;
4720
+ };
4721
+ const getFormatter = type => {
4722
+ if (isNil__default["default"](type)) return formatNilType;else if (type.name === 'nested') return formatNested;else if (type.name === 'set') return formatSet;else if (type.name === 'enum') return formatEnum;else if (type.name === 'lenum') return formatLenum;else if (type.name === 'ltext') return formatLtext;else if (type.name === 'money') return formatMoney;else if (type.name === 'reference') return formatReference;else if (type.name === 'date') return formatDate;else if (type.name === 'time') return doNotFormat;else if (type.name === 'datetime') return formatDateTime;else if (type.name === 'boolean') return formatBoolean;else if (type.name === 'text') return doNotFormat;else if (type.name === 'number') return doNotFormat;else return formatUnknown;
4723
+ };
4724
+ function formatAttribute(_ref12) {
4725
+ let type = _ref12.type,
4726
+ value = _ref12.value,
4727
+ intl = _ref12.intl,
4728
+ language = _ref12.language,
4729
+ languages = _ref12.languages,
4730
+ userTimeZone = _ref12.userTimeZone,
4731
+ _ref12$fallbackValue = _ref12.fallbackValue,
4732
+ fallbackValue = _ref12$fallbackValue === void 0 ? constants.NO_VALUE_FALLBACK : _ref12$fallbackValue;
4733
+ if (isNil__default["default"](value)) {
4734
+ return fallbackValue;
4795
4735
  }
4796
- if (graphQlResponse.graphQLErrors?.length > 0) {
4797
- return graphQlResponse.graphQLErrors;
4736
+ const formatter = getFormatter(type);
4737
+ return formatter({
4738
+ type,
4739
+ value,
4740
+ intl,
4741
+ language,
4742
+ languages,
4743
+ userTimeZone,
4744
+ fallbackValue
4745
+ });
4746
+ }
4747
+
4748
+ const attributeTypeNames = {
4749
+ Boolean: 'boolean',
4750
+ Date: 'date',
4751
+ DateTime: 'datetime',
4752
+ Enum: 'enum',
4753
+ LocalizedEnum: 'lenum',
4754
+ LocalizedString: 'ltext',
4755
+ Money: 'money',
4756
+ Nested: 'nested',
4757
+ Reference: 'reference',
4758
+ Set: 'set',
4759
+ String: 'text',
4760
+ Time: 'time',
4761
+ Number: 'number'
4762
+ };
4763
+ const convertToAttributeType = customFieldType => {
4764
+ if (isNil__default["default"](customFieldType)) return customFieldType;
4765
+ const attributeTypeName = attributeTypeNames[customFieldType.name];
4766
+ const elementTypeName = attributeTypeNames[customFieldType.elementType?.name];
4767
+ return {
4768
+ name: attributeTypeName,
4769
+ elementType: {
4770
+ name: elementTypeName
4771
+ }
4772
+ };
4773
+ };
4774
+ const inlineEnumValues = (type, value) => {
4775
+ if (isNil__default["default"](type)) return value;
4776
+ if (type.name === 'Set') {
4777
+ return _mapInstanceProperty__default["default"](value).call(value, setValue => inlineEnumValues(type.elementType, setValue));
4798
4778
  }
4799
- return graphQlResponse;
4779
+ if (type.name === 'Enum' || type.name === 'LocalizedEnum') {
4780
+ var _context;
4781
+ return _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](type)).call(_context, enumValue => enumValue.key === value);
4782
+ }
4783
+ return value;
4784
+ };
4785
+
4786
+ /**
4787
+ * Formats `Custom Fields`: https://docs.commercetools.com/api/projects/custom-fields
4788
+ * Despite having different names, most of `Custom Field` maps one-to-one with an appropriate
4789
+ * `Product Attribute Type`, hence we can reuse product attributes formatting logic.
4790
+ *
4791
+ * The only exception is `Enum` and `LEnum` types. Unlike when dealing with `Product Attribute Types`,
4792
+ * value in `Custom Fields` contains a key of an `Enum` entry, and not an entry itself.
4793
+ * Therefore, before passing value to attributes formatter we need to replace value with Enum entry.
4794
+ */
4795
+ function formatCustomField(_ref) {
4796
+ let type = _ref.type,
4797
+ value = _ref.value,
4798
+ intl = _ref.intl,
4799
+ language = _ref.language,
4800
+ languages = _ref.languages,
4801
+ userTimeZone = _ref.userTimeZone;
4802
+ const attributeType = convertToAttributeType(type);
4803
+ return formatAttribute({
4804
+ type: attributeType,
4805
+ value: inlineEnumValues(type, value),
4806
+ intl,
4807
+ language,
4808
+ languages,
4809
+ userTimeZone
4810
+ });
4811
+ }
4812
+
4813
+ // FIXME: delete once prefix search is supported in ctp api
4814
+
4815
+ // Currently prefix search of products in the ctp is not supported.
4816
+ // This is a temporary hack which should be deleted once the feature is
4817
+ // supported in ctp.
4818
+ // It mimics the prefix search feature by computing lower and upper bounds
4819
+ // related to the provided `input`.
4820
+ // usage:
4821
+ // If I want to do a prefix search of term 'F', I get first the bounds
4822
+ // const [lowerBound, upperBound] = getPrefixSearch('F');
4823
+ // and then use them in the search
4824
+ // e.g
4825
+ // where: `masterData(current(name(en >= "${lowerBound}" and en < "${upperBound}")))`
4826
+ const getPrefixSearchBounds = input => {
4827
+ const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
4828
+ return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
4800
4829
  };
4830
+ var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4801
4831
 
4802
4832
  const isUUID = string => /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(string);
4803
4833
  var isUUID$1 = isUUID;
@@ -13555,7 +13585,7 @@ function formatDiscount(discount, currencyCode, intl) {
13555
13585
  if (discount.type === 'relative') return `${discount.permyriad / 100}%`;
13556
13586
  if (!discount.money) return null;
13557
13587
  const moneyForCurrencyCode = _findInstanceProperty__default["default"](_context = discount.money).call(_context, discountMoney => discountMoney.currencyCode === currencyCode);
13558
- return moneyForCurrencyCode ? formatMoney$2(moneyForCurrencyCode, intl) : null;
13588
+ return moneyForCurrencyCode ? formatMoney$1(moneyForCurrencyCode, intl) : null;
13559
13589
  }
13560
13590
 
13561
13591
  function formatPercentage(percentage) {
@@ -13732,7 +13762,7 @@ const computedProperties = {
13732
13762
  intl = _ref4.intl;
13733
13763
  const allVariants = _concatInstanceProperty__default["default"](_context2 = product.variants).call(_context2, product.masterVariant);
13734
13764
  const variantPrices = flatMap__default["default"](allVariants, variant => variant.prices);
13735
- return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$2(price, intl)).join(', ') || constants.NO_VALUE_FALLBACK;
13765
+ return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$1(price, intl)).join(', ') || constants.NO_VALUE_FALLBACK;
13736
13766
  },
13737
13767
  sku(_ref5) {
13738
13768
  var _context4, _context5;
@@ -13943,11 +13973,6 @@ function slugify(text) {
13943
13973
  .replace(/-+$/, ''); // Trim - from end of text
13944
13974
  }
13945
13975
 
13946
- const contextProjects = ['context-medium-data-playground', 'context-demo-data-project-1', 'context-demo-data-project-10', 'context-demo-data-project-11', 'context-demo-data-project-12', 'context-demo-data-project-8', 'context-demo-data-project-13', 'context-demo-data-project-9', 'context-demo-data-project-14', 'context-demo-data-project-15', 'context-big-data-playground', 'context-without-stores', 'context-playground', 'context-small-data-playground'];
13947
- const isStoreDataFenceProductSelection = projectKey => {
13948
- return _includesInstanceProperty__default["default"](contextProjects).call(contextProjects, projectKey);
13949
- };
13950
-
13951
13976
  function swapArrayItems(array, from, to) {
13952
13977
  const result = [...array];
13953
13978
  result[to] = array[from];
@@ -14108,7 +14133,7 @@ exports.formatCustomerName = formatCustomerName;
14108
14133
  exports.formatDateRangeValue = formatDateRangeValue;
14109
14134
  exports.formatDateTime = formatDateTime$1;
14110
14135
  exports.formatDiscount = formatDiscount;
14111
- exports.formatMoney = formatMoney$2;
14136
+ exports.formatMoney = formatMoney$1;
14112
14137
  exports.formatMoneyRangeValue = formatMoneyRangeValue;
14113
14138
  exports.formatMoneyValue = formatMoneyValue;
14114
14139
  exports.formatPercentage = formatPercentage;
@@ -14157,7 +14182,6 @@ exports.injectToggleState = injectModalState$1;
14157
14182
  exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
14158
14183
  exports.isEmpty = isEmptyFilter;
14159
14184
  exports.isEmptyValue = isEmptyValue;
14160
- exports.isStoreDataFenceProductSelection = isStoreDataFenceProductSelection;
14161
14185
  exports.isUUID = isUUID$1;
14162
14186
  exports.isValidISODate = isValidISODate;
14163
14187
  exports.isValidISODateTime = isValidISODateTime;
@@ -14214,6 +14238,7 @@ exports.usePimIndexer = usePimIndexer;
14214
14238
  exports.usePrevious = usePrevious$1;
14215
14239
  exports.useProductSelectionsFetcher = useProductSelectionsFetcher$1;
14216
14240
  exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1;
14241
+ exports.useRecurrenceIntervals = useRecurrenceIntervals;
14217
14242
  exports.useRoleNotificationEffect = useRoleNotificationEffect$1;
14218
14243
  exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
14219
14244
  exports.useStorage = useStorage$1;