eco-vue-js 0.9.7 → 0.9.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.
@@ -28,8 +28,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  emit("click", event);
29
29
  };
30
30
  return (_ctx, _cache) => {
31
- return openBlock(), createBlock(resolveDynamicComponent(_ctx.to !== void 0 ? unref(RouterLink) : _ctx.tag), mergeProps(
32
- _ctx.tag === "a" ? { href: _ctx.href, target: _ctx.target } : _ctx.to !== void 0 ? { to: _ctx.to, replace: _ctx.replace } : void 0,
31
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.to !== void 0 ? _ctx.disabled ? "a" : unref(RouterLink) : _ctx.tag), mergeProps(
32
+ _ctx.disabled ? void 0 : _ctx.tag === "a" ? { href: _ctx.href, target: _ctx.target } : _ctx.to !== void 0 ? { to: _ctx.to, replace: _ctx.replace } : void 0,
33
33
  {
34
34
  class: ["relative isolate flex select-none items-center justify-center whitespace-nowrap rounded-2xl font-medium outline-none", {
35
35
  [unref(semanticTypeButtonStylesMap)[_ctx.semanticType]]: true,
@@ -17,6 +17,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
17
17
  forbiddenRegexp?: RegExp;
18
18
  requiredSymbols?: string;
19
19
  noChanges?: boolean;
20
+ hasValue?: boolean;
20
21
  }, {
21
22
  validateOnUpdate(): string | undefined;
22
23
  invalidate(message: string): void;
@@ -32,6 +33,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
32
33
  forbiddenRegexp?: RegExp;
33
34
  requiredSymbols?: string;
34
35
  noChanges?: boolean;
36
+ hasValue?: boolean;
35
37
  }> & Readonly<{
36
38
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
37
39
  "onUpdate:is-valid"?: ((value: boolean) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAimBA,iBAAS,cAAc;;iBAZZ,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;WA2GP,OAAO,IAA6B;EAEjD;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WA1ZZ,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;;;wBAmQC,MAAM;qBAzEN,IAAI;;;;;;WA/LjB,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;;;;;kFAianB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAumBA,iBAAS,cAAc;;iBAZZ,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;WA2GP,OAAO,IAA6B;EAEjD;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WA7ZZ,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;eACR,OAAO;;;wBAqQE,MAAM;qBAzEN,IAAI;;;;;;WAlMjB,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;eACR,OAAO;;;;;kFAmalB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -25,7 +25,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  validate: {},
26
26
  forbiddenRegexp: {},
27
27
  requiredSymbols: {},
28
- noChanges: { type: Boolean }
28
+ noChanges: { type: Boolean },
29
+ hasValue: { type: Boolean }
29
30
  },
30
31
  emits: ["update:has-changes", "update:has-value", "update:is-valid"],
31
32
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -62,11 +63,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
63
  const hasChanges = ref(false);
63
64
  const hasBeenValidated = ref(false);
64
65
  const hasValueExact = computed(() => {
66
+ if (props.hasValue) return true;
65
67
  if (!required.value && !mandatory.value) return null;
66
68
  if (Array.isArray(modelValue.value)) return modelValue.value.length !== 0;
67
69
  return modelValue.value !== void 0 && modelValue.value !== null && modelValue.value !== "";
68
70
  });
69
- const hasValue = computed(() => mandatory.value && hasValueExact.value === false ? null : hasValueExact.value);
71
+ const _hasValue = computed(() => mandatory.value && hasValueExact.value === false ? null : hasValueExact.value);
70
72
  const requiredSymbols = computed(() => props.requiredSymbols?.split("") ?? []);
71
73
  const _updateHasChanges = (value) => {
72
74
  if (initModelValue.value === void 0) {
@@ -184,7 +186,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
184
186
  }
185
187
  emit("update:has-changes", value);
186
188
  });
187
- watch(hasValue, (value) => {
189
+ watch(_hasValue, (value) => {
188
190
  if (props.name) {
189
191
  hasValueUpdater?.(props.name, value);
190
192
  }