intelicoreact 1.1.68 → 1.1.69
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.
|
@@ -135,18 +135,19 @@ var OpenedPart = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
135
135
|
// { 'form-select-options--hoverable': isHoverable },
|
|
136
136
|
)
|
|
137
137
|
}, items.map(function (item, index) {
|
|
138
|
-
var _intervals$item, _intervals$item2, _intervals$
|
|
138
|
+
var _intervals$item, _intervals$item2, _intervals$item3, _intervals$item3$star, _intervals$item3$star2, _intervals$item3$star3;
|
|
139
139
|
|
|
140
|
+
if ((_intervals$item = _dependencies.INTERVALS[item]) !== null && _intervals$item !== void 0 && _intervals$item.isHidden) return null;
|
|
140
141
|
return /*#__PURE__*/_react.default.createElement(_SelectItem.default, {
|
|
141
142
|
testId: testId,
|
|
142
143
|
key: index,
|
|
143
144
|
item: item,
|
|
144
|
-
label: (txt === null || txt === void 0 ? void 0 : txt.labels) && (txt === null || txt === void 0 ? void 0 : txt.labels[item]) || ((_intervals$
|
|
145
|
+
label: (txt === null || txt === void 0 ? void 0 : txt.labels) && (txt === null || txt === void 0 ? void 0 : txt.labels[item]) || ((_intervals$item2 = _dependencies.INTERVALS[item]) === null || _intervals$item2 === void 0 ? void 0 : _intervals$item2.label) || (item === _dependencies.CUSTOM_INTERVAL_KEY ? _dependencies.CUSTOM_INTERVAL_KEY_TEXT : item),
|
|
145
146
|
isActive: activeInterval === item,
|
|
146
147
|
onItemClick: function onItemClick() {
|
|
147
148
|
return handleItemClick(item.value || item);
|
|
148
149
|
},
|
|
149
|
-
disabled: item === _dependencies.CUSTOM_INTERVAL_KEY || minDate && ((_intervals$
|
|
150
|
+
disabled: item === _dependencies.CUSTOM_INTERVAL_KEY || minDate && ((_intervals$item3 = _dependencies.INTERVALS[item]) === null || _intervals$item3 === void 0 ? void 0 : (_intervals$item3$star = _intervals$item3.start) === null || _intervals$item3$star === void 0 ? void 0 : (_intervals$item3$star2 = _intervals$item3$star.call(_intervals$item3)) === null || _intervals$item3$star2 === void 0 ? void 0 : (_intervals$item3$star3 = _intervals$item3$star2.isBefore) === null || _intervals$item3$star3 === void 0 ? void 0 : _intervals$item3$star3.call(_intervals$item3$star2, momentMinDate))
|
|
150
151
|
});
|
|
151
152
|
})), !isCompact && /*#__PURE__*/_react.default.createElement(_Datepicker.default, {
|
|
152
153
|
testId: testId,
|
|
@@ -174,7 +174,7 @@ var INTERVALS = {
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
last6Months: {
|
|
177
|
-
label: '6 Months',
|
|
177
|
+
label: 'Last 6 Months',
|
|
178
178
|
start: function start() {
|
|
179
179
|
return (0, _momentTimezone.default)().subtract(6, 'month').startOf('month');
|
|
180
180
|
},
|
|
@@ -182,6 +182,16 @@ var INTERVALS = {
|
|
|
182
182
|
return (0, _momentTimezone.default)().startOf('month');
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
+
sixMonths: {
|
|
186
|
+
label: '6 Months',
|
|
187
|
+
isHidden: true,
|
|
188
|
+
start: function start() {
|
|
189
|
+
return (0, _momentTimezone.default)().subtract(6, 'month');
|
|
190
|
+
},
|
|
191
|
+
end: function end() {
|
|
192
|
+
return (0, _momentTimezone.default)().add(1, 'day').startOf('day');
|
|
193
|
+
}
|
|
194
|
+
},
|
|
185
195
|
thisYear: {
|
|
186
196
|
label: 'This Year',
|
|
187
197
|
start: function start() {
|
|
@@ -191,6 +201,16 @@ var INTERVALS = {
|
|
|
191
201
|
return (0, _momentTimezone.default)().add(1, 'day').startOf('day');
|
|
192
202
|
}
|
|
193
203
|
},
|
|
204
|
+
year: {
|
|
205
|
+
label: 'Year',
|
|
206
|
+
isHidden: true,
|
|
207
|
+
start: function start() {
|
|
208
|
+
return (0, _momentTimezone.default)().subtract(1, 'year');
|
|
209
|
+
},
|
|
210
|
+
end: function end() {
|
|
211
|
+
return (0, _momentTimezone.default)().add(1, 'day').startOf('day');
|
|
212
|
+
}
|
|
213
|
+
},
|
|
194
214
|
lastYear: {
|
|
195
215
|
label: 'Last Year',
|
|
196
216
|
start: function start() {
|