@milaboratories/milaboratories.ui-examples.ui 1.6.7 → 1.7.1
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +20 -0
- package/dist/assets/{index-DYfpDE_1.js → index-BaCRzfnp.js} +110 -110
- package/dist/assets/{index-DYfpDE_1.js.map → index-BaCRzfnp.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +8 -8
- package/src/pages/PlAutocompleteMultiPage/BasicTab.vue +17 -12
- package/src/pages/PlAutocompleteMultiPage/ComboboxTab.vue +9 -8
package/dist/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta http-equiv="Content-Security-Policy" content="script-src 'self' blob: data: 'unsafe-eval';">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-BaCRzfnp.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-CrE9XJ4f.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/milaboratories.ui-examples.ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"vue": "^3.5.24",
|
|
7
|
-
"@
|
|
8
|
-
"@
|
|
7
|
+
"@platforma-sdk/model": "1.47.5",
|
|
8
|
+
"@milaboratories/milaboratories.ui-examples.model": "1.3.9"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "~5.6.3",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"zod": "~3.23.8",
|
|
14
14
|
"ag-grid-enterprise": "~34.1.2",
|
|
15
15
|
"ag-grid-vue3": "~34.1.2",
|
|
16
|
-
"@
|
|
17
|
-
"@
|
|
18
|
-
"@milaboratories/build-configs": "1.0.
|
|
19
|
-
"@milaboratories/
|
|
16
|
+
"@milaboratories/ts-configs": "1.0.6",
|
|
17
|
+
"@platforma-sdk/ui-vue": "1.47.5",
|
|
18
|
+
"@milaboratories/build-configs": "1.0.9",
|
|
19
|
+
"@milaboratories/ts-builder": "1.0.6",
|
|
20
20
|
"@milaboratories/helpers": "1.12.0",
|
|
21
|
-
"@milaboratories/
|
|
21
|
+
"@milaboratories/uikit": "2.7.3"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "ts-builder serve --target browser",
|
|
@@ -24,19 +24,25 @@ const data = reactive({
|
|
|
24
24
|
sourceId: '1',
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
async function
|
|
28
|
-
return db.filter((el) => values.includes(el.value));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async function fetchOptions(str: string): Promise<ListOptionBase<string>[]> {
|
|
32
|
-
str = str.toLowerCase();
|
|
27
|
+
async function fetchOptions(str: string | string[], type: 'value' | 'label'): Promise<ListOptionBase<string>[]> {
|
|
33
28
|
await delay(1000);
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
|
|
30
|
+
if (type === 'value' && Array.isArray(str)) {
|
|
31
|
+
const values = str;
|
|
32
|
+
return db.filter((el) => values.includes(el.value));
|
|
36
33
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
|
|
35
|
+
if (type === 'label' && typeof str === 'string') {
|
|
36
|
+
const lowerStr = str.toLowerCase();
|
|
37
|
+
if (lowerStr.includes('error')) {
|
|
38
|
+
throw new Error('test error');
|
|
39
|
+
}
|
|
40
|
+
return Promise.resolve(
|
|
41
|
+
db.filter((el) => el.value.toLowerCase().includes(lowerStr) || el.label.toLowerCase().includes(lowerStr)).slice(0, 100),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
throw new Error('Invalid arguments combination');
|
|
40
46
|
}
|
|
41
47
|
</script>
|
|
42
48
|
|
|
@@ -47,7 +53,6 @@ async function fetchOptions(str: string): Promise<ListOptionBase<string>[]> {
|
|
|
47
53
|
label="Autocomplete"
|
|
48
54
|
:required="true"
|
|
49
55
|
:optionsSearch="fetchOptions"
|
|
50
|
-
:modelSearch="fetchModelOptions"
|
|
51
56
|
:source-id="data.sourceId"
|
|
52
57
|
/>
|
|
53
58
|
<PlBtnPrimary style="width: 120px" @click="data.sourceId = String(Math.random())">Change source id</PlBtnPrimary>
|
|
@@ -7,15 +7,17 @@ const data = reactive({
|
|
|
7
7
|
selected: ['tag1', 'tag2'],
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
async function
|
|
11
|
-
|
|
12
|
-
}
|
|
10
|
+
async function fetchOptions(str: string | string[], type: 'value' | 'label'): Promise<ListOptionBase<string>[]> {
|
|
11
|
+
if (type === 'value' && Array.isArray(str)) {
|
|
12
|
+
return str.map((v) => ({ value: v, label: v }));
|
|
13
|
+
}
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return [];
|
|
15
|
+
if (type === 'label' && typeof str === 'string') {
|
|
16
|
+
if (str === '') return [];
|
|
17
|
+
return [{ value: str, label: str }];
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
throw new Error('Invalid arguments combination');
|
|
19
21
|
}
|
|
20
22
|
</script>
|
|
21
23
|
|
|
@@ -26,7 +28,6 @@ async function fetchOptions(str: string): Promise<ListOptionBase<string>[]> {
|
|
|
26
28
|
label="String tags (combobox)"
|
|
27
29
|
:required="true"
|
|
28
30
|
:optionsSearch="fetchOptions"
|
|
29
|
-
:modelSearch="fetchModelOptions"
|
|
30
31
|
:debounce="0"
|
|
31
32
|
:resetSearchOnSelect="true"
|
|
32
33
|
:emptyOptionsText="`Enter tag name and press Enter`"
|