bootstrap-vue-wrapper 3.0.0 → 3.0.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 +1 @@
1
- .page-link[data-v-f98dc134]{cursor:pointer}.page-item-first[data-v-f98dc134],.page-item-last[data-v-f98dc134],.page-item-number[data-v-f98dc134]:not(.active){display:none}@media(min-width:576px){.page-item-number[data-v-f98dc134]:not(.active){display:block}}@media(min-width:992px){.page-item-first[data-v-f98dc134],.page-item-last[data-v-f98dc134]{display:block}}.cursor-pointer[data-v-24264439]{cursor:pointer}
1
+ .page-link[data-v-f98dc134]{cursor:pointer}.page-item-first[data-v-f98dc134],.page-item-last[data-v-f98dc134],.page-item-number[data-v-f98dc134]:not(.active){display:none}@media(min-width:576px){.page-item-number[data-v-f98dc134]:not(.active){display:block}}@media(min-width:992px){.page-item-first[data-v-f98dc134],.page-item-last[data-v-f98dc134]{display:block}}.cursor-pointer[data-v-6563fdef]{cursor:pointer}
@@ -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,5 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { default as Field } from '../../types/Field.ts';
3
+ import { TableRow } from '../../types/TableRow.ts';
3
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
5
  /**
5
6
  * Field list
@@ -12,12 +13,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
12
13
  * Item list
13
14
  */
14
15
  items: {
15
- type: PropType<{
16
- [key: string]: unknown;
17
- trClass?: string;
18
- id?: string | number;
19
- _showRowDetails?: boolean;
20
- }[]>;
16
+ type: PropType<TableRow[]>;
21
17
  required: true;
22
18
  };
23
19
  /**
@@ -64,7 +60,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
64
60
  };
65
61
  emptyText: {
66
62
  type: StringConstructor;
67
- default: string;
63
+ default: undefined;
68
64
  };
69
65
  }>, {}, {}, {}, {
70
66
  /**
@@ -112,12 +108,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
112
108
  * Item list
113
109
  */
114
110
  items: {
115
- type: PropType<{
116
- [key: string]: unknown;
117
- trClass?: string;
118
- id?: string | number;
119
- _showRowDetails?: boolean;
120
- }[]>;
111
+ type: PropType<TableRow[]>;
121
112
  required: true;
122
113
  };
123
114
  /**
@@ -164,7 +155,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
164
155
  };
165
156
  emptyText: {
166
157
  type: StringConstructor;
167
- default: string;
158
+ default: undefined;
168
159
  };
169
160
  }>> & Readonly<{
170
161
  onOrderChanged?: ((...args: any[]) => any) | undefined;
@@ -1,85 +1,86 @@
1
1
  import h from "./BsTable.vue2.js";
2
- import { openBlock as t, createElementBlock as o, createElementVNode as r, Fragment as a, renderList as u, normalizeClass as d, renderSlot as l, createTextVNode as k, toDisplayString as c, createCommentVNode as y } from "vue";
2
+ import { openBlock as s, createElementBlock as o, createElementVNode as r, Fragment as a, renderList as u, normalizeClass as d, renderSlot as l, createTextVNode as y, toDisplayString as c, createCommentVNode as p } from "vue";
3
3
  /* empty css */
4
4
  import C from "../../_virtual/_plugin-vue_export-helper.js";
