vue2-excel-grid 1.1.21 → 1.1.22

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": "vue2-excel-grid",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "Excel-style grid component for Vue 2.6.14 with virtual scrolling",
5
5
  "main": "dist/vue2-excel-grid.umd.js",
6
6
  "module": "dist/vue2-excel-grid.esm.js",
@@ -233,7 +233,7 @@
233
233
  </template>
234
234
  <template v-else>
235
235
  <slot :name="'cell-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" :isEditing="false" :done="null" :cancel="null">
236
- <slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</template><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" />
236
+ <slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</template><span v-if="hasSuffixSlot(col) && isSelectLikeCol(col)" class="eg-cell-select-caret-inline">▾</span><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" />
237
237
  </slot>
238
238
  </template>
239
239
  </div>
@@ -294,7 +294,7 @@
294
294
  </template>
295
295
  <template v-else>
296
296
  <slot :name="'cell-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" :isEditing="false" :done="null" :cancel="null">
297
- <slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</template><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" />
297
+ <slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</template><span v-if="hasSuffixSlot(col) && isSelectLikeCol(col)" class="eg-cell-select-caret-inline">▾</span><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" />
298
298
  </slot>
299
299
  </template>
300
300
  </div>
@@ -341,7 +341,7 @@
341
341
  </template>
342
342
  <template v-else>
343
343
  <slot :name="'cell-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" :isEditing="false" :done="null" :cancel="null">
344
- <slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(col._flatIndex, getCellValue(ri, col._flatIndex)) : getCellValue(ri, col._flatIndex) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(col._flatIndex, getCellValue(ri, col._flatIndex)) : getCellValue(ri, col._flatIndex) }}</template><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" />
344
+ <slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(col._flatIndex, getCellValue(ri, col._flatIndex)) : getCellValue(ri, col._flatIndex) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(col._flatIndex, getCellValue(ri, col._flatIndex)) : getCellValue(ri, col._flatIndex) }}</template><span v-if="hasSuffixSlot(col) && isSelectLikeCol(col)" class="eg-cell-select-caret-inline">▾</span><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" />
345
345
  </slot>
346
346
  </template>
347
347
  </div>
@@ -1523,7 +1523,8 @@ export default {
1523
1523
  'eg-cell-select': !!(col && this.isSelectLikeCol(col)),
1524
1524
  'eg-cell-checkbox': !!(col && col.type === 'checkbox'),
1525
1525
  'eg-cell-readonly': !this.isCellEditable(ri, ci),
1526
- 'eg-cell-invalid': !!(this.invalidCell && this.invalidCell.row === ri && this.invalidCell.col === ci)
1526
+ 'eg-cell-invalid': !!(this.invalidCell && this.invalidCell.row === ri && this.invalidCell.col === ci),
1527
+ 'eg-cell--has-suffix': !!(col && this.hasSuffixSlot(col))
1527
1528
  }
1528
1529
  },
1529
1530
 
@@ -3504,6 +3505,13 @@ export default {
3504
3505
  white-space: nowrap;
3505
3506
  min-width: 0;
3506
3507
  }
3508
+ .eg-cell--has-suffix.eg-cell-select::after { display: none; }
3509
+ .eg-cell-select-caret-inline {
3510
+ flex-shrink: 0;
3511
+ color: #aaa;
3512
+ font-size: 11px;
3513
+ margin-right: 2px;
3514
+ }
3507
3515
  .eg-cell-active {
3508
3516
  outline: 2px solid #1a73e8 !important;
3509
3517
  outline-offset: -2px;