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