bootstrap-vue-wrapper 2.3.3 → 2.3.4

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,18 +1,18 @@
1
1
  import y from "./BsTable.vue2.js";
2
- import { resolveDirective as v, openBlock as t, createElementBlock as o, createElementVNode as r, Fragment as d, renderList as c, normalizeClass as a, renderSlot as n, createTextVNode as p, toDisplayString as u, createCommentVNode as h, withDirectives as m, pushScopeId as C, popScopeId as _ } from "vue";
2
+ import { resolveDirective as v, openBlock as t, createElementBlock as o, createElementVNode as r, Fragment as a, renderList as c, normalizeClass as d, renderSlot as n, createTextVNode as p, toDisplayString as u, createCommentVNode as h, withDirectives as C, pushScopeId as m, popScopeId as _ } from "vue";
3
3
  import "./BsTable.vue3.js";
4
4
  import $ from "../../_virtual/_plugin-vue_export-helper.js";
5
- const b = (e) => (C("data-v-17dfe1d3"), e = e(), _(), e), f = { class: "table" }, g = ["onClick"], w = { key: 0 }, S = ["colspan"], B = /* @__PURE__ */ b(() => /* @__PURE__ */ r("div", { class: "d-flex justify-content-center p-2" }, [
5
+ const b = (e) => (m("data-v-c310373d"), e = e(), _(), e), g = { class: "table" }, w = ["onClick"], S = { key: 0 }, f = ["colspan"], B = /* @__PURE__ */ b(() => /* @__PURE__ */ r("div", { class: "d-flex justify-content-center p-2" }, [
6
6
  /* @__PURE__ */ r("div", { class: "spinner-border spinner-border-sm" })
7
7
  ], -1)), D = { key: 1 }, I = ["colspan"], N = { class: "text-center text-muted small" }, V = ["data-id", "onClick"], A = { key: 0 }, E = ["colspan"];
8
8
  function F(e, L, O, T, j, z) {
9
9
  const k = v("t");
10
- return t(), o("table", f, [
10
+ return t(), o("table", g, [
11
11
  r("thead", null, [
12
12
  r("tr", null, [
13
- (t(!0), o(d, null, c(e.fields, (s) => (t(), o("th", {
13
+ (t(!0), o(a, null, c(e.fields, (s) => (t(), o("th", {
14
14
  key: s.key,
15
- class: a({
15
+ class: d({
16
16
  "cursor-pointer": e.isSortableField(s),
17
17
  "text-decoration-underline": e.isActiveOrderBy(s.key),
18
18
  thClass: e.thClass
@@ -23,40 +23,40 @@ function F(e, L, O, T, j, z) {
23
23
  p(u(s.label) + " ", 1),
24
24
  e.isActiveOrderBy(s.key) && e.sortDesc !== void 0 ? (t(), o("i", {
25
25
  key: 0,
26
- class: a(e.getSortIconClass())
26
+ class: d(e.getSortIconClass())
27
27
  }, null, 2)) : h("", !0)
28
28
  ], !0)
29
- ], 10, g))), 128))
29
+ ], 10, w))), 128))
30
30
  ])
31
31
  ]),
32
32
  r("tbody", null, [
33
- e.isLoading ? (t(), o("tr", w, [
33
+ e.isLoading ? (t(), o("tr", S, [
34
34
  r("td", {
35
35
  colspan: e.fields.length
36
36
  }, [
37
37
  n(e.$slots, "loading", {}, () => [
38
38
  B
39
39
  ], !0)
40
- ], 8, S)
40
+ ], 8, f)
41
41
  ])) : e.items.length === 0 ? (t(), o("tr", D, [
42
42
  r("td", {
43
43
  colspan: e.fields.length
44
44
  }, [
45
45
  n(e.$slots, "empty", {}, () => [
46
- m(r("div", N, null, 512), [
46
+ C(r("div", N, null, 512), [
47
47
  [k, "table.empty_text"]
48
48
  ])
49
49
  ], !0)
50
50
  ], 8, I)
51
- ])) : (t(!0), o(d, { key: 2 }, c(e.items, (s, i) => (t(), o(d, { key: i }, [
51
+ ])) : (t(!0), o(a, { key: 2 }, c(e.items, (s, i) => (t(), o(a, { key: i }, [
52
52
  r("tr", {
53
- class: a([s.trClass || "", { "cursor-pointer": e.rowClickable }]),
53
+ class: d([s.trClass || "", { "cursor-pointer": e.rowClickable }]),
54
54
  "data-id": s.id,
55
55
  onClick: (l) => e.$emit("rowClicked", s)
56
56
  }, [
57
- (t(!0), o(d, null, c(e.fields, (l) => (t(), o("td", {
57
+ (t(!0), o(a, null, c(e.fields, (l) => (t(), o("td", {
58
58
  key: l.key,
59
- class: a(e.tdClass)
59
+ class: d(l.tdClass || e.tdClass)
60
60
  }, [
61
61
  n(e.$slots, "td", {
62
62
  key: i,
@@ -79,7 +79,7 @@ function F(e, L, O, T, j, z) {
79
79
  ])
80
80
  ]);
81
81
  }
82
- const J = /* @__PURE__ */ $(y, [["render", F], ["__scopeId", "data-v-17dfe1d3"]]);
82
+ const J = /* @__PURE__ */ $(y, [["render", F], ["__scopeId", "data-v-c310373d"]]);
83
83
  export {
84
84
  J as default
85
85
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .page-link[data-v-ff85ae67]{cursor:pointer}.page-item-first[data-v-ff85ae67],.page-item-last[data-v-ff85ae67],.page-item-number[data-v-ff85ae67]:not(.active){display:none}@media (min-width: 576px){.page-item-number[data-v-ff85ae67]:not(.active){display:block}}@media (min-width: 992px){.page-item-first[data-v-ff85ae67],.page-item-last[data-v-ff85ae67]{display:block}}.cursor-pointer[data-v-17dfe1d3]{cursor:pointer}
1
+ .page-link[data-v-ff85ae67]{cursor:pointer}.page-item-first[data-v-ff85ae67],.page-item-last[data-v-ff85ae67],.page-item-number[data-v-ff85ae67]:not(.active){display:none}@media (min-width: 576px){.page-item-number[data-v-ff85ae67]:not(.active){display:block}}@media (min-width: 992px){.page-item-first[data-v-ff85ae67],.page-item-last[data-v-ff85ae67]{display:block}}.cursor-pointer[data-v-c310373d]{cursor:pointer}
@@ -2,4 +2,5 @@ export default interface Field {
2
2
  key: string;
3
3
  label: string;
4
4
  sort?: boolean;
5
+ tdClass?: string;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-vue-wrapper",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Bootstrap 5 components in Vue3 wrapper.",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/CHANGELOG.md DELETED
@@ -1,81 +0,0 @@
1
- # Changelog
2
-
3
- ## [2.0.0] - 2024-02-01
4
- **Major Changes**
5
- - Codebase Rewrite: The entire codebase has been rewritten in TypeScript, providing stronger type guarantees, improved maintainability, and enhanced developer experience.
6
- - `BsTable` template `item` property renamed to `value`
7
- - `hideValidationMessage` property has been removed. Instead, use the `validatorEnabled` property to disable validation.
8
-
9
- **New Features:**
10
- - Development Support Enhancements: Introduced a dedicated examples directory within the development (dev) folder, offering a comprehensive suite of examples to assist developers in understanding and utilizing the library's capabilities more effectively.
11
-
12
- **Improvements:**
13
- - Validator Component Overhaul: Rethought and redesigned the validator component. It is no longer implemented as a mixin. Instead, it is now a standalone component utilizing the Composition API, aligning with modern Vue.js best practices and improving its reusability and composability in applications.
14
-
15
- **Fixes:**
16
- - Bug Fixes: Addressed various bugs and issues identified in the previous versions, enhancing the stability and reliability of the library.
17
-
18
- **Migrate from 1.x to 2.x:**
19
-
20
- If you want to display the validation message elsewhere, not directly below the input, this could previously be achieved as follows:
21
- ```
22
- <div class="input-group">
23
- <bs-input
24
- id="customerNameInput"
25
- ref="customerNameInputRef"
26
- v-model="customerName"
27
- type="text"
28
- :hide-validation-message="true"
29
- minlength="3"
30
- @invalid="onCustomerNameInvalid"
31
- />
32
- <button
33
- class="btn btn-primary rounded-end"
34
- type="submit"
35
- >
36
- Search
37
- </button>
38
- <div v-if="customerNameInvalidMessage !== null" class="invalid-feedback">
39
- {{ customerNameInvalidMessage }}
40
- </div>
41
- </div>
42
-
43
- ...
44
-
45
- /**
46
- * @param invalidMessage
47
- */
48
- onCustomerNameInvalid(invalidMessage) {
49
- this.customerNameInvalidMessage = invalidMessage
50
- },
51
- ```
52
-
53
- In version 2.x, it can be done like this:
54
- ```
55
- <div class="input-group">
56
- <bs-input
57
- id="customerNameInput"
58
- ref="customerNameInputRef"
59
- v-model="customerName"
60
- type="text"
61
- minlength="3"
62
- :validator-enabled="false"
63
- @invalid="customerNameValidator.onInvalid"
64
- />
65
- <button
66
- class="btn btn-primary rounded-end"
67
- type="submit"
68
- >
69
- Search
70
- </button>
71
- <div v-if="customerNameValidator.getInvalidMessage() !== null" class="invalid-feedback">
72
- {{ customerNameValidator.getInvalidMessage() }}
73
- </div>
74
- </div>
75
-
76
- ...
77
-
78
- setup() {
79
- const customerNameValidator = useValidator(customerNameInputRef)
80
- }
81
- ```