sanity-plugin-recurring-dates 1.0.1 → 1.0.3

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/dist/index.js CHANGED
@@ -45,7 +45,6 @@ const DEFAULT_COUNTS = [5,
45
45
  30
46
46
  // daily
47
47
  ];
48
-
49
48
  const validateRRuleString = recurrence => {
50
49
  try {
51
50
  rrule.rrulestr(recurrence);
@@ -1215,7 +1214,6 @@ var moment$1 = {
1215
1214
  // Sunday is the first day of the week.
1216
1215
  doy: 6 // The week that contains Jan 6th is the first week of the year.
1217
1216
  };
1218
-
1219
1217
  function localeFirstDayOfWeek() {
1220
1218
  return this._week.dow;
1221
1219
  }
@@ -1756,7 +1754,6 @@ var moment$1 = {
1756
1754
  locales[name] = null; // null means not found
1757
1755
  }
1758
1756
  }
1759
-
1760
1757
  return locales[name];
1761
1758
  }
1762
1759
 
@@ -2547,7 +2544,6 @@ var moment$1 = {
2547
2544
  if (unitHasDecimal) {
2548
2545
  return false; // only allow non-integers for smallest unit
2549
2546
  }
2550
-
2551
2547
  if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
2552
2548
  unitHasDecimal = true;
2553
2549
  }
@@ -4583,7 +4579,6 @@ var moment$1 = {
4583
4579
  // <input type="week" />
4584
4580
  MONTH: 'YYYY-MM' // <input type="month" />
4585
4581
  };
4586
-
4587
4582
  return hooks;
4588
4583
  });
4589
4584
  })(moment$1);
