@sendelius/vue 0.4.2 → 0.4.3
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/dist/Autocomplete.css +1 -0
- package/dist/Btn.css +1 -0
- package/dist/Checkbox.css +1 -0
- package/dist/Confirm.css +1 -0
- package/dist/Cookie.css +1 -0
- package/dist/Error.css +1 -0
- package/dist/Input.css +1 -0
- package/dist/InputCity.css +1 -0
- package/dist/InputDate-CRpVPH9p.js +9795 -0
- package/dist/InputDate.css +1 -0
- package/dist/InputPassword.css +1 -0
- package/dist/InputPhone-CTq4y49q.js +272 -0
- package/dist/Popup-BIJpeS3t.js +150 -0
- package/dist/Popup.css +1 -0
- package/dist/Progress.css +1 -0
- package/dist/Select.css +1 -0
- package/dist/Success.css +1 -0
- package/dist/Table.css +1 -0
- package/dist/TableFooter.css +1 -0
- package/dist/TableHeader.css +1 -0
- package/dist/TableItems.css +1 -0
- package/dist/TablePagination.css +1 -0
- package/dist/Warning.css +1 -0
- package/dist/_plugin-vue_export-helper-Djzt4Yr7.js +7 -0
- package/dist/index.js +210 -0
- package/dist/ui/btn/Btn.d.ts +4 -0
- package/dist/ui/btn/Btn.js +102 -0
- package/dist/ui/btn/Btn.vue.d.ts +9 -3
- package/dist/ui/cookie/Cookie.d.ts +4 -0
- package/dist/ui/cookie/Cookie.js +22 -0
- package/dist/ui/cookie/Cookie.vue.d.ts +5 -1
- package/dist/ui/form/Autocomplete.d.ts +4 -0
- package/dist/ui/form/Autocomplete.js +172 -0
- package/dist/ui/form/Autocomplete.vue.d.ts +12 -6
- package/dist/ui/form/Checkbox.d.ts +4 -0
- package/dist/ui/form/Checkbox.js +69 -0
- package/dist/ui/form/Checkbox.vue.d.ts +9 -3
- package/dist/ui/form/Input.d.ts +4 -0
- package/dist/ui/form/Input.js +92 -0
- package/dist/ui/form/Input.vue.d.ts +7 -2
- package/dist/ui/form/InputCity.d.ts +4 -0
- package/dist/ui/form/InputCity.js +86 -0
- package/dist/ui/form/InputDate.d.ts +4 -0
- package/dist/ui/form/InputDate.js +1 -0
- package/dist/ui/form/InputDate.vue.d.ts +7 -2
- package/dist/ui/form/InputPassword.d.ts +4 -0
- package/dist/ui/form/InputPassword.js +100 -0
- package/dist/ui/form/InputPassword.vue.d.ts +7 -2
- package/dist/ui/form/InputPhone.d.ts +4 -0
- package/dist/ui/form/InputPhone.js +1 -0
- package/dist/ui/form/Select.d.ts +4 -0
- package/dist/ui/form/Select.js +76 -0
- package/dist/ui/form/Select.vue.d.ts +9 -3
- package/dist/ui/notice/Error.d.ts +4 -0
- package/dist/ui/notice/Error.js +84 -0
- package/dist/ui/notice/Error.vue.d.ts +9 -3
- package/dist/ui/notice/Success.d.ts +4 -0
- package/dist/ui/notice/Success.js +70 -0
- package/dist/ui/notice/Success.vue.d.ts +7 -2
- package/dist/ui/notice/Warning.d.ts +4 -0
- package/dist/ui/notice/Warning.js +74 -0
- package/dist/ui/notice/Warning.vue.d.ts +7 -2
- package/dist/ui/popup/Confirm.d.ts +4 -0
- package/dist/ui/popup/Confirm.js +61 -0
- package/dist/ui/popup/Popup.d.ts +4 -0
- package/dist/ui/popup/Popup.js +1 -0
- package/dist/ui/progress/Progress.d.ts +4 -0
- package/dist/ui/progress/Progress.js +23 -0
- package/dist/ui/table/Table.d.ts +4 -0
- package/dist/ui/table/Table.js +178 -0
- package/dist/ui/table/Table.vue.d.ts +21 -12
- package/dist/ui/table/TableFilters.d.ts +4 -0
- package/dist/ui/table/TableFilters.js +8 -0
- package/dist/ui/table/TableFooter.d.ts +4 -0
- package/dist/ui/table/TableFooter.js +142 -0
- package/dist/ui/table/TableFooter.vue.d.ts +9 -3
- package/dist/ui/table/TableHeader.d.ts +4 -0
- package/dist/ui/table/TableHeader.js +157 -0
- package/dist/ui/table/TableHeader.vue.d.ts +7 -2
- package/dist/ui/table/TableItems.d.ts +4 -0
- package/dist/ui/table/TableItems.js +83 -0
- package/dist/ui/table/TableItems.vue.d.ts +12 -9
- package/dist/ui/table/TablePagination.d.ts +4 -0
- package/dist/ui/table/TablePagination.js +92 -0
- package/dist/ui/table/TablePagination.vue.d.ts +7 -2
- package/package.json +16 -13
- package/dist/sendelius-vue.css +0 -2
- package/dist/sendelius-vue.js +0 -11918
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import e from "../btn/Btn.js";
|
|
2
|
+
import { t } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
3
|
+
import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, onBeforeUnmount as s, onMounted as c, openBlock as l, renderSlot as u, toDisplayString as d, unref as f, useSlots as p, withCtx as m } from "vue";
|
|
4
|
+
import '../../Warning.css';// src/ui/notice/Warning.vue
|
|
5
|
+
var h = { class: "warning" }, g = { class: "warning-item" }, _ = { class: "warning-icon" }, v = ["innerHTML"], y = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "warning-text"
|
|
8
|
+
}, b = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "warning-actions"
|
|
11
|
+
}, x = /*#__PURE__*/ t({
|
|
12
|
+
__name: "Warning",
|
|
13
|
+
props: {
|
|
14
|
+
content: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
cancelAction: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
cancelText: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "Отменить"
|
|
25
|
+
},
|
|
26
|
+
cancelVariant: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "gray",
|
|
29
|
+
validator: (e) => [
|
|
30
|
+
"outline",
|
|
31
|
+
"gray",
|
|
32
|
+
"red",
|
|
33
|
+
"green"
|
|
34
|
+
].includes(e)
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["confirm", "cancel"],
|
|
38
|
+
setup(t, { emit: x }) {
|
|
39
|
+
let S = p(), C = t, w = x, T = (e) => {
|
|
40
|
+
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), w("confirm"));
|
|
41
|
+
};
|
|
42
|
+
return c(() => {
|
|
43
|
+
C.cancelAction && document.addEventListener("keydown", T);
|
|
44
|
+
}), s(() => {
|
|
45
|
+
C.cancelAction && document.removeEventListener("keydown", T);
|
|
46
|
+
}), (s, c) => (l(), r("div", h, [i("div", g, [i("div", _, [u(s.$slots, "icon", {}, () => [c[1] ||= i("svg", {
|
|
47
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
48
|
+
width: "24",
|
|
49
|
+
height: "24",
|
|
50
|
+
viewBox: "0 0 24 24",
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
"stroke-width": "2",
|
|
54
|
+
"stroke-linecap": "round",
|
|
55
|
+
"stroke-linejoin": "round",
|
|
56
|
+
class: "icon icon-warning icon-stroke"
|
|
57
|
+
}, [
|
|
58
|
+
i("path", { d: "M12 9v4" }),
|
|
59
|
+
i("path", { d: "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0" }),
|
|
60
|
+
i("path", { d: "M12 16h.01" })
|
|
61
|
+
], -1)], !0)]), t.content ? (l(), r("div", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "warning-text",
|
|
64
|
+
innerHTML: t.content
|
|
65
|
+
}, null, 8, v)) : f(S).content ? (l(), r("div", y, [u(s.$slots, "content", {}, void 0, !0)])) : n("", !0)]), t.cancelAction ? (l(), r("div", b, [o(e, {
|
|
66
|
+
variant: t.cancelVariant,
|
|
67
|
+
onClick: c[0] ||= (e) => w("cancel")
|
|
68
|
+
}, {
|
|
69
|
+
default: m(() => [a(d(t.cancelText), 1)]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["variant"])])) : n("", !0)]));
|
|
72
|
+
}
|
|
73
|
+
}, [["__scopeId", "data-v-9792c046"]]);
|
|
74
|
+
export { x as default };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
2
|
-
declare
|
|
3
|
-
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
icon?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
content?: (props: {}) => any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
4
9
|
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
10
|
content: {
|
|
6
11
|
type: StringConstructor;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import e from "../btn/Btn.js";
|
|
2
|
+
import { t } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
3
|
+
import { createElementBlock as n, createElementVNode as r, createTextVNode as i, createVNode as a, onBeforeUnmount as o, onMounted as s, openBlock as c, toDisplayString as l, withCtx as u } from "vue";
|
|
4
|
+
import '../../Confirm.css';// src/ui/popup/Confirm.vue
|
|
5
|
+
var d = { class: "confirm" }, f = { class: "confirm-actions" }, p = /*#__PURE__*/ t({
|
|
6
|
+
__name: "Confirm",
|
|
7
|
+
props: {
|
|
8
|
+
confirmText: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "Подтвердить"
|
|
11
|
+
},
|
|
12
|
+
cancelText: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "Отменить"
|
|
15
|
+
},
|
|
16
|
+
confirmVariant: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "",
|
|
19
|
+
validator: (e) => [
|
|
20
|
+
"outline",
|
|
21
|
+
"gray",
|
|
22
|
+
"red",
|
|
23
|
+
"green"
|
|
24
|
+
].includes(e)
|
|
25
|
+
},
|
|
26
|
+
cancelVariant: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "gray",
|
|
29
|
+
validator: (e) => [
|
|
30
|
+
"outline",
|
|
31
|
+
"gray",
|
|
32
|
+
"red",
|
|
33
|
+
"green"
|
|
34
|
+
].includes(e)
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["confirm", "cancel"],
|
|
38
|
+
setup(t, { emit: p }) {
|
|
39
|
+
let m = p, h = (e) => {
|
|
40
|
+
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), m("confirm"));
|
|
41
|
+
};
|
|
42
|
+
return s(() => {
|
|
43
|
+
document.addEventListener("keydown", h);
|
|
44
|
+
}), o(() => {
|
|
45
|
+
document.removeEventListener("keydown", h);
|
|
46
|
+
}), (o, s) => (c(), n("div", d, [r("div", f, [a(e, {
|
|
47
|
+
variant: t.confirmVariant,
|
|
48
|
+
onClick: s[0] ||= (e) => m("confirm")
|
|
49
|
+
}, {
|
|
50
|
+
default: u(() => [i(l(t.confirmText), 1)]),
|
|
51
|
+
_: 1
|
|
52
|
+
}, 8, ["variant"]), a(e, {
|
|
53
|
+
variant: t.cancelVariant,
|
|
54
|
+
onClick: s[1] ||= (e) => m("cancel")
|
|
55
|
+
}, {
|
|
56
|
+
default: u(() => [i(l(t.cancelText), 1)]),
|
|
57
|
+
_: 1
|
|
58
|
+
}, 8, ["variant"])])]));
|
|
59
|
+
}
|
|
60
|
+
}, [["__scopeId", "data-v-3fb94df6"]]);
|
|
61
|
+
export { p as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as default } from "../../Popup-BIJpeS3t.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { t as e } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
2
|
+
import { Fragment as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, openBlock as o, toDisplayString as s } from "vue";
|
|
3
|
+
import '../../Progress.css';// src/ui/progress/Progress.vue
|
|
4
|
+
var c = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "progress"
|
|
7
|
+
}, l = /*#__PURE__*/ e({
|
|
8
|
+
__name: "Progress",
|
|
9
|
+
props: {
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
show: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
return (l, u) => e.show ? (o(), r("div", c, [e.label ? (o(), r(t, { key: 0 }, [a(s(e.label) + " ...", 1)], 64)) : n("", !0), u[0] ||= i("span", { class: "progress-loader" }, null, -1)])) : n("", !0);
|
|
21
|
+
}
|
|
22
|
+
}, [["__scopeId", "data-v-454e3267"]]);
|
|
23
|
+
export { l as default };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import e from "./TableFooter.js";
|
|
2
|
+
import t from "./TableHeader.js";
|
|
3
|
+
import n from "./TableItems.js";
|
|
4
|
+
import { t as r } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
5
|
+
import { createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, guardReactiveProps as c, nextTick as l, normalizeProps as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, watch as y, withCtx as b } from "vue";
|
|
6
|
+
import '../../Table.css';// src/ui/table/Table.vue
|
|
7
|
+
var x = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "table-empty"
|
|
10
|
+
}, S = /*#__PURE__*/ r({
|
|
11
|
+
__name: "Table",
|
|
12
|
+
props: {
|
|
13
|
+
columns: {
|
|
14
|
+
type: Array,
|
|
15
|
+
required: !0
|
|
16
|
+
},
|
|
17
|
+
items: {
|
|
18
|
+
type: Array,
|
|
19
|
+
required: !0
|
|
20
|
+
},
|
|
21
|
+
pagination: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: {}
|
|
24
|
+
},
|
|
25
|
+
bulk: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
actions: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
bulkActions: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => []
|
|
36
|
+
},
|
|
37
|
+
sort: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: {}
|
|
40
|
+
},
|
|
41
|
+
textEmpty: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "нет записей"
|
|
44
|
+
},
|
|
45
|
+
navigate: {
|
|
46
|
+
type: Function,
|
|
47
|
+
default: null
|
|
48
|
+
},
|
|
49
|
+
bulkWidth: {
|
|
50
|
+
type: [Number, String],
|
|
51
|
+
default: 30
|
|
52
|
+
},
|
|
53
|
+
actionsWidth: {
|
|
54
|
+
type: [Number, String],
|
|
55
|
+
default: 100
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
emits: ["update:sort"],
|
|
59
|
+
setup(r, { emit: S }) {
|
|
60
|
+
let C = r, w = S, T = h(null), E = h(null), D = h(null), O = h(null), k = h([]), A = () => {
|
|
61
|
+
if (!T.value) return;
|
|
62
|
+
let e = T.value.scrollLeft;
|
|
63
|
+
D.value?.syncScroll(e), O.value?.syncScroll(e);
|
|
64
|
+
}, j = (e) => {
|
|
65
|
+
T.value && (T.value.scrollLeft = e);
|
|
66
|
+
}, M = (e) => {
|
|
67
|
+
w("update:sort", e);
|
|
68
|
+
}, N = async () => {
|
|
69
|
+
await l(), T.value && (T.value.removeEventListener("scroll", A), T.value.addEventListener("scroll", A));
|
|
70
|
+
};
|
|
71
|
+
return y(() => C.items.length, async () => {
|
|
72
|
+
C.items.length ? await N() : k.value = [];
|
|
73
|
+
}), y(() => [
|
|
74
|
+
C.sort?.key,
|
|
75
|
+
C.sort?.type,
|
|
76
|
+
C.pagination?.page
|
|
77
|
+
], () => {
|
|
78
|
+
k.value = [];
|
|
79
|
+
}), p(async () => {
|
|
80
|
+
await N();
|
|
81
|
+
}), f(() => {
|
|
82
|
+
T.value?.removeEventListener("scroll", A);
|
|
83
|
+
}), (l, f) => r.items.length ? (m(), i("div", {
|
|
84
|
+
key: 0,
|
|
85
|
+
ref_key: "tableWrap",
|
|
86
|
+
ref: T,
|
|
87
|
+
class: "table-wrap",
|
|
88
|
+
style: d({
|
|
89
|
+
"--table-bulk-width": `${r.bulkWidth}px`,
|
|
90
|
+
"--table-actions-width": `${r.actionsWidth}px`
|
|
91
|
+
})
|
|
92
|
+
}, [a("div", {
|
|
93
|
+
ref_key: "table",
|
|
94
|
+
ref: E,
|
|
95
|
+
class: "table"
|
|
96
|
+
}, [
|
|
97
|
+
s(t, {
|
|
98
|
+
ref_key: "header",
|
|
99
|
+
ref: D,
|
|
100
|
+
columns: r.columns,
|
|
101
|
+
items: r.items,
|
|
102
|
+
bulk: r.bulk,
|
|
103
|
+
actions: r.actions,
|
|
104
|
+
"table-wrap": T.value,
|
|
105
|
+
table: E.value,
|
|
106
|
+
sort: r.sort,
|
|
107
|
+
"onUpdate:sort": M,
|
|
108
|
+
selected: k.value,
|
|
109
|
+
"onUpdate:selected": f[0] ||= (e) => k.value = e
|
|
110
|
+
}, {
|
|
111
|
+
iconHeaderSortDesc: b(() => [_(l.$slots, "iconHeaderSortDesc", {}, void 0, !0)]),
|
|
112
|
+
iconHeaderSortAsc: b(() => [_(l.$slots, "iconHeaderSortAsc", {}, void 0, !0)]),
|
|
113
|
+
_: 3
|
|
114
|
+
}, 8, [
|
|
115
|
+
"columns",
|
|
116
|
+
"items",
|
|
117
|
+
"bulk",
|
|
118
|
+
"actions",
|
|
119
|
+
"table-wrap",
|
|
120
|
+
"table",
|
|
121
|
+
"sort",
|
|
122
|
+
"selected"
|
|
123
|
+
]),
|
|
124
|
+
s(n, {
|
|
125
|
+
columns: r.columns,
|
|
126
|
+
items: r.items,
|
|
127
|
+
bulk: r.bulk,
|
|
128
|
+
actions: r.actions,
|
|
129
|
+
selected: k.value,
|
|
130
|
+
"onUpdate:selected": f[1] ||= (e) => k.value = e
|
|
131
|
+
}, o({
|
|
132
|
+
actions: b((e) => [_(l.$slots, "actions", u(c(e)), void 0, !0)]),
|
|
133
|
+
_: 2
|
|
134
|
+
}, [g(r.columns, (e) => ({
|
|
135
|
+
name: `cell-${e.key}`,
|
|
136
|
+
fn: b((t) => [_(l.$slots, `cell-${e.key}`, u(c(t)), void 0, !0)])
|
|
137
|
+
}))]), 1032, [
|
|
138
|
+
"columns",
|
|
139
|
+
"items",
|
|
140
|
+
"bulk",
|
|
141
|
+
"actions",
|
|
142
|
+
"selected"
|
|
143
|
+
]),
|
|
144
|
+
s(e, {
|
|
145
|
+
ref_key: "footer",
|
|
146
|
+
ref: O,
|
|
147
|
+
columns: r.columns,
|
|
148
|
+
items: r.items,
|
|
149
|
+
pagination: r.pagination,
|
|
150
|
+
bulk: r.bulk,
|
|
151
|
+
actions: r.actions,
|
|
152
|
+
"bulk-actions": r.bulkActions,
|
|
153
|
+
selected: k.value,
|
|
154
|
+
"table-wrap": T.value,
|
|
155
|
+
table: E.value,
|
|
156
|
+
navigate: r.navigate,
|
|
157
|
+
"onUpdate:scrollLeft": j
|
|
158
|
+
}, {
|
|
159
|
+
iconPaginationPrev: b(() => [_(l.$slots, "iconPaginationPrev", {}, void 0, !0)]),
|
|
160
|
+
iconPaginationNext: b(() => [_(l.$slots, "iconPaginationNext", {}, void 0, !0)]),
|
|
161
|
+
iconFooterActions: b(() => [_(l.$slots, "iconFooterActions", {}, void 0, !0)]),
|
|
162
|
+
_: 3
|
|
163
|
+
}, 8, [
|
|
164
|
+
"columns",
|
|
165
|
+
"items",
|
|
166
|
+
"pagination",
|
|
167
|
+
"bulk",
|
|
168
|
+
"actions",
|
|
169
|
+
"bulk-actions",
|
|
170
|
+
"selected",
|
|
171
|
+
"table-wrap",
|
|
172
|
+
"table",
|
|
173
|
+
"navigate"
|
|
174
|
+
])
|
|
175
|
+
], 512)], 4)) : (m(), i("div", x, v(r.textEmpty), 1));
|
|
176
|
+
}
|
|
177
|
+
}, [["__scopeId", "data-v-ec7fece0"]]);
|
|
178
|
+
export { S as default };
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
[x: `cell-${any}`]: (props: {
|
|
5
|
+
item: any;
|
|
6
|
+
value: any;
|
|
7
|
+
}) => any;
|
|
8
|
+
} & {
|
|
9
|
+
iconHeaderSortDesc?: (props: {}) => any;
|
|
10
|
+
} & {
|
|
11
|
+
iconHeaderSortAsc?: (props: {}) => any;
|
|
12
|
+
} & {
|
|
13
|
+
actions?: (props: {
|
|
14
|
+
item: any;
|
|
15
|
+
}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
iconPaginationPrev?: (props: {}) => any;
|
|
18
|
+
} & {
|
|
19
|
+
iconPaginationNext?: (props: {}) => any;
|
|
20
|
+
} & {
|
|
21
|
+
iconFooterActions?: (props: {}) => any;
|
|
22
|
+
};
|
|
11
23
|
};
|
|
12
|
-
declare var __VLS_41: {};
|
|
13
|
-
declare var __VLS_44: {};
|
|
14
|
-
declare var __VLS_47: {};
|
|
15
24
|
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
16
25
|
columns: {
|
|
17
26
|
type: ArrayConstructor;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import e from "../form/Select.js";
|
|
2
|
+
import t from "./TablePagination.js";
|
|
3
|
+
import { t as n } from "../../_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
4
|
+
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, nextTick as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderSlot as g, watch as _, withCtx as v } from "vue";
|
|
5
|
+
import '../../TableFooter.css';// src/ui/table/TableFooter.vue
|
|
6
|
+
var y = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "table-footer-actions__left"
|
|
9
|
+
}, b = { class: "table-footer-actions__right" }, x = /*#__PURE__*/ n({
|
|
10
|
+
__name: "TableFooter",
|
|
11
|
+
props: {
|
|
12
|
+
columns: {
|
|
13
|
+
type: Array,
|
|
14
|
+
required: !0
|
|
15
|
+
},
|
|
16
|
+
items: {
|
|
17
|
+
type: Array,
|
|
18
|
+
required: !0
|
|
19
|
+
},
|
|
20
|
+
pagination: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: {}
|
|
23
|
+
},
|
|
24
|
+
bulk: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
actions: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
selected: {
|
|
33
|
+
type: Array,
|
|
34
|
+
required: !0
|
|
35
|
+
},
|
|
36
|
+
tableWrap: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: !0
|
|
39
|
+
},
|
|
40
|
+
table: {
|
|
41
|
+
type: Object,
|
|
42
|
+
required: !0
|
|
43
|
+
},
|
|
44
|
+
navigate: {
|
|
45
|
+
type: Function,
|
|
46
|
+
default: null
|
|
47
|
+
},
|
|
48
|
+
bulkActions: {
|
|
49
|
+
type: Array,
|
|
50
|
+
default: []
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: ["update:scroll-left"],
|
|
54
|
+
setup(n, { expose: x, emit: S }) {
|
|
55
|
+
let C = n, w = S, T = h(null), E = h(null), D = h(!1), O = h({}), k = h({}), A = h({}), j = h(null), M = i(() => [{
|
|
56
|
+
title: "Действие с выбранными",
|
|
57
|
+
value: null
|
|
58
|
+
}, ...C.bulkActions]), N = () => {
|
|
59
|
+
if (!T.value || !C.tableWrap) return;
|
|
60
|
+
let e = C.tableWrap.getBoundingClientRect(), t = T.value.offsetHeight, n = window.innerHeight, r = e.bottom, i = e.top;
|
|
61
|
+
r > n && i < n - t ? D.value || (D.value = !0, k.value = {
|
|
62
|
+
height: `${t}px`,
|
|
63
|
+
display: "block"
|
|
64
|
+
}) : (D.value = !1, O.value = {}, k.value = { display: "none" });
|
|
65
|
+
}, P = () => {
|
|
66
|
+
if (!D.value || !C.tableWrap || !C.table) return;
|
|
67
|
+
let e = C.tableWrap.getBoundingClientRect();
|
|
68
|
+
O.value = {
|
|
69
|
+
width: `${C.tableWrap.clientWidth}px`,
|
|
70
|
+
left: `${e.left}px`,
|
|
71
|
+
overflow: "hidden"
|
|
72
|
+
}, A.value = { width: `${C.table.offsetWidth}px` };
|
|
73
|
+
}, F = () => {
|
|
74
|
+
N(), P();
|
|
75
|
+
}, I = () => {
|
|
76
|
+
E.value && w("update:scroll-left", E.value.scrollLeft);
|
|
77
|
+
};
|
|
78
|
+
x({ syncScroll: (e) => {
|
|
79
|
+
E.value && E.value.scrollLeft !== e && (E.value.scrollLeft = e);
|
|
80
|
+
} }), _(j, async (e) => {
|
|
81
|
+
if (!e) return;
|
|
82
|
+
let t = C.bulkActions.find((t) => t.value === e);
|
|
83
|
+
try {
|
|
84
|
+
typeof t?.action == "function" && await t.action([...C.selected]);
|
|
85
|
+
} finally {
|
|
86
|
+
j.value = null;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
let L = null;
|
|
90
|
+
return p(async () => {
|
|
91
|
+
window.addEventListener("scroll", F), window.addEventListener("resize", F), E.value?.addEventListener("scroll", I), await l(), F(), requestAnimationFrame(() => {
|
|
92
|
+
F();
|
|
93
|
+
}), L = new ResizeObserver(() => {
|
|
94
|
+
F();
|
|
95
|
+
}), C.tableWrap && L.observe(C.tableWrap);
|
|
96
|
+
}), f(() => {
|
|
97
|
+
window.removeEventListener("scroll", F), window.removeEventListener("resize", F), E.value?.removeEventListener("scroll", I), L?.disconnect();
|
|
98
|
+
}), (i, l) => (m(), o(r, null, [s("div", {
|
|
99
|
+
ref_key: "footer",
|
|
100
|
+
ref: T,
|
|
101
|
+
class: u(["table-footer", { fixed: D.value }]),
|
|
102
|
+
style: d(O.value)
|
|
103
|
+
}, [
|
|
104
|
+
n.bulk && n.selected.length ? (m(), o("div", y, [g(i.$slots, "iconFooterActions", {}, () => [l[1] ||= s("svg", {
|
|
105
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
106
|
+
width: "24",
|
|
107
|
+
height: "24",
|
|
108
|
+
viewBox: "0 0 24 24",
|
|
109
|
+
fill: "none",
|
|
110
|
+
stroke: "currentColor",
|
|
111
|
+
"stroke-width": "2",
|
|
112
|
+
"stroke-linecap": "round",
|
|
113
|
+
"stroke-linejoin": "round",
|
|
114
|
+
class: "table-footer-icon"
|
|
115
|
+
}, [s("path", { d: "M6 6v6a3 3 0 0 0 3 3h10l-4 -4m0 8l4 -4" })], -1)], !0), c(e, {
|
|
116
|
+
modelValue: j.value,
|
|
117
|
+
"onUpdate:modelValue": l[0] ||= (e) => j.value = e,
|
|
118
|
+
options: M.value
|
|
119
|
+
}, null, 8, ["modelValue", "options"])])) : a("", !0),
|
|
120
|
+
s("div", b, [c(t, {
|
|
121
|
+
pagination: n.pagination,
|
|
122
|
+
navigate: n.navigate
|
|
123
|
+
}, {
|
|
124
|
+
iconPaginationPrev: v(() => [g(i.$slots, "iconPaginationPrev", {}, void 0, !0)]),
|
|
125
|
+
iconPaginationNext: v(() => [g(i.$slots, "iconPaginationNext", {}, void 0, !0)]),
|
|
126
|
+
_: 3
|
|
127
|
+
}, 8, ["pagination", "navigate"])]),
|
|
128
|
+
s("div", {
|
|
129
|
+
ref_key: "footerScroll",
|
|
130
|
+
ref: E,
|
|
131
|
+
class: "table-footer-scroll"
|
|
132
|
+
}, [s("div", {
|
|
133
|
+
class: "table-footer-scroll-content",
|
|
134
|
+
style: d(A.value)
|
|
135
|
+
}, null, 4)], 512)
|
|
136
|
+
], 6), s("div", {
|
|
137
|
+
class: "table-footer-placeholder",
|
|
138
|
+
style: d(k.value)
|
|
139
|
+
}, null, 4)], 64));
|
|
140
|
+
}
|
|
141
|
+
}, [["__scopeId", "data-v-86b580c7"]]);
|
|
142
|
+
export { x as default };
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
declare const component: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
iconFooterActions?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
iconPaginationPrev?: (props: {}) => any;
|
|
7
|
+
} & {
|
|
8
|
+
iconPaginationNext?: (props: {}) => any;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
5
11
|
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
12
|
columns: {
|
|
7
13
|
type: ArrayConstructor;
|