@signal24/vue-foundation 4.15.0 → 4.15.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.
@@ -1,7 +1,7 @@
1
1
  var Be = Object.defineProperty;
2
2
  var Ve = (e, t, n) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var E = (e, t, n) => Ve(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as C, defineProps as Fe, defineEmits as _e, ref as b, computed as _, openBlock as d, createElementBlock as h, createElementVNode as w, toDisplayString as x, withDirectives as j, createCommentVNode as O, Fragment as U, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ne, withModifiers as te, renderSlot as K, reactive as Ke, h as W, Teleport as je, markRaw as Ue, onBeforeUnmount as ne, resolveDirective as we, createBlock as be, createSlots as We, withCtx as Y, createTextVNode as ae, vModelText as Pe, watch as ce, onActivated as Oe, onDeactivated as ke } from "vue";
4
+ import { defineComponent as C, defineProps as Fe, defineEmits as _e, ref as b, computed as _, openBlock as d, createElementBlock as h, createElementVNode as w, toDisplayString as x, withDirectives as j, createCommentVNode as O, Fragment as W, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ne, withModifiers as te, renderSlot as K, reactive as Ke, h as U, Teleport as je, markRaw as We, onBeforeUnmount as ne, resolveDirective as we, createBlock as be, createSlots as Ue, withCtx as Y, createTextVNode as ae, vModelText as Pe, watch as ce, onActivated as Oe, onDeactivated as ke } from "vue";
5
5
  import { compact as qe, debounce as ze, isEqual as Se, upperFirst as Xe, startCase as Ye, cloneDeep as Ze, remove as Ge } from "lodash";
6
6
  import { escapeHtml as Qe } from "@vue/shared";
7
7
  import { escapeHtml as ns } from "@vue/shared";
