@policystudio/policy-studio-ui-vue 1.1.22 → 1.1.24

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.22",
3
+ "version": "1.1.24",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -44,7 +44,9 @@
44
44
  class="actions-button psui-transition psui-transform psui-cursor-pointer"
45
45
  :icon-classes="item.is_disabled ? 'psui-text-gray-40' : getIconClasses(item)"
46
46
  display="flex"
47
- :class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90', { 'psui-pointer-events-none' : item.is_disabled }]"
47
+ :class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90',
48
+ { 'psui-pointer-events-none psui--rotate-90' : item.items.length == 0}
49
+ ]"
48
50
  @click.native="onCollapse(item)"
49
51
  />
50
52
 
@@ -57,7 +59,7 @@
57
59
  >
58
60
  <template v-slot:trigger>
59
61
  <div class="flex psui-items-center psui-relative ">
60
- <PsIcon v-if="item.is_disabled" icon="do_disturb_alt" size="14" icon-classes="psui-absolute psui--left-1 psui-text-gray-50"/>
62
+ <PsIcon v-if="item.has_blocked_icon" icon="do_disturb_alt" size="14" icon-classes="psui-absolute psui--left-1 psui-text-gray-50"/>
61
63
  <p class="title psui-text-gray-50 opacity-100-childrens-on-hover">
62
64
 
63
65
  {{ item.title }}
@@ -74,17 +76,11 @@
74
76
  </div>
75
77
  </template>
76
78
  <template v-slot:content>
77
- <p
78
- v-if="item.tooltip_text || item.is_disabled"
79
- class="psui-font-bold psui-text-gray-80 psui-text-xsmall"
80
- >
81
- {{ item.tooltip_text }}
82
- </p>
83
79
  <p
84
- v-else-if="item.is_disabled"
80
+ v-if="item.tooltip_text || item.is_disabled"
85
81
  class="psui-font-bold psui-text-gray-80 psui-text-xsmall"
86
82
  >
87
- {{ item.title }} buildings are <br>not allowed.
83
+ {{ item.is_disabled ? item.title + ' buildings are not allowed.' : item.tooltip_text }}
88
84
  </p>
89
85
  </template>
90
86
  </PsRichTooltip>
@@ -148,6 +144,7 @@
148
144
  </PsRichTooltip>
149
145
 
150
146
  <PsDropdown
147
+ ref="PSDropdown"
151
148
  v-if="shouldShowDropdown(item)"
152
149
  :class="[isHoveringRow === index ? 'opacity-1' : 'opacity-0']"
153
150
  position="custom"
@@ -488,6 +485,8 @@ export default {
488
485
  }
489
486
  },
490
487
  checkRowIsVisible(item) {
488
+ console.log('item',item.index)
489
+ console.log('this.collapsedRows',this.collapsedRows)
491
490
  return this.collapsedRows.indexOf(item.index) < 0
492
491
  },
493
492
  checkRowIsCollapsed(item) {
@@ -531,6 +530,11 @@ export default {
531
530
  executeCallback(item, action) {
532
531
  if(item?.actions?.length === 1) item.actions[0].callback(item)
533
532
  else action?.callback(item)
533
+
534
+ Object.values(this.$refs).flat(Infinity).forEach(( component => {
535
+ if(component?.$options?._componentTag == 'PsDropdown'){
536
+ component.close()
537
+ }}))
534
538
  },
535
539
  getStatusClass(item) {
536
540
  return this.checkRowIsVisible(item) ? 'opened' : 'closed'