vueless 0.0.434 → 0.0.435

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": "vueless",
3
- "version": "0.0.434",
3
+ "version": "0.0.435",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -184,6 +184,7 @@
184
184
  v-bind="getRowAttrs(row.id)"
185
185
  :class="cx([getRowAttrs(row.id).class, getRowClasses(row)])"
186
186
  @click="onClickRow"
187
+ @click-cell="onClickCell"
187
188
  @toggle-row-visibility="onToggleRowVisibility"
188
189
  >
189
190
  <template
@@ -396,6 +397,12 @@ const emit = defineEmits([
396
397
  */
397
398
  "clickRow",
398
399
 
400
+ /**
401
+ * Triggers when the cell is clicked.
402
+ * @property {object} cell
403
+ */
404
+ "clickCell",
405
+
399
406
  /**
400
407
  * Triggers when table rows are selected (updated).
401
408
  * @property {array} tableRows
@@ -687,6 +694,10 @@ function onClickRow(row) {
687
694
  emit("clickRow", row);
688
695
  }
689
696
 
697
+ function onClickCell(cell, row) {
698
+ emit("clickCell", cell, row);
699
+ }
700
+
690
701
  function onChangeSelectAll(selectAll) {
691
702
  if (selectAll && canSelectAll.value) {
692
703
  selectedRows.value = getFlatRows(tableRows.value).map((row) => row.id);
@@ -20,6 +20,7 @@
20
20
  :key="index"
21
21
  v-bind="bodyCellBaseAttrs"
22
22
  :class="cx([columns[index].tdClass, getCellClasses(row, key)])"
23
+ @click="onClickCell(value, row)"
23
24
  >
24
25
  <div
25
26
  v-if="(row.row || nestedLevel || row.nestedData) && index === 0"
@@ -114,6 +115,7 @@
114
115
  :selectable="selectable"
115
116
  @toggle-row-visibility="onClickToggleRowChild"
116
117
  @click="onClick"
118
+ @click-cell="onClickCell"
117
119
  >
118
120
  <template
119
121
  v-for="(value, key, index) in getFilteredRow(nestedRow, columns)"
@@ -189,7 +191,7 @@ const props = defineProps({
189
191
  },
190
192
  });
191
193
 
192
- const emit = defineEmits(["toggleRowVisibility", "click"]);
194
+ const emit = defineEmits(["toggleRowVisibility", "click", "click-cell"]);
193
195
 
194
196
  const selectedRows = defineModel("selectedRows", { type: Array, default: () => [] });
195
197
 
@@ -294,4 +296,8 @@ function onClickToggleIcon() {
294
296
 
295
297
  props.row.row.forEach(({ id }) => onClickToggleRowChild(id));
296
298
  }
299
+
300
+ function onClickCell(cell, row) {
301
+ emit("click-cell", cell, row);
302
+ }
297
303
  </script>
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.434",
4
+ "version": "0.0.435",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -8401,6 +8401,18 @@
8401
8401
  }
8402
8402
  ]
8403
8403
  },
8404
+ {
8405
+ "name": "clickCell",
8406
+ "description": "Triggers when the cell is clicked.",
8407
+ "properties": [
8408
+ {
8409
+ "type": [
8410
+ "object"
8411
+ ],
8412
+ "name": "cell"
8413
+ }
8414
+ ]
8415
+ },
8404
8416
  {
8405
8417
  "name": "update:rows",
8406
8418
  "description": "Triggers when table rows are selected (updated).",
@@ -8615,6 +8627,9 @@
8615
8627
  },
8616
8628
  {
8617
8629
  "name": "click"
8630
+ },
8631
+ {
8632
+ "name": "click-cell"
8618
8633
  }
8619
8634
  ],
8620
8635
  "slots": [