@policystudio/policy-studio-ui-vue 1.1.83 → 1.1.85

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.83",
3
+ "version": "1.1.85",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -67,7 +67,8 @@
67
67
  class="actions-button psui-transition psui-transform psui-cursor-pointer"
68
68
  :icon-classes="item.is_disabled ? 'psui-text-gray-40' : getIconClasses(item)"
69
69
  display="flex"
70
- :class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90',
70
+ :class="[checkRowIsVisible(item) ? 'psui-rotate-0' : 'psui--rotate-90',
71
+ { 'psui--rotate-90': item.is_disabled },
71
72
  { 'psui-pointer-events-none psui--rotate-90' : item.items.length == 0}
72
73
  ]"
73
74
  @click.native="onCollapse(item, $event)"
@@ -519,15 +520,12 @@ export default {
519
520
  return !item.is_disabled && item.deep != 0 ? '#ECF7FB' : item.is_disabled && item.deep != 0 ? '#E6ECF2' : ''
520
521
  },
521
522
  setCollapsedRows() {
522
- if ( this.itemsHiddenIndexes ) {
523
- this.collapsedRows = [...this.itemsHiddenIndexes]
524
- return
525
- }
526
-
527
- const newRowsCollpased = []
528
- if ( this.showRowsCollapsed ) {
523
+ const newRowsCollpased = [...(this.itemsHiddenIndexes || [])]
524
+ if ( this.showRowsCollapsed || this.layout === 'flexible' ) {
529
525
  this.getRows.forEach(element => {
530
- if ( element?.items?.length && ( this.customLevelOpened == null || element.index.split('-').length > this.customLevelOpened)) {
526
+ const matchForAll = Boolean( element?.items?.length && ( this.customLevelOpened == null || element.index.split('-').length > this.customLevelOpened))
527
+ const matchForFlexibleLayout = Boolean(element.isCollapsed === true)
528
+ if (matchForAll || matchForFlexibleLayout) {
531
529
  newRowsCollpased.push(element.index)
532
530
  }
533
531
  })
@@ -573,8 +571,10 @@ export default {
573
571
  const index = this.collapsedRows.indexOf(item.index)
574
572
  if(index > -1) {
575
573
  this.collapsedRows.splice(index, 1)
574
+ delete item.isCollapsed
576
575
  } else {
577
576
  this.collapsedRows.push(item.index)
577
+ item.isCollapsed = true
578
578
  }
579
579
  this.$forceUpdate()
580
580
  this.$emit('collapse-row', this.collapsedRows, $event)