5
- const m = { class: "table" }, $ = ["onClick"], v = { key: 0 }, b = ["colspan"], g = { key: 1 }, w = ["colspan"], f = ["textContent"], B = ["data-id", "onClick"], _ = { key: 0 }, S = ["colspan"];
6
- function D(e, p, N, T, V, A) {
7
- return t(), o("table", m, [
5
+ const m = { class: "table" }, v = ["onClick"], $ = { key: 0 }, b = ["colspan"], g = { key: 1 }, f = ["colspan"], w = ["textContent"], B = ["data-id", "onClick"], S = { key: 0 }, T = ["colspan"];
6
+ function _(e, k, D, N, V, A) {
7
+ return s(), o("table", m, [
8
8
  r("thead", null, [
9
9
  r("tr", null, [
10
- (t(!0), o(a, null, u(e.fields, (s) => (t(), o("th", {
11
- key: s.key,
10
+ (s(!0), o(a, null, u(e.fields, (t) => (s(), o("th", {
11
+ key: t.key,
12
12
  class: d({
13
- "cursor-pointer": e.isSortableField(s),
14
- "text-decoration-underline": e.isActiveOrderBy(s.key),
13
+ "cursor-pointer": e.isSortableField(t),
14
+ "text-decoration-underline": e.isActiveOrderBy(t.key),
15
15
  thClass: e.thClass
16
16
  }),
17
- onClick: (i) => e.onHeadClick(s)
17
+ onClick: (i) => e.onHeadClick(t)
18
18
  }, [
19
19
  l(e.$slots, "tr", {}, () => [
20
- k(c(s.label) + " ", 1),
21
- e.isActiveOrderBy(s.key) && e.sortDesc !== void 0 ? (t(), o("i", {
20
+ y(c(t.label) + " ", 1),
21
+ e.isActiveOrderBy(t.key) && e.sortDesc !== void 0 ? (s(), o("i", {
22
22
  key: 0,
23
23
  class: d(e.getSortIconClass())
24
- }, null, 2)) : y("", !0)
24
+ }, null, 2)) : p("", !0)
25
25
  ], !0)
26
- ], 10, $))), 128))
26
+ ], 10, v))), 128))
27
27
  ])
28
28
  ]),
29
29
  r("tbody", null, [
30
- e.isLoading ? (t(), o("tr", v, [
30
+ e.isLoading ? (s(), o("tr", $, [
31
31
  r("td", {
32
32
  colspan: e.fields.length
33
33
  }, [
34
34
  l(e.$slots, "loading", {}, () => [
35
- p[0] || (p[0] = r("div", { class: "d-flex justify-content-center p-2" }, [
35
+ k[0] || (k[0] = r("div", { class: "d-flex justify-content-center p-2" }, [
36
36
  r("div", { class: "spinner-border spinner-border-sm" })
37
37
  ], -1))
38
38
  ], !0)
39
39
  ], 8, b)
40
- ])) : e.items.length === 0 ? (t(), o("tr", g, [
40
+ ])) : e.items.length === 0 ? (s(), o("tr", g, [
41
41
  r("td", {
42
42
  colspan: e.fields.length
43
43
  }, [
44
44
  l(e.$slots, "empty", {}, () => [
45
- r("div", {
45
+ e.emptyText !== void 0 ? (s(), o("div", {
46
+ key: 0,
46
47
  class: "text-center text-muted small",
47
48
  textContent: c(e.emptyText)
48
- }, null, 8, f)
49
+ }, null, 8, w)) : p("", !0)
49
50
  ], !0)
50
- ], 8, w)
51
- ])) : (t(!0), o(a, { key: 2 }, u(e.items, (s, i) => (t(), o(a, { key: i }, [
51
+ ], 8, f)
52
+ ])) : (s(!0), o(a, { key: 2 }, u(e.items, (t, i) => (s(), o(a, { key: i }, [
52
53
  r("tr", {
53
- class: d([s.trClass || "", { "cursor-pointer": e.rowClickable }]),
54
- "data-id": s.id,
55
- onClick: (n) => e.$emit("rowClicked", s)
54
+ class: d([t.trClass || "", { "cursor-pointer": e.rowClickable }]),
55
+ "data-id": t.id,
56
+ onClick: (n) => e.$emit("rowClicked", t)
56
57
  }, [
57
- (t(!0), o(a, null, u(e.fields, (n) => (t(), o("td", {
58
+ (s(!0), o(a, null, u(e.fields, (n) => (s(), o("td", {
58
59
  key: n.key,
59
60
  class: d(n.tdClass || e.tdClass)
60
61
  }, [
61
62
  l(e.$slots, "td", {
62
63
  key: i,
63
64
  field: n.key,
64
- row: s,
65
- value: n.key in s ? s[n.key] : null
65
+ row: t,
66
+ value: n.key in t ? t[n.key] : null
66
67
  }, () => [
67
- k(c(s[n.key]), 1)
68
+ y(c(t[n.key]), 1)
68
69
  ], !0)
69
70
  ], 2))), 128))
70
71
  ], 10, B),
71
- s._showRowDetails ? (t(), o("tr", _, [
72
+ t._showRowDetails ? (s(), o("tr", S, [
72
73
  r("td", {
73
74
  colspan: e.fields.length
74
75
  }, [
75
- l(e.$slots, "row-details", { row: s }, void 0, !0)
76
- ], 8, S)
77
- ])) : y("", !0)
76
+ l(e.$slots, "row-details", { row: t }, void 0, !0)
77
+ ], 8, T)
78
+ ])) : p("", !0)
78
79
  ], 64))), 128))
79
80
  ])
80
81
  ]);
81
82
  }
82
- const O = /* @__PURE__ */ C(h, [["render", D], ["__scopeId", "data-v-24264439"]]);
83
+ const O = /* @__PURE__ */ C(h, [["render", _], ["__scopeId", "data-v-6563fdef"]]);
83
84
  export {
84
85
  O as default
85
86
  };
@@ -60,7 +60,7 @@ const i = t({
60
60
  },
61
61
  emptyText: {
62
62
  type: String,
63
- default: "No data available"
63
+ default: void 0
64
64
  }
65
65
  },
66
66
  emits: ["orderChanged", "rowClicked"],
@@ -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
@@ -0,0 +1,5 @@
1
+ export type TableRow<T extends object = Record<string, unknown>> = T & {
2
+ trClass?: string;
3
+ id?: string | number;
4
+ _showRowDetails?: boolean;
5
+ };
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.2",
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
- };