@itfin/components 2.0.66 → 2.0.67

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": "2.0.66",
3
+ "version": "2.0.67",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="itf-filter-panel d-flex flex-column align-items-start" :class="{'gap-3': !filtersOnly}">
2
+ <div class="itf-filter-panel d-flex flex-column align-items-start" :class="{'gap-3': !filtersOnly, 'd-none': !visible}">
3
3
  <div v-if="!filtersOnly" class="d-flex gap-2 justify-content-between w-100">
4
4
  <slot name="search">
5
5
  <div>
@@ -143,6 +143,7 @@ class FilterPanel extends Vue {
143
143
  @Prop({ type: Boolean, default: true }) showFilter;
144
144
  @Prop({ type: Boolean, default: false }) filtersOnly;
145
145
  @Prop(Boolean) mini;
146
+ @Prop({ type: Boolean, default: true }) visible;
146
147
  @Prop({ type: String, default: function() { return this.$t('components.filter.search'); } }) searchPlaceholder;
147
148
 
148
149
  filter = {};
@@ -4,6 +4,8 @@
4
4
  <itf-filter-panel
5
5
  :search-placeholder="searchPlaceholder"
6
6
  search
7
+ :visible="!noFilters"
8
+ :filters-only="filtersOnly"
7
9
  ref="filters"
8
10
  :mini="panel.isMultiple()"
9
11
  class="py-2 px-3"
@@ -121,6 +123,8 @@ class itfView extends Vue {
121
123
  @ModelSync('value', 'input') selectedIds;
122
124
 
123
125
  @Prop({ type: Boolean }) loading;
126
+ @Prop({ type: Boolean }) filtersOnly;
127
+ @Prop({ type: Boolean }) noFilters;
124
128
  @Prop({ type: Array }) filters;
125
129
  @Prop({ type: Object, required: true }) schema;
126
130
  // @Prop({ default: 20 }) size;
@@ -134,6 +138,7 @@ class itfView extends Vue {
134
138
  @Prop({ type: String, default: 'checkbox' }) indicatorType;
135
139
  @Prop({ type: String, default () { return this.$t('components.table.search'); } }) searchPlaceholder;
136
140
  @Prop() panel;
141
+ @Prop() hardFilter; // встановлює жорсткий фільтр, наприклад, треба завжди показувати лише по контрагенту
137
142
  @Prop(Boolean) showActions;
138
143
 
139
144
  page = 1;
@@ -177,7 +182,7 @@ class itfView extends Vue {
177
182
  const res = await this.$axios.$get(this.endpoint, {
178
183
  preventRaceCondition: true,
179
184
  params: {
180
- ...this.filter,
185
+ ...Object.assign(this.filter ?? {}, this.hardFilter ?? {}),
181
186
  page: this.page,
182
187
  size: this.size,
183
188
  sort: this.sorting