vueless 0.0.466 → 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 CHANGED
@@ -68,5 +68,4 @@ export const SYSTEM_CONFIG_KEY = {
68
68
 
69
69
  /* Other */
70
70
  export const PX_IN_REM = 16;
71
- export const HYPHEN_SYMBOL = "-";
72
71
  export const NESTED_COMPONENT_REG_EXP = /\{U[^}]*}/g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.466",
3
+ "version": "0.0.468",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -75,11 +75,7 @@
75
75
  </div>
76
76
  </template>
77
77
 
78
- <ULoaderProgress
79
- v-if="resource && isHeaderSticky"
80
- :resources="resource"
81
- v-bind="stickyHeaderLoaderAttrs"
82
- />
78
+ <ULoaderProgress v-if="isHeaderSticky" :loading="loading" v-bind="stickyHeaderLoaderAttrs" />
83
79
  </div>
84
80
 
85
81
  <div ref="table-wrapper" v-bind="tableWrapperAttrs">
@@ -148,7 +144,7 @@
148
144
  </th>
149
145
  </tr>
150
146
 
151
- <ULoaderProgress v-if="resource" :resources="resource" v-bind="headerLoaderAttrs" />
147
+ <ULoaderProgress :loading="loading" v-bind="headerLoaderAttrs" />
152
148
  </thead>
153
149
 
154
150
  <tbody v-if="tableRows.length" v-bind="bodyAttrs">
@@ -181,6 +177,7 @@
181
177
  :columns="columns"
182
178
  :config="config"
183
179
  :attrs="keysAttrs"
180
+ :empty-cell-label="emptyCellLabel"
184
181
  @click="onClickRow"
185
182
  @click-cell="onClickCell"
186
183
  @toggle-row-visibility="onToggleRowVisibility"
@@ -324,6 +321,14 @@ const props = defineProps({
324
321
  required: true,
325
322
  },
326
323
 
324
+ /**
325
+ * Label to display for empty cell values.
326
+ */
327
+ emptyCellLabel: {
328
+ type: String,
329
+ default: getDefault(defaultConfig, UTable).emptyCellLabel,
330
+ },
331
+
327
332
  /**
328
333
  * Show date divider line between dates.
329
334
  */
@@ -365,11 +370,11 @@ const props = defineProps({
365
370
  },
366
371
 
367
372
  /**
368
- * Set loader resource name to activate table progress loader exact for that resource (deprecated).
373
+ * Set table loader state.
369
374
  */
370
- resource: {
371
- type: String,
372
- default: "",
375
+ loading: {
376
+ type: Boolean,
377
+ default: getDefault(defaultConfig, UTable).loading,
373
378
  },
374
379
 
375
380
  /**
@@ -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 { HYPHEN_SYMBOL, PX_IN_REM } from "../constants.js";
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) ? HYPHEN_SYMBOL : nestedValue;
319
+ return isEmptyValue(nestedValue) ? props.emptyCellLabel : nestedValue;
315
320
  }
316
321
 
317
322
  function getNestedShift() {
@@ -92,12 +92,14 @@ export default /*tw*/ {
92
92
  noData: "There is no data in the table.",
93
93
  },
94
94
  defaults: {
95
+ emptyCellLabel: "—",
95
96
  nesting: false,
96
97
  compact: false,
97
98
  selectable: false,
98
99
  dateDivider: false,
99
100
  stickyHeader: false,
100
101
  stickyFooter: false,
102
+ loading: false,
101
103
  /* icons */
102
104
  expandIcon: "add",
103
105
  collapseIcon: "remove",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.466",
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.",
@@ -8600,13 +8609,13 @@
8600
8609
  "default": "false"
8601
8610
  },
8602
8611
  {
8603
- "name": "resource",
8604
- "description": "Set loader resource name to activate table progress loader exact for that resource (deprecated).",
8612
+ "name": "loading",
8613
+ "description": "Set table loader state.",
8605
8614
  "value": {
8606
8615
  "kind": "expression",
8607
- "type": "string"
8616
+ "type": "boolean"
8608
8617
  },
8609
- "default": "\"\""
8618
+ "default": "false"
8610
8619
  },
8611
8620
  {
8612
8621
  "name": "config",
@@ -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": {