bootstrap-vue-wrapper 3.0.0 → 3.0.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,4 +1,4 @@
1
- import { useValidator as i } from "../../node_modules/@zemkogabor/vue-form-validator/dist/index.js";
1
+ import { useValidator as i } from "@zemkogabor/vue-form-validator";
2
2
  import { defineComponent as l, ref as n } from "vue";
3
3
  const r = l({
4
4
  name: "BsCheckbox",
@@ -1,4 +1,4 @@
1
- import { useValidator as i } from "../../node_modules/@zemkogabor/vue-form-validator/dist/index.js";
1
+ import { useValidator as i } from "@zemkogabor/vue-form-validator";
2
2
  import { defineComponent as a, ref as n } from "vue";
3
3
  const o = a({
4
4
  name: "BsInput",
@@ -1,4 +1,4 @@
1
- import { useValidator as t } from "../../node_modules/@zemkogabor/vue-form-validator/dist/index.js";
1
+ import { useValidator as t } from "@zemkogabor/vue-form-validator";
2
2
  import { defineComponent as i, ref as a } from "vue";
3
3
  const d = i({
4
4
  name: "BsRadio",
@@ -1,4 +1,4 @@
1
- import { useValidator as r } from "../../node_modules/@zemkogabor/vue-form-validator/dist/index.js";
1
+ import { useValidator as r } from "@zemkogabor/vue-form-validator";
2
2
  import { defineComponent as a, ref as i } from "vue";
3
3
  const d = a({
4
4
  name: "BsSelect",
@@ -1,4 +1,4 @@
1
- import { useValidator as l } from "../../node_modules/@zemkogabor/vue-form-validator/dist/index.js";
1
+ import { useValidator as a } from "@zemkogabor/vue-form-validator";
2
2
  import { defineComponent as i, ref as r } from "vue";
3
3
  const u = i({
4
4
  name: "BsTextarea",
@@ -58,7 +58,7 @@ const u = i({
58
58
  const t = r(null);
59
59
  return {
60
60
  inputRef: t,
61
- validator: l(t)
61
+ validator: a(t)
62
62
  };
63
63
  },
64
64
  methods: {
@@ -74,9 +74,9 @@ const u = i({
74
74
  * @param event
75
75
  */
76
76
  onInput(t) {
77
- const a = t.target;
78
- let e = a.value;
79
- this.trim && (e = a.value.trim()), this.emptyStringToNull && e === "" && (e = null), this.$emit("update:modelValue", e);
77
+ const l = t.target;
78
+ let e = l.value;
79
+ this.trim && (e = l.value.trim()), this.emptyStringToNull && e === "" && (e = null), this.$emit("update:modelValue", e);
80
80
  },
81
81
  /**
82
82
  * On invalid event
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-vue-wrapper",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Bootstrap 5 components in Vue3 wrapper.",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,63 +0,0 @@
1
- import { inject as d, ref as v } from "vue";
2
- const f = /* @__PURE__ */ Symbol("VALIDATOR_CONFIG");
3
- function c(o) {
4
- const a = d(
5
- f,
6
- void 0
7
- );
8
- if (!a || !a.messages)
9
- throw new Error(
10
- "[vue-form-validator] Validator messages are not provided. Did you forget to call app.provide(VALIDATOR_CONFIG_KEY, ...)?"
11
- );
12
- const r = a.messages, n = v(null);
13
- function u(t) {
14
- const i = o.value;
15
- i !== null && (t !== null ? i.setCustomValidity(t) : i.setCustomValidity(""), n.value = e(i));
16
- }
17
- function e(t) {
18
- if (t.validity.valueMissing)
19
- return r.valueMissing;
20
- if (t.validity.tooShort)
21
- return r.tooShort(t.minLength);
22
- if (t.validity.tooLong)
23
- return r.tooLong(t.maxLength);
24
- if (t.validity.rangeUnderflow)
25
- return r.rangeUnderflow(t.min);
26
- if (t.validity.rangeOverflow)
27
- return r.rangeOverflow(t.max);
28
- if (t.validity.typeMismatch) {
29
- if (t.type === "email")
30
- return r.typeMismatchEmail;
31
- if (t.type === "url")
32
- return r.typeMismatchUrl;
33
- }
34
- if (t.validity.badInput) {
35
- if (t.type === "number")
36
- return r.badInputNumber;
37
- if (t.type === "date")
38
- return r.badInputDate;
39
- }
40
- if (t.validity.patternMismatch)
41
- return r.patternMismatch;
42
- if (t.validity.stepMismatch) {
43
- const i = Math.floor(Number(t.value) / Number(t.step)) * Number(t.step), m = Math.ceil(Number(t.value) / Number(t.step)) * Number(t.step);
44
- return r.stepMismatch(i, m);
45
- }
46
- return t.validity.customError ? t.validationMessage : null;
47
- }
48
- function l(t) {
49
- t.target !== null && (n.value = e(t.target));
50
- }
51
- function s() {
52
- return n.value;
53
- }
54
- return {
55
- onInvalid: l,
56
- getInvalidMessage: s,
57
- setCustomError: u
58
- };
59
- }
60
- export {
61
- f as VALIDATOR_CONFIG_KEY,
62
- c as useValidator
63
- };