@dr.pogodin/react-utils 1.21.1 → 1.21.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.
Files changed (118) hide show
  1. package/build/development/client/index.js +0 -7
  2. package/build/development/client/index.js.map +1 -1
  3. package/build/development/client/init.js +3 -17
  4. package/build/development/client/init.js.map +1 -1
  5. package/build/development/index.js +0 -13
  6. package/build/development/index.js.map +1 -1
  7. package/build/development/server/Cache.js +2 -9
  8. package/build/development/server/Cache.js.map +1 -1
  9. package/build/development/server/index.js +7 -32
  10. package/build/development/server/index.js.map +1 -1
  11. package/build/development/server/renderer.js +24 -80
  12. package/build/development/server/renderer.js.map +1 -1
  13. package/build/development/server/server.js +21 -61
  14. package/build/development/server/server.js.map +1 -1
  15. package/build/development/server/utils/errors.js +2 -9
  16. package/build/development/server/utils/errors.js.map +1 -1
  17. package/build/development/server/utils/index.js +0 -4
  18. package/build/development/shared/components/Button/index.js +2 -13
  19. package/build/development/shared/components/Button/index.js.map +1 -1
  20. package/build/development/shared/components/Checkbox/index.js +2 -9
  21. package/build/development/shared/components/Checkbox/index.js.map +1 -1
  22. package/build/development/shared/components/CodeSplit/index.js +11 -22
  23. package/build/development/shared/components/CodeSplit/index.js.map +1 -1
  24. package/build/development/shared/components/Dropdown/index.js +0 -11
  25. package/build/development/shared/components/Dropdown/index.js.map +1 -1
  26. package/build/development/shared/components/GenericLink/index.js +3 -9
  27. package/build/development/shared/components/GenericLink/index.js.map +1 -1
  28. package/build/development/shared/components/Input/index.js +0 -7
  29. package/build/development/shared/components/Input/index.js.map +1 -1
  30. package/build/development/shared/components/Link.js +3 -6
  31. package/build/development/shared/components/Link.js.map +1 -1
  32. package/build/development/shared/components/MetaTags.js +1 -8
  33. package/build/development/shared/components/MetaTags.js.map +1 -1
  34. package/build/development/shared/components/Modal/index.js +2 -19
  35. package/build/development/shared/components/Modal/index.js.map +1 -1
  36. package/build/development/shared/components/NavLink.js +2 -6
  37. package/build/development/shared/components/NavLink.js.map +1 -1
  38. package/build/development/shared/components/PageLayout/index.js +0 -7
  39. package/build/development/shared/components/PageLayout/index.js.map +1 -1
  40. package/build/development/shared/components/ScalableRect/index.js +1 -6
  41. package/build/development/shared/components/ScalableRect/index.js.map +1 -1
  42. package/build/development/shared/components/Throbber/index.js +0 -9
  43. package/build/development/shared/components/Throbber/index.js.map +1 -1
  44. package/build/development/shared/components/WithTooltip/Tooltip.js +9 -28
  45. package/build/development/shared/components/WithTooltip/Tooltip.js.map +1 -1
  46. package/build/development/shared/components/WithTooltip/index.js +0 -16
  47. package/build/development/shared/components/WithTooltip/index.js.map +1 -1
  48. package/build/development/shared/components/YouTubeVideo/index.js +3 -11
  49. package/build/development/shared/components/YouTubeVideo/index.js.map +1 -1
  50. package/build/development/shared/components/index.js +0 -17
  51. package/build/development/shared/components/index.js.map +1 -1
  52. package/build/development/shared/utils/Barrier.js +1 -13
  53. package/build/development/shared/utils/Barrier.js.map +1 -1
  54. package/build/development/shared/utils/Emitter.js +4 -13
  55. package/build/development/shared/utils/Emitter.js.map +1 -1
  56. package/build/development/shared/utils/Semaphore.js +13 -19
  57. package/build/development/shared/utils/Semaphore.js.map +1 -1
  58. package/build/development/shared/utils/config.js +0 -5
  59. package/build/development/shared/utils/config.js.map +1 -1
  60. package/build/development/shared/utils/index.js +5 -26
  61. package/build/development/shared/utils/index.js.map +1 -1
  62. package/build/development/shared/utils/isomorphy.js +6 -12
  63. package/build/development/shared/utils/isomorphy.js.map +1 -1
  64. package/build/development/shared/utils/jest/E2eSsrEnv.js +20 -41
  65. package/build/development/shared/utils/jest/E2eSsrEnv.js.map +1 -1
  66. package/build/development/shared/utils/jest/index.js +10 -31
  67. package/build/development/shared/utils/jest/index.js.map +1 -1
  68. package/build/development/shared/utils/splitComponent.js +2 -5
  69. package/build/development/shared/utils/splitComponent.js.map +1 -1
  70. package/build/development/shared/utils/time.js +52 -14
  71. package/build/development/shared/utils/time.js.map +1 -1
  72. package/build/development/shared/utils/webpack.js +1 -5
  73. package/build/development/shared/utils/webpack.js.map +1 -1
  74. package/build/development/style.css +5 -24
  75. package/build/development/web.bundle.js +27 -27
  76. package/build/production/client/index.js.map +1 -1
  77. package/build/production/client/init.js.map +1 -1
  78. package/build/production/index.js.map +1 -1
  79. package/build/production/server/Cache.js.map +1 -1
  80. package/build/production/server/index.js.map +1 -1
  81. package/build/production/server/renderer.js.map +1 -1
  82. package/build/production/server/server.js.map +1 -1
  83. package/build/production/server/utils/errors.js.map +1 -1
  84. package/build/production/shared/components/Button/index.js.map +1 -1
  85. package/build/production/shared/components/Checkbox/index.js.map +1 -1
  86. package/build/production/shared/components/CodeSplit/index.js.map +1 -1
  87. package/build/production/shared/components/Dropdown/index.js.map +1 -1
  88. package/build/production/shared/components/GenericLink/index.js.map +1 -1
  89. package/build/production/shared/components/Input/index.js.map +1 -1
  90. package/build/production/shared/components/Link.js.map +1 -1
  91. package/build/production/shared/components/MetaTags.js.map +1 -1
  92. package/build/production/shared/components/Modal/index.js.map +1 -1
  93. package/build/production/shared/components/NavLink.js.map +1 -1
  94. package/build/production/shared/components/PageLayout/index.js.map +1 -1
  95. package/build/production/shared/components/ScalableRect/index.js.map +1 -1
  96. package/build/production/shared/components/Throbber/index.js.map +1 -1
  97. package/build/production/shared/components/WithTooltip/Tooltip.js.map +1 -1
  98. package/build/production/shared/components/WithTooltip/index.js.map +1 -1
  99. package/build/production/shared/components/YouTubeVideo/index.js.map +1 -1
  100. package/build/production/shared/components/index.js.map +1 -1
  101. package/build/production/shared/utils/Barrier.js.map +1 -1
  102. package/build/production/shared/utils/Emitter.js.map +1 -1
  103. package/build/production/shared/utils/Semaphore.js.map +1 -1
  104. package/build/production/shared/utils/config.js.map +1 -1
  105. package/build/production/shared/utils/index.js.map +1 -1
  106. package/build/production/shared/utils/isomorphy.js.map +1 -1
  107. package/build/production/shared/utils/jest/E2eSsrEnv.js.map +1 -1
  108. package/build/production/shared/utils/jest/index.js.map +1 -1
  109. package/build/production/shared/utils/splitComponent.js.map +1 -1
  110. package/build/production/shared/utils/time.js +21 -2
  111. package/build/production/shared/utils/time.js.map +1 -1
  112. package/build/production/shared/utils/webpack.js.map +1 -1
  113. package/build/production/style.css +1 -1
  114. package/build/production/style.css.map +1 -1
  115. package/build/production/web.bundle.js +1 -1
  116. package/build/production/web.bundle.js.map +1 -1
  117. package/config/babel/node-ssr.js +1 -1
  118. package/package.json +33 -31