@@ -4634,132 +4629,86 @@ function _extends() {
4634
4629
  var propTypes$1 = {
4635
4630
  exports: {}
4636
4631
  };
4637
- var reactIs = {
4638
- exports: {}
4639
- };
4640
- var reactIs_production_min = {};
4641
4632
 
4642
- /** @license React v16.13.1
4643
- * react-is.production.min.js
4633
+ /**
4634
+ * Copyright (c) 2013-present, Facebook, Inc.
4644
4635
  *
4645
- * Copyright (c) Facebook, Inc. and its affiliates.
4636
+ * This source code is licensed under the MIT license found in the
4637
+ * LICENSE file in the root directory of this source tree.
4638
+ */
4639
+
4640
+ var ReactPropTypesSecret_1;
4641
+ var hasRequiredReactPropTypesSecret;
4642
+ function requireReactPropTypesSecret() {
4643
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
4644
+ hasRequiredReactPropTypesSecret = 1;
4645
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4646
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
4647
+ return ReactPropTypesSecret_1;
4648
+ }
4649
+
4650
+ /**
4651
+ * Copyright (c) 2013-present, Facebook, Inc.
4646
4652
  *
4647
4653
  * This source code is licensed under the MIT license found in the
4648
4654
  * LICENSE file in the root directory of this source tree.
4649
4655
  */
4650
4656
 
4651
- var hasRequiredReactIs_production_min;
4652
- function requireReactIs_production_min() {
4653
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
4654
- hasRequiredReactIs_production_min = 1;
4655
- var b = "function" === typeof Symbol && Symbol.for,
4656
- c = b ? Symbol.for("react.element") : 60103,
4657
- d = b ? Symbol.for("react.portal") : 60106,
4658
- e = b ? Symbol.for("react.fragment") : 60107,
4659
- f = b ? Symbol.for("react.strict_mode") : 60108,
4660
- g = b ? Symbol.for("react.profiler") : 60114,
4661
- h = b ? Symbol.for("react.provider") : 60109,
4662
- k = b ? Symbol.for("react.context") : 60110,
4663
- l = b ? Symbol.for("react.async_mode") : 60111,
4664
- m = b ? Symbol.for("react.concurrent_mode") : 60111,
4665
- n = b ? Symbol.for("react.forward_ref") : 60112,
4666
- p = b ? Symbol.for("react.suspense") : 60113,
4667
- q = b ? Symbol.for("react.suspense_list") : 60120,
4668
- r = b ? Symbol.for("react.memo") : 60115,
4669
- t = b ? Symbol.for("react.lazy") : 60116,
4670
- v = b ? Symbol.for("react.block") : 60121,
4671
- w = b ? Symbol.for("react.fundamental") : 60117,
4672
- x = b ? Symbol.for("react.responder") : 60118,
4673
- y = b ? Symbol.for("react.scope") : 60119;
4674
- function z(a) {
4675
- if ("object" === typeof a && null !== a) {
4676
- var u = a.$$typeof;
4677
- switch (u) {
4678
- case c:
4679
- switch (a = a.type, a) {
4680
- case l:
4681
- case m:
4682
- case e:
4683
- case g:
4684
- case f:
4685
- case p:
4686
- return a;
4687
- default:
4688
- switch (a = a && a.$$typeof, a) {
4689
- case k:
4690
- case n:
4691
- case t:
4692
- case r:
4693
- case h:
4694
- return a;
4695
- default:
4696
- return u;
4697
- }
4698
- }
4699
- case d:
4700
- return u;
4657
+ var factoryWithThrowingShims;
4658
+ var hasRequiredFactoryWithThrowingShims;
4659
+ function requireFactoryWithThrowingShims() {
4660
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
4661
+ hasRequiredFactoryWithThrowingShims = 1;
4662
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
4663
+ function emptyFunction() {}
4664
+ function emptyFunctionWithReset() {}
4665
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
4666
+ factoryWithThrowingShims = function () {
4667
+ function shim(props, propName, componentName, location, propFullName, secret) {
4668
+ if (secret === ReactPropTypesSecret) {
4669
+ // It is still safe when called from React.
4670
+ return;
4701
4671
  }
4672
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
4673
+ err.name = 'Invariant Violation';
4674
+ throw err;
4702
4675
  }
4703
- }
4704
- function A(a) {
4705
- return z(a) === m;
4706
- }
4707
- reactIs_production_min.AsyncMode = l;
4708
- reactIs_production_min.ConcurrentMode = m;
4709
- reactIs_production_min.ContextConsumer = k;
4710
- reactIs_production_min.ContextProvider = h;
4711
- reactIs_production_min.Element = c;
4712
- reactIs_production_min.ForwardRef = n;
4713
- reactIs_production_min.Fragment = e;
4714
- reactIs_production_min.Lazy = t;
4715
- reactIs_production_min.Memo = r;
4716
- reactIs_production_min.Portal = d;
4717
- reactIs_production_min.Profiler = g;
4718
- reactIs_production_min.StrictMode = f;
4719
- reactIs_production_min.Suspense = p;
4720
- reactIs_production_min.isAsyncMode = function (a) {
4721
- return A(a) || z(a) === l;
4722
- };
4723
- reactIs_production_min.isConcurrentMode = A;
4724
- reactIs_production_min.isContextConsumer = function (a) {
4725
- return z(a) === k;
4726
- };
4727
- reactIs_production_min.isContextProvider = function (a) {
4728
- return z(a) === h;
4729
- };
4730
- reactIs_production_min.isElement = function (a) {
4731
- return "object" === typeof a && null !== a && a.$$typeof === c;
4732
- };
4733
- reactIs_production_min.isForwardRef = function (a) {
4734
- return z(a) === n;
4735
- };
4736
- reactIs_production_min.isFragment = function (a) {
4737
- return z(a) === e;
4738
- };
4739
- reactIs_production_min.isLazy = function (a) {
4740
- return z(a) === t;
4741
- };
4742
- reactIs_production_min.isMemo = function (a) {
4743
- return z(a) === r;
4744
- };
4745
- reactIs_production_min.isPortal = function (a) {
4746
- return z(a) === d;
4747
- };
4748
- reactIs_production_min.isProfiler = function (a) {
4749
- return z(a) === g;
4750
- };
4751
- reactIs_production_min.isStrictMode = function (a) {
4752
- return z(a) === f;
4753
- };
4754
- reactIs_production_min.isSuspense = function (a) {
4755
- return z(a) === p;
4756
- };
4757
- reactIs_production_min.isValidElementType = function (a) {
4758
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
4676
+ shim.isRequired = shim;
4677
+ function getShim() {
4678
+ return shim;
4679
+ } // Important!
4680
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
4681
+ var ReactPropTypes = {
4682
+ array: shim,
4683
+ bigint: shim,
4684
+ bool: shim,
4685
+ func: shim,
4686
+ number: shim,
4687
+ object: shim,
4688
+ string: shim,
4689
+ symbol: shim,
4690
+ any: shim,
4691
+ arrayOf: getShim,
4692
+ element: shim,
4693
+ elementType: shim,
4694
+ instanceOf: getShim,
4695
+ node: shim,
4696
+ objectOf: getShim,
4697
+ oneOf: getShim,
4698
+ oneOfType: getShim,
4699
+ shape: getShim,
4700
+ exact: getShim,
4701
+ checkPropTypes: emptyFunctionWithReset,
4702
+ resetWarningCache: emptyFunction
4703
+ };
4704
+ ReactPropTypes.PropTypes = ReactPropTypes;
4705
+ return ReactPropTypes;
4759
4706
  };
4760
- reactIs_production_min.typeOf = z;
4761
- return reactIs_production_min;
4707
+ return factoryWithThrowingShims;
4762
4708
  }
4709
+ var reactIs = {
4710
+ exports: {}
4711
+ };
4763
4712
  var reactIs_development = {};
4764
4713
 
4765
4714
  /** @license React v16.13.1
@@ -4932,6 +4881,129 @@ function requireReactIs_development() {
4932
4881
  }
4933
4882
  return reactIs_development;
4934
4883
  }
4884
+ var reactIs_production_min = {};
4885
+
4886
+ /** @license React v16.13.1
4887
+ * react-is.production.min.js
4888
+ *
4889
+ * Copyright (c) Facebook, Inc. and its affiliates.
4890
+ *
4891
+ * This source code is licensed under the MIT license found in the
4892
+ * LICENSE file in the root directory of this source tree.
4893
+ */
4894
+
4895
+ var hasRequiredReactIs_production_min;
4896
+ function requireReactIs_production_min() {
4897
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
4898
+ hasRequiredReactIs_production_min = 1;
4899
+ var b = "function" === typeof Symbol && Symbol.for,
4900
+ c = b ? Symbol.for("react.element") : 60103,
4901
+ d = b ? Symbol.for("react.portal") : 60106,
4902
+ e = b ? Symbol.for("react.fragment") : 60107,
4903
+ f = b ? Symbol.for("react.strict_mode") : 60108,
4904
+ g = b ? Symbol.for("react.profiler") : 60114,
4905
+ h = b ? Symbol.for("react.provider") : 60109,
4906
+ k = b ? Symbol.for("react.context") : 60110,
4907
+ l = b ? Symbol.for("react.async_mode") : 60111,
4908
+ m = b ? Symbol.for("react.concurrent_mode") : 60111,
4909
+ n = b ? Symbol.for("react.forward_ref") : 60112,
4910
+ p = b ? Symbol.for("react.suspense") : 60113,
4911
+ q = b ? Symbol.for("react.suspense_list") : 60120,
4912
+ r = b ? Symbol.for("react.memo") : 60115,
4913
+ t = b ? Symbol.for("react.lazy") : 60116,
4914
+ v = b ? Symbol.for("react.block") : 60121,
4915
+ w = b ? Symbol.for("react.fundamental") : 60117,
4916
+ x = b ? Symbol.for("react.responder") : 60118,
4917
+ y = b ? Symbol.for("react.scope") : 60119;
4918
+ function z(a) {
4919
+ if ("object" === typeof a && null !== a) {
4920
+ var u = a.$$typeof;
4921
+ switch (u) {
4922
+ case c:
4923
+ switch (a = a.type, a) {
4924
+ case l:
4925
+ case m:
4926
+ case e:
4927
+ case g:
4928
+ case f:
4929
+ case p:
4930
+ return a;
4931
+ default:
4932
+ switch (a = a && a.$$typeof, a) {
4933
+ case k:
4934
+ case n:
4935
+ case t:
4936
+ case r:
4937
+ case h:
4938
+ return a;
4939
+ default:
4940
+ return u;
4941
+ }
4942
+ }
4943
+ case d:
4944
+ return u;
4945
+ }
4946
+ }
4947
+ }
4948
+ function A(a) {
4949
+ return z(a) === m;
4950
+ }
4951
+ reactIs_production_min.AsyncMode = l;
4952
+ reactIs_production_min.ConcurrentMode = m;
4953
+ reactIs_production_min.ContextConsumer = k;
4954
+ reactIs_production_min.ContextProvider = h;
4955
+ reactIs_production_min.Element = c;
4956
+ reactIs_production_min.ForwardRef = n;
4957
+ reactIs_production_min.Fragment = e;
4958
+ reactIs_production_min.Lazy = t;
4959
+ reactIs_production_min.Memo = r;
4960
+ reactIs_production_min.Portal = d;
4961
+ reactIs_production_min.Profiler = g;
4962
+ reactIs_production_min.StrictMode = f;
4963
+ reactIs_production_min.Suspense = p;
4964
+ reactIs_production_min.isAsyncMode = function (a) {
4965
+ return A(a) || z(a) === l;
4966
+ };
4967
+ reactIs_production_min.isConcurrentMode = A;
4968
+ reactIs_production_min.isContextConsumer = function (a) {
4969
+ return z(a) === k;
4970
+ };
4971
+ reactIs_production_min.isContextProvider = function (a) {
4972
+ return z(a) === h;
4973
+ };
4974
+ reactIs_production_min.isElement = function (a) {
4975
+ return "object" === typeof a && null !== a && a.$$typeof === c;
4976
+ };
4977
+ reactIs_production_min.isForwardRef = function (a) {
4978
+ return z(a) === n;
4979
+ };
4980
+ reactIs_production_min.isFragment = function (a) {
4981
+ return z(a) === e;
4982
+ };
4983
+ reactIs_production_min.isLazy = function (a) {
4984
+ return z(a) === t;
4985
+ };
4986
+ reactIs_production_min.isMemo = function (a) {
4987
+ return z(a) === r;
4988
+ };
4989
+ reactIs_production_min.isPortal = function (a) {
4990
+ return z(a) === d;
4991
+ };
4992
+ reactIs_production_min.isProfiler = function (a) {
4993
+ return z(a) === g;
4994
+ };
4995
+ reactIs_production_min.isStrictMode = function (a) {
4996
+ return z(a) === f;
4997
+ };
4998
+ reactIs_production_min.isSuspense = function (a) {
4999
+ return z(a) === p;
5000
+ };
5001
+ reactIs_production_min.isValidElementType = function (a) {
5002
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
5003
+ };
5004
+ reactIs_production_min.typeOf = z;
5005
+ return reactIs_production_min;
5006
+ }
4935
5007
  var hasRequiredReactIs;
4936
5008
  function requireReactIs() {
4937
5009
  if (hasRequiredReactIs) return reactIs.exports;
@@ -5030,23 +5102,6 @@ function requireObjectAssign() {
5030
5102
  };
5031
5103
  return objectAssign;
5032
5104
  }
5033
-
5034
- /**
5035
- * Copyright (c) 2013-present, Facebook, Inc.
5036
- *
5037
- * This source code is licensed under the MIT license found in the
5038
- * LICENSE file in the root directory of this source tree.
5039
- */
5040
-
5041
- var ReactPropTypesSecret_1;
5042
- var hasRequiredReactPropTypesSecret;
5043
- function requireReactPropTypesSecret() {
5044
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
5045
- hasRequiredReactPropTypesSecret = 1;
5046
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5047
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
5048
- return ReactPropTypesSecret_1;
5049
- }
5050
5105
  var has;
5051
5106
  var hasRequiredHas;
5052
5107
  function requireHas() {
@@ -5701,66 +5756,6 @@ function requireFactoryWithTypeCheckers() {
5701
5756
  return factoryWithTypeCheckers;
5702
5757
  }
5703
5758
 
5704
- /**
5705
- * Copyright (c) 2013-present, Facebook, Inc.
5706
- *
5707
- * This source code is licensed under the MIT license found in the
5708
- * LICENSE file in the root directory of this source tree.
5709
- */
5710
-
5711
- var factoryWithThrowingShims;
5712
- var hasRequiredFactoryWithThrowingShims;
5713
- function requireFactoryWithThrowingShims() {
5714
- if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
5715
- hasRequiredFactoryWithThrowingShims = 1;
5716
- var ReactPropTypesSecret = requireReactPropTypesSecret();
5717
- function emptyFunction() {}
5718
- function emptyFunctionWithReset() {}
5719
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
5720
- factoryWithThrowingShims = function () {
5721
- function shim(props, propName, componentName, location, propFullName, secret) {
5722
- if (secret === ReactPropTypesSecret) {
5723
- // It is still safe when called from React.
5724
- return;
5725
- }
5726
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
5727
- err.name = 'Invariant Violation';
5728
- throw err;
5729
- }
5730
- shim.isRequired = shim;
5731
- function getShim() {
5732
- return shim;
5733
- } // Important!
5734
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5735
- var ReactPropTypes = {
5736
- array: shim,
5737
- bigint: shim,
5738
- bool: shim,
5739
- func: shim,
5740
- number: shim,
5741
- object: shim,
5742
- string: shim,
5743
- symbol: shim,
5744
- any: shim,
5745
- arrayOf: getShim,
5746
- element: shim,
5747
- elementType: shim,
5748
- instanceOf: getShim,
5749
- node: shim,
5750
- objectOf: getShim,
5751
- oneOf: getShim,
5752
- oneOfType: getShim,
5753
- shape: getShim,
5754
- exact: getShim,
5755
- checkPropTypes: emptyFunctionWithReset,
5756
- resetWarningCache: emptyFunction
5757
- };
5758
- ReactPropTypes.PropTypes = ReactPropTypes;
5759
- return ReactPropTypes;
5760
- };
5761
- return factoryWithThrowingShims;
5762
- }
5763
-
5764
5759
  /**
5765
5760
  * Copyright (c) 2013-present, Facebook, Inc.
5766
5761
  *
@@ -6042,7 +6037,6 @@ var mediumSidecar = createSidecarMedium({
6042
6037
  // however, it might be required for JSDOM tests
6043
6038
  // ssr: true,
6044
6039
  });
6045
-
6046
6040
  var emptyArray = [];
6047
6041
  var FocusLock$1 = /*#__PURE__*/React__namespace.forwardRef(function FocusLockUI(props, parentRef) {
6048
6042
  var _extends2;
@@ -6148,7 +6142,7 @@ var FocusLock$1 = /*#__PURE__*/React__namespace.forwardRef(function FocusLockUI(
6148
6142
  var hasLeadingGuards = noFocusGuards !== true;
6149
6143
  var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';
6150
6144
  var mergedRef = useMergeRefs([parentRef, setObserveNode]);
6151
- return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, hasLeadingGuards && [/*#__PURE__*/
6145
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, hasLeadingGuards && [
6152
6146
  // nearest focus guard
6153
6147
  React__namespace.createElement("div", {
6154
6148
  key: "guard-first",
@@ -6241,31 +6235,31 @@ function _inheritsLoose(subClass, superClass) {
6241
6235
  subClass.prototype.constructor = subClass;
6242
6236
  _setPrototypeOf(subClass, superClass);
6243
6237
  }
6244
- function _typeof(obj) {
6238
+ function _typeof(o) {
6245
6239
  "@babel/helpers - typeof";
6246
6240
 
6247
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
6248
- return typeof obj;
6249
- } : function (obj) {
6250
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
6251
- }, _typeof(obj);
6241
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
6242
+ return typeof o;
6243
+ } : function (o) {
6244
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
6245
+ }, _typeof(o);
6252
6246
  }
6253
- function _toPrimitive(input, hint) {
6254
- if (_typeof(input) !== "object" || input === null) return input;
6255
- var prim = input[Symbol.toPrimitive];
6256
- if (prim !== undefined) {
6257
- var res = prim.call(input, hint || "default");
6258
- if (_typeof(res) !== "object") return res;
6247
+ function toPrimitive(t, r) {
6248
+ if ("object" != _typeof(t) || !t) return t;
6249
+ var e = t[Symbol.toPrimitive];
6250
+ if (void 0 !== e) {
6251
+ var i = e.call(t, r || "default");
6252
+ if ("object" != _typeof(i)) return i;
6259
6253
  throw new TypeError("@@toPrimitive must return a primitive value.");
6260
6254
  }
6261
- return (hint === "string" ? String : Number)(input);
6255
+ return ("string" === r ? String : Number)(t);
6262
6256
  }
6263
- function _toPropertyKey(arg) {
6264
- var key = _toPrimitive(arg, "string");
6265
- return _typeof(key) === "symbol" ? key : String(key);
6257
+ function toPropertyKey(t) {
6258
+ var i = toPrimitive(t, "string");
6259
+ return "symbol" == _typeof(i) ? i : String(i);
6266
6260
  }
6267
6261
  function _defineProperty(obj, key, value) {
6268
- key = _toPropertyKey(key);
6262
+ key = toPropertyKey(key);
6269
6263
  if (key in obj) {
6270
6264
  Object.defineProperty(obj, key, {
6271
6265
  value: value,
@@ -6526,17 +6520,29 @@ var filterAutoFocusable = function (nodes, cache) {
6526
6520
  });
6527
6521
  };
6528
6522
  /**
6529
- * only tabbable ones
6530
- * (but with guards which would be ignored)
6523
+ * !__WARNING__! Low level API.
6524
+ * @returns all tabbable nodes
6525
+ *
6526
+ * @see {@link getFocusableNodes} to get any focusable element
6527
+ *
6528
+ * @param topNodes - array of top level HTMLElements to search inside
6529
+ * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
6531
6530
  */
6532
6531
  var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {
6533
6532
  return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);
6534
6533
  };
6535
6534
  /**
6536
- * actually anything "focusable", not only tabbable
6537
- * (without guards, as long as they are not expected to be focused)
6535
+ * !__WARNING__! Low level API.
6536
+ *
6537
+ * @returns anything "focusable", not only tabbable. The difference is in `tabIndex=-1`
6538
+ * (without guards, as long as they are not expected to be ever focused)
6539
+ *
6540
+ * @see {@link getTabbableNodes} to get only tabble nodes element
6541
+ *
6542
+ * @param topNodes - array of top level HTMLElements to search inside
6543
+ * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
6538
6544
  */
6539
- var getAllTabbableNodes = function (topNodes, visibilityCache) {
6545
+ var getFocusableNodes = function (topNodes, visibilityCache) {
6540
6546
  return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);
6541
6547
  };
6542
6548
  /**
@@ -6594,7 +6600,6 @@ var filterNested = function (nodes) {
6594
6600
  /* eslint-enable */
6595
6601
  }
6596
6602
  }
6597
-
6598
6603
  return nodes.filter(function (_, index) {
6599
6604
  return !contained.has(index);
6600
6605
  });
@@ -6609,8 +6614,8 @@ var getTopParent = function (node) {
6609
6614
  };
6610
6615
  /**
6611
6616
  * returns all "focus containers" inside a given node
6612
- * @param node
6613
- * @returns {T}
6617
+ * @param node - node or nodes to look inside
6618
+ * @returns Element[]
6614
6619
  */
6615
6620
  var getAllAffectedNodes = function (node) {
6616
6621
  var nodes = asArray(node);
@@ -6631,6 +6636,10 @@ var safeProbe = function (cb) {
6631
6636
  /**
6632
6637
  * returns active element from document or from nested shadowdoms
6633
6638
  */
6639
+ /**
6640
+ * returns current active element. If the active element is a "container" itself(shadowRoot or iframe) returns active element inside it
6641
+ * @param [inDocument]
6642
+ */
6634
6643
  var getActiveElement = function (inDocument) {
6635
6644
  if (inDocument === void 0) {
6636
6645
  inDocument = document;
@@ -6652,7 +6661,8 @@ var focusInsideIframe = function (topNode, activeElement) {
6652
6661
  }));
6653
6662
  };
6654
6663
  /**
6655
- * @returns {Boolean} true, if the current focus is inside given node or nodes
6664
+ * @returns {Boolean} true, if the current focus is inside given node or nodes.
6665
+ * Supports nodes hidden inside shadowDom
6656
6666
  */
6657
6667
  var focusInside = function (topNode, activeElement) {
6658
6668
  // const activeElement = document && getActiveElement();
@@ -6668,8 +6678,11 @@ var focusInside = function (topNode, activeElement) {
6668
6678
  };
6669
6679
 
6670
6680
  /**
6671
- * focus is hidden FROM the focus-lock
6681
+ * checks if focus is hidden FROM the focus-lock
6672
6682
  * ie contained inside a node focus-lock shall ignore
6683
+ *
6684
+ * This is a utility function coupled with {@link FOCUS_ALLOW} constant
6685
+ *
6673
6686
  * @returns {boolean} focus is currently is in "allow" area
6674
6687
  */
6675
6688
  var focusIsHidden = function (inDocument) {
@@ -6888,16 +6901,21 @@ var reorderNodes = function (srcNodes, dstNodes) {
6888
6901
  }).filter(isDefined);
6889
6902
  };
6890
6903
  /**
6891
- * given top node(s) and the last active element return the element to be focused next
6904
+ * contains the main logic of the `focus-lock` package.
6905
+ *
6906
+ * ! you probably dont need this function !
6907
+ *
6908
+ * given top node(s) and the last active element returns the element to be focused next
6909
+ * @returns element which should be focused to move focus inside
6892
6910
  * @param topNode
6893
6911
  * @param lastNode
6894
6912
  */
6895
- var getFocusMerge = function (topNode, lastNode) {
6913
+ var focusSolver = function (topNode, lastNode) {
6896
6914
  var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);
6897
6915
  var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
6898
6916
  var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);
6899
6917
  var visibilityCache = new Map();
6900
- var anyFocusable = getAllTabbableNodes(entries, visibilityCache);
6918
+ var anyFocusable = getFocusableNodes(entries, visibilityCache);
6901
6919
  var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {
6902
6920
  var node = _a.node;
6903
6921
  return isNotAGuard(node);
@@ -6908,7 +6926,7 @@ var getFocusMerge = function (topNode, lastNode) {
6908
6926
  return undefined;
6909
6927
  }
6910
6928
  }
6911
- var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {
6929
+ var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {
6912
6930
  var node = _a.node;
6913
6931
  return node;
6914
6932
  });
@@ -6936,10 +6954,10 @@ var getFocusMerge = function (topNode, lastNode) {
6936
6954
  };
6937
6955
 
6938
6956
  /**
6939
- * return list of focusable elements inside a given top node
6940
- * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name
6957
+ * @returns list of focusable elements inside a given top node
6958
+ * @see {@link getFocusableNodes} for lower level access
6941
6959
  */
6942
- var getFocusabledIn = function (topNode) {
6960
+ var expandFocusableNodes = function (topNode) {
6943
6961
  var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
6944
6962
  var commonParent = getTopCommonParent(topNode, topNode, entries);
6945
6963
  var visibilityCache = new Map();
@@ -6973,23 +6991,30 @@ var focusOn = function (target, focusOptions) {
6973
6991
  var guardCount = 0;
6974
6992
  var lockDisabled = false;
6975
6993
  /**
6976
- * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.
6994
+ * The main functionality of the focus-lock package
6995
+ *
6996
+ * Contains focus at a given node.
6997
+ * The last focused element will help to determine which element(first or last) should be focused.
6998
+ * The found element will be focused.
6999
+ *
7000
+ * This is one time action (move), not a persistent focus-lock
7001
+ *
6977
7002
  * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus
6978
- * @param topNode
6979
- * @param lastNode
6980
- * @param options
7003
+ * @see {@link focusSolver} for the same functionality without autofocus
6981
7004
  */
6982
- var setFocus = function (topNode, lastNode, options) {
7005
+ var moveFocusInside = function (topNode, lastNode, options) {
6983
7006
  if (options === void 0) {
6984
7007
  options = {};
6985
7008
  }
6986
- var focusable = getFocusMerge(topNode, lastNode);
7009
+ var focusable = focusSolver(topNode, lastNode);
7010
+ // global local side effect to countain recursive lock activation and resolve focus-fighting
6987
7011
  if (lockDisabled) {
6988
7012
  return;
6989
7013
  }
6990
7014
  if (focusable) {
7015
+ /** +FOCUS-FIGHTING prevention **/
6991
7016
  if (guardCount > 2) {
6992
- // tslint:disable-next-line:no-console
7017
+ // we have recursive entered back the lock activation
6993
7018
  console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' + 'See https://github.com/theKashey/focus-lock/#focus-fighting');
6994
7019
  lockDisabled = true;
6995
7020
  setTimeout(function () {
@@ -7106,7 +7131,7 @@ var activateTrap = function activateTrap() {
7106
7131
  }
7107
7132
  document.body.focus();
7108
7133
  } else {
7109
- result = setFocus(workingArea, lastActiveFocus, {
7134
+ result = moveFocusInside(workingArea, lastActiveFocus, {
7110
7135
  focusOptions: focusOptions
7111
7136
  });
7112
7137
  lastPortaledElement = {};
@@ -7118,7 +7143,7 @@ var activateTrap = function activateTrap() {
7118
7143
  }
7119
7144
  if (document) {
7120
7145
  var newActiveElement = document && document.activeElement;
7121
- var allNodes = getFocusabledIn(workingArea);
7146
+ var allNodes = expandFocusableNodes(workingArea);
7122
7147
  var focusedIndex = allNodes.map(function (_ref) {
7123
7148
  var node = _ref.node;
7124
7149
  return node;
@@ -7224,7 +7249,7 @@ mediumFocus.assignSyncMedium(onFocus);
7224
7249
  mediumBlur.assignMedium(onBlur);
7225
7250
  mediumEffect.assignMedium(function (cb) {
7226
7251
  return cb({
7227
- moveFocusInside: setFocus,
7252
+ moveFocusInside: moveFocusInside,
7228
7253
  focusInside: focusInside
7229
7254
  });
7230
7255
  });
@@ -8711,7 +8736,7 @@ function Monthly(props) {
8711
8736
  }), weekNo && /* @__PURE__ */jsxRuntime.jsx(ui.Box, {
8712
8737
  children: /* @__PURE__ */jsxRuntime.jsx(ui.Select, {
8713
8738
  name: "day",
8714
- value: dayNo ? dayNo : 1,
8739
+ value: dayNo ? dayNo : 0,
8715
8740
  onChange: handleChange,
8716
8741
  children: DAYS.map((day, i) => {
8717
8742
  const weekday = new rrule.Weekday(i);