vueless 0.0.467 → 0.0.468
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/constants.js +0 -1
- package/package.json +1 -1
- package/ui.data-table/UTable.vue +9 -0
- package/ui.data-table/UTableRow.vue +7 -2
- package/ui.data-table/config.js +1 -0
- package/web-types.json +19 -1
package/constants.js
CHANGED
package/package.json
CHANGED
package/ui.data-table/UTable.vue
CHANGED
|
@@ -177,6 +177,7 @@
|
|
|
177
177
|
:columns="columns"
|
|
178
178
|
:config="config"
|
|
179
179
|
:attrs="keysAttrs"
|
|
180
|
+
:empty-cell-label="emptyCellLabel"
|
|
180
181
|
@click="onClickRow"
|
|
181
182
|
@click-cell="onClickCell"
|
|
182
183
|
@toggle-row-visibility="onToggleRowVisibility"
|
|
@@ -320,6 +321,14 @@ const props = defineProps({
|
|
|
320
321
|
required: true,
|
|
321
322
|
},
|
|
322
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Label to display for empty cell values.
|
|
326
|
+
*/
|
|
327
|
+
emptyCellLabel: {
|
|
328
|
+
type: String,
|
|
329
|
+
default: getDefault(defaultConfig, UTable).emptyCellLabel,
|
|
330
|
+
},
|
|
331
|
+
|
|
323
332
|
/**
|
|
324
333
|
* Show date divider line between dates.
|
|
325
334
|
*/
|
|
@@ -157,7 +157,7 @@ import { computed, onMounted, useSlots, useTemplateRef } from "vue";
|
|
|
157
157
|
import { cx } from "../utils/utilUI.js";
|
|
158
158
|
import useUI from "../composables/useUI.js";
|
|
159
159
|
|
|
160
|
-
import {
|
|
160
|
+
import { PX_IN_REM } from "../constants.js";
|
|
161
161
|
import { getFilteredRow } from "./utilTable.js";
|
|
162
162
|
|
|
163
163
|
import { useMutationObserver } from "../composables/useMutationObserver.js";
|
|
@@ -178,6 +178,11 @@ const props = defineProps({
|
|
|
178
178
|
required: true,
|
|
179
179
|
},
|
|
180
180
|
|
|
181
|
+
emptyCellLabel: {
|
|
182
|
+
type: String,
|
|
183
|
+
required: true,
|
|
184
|
+
},
|
|
185
|
+
|
|
181
186
|
tag: {
|
|
182
187
|
type: String,
|
|
183
188
|
default: "tr",
|
|
@@ -311,7 +316,7 @@ function isEmptyValue(value) {
|
|
|
311
316
|
function formatCellValue(value) {
|
|
312
317
|
const nestedValue = value && typeof value === "object" && "value" in value ? value.value : value;
|
|
313
318
|
|
|
314
|
-
return isEmptyValue(nestedValue) ?
|
|
319
|
+
return isEmptyValue(nestedValue) ? props.emptyCellLabel : nestedValue;
|
|
315
320
|
}
|
|
316
321
|
|
|
317
322
|
function getNestedShift() {
|
package/ui.data-table/config.js
CHANGED
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.468",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -8554,6 +8554,15 @@
|
|
|
8554
8554
|
"type": "array"
|
|
8555
8555
|
}
|
|
8556
8556
|
},
|
|
8557
|
+
{
|
|
8558
|
+
"name": "emptyCellLabel",
|
|
8559
|
+
"description": "Label to display for empty cell values.",
|
|
8560
|
+
"value": {
|
|
8561
|
+
"kind": "expression",
|
|
8562
|
+
"type": "string"
|
|
8563
|
+
},
|
|
8564
|
+
"default": "—"
|
|
8565
|
+
},
|
|
8557
8566
|
{
|
|
8558
8567
|
"name": "dateDivider",
|
|
8559
8568
|
"description": "Show date divider line between dates.",
|
|
@@ -8817,6 +8826,15 @@
|
|
|
8817
8826
|
"type": "array"
|
|
8818
8827
|
}
|
|
8819
8828
|
},
|
|
8829
|
+
{
|
|
8830
|
+
"name": "emptyCellLabel",
|
|
8831
|
+
"required": true,
|
|
8832
|
+
"value": {
|
|
8833
|
+
"kind": "expression",
|
|
8834
|
+
"type": "string"
|
|
8835
|
+
},
|
|
8836
|
+
"default": "—"
|
|
8837
|
+
},
|
|
8820
8838
|
{
|
|
8821
8839
|
"name": "tag",
|
|
8822
8840
|
"value": {
|