@@ -1,19 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
8
  exports.timer = timer;
10
-
9
+ exports.useCurrent = useCurrent;
11
10
  var _dayjs = _interopRequireDefault(require("dayjs"));
12
-
13
11
  var _lodash = require("lodash");
14
-
12
+ var _react = require("react");
13
+ var _reactGlobalState = require("@dr.pogodin/react-global-state");
15
14
  var _Barrier = require("./Barrier");
16
-
17
15
  /**
18
16
  * @static
19
17
  * @const SEC_MS
@@ -23,6 +21,7 @@ var _Barrier = require("./Barrier");
23
21
  * console.log(time.SEC_MS); // Prints: 1000
24
22
  */
25
23
  _dayjs.default.SEC_MS = 1000;
24
+
26
25
  /**
27
26
  * @static
28
27
  * @const MIN_MS
@@ -31,8 +30,8 @@ _dayjs.default.SEC_MS = 1000;
31
30
  * import { time } from '@dr.pogodin/react-utils';
32
31
  * console.log(time.MIN_MS); // Prints: 60000
33
32
  */
34
-
35
33
  _dayjs.default.MIN_MS = 60 * _dayjs.default.SEC_MS;
34
+
36
35
  /**
37
36
  * @static
38
37
  * @const HOUR_MS
@@ -41,8 +40,8 @@ _dayjs.default.MIN_MS = 60 * _dayjs.default.SEC_MS;
41
40
  * import { time } from '@dr.pogodin/react-utils';
42
41
  * console.log(time.HOUR_MS); // Prints: 3600000
43
42
  */
