@policystudio/policy-studio-ui-vue 1.1.67 → 1.1.69

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.1.67",
3
+ "version": "1.1.69",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -462,7 +462,7 @@
462
462
  &.removed-class {
463
463
  td {
464
464
  @apply psui-bg-gray-10 psui-text-gray-40 !important;
465
-
465
+
466
466
  div:first-child {
467
467
  margin-left: 4px;
468
468
  }
@@ -480,10 +480,10 @@
480
480
  width: 16px;
481
481
  height: calc(100% + 1px);
482
482
  }
483
-
484
- }
485
483
 
486
- }
484
+ }
485
+ }
486
+
487
487
  }
488
488
 
489
489
  td {
@@ -41,12 +41,13 @@
41
41
  >
42
42
 
43
43
  <div class="psui-flex psui-relative">
44
- <PsTooltip
45
- :ignore-dialog="!item.is_excluded"
46
- position="top"
44
+ <div
45
+ v-tooltip="{
46
+ classes:'layout-gray-50',
47
+ content: item.remove_add_tooltip
48
+ }"
47
49
  >
48
- <template v-slot:trigger>
49
- <PsIcon
50
+ <PsIcon
50
51
  v-if="item.remove_add_button"
51
52
  :icon="item.remove_add_button_icon"
52
53
  class="psui-flex psui-text-gray-40 pl-8 psui-cursor-pointer leading-none hover:psui-text-blue-60 transition-all"
@@ -54,11 +55,7 @@
54
55
  display="flex"
55
56
  @click.native="$emit('removeOrAddButtonChange',item)"
56
57
  />
57
- </template>
58
- <template v-slot:content>
59
- Restore this measure
60
- </template>
61
- </PsTooltip>
58
+ </div>
62
59
  <div
63
60
  class="psui-flex psui-items-center actions psui-space-x-3"
64
61
  :style="{paddingLeft: `${item.deep * 16}px`}"
@@ -80,10 +77,7 @@
80
77
  v-if="item.is_disabled || item.tooltip_text"
81
78
  class="psui-inline-flex psui-cursor-default sticky"
82
79
  :class="{ 'is-last-deep' : item.last_deep }"
83
- v-tooltip="{
84
- content: getTooltipContent(item),
85
- classes : 'layout-gray'
86
- }"
80
+ v-tooltip="getTooltipContent(item)"
87
81
  >
88
82
  <div class="flex psui-items-center psui-relative ">
89
83
  <PsIcon v-if="item.has_blocked_icon" icon="do_disturb_alt" size="14" icon-classes="psui-absolute psui--left-1 psui-text-gray-50"/>
@@ -263,31 +257,34 @@
263
257
  <PsProgressBar
264
258
  v-if="column.isChart && formatFunction && item.data[column.key] != null"
265
259
  :value="formatFunction(column.key, item.data[column.key], item.data) == '--' ? 0 : item.data[column.key]"
266
- :force-break-even="item.is_disabled || formatFunction(column.key, item.data[column.key], item.data) === '--' ? true : false"
260
+ :force-break-even="formatFunction(column.key, item.data[column.key], item.data) === '--' ? true : false"
267
261
  />
268
262
 
269
263
  <PsProgressBar
270
264
  v-else-if="column.isChart && item.data[column.key] != null"
271
265
  :value="item.data[column.key] == '--' ? 0 : item.data[column.key]"
272
- :force-break-even="item.is_disabled || item.data[column.key] === '--' ? true : false"
266
+ :force-break-even="item.data[column.key] === '--' ? true : false"
273
267
  />
274
268
 
275
269
  <div
276
- v-if="column.isSwitch && item.data[column.key] != null"
270
+ v-if="column.isSwitch && item.data[column.key] != null"
271
+ class="psui-inline-flex"
277
272
  v-tooltip="{
278
- content: !item.data.is_disabled || item.is_excluded ? false : item.tooltip_text,
273
+ content: !item.data.is_disabled || item.is_excluded ? false : `<p class='psui-text-white psui-text-xsmall psui-font-bold'>${item.tooltip_text}</p>`,
279
274
  classes: 'layout-blue'
280
275
  }"
281
276
  >
282
- <PsSwitch
283
- :disabled="item.data.is_disabled"
284
- :value="item.data[column.key]"
285
- :background-color="switchButtonBackgroundColor"
286
- class="psui-justify-self-center"
287
- :class="{'psui-pointer-events-none':preventClickOnSwitchButtons}"
288
- size="small"
289
- @change="$emit('switchButtonItemChanged', item)"
290
- />
277
+ <div class="flex psui-items-center psui-relative">
278
+ <PsSwitch
279
+ :disabled="item.data.is_disabled"
280
+ :value="item.data[column.key]"
281
+ :background-color="switchButtonBackgroundColor"
282
+ class="psui-justify-self-center"
283
+ :class="{'psui-pointer-events-none':preventClickOnSwitchButtons}"
284
+ size="small"
285
+ @change="$emit('switchButtonItemChanged', item)"
286
+ />
287
+ </div>
291
288
  </div>
292
289
  </div>
293
290
 
@@ -639,11 +636,19 @@ export default {
639
636
  return value || '#ffffff'
640
637
  },
641
638
  getTooltipContent(item) {
642
- let content = ''
643
- if (item.tooltip_text) {
644
- content = `<p class="psui-font-bold psui-text-gray-80 psui-text-xsmall">${item.tooltip_text}</p>`
639
+ let content = {
640
+ classes:'layout-gray',
641
+ content:''
642
+ }
643
+
644
+ if(item.tooltip_text && this.layout == 'flexible') {
645
+ content.classes = 'layout-blue'
646
+ content.content = item.tooltip_text
647
+ }
648
+ else if (item.tooltip_text) {
649
+ content.content = `<p class="psui-font-bold psui-text-gray-80 psui-text-xsmall">${item.tooltip_text}</p>`
645
650
  } else if (item.is_disabled) {
646
- content = `<p class="psui-font-bold psui-text-gray-80 psui-text-xsmall">${item.title} buildings are <br>not allowed.</p>`
651
+ content.content = `<p class="psui-font-bold psui-text-gray-80 psui-text-xsmall">${item.title} buildings are <br>not allowed.</p>`
647
652
  }
648
653
  return content
649
654
  },