@dataloop-ai/components 0.20.222 → 0.20.223
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/package.json
CHANGED
|
@@ -127,6 +127,10 @@ export default defineComponent({
|
|
|
127
127
|
hideClearButton: {
|
|
128
128
|
type: Boolean,
|
|
129
129
|
default: false
|
|
130
|
+
},
|
|
131
|
+
enabledWholePeriod: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: false
|
|
130
134
|
}
|
|
131
135
|
},
|
|
132
136
|
emits: ['update:model-value', 'set-type', 'change'],
|
|
@@ -161,8 +165,25 @@ export default defineComponent({
|
|
|
161
165
|
const yesterday = CustomDate.subtract(1, 'day')
|
|
162
166
|
.startOf('day')
|
|
163
167
|
.toDate()
|
|
164
|
-
|
|
168
|
+
let allowWholePeriod = this.enabledWholePeriod
|
|
169
|
+
if (!this.availableRange || !this.availableRange.from) {
|
|
170
|
+
allowWholePeriod = false
|
|
171
|
+
}
|
|
165
172
|
return [
|
|
173
|
+
...(allowWholePeriod
|
|
174
|
+
? [
|
|
175
|
+
{
|
|
176
|
+
title: 'whole period',
|
|
177
|
+
key: DAY_SIDEBAR_OPTION.whole_period,
|
|
178
|
+
value: {
|
|
179
|
+
from: this.availableRange?.from,
|
|
180
|
+
to: new CustomDate(today)
|
|
181
|
+
.endOf('day')
|
|
182
|
+
.toDate()
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
: []),
|
|
166
187
|
{
|
|
167
188
|
title: 'today',
|
|
168
189
|
key: DAY_SIDEBAR_OPTION.today,
|