@policystudio/policy-studio-ui-vue 1.0.89 → 1.0.91

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": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -31,7 +31,7 @@
31
31
  padding: 7px 16px;
32
32
 
33
33
  &-title {
34
- @apply psui-text-gray-50 psui-text-small;
34
+ @apply psui-text-gray-50 psui-text-small psui-flex psui-items-center;
35
35
 
36
36
  .psui-el-checkbox {
37
37
  @apply psui-text-gray-50;
@@ -13,11 +13,21 @@
13
13
  @dragend="$emit('drag-end-group', indexColumnGroup)"
14
14
  @dragover="$emit('drag-over-group', indexColumnGroup)"
15
15
  >
16
- <p>{{ columnGroup.title }}</p>
16
+ <span class="flex psui-items-center">
17
+ <p>{{ columnGroup.title }}</p>
18
+ <PsIcon
19
+ v-if="columnGroup.hasHelper.showOnEditHideColumns"
20
+ icon="info"
21
+ size="16"
22
+ icon-classes="psui-ml-2 psui-text-blue-50 psui-cursor-pointer"
23
+ @click.native="$emit('column-group-helper', columnGroup.hasHelper.slug)"
24
+ />
25
+ </span>
17
26
  <i class="material-icons-round">drag_indicator</i>
18
27
  </div>
19
28
 
20
29
  <div class="psui-el-draggable-wrapper-list">
30
+
21
31
  <div
22
32
  v-for="(column, indexColumn) in columnGroup.columns"
23
33
  :key="`edit-columns-column-${indexColumnGroup}-${indexColumn}`"
@@ -31,7 +41,7 @@
31
41
  <div
32
42
  class="psui-w-full psui-flex psui-items-center"
33
43
  >
34
- <span class="psui-el-draggable-item-title">
44
+ <span class="psui-el-draggable-item-title psui-flex psui-items-center">
35
45
  <PsCheckboxSimple
36
46
  size="small"
37
47
  :label="column.title"
@@ -41,6 +51,13 @@
41
51
  class="psui-el-draggable-item-checkbox"
42
52
  @change="$emit('on-select-item', { studyKey: getColumns.key, indexColumnGroup, indexColumn, columnGroupKey: columnGroup.key })"
43
53
  />
54
+ <PsIcon
55
+ v-if="column.hasHelper.showOnEditHideColumns"
56
+ icon="info"
57
+ size="16"
58
+ icon-classes="psui-ml-2 psui-text-blue-50 psui-cursor-pointer"
59
+ @click.native="$emit('column-helper', column.hasHelper.slug)"
60
+ />
44
61
  </span>
45
62
  <span class="psui-el-draggable-item-append">
46
63
  <i class="psui-icon">drag_indicator</i>
@@ -86,6 +103,6 @@ export default {
86
103
  return false
87
104
  }
88
105
  },
89
- }
106
+ },
90
107
  }
91
108
  </script>
@@ -48,22 +48,29 @@ export default {
48
48
  /**
49
49
  * It sets the layout of the tooltip if needed. Usefull when using rich or dialog tooltip.
50
50
  */
51
- layout:{
52
- type: String,
51
+ layout: {
52
+ type: String,
53
53
  },
54
54
  /**
55
55
  * It sets a additional styling if needed.
56
56
  */
57
- cssClass:{
58
- type: String,
57
+ cssClass: {
58
+ type: String,
59
59
  },
60
60
  /**
61
61
  * It sets the vertical position.
62
62
  */
63
- position:{
63
+ position: {
64
64
  type: String,
65
65
  default: 'bottom',
66
- validator: (value)=> ['bottom','top'].includes(value)
66
+ validator: (value)=> ['bottom','top', 'custom'].includes(value)
67
+ },
68
+ /**
69
+ * It sets the custom positions.
70
+ */
71
+ customPosition: {
72
+ type: String,
73
+ default: '',
67
74
  }
68
75
  },
69
76
  inheritAttrs: true,
@@ -120,7 +127,7 @@ export default {
120
127
  dialog.style.left = `${windowWidth - rectDialog.width - 30}px`
121
128
  } else if ((rectTrigger.x - rectDialog.width) < 0) {
122
129
  dialog.style.left = `${rectTrigger.x + 10}px`
123
- } else if (rectDialog.width >= rectTrigger.width){
130
+ } else if (rectDialog.width >= rectTrigger.width && this.position != 'custom') {
124
131
  dialog.style.left = `${rectTrigger.x - ((rectDialog.width - rectTrigger.width)/2)}px`
125
132
  } else {
126
133
  dialog.style.left = `${rectTrigger.x + ((rectTrigger.width - rectDialog.width)/2)}px`
@@ -130,6 +137,12 @@ export default {
130
137
  dialog.style.top = `${rectTrigger.y - rectDialog.height - 10}px`
131
138
  }
132
139
 
140
+ if(this.position == 'custom') {
141
+ dialog.style = this.customPosition
142
+ dialog.style.display = 'block'
143
+ dialog.style.position = 'absolute'
144
+ }
145
+
133
146
  setTimeout(() => {
134
147
  dialog.style.opacity = 100
135
148
  }, 100)