@itfin/components 1.3.12 → 1.3.15

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.3.12",
3
+ "version": "1.3.15",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1037,21 +1037,12 @@ $rangeThumbSize: 12px;
1037
1037
  }
1038
1038
  &__dropdown {
1039
1039
  width: max-content;
1040
- border: $input-border-width solid $input-border-color;
1041
1040
  border-radius: $input-border-radius;
1042
1041
  background-color: $body-bg;
1043
1042
  overflow: hidden;
1044
- @if $enable-shadows {
1045
- @include box-shadow($input-box-shadow, $input-btn-focus-box-shadow);
1046
- } @else {
1047
- // Avoid using mixin so we can pass custom focus shadow properly
1048
- box-shadow: $input-btn-focus-box-shadow;
1049
- }
1050
1043
 
1051
1044
  [data-theme="dark"] & {
1052
1045
  background-color: $dark-body-bg;
1053
- border-color: $dark-border-color;
1054
- box-shadow: 0 0 0 2px $dark-input-focus-border;
1055
1046
  }
1056
1047
  }
1057
1048
  }
@@ -6,28 +6,31 @@
6
6
  </slot>
7
7
  </div>
8
8
  <input
9
- ref="input"
10
- readonly
11
- :disabled="disabled"
12
- class="form-control text-capitalize"
13
- :class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
14
- @focus="onFocus"
15
- @blur="onBlur"
16
- :value="displayValue"
17
- :placeholder="placeholder"
9
+ ref="input"
10
+ readonly
11
+ :disabled="disabled"
12
+ class="form-control text-capitalize"
13
+ :class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
14
+ @focus="onFocus"
15
+ @blur="onBlur"
16
+ :value="displayValue"
17
+ :placeholder="placeholder"
18
18
  />
19
19
  <div style="display: none">
20
- <div ref="dropdown" class="itf-monthpicker__dropdown">
21
- <itf-date-picker-inline
22
- :value="value"
23
- start-view="months"
24
- min-view="months"
25
- :min-date="minDate"
26
- only-calendar
27
- :display-format="displayFormat"
28
- :value-format="valueFormat"
29
- @input="selectInlineDate"
30
- ></itf-date-picker-inline>
20
+ <div ref="dropdown" class="itf-monthpicker__dropdown border rounded">
21
+ <div>
22
+ <itf-date-picker-inline
23
+ :value="value"
24
+ start-view="months"
25
+ min-view="months"
26
+ :min-date="minDate"
27
+ only-calendar
28
+ :display-format="displayFormat"
29
+ :value-format="valueFormat"
30
+ @input="selectInlineDate"
31
+ />
32
+ </div>
33
+ <slot name="after-calendar" />
31
34
  </div>
32
35
  </div>
33
36
  </div>
@@ -50,6 +53,7 @@ class itfMonthPicker extends Vue {
50
53
  @Inject({ default: null }) itemLabel;
51
54
 
52
55
  @Prop({ type: String }) value;
56
+ @Prop({ type: String }) customValue;
53
57
  @Prop({ type: Boolean }) disabled;
54
58
  @Prop({ type: String, default: 'ISO' }) valueFormat;
55
59
  @Prop({ type: [String, Date], default: '' }) minDate;
@@ -98,6 +102,9 @@ class itfMonthPicker extends Vue {
98
102
  }
99
103
 
100
104
  get displayValue() {
105
+ if (this.customValue) {
106
+ return this.customValue;
107
+ }
101
108
  if (!this.valueAsLuxon) {
102
109
  return '';
103
110
  }
@@ -131,9 +138,13 @@ class itfMonthPicker extends Vue {
131
138
  this.focused = false;
132
139
  }
133
140
 
141
+ hide() {
142
+ this.tooltip.hide();
143
+ }
144
+
134
145
  selectInlineDate(date) {
135
146
  this.$emit('input', date);
136
- this.tooltip.hide();
147
+ this.hide();
137
148
  }
138
149
  }
139
150
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="itf-editable-button">
3
3
  <slot></slot>
4
- <itf-button secondary icon small class="itf-editable-button__button" @click="$emit('click')">
4
+ <itf-button v-if="canEdit" secondary icon small class="itf-editable-button__button" @click="$emit('click')">
5
5
  <itf-icon name="pen" />
6
6
  </itf-button>
7
7
  </div>
@@ -35,5 +35,6 @@ export default @Component({
35
35
  }
36
36
  })
37
37
  class EditButton extends Vue {
38
+ @Prop({ type: Boolean, default: true }) canEdit;
38
39
  }
39
40
  </script>
@@ -6,7 +6,7 @@
6
6
  :data-column="index"
7
7
  @mouseover="columnHighlight(index, 'enter')"
8
8
  @mouseout="columnHighlight(index, 'leave')"
9
- :key="index" class="itf-board-column itf-board-column__title p-2">
9
+ :key="index" :class="`itf-board-column itf-board-column__title p-2 ${columnEdit ? 'itf-board-column__move' : ''}`">
10
10
  <div accept-group="board-columns"
11
11
  class="itf-board-header-space"
12
12
  @enter="columnHighlight(index, 'enter', 'drop')"
@@ -16,6 +16,7 @@
16
16
  </div>
17
17
  <itf-edit-button
18
18
  accept-group="board-columns"
19
+ :can-edit="columnEdit"
19
20
  @enter="columnHighlight(index, 'enter')"
20
21
  @leave="columnHighlight(index, 'leave')"
21
22
  @click="$emit('update:columnSettings', column)"
@@ -42,7 +43,7 @@
42
43
  <div class="itf-board-header-dropzone"></div>
43
44
  </div>
44
45
  </div>
45
- <div class="align-items-end d-flex pb-1">
46
+ <div v-if="columnEdit" class="align-items-end d-flex pb-1">
46
47
  <slot name="add-column">
47
48
  <itf-button icon small @click="$emit('add-сolumn')">
48
49
  <itf-icon name="plus" />
@@ -98,6 +99,7 @@ class Board extends Vue {
98
99
  @Prop({ type: Function, default: (item, value) => { item.Status = value; } }) updateFunc;
99
100
  @Prop({ type: String, default: 'Name' }) columnNameKey;
100
101
  @Prop(Boolean) columnSorting;
102
+ @Prop({ type: Boolean, default: true }) columnEdit;
101
103
 
102
104
  beforeDestroy() {
103
105
  if (this.columnSorting) {
@@ -129,7 +129,6 @@
129
129
  border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
130
130
 
131
131
  &__title {
132
- cursor: move;
133
132
  border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
134
133
 
135
134
  .itf-board-column__header {
@@ -142,6 +141,10 @@
142
141
  }
143
142
  }
144
143
 
144
+ &__move {
145
+ cursor: move;
146
+ }
147
+
145
148
  &.over {
146
149
  background-color: var(--itf-board-column-hover-color);
147
150
  }
@@ -173,7 +176,7 @@
173
176
  border-bottom: 1px solid var(--itf-board-card-border-color);
174
177
  position: sticky;
175
178
  top: 0;
176
- z-index: 101;
179
+ z-index: 100;
177
180
  background-color: var(--bs-light);
178
181
  }
179
182