@milaboratories/uikit 2.2.29 → 2.2.31
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/CHANGELOG.md +12 -0
- package/dist/pl-uikit.js +268 -268
- package/dist/pl-uikit.umd.cjs +5 -5
- package/dist/src/components/PlDropdownLine/PlDropdownLine.vue.d.ts +2 -2
- package/dist/src/components/PlDropdownLine/ResizableInput.vue.d.ts +0 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/PlDropdownLine/PlDropdownLine.vue +6 -8
- package/src/components/PlDropdownLine/ResizableInput.vue +3 -5
- package/src/components/PlDropdownLine/resizable-input.scss +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/uikit",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/pl-uikit.umd.js",
|
|
6
6
|
"module": "dist/pl-uikit.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"yarpm": "^1.2.0",
|
|
34
34
|
"svgo": "^3.3.2",
|
|
35
35
|
"@milaboratories/eslint-config": "^1.0.0",
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
36
|
+
"@milaboratories/helpers": "^1.6.9",
|
|
37
|
+
"@platforma-sdk/model": "^1.18.0"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"dev": "vite",
|
|
@@ -68,11 +68,7 @@ const modelText = computed<string>(() => {
|
|
|
68
68
|
const index = getIndexForModelInItems();
|
|
69
69
|
if (index !== -1) {
|
|
70
70
|
const item = normalizeListOptions(props.options)[index];
|
|
71
|
-
|
|
72
|
-
return item['label']['title'];
|
|
73
|
-
} else {
|
|
74
|
-
return item['label'];
|
|
75
|
-
}
|
|
71
|
+
return item.label;
|
|
76
72
|
}
|
|
77
73
|
}
|
|
78
74
|
return '';
|
|
@@ -80,6 +76,10 @@ const modelText = computed<string>(() => {
|
|
|
80
76
|
|
|
81
77
|
const inputModel = ref(modelText.value);
|
|
82
78
|
|
|
79
|
+
watch(modelText, (v) => {
|
|
80
|
+
inputModel.value = v;
|
|
81
|
+
});
|
|
82
|
+
|
|
83
83
|
const placeholderVal = computed(() => {
|
|
84
84
|
if (data.isOpen) {
|
|
85
85
|
if (searchPhrase.value && searchPhrase.value.length >= modelText.value.length - 1) {
|
|
@@ -87,7 +87,7 @@ const placeholderVal = computed(() => {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
return modelText.value
|
|
90
|
+
return modelText.value || '...';
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
useClickOutside(container, () => {
|
|
@@ -136,7 +136,6 @@ function updateSelected() {
|
|
|
136
136
|
}),
|
|
137
137
|
(v) => (v < 0 ? 0 : v),
|
|
138
138
|
);
|
|
139
|
-
inputModel.value = modelText.value;
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
function resetSearchPhrase() {
|
|
@@ -256,7 +255,6 @@ useElementPosition(container, (pos) => {
|
|
|
256
255
|
</script>
|
|
257
256
|
|
|
258
257
|
<template>
|
|
259
|
-
<!-- {{ inputModel }} -->
|
|
260
258
|
<div
|
|
261
259
|
ref="container"
|
|
262
260
|
tabindex="0"
|
|
@@ -5,19 +5,18 @@ import { computed } from 'vue';
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
modelValue?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
|
-
value?: string;
|
|
9
8
|
disabled?: boolean;
|
|
10
9
|
maxWidth?: string;
|
|
11
10
|
width?: string;
|
|
12
11
|
}>();
|
|
13
12
|
|
|
14
|
-
const emit = defineEmits(['
|
|
13
|
+
const emit = defineEmits(['update:modelValue']);
|
|
15
14
|
|
|
16
15
|
const text = computed(() => {
|
|
17
16
|
if (props.placeholder) {
|
|
18
17
|
return props.placeholder;
|
|
19
18
|
}
|
|
20
|
-
return (props.modelValue
|
|
19
|
+
return (props.modelValue)?.replace('"', '');
|
|
21
20
|
});
|
|
22
21
|
|
|
23
22
|
const styles = computed(() => {
|
|
@@ -32,8 +31,7 @@ const styles = computed(() => {
|
|
|
32
31
|
});
|
|
33
32
|
|
|
34
33
|
function handleInput(event: Event) {
|
|
35
|
-
|
|
36
|
-
emit('update:modelValue', value);
|
|
34
|
+
emit('update:modelValue', (event.target as HTMLInputElement).value);
|
|
37
35
|
}
|
|
38
36
|
</script>
|
|
39
37
|
|