@v1nt1248/3nclient-lib 0.2.94 → 0.2.96
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/dist/components/ui3n-menu/types.d.ts +1 -0
- package/dist/style.css +2 -1
- package/dist/ui3n-components.js +20097 -18347
- package/dist/ui3n-plugins.js +3513 -3037
- package/dist/ui3n-utils.js +7222 -5172
- package/package.json +32 -32
- package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +7 -5
- package/src/components/ui3n-menu/types.ts +1 -0
- package/src/components/ui3n-menu/ui3n-menu.vue +15 -22
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@v1nt1248/3nclient-lib",
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"author": "v1nt1248",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.96",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
@@ -51,61 +51,61 @@
|
|
|
51
51
|
"docs:preview": "vitepress preview docs"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@floating-ui/dom": "^1.7.
|
|
55
|
-
"@floating-ui/vue": "1.1.
|
|
56
|
-
"dayjs": "1.11.
|
|
54
|
+
"@floating-ui/dom": "^1.7.6",
|
|
55
|
+
"@floating-ui/vue": "1.1.11",
|
|
56
|
+
"dayjs": "1.11.20",
|
|
57
57
|
"lodash": "4.17.23",
|
|
58
58
|
"mitt": "3.0.1",
|
|
59
|
-
"sanitize-html": "2.17.
|
|
59
|
+
"sanitize-html": "2.17.1",
|
|
60
60
|
"vuedraggable": "4.1.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"pinia": "3.0.4",
|
|
64
|
-
"vue": "3.5.
|
|
64
|
+
"vue": "3.5.30"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@eslint/eslintrc": "^3.3.
|
|
67
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
68
68
|
"@eslint/js": "^9.39.1",
|
|
69
|
-
"@types/lodash": "4.17.
|
|
70
|
-
"@types/node": "22.19.
|
|
71
|
-
"@types/sanitize-html": "2.16.
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
73
|
-
"@typescript-eslint/parser": "8.
|
|
74
|
-
"@vitejs/plugin-vue": "6.0.
|
|
75
|
-
"@vue/compiler-core": "3.5.
|
|
76
|
-
"@vue/eslint-config-typescript": "14.
|
|
77
|
-
"@vue/runtime-core": "3.5.
|
|
69
|
+
"@types/lodash": "4.17.24",
|
|
70
|
+
"@types/node": "22.19.15",
|
|
71
|
+
"@types/sanitize-html": "2.16.1",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "8.57.1",
|
|
73
|
+
"@typescript-eslint/parser": "8.57.1",
|
|
74
|
+
"@vitejs/plugin-vue": "6.0.5",
|
|
75
|
+
"@vue/compiler-core": "3.5.30",
|
|
76
|
+
"@vue/eslint-config-typescript": "14.7.0",
|
|
77
|
+
"@vue/runtime-core": "3.5.30",
|
|
78
78
|
"@vuedx/typescript-plugin-vue": "0.7.6",
|
|
79
|
-
"eslint": "9.39.
|
|
79
|
+
"eslint": "9.39.4",
|
|
80
80
|
"eslint-config-prettier": "10.1.8",
|
|
81
81
|
"eslint-plugin-import": "2.32.0",
|
|
82
82
|
"eslint-plugin-node": "11.1.0",
|
|
83
|
-
"eslint-plugin-prettier": "5.5.
|
|
83
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
84
84
|
"eslint-plugin-promise": "7.2.1",
|
|
85
|
-
"eslint-plugin-vue": "10.
|
|
86
|
-
"globals": "
|
|
87
|
-
"jackspeak": "4.
|
|
85
|
+
"eslint-plugin-vue": "10.8.0",
|
|
86
|
+
"globals": "17.4.0",
|
|
87
|
+
"jackspeak": "4.2.3",
|
|
88
88
|
"path": "0.12.7",
|
|
89
89
|
"pinia": "3.0.4",
|
|
90
90
|
"postcss-html": "1.8.1",
|
|
91
91
|
"prettier": "3.8.1",
|
|
92
|
-
"sass": "1.
|
|
93
|
-
"stylelint": "
|
|
94
|
-
"stylelint-config-recommended-scss": "
|
|
92
|
+
"sass": "1.98.0",
|
|
93
|
+
"stylelint": "17.4.0",
|
|
94
|
+
"stylelint-config-recommended-scss": "17.0.0",
|
|
95
95
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
96
96
|
"stylelint-config-standard": "39.0.1",
|
|
97
|
-
"stylelint-scss": "
|
|
97
|
+
"stylelint-scss": "7.0.0",
|
|
98
98
|
"tslib": "2.8.1",
|
|
99
99
|
"typescript": "5.9.3",
|
|
100
|
-
"typescript-eslint": "8.
|
|
101
|
-
"vite": "
|
|
102
|
-
"vite-plugin-css-injected-by-js": "
|
|
100
|
+
"typescript-eslint": "8.57.1",
|
|
101
|
+
"vite": "8.0.0",
|
|
102
|
+
"vite-plugin-css-injected-by-js": "4.0.1",
|
|
103
103
|
"vite-plugin-dts": "4.5.4",
|
|
104
|
-
"vite-plugin-vue-devtools": "8.0
|
|
104
|
+
"vite-plugin-vue-devtools": "8.1.0",
|
|
105
105
|
"vitepress": "1.6.4",
|
|
106
|
-
"vue": "3.5.
|
|
107
|
-
"vue-eslint-parser": "10.
|
|
108
|
-
"vue-tsc": "3.2.
|
|
106
|
+
"vue": "3.5.30",
|
|
107
|
+
"vue-eslint-parser": "10.4.0",
|
|
108
|
+
"vue-tsc": "3.2.5"
|
|
109
109
|
},
|
|
110
110
|
"packageManager": "pnpm@10.26.0",
|
|
111
111
|
"pnpm": {
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
const activeItemsIndex = ref<Nullable<number>>(null);
|
|
55
55
|
const isNewValueValid = ref(true);
|
|
56
56
|
|
|
57
|
-
const ids = computed(() =>
|
|
58
|
-
? (props.modelValue as T[]).map(item => item.id)
|
|
59
|
-
|
|
57
|
+
const ids = computed(() =>
|
|
58
|
+
props.returnObject ? (props.modelValue as T[]).map(item => item.id) : (props.modelValue as Array<T[keyof T]>),
|
|
59
|
+
);
|
|
60
60
|
|
|
61
61
|
const displayValue = computed(() => {
|
|
62
62
|
if (props.chips) return '';
|
|
@@ -194,6 +194,7 @@
|
|
|
194
194
|
};
|
|
195
195
|
onItemClick(item as unknown as T);
|
|
196
196
|
}
|
|
197
|
+
props.clearOnSelect && (query.value = '');
|
|
197
198
|
return;
|
|
198
199
|
}
|
|
199
200
|
|
|
@@ -201,6 +202,7 @@
|
|
|
201
202
|
const item = filteredItems.value[activeItemsIndex.value!];
|
|
202
203
|
onItemClick(item);
|
|
203
204
|
activeItemsIndex.value = null;
|
|
205
|
+
props.clearOnSelect && (query.value = '');
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
208
|
|
|
@@ -299,7 +301,7 @@
|
|
|
299
301
|
@keydown.esc="onKeydown($event, 'esc')"
|
|
300
302
|
@keydown.enter="onKeydown($event, 'enter')"
|
|
301
303
|
@keydown.tab="onKeydown($event, 'tab')"
|
|
302
|
-
|
|
304
|
+
/>
|
|
303
305
|
</div>
|
|
304
306
|
|
|
305
307
|
<template #menu>
|
|
@@ -318,7 +320,7 @@
|
|
|
318
320
|
:class="[
|
|
319
321
|
$style.item,
|
|
320
322
|
activeItemsIndex === index && $style.itemSelected,
|
|
321
|
-
disabled && $style.itemDisabled
|
|
323
|
+
disabled && $style.itemDisabled,
|
|
322
324
|
]"
|
|
323
325
|
@click.stop.prevent="onItemClick(item)"
|
|
324
326
|
>
|
|
@@ -55,19 +55,12 @@
|
|
|
55
55
|
|
|
56
56
|
middleware.push(shift());
|
|
57
57
|
|
|
58
|
-
const {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
menuContentElement,
|
|
65
|
-
{
|
|
66
|
-
placement: 'bottom-start',
|
|
67
|
-
strategy: props.positionStrategy,
|
|
68
|
-
middleware,
|
|
69
|
-
whileElementsMounted: props.positionAutoupdate || props.positionStrategy === 'fixed' ? autoUpdate : undefined,
|
|
70
|
-
});
|
|
58
|
+
const { floatingStyles, isPositioned, update } = useFloating(usedTriggerElement, menuContentElement, {
|
|
59
|
+
placement: 'bottom-start',
|
|
60
|
+
strategy: props.positionStrategy,
|
|
61
|
+
middleware,
|
|
62
|
+
whileElementsMounted: props.positionAutoupdate || props.positionStrategy === 'fixed' ? autoUpdate : undefined,
|
|
63
|
+
});
|
|
71
64
|
|
|
72
65
|
function toggleMenu() {
|
|
73
66
|
if (props.disabled) {
|
|
@@ -118,14 +111,11 @@
|
|
|
118
111
|
},
|
|
119
112
|
);
|
|
120
113
|
|
|
121
|
-
watch(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
);
|
|
114
|
+
watch([() => props.offsetX, () => props.offsetY], ([offsetX, offsetY], [oldOffsetX, oldOffsetY]) => {
|
|
115
|
+
if (offsetX !== oldOffsetX || offsetY !== oldOffsetY) {
|
|
116
|
+
update();
|
|
117
|
+
}
|
|
118
|
+
});
|
|
129
119
|
|
|
130
120
|
defineExpose<Ui3nMenuExpose>({
|
|
131
121
|
isPositioned,
|
|
@@ -150,7 +140,10 @@
|
|
|
150
140
|
v-if="isShow"
|
|
151
141
|
ref="menu-content-element"
|
|
152
142
|
v-click-outside="onClickOutside"
|
|
153
|
-
:style="
|
|
143
|
+
:style="{
|
|
144
|
+
...floatingStyles,
|
|
145
|
+
...(contentStyles && { ...contentStyles }),
|
|
146
|
+
}"
|
|
154
147
|
:class="$style.ui3nMenuContent"
|
|
155
148
|
v-on="closeOnClick ? { click: onContentClick } : {}"
|
|
156
149
|
>
|