@janiscommerce/ui-web 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.39.0] - 2025-05-13
11
+
12
+ ### Added
13
+
14
+ - startAnimation and stopAnimation functions
15
+ - zIndex prop
16
+
17
+ ### CHANGED
18
+
19
+ - onDragEnd, onMouseOver and onMouseOut event functions
20
+
21
+ ## [0.39.0] - 2025-05-13
22
+
23
+ ### Added
24
+
25
+ - Enhanced map markers with animation support, including the ability to specify animation duration for each marker. Markers now animate automatically when added to the map.
26
+
10
27
  ## [0.38.0] - 2025-05-08
11
28
 
12
29
  ### ADDED
package/dist/index.esm.js CHANGED
@@ -489,7 +489,7 @@ var isCallable$k = function (argument) {
489
489
 
490
490
  var isCallable$j = isCallable$k;
491
491
 
492
- var isObject$c = function (it) {
492
+ var isObject$d = function (it) {
493
493
  return typeof it == 'object' ? it !== null : isCallable$j(it);
494
494
  };
495
495
 
@@ -614,7 +614,7 @@ var getMethod$5 = function (V, P) {
614
614
  var global$L = global$T;
615
615
  var call$f = functionCall;
616
616
  var isCallable$f = isCallable$k;
617
- var isObject$b = isObject$c;
617
+ var isObject$c = isObject$d;
618
618
 
619
619
  var TypeError$k = global$L.TypeError;
620
620
 
@@ -622,9 +622,9 @@ var TypeError$k = global$L.TypeError;
622
622
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
623
623
  var ordinaryToPrimitive$1 = function (input, pref) {
624
624
  var fn, val;
625
- if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$b(val = call$f(fn, input))) return val;
626
- if (isCallable$f(fn = input.valueOf) && !isObject$b(val = call$f(fn, input))) return val;
627
- if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$b(val = call$f(fn, input))) return val;
625
+ if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$c(val = call$f(fn, input))) return val;
626
+ if (isCallable$f(fn = input.valueOf) && !isObject$c(val = call$f(fn, input))) return val;
627
+ if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$c(val = call$f(fn, input))) return val;
628
628
  throw TypeError$k("Can't convert object to primitive value");
629
629
  };
630
630
 
