vueless 0.0.182 → 0.0.184
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 +1 -1
- package/ui.data-list/configs/default.config.js +1 -0
- package/ui.data-list/index.vue +18 -10
- package/ui.dropdown-badge/configs/default.config.js +2 -0
- package/ui.dropdown-badge/index.vue +2 -2
- package/ui.dropdown-button/configs/default.config.js +2 -0
- package/ui.dropdown-button/index.vue +2 -2
- package/ui.dropdown-link/configs/default.config.js +2 -0
- package/ui.dropdown-link/index.vue +3 -2
- package/ui.dropdown-list/configs/default.config.js +2 -0
- package/ui.dropdown-list/index.vue +2 -2
- package/ui.form-input-file/configs/default.config.js +2 -2
- package/ui.form-select/index.vue +5 -5
- package/web-types.json +18 -9
package/package.json
CHANGED
package/ui.data-list/index.vue
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<draggable
|
|
13
13
|
v-else
|
|
14
14
|
:list="list"
|
|
15
|
-
item-key="
|
|
15
|
+
:item-key="valueKey"
|
|
16
16
|
:group="{ name: group }"
|
|
17
17
|
handle=".icon-drag"
|
|
18
18
|
:ghost-class="config.draggableGhost"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
@end="onDragEnd"
|
|
24
24
|
>
|
|
25
25
|
<template #item="{ element }">
|
|
26
|
-
<div :id="element
|
|
27
|
-
<div :data-cy="`${dataCy}-item-${element
|
|
26
|
+
<div :id="element[valueKey]" :data-cy="`${dataCy}-item`" v-bind="itemWrapperAttrs">
|
|
27
|
+
<div :data-cy="`${dataCy}-item-${element[valueKey]}`" v-bind="itemAttrs">
|
|
28
28
|
<UIcon internal :name="config.dragIconName" color="gray" v-bind="dragIconAttrs" />
|
|
29
29
|
|
|
30
30
|
<div v-bind="labelAttrs(element.isActive)">
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
:data-cy="`${dataCy}-delete`"
|
|
53
53
|
:tooltip="currentLocale.delete"
|
|
54
54
|
v-bind="deleteIconAttrs"
|
|
55
|
-
@click="onClickDelete(element
|
|
55
|
+
@click="onClickDelete(element[valueKey], element[labelKey])"
|
|
56
56
|
/>
|
|
57
57
|
|
|
58
58
|
<UIcon
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
:data-cy="`${dataCy}-edit`"
|
|
65
65
|
:tooltip="currentLocale.edit"
|
|
66
66
|
v-bind="editIconAttrs"
|
|
67
|
-
@click="onClickEdit(element
|
|
67
|
+
@click="onClickEdit(element[valueKey], element[labelKey])"
|
|
68
68
|
/>
|
|
69
69
|
</template>
|
|
70
70
|
</div>
|
|
@@ -141,6 +141,14 @@ const props = defineProps({
|
|
|
141
141
|
default: UIService.get(defaultConfig, UDataListName).default.labelKey,
|
|
142
142
|
},
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Value key in the item object of options.
|
|
146
|
+
*/
|
|
147
|
+
valueKey: {
|
|
148
|
+
type: String,
|
|
149
|
+
default: UIService.get(defaultConfig, UDataListName).default.valueKey,
|
|
150
|
+
},
|
|
151
|
+
|
|
144
152
|
/**
|
|
145
153
|
* Empty state title.
|
|
146
154
|
*/
|
|
@@ -245,12 +253,12 @@ function onDragEnd() {
|
|
|
245
253
|
emit("dragSort", sortData);
|
|
246
254
|
}
|
|
247
255
|
|
|
248
|
-
function onClickEdit(
|
|
249
|
-
emit("clickEdit",
|
|
256
|
+
function onClickEdit(value, label) {
|
|
257
|
+
emit("clickEdit", value, label);
|
|
250
258
|
}
|
|
251
259
|
|
|
252
|
-
function onClickDelete(
|
|
253
|
-
emit("clickDelete",
|
|
260
|
+
function onClickDelete(value, label) {
|
|
261
|
+
emit("clickDelete", value, label);
|
|
254
262
|
}
|
|
255
263
|
|
|
256
264
|
function prepareSortData(list, parentId) {
|
|
@@ -260,7 +268,7 @@ function prepareSortData(list, parentId) {
|
|
|
260
268
|
let hasItemChildren = item?.children?.length;
|
|
261
269
|
|
|
262
270
|
if (hasItemChildren) {
|
|
263
|
-
let childrenItem = prepareSortData(item.children, item.
|
|
271
|
+
let childrenItem = prepareSortData(item.children, item[props.valueKey]);
|
|
264
272
|
|
|
265
273
|
childrenItem.forEach((item) => {
|
|
266
274
|
sortData.push(item);
|
|
@@ -132,7 +132,7 @@ const props = defineProps({
|
|
|
132
132
|
*/
|
|
133
133
|
labelKey: {
|
|
134
134
|
type: String,
|
|
135
|
-
default:
|
|
135
|
+
default: UIService.get(defaultConfig, UDropdownBadge).default.labelKey,
|
|
136
136
|
},
|
|
137
137
|
|
|
138
138
|
/**
|
|
@@ -140,7 +140,7 @@ const props = defineProps({
|
|
|
140
140
|
*/
|
|
141
141
|
valueKey: {
|
|
142
142
|
type: String,
|
|
143
|
-
default:
|
|
143
|
+
default: UIService.get(defaultConfig, UDropdownBadge).default.valueKey,
|
|
144
144
|
},
|
|
145
145
|
|
|
146
146
|
/**
|
|
@@ -167,7 +167,7 @@ const props = defineProps({
|
|
|
167
167
|
*/
|
|
168
168
|
labelKey: {
|
|
169
169
|
type: String,
|
|
170
|
-
default:
|
|
170
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.labelKey,
|
|
171
171
|
},
|
|
172
172
|
|
|
173
173
|
/**
|
|
@@ -175,7 +175,7 @@ const props = defineProps({
|
|
|
175
175
|
*/
|
|
176
176
|
valueKey: {
|
|
177
177
|
type: String,
|
|
178
|
-
default:
|
|
178
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.valueKey,
|
|
179
179
|
},
|
|
180
180
|
|
|
181
181
|
/**
|
|
@@ -68,6 +68,7 @@ import vClickOutside from "../directive.clickOutside";
|
|
|
68
68
|
import { UDropdownLink } from "./constants";
|
|
69
69
|
import defaultConfig from "./configs/default.config";
|
|
70
70
|
import { useAttrs } from "./composables/attrs.composable";
|
|
71
|
+
import { UDropdownButton } from "../ui.dropdown-button/constants/index.js";
|
|
71
72
|
|
|
72
73
|
/* Should be a string for correct web-types gen */
|
|
73
74
|
defineOptions({ name: "UDropdownLink", inheritAttrs: false });
|
|
@@ -152,7 +153,7 @@ const props = defineProps({
|
|
|
152
153
|
*/
|
|
153
154
|
labelKey: {
|
|
154
155
|
type: String,
|
|
155
|
-
default:
|
|
156
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.labelKey,
|
|
156
157
|
},
|
|
157
158
|
|
|
158
159
|
/**
|
|
@@ -160,7 +161,7 @@ const props = defineProps({
|
|
|
160
161
|
*/
|
|
161
162
|
valueKey: {
|
|
162
163
|
type: String,
|
|
163
|
-
default:
|
|
164
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.valueKey,
|
|
164
165
|
},
|
|
165
166
|
|
|
166
167
|
/**
|
|
@@ -127,7 +127,7 @@ const props = defineProps({
|
|
|
127
127
|
*/
|
|
128
128
|
labelKey: {
|
|
129
129
|
type: String,
|
|
130
|
-
default:
|
|
130
|
+
default: UIService.get(defaultConfig, UDropdownList).default.valueKey,
|
|
131
131
|
},
|
|
132
132
|
|
|
133
133
|
/**
|
|
@@ -135,7 +135,7 @@ const props = defineProps({
|
|
|
135
135
|
*/
|
|
136
136
|
valueKey: {
|
|
137
137
|
type: String,
|
|
138
|
-
default:
|
|
138
|
+
default: UIService.get(defaultConfig, UDropdownList).default.valueKey,
|
|
139
139
|
},
|
|
140
140
|
|
|
141
141
|
/**
|
|
@@ -11,8 +11,8 @@ export default /*tw*/ {
|
|
|
11
11
|
},
|
|
12
12
|
dropzoneWrapper: {
|
|
13
13
|
base: `
|
|
14
|
-
size-auto w-full rounded border border-solid border-gray-300 bg-white
|
|
15
|
-
p-4 px-5 py-6 hover:border-gray-400
|
|
14
|
+
size-auto w-full rounded-lg border border-solid border-gray-300 bg-white
|
|
15
|
+
p-4 px-5 py-6 transition-all hover:border-gray-400
|
|
16
16
|
`,
|
|
17
17
|
variants: {
|
|
18
18
|
error: {
|
package/ui.form-select/index.vue
CHANGED
|
@@ -163,13 +163,13 @@
|
|
|
163
163
|
ref="dropdownListRef"
|
|
164
164
|
v-model="dropdownValue"
|
|
165
165
|
:options="filteredOptions"
|
|
166
|
-
:disabled
|
|
167
|
-
:size
|
|
166
|
+
:disabled="disabled"
|
|
167
|
+
:size="size"
|
|
168
168
|
:max-height="optimizedHeight"
|
|
169
169
|
:option-height="optionHeight"
|
|
170
|
-
:value-key
|
|
171
|
-
:label-key
|
|
172
|
-
:add-option
|
|
170
|
+
:value-key="valueKey"
|
|
171
|
+
:label-key="labelKey"
|
|
172
|
+
:add-option="addOption"
|
|
173
173
|
tabindex="-1"
|
|
174
174
|
v-bind="dropdownListAttrs"
|
|
175
175
|
@focus="activate"
|
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.184",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -1590,6 +1590,15 @@
|
|
|
1590
1590
|
},
|
|
1591
1591
|
"default": "label"
|
|
1592
1592
|
},
|
|
1593
|
+
{
|
|
1594
|
+
"name": "valueKey",
|
|
1595
|
+
"description": "Value key in the item object of options.",
|
|
1596
|
+
"value": {
|
|
1597
|
+
"kind": "expression",
|
|
1598
|
+
"type": "string"
|
|
1599
|
+
},
|
|
1600
|
+
"default": "id"
|
|
1601
|
+
},
|
|
1593
1602
|
{
|
|
1594
1603
|
"name": "emptyTitle",
|
|
1595
1604
|
"description": "Empty state title.",
|
|
@@ -2300,7 +2309,7 @@
|
|
|
2300
2309
|
"kind": "expression",
|
|
2301
2310
|
"type": "string"
|
|
2302
2311
|
},
|
|
2303
|
-
"default": "
|
|
2312
|
+
"default": "label"
|
|
2304
2313
|
},
|
|
2305
2314
|
{
|
|
2306
2315
|
"name": "valueKey",
|
|
@@ -2309,7 +2318,7 @@
|
|
|
2309
2318
|
"kind": "expression",
|
|
2310
2319
|
"type": "string"
|
|
2311
2320
|
},
|
|
2312
|
-
"default": "
|
|
2321
|
+
"default": "id"
|
|
2313
2322
|
},
|
|
2314
2323
|
{
|
|
2315
2324
|
"name": "listYPosition",
|
|
@@ -2483,7 +2492,7 @@
|
|
|
2483
2492
|
"kind": "expression",
|
|
2484
2493
|
"type": "string"
|
|
2485
2494
|
},
|
|
2486
|
-
"default": "
|
|
2495
|
+
"default": "label"
|
|
2487
2496
|
},
|
|
2488
2497
|
{
|
|
2489
2498
|
"name": "valueKey",
|
|
@@ -2492,7 +2501,7 @@
|
|
|
2492
2501
|
"kind": "expression",
|
|
2493
2502
|
"type": "string"
|
|
2494
2503
|
},
|
|
2495
|
-
"default": "
|
|
2504
|
+
"default": "id"
|
|
2496
2505
|
},
|
|
2497
2506
|
{
|
|
2498
2507
|
"name": "listYPosition",
|
|
@@ -2694,7 +2703,7 @@
|
|
|
2694
2703
|
"kind": "expression",
|
|
2695
2704
|
"type": "string"
|
|
2696
2705
|
},
|
|
2697
|
-
"default": "
|
|
2706
|
+
"default": "label"
|
|
2698
2707
|
},
|
|
2699
2708
|
{
|
|
2700
2709
|
"name": "valueKey",
|
|
@@ -2703,7 +2712,7 @@
|
|
|
2703
2712
|
"kind": "expression",
|
|
2704
2713
|
"type": "string"
|
|
2705
2714
|
},
|
|
2706
|
-
"default": "
|
|
2715
|
+
"default": "id"
|
|
2707
2716
|
},
|
|
2708
2717
|
{
|
|
2709
2718
|
"name": "listYPosition",
|
|
@@ -2787,7 +2796,7 @@
|
|
|
2787
2796
|
"kind": "expression",
|
|
2788
2797
|
"type": "string"
|
|
2789
2798
|
},
|
|
2790
|
-
"default": "
|
|
2799
|
+
"default": "label"
|
|
2791
2800
|
},
|
|
2792
2801
|
{
|
|
2793
2802
|
"name": "valueKey",
|
|
@@ -2796,7 +2805,7 @@
|
|
|
2796
2805
|
"kind": "expression",
|
|
2797
2806
|
"type": "string"
|
|
2798
2807
|
},
|
|
2799
|
-
"default": "
|
|
2808
|
+
"default": "id"
|
|
2800
2809
|
},
|
|
2801
2810
|
{
|
|
2802
2811
|
"name": "groupLabel",
|