@itfin/components 1.3.94 → 1.3.96

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.94",
3
+ "version": "1.3.96",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -10,7 +10,7 @@
10
10
  <div class="b-panel__expand_text" v-text="title"></div>
11
11
  </a>
12
12
  </div>
13
- <div v-if="!nocard" v-show="!collapsed" class="b-panel-header px-3 pt-3">
13
+ <div v-if="!nocard" v-show="!collapsed" class="b-panel-header px-3 pt-3 pb-2">
14
14
  <slot name="header">
15
15
  <div>
16
16
  <slot name="title">
@@ -146,6 +146,10 @@ class Panel extends Vue {
146
146
  @Prop(Boolean) animate;
147
147
  @Prop(Boolean) nocard;
148
148
 
149
+ openPanel(...args) {
150
+ this.$emit('open', args);
151
+ }
152
+
149
153
  expandPanel() {
150
154
  this.$emit('expand');
151
155
  }
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <div v-loading="loading" class="px-3 pt-2 h-100">
3
+ <itf-form
4
+ ref="editForm"
5
+ class="d-flex flex-column justify-content-between h-100"
6
+ @keydown.native.shift.enter.stop.prevent="onSaveClick"
7
+ @keydown.native.esc.stop.prevent="$emit('cancel')"
8
+ >
9
+ <slot></slot>
10
+ <div class="py-3 justify-content-end d-flex align-items-center sticky-container">
11
+ <div>
12
+ <itf-button v-tooltip.delay="'Hot key: Esc'" secondary squircle :loading="loading" :disabled="loading" @click="$emit('cancel')">
13
+ <span>{{ $t('components.modal.cancel') }}</span>
14
+ </itf-button>
15
+ <itf-button v-tooltip.delay="'Hot key: Shift + Enter'" primary squircle :loading="loading" :disabled="loading" @click="onSaveClick">
16
+ <span>{{ $t('components.modal.save') }}</span>
17
+ </itf-button>
18
+ </div>
19
+ </div>
20
+ </itf-form>
21
+ </div>
22
+ </template>
23
+ <style lang="scss" scoped>
24
+ .sticky-container {
25
+ position: sticky;
26
+ top: auto;
27
+ bottom: 0;
28
+ z-index: 999;
29
+ background-color: var(--bs-body-bg);
30
+ }
31
+ </style>
32
+ <script>
33
+ import { Vue, Component, Prop } from 'vue-property-decorator';
34
+ import tooltip from '../../directives/tooltip';
35
+ import loading from '../../directives/loading';
36
+ import itfForm from '../form/Form.vue';
37
+ import itfButton from '../button/Button.vue';
38
+
39
+ @Component({
40
+ components: {
41
+ itfForm,
42
+ itfButton
43
+ },
44
+ directives: {
45
+ tooltip,
46
+ loading
47
+ },
48
+ filters: {
49
+ }
50
+ })
51
+ export default class PanelItemEdit extends Vue {
52
+ @Prop(Boolean) loading;
53
+
54
+ onSaveClick() {
55
+ if (this.$refs.editForm && !this.$refs.editForm.doValidation()) {
56
+ return;
57
+ }
58
+ this.$emit('save');
59
+ }
60
+ }
61
+ </script>
@@ -19,6 +19,7 @@
19
19
  :collapsed="panel.isCollapsed"
20
20
  :closeable="panel.isCloseable"
21
21
  :animate="panel.isAnimate"
22
+ @open="openPanel($event[0], $event[1], n + 1)"
22
23
  @expand="expandPanel(panel)"
23
24
  @fullsize="fullsizePanel(panel)"
24
25
  @close="closePanel(panel)"
@@ -162,6 +163,7 @@ export interface IPanel {
162
163
  nocard?: boolean;
163
164
  isCollapsed: boolean;
164
165
  isCloseable: boolean;
166
+ isAnimate: boolean;
165
167
  open: (type: string, visOptions: VisualOptions, payload: any) => void;
166
168
  close: () => void;
167
169
  expand: () => void;
@@ -632,7 +632,7 @@ export default {
632
632
  default(dropdownList, component, { width, top, left }) {
633
633
  dropdownList.style.top = top
634
634
  dropdownList.style.left = left
635
- dropdownList.style.minWidth = width
635
+ dropdownList.style.minWidth = width;
636
636
  dropdownList.style.width = 'max-content';
637
637
  },
638
638
  },
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  </div>
23
23
  <div v-if="indicatorType !== 'none'" class="indicator sticky">
24
- <div class="fill table-view-row-count" :class="{'on-rest': indicatorType !== 'checkbox'}">
24
+ <div class="fill table-view-row-count" :class="{'on-rest': indicatorType !== 'checkbox' && indicatorType !== 'toggle'}">
25
25
  <span v-if="indicatorType === 'order'">{{ (n + 1) }}</span>
26
26
  <span v-else-if="indicatorType === 'property'">{{ item[idProperty] }}</span>
27
27
  <a href="" @click.prevent.stop="$emit('toggle', item)" v-else-if="indicatorType === 'toggle'">
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
  </a>
43
43
  </div>
44
- <div class="fill" :class="{'on-hover': indicatorType !== 'checkbox'}">
44
+ <div v-if="indicatorType !== 'toggle'" class="fill" :class="{'on-hover': indicatorType !== 'checkbox'}">
45
45
  <itf-checkbox :value="item[idProperty]" />
46
46
  </div>
47
47
  </div>
@@ -42,11 +42,12 @@ body[data-theme="dark"] {
42
42
  .itf-table2 {
43
43
  font-size: var(--itf-table-font-size);
44
44
 
45
- &.scrollable {
45
+ .scrollable {
46
46
  -webkit-overflow-scrolling: touch;
47
47
  overflow: hidden scroll;
48
+ height: 100%;
48
49
  }
49
- &.scrollable-x {
50
+ .scrollable-x {
50
51
  overflow-x: scroll;
51
52
  padding-right: 4px;
52
53
  }
@@ -275,8 +276,7 @@ body[data-theme="dark"] {
275
276
  }
276
277
  }
277
278
 
278
-
279
- &:hover {
279
+ &:hover, &.permanent-editable-border {
280
280
  .table-view-item-value.editable {
281
281
  .form-control {
282
282
  border: 1px solid var(--itf-table-input-border-color);
@@ -295,7 +295,6 @@ body[data-theme="dark"] {
295
295
  border-right: 1px solid var(--bs-border-color);
296
296
  border-bottom: 1px solid var(--bs-border-color);
297
297
  }
298
-
299
298
  &.editable {
300
299
  padding: 2px;
301
300
 
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div class="itf-money-field ph-no-capture" :class="{'currency-arrow': !currencyDisabled, 'currency-select': currencySelect}">
3
- <div :class="{'input-group h-100': noCurrencySign}" :style="`--itf-money-field-padding-left: ${noCurrencySign ? 1 : selectedCurrencySymbol.length * 0.6 + 1}rem`">
3
+ <div class="h-100" :class="{'input-group h-100': noCurrencySign}" :style="`--itf-money-field-padding-left: ${noCurrencySign ? 1 : selectedCurrencySymbol.length * 0.6 + 1}rem`">
4
4
  <span class="itf-money-field__prepend" v-if="!noCurrencySign">{{ selectedCurrencySymbol }}</span>
5
5
  <i-mask-component
6
6
  ref="input"
7
7
  v-bind="mask"
8
- class="form-control"
8
+ class="form-control h-100"
9
9
  :class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
10
10
  @input="setValue"
11
11
  :value="maskedValue"