44
-
45
43
  _dayjs.default.HOUR_MS = 60 * _dayjs.default.MIN_MS;
44
+
46
45
  /**
47
46
  * @static
48
47
  * @const DAY_MS
@@ -51,8 +50,8 @@ _dayjs.default.HOUR_MS = 60 * _dayjs.default.MIN_MS;
51
50
  * import { time } from '@dr.pogodin/react-utils';
52
51
  * console.log(time.DAY_MS); // Prints: 86400000
53
52
  */
54
-
55
53
  _dayjs.default.DAY_MS = 24 * _dayjs.default.HOUR_MS;
54
+
56
55
  /**
57
56
  * @static
58
57
  * @const YEAR_MS
@@ -62,8 +61,8 @@ _dayjs.default.DAY_MS = 24 * _dayjs.default.HOUR_MS;
62
61
  * import { time } from '@dr.pogodin/react-utils';
63
62
  * console.log(time.YEAR_MS); // Prints: 31536000000
64
63
  */
65
-
66
64
  _dayjs.default.YEAR_MS = 365 * _dayjs.default.DAY_MS;
65
+
67
66
  /**
68
67
  * @static
69
68
  * @func now
@@ -73,8 +72,8 @@ _dayjs.default.YEAR_MS = 365 * _dayjs.default.DAY_MS;
73
72
  * import { time } from '@dr.pogodin/react-utils';
74
73
  * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.
75
74
  */
76
-
77
75
  _dayjs.default.now = Date.now;
76
+
78
77
  /**
79
78
  * Creates a Promise, which resolves after the given timeout.
80
79
  * @param {number} timeout Timeout [ms].
@@ -82,23 +81,62 @@ _dayjs.default.now = Date.now;
82
81
  * .abort() method attached, which cancels the pending timer resolution
83
82
  * (without resolving or rejecting the barrier).
84
83
  */
85
-
86
84
  async function timer(timeout) {
87
85
  const res = new _Barrier.Barrier();
88
-
89
86
  if (timeout > 0) {
90
87
  const id = setTimeout(res.resolve.bind(res), timeout);
91
-
92
88
  res.abort = () => clearTimeout(id);
93
89
  } else {
94
90
  res.abort = _lodash.noop;
95
91
  res.resolve();
96
92
  }
97
-
98
93
  return res;
99
94
  }
100
95
 
