@effect-app/vue-components 1.4.0 → 1.4.2

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,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as x, getCurrentInstance as N, useId as V, computed as a, onMounted as c, ref as $, watchEffect as B, watch as I, onUnmounted as _, renderSlot as k, normalizeProps as q, guardReactiveProps as D, createElementVNode as F, normalizeClass as L, createBlock as O, createCommentVNode as P, unref as M, openBlock as S, mergeProps as U } from "vue";
2
+ import { defineComponent as x, getCurrentInstance as N, useId as V, computed as a, onMounted as c, ref as $, watchEffect as B, watch as I, onUnmounted as _, renderSlot as k, normalizeProps as q, guardReactiveProps as D, createElementVNode as L, normalizeClass as O, createBlock as P, createCommentVNode as F, unref as M, openBlock as S, mergeProps as U } from "vue";
3
3
  import { useStore as z } from "@tanstack/vue-form";
4
4
  import A from "./vue-components.es20.js";
5
5
 
@@ -28,10 +28,10 @@ const H = /* @__PURE__ */ x({
28
28
  c(() => {
29
29
  if (!m.value && !e.meta?.required && e.meta?.nullableOrUndefined === "null") {
30
30
  const t = r.value.meta.isDirty;
31
- l.setValue(null), l.setMeta((p) => ({ ...p, isDirty: t }));
31
+ l.setValue(null), l.setMeta((d) => ({ ...d, isDirty: t }));
32
32
  }
33
33
  });
34
- const { mapError: C, removeError: d, showErrors: E, showErrorsOn: w } = e.field.form.errorContext, o = $(!1);
34
+ const { mapError: C, removeError: f, showErrors: E, showErrorsOn: w } = e.field.form.errorContext, o = $(!1);
35
35
  B(() => {
36
36
  (E.value || w === "onChange") && (o.value = !0);
37
37
  });
@@ -41,7 +41,7 @@ const H = /* @__PURE__ */ x({
41
41
  c(() => {
42
42
  m.value && s();
43
43
  });
44
- const f = a(() => !o.value && u.value !== "select" ? [] : h.value);
44
+ const p = a(() => !o.value && u.value !== "select" ? [] : h.value);
45
45
  I(
46
46
  () => r.value.meta.errors,
47
47
  () => {
@@ -49,10 +49,10 @@ const H = /* @__PURE__ */ x({
49
49
  inputId: n,
50
50
  errors: r.value.meta.errors.map((t) => t.message).filter(Boolean),
51
51
  label: e.label
52
- }) : d(n);
52
+ }) : f(n);
53
53
  }
54
54
  ), _(() => {
55
- d(n), e.field.form.deleteField(e.field.name);
55
+ f(n);
56
56
  });
57
57
  const i = a(() => ({
58
58
  id: n,
@@ -64,25 +64,25 @@ const H = /* @__PURE__ */ x({
64
64
  name: e.field.name,
65
65
  modelValue: e.field.state.value,
66
66
  handleChange: b,
67
- errorMessages: f.value,
68
- error: !!f.value.length,
67
+ errorMessages: p.value,
68
+ error: !!p.value.length,
69
69
  field: e.field,
70
70
  setRealDirty: s,
71
71
  type: u.value,
72
72
  label: `${e.label}${e.meta?.required ? " *" : ""}`,
73
73
  options: e.options
74
74
  }));
75
- return (t, p) => k(t.$slots, "default", q(D(i.value)), () => [
76
- F("div", {
77
- class: L(t.$attrs.class),
75
+ return (t, d) => k(t.$slots, "default", q(D(i.value)), () => [
76
+ L("div", {
77
+ class: O(t.$attrs.class),
78
78
  onFocusout: s
79
79
  }, [
80
- M(g) ? (S(), O(A, U({
80
+ M(g) ? (S(), P(A, U({
81
81
  key: 0,
82
82
  "input-props": i.value
83
83
  }, t.$attrs, {
84
84
  "vuetify-value": i.value.field.state.value
85
- }), null, 16, ["input-props", "vuetify-value"])) : P("", !0)
85
+ }), null, 16, ["input-props", "vuetify-value"])) : F("", !0)
86
86
  ], 34)
87
87
  ]);
88
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^3.18.0",
@@ -17,6 +17,7 @@
17
17
  "@storybook/vue3-vite": "^9.1.9",
18
18
  "@types/node": "^24.6.0",
19
19
  "@vitejs/plugin-vue": "^6.0.1",
20
+ "@vueuse/core": "^13.9.0",
20
21
  "@vue/test-utils": "^2.4.6",
21
22
  "dprint": "^0.50.2",
22
23
  "jsdom": "^27.0.0",
@@ -46,11 +47,11 @@
46
47
  },
47
48
  "dependencies": {
48
49
  "@opentelemetry/api": "^1.9.0",
49
- "@tanstack/vue-form": "^1.23.4",
50
+ "@tanstack/vue-form": "^1.23.5",
50
51
  "highlight.js": "^11.11.1",
51
52
  "vue3-highlightjs": "^1.0.5",
52
- "effect-app": "3.9.0",
53
- "@effect-app/vue": "2.82.0"
53
+ "@effect-app/vue": "2.82.0",
54
+ "effect-app": "3.9.0"
54
55
  },
55
56
  "scripts": {
56
57
  "build": "pnpm build:run",
@@ -145,7 +145,6 @@ watch(
145
145
 
146
146
  onUnmounted(() => {
147
147
  removeError(id)
148
- props.field.form.deleteField(props.field.name)
149
148
  })
150
149
 
151
150
  const inputProps: ComputedRef<InputProps<From, Name>> = computed(() => ({