@orfium/ictinus 4.56.0 → 4.56.1

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.
@@ -7,9 +7,15 @@ var _dayjs = _interopRequireDefault(require("dayjs"));
7
7
 
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
9
 
10
- var currentDay = (0, _dayjs["default"])('11-03-2020 12:00:00');
10
+ var fakeDate = (0, _dayjs["default"])('11-03-2020 12:00:00');
11
+
12
+ var getDefaultDate = function getDefaultDate(date) {
13
+ return process.env.NODE_ENV !== 'test' ? date : fakeDate;
14
+ };
15
+
16
+ var currentDay = process.env.STORYBOOK_ENV === 'true' ? fakeDate : getDefaultDate((0, _dayjs["default"])());
11
17
  exports.currentDay = currentDay;
12
- var datepickerPropValue = process.env.NODE_ENV !== 'test' ? undefined : (0, _dayjs["default"])('11-03-2020 12:00:00');
18
+ var datepickerPropValue = getDefaultDate();
13
19
  exports.datepickerPropValue = datepickerPropValue;
14
20
 
15
21
  var initDates = function initDates(value, isDefaultNow) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orfium/ictinus",
3
- "version": "4.56.0",
3
+ "version": "4.56.1",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",