96
+ /**
97
+ * This react hook wraps Date.now() function in a SSR friendly way,
98
+ * ensuring that all calls to useCurrent() within the same render return
99
+ * exactly the same time (which is retrieved from Date.now() first, and
100
+ * then stored in the global state to be reused in all other calls), which
101
+ * is also passed and used in the first client side render, and then updated
102
+ * with a finite precision to avoid infinite re-rendering loops.
103
+ * @param {object} [options] Optional settings.
104
+ * @param {string} [options.globalStatePath="currentTime"] Global state path
105
+ * to keep the current time value.
106
+ * @param {number} [options.precision= 5 * time.SEC_MS] Current time precision.
107
+ * The hook won't update the current time stored in the global state unless it
108
+ * is different from Date.now() result by this number (in milliseconds).
109
+ * Default to 5 seconds.
110
+ * @param {boolean} [options.autorefresh=false] Set `true` to automatically
111
+ * refresh time stored in the global state with the given `precision` (and
112
+ * thus automatically re-rendering components dependent on this hook, or
113
+ * the global state with the period equal to the `precision`.
114
+ * @return {number} Unix timestamp in milliseconds.
115
+ */
116
+ function useCurrent({
117
+ autorefresh = false,
118
+ globalStatePath = 'currentTime',
119
+ precision = 5 * _dayjs.default.SEC_MS
120
+ } = {}) {
121
+ const [now, setter] = (0, _reactGlobalState.useGlobalState)(globalStatePath, Date.now);
122
+ (0, _react.useEffect)(() => {
123
+ let timerId;
124
+ const update = () => {
125
+ setter(old => {
126
+ const neu = Date.now();
127
+ return Math.abs(neu - old) > precision ? neu : old;
128
+ });
129
+ if (autorefresh) timerId = setTimeout(update, precision);
130
+ };
131
+ update();
132
+ return () => {
133
+ if (timerId) clearTimeout(timerId);
134
+ };
135
+ }, [autorefresh, precision, setter]);
136
+ return now;
137
+ }
101
138
  _dayjs.default.timer = timer;
139
+ _dayjs.default.useCurrent = useCurrent;
102
140
  var _default = _dayjs.default;
103
141
  exports.default = _default;
104
142
  //# sourceMappingURL=time.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","names":["dayjs","SEC_MS","MIN_MS","HOUR_MS","DAY_MS","YEAR_MS","now","Date","timer","timeout","res","Barrier","id","setTimeout","resolve","bind","abort","clearTimeout","noop"],"sources":["../../../../src/shared/utils/time.js"],"sourcesContent":["import dayjs from 'dayjs';\nimport { noop } from 'lodash';\n\nimport { Barrier } from './Barrier';\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\ndayjs.SEC_MS = 1000;\n\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 × `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\ndayjs.MIN_MS = 60 * dayjs.SEC_MS;\n\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 × `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\ndayjs.HOUR_MS = 60 * dayjs.MIN_MS;\n\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 × `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\ndayjs.DAY_MS = 24 * dayjs.HOUR_MS;\n\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 × `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\ndayjs.YEAR_MS = 365 * dayjs.DAY_MS;\n\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\ndayjs.now = Date.now;\n\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\nexport async function timer(timeout) {\n const res = new Barrier();\n if (timeout > 0) {\n const id = setTimeout(res.resolve.bind(res), timeout);\n res.abort = () => clearTimeout(id);\n } else {\n res.abort = noop;\n res.resolve();\n }\n return res;\n}\n\ndayjs.timer = timer;\n\nexport default dayjs;\n"],"mappings":";;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAA,cAAA,CAAMC,MAAN,GAAe,IAAf;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAD,cAAA,CAAME,MAAN,GAAe,KAAKF,cAAA,CAAMC,MAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAD,cAAA,CAAMG,OAAN,GAAgB,KAAKH,cAAA,CAAME,MAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAF,cAAA,CAAMI,MAAN,GAAe,KAAKJ,cAAA,CAAMG,OAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAH,cAAA,CAAMK,OAAN,GAAgB,MAAML,cAAA,CAAMI,MAA5B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAJ,cAAA,CAAMM,GAAN,GAAYC,IAAI,CAACD,GAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,eAAeE,KAAf,CAAqBC,OAArB,EAA8B;EACnC,MAAMC,GAAG,GAAG,IAAIC,gBAAJ,EAAZ;;EACA,IAAIF,OAAO,GAAG,CAAd,EAAiB;IACf,MAAMG,EAAE,GAAGC,UAAU,CAACH,GAAG,CAACI,OAAJ,CAAYC,IAAZ,CAAiBL,GAAjB,CAAD,EAAwBD,OAAxB,CAArB;;IACAC,GAAG,CAACM,KAAJ,GAAY,MAAMC,YAAY,CAACL,EAAD,CAA9B;EACD,CAHD,MAGO;IACLF,GAAG,CAACM,KAAJ,GAAYE,YAAZ;IACAR,GAAG,CAACI,OAAJ;EACD;;EACD,OAAOJ,GAAP;AACD;;AAEDV,cAAA,CAAMQ,KAAN,GAAcA,KAAd;eAEeR,c"}
