@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/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.94",
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.4",
55
- "@floating-ui/vue": "1.1.9",
56
- "dayjs": "1.11.19",
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.0",
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.28"
64
+ "vue": "3.5.30"
65
65
  },
66
66
  "devDependencies": {
67
- "@eslint/eslintrc": "^3.3.1",
67
+ "@eslint/eslintrc": "^3.3.5",
68
68
  "@eslint/js": "^9.39.1",
69
- "@types/lodash": "4.17.23",
70
- "@types/node": "22.19.7",
71
- "@types/sanitize-html": "2.16.0",
72
- "@typescript-eslint/eslint-plugin": "8.50.0",
73
- "@typescript-eslint/parser": "8.50.0",
74
- "@vitejs/plugin-vue": "6.0.3",
75
- "@vue/compiler-core": "3.5.28",
76
- "@vue/eslint-config-typescript": "14.6.0",
77
- "@vue/runtime-core": "3.5.28",
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.2",
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.4",
83
+ "eslint-plugin-prettier": "5.5.5",
84
84
  "eslint-plugin-promise": "7.2.1",
85
- "eslint-plugin-vue": "10.6.2",
86
- "globals": "16.5.0",
87
- "jackspeak": "4.1.1",
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.97.3",
93
- "stylelint": "16.26.1",
94
- "stylelint-config-recommended-scss": "16.0.2",
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": "6.13.0",
97
+ "stylelint-scss": "7.0.0",
98
98
  "tslib": "2.8.1",
99
99
  "typescript": "5.9.3",
100
- "typescript-eslint": "8.50.0",
101
- "vite": "7.3.1",
102
- "vite-plugin-css-injected-by-js": "3.5.2",
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.6",
104
+ "vite-plugin-vue-devtools": "8.1.0",
105
105
  "vitepress": "1.6.4",
106
- "vue": "3.5.28",
107
- "vue-eslint-parser": "10.2.0",
108
- "vue-tsc": "3.2.4"
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(() => props.returnObject
58
- ? (props.modelValue as T[]).map(item => item.id)
59
- : (props.modelValue as Array<T[keyof T]>));
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
  >
@@ -9,6 +9,7 @@ export interface Ui3nMenuProps {
9
9
  offsetX?: number;
10
10
  offsetY?: number;
11
11
  contentBorderRadius?: number | number[];
12
+ contentStyles?: Record<string, string>;
12
13
  zIndex?: number;
13
14
  closeOnClick?: boolean;
14
15
  closeOnClickOutside?: boolean;
@@ -55,19 +55,12 @@
55
55
 
56
56
  middleware.push(shift());
57
57
 
58
- const {
59
- floatingStyles,
60
- isPositioned,
61
- update,
62
- } = useFloating(
63
- usedTriggerElement,
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
- [() => props.offsetX, () => props.offsetY],
123
- ([offsetX, offsetY], [oldOffsetX, oldOffsetY]) => {
124
- if (offsetX !== oldOffsetX || offsetY !== oldOffsetY) {
125
- update();
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="floatingStyles"
143
+ :style="{
144
+ ...floatingStyles,
145
+ ...(contentStyles && { ...contentStyles }),
146
+ }"
154
147
  :class="$style.ui3nMenuContent"
155
148
  v-on="closeOnClick ? { click: onContentClick } : {}"
156
149
  >