@onereach/ui-components-vue2 20.3.1 → 20.4.0
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.
|
@@ -488,13 +488,17 @@ var script$c = defineComponent({
|
|
|
488
488
|
selected: {
|
|
489
489
|
type: Boolean,
|
|
490
490
|
default: false
|
|
491
|
+
},
|
|
492
|
+
interactive: {
|
|
493
|
+
type: Boolean,
|
|
494
|
+
default: false
|
|
491
495
|
}
|
|
492
496
|
},
|
|
493
497
|
expose: ['root'],
|
|
494
498
|
setup(props) {
|
|
495
499
|
// Refs & Styles
|
|
496
500
|
const root = ref();
|
|
497
|
-
const rootStyles = computed(() => ['or-data-grid-table-content-row-v3', ...DataGridTableContentRow, ...DataGridTableContentRowVariants[props.variant]]);
|
|
501
|
+
const rootStyles = computed(() => ['or-data-grid-table-content-row-v3', ...DataGridTableContentRow, ...DataGridTableContentRowVariants[props.variant], ...(props.interactive ? ['cursor-pointer'] : [])]);
|
|
498
502
|
return {
|
|
499
503
|
root,
|
|
500
504
|
rootStyles
|
|
@@ -1442,9 +1446,13 @@ var script = defineComponent({
|
|
|
1442
1446
|
notification: {
|
|
1443
1447
|
type: Object,
|
|
1444
1448
|
default: undefined
|
|
1449
|
+
},
|
|
1450
|
+
interactiveRows: {
|
|
1451
|
+
type: Boolean,
|
|
1452
|
+
default: false
|
|
1445
1453
|
}
|
|
1446
1454
|
},
|
|
1447
|
-
emits: ['update:modelValue', 'update:item', 'close-notification'],
|
|
1455
|
+
emits: ['update:modelValue', 'update:item', 'close-notification', 'hover:row', 'blur:row', 'hover:cell', 'blur:cell', 'click:row'],
|
|
1448
1456
|
expose: ['root'],
|
|
1449
1457
|
setup(props, context) {
|
|
1450
1458
|
// Refs & Styles
|
|
@@ -1582,6 +1590,38 @@ var script = defineComponent({
|
|
|
1582
1590
|
break;
|
|
1583
1591
|
}
|
|
1584
1592
|
}
|
|
1593
|
+
function handleMouseEnterRow(item) {
|
|
1594
|
+
if (!props.interactiveRows) return;
|
|
1595
|
+
context.emit('hover:row', item);
|
|
1596
|
+
}
|
|
1597
|
+
function handleMouseLeaveRow(item) {
|
|
1598
|
+
if (!props.interactiveRows) return;
|
|
1599
|
+
context.emit('blur:row', item);
|
|
1600
|
+
}
|
|
1601
|
+
function handleMouseEnterCell(item, columnName, value) {
|
|
1602
|
+
if (!props.interactiveRows) return;
|
|
1603
|
+
context.emit('hover:cell', {
|
|
1604
|
+
item,
|
|
1605
|
+
columnName,
|
|
1606
|
+
value
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1609
|
+
function handleMouseLeaveCell(item, columnName, value) {
|
|
1610
|
+
if (!props.interactiveRows) return;
|
|
1611
|
+
context.emit('blur:cell', {
|
|
1612
|
+
item,
|
|
1613
|
+
columnName,
|
|
1614
|
+
value
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
function handleRowClick(item) {
|
|
1618
|
+
if (!props.interactiveRows) return;
|
|
1619
|
+
context.emit('click:row', item);
|
|
1620
|
+
}
|
|
1621
|
+
// function handleCellClick(item: DataGridItem<T>, columnName: string, value: any): void {
|
|
1622
|
+
// if (!props.interactiveRows) return;
|
|
1623
|
+
// context.emit('click:cell', { item, columnName, value });
|
|
1624
|
+
// }
|
|
1585
1625
|
function removeScrollOffset(header) {
|
|
1586
1626
|
scrollOffsetStart.value.delete(header);
|
|
1587
1627
|
scrollOffsetStart.value = new Map(scrollOffsetStart.value);
|
|
@@ -1601,6 +1641,11 @@ var script = defineComponent({
|
|
|
1601
1641
|
selectingIndicator,
|
|
1602
1642
|
showSelectingCouter,
|
|
1603
1643
|
selectingDisabled,
|
|
1644
|
+
handleMouseEnterRow,
|
|
1645
|
+
handleMouseLeaveRow,
|
|
1646
|
+
handleMouseEnterCell,
|
|
1647
|
+
handleMouseLeaveCell,
|
|
1648
|
+
handleRowClick,
|
|
1604
1649
|
selectingModel,
|
|
1605
1650
|
filteringModel,
|
|
1606
1651
|
searchingModel,
|
|
@@ -1731,7 +1776,8 @@ var __vue_render__ = function () {
|
|
|
1731
1776
|
return _c('OrDataGridTableContentRow', {
|
|
1732
1777
|
key: n,
|
|
1733
1778
|
attrs: {
|
|
1734
|
-
"variant": _vm.variant
|
|
1779
|
+
"variant": _vm.variant,
|
|
1780
|
+
"interactive": _vm.interactiveRows
|
|
1735
1781
|
}
|
|
1736
1782
|
}, [_vm.features.selecting ? [_c('OrDataGridTableContentCell', {
|
|
1737
1783
|
attrs: {
|
|
@@ -1755,7 +1801,19 @@ var __vue_render__ = function () {
|
|
|
1755
1801
|
key: item.id,
|
|
1756
1802
|
attrs: {
|
|
1757
1803
|
"variant": _vm.variant,
|
|
1758
|
-
"selected": _vm.selectingModel.includes(item.id)
|
|
1804
|
+
"selected": _vm.selectingModel.includes(item.id),
|
|
1805
|
+
"interactive": _vm.interactiveRows
|
|
1806
|
+
},
|
|
1807
|
+
on: {
|
|
1808
|
+
"mouseenter": function () {
|
|
1809
|
+
return _vm.handleMouseEnterRow(item);
|
|
1810
|
+
},
|
|
1811
|
+
"mouseleave": function () {
|
|
1812
|
+
return _vm.handleMouseLeaveRow(item);
|
|
1813
|
+
},
|
|
1814
|
+
"click": function () {
|
|
1815
|
+
return _vm.handleRowClick(item);
|
|
1816
|
+
}
|
|
1759
1817
|
}
|
|
1760
1818
|
}, [_vm.features.selecting ? [_c('OrDataGridTableContentCell', {
|
|
1761
1819
|
staticClass: "!py-xs !px-xs md:!py-none md:!px-sm+",
|
|
@@ -1764,6 +1822,14 @@ var __vue_render__ = function () {
|
|
|
1764
1822
|
stickiness: 'start'
|
|
1765
1823
|
},
|
|
1766
1824
|
"force-state": 'none'
|
|
1825
|
+
},
|
|
1826
|
+
on: {
|
|
1827
|
+
"mouseenter": function () {
|
|
1828
|
+
return _vm.handleMouseEnterCell(item, 'selecting', _vm.selectingModel.includes(item.id));
|
|
1829
|
+
},
|
|
1830
|
+
"mouseleave": function () {
|
|
1831
|
+
return _vm.handleMouseLeaveCell(item, 'selecting', _vm.selectingModel.includes(item.id));
|
|
1832
|
+
}
|
|
1767
1833
|
}
|
|
1768
1834
|
}, [_c('OrCheckbox', {
|
|
1769
1835
|
attrs: {
|
|
@@ -1792,6 +1858,12 @@ var __vue_render__ = function () {
|
|
|
1792
1858
|
},
|
|
1793
1859
|
"focusin": function ($event) {
|
|
1794
1860
|
return _vm.scrollTo($event);
|
|
1861
|
+
},
|
|
1862
|
+
"mouseenter": function () {
|
|
1863
|
+
return _vm.handleMouseEnterCell(item, column.name, item[column.name]);
|
|
1864
|
+
},
|
|
1865
|
+
"mouseleave": function () {
|
|
1866
|
+
return _vm.handleMouseLeaveCell(item, column.name, item[column.name]);
|
|
1795
1867
|
}
|
|
1796
1868
|
}
|
|
1797
1869
|
}, [_vm._t(column.name, function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-vue2",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.4.0",
|
|
4
4
|
"description": "Vue components library for v2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@codemirror/view": "^6",
|
|
40
40
|
"@floating-ui/dom": "1.5.3",
|
|
41
41
|
"@lezer/highlight": "*",
|
|
42
|
-
"@onereach/styles": "^20.
|
|
43
|
-
"@onereach/ui-components-common": "^20.
|
|
42
|
+
"@onereach/styles": "^20.4.0",
|
|
43
|
+
"@onereach/ui-components-common": "^20.4.0",
|
|
44
44
|
"@splidejs/splide": "4.0.6",
|
|
45
45
|
"@tiptap/core": "2.0.3",
|
|
46
46
|
"@tiptap/extension-blockquote": "2.0.3",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"access": "public"
|
|
105
105
|
},
|
|
106
106
|
"npmUnpacked": "4.15.2",
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "4739e1eb32ed19459b84bf21e1c5b7bfe548332e"
|
|
108
108
|
}
|