@beinformed/ui 1.59.19 → 1.59.20

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 (62) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/esm/models/attributes/AttributeModel.js +1 -2
  3. package/esm/models/attributes/AttributeModel.js.map +1 -1
  4. package/esm/models/attributes/BooleanAttributeModel.js +1 -2
  5. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  6. package/esm/models/attributes/ChoiceAttributeModel.js +1 -2
  7. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  8. package/esm/models/attributes/ChoiceAttributeOptionCollection.js +1 -2
  9. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  10. package/esm/models/attributes/ChoiceAttributeOptionModel.js +1 -2
  11. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  12. package/esm/models/lookup/LookupOptionCollection.js +1 -2
  13. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  14. package/esm/models/process/ProcessStatusSettingsModel.js +1 -2
  15. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  16. package/esm/redux/reducers/ModelCatalogReducer.js +1 -2
  17. package/esm/redux/reducers/ModelCatalogReducer.js.map +1 -1
  18. package/esm/redux/selectors/modelcatalog.js +1 -2
  19. package/esm/redux/selectors/modelcatalog.js.map +1 -1
  20. package/esm/utils/datetime/DateTimeUtil.js +16 -1
  21. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  22. package/lib/models/attributes/AttributeModel.js +1 -2
  23. package/lib/models/attributes/AttributeModel.js.flow +4 -2
  24. package/lib/models/attributes/AttributeModel.js.map +1 -1
  25. package/lib/models/attributes/BooleanAttributeModel.js +1 -2
  26. package/lib/models/attributes/BooleanAttributeModel.js.flow +4 -3
  27. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  28. package/lib/models/attributes/ChoiceAttributeModel.js +1 -2
  29. package/lib/models/attributes/ChoiceAttributeModel.js.flow +4 -2
  30. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  31. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +1 -2
  32. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.flow +1 -3
  33. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  34. package/lib/models/attributes/ChoiceAttributeOptionModel.js +1 -2
  35. package/lib/models/attributes/ChoiceAttributeOptionModel.js.flow +2 -2
  36. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  37. package/lib/models/lookup/LookupOptionCollection.js +1 -2
  38. package/lib/models/lookup/LookupOptionCollection.js.flow +4 -2
  39. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  40. package/lib/models/process/ProcessStatusSettingsModel.js +1 -2
  41. package/lib/models/process/ProcessStatusSettingsModel.js.flow +1 -2
  42. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  43. package/lib/redux/reducers/ModelCatalogReducer.js +1 -2
  44. package/lib/redux/reducers/ModelCatalogReducer.js.flow +1 -2
  45. package/lib/redux/reducers/ModelCatalogReducer.js.map +1 -1
  46. package/lib/redux/selectors/modelcatalog.js +1 -2
  47. package/lib/redux/selectors/modelcatalog.js.flow +3 -3
  48. package/lib/redux/selectors/modelcatalog.js.map +1 -1
  49. package/lib/utils/datetime/DateTimeUtil.js +52 -37
  50. package/lib/utils/datetime/DateTimeUtil.js.flow +17 -18
  51. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  52. package/package.json +7 -7
  53. package/src/models/attributes/AttributeModel.js +4 -2
  54. package/src/models/attributes/BooleanAttributeModel.js +4 -3
  55. package/src/models/attributes/ChoiceAttributeModel.js +4 -2
  56. package/src/models/attributes/ChoiceAttributeOptionCollection.js +1 -3
  57. package/src/models/attributes/ChoiceAttributeOptionModel.js +2 -2
  58. package/src/models/lookup/LookupOptionCollection.js +4 -2
  59. package/src/models/process/ProcessStatusSettingsModel.js +1 -2
  60. package/src/redux/reducers/ModelCatalogReducer.js +1 -2
  61. package/src/redux/selectors/modelcatalog.js +3 -3
  62. package/src/utils/datetime/DateTimeUtil.js +17 -18
@@ -2,7 +2,6 @@
2
2
  import { klona } from "klona/full";
3
3
 
4
4
  import { has } from "../../utils/helpers/objects";
5
- import { DateUtil } from "../../utils/datetime/DateTimeUtil";
6
5
 
7
6
  import AttributeModel from "./AttributeModel";
8
7
  import ChoiceAttributeOptionCollection from "./ChoiceAttributeOptionCollection";