1
+ {"version":3,"file":"time.js","names":["dayjs","SEC_MS","MIN_MS","HOUR_MS","DAY_MS","YEAR_MS","now","Date","timer","timeout","res","Barrier","id","setTimeout","resolve","bind","abort","clearTimeout","noop","useCurrent","autorefresh","globalStatePath","precision","setter","useGlobalState","useEffect","timerId","update","old","neu","Math","abs"],"sources":["../../../../src/shared/utils/time.js"],"sourcesContent":["import dayjs from 'dayjs';\nimport { noop } from 'lodash';\nimport { useEffect } from 'react';\n\nimport { useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { Barrier } from './Barrier';\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\ndayjs.SEC_MS = 1000;\n\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 × `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\ndayjs.MIN_MS = 60 * dayjs.SEC_MS;\n\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 × `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\ndayjs.HOUR_MS = 60 * dayjs.MIN_MS;\n\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 × `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\ndayjs.DAY_MS = 24 * dayjs.HOUR_MS;\n\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 × `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\ndayjs.YEAR_MS = 365 * dayjs.DAY_MS;\n\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\ndayjs.now = Date.now;\n\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\nexport async function timer(timeout) {\n const res = new Barrier();\n if (timeout > 0) {\n const id = setTimeout(res.resolve.bind(res), timeout);\n res.abort = () => clearTimeout(id);\n } else {\n res.abort = noop;\n res.resolve();\n }\n return res;\n}\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n * @param {object} [options] Optional settings.\n * @param {string} [options.globalStatePath=\"currentTime\"] Global state path\n * to keep the current time value.\n * @param {number} [options.precision= 5 * time.SEC_MS] Current time precision.\n * The hook won't update the current time stored in the global state unless it\n * is different from Date.now() result by this number (in milliseconds).\n * Default to 5 seconds.\n * @param {boolean} [options.autorefresh=false] Set `true` to automatically\n * refresh time stored in the global state with the given `precision` (and\n * thus automatically re-rendering components dependent on this hook, or\n * the global state with the period equal to the `precision`.\n * @return {number} Unix timestamp in milliseconds.\n */\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * dayjs.SEC_MS,\n} = {}) {\n const [now, setter] = useGlobalState(globalStatePath, Date.now);\n useEffect(() => {\n let timerId;\n const update = () => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\ndayjs.timer = timer;\ndayjs.useCurrent = useCurrent;\n\nexport default dayjs;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAA,cAAK,CAACC,MAAM,GAAG,IAAI;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAD,cAAK,CAACE,MAAM,GAAG,EAAE,GAAGF,cAAK,CAACC,MAAM;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAD,cAAK,CAACG,OAAO,GAAG,EAAE,GAAGH,cAAK,CAACE,MAAM;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAF,cAAK,CAACI,MAAM,GAAG,EAAE,GAAGJ,cAAK,CAACG,OAAO;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAH,cAAK,CAACK,OAAO,GAAG,GAAG,GAAGL,cAAK,CAACI,MAAM;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAJ,cAAK,CAACM,GAAG,GAAGC,IAAI,CAACD,GAAG;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeE,KAAK,CAACC,OAAO,EAAE;EACnC,MAAMC,GAAG,GAAG,IAAIC,gBAAO,EAAE;EACzB,IAAIF,OAAO,GAAG,CAAC,EAAE;IACf,MAAMG,EAAE,GAAGC,UAAU,CAACH,GAAG,CAACI,OAAO,CAACC,IAAI,CAACL,GAAG,CAAC,EAAED,OAAO,CAAC;IACrDC,GAAG,CAACM,KAAK,GAAG,MAAMC,YAAY,CAACL,EAAE,CAAC;EACpC,CAAC,MAAM;IACLF,GAAG,CAACM,KAAK,GAAGE,YAAI;IAChBR,GAAG,CAACI,OAAO,EAAE;EACf;EACA,OAAOJ,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASS,UAAU,CAAC;EACzBC,WAAW,GAAG,KAAK;EACnBC,eAAe,GAAG,aAAa;EAC/BC,SAAS,GAAG,CAAC,GAAGtB,cAAK,CAACC;AACxB,CAAC,GAAG,CAAC,CAAC,EAAE;EACN,MAAM,CAACK,GAAG,EAAEiB,MAAM,CAAC,GAAG,IAAAC,gCAAc,EAACH,eAAe,EAAEd,IAAI,CAACD,GAAG,CAAC;EAC/D,IAAAmB,gBAAS,EAAC,MAAM;IACd,IAAIC,OAAO;IACX,MAAMC,MAAM,GAAG,MAAM;MACnBJ,MAAM,CAAEK,GAAG,IAAK;QACd,MAAMC,GAAG,GAAGtB,IAAI,CAACD,GAAG,EAAE;QACtB,OAAOwB,IAAI,CAACC,GAAG,CAACF,GAAG,GAAGD,GAAG,CAAC,GAAGN,SAAS,GAAGO,GAAG,GAAGD,GAAG;MACpD,CAAC,CAAC;MACF,IAAIR,WAAW,EAAEM,OAAO,GAAGb,UAAU,CAACc,MAAM,EAAEL,SAAS,CAAC;IAC1D,CAAC;IACDK,MAAM,EAAE;IACR,OAAO,MAAM;MACX,IAAID,OAAO,EAAET,YAAY,CAACS,OAAO,CAAC;IACpC,CAAC;EACH,CAAC,EAAE,CAACN,WAAW,EAAEE,SAAS,EAAEC,MAAM,CAAC,CAAC;EACpC,OAAOjB,GAAG;AACZ;AAEAN,cAAK,CAACQ,KAAK,GAAGA,KAAK;AACnBR,cAAK,CAACmB,UAAU,GAAGA,UAAU;AAAC,eAEfnB,cAAK;AAAA"}
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.requireWeak = requireWeak;
7
7
  exports.resolveWeak = resolveWeak;
8
-
9
8
  var _isomorphy = require("./isomorphy");
10
-
11
9
  /**
12
10
  * Requires the specified module without including it into the bundle during
13
11
  * Webpack build.
@@ -17,7 +15,6 @@ var _isomorphy = require("./isomorphy");
17
15
  */
18
16
  function requireWeak(modulePath, basePath) {
19
17
  if (_isomorphy.IS_CLIENT_SIDE) return null;
20
-
21
18
  try {
22
19
  /* eslint-disable no-eval */
23
20
  const {
@@ -40,6 +37,7 @@ function requireWeak(modulePath, basePath) {
40
37
  return null;
41
38
  }
42
39
  }
40
+
43
41
  /**
44
42
  * Resolves specified module path with help of Babel's module resolver.
45
43
  * Yes, the function itself just returns its argument to the caller, but Babel
@@ -48,8 +46,6 @@ function requireWeak(modulePath, basePath) {
48
46
  * @param {string} modulePath
49
47
  * @return {string} Absolute or relative path to the module.
50
48
  */
51
-
52
-
53
49
  function resolveWeak(modulePath) {
54
50
  return modulePath;
55
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.js","names":["requireWeak","modulePath","basePath","IS_CLIENT_SIDE","resolve","eval","path","default","def","named","Object","entries","forEach","key","value","Error","resolveWeak"],"sources":["../../../../src/shared/utils/webpack.js"],"sourcesContent":["import { IS_CLIENT_SIDE } from './isomorphy';\n\n/**\n * Requires the specified module without including it into the bundle during\n * Webpack build.\n * @param {string} modulePath\n * @param {string} [basePath]\n * @return {object} Required module.\n */\nexport function requireWeak(modulePath, basePath) {\n if (IS_CLIENT_SIDE) return null;\n\n try {\n /* eslint-disable no-eval */\n const { resolve } = eval('require')('path');\n const path = basePath ? resolve(basePath, modulePath) : modulePath;\n const { default: def, ...named } = eval('require')(path);\n /* eslint-enable no-eval */\n\n if (!def) return named;\n\n Object.entries(named).forEach(([key, value]) => {\n if (def[key]) throw Error('Conflict between default and named exports');\n def[key] = value;\n });\n return def;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolves specified module path with help of Babel's module resolver.\n * Yes, the function itself just returns its argument to the caller, but Babel\n * is configured to resolve the first argument of resolveWeak(..) function, thus\n * the result will be the resolved path.\n * @param {string} modulePath\n * @return {string} Absolute or relative path to the module.\n */\nexport function resolveWeak(modulePath) {\n return modulePath;\n}\n"],"mappings":";;;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,WAAT,CAAqBC,UAArB,EAAiCC,QAAjC,EAA2C;EAChD,IAAIC,yBAAJ,EAAoB,OAAO,IAAP;;EAEpB,IAAI;IACF;IACA,MAAM;MAAEC;IAAF,IAAcC,IAAI,CAAC,SAAD,CAAJ,CAAgB,MAAhB,CAApB;IACA,MAAMC,IAAI,GAAGJ,QAAQ,GAAGE,OAAO,CAACF,QAAD,EAAWD,UAAX,CAAV,GAAmCA,UAAxD;IACA,MAAM;MAAEM,OAAO,EAAEC,GAAX;MAAgB,GAAGC;IAAnB,IAA6BJ,IAAI,CAAC,SAAD,CAAJ,CAAgBC,IAAhB,CAAnC;IACA;;IAEA,IAAI,CAACE,GAAL,EAAU,OAAOC,KAAP;IAEVC,MAAM,CAACC,OAAP,CAAeF,KAAf,EAAsBG,OAAtB,CAA8B,CAAC,CAACC,GAAD,EAAMC,KAAN,CAAD,KAAkB;MAC9C,IAAIN,GAAG,CAACK,GAAD,CAAP,EAAc,MAAME,KAAK,CAAC,4CAAD,CAAX;MACdP,GAAG,CAACK,GAAD,CAAH,GAAWC,KAAX;IACD,CAHD;IAIA,OAAON,GAAP;EACD,CAdD,CAcE,MAAM;IACN,OAAO,IAAP;EACD;AACF;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASQ,WAAT,CAAqBf,UAArB,EAAiC;EACtC,OAAOA,UAAP;AACD"}
1
+ {"version":3,"file":"webpack.js","names":["requireWeak","modulePath","basePath","IS_CLIENT_SIDE","resolve","eval","path","default","def","named","Object","entries","forEach","key","value","Error","resolveWeak"],"sources":["../../../../src/shared/utils/webpack.js"],"sourcesContent":["import { IS_CLIENT_SIDE } from './isomorphy';\n\n/**\n * Requires the specified module without including it into the bundle during\n * Webpack build.\n * @param {string} modulePath\n * @param {string} [basePath]\n * @return {object} Required module.\n */\nexport function requireWeak(modulePath, basePath) {\n if (IS_CLIENT_SIDE) return null;\n\n try {\n /* eslint-disable no-eval */\n const { resolve } = eval('require')('path');\n const path = basePath ? resolve(basePath, modulePath) : modulePath;\n const { default: def, ...named } = eval('require')(path);\n /* eslint-enable no-eval */\n\n if (!def) return named;\n\n Object.entries(named).forEach(([key, value]) => {\n if (def[key]) throw Error('Conflict between default and named exports');\n def[key] = value;\n });\n return def;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolves specified module path with help of Babel's module resolver.\n * Yes, the function itself just returns its argument to the caller, but Babel\n * is configured to resolve the first argument of resolveWeak(..) function, thus\n * the result will be the resolved path.\n * @param {string} modulePath\n * @return {string} Absolute or relative path to the module.\n */\nexport function resolveWeak(modulePath) {\n return modulePath;\n}\n"],"mappings":";;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,WAAW,CAACC,UAAU,EAAEC,QAAQ,EAAE;EAChD,IAAIC,yBAAc,EAAE,OAAO,IAAI;EAE/B,IAAI;IACF;IACA,MAAM;MAAEC;IAAQ,CAAC,GAAGC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;IAC3C,MAAMC,IAAI,GAAGJ,QAAQ,GAAGE,OAAO,CAACF,QAAQ,EAAED,UAAU,CAAC,GAAGA,UAAU;IAClE,MAAM;MAAEM,OAAO,EAAEC,GAAG;MAAE,GAAGC;IAAM,CAAC,GAAGJ,IAAI,CAAC,SAAS,CAAC,CAACC,IAAI,CAAC;IACxD;;IAEA,IAAI,CAACE,GAAG,EAAE,OAAOC,KAAK;IAEtBC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MAC9C,IAAIN,GAAG,CAACK,GAAG,CAAC,EAAE,MAAME,KAAK,CAAC,4CAA4C,CAAC;MACvEP,GAAG,CAACK,GAAG,CAAC,GAAGC,KAAK;IAClB,CAAC,CAAC;IACF,OAAON,GAAG;EACZ,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASQ,WAAW,CAACf,UAAU,EAAE;EACtC,OAAOA,UAAU;AACnB"}
@@ -499,8 +499,7 @@ body.scrolling-disabled-by-modal {
499
499
  *.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g,
500
500
  .-dr-pogodin-react-utils___src-shared-components-Throbber-theme___context___uIObt7.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g,
501
501
  .-dr-pogodin-react-utils___src-shared-components-Throbber-theme___ad___XIxe9o.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___hoc___YOyORH.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g {
502
- -webkit-animation: -dr-pogodin-react-utils___src-shared-components-Throbber-theme___bouncing___TJe-6j 0.4s ease-in infinite alternate;
503
- animation: -dr-pogodin-react-utils___src-shared-components-Throbber-theme___bouncing___TJe-6j 0.4s ease-in infinite alternate;
502
+ animation: -dr-pogodin-react-utils___src-shared-components-Throbber-theme___bouncing___TJe-6j 0.4s ease-in infinite alternate;
504
503
  background: black;
505
504
  border-radius: 0.3em;
506
505
  display: inline-block;
@@ -509,14 +508,6 @@ body.scrolling-disabled-by-modal {
509
508
  position: relative;
510
509
  width: 0.6em;
511
510
  }
512
- @-webkit-keyframes -dr-pogodin-react-utils___src-shared-components-Throbber-theme___bouncing___TJe-6j {
513
- from {
514
- top: -0.3em;
515
- }
516
- to {
517
- top: 0.3em;
518
- }
519
- }
520
511
  @keyframes -dr-pogodin-react-utils___src-shared-components-Throbber-theme___bouncing___TJe-6j {
521
512
  from {
522
513
  top: -0.3em;
@@ -528,26 +519,17 @@ body.scrolling-disabled-by-modal {
528
519
  *.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g:first-child,
529
520
  .-dr-pogodin-react-utils___src-shared-components-Throbber-theme___context___uIObt7.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g:first-child,
530
521
  .-dr-pogodin-react-utils___src-shared-components-Throbber-theme___ad___XIxe9o.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___hoc___YOyORH.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g:first-child {
531
- -webkit-animation-delay: -0.2s;
532
- animation-delay: -0.2s;
522
+ animation-delay: -0.2s;
533
523
  }
534
524
  *.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g:last-child,
535
525
  .-dr-pogodin-react-utils___src-shared-components-Throbber-theme___context___uIObt7.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g:last-child,
536
526
  .-dr-pogodin-react-utils___src-shared-components-Throbber-theme___ad___XIxe9o.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___hoc___YOyORH.-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g:last-child {
537
- -webkit-animation-delay: 0.2s;
538
- animation-delay: 0.2s;
527
+ animation-delay: 0.2s;
539
528
  }
540
529
  /*!************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
541
530
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[4]!./src/shared/components/WithTooltip/default-theme.scss ***!
542
531
  \************************************************************************************************************************************************************************************************************************************************************************************************************************/
543
- @-webkit-keyframes -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- {
544
- from {
545
- opacity: 0;
546
- }
547
- to {
548
- opacity: 1;
549
- }
550
- }@keyframes -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- {
532
+ @keyframes -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- {
551
533
  from {
552
534
  opacity: 0;
553
535
  }
@@ -582,8 +564,7 @@ body.scrolling-disabled-by-modal {
582
564
  position: absolute;
583
565
  top: 0;
584
566
  left: 0;
585
- -webkit-animation: -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- 0.6s;
586
- animation: -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- 0.6s;
567
+ animation: -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- 0.6s;
587
568
  }
588
569
  *.-dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___wrapper___4qDBRM,
589
570
  .-dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___ad___4xT7zE.-dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___hoc___zd-vnH.-dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___wrapper___4qDBRM,