@opengeoweb/time-slider-lite 21.1.0 → 21.2.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/dist/index.esm.js
CHANGED
|
@@ -21,7 +21,11 @@ var en = {
|
|
|
21
21
|
},
|
|
22
22
|
units: {
|
|
23
23
|
days: "days",
|
|
24
|
+
days_one: "day",
|
|
25
|
+
days_other: "days",
|
|
24
26
|
hours: "hours",
|
|
27
|
+
hours_one: "hour",
|
|
28
|
+
hours_other: "hours",
|
|
25
29
|
minutes: "min"
|
|
26
30
|
},
|
|
27
31
|
menu: {
|
|
@@ -64,7 +68,11 @@ var fi = {
|
|
|
64
68
|
},
|
|
65
69
|
units: {
|
|
66
70
|
days: "vrk",
|
|
71
|
+
days_one: "vrk",
|
|
72
|
+
days_other: "vrk",
|
|
67
73
|
hours: "h",
|
|
74
|
+
hours_one: "h",
|
|
75
|
+
hours_other: "h",
|
|
68
76
|
minutes: "min"
|
|
69
77
|
},
|
|
70
78
|
menu: {
|
|
@@ -109,7 +117,11 @@ var translations = {
|
|
|
109
117
|
},
|
|
110
118
|
units: {
|
|
111
119
|
days: "dygn",
|
|
120
|
+
days_one: "dygn",
|
|
121
|
+
days_other: "dygn",
|
|
112
122
|
hours: "h",
|
|
123
|
+
hours_one: "h",
|
|
124
|
+
hours_other: "h",
|
|
113
125
|
minutes: "min"
|
|
114
126
|
},
|
|
115
127
|
menu: {
|
|
@@ -707,11 +719,12 @@ var SubmenuSelectLabel = function SubmenuSelectLabel(_ref) {
|
|
|
707
719
|
});
|
|
708
720
|
};
|
|
709
721
|
|
|
710
|
-
var _excluded$3 = ["amountOfOptions", "dropdownButtonIcon", "itemPostFix", "value", "setValue"];
|
|
722
|
+
var _excluded$3 = ["amountOfOptions", "dropdownButtonIcon", "itemPostFix", "getItemPostFix", "value", "setValue"];
|
|
711
723
|
var CustomSelect = function CustomSelect(_ref) {
|
|
712
724
|
var amountOfOptions = _ref.amountOfOptions,
|
|
713
725
|
dropdownButtonIcon = _ref.dropdownButtonIcon,
|
|
714
726
|
itemPostFix = _ref.itemPostFix,
|
|
727
|
+
getItemPostFix = _ref.getItemPostFix,
|
|
715
728
|
value = _ref.value,
|
|
716
729
|
setValue = _ref.setValue,
|
|
717
730
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
@@ -736,9 +749,10 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
|
736
749
|
},
|
|
737
750
|
value: String(availableOptions.includes(value) ? value : availableOptions[availableOptions.length - 1]),
|
|
738
751
|
children: availableOptions.map(function (option) {
|
|
752
|
+
var _getItemPostFix;
|
|
739
753
|
return jsxs(MenuItem, {
|
|
740
754
|
value: String(option),
|
|
741
|
-
children: [option, " ", itemPostFix]
|
|
755
|
+
children: [option, " ", (_getItemPostFix = getItemPostFix == null ? void 0 : getItemPostFix(option)) != null ? _getItemPostFix : itemPostFix]
|
|
742
756
|
}, option);
|
|
743
757
|
})
|
|
744
758
|
}));
|
|
@@ -782,6 +796,11 @@ var DayHourSelector = function DayHourSelector(_ref2) {
|
|
|
782
796
|
amountOfOptions: amountOfDayOptions,
|
|
783
797
|
disabled: isDisabled || amountOfDayOptions === 1,
|
|
784
798
|
dropdownButtonIcon: dropdownButtonIcon,
|
|
799
|
+
getItemPostFix: function getItemPostFix(count) {
|
|
800
|
+
return t('units.days', {
|
|
801
|
+
count: count
|
|
802
|
+
});
|
|
803
|
+
},
|
|
785
804
|
itemPostFix: t('units.days'),
|
|
786
805
|
setValue: setDays,
|
|
787
806
|
value: days
|
|
@@ -797,6 +816,11 @@ var DayHourSelector = function DayHourSelector(_ref2) {
|
|
|
797
816
|
amountOfOptions: amountOfHourOptions,
|
|
798
817
|
disabled: isDisabled || amountOfHourOptions === 1,
|
|
799
818
|
dropdownButtonIcon: dropdownButtonIcon,
|
|
819
|
+
getItemPostFix: function getItemPostFix(count) {
|
|
820
|
+
return t('units.hours', {
|
|
821
|
+
count: count
|
|
822
|
+
});
|
|
823
|
+
},
|
|
800
824
|
itemPostFix: t('units.hours'),
|
|
801
825
|
setValue: setHours,
|
|
802
826
|
value: hours
|
|
@@ -946,7 +970,9 @@ var TimeStepSelector = function TimeStepSelector(_ref) {
|
|
|
946
970
|
5: "5 " + t('units.minutes'),
|
|
947
971
|
15: "15 " + t('units.minutes'),
|
|
948
972
|
30: "30 " + t('units.minutes'),
|
|
949
|
-
60: "1 " + t('units.hours'
|
|
973
|
+
60: "1 " + t('units.hours', {
|
|
974
|
+
count: 1
|
|
975
|
+
}),
|
|
950
976
|
180: "3 " + t('units.hours'),
|
|
951
977
|
360: "6 " + t('units.hours'),
|
|
952
978
|
720: "12 " + t('units.hours')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/time-slider-lite",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.2.0",
|
|
4
4
|
"description": "GeoWeb time-slider-lite library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/shared": "21.
|
|
24
|
-
"@opengeoweb/store": "21.
|
|
25
|
-
"@opengeoweb/theme": "21.
|
|
26
|
-
"@opengeoweb/time-slider": "21.
|
|
27
|
-
"@opengeoweb/webmap": "21.
|
|
23
|
+
"@opengeoweb/shared": "21.2.0",
|
|
24
|
+
"@opengeoweb/store": "21.2.0",
|
|
25
|
+
"@opengeoweb/theme": "21.2.0",
|
|
26
|
+
"@opengeoweb/time-slider": "21.2.0",
|
|
27
|
+
"@opengeoweb/webmap": "21.2.0",
|
|
28
28
|
"@reduxjs/toolkit": "^2.6.1",
|
|
29
29
|
"i18next": "^25.0.1",
|
|
30
30
|
"react-draggable": "^4.4.6",
|
|
31
31
|
"react-i18next": "^15.1.1",
|
|
32
32
|
"react-redux": "^9.2.0",
|
|
33
33
|
"@mui/material": "^9.0.1",
|
|
34
|
-
"@opengeoweb/core": "21.
|
|
34
|
+
"@opengeoweb/core": "21.2.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": "19",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@emotion/styled": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"eslint-plugin-storybook": "10.3.3"
|
|
42
|
+
"eslint-plugin-storybook": "^10.3.3"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
45
|
"dist",
|