@v1nt1248/3nclient-lib 0.3.8 → 0.3.9

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.
@@ -1,6 +1,5 @@
1
1
  import "pinia";
2
2
  import { computed as e, createApp as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, markRaw as c, normalizeClass as l, normalizeStyle as u, onMounted as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, unref as g, useCssModule as _, useCssVars as v, watch as y, withDirectives as b, withKeys as x } from "vue";
3
- Object.create, Object.defineProperty, Object.getOwnPropertyDescriptor, Object.getOwnPropertyNames, Object.getPrototypeOf, Object.prototype.hasOwnProperty;
4
3
  //#region \0rolldown/runtime.js
5
4
  var S = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), C = Symbol.for("ui3n-dialogs-plugin"), w = Symbol.for("ui3n-i18-plugin"), T = Symbol("ui3n-notifications-plugin"), E = Symbol("ui3n-vuebus-plugin"), D = { install: (e, t) => {
6
5
  let { lang: n, messages: r } = t, i = Object.keys(r) || [], a = (t, n) => {
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.3.8",
5
+ "version": "0.3.9",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -51,32 +51,32 @@
51
51
  "docs:preview": "vitepress preview docs"
52
52
  },
53
53
  "dependencies": {
54
- "@floating-ui/dom": "^1.7.6",
54
+ "@floating-ui/dom": "1.7.6",
55
55
  "@floating-ui/vue": "1.1.11",
56
56
  "dayjs": "1.11.20",
57
57
  "lodash": "4.17.23",
58
58
  "mitt": "3.0.1",
59
- "sanitize-html": "2.17.1",
59
+ "sanitize-html": "2.17.2",
60
60
  "vuedraggable": "4.1.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "pinia": "3.0.4",
64
- "vue": "3.5.30"
64
+ "vue": "3.5.31"
65
65
  },
66
66
  "devDependencies": {
67
- "@eslint/eslintrc": "^3.3.5",
68
- "@eslint/js": "^9.39.1",
67
+ "@eslint/eslintrc": "3.3.5",
68
+ "@eslint/js": "10.0.1",
69
69
  "@types/lodash": "4.17.24",
70
70
  "@types/node": "22.19.15",
71
71
  "@types/sanitize-html": "2.16.1",
72
- "@typescript-eslint/eslint-plugin": "8.57.1",
73
- "@typescript-eslint/parser": "8.57.1",
72
+ "@typescript-eslint/eslint-plugin": "8.57.2",
73
+ "@typescript-eslint/parser": "8.57.2",
74
74
  "@vitejs/plugin-vue": "6.0.5",
75
- "@vue/compiler-core": "3.5.30",
75
+ "@vue/compiler-core": "3.5.31",
76
76
  "@vue/eslint-config-typescript": "14.7.0",
77
- "@vue/runtime-core": "3.5.30",
77
+ "@vue/runtime-core": "3.5.31",
78
78
  "@vuedx/typescript-plugin-vue": "0.7.6",
79
- "eslint": "9.39.4",
79
+ "eslint": "10.1.0",
80
80
  "eslint-config-prettier": "10.1.8",
81
81
  "eslint-plugin-import": "2.32.0",
82
82
  "eslint-plugin-node": "11.1.0",
@@ -90,22 +90,22 @@
90
90
  "postcss-html": "1.8.1",
91
91
  "prettier": "3.8.1",
92
92
  "sass": "1.98.0",
93
- "stylelint": "17.4.0",
93
+ "stylelint": "17.5.0",
94
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
97
  "stylelint-scss": "7.0.0",
98
98
  "tslib": "2.8.1",
99
99
  "typescript": "5.9.3",
100
- "typescript-eslint": "8.57.1",
101
- "vite": "8.0.0",
100
+ "typescript-eslint": "8.57.2",
101
+ "vite": "8.0.2",
102
102
  "vite-plugin-css-injected-by-js": "4.0.1",
103
103
  "vite-plugin-dts": "4.5.4",
104
- "vite-plugin-vue-devtools": "8.1.0",
104
+ "vite-plugin-vue-devtools": "8.1.1",
105
105
  "vitepress": "1.6.4",
106
- "vue": "3.5.30",
106
+ "vue": "3.5.31",
107
107
  "vue-eslint-parser": "10.4.0",
108
- "vue-tsc": "3.2.5"
108
+ "vue-tsc": "3.2.6"
109
109
  },
110
110
  "packageManager": "pnpm@10.32.1",
111
111
  "pnpm": {
@@ -13,6 +13,8 @@
13
13
  const isFocused = ref(false);
14
14
  const errorMessage = ref('');
15
15
 
16
+ const isInitialized = ref(false);
17
+
16
18
  const cssIconColor = computed(() => {
17
19
  if (props.disabled) {
18
20
  return 'var(--color-icon-control-primary-disabled)';
@@ -109,9 +111,12 @@
109
111
  }
110
112
 
111
113
  emits('init', inputElement.value!);
112
- if (props.validateAtStartup) {
114
+ if (props.validateAtStartup && !isInitialized.value) {
113
115
  validate(text.value);
114
116
  }
117
+ if (!isInitialized.value) {
118
+ isInitialized.value = true;
119
+ }
115
120
  });
116
121
 
117
122
  watch(
@@ -119,7 +124,14 @@
119
124
  (val, oldVal) => {
120
125
  if ((val ?? '') !== (oldVal ?? '')) {
121
126
  text.value = val ?? '';
122
- validate(text.value);
127
+
128
+ if ((props.validateAtStartup && !isInitialized.value) || isInitialized.value) {
129
+ validate(text.value);
130
+ }
131
+
132
+ if (!isInitialized.value) {
133
+ isInitialized.value = true;
134
+ }
123
135
  }
124
136
  },
125
137
  { immediate: true },
@@ -193,7 +205,7 @@
193
205
  />
194
206
 
195
207
  <div
196
- v-if="(isDirty && errorMessage) || (displayStateMode && displayStateMessage)"
208
+ v-if="(text && errorMessage) || (isDirty && errorMessage) || (displayStateMode && displayStateMessage)"
197
209
  :class="[
198
210
  $style.ui3nInputFieldMessage,
199
211
  (errorMessage || (displayStateMode === 'error' && displayStateMessage)) && $style.ui3nInputErrorMessage,