@@ -51,7 +51,7 @@ function ot(e, t, n, s, i, o) {
51
51
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
52
52
  }, [
53
53
  e.props.nullText ? (d(), h("option", st, x(e.props.nullText), 1)) : O("", !0),
54
- (d(!0), h(U, null, J(e.renderOptions, (r, l) => {
54
+ (d(!0), h(W, null, J(e.renderOptions, (r, l) => {
55
55
  var a;
56
56
  return d(), h("option", {
57
57
  key: l,
@@ -124,15 +124,15 @@ const Mn = /* @__PURE__ */ Ce(tt, [["render", ot]]), lt = /* @__PURE__ */ C({
124
124
  let rt = 0;
125
125
  const S = Ke([]), In = C({
126
126
  setup() {
127
- return () => W("div", [
128
- J(S, (e) => W(je, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
127
+ return () => U("div", [
128
+ J(S, (e) => U(je, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
129
129
  ]);
130
130
  }
131
131
  });
132
132
  function se(e, t, n) {
133
133
  const s = document.getElementById("vf-overlay-target") ?? document.createElement("div");
134
134
  s.id = "vf-overlay-target", s.removeAttribute("inert"), document.body.appendChild(s);
135
- const i = String(++rt), o = Ue(e), r = W(o, t), l = n != null && n.anchor ? W(lt, { overlayId: i, anchor: n.anchor }, () => [r]) : void 0, a = {
135
+ const i = String(++rt), o = We(e), r = U(o, t), l = n != null && n.anchor ? U(lt, { overlayId: i, anchor: n.anchor }, () => [r]) : void 0, a = {
136
136
  id: i,
137
137
  component: o,
138
138
  props: t,
@@ -391,7 +391,7 @@ const pt = ["id"], mt = {
391
391
  const o = we("autofocus");
392
392
  return d(), be(gt, {
393
393
  class: k(["vf-alert", s.classes])
394
- }, We({
394
+ }, Ue({
395
395
  default: Y(() => [
396
396
  s.isHtml ? (d(), h("div", {
397
397
  key: 0,
@@ -414,7 +414,7 @@ const pt = ["id"], mt = {
414
414
  s.isBare ? void 0 : {
415
415
  name: "footer",
416
416
  fn: Y(() => [
417
- s.shouldConfirm ? (d(), h(U, { key: 0 }, [
417
+ s.shouldConfirm ? (d(), h(W, { key: 0 }, [
418
418
  j((d(), h("button", {
419
419
  class: "primary",
420
420
  onClick: i[0] || (i[0] = () => s.callback(!0))
@@ -772,8 +772,8 @@ function _t(e, t, n, s, i, o) {
772
772
  [r, o.effectiveDisabled]
773
773
  ]),
774
774
  e.shouldDisplayOptions ? (d(), h("div", Dt, [
775
- e.isLoaded ? (d(), h(U, { key: 1 }, [
776
- (d(!0), h(U, null, J(o.effectiveOptions, (l) => (d(), h("div", {
775
+ e.isLoaded ? (d(), h(W, { key: 1 }, [
776
+ (d(!0), h(W, null, J(o.effectiveOptions, (l) => (d(), h("div", {
777
777
  key: String(l.key),
778
778
  class: k(["option", {
779
779
  highlighted: e.highlightedOptionKey === l.key
@@ -833,10 +833,10 @@ const Rt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ C({
833
833
  }), Nt = { class: "content" }, Kt = { class: "message" }, jt = {
834
834
  key: 0,
835
835
  class: "close"
836
- }, Ut = {
836
+ }, Wt = {
837
837
  key: 0,
838
838
  class: "progress-bar"
839
- }, Wt = /* @__PURE__ */ C({
839
+ }, Ut = /* @__PURE__ */ C({
840
840
  __name: "toast",
841
841
  props: {
842
842
  message: {},
@@ -867,7 +867,7 @@ const Rt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ C({
867
867
  w("div", Kt, x(i.message), 1),
868
868
  i.disableClose ? O("", !0) : (d(), h("div", jt, "x"))
869
869
  ]),
870
- i.durationSecs !== null ? (d(), h("div", Ut, [
870
+ i.durationSecs !== null ? (d(), h("div", Wt, [
871
871
  w("div", {
872
872
  ref_key: "progressInnerEl",
873
873
  ref: s,
@@ -877,8 +877,8 @@ const Rt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ C({
877
877
  ], 2));
878
878
  }
879
879
  });
880
- function Un(e) {
881
- const t = se(Wt, {
880
+ function Wn(e) {
881
+ const t = se(Ut, {
882
882
  ...e,
883
883
  callback: () => P(t)
884
884
  });
@@ -926,7 +926,7 @@ const he = {
926
926
  upperCase: Qt,
927
927
  desnake: Jt,
928
928
  usCurrency: en
929
- }, Wn = (e) => ({
929
+ }, Un = (e) => ({
930
930
  ...he,
931
931
  ...e(he)
932
932
  });
@@ -1206,7 +1206,7 @@ class wn {
1206
1206
  E(this, "handleMouseMoveWithContext", this.handleMouseMove.bind(this));
1207
1207
  E(this, "handleTargetMouseEnterWithContext", this.handleTargetMouseEnter.bind(this));
1208
1208
  E(this, "handleTargetMouseLeaveWithContext", this.handleTargetMouseLeave.bind(this));
1209
- this.el = t, this.config = n, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
1209
+ this.el = t, this.config = n, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext);
1210
1210
  }
1211
1211
  configure(t) {
1212
1212
  this.config = t;
@@ -1239,7 +1239,7 @@ class wn {
1239
1239
  this.lastMoveEvt && this.tipEl !== this.lastMoveEvt.target && ((t = this.tipEl) != null && t.contains(this.lastMoveEvt.target) || this.handleTargetMouseLeave());
1240
1240
  }
1241
1241
  destroy() {
1242
- this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
1242
+ this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), this.el.removeEventListener("click", this.handleTargetMouseLeaveWithContext);
1243
1243
  }
1244
1244
  }
1245
1245
  function bn(e) {
@@ -1258,7 +1258,7 @@ export {
1258
1258
  Rt as VfSmartSelect,
1259
1259
  Xn as cloneProp,
1260
1260
  Bn as configureVf,
1261
- Wn as createFilters,
1261
+ Un as createFilters,
1262
1262
  se as createOverlayInjection,
1263
1263
  Ct as desnakeCase,
1264
1264
  ct as dismissOverlayInjectionById,
@@ -1286,7 +1286,7 @@ export {
1286
1286
  Dn as showConfirm,
1287
1287
  An as showConfirmDestroy,
1288
1288
  qn as showContextMenu,
1289
- Un as showToast,
1289
+ Wn as showToast,
1290
1290
  $n as showWait,
1291
1291
  tn as sleep,
1292
1292
  zn as sleepSecs,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.15.0",
4
+ "version": "4.15.1",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -47,6 +47,8 @@ interface ITooltipOptions {
47
47
  class?: string | string[];
48
48
  }
49
49
 
50
+ // todo: improve with mutation observer to see removal of node
51
+
50
52
  class VfTooltip {
51
53
  private lastMoveEvt?: MouseEvent;
52
54
  private checkInterval?: ReturnType<typeof setInterval>;
@@ -66,6 +68,7 @@ class VfTooltip {
66
68
  ) {
67
69
  el.addEventListener('mouseenter', this.handleTargetMouseEnterWithContext);
68
70
  el.addEventListener('mouseleave', this.handleTargetMouseLeaveWithContext);
71
+ el.addEventListener('click', this.handleTargetMouseLeaveWithContext);
69
72
  }
70
73
 
71
74
  configure(config: ITooltipOptions) {
@@ -189,5 +192,6 @@ class VfTooltip {
189
192
 
190
193
  this.el.removeEventListener('mouseenter', this.handleTargetMouseEnterWithContext);
191
194
  this.el.removeEventListener('mouseleave', this.handleTargetMouseLeaveWithContext);
195
+ this.el.removeEventListener('click', this.handleTargetMouseLeaveWithContext);
192
196
  }
193
197
  }