@itfin/components 1.4.36 → 1.4.40

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itfin/components",
3
- "version": "1.4.36",
3
+ "version": "1.4.40",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -40,6 +40,11 @@
40
40
  <itf-date-picker-inline
41
41
  style="margin: -.5rem"
42
42
  :value="value.value"
43
+ :only-calendar="options.calendarOptions && options.calendarOptions.onlyCalendar"
44
+ :max-date="options.calendarOptions && options.calendarOptions.maxDate"
45
+ :min-date="options.calendarOptions && options.calendarOptions.minDate"
46
+ :start-view="options.calendarOptions && options.calendarOptions.startView"
47
+ :min-view="options.calendarOptions && options.calendarOptions.minView"
43
48
  @input="onFilterChange({ value: $event })"
44
49
  />
45
50
  </template>
@@ -376,7 +376,24 @@ class FilterPanel extends Vue {
376
376
  }
377
377
  } else if (facet.type === 'date') {
378
378
  const date = DateTime.fromISO(value.value);
379
- value.label = (date.isValid ? date : DateTime.fromISO(facet.options.defaultValue.value ?? DateTime.now().toISO())).toFormat('dd MMM yyyy');
379
+ const effectiveDate = (date.isValid ? date : DateTime.fromISO(facet.options.defaultValue.value ?? DateTime.now().toISO()));
380
+ // Якщо календарь в режимі вибору місяця (startView/minView === 'month'),
381
+ // відображаємо весь місяць, наприклад: "01 - 31 Mar 2026"
382
+ if (
383
+ facet.options?.calendarOptions &&
384
+ facet.options.calendarOptions.startView === 'months' &&
385
+ facet.options.calendarOptions.minView === 'months'
386
+ ) {
387
+ const startOfMonth = effectiveDate.startOf('month');
388
+ const endOfMonth = effectiveDate.endOf('month');
389
+ const startLabel = startOfMonth.toFormat('dd');
390
+ const endLabel = endOfMonth.toFormat('dd MMM yyyy');
391
+ value.label = `${startLabel} - ${endLabel}`;
392
+ } else {
393
+ // Стандартний сценарій: одиночна дата
394
+ value.label = effectiveDate.toFormat('dd MMM yyyy');
395
+ }
396
+
380
397
  value.isDefault = facet.options.defaultValue ? value.value === facet.options.defaultValue.value : false;
381
398
  } else if (facet.type === 'month') {
382
399
  const date = DateTime.fromISO(value.value);
@@ -0,0 +1,4 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
4
+ </template>
@@ -0,0 +1,6 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15 5C16.8856 5 17.8283 5.00015 18.4141 5.58594C18.9998 6.17172 19 7.11438 19 9V11C19 11.389 18.9973 11.7379 18.9922 12.0518C18.4552 11.8439 17.823 11.9563 17.3896 12.3896C17.2259 12.5534 17.1091 12.7457 17.0371 12.9502H15.2002C13.8757 12.9502 12.7541 13.8093 12.3564 15H9C7.11438 15 6.17172 14.9998 5.58594 14.4141C5.00015 13.8283 5 12.8856 5 11V9C5 7.11438 5.00015 6.17172 5.58594 5.58594C6.17172 5.00015 7.11438 5 9 5H15ZM12 8C10.8954 8 10 8.89543 10 10C10 11.1046 10.8954 12 12 12C13.1046 12 14 11.1046 14 10C14 8.89543 13.1046 8 12 8ZM8 9C7.44772 9 7 9.44772 7 10C7 10.5523 7.44772 11 8 11C8.55228 11 9 10.5523 9 10C9 9.44772 8.55228 9 8 9ZM16 9C15.4477 9 15 9.44772 15 10C15 10.5523 15.4477 11 16 11C16.5523 11 17 10.5523 17 10C17 9.44772 16.5523 9 16 9Z" fill="currentColor"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18.1318 13.1318C18.3076 12.9561 18.5928 12.9561 18.7686 13.1318L19.7686 14.1318C19.9443 14.3075 19.9443 14.5928 19.7686 14.7685L18.7686 15.7685C18.5928 15.9442 18.3076 15.9442 18.1318 15.7685C17.9561 15.5928 17.9561 15.3075 18.1318 15.1318L18.3633 14.9004H15.2002C14.6203 14.9004 14.1504 15.3703 14.1504 15.9502V16.9502C14.1504 17.1987 13.9487 17.4004 13.7002 17.4004C13.4517 17.4004 13.25 17.1987 13.25 16.9502V15.9502C13.25 14.8732 14.1232 14 15.2002 14H18.3633L18.1318 13.7685C17.9561 13.5928 17.9561 13.3075 18.1318 13.1318Z" fill="currentColor"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.2002 16.4999C19.4487 16.5 19.6504 16.7016 19.6504 16.9501V17.9501C19.6504 19.0271 18.7771 19.9003 17.7002 19.9003H14.5371L14.7685 20.1318C14.9442 20.3075 14.9442 20.5928 14.7685 20.7685C14.5928 20.9442 14.3075 20.9442 14.1318 20.7685L13.1318 19.7685C12.9561 19.5928 12.9561 19.3075 13.1318 19.1318L14.1318 18.1318C14.3075 17.9561 14.5928 17.956 14.7685 18.1318C14.9442 18.3075 14.9442 18.5928 14.7685 18.7685L14.5371 18.9999H17.7002C18.28 18.9999 18.75 18.53 18.75 17.9501V16.9501C18.75 16.7016 18.9516 16.4999 19.2002 16.4999Z" fill="currentColor"/>
5
+ </svg>
6
+ </template>
@@ -0,0 +1,4 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16 14L12 10L8 14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
4
+ </template>
@@ -0,0 +1,4 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8 10L12 14L16 10" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
4
+ </template>
@@ -0,0 +1,4 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16 14L12 10L8 14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
4
+ </template>
@@ -0,0 +1,4 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16 14L12 10L8 14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
4
+ </template>
@@ -0,0 +1,7 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12.3535 7.47363V11.6419" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M15.966 13.7257L12.3535 11.6416" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M7.47353 9.18446H4V5.71094" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M6.9525 17.0431C8.02097 18.1124 9.38259 18.8409 10.8651 19.1362C12.3476 19.4316 13.8845 19.2806 15.2812 18.7024C16.6779 18.1242 17.8717 17.1448 18.7117 15.8879C19.5517 14.6311 20 13.1534 20 11.6418C20 10.1301 19.5517 8.6524 18.7117 7.39558C17.8717 6.13876 16.6779 5.1593 15.2812 4.5811C13.8845 4.0029 12.3476 3.85193 10.8651 4.14729C9.38259 4.44266 8.02097 5.17109 6.9525 6.24043L4 9.18424" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
7
+ </template>
@@ -0,0 +1,4 @@
1
+ <template><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 11.9316V13.6002C6 13.8211 6.17909 14.0002 6.4 14.0002H8.06863C8.2808 14.0002 8.48429 13.9159 8.63432 13.7659L14.2343 8.16588C14.5467 7.85346 14.5467 7.34693 14.2343 7.03451L12.9657 5.76588C12.6533 5.45346 12.1467 5.45346 11.8343 5.76588L6.23431 11.3659C6.08429 11.5159 6 11.7194 6 11.9316Z" fill="currentColor"/>
3
+ </svg>
4
+ </template>