@@ -724,7 +724,7 @@ var wellKnownSymbol$m = function (name) {
724
724
 
725
725
  var global$G = global$T;
726
726
  var call$e = functionCall;
727
- var isObject$a = isObject$c;
727
+ var isObject$b = isObject$d;
728
728
  var isSymbol$2 = isSymbol$3;
729
729
  var getMethod$4 = getMethod$5;
730
730
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
@@ -736,13 +736,13 @@ var TO_PRIMITIVE = wellKnownSymbol$l('toPrimitive');
736
736
  // `ToPrimitive` abstract operation
737
737
  // https://tc39.es/ecma262/#sec-toprimitive
738
738
  var toPrimitive$2 = function (input, pref) {
739
- if (!isObject$a(input) || isSymbol$2(input)) return input;
739
+ if (!isObject$b(input) || isSymbol$2(input)) return input;
740
740
  var exoticToPrim = getMethod$4(input, TO_PRIMITIVE);
741
741
  var result;
742
742
  if (exoticToPrim) {
743
743
  if (pref === undefined) pref = 'default';
744
744
  result = call$e(exoticToPrim, input, pref);
745
- if (!isObject$a(result) || isSymbol$2(result)) return result;
745
+ if (!isObject$b(result) || isSymbol$2(result)) return result;
746
746
  throw TypeError$j("Can't convert object to primitive value");
747
747
  }
748
748
  if (pref === undefined) pref = 'number';
@@ -760,11 +760,11 @@ var toPropertyKey$3 = function (argument) {
760
760
  };
761
761
 
762
762
  var global$F = global$T;
763
- var isObject$9 = isObject$c;
763
+ var isObject$a = isObject$d;
764
764
 
765
765
  var document$3 = global$F.document;
766
766
  // typeof document.createElement is 'object' in old IE
767
- var EXISTS$1 = isObject$9(document$3) && isObject$9(document$3.createElement);
767
+ var EXISTS$1 = isObject$a(document$3) && isObject$a(document$3.createElement);
768
768
 
769
769
  var documentCreateElement$2 = function (it) {
770
770
  return EXISTS$1 ? document$3.createElement(it) : {};
@@ -821,14 +821,14 @@ var v8PrototypeDefineBug = DESCRIPTORS$a && fails$k(function () {
821
821
  });
822
822
 
823
823
  var global$E = global$T;
824
- var isObject$8 = isObject$c;
824
+ var isObject$9 = isObject$d;
825
825
 
826
826
  var String$4 = global$E.String;
827
827
  var TypeError$i = global$E.TypeError;
828
828
 
829
829
  // `Assert: Type(argument) is Object`
830
830
  var anObject$h = function (argument) {
831
- if (isObject$8(argument)) return argument;
831
+ if (isObject$9(argument)) return argument;
832
832
  throw TypeError$i(String$4(argument) + ' is not an object');
833
833
  };
834
834
 
@@ -927,7 +927,7 @@ var hiddenKeys$4 = {};
927
927
  var NATIVE_WEAK_MAP = nativeWeakMap;
928
928
  var global$B = global$T;
929
929
  var uncurryThis$o = functionUncurryThis;
930
- var isObject$7 = isObject$c;
930
+ var isObject$8 = isObject$d;
931
931
  var createNonEnumerableProperty$6 = createNonEnumerableProperty$7;
932
932
  var hasOwn$a = hasOwnProperty_1;
933
933
  var shared$1 = sharedStore;
@@ -946,7 +946,7 @@ var enforce = function (it) {
946
946
  var getterFor = function (TYPE) {
947
947
  return function (it) {
948
948
  var state;
949
- if (!isObject$7(it) || (state = get(it)).type !== TYPE) {
949
+ if (!isObject$8(it) || (state = get(it)).type !== TYPE) {
950
950
  throw TypeError$g('Incompatible receiver, ' + TYPE + ' required');
951
951
  } return state;
952
952
  };
@@ -1411,7 +1411,7 @@ var isConstructor$3 = !construct || fails$i(function () {
1411
1411
  var global$x = global$T;
1412
1412
  var isArray$2 = isArray$3;
1413
1413
  var isConstructor$2 = isConstructor$3;
1414
- var isObject$6 = isObject$c;
1414
+ var isObject$7 = isObject$d;
1415
1415
  var wellKnownSymbol$i = wellKnownSymbol$m;
1416
1416
 
1417
1417
  var SPECIES$5 = wellKnownSymbol$i('species');
@@ -1425,7 +1425,7 @@ var arraySpeciesConstructor$1 = function (originalArray) {
1425
1425
  C = originalArray.constructor;
1426
1426
  // cross-realm fallback
1427
1427
  if (isConstructor$2(C) && (C === Array$3 || isArray$2(C.prototype))) C = undefined;
1428
- else if (isObject$6(C)) {
1428
+ else if (isObject$7(C)) {
1429
1429
  C = C[SPECIES$5];
1430
1430
  if (C === null) C = undefined;
1431
1431
  }
@@ -1464,7 +1464,7 @@ var $$i = _export;
1464
1464
  var global$w = global$T;
1465
1465
  var fails$g = fails$q;
1466
1466
  var isArray$1 = isArray$3;
1467
- var isObject$5 = isObject$c;
1467
+ var isObject$6 = isObject$d;
1468
1468
  var toObject$7 = toObject$9;
1469
1469
  var lengthOfArrayLike$7 = lengthOfArrayLike$9;
1470
1470
  var createProperty$2 = createProperty$3;
@@ -1490,7 +1490,7 @@ var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION$1 >= 51 || !fails$g(function () {
1490
1490
  var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('concat');
1491
1491
 
1492
1492
  var isConcatSpreadable = function (O) {
1493
- if (!isObject$5(O)) return false;
1493
+ if (!isObject$6(O)) return false;
1494
1494
  var spreadable = O[IS_CONCAT_SPREADABLE];
1495
1495
  return spreadable !== undefined ? !!spreadable : isArray$1(O);
1496
1496
  };
@@ -3103,7 +3103,7 @@ var hasOwn$3 = hasOwnProperty_1;
3103
3103
  var bind$7 = functionBindContext;
3104
3104
  var classof$2 = classof$8;
3105
3105
  var anObject$5 = anObject$h;
3106
- var isObject$4 = isObject$c;
3106
+ var isObject$5 = isObject$d;
3107
3107
  var $toString$2 = toString$9;
3108
3108
  var create = objectCreate;
3109
3109
  var createPropertyDescriptor = createPropertyDescriptor$5;
@@ -3206,7 +3206,7 @@ var URLSearchParamsState = function (init) {
3206
3206
  this.url = null;
3207
3207
 
3208
3208
  if (init !== undefined) {
3209
- if (isObject$4(init)) this.parseObject(init);
3209
+ if (isObject$5(init)) this.parseObject(init);
3210
3210
  else this.parseQuery(typeof init == 'string' ? charAt$1(init, 0) === '?' ? stringSlice$2(init, 1) : init : $toString$2(init));
3211
3211
  }
3212
3212
  };
@@ -3423,7 +3423,7 @@ if (!USE_NATIVE_URL$1 && isCallable$3(Headers)) {
3423
3423
  var headersSet = uncurryThis$d(HeadersPrototype.set);
3424
3424
 
3425
3425
  var wrapRequestOptions = function (init) {
3426
- if (isObject$4(init)) {
3426
+ if (isObject$5(init)) {
3427
3427
  var body = init.body;
3428
3428
  var headers;
3429
3429
  if (classof$2(body) === URL_SEARCH_PARAMS) {
@@ -4522,7 +4522,7 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND
4522
4522
  return call$3.apply(apply$2, arguments);
4523
4523
  });
4524
4524
 
4525
- var isObject$3 = isObject$c;
4525
+ var isObject$4 = isObject$d;
4526
4526
  var classof$1 = classofRaw$1;
4527
4527
  var wellKnownSymbol$5 = wellKnownSymbol$m;
4528
4528
 
@@ -4532,7 +4532,7 @@ var MATCH$1 = wellKnownSymbol$5('match');
4532
4532
  // https://tc39.es/ecma262/#sec-isregexp
4533
4533
  var isRegexp = function (it) {
4534
4534
  var isRegExp;
4535
- return isObject$3(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
4535
+ return isObject$4(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
4536
4536
  };
4537
4537
 
4538
4538
  var global$f = global$T;
@@ -4717,6 +4717,166 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
4717
4717
  ];
4718
4718
  }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
4719
4719
 
4720
+ var $$d = _export;
4721
+
4722
+ // `Number.isNaN` method
4723
+ // https://tc39.es/ecma262/#sec-number.isnan
4724
+ $$d({ target: 'Number', stat: true }, {
4725
+ isNaN: function isNaN(number) {
4726
+ // eslint-disable-next-line no-self-compare -- NaN check
4727
+ return number != number;
4728
+ }
4729
+ });
4730
+
4731
+ var isCallable$2 = isCallable$k;
4732
+ var isObject$3 = isObject$d;
4733
+ var setPrototypeOf$1 = objectSetPrototypeOf;
4734
+
4735
+ // makes subclassing work correct for wrapped built-ins
4736
+ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
4737
+ var NewTarget, NewTargetPrototype;
4738
+ if (
4739
+ // it can work only with native `setPrototypeOf`
4740
+ setPrototypeOf$1 &&
4741
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
4742
+ isCallable$2(NewTarget = dummy.constructor) &&
4743
+ NewTarget !== Wrapper &&
4744
+ isObject$3(NewTargetPrototype = NewTarget.prototype) &&
4745
+ NewTargetPrototype !== Wrapper.prototype
4746
+ ) setPrototypeOf$1($this, NewTargetPrototype);
4747
+ return $this;
4748
+ };
4749
+
4750
+ var uncurryThis$a = functionUncurryThis;
4751
+
4752
+ // `thisNumberValue` abstract operation
4753
+ // https://tc39.es/ecma262/#sec-thisnumbervalue
4754
+ var thisNumberValue$1 = uncurryThis$a(1.0.valueOf);
4755
+
4756
+ // a string of all valid unicode whitespaces
4757
+ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
4758
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
4759
+
4760
+ var uncurryThis$9 = functionUncurryThis;
4761
+ var requireObjectCoercible$2 = requireObjectCoercible$8;
4762
+ var toString$3 = toString$9;
4763
+ var whitespaces$1 = whitespaces$2;
4764
+
4765
+ var replace$1 = uncurryThis$9(''.replace);
4766
+ var whitespace = '[' + whitespaces$1 + ']';
4767
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
4768
+ var rtrim = RegExp(whitespace + whitespace + '*$');
4769
+
4770
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
4771
+ var createMethod$2 = function (TYPE) {
4772
+ return function ($this) {
4773
+ var string = toString$3(requireObjectCoercible$2($this));
4774
+ if (TYPE & 1) string = replace$1(string, ltrim, '');
4775
+ if (TYPE & 2) string = replace$1(string, rtrim, '');
4776
+ return string;
4777
+ };
4778
+ };
4779
+
4780
+ var stringTrim = {
4781
+ // `String.prototype.{ trimLeft, trimStart }` methods
4782
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
4783
+ start: createMethod$2(1),
4784
+ // `String.prototype.{ trimRight, trimEnd }` methods
4785
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
4786
+ end: createMethod$2(2),
4787
+ // `String.prototype.trim` method
4788
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
4789
+ trim: createMethod$2(3)
4790
+ };
4791
+
4792
+ var DESCRIPTORS$2 = descriptors;
4793
+ var global$e = global$T;
4794
+ var uncurryThis$8 = functionUncurryThis;
4795
+ var isForced$1 = isForced_1;
4796
+ var redefine$2 = redefine$b.exports;
4797
+ var hasOwn$1 = hasOwnProperty_1;
4798
+ var inheritIfRequired = inheritIfRequired$1;
4799
+ var isPrototypeOf$2 = objectIsPrototypeOf;
4800
+ var isSymbol = isSymbol$3;
4801
+ var toPrimitive = toPrimitive$2;
4802
+ var fails$6 = fails$q;
4803
+ var getOwnPropertyNames = objectGetOwnPropertyNames.f;
4804
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
4805
+ var defineProperty$1 = objectDefineProperty.f;
4806
+ var thisNumberValue = thisNumberValue$1;
4807
+ var trim$1 = stringTrim.trim;
4808
+
4809
+ var NUMBER = 'Number';
4810
+ var NativeNumber = global$e[NUMBER];
4811
+ var NumberPrototype = NativeNumber.prototype;
4812
+ var TypeError$6 = global$e.TypeError;
4813
+ var arraySlice$2 = uncurryThis$8(''.slice);
4814
+ var charCodeAt = uncurryThis$8(''.charCodeAt);
4815
+
4816
+ // `ToNumeric` abstract operation
4817
+ // https://tc39.es/ecma262/#sec-tonumeric
4818
+ var toNumeric = function (value) {
4819
+ var primValue = toPrimitive(value, 'number');
4820
+ return typeof primValue == 'bigint' ? primValue : toNumber(primValue);
4821
+ };
4822
+
4823
+ // `ToNumber` abstract operation
4824
+ // https://tc39.es/ecma262/#sec-tonumber
4825
+ var toNumber = function (argument) {
4826
+ var it = toPrimitive(argument, 'number');
4827
+ var first, third, radix, maxCode, digits, length, index, code;
4828
+ if (isSymbol(it)) throw TypeError$6('Cannot convert a Symbol value to a number');
4829
+ if (typeof it == 'string' && it.length > 2) {
4830
+ it = trim$1(it);
4831
+ first = charCodeAt(it, 0);
4832
+ if (first === 43 || first === 45) {
4833
+ third = charCodeAt(it, 2);
4834
+ if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
4835
+ } else if (first === 48) {
4836
+ switch (charCodeAt(it, 1)) {
4837
+ case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
4838
+ case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
4839
+ default: return +it;
4840
+ }
4841
+ digits = arraySlice$2(it, 2);
4842
+ length = digits.length;
4843
+ for (index = 0; index < length; index++) {
4844
+ code = charCodeAt(digits, index);
4845
+ // parseInt parses a string to a first unavailable symbol
4846
+ // but ToNumber should return NaN if a string contains unavailable symbols
4847
+ if (code < 48 || code > maxCode) return NaN;
4848
+ } return parseInt(digits, radix);
4849
+ }
4850
+ } return +it;
4851
+ };
4852
+
4853
+ // `Number` constructor
4854
+ // https://tc39.es/ecma262/#sec-number-constructor
4855
+ if (isForced$1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
4856
+ var NumberWrapper = function Number(value) {
4857
+ var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
4858
+ var dummy = this;
4859
+ // check on 1..constructor(foo) case
4860
+ return isPrototypeOf$2(NumberPrototype, dummy) && fails$6(function () { thisNumberValue(dummy); })
4861
+ ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;
4862
+ };
4863
+ for (var keys = DESCRIPTORS$2 ? getOwnPropertyNames(NativeNumber) : (
4864
+ // ES3:
4865
+ 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
4866
+ // ES2015 (in case, if modules with ES2015 Number statics required before):
4867
+ 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +
4868
+ // ESNext
4869
+ 'fromString,range'
4870
+ ).split(','), j = 0, key$1; keys.length > j; j++) {
4871
+ if (hasOwn$1(NativeNumber, key$1 = keys[j]) && !hasOwn$1(NumberWrapper, key$1)) {
4872
+ defineProperty$1(NumberWrapper, key$1, getOwnPropertyDescriptor$1(NativeNumber, key$1));
4873
+ }
4874
+ }
4875
+ NumberWrapper.prototype = NumberPrototype;
4876
+ NumberPrototype.constructor = NumberWrapper;
4877
+ redefine$2(global$e, NUMBER, NumberWrapper);
4878
+ }
4879
+
4720
4880
  /**
4721
4881
  * Creates a debounced function that delays invoking func until after wait milliseconds have
4722
4882
  * elapsed since the last time the debounced function was invoked.
@@ -4745,6 +4905,12 @@ function debounce(fn, wait) {
4745
4905
 
4746
4906
  return debounced;
4747
4907
  }
4908
+ var isObject$2 = function isObject(value) {
4909
+ return _typeof(value) === 'object' && !Array.isArray(value) && value instanceof Object;
4910
+ };
4911
+ var isNumber = function isNumber(num) {
4912
+ return typeof num === 'number' && !Number.isNaN(Number(num));
4913
+ };
4748
4914
 
4749
4915
  var breakpoints = {
4750
4916
  values: {
@@ -4945,166 +5111,6 @@ var palette = {
4945
5111
  yellowPressed: '#FFBA0C'
4946
5112
  };
4947
5113
 
4948
- var $$d = _export;
4949
-
4950
- // `Number.isNaN` method
4951
- // https://tc39.es/ecma262/#sec-number.isnan
4952
- $$d({ target: 'Number', stat: true }, {
4953
- isNaN: function isNaN(number) {
4954
- // eslint-disable-next-line no-self-compare -- NaN check
4955
- return number != number;
4956
- }
4957
- });
4958
-
4959
- var isCallable$2 = isCallable$k;
4960
- var isObject$2 = isObject$c;
4961
- var setPrototypeOf$1 = objectSetPrototypeOf;
4962
-
4963
- // makes subclassing work correct for wrapped built-ins
4964
- var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
4965
- var NewTarget, NewTargetPrototype;
4966
- if (
4967
- // it can work only with native `setPrototypeOf`
4968
- setPrototypeOf$1 &&
4969
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
4970
- isCallable$2(NewTarget = dummy.constructor) &&
4971
- NewTarget !== Wrapper &&
4972
- isObject$2(NewTargetPrototype = NewTarget.prototype) &&
4973
- NewTargetPrototype !== Wrapper.prototype
4974
- ) setPrototypeOf$1($this, NewTargetPrototype);
4975
- return $this;
4976
- };
4977
-
4978
- var uncurryThis$a = functionUncurryThis;
4979
-
4980
- // `thisNumberValue` abstract operation
4981
- // https://tc39.es/ecma262/#sec-thisnumbervalue
4982
- var thisNumberValue$1 = uncurryThis$a(1.0.valueOf);
4983
-
4984
- // a string of all valid unicode whitespaces
4985
- var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
4986
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
4987
-
4988
- var uncurryThis$9 = functionUncurryThis;
4989
- var requireObjectCoercible$2 = requireObjectCoercible$8;
4990
- var toString$3 = toString$9;
4991
- var whitespaces$1 = whitespaces$2;
4992
-
4993
- var replace$1 = uncurryThis$9(''.replace);
4994
- var whitespace = '[' + whitespaces$1 + ']';
4995
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
4996
- var rtrim = RegExp(whitespace + whitespace + '*$');
4997
-
4998
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
4999
- var createMethod$2 = function (TYPE) {
5000
- return function ($this) {
5001
- var string = toString$3(requireObjectCoercible$2($this));
5002
- if (TYPE & 1) string = replace$1(string, ltrim, '');
5003
- if (TYPE & 2) string = replace$1(string, rtrim, '');
5004
- return string;
5005
- };
5006
- };
5007
-
5008
- var stringTrim = {
5009
- // `String.prototype.{ trimLeft, trimStart }` methods
5010
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
5011
- start: createMethod$2(1),
5012
- // `String.prototype.{ trimRight, trimEnd }` methods
5013
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
5014
- end: createMethod$2(2),
5015
- // `String.prototype.trim` method
5016
- // https://tc39.es/ecma262/#sec-string.prototype.trim
5017
- trim: createMethod$2(3)
5018
- };
5019
-
5020
- var DESCRIPTORS$2 = descriptors;
5021
- var global$e = global$T;
5022
- var uncurryThis$8 = functionUncurryThis;
5023
- var isForced$1 = isForced_1;
5024
- var redefine$2 = redefine$b.exports;
5025
- var hasOwn$1 = hasOwnProperty_1;
5026
- var inheritIfRequired = inheritIfRequired$1;
5027
- var isPrototypeOf$2 = objectIsPrototypeOf;
5028
- var isSymbol = isSymbol$3;
5029
- var toPrimitive = toPrimitive$2;
5030
- var fails$6 = fails$q;
5031
- var getOwnPropertyNames = objectGetOwnPropertyNames.f;
5032
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
5033
- var defineProperty$1 = objectDefineProperty.f;
5034
- var thisNumberValue = thisNumberValue$1;
5035
- var trim$1 = stringTrim.trim;
5036
-
5037
- var NUMBER = 'Number';
5038
- var NativeNumber = global$e[NUMBER];
5039
- var NumberPrototype = NativeNumber.prototype;
5040
- var TypeError$6 = global$e.TypeError;
5041
- var arraySlice$2 = uncurryThis$8(''.slice);
5042
- var charCodeAt = uncurryThis$8(''.charCodeAt);
5043
-
5044
- // `ToNumeric` abstract operation
5045
- // https://tc39.es/ecma262/#sec-tonumeric
5046
- var toNumeric = function (value) {
5047
- var primValue = toPrimitive(value, 'number');
5048
- return typeof primValue == 'bigint' ? primValue : toNumber(primValue);
5049
- };
5050
-
5051
- // `ToNumber` abstract operation
5052
- // https://tc39.es/ecma262/#sec-tonumber
5053
- var toNumber = function (argument) {
5054
- var it = toPrimitive(argument, 'number');
5055
- var first, third, radix, maxCode, digits, length, index, code;
5056
- if (isSymbol(it)) throw TypeError$6('Cannot convert a Symbol value to a number');
5057
- if (typeof it == 'string' && it.length > 2) {
5058
- it = trim$1(it);
5059
- first = charCodeAt(it, 0);
5060
- if (first === 43 || first === 45) {
5061
- third = charCodeAt(it, 2);
5062
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
5063
- } else if (first === 48) {
5064
- switch (charCodeAt(it, 1)) {
5065
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
5066
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
5067
- default: return +it;
5068
- }
5069
- digits = arraySlice$2(it, 2);
5070
- length = digits.length;
5071
- for (index = 0; index < length; index++) {
5072
- code = charCodeAt(digits, index);
5073
- // parseInt parses a string to a first unavailable symbol
5074
- // but ToNumber should return NaN if a string contains unavailable symbols
5075
- if (code < 48 || code > maxCode) return NaN;
5076
- } return parseInt(digits, radix);
5077
- }
5078
- } return +it;
5079
- };
5080
-
5081
- // `Number` constructor
5082
- // https://tc39.es/ecma262/#sec-number-constructor
5083
- if (isForced$1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
5084
- var NumberWrapper = function Number(value) {
5085
- var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
5086
- var dummy = this;
5087
- // check on 1..constructor(foo) case
5088
- return isPrototypeOf$2(NumberPrototype, dummy) && fails$6(function () { thisNumberValue(dummy); })
5089
- ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;
5090
- };
5091
- for (var keys = DESCRIPTORS$2 ? getOwnPropertyNames(NativeNumber) : (
5092
- // ES3:
5093
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
5094
- // ES2015 (in case, if modules with ES2015 Number statics required before):
5095
- 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +
5096
- // ESNext
5097
- 'fromString,range'
5098
- ).split(','), j = 0, key$1; keys.length > j; j++) {
5099
- if (hasOwn$1(NativeNumber, key$1 = keys[j]) && !hasOwn$1(NumberWrapper, key$1)) {
5100
- defineProperty$1(NumberWrapper, key$1, getOwnPropertyDescriptor$1(NativeNumber, key$1));
5101
- }
5102
- }
5103
- NumberWrapper.prototype = NumberPrototype;
5104
- NumberPrototype.constructor = NumberWrapper;
5105
- redefine$2(global$e, NUMBER, NumberWrapper);
5106
- }
5107
-
5108
5114
  var uncurryThis$7 = functionUncurryThis;
5109
5115
  var requireObjectCoercible$1 = requireObjectCoercible$8;
5110
5116
  var toString$2 = toString$9;
@@ -15955,6 +15961,14 @@ var markerHasEqualPosition = function markerHasEqualPosition() {
15955
15961
  var hasEqualLng = (prevPosition === null || prevPosition === void 0 ? void 0 : prevPosition.lng) === (newPosition === null || newPosition === void 0 ? void 0 : newPosition.lng);
15956
15962
  return hasEqualLat && hasEqualLng;
15957
15963
  };
15964
+ var isValidAnimation = function isValidAnimation() {
15965
+ var _window$google, _window$google$maps;
15966
+
15967
+ var animation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15968
+ var validAnimations = (_window$google = window.google) === null || _window$google === void 0 ? void 0 : (_window$google$maps = _window$google.maps) === null || _window$google$maps === void 0 ? void 0 : _window$google$maps.Animation;
15969
+ if (!animation || !isObject$2(animation)) return false;
15970
+ return (animation === null || animation === void 0 ? void 0 : animation.name) && validAnimations && validAnimations[animation === null || animation === void 0 ? void 0 : animation.name] !== undefined;
15971
+ };
15958
15972
 
15959
15973
  var Marker = function Marker(_ref) {
15960
15974
  var _ref$markerData = _ref.markerData,
@@ -15972,9 +15986,11 @@ var Marker = function Marker(_ref) {
15972
15986
  var _ref2 = marker || {},
15973
15987
  icon = _ref2.icon,
15974
15988
  position = _ref2.position,
15989
+ animation = _ref2.animation,
15975
15990
  overlay = _ref2.overlay,
15976
15991
  infoWindowChildren = _ref2.infoWindowChildren,
15977
- isDraggable = _ref2.isDraggable;
15992
+ isDraggable = _ref2.isDraggable,
15993
+ zIndex = _ref2.zIndex;
15978
15994
 
15979
15995
  var _markerOptions$onLoad = markerOptions.onLoad,
15980
15996
  _onLoad = _markerOptions$onLoad === void 0 ? function () {} : _markerOptions$onLoad,
@@ -15988,6 +16004,7 @@ var Marker = function Marker(_ref) {
15988
16004
  _onDragEnd = _markerOptions$onDrag3 === void 0 ? function () {} : _markerOptions$onDrag3;
15989
16005
 
15990
16006
  var markerRef = useRef(null);
16007
+ var timeoutRef = useRef(null);
15991
16008
 
15992
16009
  var _useState3 = useState(false),
15993
16010
  _useState4 = _slicedToArray(_useState3, 2),
@@ -16036,11 +16053,34 @@ var Marker = function Marker(_ref) {
16036
16053
  };
16037
16054
  };
16038
16055
 
16056
+ var stopAnimation = function stopAnimation() {
16057
+ var _markerRef$current2;
16058
+
16059
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
16060
+ if ((_markerRef$current2 = markerRef.current) !== null && _markerRef$current2 !== void 0 && _markerRef$current2.marker) markerRef.current.marker.setAnimation(null);
16061
+ };
16062
+
16063
+ var startAnimation = function startAnimation() {
16064
+ if (!markerRef.current) return;
16065
+ stopAnimation();
16066
+ markerRef.current.marker.setAnimation(window.google.maps.Animation[animation === null || animation === void 0 ? void 0 : animation.name]);
16067
+ if (animation !== null && animation !== void 0 && animation.duration && isNumber(animation === null || animation === void 0 ? void 0 : animation.duration)) timeoutRef.current = setTimeout(function () {
16068
+ return stopAnimation();
16069
+ }, animation.duration);
16070
+ };
16071
+
16072
+ useEffect(function () {
16073
+ if (isValidAnimation(animation)) startAnimation();
16074
+ return function () {
16075
+ stopAnimation();
16076
+ };
16077
+ }, [animation]);
16039
16078
  var markerProps = {
16040
16079
  ref: markerRef,
16041
16080
  position: position,
16042
16081
  draggable: isDraggable || !readOnly,
16043
16082
  icon: icon,
16083
+ zIndex: zIndex,
16044
16084
  onLoad: function onLoad(instance) {
16045
16085
  return _onLoad({
16046
16086
  prevMarker: marker,
@@ -16054,16 +16094,20 @@ var Marker = function Marker(_ref) {
16054
16094
  return _onDrag(event);
16055
16095
  },
16056
16096
  onDragEnd: function onDragEnd(event) {
16057
- return _onDragEnd(getEventHandlerData(event));
16097
+ if (isValidAnimation(animation)) startAnimation();
16098
+
16099
+ _onDragEnd(getEventHandlerData(event));
16058
16100
  },
16059
16101
  onDragStart: function onDragStart(event) {
16060
16102
  return _onDragStart(getEventHandlerData(event));
16061
16103
  },
16062
16104
  onMouseOver: function onMouseOver() {
16063
- return openInfoWindow();
16105
+ if (isValidAnimation(animation)) stopAnimation();
16106
+ openInfoWindow();
16064
16107
  },
16065
16108
  onMouseOut: function onMouseOut() {
16066
- return delayedInfoWindowHover();
16109
+ if (isValidAnimation(animation)) startAnimation();
16110
+ delayedInfoWindowHover();
16067
16111
  }
16068
16112
  };
16069
16113
  var infoWindowHandles = {
@@ -17567,7 +17611,7 @@ newPromiseCapability$2.f = function (C) {
17567
17611
  };
17568
17612
 
17569
17613
  var anObject = anObject$h;
17570
- var isObject$1 = isObject$c;
17614
+ var isObject$1 = isObject$d;
17571
17615
  var newPromiseCapability$1 = newPromiseCapability$2;
17572
17616
 
17573
17617
  var promiseResolve$1 = function (C, x) {
@@ -17634,7 +17678,7 @@ var setToStringTag = setToStringTag$5;
17634
17678
  var setSpecies = setSpecies$1;
17635
17679
  var aCallable = aCallable$7;
17636
17680
  var isCallable = isCallable$k;
17637
- var isObject = isObject$c;
17681
+ var isObject = isObject$d;
17638
17682
  var anInstance = anInstance$3;
17639
17683
  var inspectSource = inspectSource$4;
17640
17684
  var iterate = iterate$1;