@itfin/components 1.2.102 → 1.2.103

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.2.102",
3
+ "version": "1.2.103",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -29,7 +29,7 @@
29
29
  </li>
30
30
  </ul>
31
31
  </div>
32
- <div v-if="value.Type === 'multiselect'" sortable-skip>
32
+ <div v-if="value.Type === 'multiselect'">
33
33
  <div class="d-flex justify-content-between pe-2">
34
34
  <h6 class="dropdown-header">{{ $t('components.customize.options') }}</h6>
35
35
  <div v-if="value.Options && value.Options.length">
@@ -56,15 +56,16 @@
56
56
  </div>
57
57
 
58
58
  <sortable
59
+ require-sortable-attribute
59
60
  :value="value.Options"
60
61
  @input="setParam({ Options: $event })"
61
62
  axis="y"
62
- require-sortable-attribute
63
+ :read-only="false"
63
64
  auto-scroll="window"
64
65
  >
65
- <div v-for="option of value.Options" class="dropdown-item d-flex justify-content-between" sortable>
66
+ <div v-for="option of value.Options" class="dropdown-item d-flex justify-content-between">
66
67
  <div>
67
- <itf-icon class="dragHandle" name="drag_vertical" />
68
+ <itf-icon sortable class="dragHandle" name="drag_vertical" />
68
69
  <span>{{ option.Name }}</span>
69
70
  </div>
70
71
  <span class="text-muted">></span>
@@ -91,12 +92,14 @@ import itfIcon from '../icon/Icon';
91
92
  import itfButton from '../button/Button';
92
93
  import Sortable from '../sortable/Sortable';
93
94
  import itfIconPopover from '../popover/IconPopover.vue';
94
- import {INLINE_TYPES} from './constants';
95
- import itfDeleteConfirmModal from "../modal/DeleteConfirmModal.vue";
96
- import PropertyItem from "./PropertyItem.vue";
95
+ import { INLINE_TYPES } from './constants';
96
+ import itfDeleteConfirmModal from '../modal/DeleteConfirmModal.vue';
97
+ import PropertyItem from './PropertyItem.vue';
98
+ import PropertiesPopupMenu from "@/components/customize/PropertiesPopupMenu.vue";
97
99
 
98
100
  export default @Component({
99
101
  components: {
102
+ PropertiesPopupMenu,
100
103
  PropertyItem,
101
104
  itfDeleteConfirmModal,
102
105
  itfButton,
@@ -80,7 +80,7 @@ import itfButton from '../button/Button';
80
80
  import itfDropdown from '../dropdown/Dropdown.vue';
81
81
  import itfLabel from '../form/Label.vue';
82
82
  import itfTextField from '../text-field/TextField.vue';
83
- import Sortable from '../sortable/Sortable';
83
+ import Sortable from '../sortable/Sortable.vue';
84
84
  import PropertyItem from './PropertyItem';
85
85
  import { INLINE_TYPES } from './constants';
86
86
 
@@ -17,7 +17,6 @@
17
17
  </template>
18
18
  <properties-edit-menu
19
19
  v-if="isEditMode"
20
- sortable-skip
21
20
  :value="field"
22
21
  :loading="loading"
23
22
  @input="onChange($event)"
@@ -26,7 +25,6 @@
26
25
  />
27
26
  <properties-popup-menu
28
27
  v-else
29
- sortable-skip
30
28
  :field="field"
31
29
  :loading="loading"
32
30
  @edit="isEditMode = true"
@@ -119,7 +117,7 @@ import itfButton from '../button/Button';
119
117
  import itfDropdown from '../dropdown/Dropdown.vue';
120
118
  import itfLabel from '../form/Label.vue';
121
119
  import itfTextField from '../text-field/TextField.vue';
122
- import Sortable from '../sortable/Sortable';
120
+ import Sortable from '../sortable/sortable-shopify';
123
121
  import PropertiesPopupMenu from './PropertiesPopupMenu.vue';
124
122
  import PropertiesEditMenu from './PropertiesEditMenu.vue';
125
123
  import PropertyInlineEdit from './PropertyInlineEdit.vue';
@@ -1,5 +1,7 @@
1
1
  import { storiesOf } from '@storybook/vue';
2
+ import itfPropertyItem from './PropertyItem.vue';
2
3
  import itfPropertiesList from './PropertiesList.vue';
4
+ import itfPropertiesEditMenu from './PropertiesEditMenu.vue';
3
5
  import itfForm from '../form/Form.vue';
4
6
  import itfButton from '../button/Button.vue';
5
7
  import itfIcon from '../icon/Icon.vue';
@@ -14,7 +16,9 @@ storiesOf('Common', module)
14
16
  itfForm,
15
17
  itfButton,
16
18
  itfLabel,
17
- itfPropertiesList
19
+ itfPropertiesList,
20
+ itfPropertiesEditMenu,
21
+ itfPropertyItem
18
22
  },
19
23
  data() {
20
24
  return {
@@ -32,7 +36,12 @@ storiesOf('Common', module)
32
36
  ],
33
37
  value: {
34
38
  test1: 'test1'
35
- }
39
+ },
40
+ field: {
41
+ Type: 'text',
42
+ Name: 'Test'
43
+ },
44
+ fieldValue: 'text'
36
45
  }
37
46
  },
