@react-fabric/utilities 1.0.0-beta.60 → 1.0.0-beta.62

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.
@@ -86,7 +86,7 @@ exports.Format = void 0;
86
86
  if (_isType.isEmpty(value) || value.length < 6 || !/^[\d+\s\-()]+$/.test(value)) return value;
87
87
  var phone = getPhone(value, country);
88
88
  /* istanbul ignore next */
89
- return "".concat(useCss ? "<span class=\"flag ".concat(phone.country, "\"></span>") : _countries.emoji((_phone$country = phone.country) !== null && _phone$country !== void 0 ? _phone$country : ""), " ").concat(phone.formatInternational());
89
+ return "".concat(useCss ? "<span class=\"icon-[circle-flags--".concat(phone.country, "\"></span>") : _countries.emoji((_phone$country = phone.country) !== null && _phone$country !== void 0 ? _phone$country : ""), " ").concat(phone.formatInternational());
90
90
  };
91
91
  _Format.number = function (number, format) {
92
92
  return numberFormat(number, format);
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _ascii = require('./_ascii.js');
4
+ var _getByPath = require('./_getByPath.js');
4
5
  var _isType = require('./_isType.js');
5
6
 
6
7
  /*
@@ -117,8 +118,8 @@ var compareValues = function compareValues() {
117
118
  var order = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "asc";
118
119
  var key = arguments.length > 1 ? arguments[1] : undefined;
119
120
  return function (a, b) {
120
- var aValue = key && _isType.isObject(a) ? a[key] : a;
121
- var bValue = key && _isType.isObject(b) ? b[key] : b;
121
+ var aValue = key && _isType.isObject(a) ? _getByPath.getByPath(a, key, "") : a;
122
+ var bValue = key && _isType.isObject(b) ? _getByPath.getByPath(b, key, "") : b;
122
123
  var bigger = order === "asc" ? 1 : -1;
123
124
  var smaller = order === "desc" ? 1 : -1;
124
125
  // return 0 when equal, allowing for multiple sorting properties