@mintplayer/vue-bootstrap 3.5.0 → 3.7.0
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.
package/datatable/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, ref as h, onMounted as v, onBeforeUnmount as m, watch as n, openBlock as g, createElementBlock as y, mergeProps as w } from "vue";
|
|
2
2
|
import "@mintplayer/web-components/datatable";
|
|
3
|
-
const
|
|
3
|
+
const x = /* @__PURE__ */ f({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "BsDatatable",
|
|
6
6
|
props: {
|
|
7
7
|
columns: {},
|
|
8
8
|
data: {},
|
|
9
|
+
fetch: { type: [Function, null] },
|
|
9
10
|
rowKey: { type: Function },
|
|
10
11
|
tree: { type: Boolean },
|
|
11
12
|
idKey: {},
|
|
@@ -16,49 +17,44 @@ const K = /* @__PURE__ */ h({
|
|
|
16
17
|
selectionStrategy: {},
|
|
17
18
|
selectedIds: {}
|
|
18
19
|
},
|
|
19
|
-
emits: ["update:expandedIds", "update:selectedIds", "
|
|
20
|
-
setup(i, { expose:
|
|
21
|
-
const e = i,
|
|
22
|
-
a.value && (a.value.columns = e.columns ?? [], a.value.data = e.data ?? [], e.rowKey !== void 0 && (a.value.rowKey = e.rowKey), e.tree !== void 0 && (a.value.tree = e.tree), e.idKey !== void 0 && (a.value.idKey = e.idKey), e.childCountKey !== void 0 && (a.value.childCountKey = e.childCountKey), e.treeIndent !== void 0 && (a.value.treeIndent = e.treeIndent), e.expandedIds !== void 0 && (a.value.expandedIds = e.expandedIds instanceof Set ? new Set(e.expandedIds) : new Set(e.expandedIds)), e.selectionMode !== void 0 && (a.value.selectionMode = e.selectionMode), e.selectionStrategy !== void 0 && (a.value.selectionStrategy = e.selectionStrategy), e.selectedIds !== void 0 && (a.value.selectedIds = [...e.selectedIds]));
|
|
20
|
+
emits: ["update:expandedIds", "update:selectedIds", "rowExpand", "rowCollapse", "sortChange", "selectionChange", "rowClick", "rowDblClick", "rowContextMenu", "pageChange", "perPageChange"],
|
|
21
|
+
setup(i, { expose: c, emit: r }) {
|
|
22
|
+
const e = i, l = r, a = h(null), d = () => {
|
|
23
|
+
a.value && (a.value.columns = e.columns ?? [], e.fetch != null ? a.value.fetch = e.fetch : (a.value.fetch = null, a.value.data = e.data ?? []), e.rowKey !== void 0 && (a.value.rowKey = e.rowKey), e.tree !== void 0 && (a.value.tree = e.tree), e.idKey !== void 0 && (a.value.idKey = e.idKey), e.childCountKey !== void 0 && (a.value.childCountKey = e.childCountKey), e.treeIndent !== void 0 && (a.value.treeIndent = e.treeIndent), e.expandedIds !== void 0 && (a.value.expandedIds = e.expandedIds instanceof Set ? new Set(e.expandedIds) : new Set(e.expandedIds)), e.selectionMode !== void 0 && (a.value.selectionMode = e.selectionMode), e.selectionStrategy !== void 0 && (a.value.selectionStrategy = e.selectionStrategy), e.selectedIds !== void 0 && (a.value.selectedIds = [...e.selectedIds]));
|
|
23
24
|
}, s = {
|
|
24
|
-
"mp-datatable-
|
|
25
|
-
"mp-datatable-row-
|
|
26
|
-
"mp-datatable-row-collapse": (t) => d("rowCollapse", t.detail),
|
|
25
|
+
"mp-datatable-row-expand": (t) => l("rowExpand", t.detail),
|
|
26
|
+
"mp-datatable-row-collapse": (t) => l("rowCollapse", t.detail),
|
|
27
27
|
"mp-datatable-expanded-ids-change": (t) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const o = t.detail;
|
|
29
|
+
l("update:expandedIds", new Set(o.expandedIds));
|
|
30
30
|
},
|
|
31
|
-
"mp-datatable-sort-change": (t) =>
|
|
31
|
+
"mp-datatable-sort-change": (t) => l("sortChange", t.detail),
|
|
32
32
|
"mp-datatable-selection-change": (t) => {
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const o = t.detail;
|
|
34
|
+
l("selectionChange", o), l("update:selectedIds", [...o.selectedIds]);
|
|
35
35
|
},
|
|
36
|
-
"mp-datatable-row-click": (t) =>
|
|
37
|
-
"mp-datatable-row-dblclick": (t) =>
|
|
38
|
-
"mp-datatable-row-contextmenu": (t) =>
|
|
39
|
-
"mp-datatable-page-change": (t) =>
|
|
40
|
-
"mp-datatable-per-page-change": (t) =>
|
|
36
|
+
"mp-datatable-row-click": (t) => l("rowClick", t.detail),
|
|
37
|
+
"mp-datatable-row-dblclick": (t) => l("rowDblClick", t.detail),
|
|
38
|
+
"mp-datatable-row-contextmenu": (t) => l("rowContextMenu", t.detail),
|
|
39
|
+
"mp-datatable-page-change": (t) => l("pageChange", t.detail),
|
|
40
|
+
"mp-datatable-per-page-change": (t) => l("perPageChange", t.detail)
|
|
41
41
|
}, p = () => {
|
|
42
42
|
if (a.value)
|
|
43
|
-
for (const [t,
|
|
44
|
-
a.value.addEventListener(t,
|
|
43
|
+
for (const [t, o] of Object.entries(s))
|
|
44
|
+
a.value.addEventListener(t, o);
|
|
45
45
|
}, u = () => {
|
|
46
46
|
if (a.value)
|
|
47
|
-
for (const [t,
|
|
48
|
-
a.value.removeEventListener(t,
|
|
47
|
+
for (const [t, o] of Object.entries(s))
|
|
48
|
+
a.value.removeEventListener(t, o);
|
|
49
49
|
};
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
}), m(u),
|
|
53
|
-
a.value?.setFetchResponse(t, l);
|
|
54
|
-
}, invalidateChildren: (t) => {
|
|
55
|
-
a.value?.invalidateChildren(t);
|
|
56
|
-
} }), (t, l) => (g(), C("mp-datatable", w({
|
|
50
|
+
return v(() => {
|
|
51
|
+
d(), p();
|
|
52
|
+
}), m(u), n(() => e.columns, d, { deep: !1 }), n(() => e.data, d, { deep: !1 }), n(() => e.fetch, d), n(() => e.rowKey, d), n(() => e.tree, d), n(() => e.idKey, d), n(() => e.childCountKey, d), n(() => e.treeIndent, d), n(() => e.expandedIds, d, { deep: !1 }), n(() => e.selectionMode, d), n(() => e.selectionStrategy, d), n(() => e.selectedIds, d, { deep: !1 }), c({ el: a }), (t, o) => (g(), y("mp-datatable", w({
|
|
57
53
|
ref_key: "el",
|
|
58
54
|
ref: a
|
|
59
55
|
}, t.$attrs), null, 16));
|
|
60
56
|
}
|
|
61
57
|
});
|
|
62
58
|
export {
|
|
63
|
-
|
|
59
|
+
x as BsDatatable
|
|
64
60
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { MpDatatable, DatatableColumnDef, RowKey, DatatableSelectionMode, TreeIdKey, TreeSelectionStrategy,
|
|
1
|
+
import { MpDatatable, DatatableColumnDef, DatatableFetch, RowKey, DatatableSelectionMode, TreeIdKey, TreeSelectionStrategy, TreeRowExpandDetail, RowEventDetail, SortChangeEventDetail, SelectionChangeEventDetail } from '@mintplayer/web-components/datatable';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
columns?: DatatableColumnDef[];
|
|
4
4
|
data?: unknown[];
|
|
5
|
+
/** Server-paged source. The WC owns the whole fetch loop; nothing else to wire. */
|
|
6
|
+
fetch?: DatatableFetch | null;
|
|
5
7
|
rowKey?: RowKey;
|
|
6
8
|
tree?: boolean;
|
|
7
9
|
idKey?: TreeIdKey | string | null;
|
|
@@ -14,16 +16,13 @@ type __VLS_Props = {
|
|
|
14
16
|
};
|
|
15
17
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
16
18
|
el: import('vue').Ref<MpDatatable | null, MpDatatable | null>;
|
|
17
|
-
setFetchResponse: (parentId: unknown, response: TreeFetchResponse) => void;
|
|
18
|
-
invalidateChildren: (parentId?: unknown) => void;
|
|
19
19
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
20
|
"update:expandedIds": (value: Set<unknown>) => any;
|
|
21
21
|
"update:selectedIds": (value: string[]) => any;
|
|
22
|
-
fetchRequest: (detail: TreeFetchRequestDetail) => any;
|
|
23
22
|
rowExpand: (detail: TreeRowExpandDetail<unknown>) => any;
|
|
24
23
|
rowCollapse: (detail: TreeRowExpandDetail<unknown>) => any;
|
|
25
24
|
sortChange: (detail: SortChangeEventDetail) => any;
|
|
26
|
-
selectionChange: (detail: SelectionChangeEventDetail) => any;
|
|
25
|
+
selectionChange: (detail: SelectionChangeEventDetail<unknown>) => any;
|
|
27
26
|
rowClick: (detail: RowEventDetail<unknown>) => any;
|
|
28
27
|
rowDblClick: (detail: RowEventDetail<unknown>) => any;
|
|
29
28
|
rowContextMenu: (detail: RowEventDetail<unknown>) => any;
|
|
@@ -36,11 +35,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
36
35
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
37
36
|
"onUpdate:expandedIds"?: ((value: Set<unknown>) => any) | undefined;
|
|
38
37
|
"onUpdate:selectedIds"?: ((value: string[]) => any) | undefined;
|
|
39
|
-
onFetchRequest?: ((detail: TreeFetchRequestDetail) => any) | undefined;
|
|
40
38
|
onRowExpand?: ((detail: TreeRowExpandDetail<unknown>) => any) | undefined;
|
|
41
39
|
onRowCollapse?: ((detail: TreeRowExpandDetail<unknown>) => any) | undefined;
|
|
42
40
|
onSortChange?: ((detail: SortChangeEventDetail) => any) | undefined;
|
|
43
|
-
onSelectionChange?: ((detail: SelectionChangeEventDetail) => any) | undefined;
|
|
41
|
+
onSelectionChange?: ((detail: SelectionChangeEventDetail<unknown>) => any) | undefined;
|
|
44
42
|
onRowClick?: ((detail: RowEventDetail<unknown>) => any) | undefined;
|
|
45
43
|
onRowDblClick?: ((detail: RowEventDetail<unknown>) => any) | undefined;
|
|
46
44
|
onRowContextMenu?: ((detail: RowEventDetail<unknown>) => any) | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/vue-bootstrap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Vue 3.5 SFC adapters around @mintplayer/web-components. Each sub-entry maps one-to-one with a WC sub-entry and exposes typed Vue components with v-model support for input WCs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"vue": "^3.5.0",
|
|
29
|
-
"@mintplayer/web-components": "^
|
|
29
|
+
"@mintplayer/web-components": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"tslib": "^2.3.0"
|