38
47
  methods: {
@@ -62,6 +71,17 @@ storiesOf('Common', module)
62
71
 
63
72
  <itf-properties-list lock-fields editable :fields.sync="list" v-model="value"></itf-properties-list>
64
73
 
74
+ {{field}}
75
+ <itf-property-item
76
+ editable
77
+ :field.sync="field"
78
+ :value="fieldValue"
79
+ />
80
+
81
+ <itf-properties-edit-menu
82
+ v-model="field"
83
+ />
84
+
65
85
  </itf-app>
66
86
  </div>`,
67
87
  }));
@@ -3,22 +3,6 @@ import { Draggable } from './draggable'
3
3
  import DraggableEvent from './event'
4
4
 
5
5
 
6
- Vue.directive("sortable-item", {
7
- inserted(el, { value }) {
8
- el.sortableItemPayload = value?.payload;
9
- el.classList.add(draggableNode.options.draggableClass);
10
- el.getAttribute("with-handle") && el.classList.add(draggableNode.options.dragHandleClass);
11
- value?.mirror && (el.dataset.draggableMirror = JSON.stringify(value.mirror));
12
- },
13
- update(el, {value}) {
14
- el.sortableItemPayload = value?.payload;
15
- el.classList.add(draggableNode.options.draggableClass);
16
- el.getAttribute("with-handle") && el.classList.add(draggableNode.options.dragHandleClass);
17
- value?.mirror && (el.dataset.draggableMirror = JSON.stringify(value.mirror))
18
- }
19
- });
20
-
21
-
22
6
  const SORT_TAG = "sort";
23
7
  function someFunc({ source, over, overContainer, children }) {
24
8
  const isDelete = !children.length
@@ -70,7 +54,7 @@ function c(A, H, tt) {
70
54
  }
71
55
 
72
56
  export
73
- const Sortable = {
57
+ const SortableShopify = {
74
58
  name: 'Sortable',
75
59
  render: function() {
76
60
  return this._self._c(this.tag, {
@@ -284,5 +268,20 @@ const Sortable = {
284
268
  }
285
269
  };
286
270
 
287
-
288
- Vue.component("Sortable", Sortable)
271
+ export default {
272
+ Sortable: SortableShopify,
273
+ SortableItem: {
274
+ inserted(el, { value }) {
275
+ el.sortableItemPayload = value?.payload;
276
+ el.classList.add(draggableNode.options.draggableClass);
277
+ el.getAttribute("with-handle") && el.classList.add(draggableNode.options.dragHandleClass);
278
+ value?.mirror && (el.dataset.draggableMirror = JSON.stringify(value.mirror));
279
+ },
280
+ update(el, {value}) {
281
+ el.sortableItemPayload = value?.payload;
282
+ el.classList.add(draggableNode.options.draggableClass);
283
+ el.getAttribute("with-handle") && el.classList.add(draggableNode.options.dragHandleClass);
284
+ value?.mirror && (el.dataset.draggableMirror = JSON.stringify(value.mirror))
285
+ }
286
+ }
287
+ };
@@ -42,11 +42,11 @@
42
42
  }
43
43
 
44
44
  -webkit-overflow-scrolling: touch;
45
- //overflow: hidden auto;
46
- //
47
- //&.scrollable-x {
48
- // overflow-x: auto;
49
- //}
45
+ overflow: hidden auto;
46
+
47
+ &.scrollable-x {
48
+ overflow-x: auto;
49
+ }
50
50
  }
51
51
  .last-sticky-column:after {
52
52
  content: '';
@@ -93,7 +93,7 @@ class itfTable2 extends Vue {
93
93
  get groups() {
94
94
  const { groupBy, rows } = this;
95
95
  if (!groupBy) {
96
- return [];
96
+ return this.rows ? [{ name: '', rows: this.rows }] : []
97
97
  }
98
98
  const groups = rows.reduce((acc, row) => {
99
99
  const group = row[groupBy];
@@ -2,9 +2,9 @@
2
2
 
3
3
  <div class="itf-table-group table-small-row">
4
4
  <!-- Тут показується лінія при драг н дропі -->
5
- <div accept-group="tablegroups" class="preline">
5
+ <!--div accept-group="tablegroups" class="preline">
6
6
  <div class="line"></div>
7
- </div>
7
+ </div-->
8
8
 
9
9
  <div data-test="table-group-wrapper" class="table-group-wrapper flex-grow-1 w-100 d-block"
10
10
  :style="`--row-count: ${isShowTable ? rows.length : 0}`">
@@ -22,7 +22,7 @@
22
22
  @add-column="$emit('add-column', $event)"
23
23
  />
24
24
 
25
- <div group="tablegroups" class="draggable-item"
25
+ <div v-if="title" group="tablegroups" class="draggable-item"
26
26
  data-draggable-mirror="{&quot;xAxis&quot;:false}">
27
27
  <div class="table-row-template d-flex align-items-stretch"
28
28
  style="height: var(--group-title-height)">
@@ -28,7 +28,7 @@
28
28
  @drop="reorderColumns"
29
29
  v-drag-handle
30
30
  v-draggable="{ handle: true, payload: { index: n, item: column }, mirror: {yAxis:false} }">
31
- <itf-dropdown text append-to-body shadow ref="dropdown" class="w-100">
31
+ <itf-dropdown text append-to-body shadow ref="dropdown" class="w-100" disabled>
32
32
  <template #button>
33
33
  <span :title="column.text">
34
34
  <!-- <itf-icon name="type_select" :size="16" />-->