@@ -43,7 +42,10 @@ export default class ChoiceAttributeModel extends AttributeModel {
43
42
  ) {
44
43
  super(attribute, attributeContributions, modelOptions);
45
44
 
46
- this._referenceDate = this.getData("referenceDate", DateUtil.now());
45
+ this._referenceDate = this.getData(
46
+ "referenceDate",
47
+ new Date().toISOString().split("T")[0],
48
+ );
47
49
  this._options = ChoiceAttributeOptionCollection.create(
48
50
  attribute,
49
51
  attributeContributions,
@@ -5,8 +5,6 @@ import ListHeaderModel from "../list/ListHeaderModel";
5
5
 
6
6
  import { getBasePathModularUI } from "../../constants";
7
7
 
8
- import { DateUtil } from "../../utils";
9
-
10
8
  import type { ChoiceAttributeOptionModelOptions } from "./ChoiceAttributeOptionModel";
11
9
  /**
12
10
  */
@@ -20,7 +18,7 @@ class ChoiceAttributeOptionCollection extends ResourceCollection<ChoiceAttribute
20
18
  this._modelOptions = modelOptions || {
21
19
  origin: "",
22
20
  contextPath: getBasePathModularUI(),
23
- referenceDate: DateUtil.now(),
21
+ referenceDate: new Date().toISOString().split("T")[0],
24
22
  };
25
23
  }
26
24
 
@@ -2,7 +2,6 @@
2
2
  import BaseModel from "../base/BaseModel";
3
3
  import ChoiceAttributeOptionCollection from "./ChoiceAttributeOptionCollection";
4
4
 
5
- import { DateUtil } from "../../utils/datetime/DateTimeUtil";
6
5
  import { has } from "../../utils/helpers/objects";
7
6
  import { TIMEVERSION_FILTER_NAME } from "../../constants/Constants";
8
7
  import { TITLE } from "../../constants/LayoutHints";
@@ -57,7 +56,8 @@ class ChoiceAttributeOptionModel
57
56
 
58
57
  this._isSelected = selectedValues.includes(this.code);
59
58
 
60
- this._referenceDate = modelOptions?.referenceDate || DateUtil.now();
59
+ this._referenceDate =
60
+ modelOptions?.referenceDate || new Date().toISOString().split("T")[0];
61
61
 
62
62
  this._level = 0;
63
63
 
@@ -1,7 +1,6 @@
1
1
  // @flow
2
2
  import ResourceCollection from "../base/ResourceCollection";
3
3
  import ChoiceAttributeOptionModel from "../attributes/ChoiceAttributeOptionModel";
4
- import { DateUtil } from "../../utils";
5
4
 
6
5
  import type { ModelOptions } from "../types";
7
6
 
@@ -27,7 +26,10 @@ class LookupOptionCollection extends ResourceCollection<ChoiceAttributeOptionMod
27
26
  optionType: this.getOptionType(option, contributions),
28
27
  elementsContributions: contributions.options[0].elements,
29
28
  },
30
- { ...modelOptions, referenceDate: DateUtil.now() },
29
+ {
30
+ ...modelOptions,
31
+ referenceDate: new Date().toISOString().split("T")[0],
32
+ },
31
33
  ),
32
34
  );
33
35
  });
@@ -3,7 +3,6 @@ import BaseModel from "../base/BaseModel";
3
3
 
4
4
  import { TIMEVERSION_FILTER_NAME } from "../../constants/Constants";
5
5
  import LinkCollection from "../links/LinkCollection";
6
- import { DateUtil } from "../../utils/datetime/DateTimeUtil";
7
6
 
8
7
  import type LinkModel from "../links/LinkModel";
9
8
 
@@ -67,7 +66,7 @@ export default class ProcessStatusSettingsModel extends BaseModel {
67
66
  /**
68
67
  */
69
68
  get referenceDate(): ISO_DATE {
70
- return DateUtil.now();
69
+ return new Date().toISOString().split("T")[0];
71
70
  }
72
71
 
73
72
  /**
@@ -1,12 +1,11 @@
1
1
  // @flow
2
- import { DateUtil } from "../../utils";
3
2
  import Cache from "../../utils/browser/Cache";
4
3
 
5
4
  import type { Reducer } from "redux";
6
5
  import type { ReduxAction, ModelCatalogState } from "../types";
7
6
 
8
7
  const initialState: ModelCatalogState = {
9
- entryDate: DateUtil.now(),
8
+ entryDate: new Date().toISOString().split("T")[0],
10
9
  };
11
10
 
12
11
  /**
@@ -1,11 +1,11 @@
1
1
  // @flow
2
- import { DateUtil } from "../../utils";
3
-
4
2
  import type { ReduxState } from "../types";
5
3
 
6
4
  /**
7
5
  * Retrieve entrydate for the model catalog
8
6
  */
9
7
  export const getEntryDate = (state: ReduxState): ISO_DATE => {
10
- return state.modelcatalog?.entryDate ?? DateUtil.now();
8
+ return (
9
+ state.modelcatalog?.entryDate ?? new Date().toISOString().split("T")[0]
10
+ );
11
11
  };
@@ -1,22 +1,21 @@
1
1
  // @flow
2
- import {
3
- format,
4
- isAfter,
5
- isBefore,
6
- isSameDay,
7
- isValid,
8
- parse,
9
- add,
10
- sub,
11
- set,
12
- startOfMonth,
13
- endOfMonth,
14
- startOfWeek,
15
- getHours,
16
- getMinutes,
17
- getDay,
18
- getWeek,
19
- } from "date-fns";
2
+ import { format } from "date-fns/format";
3
+ import { isAfter } from "date-fns/isAfter";
4
+ import { isBefore } from "date-fns/isBefore";
5
+ import { isSameDay } from "date-fns/isSameDay";
6
+ import { isValid } from "date-fns/isValid";
7
+ import { parse } from "date-fns/parse";
8
+ import { add } from "date-fns/add";
9
+ import { sub } from "date-fns/sub";
10
+ import { set } from "date-fns/set";
11
+ import { startOfMonth } from "date-fns/startOfMonth";
12
+ import { endOfMonth } from "date-fns/endOfMonth";
13
+ import { startOfWeek } from "date-fns/startOfWeek";
14
+ import { getHours } from "date-fns/getHours";
15
+ import { getMinutes } from "date-fns/getMinutes";
16
+ import { getDay } from "date-fns/getDay";
17
+ import { getWeek } from "date-fns/getWeek";
18
+
20
19
  import { enGB, nl } from "date-fns/locale";
21
20
  import { tz } from "@date-fns/tz";
22
21