x-next 1.11.1 → 1.13.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/AI_USAGE/catalog.md +1 -1
- package/AI_USAGE/components/alert.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/button.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker.md +1 -1
- package/AI_USAGE/components/dialog.md +1 -1
- package/AI_USAGE/components/dropdown.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination.md +7 -3
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +1 -1
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +8 -4
- package/CHANGELOG.md +40 -0
- package/dist/components/network/Network.vue.d.ts +8 -4
- package/dist/components/network/index.d.ts +13 -5
- package/dist/components/network/props.d.ts +5 -0
- package/dist/components/network/utils.d.ts +3 -3
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +4 -1
- package/dist/components/pagination/page-item-step.vue.d.ts +101 -130
- package/dist/components/pagination/page-item.vue.d.ts +1 -0
- package/dist/components/pagination/page-jumper.vue.d.ts +1 -1
- package/dist/components/pagination/page-options.vue.d.ts +6 -4
- package/dist/components/pagination/utils.d.ts +3 -0
- package/dist/components/table/Table.d.ts +11 -0
- package/dist/components/table/context.d.ts +5 -0
- package/dist/components/table/dom-listeners.d.ts +23 -0
- package/dist/components/table/hooks/use-column-resize.d.ts +2 -1
- package/dist/components/table/hooks/use-drag.d.ts +6 -3
- package/dist/components/table/hooks/use-keyboard-navigation.d.ts +27 -0
- package/dist/components/table/hooks/use-sorter.d.ts +3 -1
- package/dist/components/table/index.d.ts +15 -0
- package/dist/components/table/interface.d.ts +9 -2
- package/dist/components/table/locale.d.ts +8 -7
- package/dist/components/table/table-operation-td.d.ts +34 -0
- package/dist/components/table/table-td.d.ts +36 -2
- package/dist/components/table/table-th.d.ts +34 -0
- package/dist/components/table/table-tr.d.ts +34 -0
- package/dist/components/time-range-selector/index.d.ts +6 -6
- package/dist/components/trend-chart/components/TrendChart.d.ts +1 -1
- package/dist/components/trend-chart/index.d.ts +3 -3
- package/dist/components/upload/Upload.d.ts +1 -1
- package/dist/components/upload/index.d.ts +3 -3
- package/dist/es/_styles/palette-aliases.js +4 -4
- package/dist/es/components/button/Button.js +53 -42
- package/dist/es/components/network/Network.vue.js +17 -12
- package/dist/es/components/network/Network.vue2.js +78 -70
- package/dist/es/components/network/utils.js +112 -71
- package/dist/es/components/pagination/Pagination.js +132 -123
- package/dist/es/components/pagination/page-item-ellipsis.vue.js +10 -10
- package/dist/es/components/pagination/page-item-ellipsis.vue2.js +24 -19
- package/dist/es/components/pagination/page-item-step.vue.js +14 -11
- package/dist/es/components/pagination/page-item-step.vue2.js +20 -22
- package/dist/es/components/pagination/page-item.vue.js +10 -9
- package/dist/es/components/pagination/page-item.vue2.js +24 -19
- package/dist/es/components/pagination/page-jumper.vue2.js +23 -23
- package/dist/es/components/pagination/page-options.vue.js +15 -10
- package/dist/es/components/pagination/page-options.vue2.js +21 -17
- package/dist/es/components/pagination/utils.js +4 -2
- package/dist/es/components/table/Table.js +947 -713
- package/dist/es/components/table/dom-listeners.js +23 -0
- package/dist/es/components/table/hooks/use-column-resize.js +27 -18
- package/dist/es/components/table/hooks/use-column-sorter.js +22 -29
- package/dist/es/components/table/hooks/use-drag.js +23 -20
- package/dist/es/components/table/hooks/use-filter.js +43 -43
- package/dist/es/components/table/hooks/use-keyboard-navigation.js +69 -0
- package/dist/es/components/table/hooks/use-row-selection.js +33 -29
- package/dist/es/components/table/hooks/use-sorter.js +86 -38
- package/dist/es/components/table/hooks/use-span.js +28 -35
- package/dist/es/components/table/locale.js +27 -10
- package/dist/es/components/table/table-col-group.vue2.js +9 -9
- package/dist/es/components/table/table-operation-td.js +72 -51
- package/dist/es/components/table/table-operation-th.js +41 -34
- package/dist/es/components/table/table-td.js +100 -77
- package/dist/es/components/table/table-th.js +221 -188
- package/dist/es/components/table/table-tr.js +11 -8
- package/dist/es/components/table/utils.js +104 -94
- package/dist/es/components/virtual-list-v2/hooks/use-size.js +47 -41
- package/dist/es/components/virtual-list-v2/virtual-list-item.js +29 -16
- package/dist/es/locale/en-US.js +9 -1
- package/dist/es/locale/index.js +3 -3
- package/dist/es/locale/zh-CN.js +9 -1
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/locale/interface.d.ts +12 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/form-select.css +1 -1
- package/dist/style/network.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as l, ref as
|
|
2
|
-
import { InputNumber as
|
|
1
|
+
import { defineComponent as l, ref as d, watch as p, computed as f, nextTick as g } from "vue";
|
|
2
|
+
import { InputNumber as b } from "../form-input-number/index.js";
|
|
3
3
|
import { getClassNameMixin as N } from "../../_utils/config.js";
|
|
4
|
-
import { useLocale as
|
|
5
|
-
const
|
|
4
|
+
import { useLocale as h } from "../../locale/index.js";
|
|
5
|
+
const x = l({
|
|
6
6
|
name: "PageJumper",
|
|
7
7
|
components: {
|
|
8
|
-
InputNumber:
|
|
8
|
+
InputNumber: b
|
|
9
9
|
},
|
|
10
10
|
props: {
|
|
11
11
|
current: {
|
|
@@ -35,37 +35,37 @@ const S = l({
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
emits: ["change"],
|
|
38
|
-
setup(e, { emit:
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
return Number.isNaN(
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
e.simple
|
|
38
|
+
setup(e, { emit: a }) {
|
|
39
|
+
const r = N("pagination--jumper"), { t: o } = h(), i = d(e.simple ? e.current : void 0), m = (t) => {
|
|
40
|
+
const n = parseInt(t.toString(), 10);
|
|
41
|
+
return Number.isNaN(n) ? void 0 : String(n);
|
|
42
|
+
}, u = (t) => {
|
|
43
|
+
!e.disabled && typeof t == "number" && Number.isFinite(t) && a("change", Math.trunc(t)), g(() => {
|
|
44
|
+
i.value = e.simple ? e.current : void 0;
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
p(
|
|
48
|
-
() => e.current,
|
|
49
|
-
(n) => {
|
|
50
|
-
|
|
48
|
+
[() => e.current, () => e.simple],
|
|
49
|
+
([t, n], [, c]) => {
|
|
50
|
+
(n || n !== c) && (i.value = n ? t : void 0);
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const s = f(() => [
|
|
54
|
+
r.block,
|
|
55
55
|
{
|
|
56
|
-
[
|
|
56
|
+
[r.modifier("simple")]: e.simple
|
|
57
57
|
}
|
|
58
58
|
]);
|
|
59
59
|
return {
|
|
60
60
|
t: o,
|
|
61
|
-
className:
|
|
62
|
-
cls:
|
|
63
|
-
inputValue:
|
|
64
|
-
handleChange:
|
|
61
|
+
className: r,
|
|
62
|
+
cls: s,
|
|
63
|
+
inputValue: i,
|
|
64
|
+
handleChange: u,
|
|
65
65
|
handleFormatter: m
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
x as default
|
|
71
71
|
};
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
3
|
-
import
|
|
4
|
-
function m(e, d, c, f, u,
|
|
5
|
-
const
|
|
6
|
-
return
|
|
1
|
+
import o from "./page-options.vue2.js";
|
|
2
|
+
import { resolveComponent as l, openBlock as s, createElementBlock as n, normalizeClass as r, createVNode as i, mergeProps as p } from "vue";
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function m(e, d, c, f, u, b) {
|
|
5
|
+
const a = l("Select");
|
|
6
|
+
return s(), n("span", {
|
|
7
7
|
class: r(e.className.block)
|
|
8
8
|
}, [
|
|
9
|
-
|
|
9
|
+
i(a, p(e.selectProps, {
|
|
10
10
|
"model-value": e.pageSize,
|
|
11
11
|
options: e.options,
|
|
12
|
+
multiple: !1,
|
|
13
|
+
"allow-clear": !1,
|
|
14
|
+
"allow-create": !1,
|
|
15
|
+
"field-names": void 0,
|
|
12
16
|
size: e.size,
|
|
13
17
|
disabled: e.disabled,
|
|
18
|
+
"aria-label": e.pageSizeLabel,
|
|
14
19
|
onChange: e.handleChange
|
|
15
|
-
}), null, 16, ["model-value", "options", "size", "disabled", "onChange"])
|
|
20
|
+
}), null, 16, ["model-value", "options", "size", "disabled", "aria-label", "onChange"])
|
|
16
21
|
], 2);
|
|
17
22
|
}
|
|
18
|
-
const
|
|
23
|
+
const C = /* @__PURE__ */ t(o, [["render", m]]);
|
|
19
24
|
export {
|
|
20
|
-
|
|
25
|
+
C as default
|
|
21
26
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Select as
|
|
3
|
-
import { getClassNameMixin as
|
|
4
|
-
import { useLocale as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as l, computed as o } from "vue";
|
|
2
|
+
import { Select as z } from "../form-select/index.js";
|
|
3
|
+
import { getClassNameMixin as S } from "../../_utils/config.js";
|
|
4
|
+
import { useLocale as d } from "../../locale/index.js";
|
|
5
|
+
import { isValidPageSize as n } from "./utils.js";
|
|
6
|
+
const C = l({
|
|
7
7
|
name: "PageOptions",
|
|
8
8
|
components: {
|
|
9
|
-
Select:
|
|
9
|
+
Select: z
|
|
10
10
|
},
|
|
11
11
|
props: {
|
|
12
12
|
sizeOptions: {
|
|
@@ -26,23 +26,27 @@ const y = r({
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["change"],
|
|
29
|
-
setup(i, { emit:
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
setup(i, { emit: s }) {
|
|
30
|
+
const p = S("pagination--options"), { t, locale: g } = d(), c = o(() => t(
|
|
31
|
+
g.value.pagination.pageSizeLabel ? "pagination.pageSizeLabel" : "pagination.pageSizeOption",
|
|
32
|
+
{ size: i.pageSize ?? 10 }
|
|
33
|
+
)), m = o(() => {
|
|
34
|
+
const e = [...new Set(i.sizeOptions.filter(n))];
|
|
35
|
+
return n(i.pageSize) && !e.includes(i.pageSize) && e.push(i.pageSize), e.sort((a, r) => a - r), e.map((a) => ({
|
|
36
|
+
value: a,
|
|
37
|
+
label: t("pagination.pageSizeOption", { size: a })
|
|
35
38
|
}));
|
|
36
39
|
});
|
|
37
40
|
return {
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
pageSizeLabel: c,
|
|
42
|
+
className: p,
|
|
43
|
+
options: m,
|
|
40
44
|
handleChange: (e) => {
|
|
41
|
-
|
|
45
|
+
!i.disabled && n(e) && e !== i.pageSize && s("change", e);
|
|
42
46
|
}
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
49
|
});
|
|
46
50
|
export {
|
|
47
|
-
|
|
51
|
+
C as default
|
|
48
52
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = (t) => typeof t == "number" && Number.isSafeInteger(t) && t > 0, o = (t, e, r, n) => Number.isFinite(t) ? Math.min(Math.max(Math.trunc(t), r), n) : e, s = (t, { min: e, max: r }) => t < e ? e : t > r ? r : t;
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
s as getLegalPage,
|
|
4
|
+
i as isValidPageSize,
|
|
5
|
+
o as normalizeInteger
|
|
4
6
|
};
|