@signal24/vue-foundation 4.12.3 → 4.13.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.
@@ -0,0 +1 @@
1
+ .yarn/
@@ -2,20 +2,18 @@ type GenericObject = {
2
2
  [key: string]: any;
3
3
  };
4
4
  declare const _default: import("vue").DefineComponent<{}, {
5
- props: Readonly<import("@vue/shared").LooseRequired<{
5
+ props: import("vue").DefineProps<import("@vue/shared").LooseRequired<{
6
6
  modelValue: any;
7
7
  loadFn: () => Promise<GenericObject[]>;
8
8
  nullText?: string | undefined;
9
9
  loadingText?: string | undefined;
10
10
  displayKey?: string | undefined;
11
11
  preprocesor?: ((option: GenericObject) => string) | undefined;
12
- }>> & {
13
- readonly modelValue: boolean;
14
- };
12
+ }>, "modelValue">;
15
13
  options: import("vue").Ref<GenericObject[] | null>;
16
14
  renderOptions: import("vue").ComputedRef<any[] | null>;
17
15
  selectedItem: import("vue").Ref<GenericObject | null>;
18
16
  }, {}, {}, {
19
17
  load(): Promise<void>;
20
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
18
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
21
19
  export default _default;
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
6
6
  message: string | Error;
7
7
  shouldConfirm?: boolean | undefined;
8
8
  callback: (ok: boolean) => void;
9
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
10
  isBare?: boolean | undefined;
11
11
  isHtml?: boolean | undefined;
12
12
  classes?: string[] | undefined;
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
6
6
  formatter?: ((value: any) => string) | undefined;
7
7
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
8
  "update:modelValue": (value: string | null) => void;
9
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
10
  modelValue: string | null | undefined;
11
11
  nullTitle?: string | undefined;
12
12
  placeholder?: string | undefined;
@@ -15,7 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
15
15
  unhide: typeof unhide;
16
16
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
17
  formSubmit: (...args: any[]) => void;
18
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
18
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
19
19
  id?: string | undefined;
20
20
  closeOnMaskClick?: boolean | undefined;
21
21
  scrolls?: boolean | undefined;
@@ -2,7 +2,7 @@ import type { OverlayAnchorOptions } from './overlay-types';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
3
  overlayId: string;
4
4
  anchor: OverlayAnchorOptions;
5
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
6
  overlayId: string;
7
7
  anchor: OverlayAnchorOptions;
8
8
  }>>>, {}, {}>, {
@@ -14,7 +14,7 @@ export interface OverlayInjection<C extends OverlayComponent> {
14
14
  }
15
15
  export declare const OverlayContainer: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
16
  [key: string]: any;
17
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
17
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
18
18
  export type Vue__ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = {
19
19
  __isFragment?: never;
20
20
  __isTeleport?: never;
@@ -84,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
84
84
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
85
85
  optionsLoaded: (options: any[]) => void;
86
86
  'update:modelValue': (value: any) => void;
87
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
87
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
88
88
  modelValue: {
89
89
  type: PropType<any>;
90
90
  default: null;
@@ -7,7 +7,7 @@ export interface IToastOptions {
7
7
  }
8
8
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<IToastOptions & {
9
9
  callback: () => void;
10
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IToastOptions & {
10
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IToastOptions & {
11
11
  callback: () => void;
12
12
  }>>>, {}, {}>;
13
13
  export default _default;
@@ -1,6 +1,7 @@
1
1
  interface IOptions {
2
2
  unhandledErrorSupportText: string;
3
3
  errorHandler: (err: Error) => void;
4
+ defaultDateFormat: string;
4
5
  defaultDateTimeFormat: string;
5
6
  }
6
7
  export declare const VfOptions: IOptions;
@@ -1,7 +1,7 @@
1
1
  var Ve = Object.defineProperty;
2
2
  var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var E = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as C, defineProps as _e, defineEmits as Ne, ref as O, computed as F, openBlock as d, createElementBlock as u, createElementVNode as w, toDisplayString as x, withDirectives as j, createCommentVNode as b, Fragment as U, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ke, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as Ue, markRaw as We, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as be, createSlots as Pe, withCtx as Y, createTextVNode as ae, vModelText as qe, watch as ce, onActivated as ke, onDeactivated as Se } from "vue";
4
+ import { defineComponent as C, defineProps as _e, defineEmits as Ne, ref as O, computed as _, openBlock as d, createElementBlock as u, createElementVNode as w, toDisplayString as x, withDirectives as j, createCommentVNode as b, Fragment as U, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ke, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as Ue, markRaw as We, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as be, createSlots as Pe, withCtx as Y, createTextVNode as ae, vModelText as qe, watch as ce, onActivated as ke, onDeactivated as Se } from "vue";
5
5
  import { compact as ze, debounce as Xe, isEqual as Ce, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
6
6
  import { escapeHtml as Je } from "@vue/shared";
7
7
  import { escapeHtml as ni } from "@vue/shared";
@@ -11,7 +11,7 @@ const nt = C({
11
11
  setup() {
12
12
  const e = _e();
13
13
  Ne(["update:modelValue"]);
14
- const t = O(null), n = F(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = O(e.modelValue ?? null);
14
+ const t = O(null), n = _(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = O(e.modelValue ?? null);
15
15
  return { props: e, options: t, renderOptions: n, selectedItem: i };
16
16
  },
17
17
  watch: {
@@ -85,14 +85,14 @@ const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
85
85
  if (m.y === "center")
86
86
  c = y.top + y.height / 2 - f.height / 2, h.push("anchored-center-y");
87
87
  else {
88
- const I = (y.bottom + f.height < window.innerHeight || m.y === "below") && m.y !== "above";
89
- c = I ? y.bottom : y.top - f.height, h.push(I ? "anchored-top" : "anchored-bottom");
88
+ const H = (y.bottom + f.height < window.innerHeight || m.y === "below") && m.y !== "above";
89
+ c = H ? y.bottom : y.top - f.height, h.push(H ? "anchored-top" : "anchored-bottom");
90
90
  }
91
91
  if (m.x === "center")
92
92
  T = y.left + y.width / 2 - f.width / 2, h.push("anchored-center-x");
93
93
  else {
94
- const I = (y.left + f.width < window.innerWidth || m.x === "left") && m.x !== "right";
95
- T = I ? y.left : y.right - f.width, h.push(I ? "anchored-left" : "anchored-right");
94
+ const H = (y.left + f.width < window.innerWidth || m.x === "left") && m.x !== "right";
95
+ T = H ? y.left : y.right - f.width, h.push(H ? "anchored-left" : "anchored-right");
96
96
  }
97
97
  return {
98
98
  styles: {
@@ -199,13 +199,14 @@ function $n(e, t) {
199
199
  });
200
200
  return () => P(n);
201
201
  }
202
- const N = {
202
+ const M = {
203
203
  unhandledErrorSupportText: "please contact support",
204
204
  errorHandler: (e) => console.error("Unhandled error:", e),
205
- defaultDateTimeFormat: "MM/dd/yy HH:mm"
205
+ defaultDateFormat: "M/d/yy",
206
+ defaultDateTimeFormat: "M/d/yy H:mm"
206
207
  };
207
208
  function Bn(e) {
208
- Object.assign(N, e);
209
+ Object.assign(M, e);
209
210
  }
210
211
  class z extends Error {
211
212
  constructor(t) {
@@ -217,20 +218,20 @@ function ut(e) {
217
218
 
218
219
  ${oe(e).message}
219
220
 
220
- Please refresh the page and try again. If this error persists, ${N.unhandledErrorSupportText}.`;
221
+ Please refresh the page and try again. If this error persists, ${M.unhandledErrorSupportText}.`;
221
222
  }
222
223
  function oe(e) {
223
224
  return e instanceof Error ? e : new Error(String(e));
224
225
  }
225
226
  async function Vn(e, t) {
226
227
  const n = oe(e);
227
- return n instanceof z || N.errorHandler(n), t ? de(t, n) : de(n);
228
+ return n instanceof z || M.errorHandler(n), t ? de(t, n) : de(n);
228
229
  }
229
230
  async function Fn(e) {
230
231
  const t = oe(e);
231
- t instanceof z || N.errorHandler(t);
232
+ t instanceof z || M.errorHandler(t);
232
233
  }
233
- const $ = Symbol("MaskState");
234
+ const B = Symbol("MaskState");
234
235
  function _n(e, t) {
235
236
  const n = e.$.vnode.el, i = n.closest(".vf-modal");
236
237
  return ht(i ?? n, t);
@@ -240,14 +241,14 @@ function Nn(e) {
240
241
  return Me(n ?? t);
241
242
  }
242
243
  function ht(e, t) {
243
- if (!e[$]) {
244
+ if (!e[B]) {
244
245
  const n = document.createElement("div");
245
- n.classList.add("vf-mask"), e.appendChild(n), e[$] = { maskEl: n };
246
+ n.classList.add("vf-mask"), e.appendChild(n), e[B] = { maskEl: n };
246
247
  }
247
- return e[$].maskEl.innerText = t ?? "", () => Me(e);
248
+ return e[B].maskEl.innerText = t ?? "", () => Me(e);
248
249
  }
249
250
  function Me(e) {
250
- e[$] && e.removeChild(e[$].maskEl);
251
+ e[B] && e.removeChild(e[B].maskEl);
251
252
  }
252
253
  const Q = Symbol("FormMaskState");
253
254
  function ft(e, t, n) {
@@ -290,7 +291,7 @@ const pt = ["id"], mt = {
290
291
  setup(e, { expose: t }) {
291
292
  const n = ee(), i = e;
292
293
  t({ mask: m, unmask: y, hide: f, unhide: h });
293
- const s = O(), o = O(), r = O(!1), l = F(() => ze([i.class, r.value && "hidden"]));
294
+ const s = O(), o = O(), r = O(!1), l = _(() => ze([i.class, r.value && "hidden"]));
294
295
  L(() => {
295
296
  var c;
296
297
  document.body.classList.add("vf-modal-open"), i.closeOnMaskClick && (window.addEventListener("keydown", p), (c = s.value) == null || c.addEventListener("click", a));
@@ -330,7 +331,7 @@ const pt = ["id"], mt = {
330
331
  w("form", {
331
332
  action: ".",
332
333
  class: k(["vf-modal", { scrolls: c.scrolls }]),
333
- onSubmit: T[0] || (T[0] = te((M) => c.$emit("formSubmit"), ["prevent"])),
334
+ onSubmit: T[0] || (T[0] = te((I) => c.$emit("formSubmit"), ["prevent"])),
334
335
  ref_key: "form",
335
336
  ref: o
336
337
  }, [
@@ -363,7 +364,7 @@ const pt = ["id"], mt = {
363
364
  callback: { type: Function }
364
365
  },
365
366
  setup(e) {
366
- const t = e, n = F(() => t.message instanceof Error ? ut(t.message) : t.message);
367
+ const t = e, n = _(() => t.message instanceof Error ? ut(t.message) : t.message);
367
368
  return (i, s) => {
368
369
  const o = Oe("autofocus");
369
370
  return d(), be(gt, {
@@ -465,7 +466,7 @@ function Lt(e) {
465
466
  function Kn() {
466
467
  return St();
467
468
  }
468
- const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", It = {
469
+ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", It = {
469
470
  props: {
470
471
  modelValue: {
471
472
  type: null,
@@ -577,7 +578,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
577
578
  }
578
579
  } else
579
580
  this.nullTitle && e.unshift({
580
- key: H,
581
+ key: D,
581
582
  title: this.nullTitle
582
583
  });
583
584
  return e;
@@ -603,7 +604,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
603
604
  },
604
605
  effectiveOptions() {
605
606
  var e;
606
- this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ?? H);
607
+ this.modelValue && !this.selectedOption && this.handleValueChanged(), this.highlightedOptionKey && !this.effectiveOptions.find((t) => t.key == this.highlightedOptionKey) && (this.highlightedOptionKey = ((e = this.effectiveOptions[0]) == null ? void 0 : e.key) ?? D);
607
608
  }
608
609
  },
609
610
  async mounted() {
@@ -660,7 +661,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
660
661
  },
661
662
  setHighlightedOptionKey(e) {
662
663
  var t;
663
- this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ?? H : this.nullTitle && (this.highlightedOptionKey = H);
664
+ this.selectedOption ? this.highlightedOptionKey = this.getOptionKey(this.selectedOption) : e ? this.highlightedOptionKey = ((t = this.effectiveOptions) == null ? void 0 : t[0].key) ?? D : this.nullTitle && (this.highlightedOptionKey = D);
664
665
  },
665
666
  getOptionKey(e) {
666
667
  var t;
@@ -709,7 +710,7 @@ const H = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
709
710
  },
710
711
  selectOption(e) {
711
712
  var t;
712
- if (this.isSearching = !1, e.key == H)
713
+ if (this.isSearching = !1, e.key == D)
713
714
  this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
714
715
  else if (e.key === he) {
715
716
  const n = this.searchText.trim();
@@ -793,10 +794,10 @@ const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
793
794
  },
794
795
  emits: ["update:modelValue"],
795
796
  setup(e, { emit: t }) {
796
- const n = e, i = F(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, a]) => ({
797
+ const n = e, i = _(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, a]) => ({
797
798
  value: l,
798
799
  label: a
799
- }))), s = F(() => n.formatter ? (l) => {
800
+ }))), s = _(() => n.formatter ? (l) => {
800
801
  var a;
801
802
  return (a = n.formatter) == null ? void 0 : a.call(n, l.label);
802
803
  } : (l) => l.label), o = t, r = O(i.value.find((l) => l.value === n.modelValue) ?? null);
@@ -947,10 +948,10 @@ function qn(e, t) {
947
948
  return c();
948
949
  const T = h.innerHTML;
949
950
  h.classList.add("pending-confirm"), h.innerText = "Confirm";
950
- const M = () => {
951
- h.classList.remove("pending-confirm"), h.innerHTML = T, h.removeEventListener("mouseleave", M);
951
+ const I = () => {
952
+ h.classList.remove("pending-confirm"), h.innerHTML = T, h.removeEventListener("mouseleave", I);
952
953
  };
953
- h.addEventListener("mouseleave", M), f.stopPropagation();
954
+ h.addEventListener("mouseleave", I), f.stopPropagation();
954
955
  }
955
956
  }
956
957
  const tn = (e) => new Promise((t) => setTimeout(t, e)), zn = (e) => tn(e * 1e3);
@@ -984,11 +985,11 @@ function Gn(e, t) {
984
985
  }
985
986
  function sn(e, t) {
986
987
  const n = {};
987
- if (t.elScrolledToBottom && (n.el = new B(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
988
+ if (t.elScrolledToBottom && (n.el = new V(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
988
989
  const i = De(e.vnode.el);
989
- i ? n.ancestor = new B(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
990
+ i ? n.ancestor = new V(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
990
991
  }
991
- t.windowScrolledToBottom && (n.window = new B(window, t.windowScrolledToBottom)), e[le] = n;
992
+ t.windowScrolledToBottom && (n.window = new V(window, t.windowScrolledToBottom)), e[le] = n;
992
993
  }
993
994
  function on(e) {
994
995
  var n, i, s;
@@ -1008,7 +1009,7 @@ function De(e) {
1008
1009
  const n = window.getComputedStyle(t);
1009
1010
  return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t : De(t);
1010
1011
  }
1011
- class B {
1012
+ class V {
1012
1013
  constructor(t, n) {
1013
1014
  E(this, "isTripped", !1);
1014
1015
  E(this, "onScrollWithContext", this.onScroll.bind(this));
@@ -1040,14 +1041,14 @@ function ve(e, t) {
1040
1041
  }
1041
1042
  const rn = {
1042
1043
  mounted: an
1043
- }, D = Symbol("ConfirmState");
1044
+ }, A = Symbol("ConfirmState");
1044
1045
  function an(e) {
1045
1046
  e.addEventListener("click", (t) => {
1046
1047
  const n = Date.now();
1047
- if (e[D]) {
1048
- if (n - e[D].initTime < 300)
1048
+ if (e[A]) {
1049
+ if (n - e[A].initTime < 300)
1049
1050
  return;
1050
- e[D].resetHandler(), e.dispatchEvent(new Event("confirm"));
1051
+ e[A].resetHandler(), e.dispatchEvent(new Event("confirm"));
1051
1052
  return;
1052
1053
  }
1053
1054
  t.preventDefault(), t.stopImmediatePropagation();
@@ -1055,10 +1056,10 @@ function an(e) {
1055
1056
  initTime: n,
1056
1057
  preconfirmHtml: e.innerHTML,
1057
1058
  resetHandler: () => {
1058
- e.innerHTML = i.preconfirmHtml, e.blur(), e.removeEventListener("mouseout", i.resetHandler), delete e[D];
1059
+ e.innerHTML = i.preconfirmHtml, e.blur(), e.removeEventListener("mouseout", i.resetHandler), delete e[A];
1059
1060
  }
1060
1061
  };
1061
- e[D] = i, e.innerHTML = "Confirm", e.addEventListener("mouseout", i.resetHandler);
1062
+ e[A] = i, e.innerHTML = "Confirm", e.addEventListener("mouseout", i.resetHandler);
1062
1063
  });
1063
1064
  }
1064
1065
  const cn = {
@@ -1091,7 +1092,7 @@ function hn(e, t) {
1091
1092
  const g = /* @__PURE__ */ new Date();
1092
1093
  g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1093
1094
  }
1094
- r || (r = N.defaultDateTimeFormat);
1095
+ r || (e.attributes.getNamedItem("date-only") !== null ? r = M.defaultDateFormat : r = M.defaultDateTimeFormat);
1095
1096
  let l = G(o, r);
1096
1097
  return n && (l = n + " " + l), l;
1097
1098
  }
@@ -1110,7 +1111,7 @@ const mn = {
1110
1111
  beforeMount: Ee,
1111
1112
  updated: Ee,
1112
1113
  unmounted: $e
1113
- }, _ = Symbol("HasAutoFocused"), re = [];
1114
+ }, N = Symbol("HasAutoFocused"), re = [];
1114
1115
  function vn() {
1115
1116
  re.forEach(Ae);
1116
1117
  }
@@ -1122,17 +1123,17 @@ function Ee(e, t) {
1122
1123
  if (!t.value)
1123
1124
  return $e(e);
1124
1125
  const n = new Date(t.value), i = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
1125
- e[_] || re.push(e), e[_] = {
1126
+ e[N] || re.push(e), e[N] = {
1126
1127
  startTs: s,
1127
1128
  includeSeconds: o
1128
1129
  }, Ae(e);
1129
1130
  }
1130
1131
  function Ae(e) {
1131
- const t = e[_], n = Math.round((Date.now() - t.startTs) / 1e3);
1132
+ const t = e[N], n = Math.round((Date.now() - t.startTs) / 1e3);
1132
1133
  e.innerText = yn(n, t.includeSeconds);
1133
1134
  }
1134
1135
  function $e(e) {
1135
- e[_] && (Qe(re, e), delete e[_]), e.innerText = "-";
1136
+ e[N] && (Qe(re, e), delete e[N]), e.innerText = "-";
1136
1137
  }
1137
1138
  function yn(e, t) {
1138
1139
  const n = [], i = Math.floor(e / 86400);
@@ -1142,17 +1143,17 @@ function yn(e, t) {
1142
1143
  const o = Math.floor(e / 60);
1143
1144
  return (i || s || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
1144
1145
  }
1145
- const A = Symbol("InfiniteScrollHandler"), gn = {
1146
+ const $ = Symbol("InfiniteScrollHandler"), gn = {
1146
1147
  mounted(e, t) {
1147
- e[A] = new B(e, t.value);
1148
+ e[$] = new V(e, t.value);
1148
1149
  },
1149
1150
  updated(e, t) {
1150
1151
  var n;
1151
- (n = e[A]) == null || n.uninstall(), e[A] = new B(e, t.value);
1152
+ (n = e[$]) == null || n.uninstall(), e[$] = new V(e, t.value);
1152
1153
  },
1153
1154
  unmounted(e) {
1154
1155
  var t;
1155
- (t = e[A]) == null || t.uninstall(), delete e[A];
1156
+ (t = e[$]) == null || t.uninstall(), delete e[$];
1156
1157
  }
1157
1158
  }, En = {
1158
1159
  beforeMount: Te,
@@ -1165,7 +1166,7 @@ const Tn = {
1165
1166
  mounted: we,
1166
1167
  updated: we,
1167
1168
  unmounted: Be
1168
- }, V = Symbol("TooltipState");
1169
+ }, F = Symbol("TooltipState");
1169
1170
  function we(e, t) {
1170
1171
  var i;
1171
1172
  let n = ((i = e.attributes.getNamedItem("tip")) == null ? void 0 : i.value) ?? t.value;
@@ -1174,13 +1175,13 @@ function we(e, t) {
1174
1175
  content: n,
1175
1176
  html: e.getAttribute("html") !== null
1176
1177
  };
1177
- e[V] ? e[V].configure(s) : e[V] = new wn(e, s);
1178
+ e[F] ? e[F].configure(s) : e[F] = new wn(e, s);
1178
1179
  } else
1179
1180
  Be(e);
1180
1181
  }
1181
1182
  function Be(e) {
1182
1183
  var t;
1183
- (t = e[V]) == null || t.destroy(), delete e[V];
1184
+ (t = e[F]) == null || t.destroy(), delete e[F];
1184
1185
  }
1185
1186
  class wn {
1186
1187
  constructor(t, n) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.12.3",
4
+ "version": "4.13.1",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -40,7 +40,7 @@
40
40
  "@signal24/openapi-client-codegen": "^1.1.0",
41
41
  "date-fns": "^3.0.6",
42
42
  "lodash": "^4.17.21",
43
- "vue": "^3.3.13"
43
+ "vue": "^3.4.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@nabla/vite-plugin-eslint": "^2.0.2",
@@ -72,7 +72,7 @@
72
72
  "typescript": "~5.3.3",
73
73
  "vite": "^5.0.10",
74
74
  "vitest": "^1.1.0",
75
- "vue": "^3.3.13",
75
+ "vue": "^3.4.0",
76
76
  "vue-tsc": "^1.8.27"
77
77
  },
78
78
  "packageManager": "yarn@4.0.2"
package/src/config.ts CHANGED
@@ -1,13 +1,15 @@
1
1
  interface IOptions {
2
2
  unhandledErrorSupportText: string;
3
3
  errorHandler: (err: Error) => void;
4
+ defaultDateFormat: string;
4
5
  defaultDateTimeFormat: string;
5
6
  }
6
7
 
7
8
  export const VfOptions: IOptions = {
8
9
  unhandledErrorSupportText: 'please contact support',
9
10
  errorHandler: err => console.error('Unhandled error:', err),
10
- defaultDateTimeFormat: 'MM/dd/yy HH:mm'
11
+ defaultDateFormat: 'M/d/yy',
12
+ defaultDateTimeFormat: 'M/d/yy H:mm'
11
13
  };
12
14
 
13
15
  export function configureVf(options: Partial<IOptions>) {
@@ -38,7 +38,11 @@ function getDateTimeValue(el: HTMLElement, binding: DirectiveBinding<string>) {
38
38
  }
39
39
 
40
40
  if (!formatSpec) {
41
- formatSpec = VfOptions.defaultDateTimeFormat;
41
+ if (el.attributes.getNamedItem('date-only') !== null) {
42
+ formatSpec = VfOptions.defaultDateFormat;
43
+ } else {
44
+ formatSpec = VfOptions.defaultDateTimeFormat;
45
+ }
42
46
  }
43
47
 
44
48
  let result = format(theDate, formatSpec);
Binary file