@beterdichtbij/component-library 0.64.9 → 0.64.11
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.
|
@@ -1000,6 +1000,7 @@ function Ma(e, t) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
var Na = /* @__PURE__ */ R(Aa, [["render", Ma]]), Pa = {}, Fa = {
|
|
1002
1002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1003
|
+
id: "icon icon-sort",
|
|
1003
1004
|
width: "9",
|
|
1004
1005
|
height: "14",
|
|
1005
1006
|
viewBox: "0 0 9 14"
|
|
@@ -1009,21 +1010,23 @@ function Ia(e, t) {
|
|
|
1009
1010
|
}
|
|
1010
1011
|
var La = /* @__PURE__ */ R(Pa, [["render", Ia]]), Ra = {}, za = {
|
|
1011
1012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1013
|
+
id: "icon icon-sort-asc",
|
|
1012
1014
|
width: "9",
|
|
1013
1015
|
height: "14",
|
|
1014
1016
|
viewBox: "0 0 9 14"
|
|
1015
1017
|
};
|
|
1016
1018
|
function Ba(e, t) {
|
|
1017
|
-
return A(), l("svg", za, [...t[0] ||= [f("<g id=\"Symbols\" fill=\"none\" fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\"><g id=\"icon/sort\" transform=\"translate(-6 -4)\"><g id=\"Group\" transform=\"translate(5 3)\"><path id=\"Rectangle\" fill=\"
|
|
1019
|
+
return A(), l("svg", za, [...t[0] ||= [f("<g id=\"Symbols\" fill=\"none\" fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\"><g id=\"icon/sort\" transform=\"translate(-6 -4)\"><g id=\"Group\" transform=\"translate(5 3)\"><path id=\"Rectangle\" fill=\"#ABB0BE\" d=\"M8.585786,8.32943141 L8.585786,12.585786 C8.585786,13.1380707 8.13807075,13.585786 7.585786,13.585786 L3.32943141,13.585786 C2.77714666,13.585786 2.32943141,13.1380707 2.32943141,12.585786 C2.32943141,12.3205695 2.43478825,12.0662156 2.62232463,11.8786792 L6.87867922,7.62232463 C7.26920351,7.23180034 7.90236849,7.23180034 8.29289278,7.62232463 C8.48042916,7.80986101 8.585786,8.06421492 8.585786,8.32943141 Z\" transform=\"rotate(45 5.293 10.293)\"></path><path id=\"Rectangle\" fill=\"rgb(57, 65, 86)\" d=\"M8.585786,3.32943141 L8.585786,7.585786 C8.585786,8.13807075 8.13807075,8.585786 7.585786,8.585786 L3.32943141,8.585786 C2.77714666,8.585786 2.32943141,8.13807075 2.32943141,7.585786 C2.32943141,7.32056951 2.43478825,7.0662156 2.62232463,6.87867922 L6.87867922,2.62232463 C7.26920351,2.23180034 7.90236849,2.23180034 8.29289278,2.62232463 C8.48042916,2.80986101 8.585786,3.06421492 8.585786,3.32943141 Z\" transform=\"rotate(-135 5.293 5.293)\"></path></g></g></g>", 1)]]);
|
|
1018
1020
|
}
|
|
1019
1021
|
var Va = /* @__PURE__ */ R(Ra, [["render", Ba]]), Ha = {}, Ua = {
|
|
1020
1022
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1023
|
+
id: "icon icon-sort-desc",
|
|
1021
1024
|
width: "9",
|
|
1022
1025
|
height: "14",
|
|
1023
1026
|
viewBox: "0 0 9 14"
|
|
1024
1027
|
};
|
|
1025
1028
|
function Wa(e, t) {
|
|
1026
|
-
return A(), l("svg", Ua, [...t[0] ||= [f("<g id=\"Symbols\" fill=\"none\" fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\"><g id=\"icon/sort\" transform=\"translate(-6 -4)\"><g id=\"Group\" transform=\"translate(5 3)\"><path id=\"Rectangle\" fill=\"
|
|
1029
|
+
return A(), l("svg", Ua, [...t[0] ||= [f("<g id=\"Symbols\" fill=\"none\" fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\"><g id=\"icon/sort\" transform=\"translate(-6 -4)\"><g id=\"Group\" transform=\"translate(5 3)\"><path id=\"Rectangle\" fill=\"rgb(57, 65, 86)\" d=\"M8.585786,8.32943141 L8.585786,12.585786 C8.585786,13.1380707 8.13807075,13.585786 7.585786,13.585786 L3.32943141,13.585786 C2.77714666,13.585786 2.32943141,13.1380707 2.32943141,12.585786 C2.32943141,12.3205695 2.43478825,12.0662156 2.62232463,11.8786792 L6.87867922,7.62232463 C7.26920351,7.23180034 7.90236849,7.23180034 8.29289278,7.62232463 C8.48042916,7.80986101 8.585786,8.06421492 8.585786,8.32943141 Z\" transform=\"rotate(45 5.293 10.293)\"></path><path id=\"Rectangle\" fill=\"#ABB0BE\" d=\"M8.585786,3.32943141 L8.585786,7.585786 C8.585786,8.13807075 8.13807075,8.585786 7.585786,8.585786 L3.32943141,8.585786 C2.77714666,8.585786 2.32943141,8.13807075 2.32943141,7.585786 C2.32943141,7.32056951 2.43478825,7.0662156 2.62232463,6.87867922 L6.87867922,2.62232463 C7.26920351,2.23180034 7.90236849,2.23180034 8.29289278,2.62232463 C8.48042916,2.80986101 8.585786,3.06421492 8.585786,3.32943141 Z\" transform=\"rotate(-135 5.293 5.293)\"></path></g></g></g>", 1)]]);
|
|
1027
1030
|
}
|
|
1028
1031
|
var Ga = /* @__PURE__ */ R(Ha, [["render", Wa]]), Ka = {}, qa = {
|
|
1029
1032
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -28182,49 +28185,58 @@ var NG = {
|
|
|
28182
28185
|
class: "empty-text"
|
|
28183
28186
|
}, pK = /* @__PURE__ */ g({
|
|
28184
28187
|
__name: "BDTable",
|
|
28185
|
-
props:
|
|
28186
|
-
|
|
28187
|
-
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28188
|
+
props: {
|
|
28189
|
+
fields: {},
|
|
28190
|
+
items: {},
|
|
28191
|
+
sortBy: {},
|
|
28192
|
+
sortDesc: { type: Boolean },
|
|
28193
|
+
tbodyTrClass: { type: Function },
|
|
28194
|
+
emptyText: {}
|
|
28195
|
+
},
|
|
28193
28196
|
emits: ["row-click", "sort-changed"],
|
|
28194
28197
|
setup(e, { expose: n, emit: r }) {
|
|
28195
|
-
let i = e, a = r
|
|
28198
|
+
let i = e, a = r;
|
|
28199
|
+
mv.default.extend(hv.default);
|
|
28200
|
+
let o = j(i.items), d = j(i.sortBy), f = j(i.sortDesc), m = (e) => i.fields.find((t) => t.key === e)?.dateFormat, h = (e, t) => {
|
|
28201
|
+
if (e == null) return 0;
|
|
28202
|
+
let n = (0, mv.default)(e, t, !0);
|
|
28203
|
+
return n.isValid() ? n.valueOf() : 0;
|
|
28204
|
+
}, g = (e) => d.value = e, _ = (e, t, n) => {
|
|
28196
28205
|
let r = t[e], i = n[e];
|
|
28206
|
+
if (r == null && i == null) return 0;
|
|
28197
28207
|
if (r == null) return 1;
|
|
28198
28208
|
if (i == null) return -1;
|
|
28199
|
-
let a =
|
|
28200
|
-
|
|
28201
|
-
|
|
28202
|
-
|
|
28209
|
+
let a = m(e);
|
|
28210
|
+
if (a) return h(r, a) - h(i, a);
|
|
28211
|
+
let o = r.toString(), s = i.toString();
|
|
28212
|
+
return o.localeCompare(s, void 0, { numeric: !0 });
|
|
28213
|
+
}, v = (e) => {
|
|
28214
|
+
f.value = !1, o.value = o.value.sort((t, n) => _(e, t, n)), a("sort-changed", {
|
|
28203
28215
|
sortBy: e,
|
|
28204
28216
|
sortDesc: !1
|
|
28205
28217
|
});
|
|
28206
|
-
},
|
|
28207
|
-
o.value = o.value.sort((t, n) =>
|
|
28218
|
+
}, y = (e) => {
|
|
28219
|
+
f.value = !0, o.value = o.value.sort((t, n) => _(e, n, t)), a("sort-changed", {
|
|
28208
28220
|
sortBy: e,
|
|
28209
28221
|
sortDesc: !0
|
|
28210
28222
|
});
|
|
28211
28223
|
};
|
|
28212
28224
|
return be(() => i.items, (e) => {
|
|
28213
|
-
o.value = e.sort((e, t) =>
|
|
28225
|
+
o.value = [...e].sort((e, t) => f.value ? _(d.value, t, e) : _(d.value, e, t));
|
|
28214
28226
|
}), be(() => i.sortBy, (e) => {
|
|
28215
28227
|
d.value = e;
|
|
28216
28228
|
}), be(() => i.sortDesc, (e) => {
|
|
28217
28229
|
f.value = e;
|
|
28218
28230
|
}), n({ Refresh: () => {
|
|
28219
28231
|
o.value = i.items;
|
|
28220
|
-
} }), (n, r) => (A(), l("div", oK, [i.items && i.items.length > 0 ? (A(), l("table", sK, [u("thead", null, [u("tr", null, [(A(!0), l(t, null, M(i.fields, (e) => (A(), l(t, null, [e.isVisible ? (A(), l(t, { key: 0 }, [e.sortable ? (A(), s(aK, {
|
|
28232
|
+
} }), (n, r) => (A(), l("div", oK, [i.items && i.items.length > 0 ? (A(), l("table", sK, [u("thead", null, [u("tr", null, [(A(!0), l(t, null, M(i.fields, (e) => (A(), l(t, null, [e.isVisible === !1 ? c("", !0) : (A(), l(t, { key: 0 }, [e.sortable ? (A(), s(aK, {
|
|
28221
28233
|
key: 0,
|
|
28222
28234
|
label: e.label,
|
|
28223
28235
|
active: e.key == d.value,
|
|
28224
28236
|
sortDesc: f.value,
|
|
28225
|
-
onClick: (t) =>
|
|
28226
|
-
onSortAsc: (t) =>
|
|
28227
|
-
onSortDesc: (t) =>
|
|
28237
|
+
onClick: (t) => g(e.key),
|
|
28238
|
+
onSortAsc: (t) => v(e.key),
|
|
28239
|
+
onSortDesc: (t) => y(e.key)
|
|
28228
28240
|
}, null, 8, [
|
|
28229
28241
|
"label",
|
|
28230
28242
|
"active",
|
|
@@ -28232,15 +28244,15 @@ var NG = {
|
|
|
28232
28244
|
"onClick",
|
|
28233
28245
|
"onSortAsc",
|
|
28234
28246
|
"onSortDesc"
|
|
28235
|
-
])) : n.$slots.hasOwnProperty(`header_${e.key}`) ? (A(), l("th", cK, [N(n.$slots, `header_${e.key}`)])) : (A(), l("th", lK, P(e.label), 1))], 64))
|
|
28247
|
+
])) : n.$slots.hasOwnProperty(`header_${e.key}`) ? (A(), l("th", cK, [N(n.$slots, `header_${e.key}`)])) : (A(), l("th", lK, P(e.label), 1))], 64))], 64))), 256))])]), u("tbody", null, [(A(!0), l(t, null, M(o.value, (r) => (A(), l("tr", {
|
|
28236
28248
|
class: O(i.tbodyTrClass && i.tbodyTrClass(r)),
|
|
28237
28249
|
onClick: (e) => a("row-click", r)
|
|
28238
|
-
}, [(A(!0), l(t, null, M(e.fields, (e) => (A(), l(t, null, [e.isVisible ? (A(), l("td", dK, [n.$slots.hasOwnProperty(e.key) ? N(n.$slots, e.key, {
|
|
28250
|
+
}, [(A(!0), l(t, null, M(e.fields, (e) => (A(), l(t, null, [e.isVisible === !1 ? c("", !0) : (A(), l("td", dK, [n.$slots.hasOwnProperty(e.key) ? N(n.$slots, e.key, {
|
|
28239
28251
|
key: 0,
|
|
28240
28252
|
row: r,
|
|
28241
28253
|
item: r,
|
|
28242
28254
|
value: r[e.key]
|
|
28243
|
-
}) : (A(), l(t, { key: 1 }, [p(P(r[e.key]), 1)], 64))]))
|
|
28255
|
+
}) : (A(), l(t, { key: 1 }, [p(P(r[e.key]), 1)], 64))]))], 64))), 256))], 10, uK))), 256))])])) : (A(), l("p", fK, P(i.emptyText), 1))]));
|
|
28244
28256
|
}
|
|
28245
28257
|
}), mK = ["id"], hK = {
|
|
28246
28258
|
key: 0,
|