@v1nt1248/3nclient-lib 0.3.24 → 0.3.25

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.
@@ -18856,9 +18856,11 @@ var zu = ["id"], Bu = /* @__PURE__ */ Q(/* @__PURE__ */ d({
18856
18856
  }
18857
18857
  return b(() => {
18858
18858
  u.value && (u.value.style.setProperty("--ui3n-dialog-confirm-button-color", n.confirmButtonColor), u.value.style.setProperty("--ui3n-dialog-cancel-button-color", n.cancelButtonColor), u.value.style.setProperty("--ui3n-dialog-confirm-background-color", n.confirmButtonBackground), u.value.style.setProperty("--ui3n-dialog-cancel-background-color", n.cancelButtonBackground), h(() => {
18859
- u.value.focus(), setTimeout(() => {
18860
- let e = u.value.getBoundingClientRect();
18861
- f.value.initialLeft = e.left, f.value.initialTop = e.top;
18859
+ u.value && u.value.focus(), setTimeout(() => {
18860
+ if (u.value) {
18861
+ let e = u.value.getBoundingClientRect();
18862
+ f.value.initialLeft = e.left, f.value.initialTop = e.top;
18863
+ }
18862
18864
  }, 100);
18863
18865
  }));
18864
18866
  }), (t, i) => (x(), s("div", m({
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.24",
5
+ "version": "0.3.25",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -112,12 +112,14 @@
112
112
  dialogElement.value.style.setProperty('--ui3n-dialog-cancel-background-color', props.cancelButtonBackground);
113
113
 
114
114
  nextTick(() => {
115
- dialogElement.value!.focus();
115
+ dialogElement.value && dialogElement.value.focus();
116
116
 
117
117
  setTimeout(() => {
118
- const dialogClientRect = dialogElement.value!.getBoundingClientRect();
119
- dragData.value.initialLeft = dialogClientRect.left;
120
- dragData.value.initialTop = dialogClientRect.top;
118
+ if (dialogElement.value) {
119
+ const dialogClientRect = dialogElement.value.getBoundingClientRect();
120
+ dragData.value.initialLeft = dialogClientRect.left;
121
+ dragData.value.initialTop = dialogClientRect.top;
122
+ }
121
123
  }, 100);
122
124
  });
123
125
  }
@@ -134,12 +136,12 @@
134
136
  v-on="
135
137
  draggable
136
138
  ? {
137
- dragstart: onDragstart,
138
- mousedown: onMousedown,
139
- mouseup: onMouseup,
140
- mousemove: onMousemove,
141
- keydown: onKeydown,
142
- }
139
+ dragstart: onDragstart,
140
+ mousedown: onMousedown,
141
+ mouseup: onMouseup,
142
+ mousemove: onMousemove,
143
+ keydown: onKeydown,
144
+ }
143
145
  : { keydown: onKeydown }
144
146
  "
145
147
  >