@aplus-frontend/ui 7.13.8 → 7.13.9
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/es/src/ag-grid/components/body-cell/index.vue2.mjs +7 -7
- package/es/src/ag-grid/components/empty/index.vue2.mjs +10 -10
- package/es/src/ag-grid/components/header-cell/index.vue2.mjs +37 -37
- package/es/src/ag-grid/components/row/index.vue2.mjs +5 -5
- package/es/src/ag-grid/components/tooltip/index.vue2.mjs +12 -12
- package/es/src/ag-grid/editable/form-item.vue.mjs +49 -49
- package/es/src/ag-grid/editable/index.vue.mjs +27 -27
- package/es/src/ag-grid/index.vue.mjs +249 -249
- package/es/src/ap-action/group/index.vue.mjs +15 -15
- package/es/src/ap-action/item/index.vue2.mjs +28 -28
- package/es/src/ap-action/item-dropdown/index.vue.mjs +39 -39
- package/es/src/ap-field/checkbox/index.vue.mjs +19 -19
- package/es/src/ap-field/checkbox/read.vue2.mjs +9 -9
- package/es/src/ap-field/date/index.vue.mjs +50 -50
- package/es/src/ap-field/date/read.vue2.mjs +7 -7
- package/es/src/ap-field/date-range/index.vue.mjs +30 -30
- package/es/src/ap-field/date-range/read.vue2.mjs +20 -20
- package/es/src/ap-field/number/index.vue.mjs +24 -24
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-field/second/index.vue.mjs +15 -15
- package/es/src/ap-field/second/read.vue2.mjs +7 -7
- package/es/src/ap-field/segmented/index.vue.mjs +24 -24
- package/es/src/ap-field/select/index.vue.d.ts +12 -2
- package/es/src/ap-field/select/index.vue.mjs +127 -124
- package/es/src/ap-field/select/read.vue2.mjs +6 -6
- package/es/src/ap-field/slider/index.vue.mjs +11 -11
- package/es/src/ap-field/style/select.mjs +53 -36
- package/es/src/ap-field/switch/index.vue.mjs +45 -45
- package/es/src/ap-field/text/read-password.vue2.mjs +13 -13
- package/es/src/ap-field/text/read.vue2.mjs +3 -3
- package/es/src/ap-field/text-area/index.vue.mjs +29 -29
- package/es/src/ap-field/text-area/read.vue2.mjs +12 -12
- package/es/src/ap-field/tree-select/index.vue.mjs +31 -31
- package/es/src/ap-form/ap-form.vue2.mjs +46 -46
- package/es/src/ap-form/drawer-form/index.vue.mjs +30 -30
- package/es/src/ap-form/item/index.vue.mjs +75 -75
- package/es/src/ap-form/items/checkbox/index.vue.mjs +10 -10
- package/es/src/ap-form/items/number/index.vue.mjs +17 -17
- package/es/src/ap-form/items/radio/index.vue.mjs +13 -13
- package/es/src/ap-form/items/switch/index.vue.mjs +14 -14
- package/es/src/ap-form/items/text/index.vue2.mjs +26 -26
- package/es/src/ap-form/items/text/password.vue.mjs +19 -19
- package/es/src/ap-form/items/text-area/index.vue.mjs +17 -17
- package/es/src/ap-form/modal-form/index.vue.mjs +34 -34
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +39 -39
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +7 -7
- package/es/src/ap-grid/editable/form-item.vue.mjs +46 -46
- package/es/src/ap-grid/editable/index.vue.mjs +19 -19
- package/es/src/ap-grid/index.vue.mjs +212 -212
- package/es/src/ap-list/index.vue.mjs +116 -116
- package/es/src/ap-table/ap-table.vue2.mjs +217 -217
- package/es/src/ap-table/components/index/index.vue2.mjs +9 -9
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +52 -51
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +21 -21
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +15 -15
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +69 -69
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +31 -30
- package/es/src/ap-table/components/setting/template/index.vue2.mjs +25 -25
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +41 -40
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -14
- package/es/src/ap-table/style/setting.mjs +2 -2
- package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +54 -54
- package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +13 -13
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +20 -20
- package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +33 -33
- package/es/src/business/ap-descriptions/help-message/index.vue2.mjs +13 -13
- package/es/src/business/ap-download/ap-download.vue.mjs +24 -24
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.mjs +77 -77
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +33 -33
- package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +12 -12
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +43 -43
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +57 -57
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +37 -37
- package/es/src/business/ap-tag/ap-tag.vue.mjs +24 -24
- package/es/src/business/ap-title/ApTitle.vue2.mjs +27 -27
- package/es/src/business/ap-value-select-card/index.vue2.mjs +98 -98
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +25 -25
- package/es/src/business/batch-input-group/index.vue.mjs +60 -60
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +29 -29
- package/es/src/editable-table/form-item.vue.mjs +35 -35
- package/es/src/editable-table/index.vue.mjs +19 -19
- package/es/src/full-screen/index.vue.mjs +46 -46
- package/es/src/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- package/es/src/mask/index.vue.mjs +48 -48
- package/es/src/portal/index.vue.mjs +5 -5
- package/es/src/scroll-bar/internal.vue.mjs +62 -62
- package/es/src/scroll-view/index.vue.mjs +66 -66
- package/es/src/skeleton/components/desc/index.vue2.mjs +9 -9
- package/es/src/skeleton/components/desc/item-large.vue2.mjs +25 -25
- package/es/src/skeleton/components/desc/item.vue2.mjs +13 -13
- package/es/src/skeleton/components/list/index.vue2.mjs +14 -14
- package/es/src/skeleton/components/list/item.vue2.mjs +12 -12
- package/es/src/skeleton/components/page-header/index.vue2.mjs +8 -8
- package/es/src/skeleton/components/search-form/index.vue2.mjs +35 -35
- package/es/src/skeleton/components/table/index.vue2.mjs +17 -17
- package/es/src/skeleton/components/table/item.vue2.mjs +23 -23
- package/es/src/skeleton/descriptions.vue2.mjs +15 -15
- package/es/src/skeleton/list-page.vue2.mjs +12 -12
- package/es/src/splitter/Panel.vue2.mjs +11 -11
- package/es/src/splitter/SplitBar.vue2.mjs +79 -79
- package/es/src/splitter/Splitter.vue2.mjs +50 -50
- package/es/src/text/group.vue.mjs +8 -8
- package/es/src/text/index.vue.mjs +48 -48
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/row/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +12 -2
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/index/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
- package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/business/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/business/ap-download/ap-download.vue.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-status/group/ApStatusGroup.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/business/ap-title/ApTitle.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/mask/index.vue.js +1 -1
- package/lib/src/portal/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/index.vue.js +1 -1
- package/lib/src/skeleton/components/desc/index.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item.vue2.js +1 -1
- package/lib/src/skeleton/components/list/index.vue2.js +1 -1
- package/lib/src/skeleton/components/list/item.vue2.js +1 -1
- package/lib/src/skeleton/components/page-header/index.vue2.js +1 -1
- package/lib/src/skeleton/components/search-form/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/item.vue2.js +1 -1
- package/lib/src/skeleton/descriptions.vue2.js +1 -1
- package/lib/src/skeleton/list-page.vue2.js +1 -1
- package/lib/src/splitter/Panel.vue2.js +1 -1
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/Splitter.vue2.js +1 -1
- package/lib/src/text/group.vue.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as e, createBlock as
|
|
2
|
-
import { contentCustom as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as e, createBlock as r, openBlock as n, resolveDynamicComponent as o, unref as m } from "vue";
|
|
2
|
+
import { contentCustom as p } from "../../../ap-grid/utils/col.mjs";
|
|
3
|
+
const i = /* @__PURE__ */ e({
|
|
4
4
|
__name: "index",
|
|
5
5
|
props: {
|
|
6
6
|
params: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
return (
|
|
10
|
-
|
|
8
|
+
setup(s) {
|
|
9
|
+
return (a, d) => (n(), r(o(
|
|
10
|
+
m(p)(
|
|
11
11
|
{
|
|
12
12
|
value: a.params.value,
|
|
13
13
|
text: a.params.value,
|
|
@@ -26,5 +26,5 @@ const s = /* @__PURE__ */ e({
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
i as default
|
|
30
30
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Empty as
|
|
1
|
+
import { defineComponent as n, createElementBlock as t, openBlock as m, normalizeClass as s, unref as o, createBlock as p, resolveDynamicComponent as i } from "vue";
|
|
2
|
+
import { Empty as r } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../../config-provider/index.mjs";
|
|
4
4
|
import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
-
const
|
|
5
|
+
const _ = /* @__PURE__ */ n({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
params: {}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const { b:
|
|
12
|
-
return (
|
|
13
|
-
class:
|
|
10
|
+
setup(l) {
|
|
11
|
+
const { b: a } = c("ag-grid");
|
|
12
|
+
return (e, y) => (m(), t("div", {
|
|
13
|
+
class: s(o(a)("empty"))
|
|
14
14
|
}, [
|
|
15
|
-
e.params.emptyComponent ? (m(),
|
|
15
|
+
e.params.emptyComponent ? (m(), p(i(e.params.emptyComponent), { key: 0 })) : (m(), p(o(r), {
|
|
16
16
|
key: 1,
|
|
17
|
-
image:
|
|
17
|
+
image: o(r).PRESENTED_IMAGE_SIMPLE,
|
|
18
18
|
description: e.params.emptyText
|
|
19
19
|
}, null, 8, ["image", "description"]))
|
|
20
20
|
], 2));
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
_ as default
|
|
25
25
|
};
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { defineComponent as B, computed as
|
|
2
|
-
import { CaretUpOutlined as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { useInjectSorter as
|
|
5
|
-
import { getTableTitle as
|
|
1
|
+
import { defineComponent as B, computed as d, createElementBlock as f, openBlock as l, normalizeClass as r, unref as e, createBlock as _, createCommentVNode as D, resolveDynamicComponent as O, createVNode as g } from "vue";
|
|
2
|
+
import { CaretUpOutlined as V, CaretDownOutlined as j } from "@ant-design/icons-vue";
|
|
3
|
+
import { useToken as z } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { useInjectSorter as A } from "../../context.mjs";
|
|
5
|
+
import { getTableTitle as E } from "../../../ap-table/utils.mjs";
|
|
6
6
|
import "../../../config-provider/index.mjs";
|
|
7
|
-
import
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
const
|
|
7
|
+
import U from "../../style/custom-header.mjs";
|
|
8
|
+
import { useNamespace as C } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const P = /* @__PURE__ */ B({
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
12
12
|
params: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
return
|
|
14
|
+
setup(S) {
|
|
15
|
+
const o = S, { b: v, e: a } = C("ag-custom-header"), { be: b, bem: h } = C("ag-grid"), k = U("ag-custom-header"), [, I] = z(), { sorter: c, setSorter: T } = A(), n = d(() => o.params.column.sorter);
|
|
16
|
+
function y(t) {
|
|
17
|
+
return t ? t === "asc" ? "desc" : null : "asc";
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
21
|
-
if (!
|
|
19
|
+
const m = d(() => o.params?.column?.getColId?.());
|
|
20
|
+
function x() {
|
|
21
|
+
if (!n.value)
|
|
22
22
|
return;
|
|
23
|
-
const
|
|
24
|
-
...
|
|
25
|
-
sort:
|
|
23
|
+
const s = o.params.column.getColId(), N = o.params.column.getSort(), u = y(N), p = o.params.api, w = p.getColumnState().map((i) => ({
|
|
24
|
+
...i,
|
|
25
|
+
sort: i.colId === s ? u : null
|
|
26
26
|
}));
|
|
27
27
|
p.applyColumnState({
|
|
28
28
|
state: w
|
|
29
|
-
}),
|
|
29
|
+
}), T({ [s]: u });
|
|
30
30
|
}
|
|
31
|
-
return (
|
|
32
|
-
class:
|
|
31
|
+
return (t, s) => (l(), f("div", {
|
|
32
|
+
class: r([
|
|
33
33
|
e(v)(),
|
|
34
|
-
{ sortable:
|
|
35
|
-
`align-${
|
|
34
|
+
{ sortable: n.value },
|
|
35
|
+
`align-${t.params.column.align || "left"}`,
|
|
36
36
|
e(k)
|
|
37
37
|
]),
|
|
38
|
-
onClick:
|
|
38
|
+
onClick: x
|
|
39
39
|
}, [
|
|
40
|
-
(
|
|
41
|
-
e(
|
|
42
|
-
|
|
40
|
+
(l(), _(O(
|
|
41
|
+
e(E)(
|
|
42
|
+
t.params.column,
|
|
43
43
|
[
|
|
44
44
|
e(b)("table-header", "title"),
|
|
45
|
-
|
|
45
|
+
t.params.column.tooltip ? "" : e(h)("table-header", "title", "single")
|
|
46
46
|
],
|
|
47
47
|
void 0,
|
|
48
|
-
e(
|
|
48
|
+
e(I).colorTextTertiary
|
|
49
49
|
)
|
|
50
50
|
))),
|
|
51
|
-
|
|
51
|
+
n.value ? (l(), f("span", {
|
|
52
52
|
key: 0,
|
|
53
|
-
class:
|
|
53
|
+
class: r(e(a)("sort-wrapper"))
|
|
54
54
|
}, [
|
|
55
|
-
|
|
56
|
-
class:
|
|
55
|
+
g(e(V), {
|
|
56
|
+
class: r({ [e(a)("sorter-up")]: !0, active: e(c)[m.value] === "asc" })
|
|
57
57
|
}, null, 8, ["class"]),
|
|
58
|
-
|
|
59
|
-
class:
|
|
58
|
+
g(e(j), {
|
|
59
|
+
class: r({ [e(a)("sorter-down")]: !0, active: e(c)[m.value] === "desc" })
|
|
60
60
|
}, null, 8, ["class"])
|
|
61
|
-
], 2)) :
|
|
61
|
+
], 2)) : D("", !0)
|
|
62
62
|
], 2));
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
P as default
|
|
67
67
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as r, createBlock as o, openBlock as n, resolveDynamicComponent as a } from "vue";
|
|
2
|
+
const t = /* @__PURE__ */ r({
|
|
3
3
|
name: "AgGridCustomRow",
|
|
4
4
|
__name: "index",
|
|
5
5
|
props: {
|
|
6
6
|
params: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
return (
|
|
8
|
+
setup(p) {
|
|
9
|
+
return (e, m) => (n(), o(a(e.params.render(e.params))));
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
t as default
|
|
14
14
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as p, ref as u, onMounted as m, withDirectives as d, openBlock as v, createElementBlock as f, normalizeClass as g, unref as h, toDisplayString as w, vShow as
|
|
1
|
+
import { defineComponent as p, ref as u, onMounted as m, withDirectives as d, openBlock as v, createElementBlock as f, normalizeClass as g, unref as h, toDisplayString as w, vShow as _ } from "vue";
|
|
2
2
|
import "../../../config-provider/index.mjs";
|
|
3
|
-
import { useNamespace as
|
|
3
|
+
import { useNamespace as x } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
4
4
|
const k = /* @__PURE__ */ p({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
params: {}
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const n =
|
|
9
|
+
setup(l) {
|
|
10
|
+
const n = l, e = u(!1), { e: i } = x("ag-grid");
|
|
11
11
|
return m(() => {
|
|
12
|
-
const { rowIndex:
|
|
13
|
-
`div.ag-row[row-index="${
|
|
12
|
+
const { rowIndex: o, column: t, gridWrapperRef: s, lineClamp: c } = n.params, r = s.value?.querySelector(
|
|
13
|
+
`div.ag-row[row-index="${o}"] .ag-cell[col-id="${t.colId}"] span.ag-cell-value`
|
|
14
14
|
);
|
|
15
|
-
if (!
|
|
15
|
+
if (!r) {
|
|
16
16
|
e.value = !0;
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
e.value =
|
|
21
|
-
}), (
|
|
19
|
+
const a = c === 1 ? "Width" : "Height";
|
|
20
|
+
e.value = r[`scroll${a}`] > r[`client${a}`];
|
|
21
|
+
}), (o, t) => d((v(), f("div", {
|
|
22
22
|
class: g(h(i)("tooltip"))
|
|
23
|
-
}, w(
|
|
24
|
-
[
|
|
23
|
+
}, w(o.params.value), 3)), [
|
|
24
|
+
[_, e.value]
|
|
25
25
|
]);
|
|
26
26
|
}
|
|
27
27
|
});
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as A, useSlots as L, ref as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { ApForm as
|
|
1
|
+
import { defineComponent as A, useSlots as L, ref as y, onMounted as P, watch as G, createElementBlock as W, openBlock as U, Fragment as $, createVNode as p, unref as l, withCtx as g, mergeProps as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
|
+
import { cloneDeep as u, isEqual as ee, omit as oe } from "lodash-unified";
|
|
3
|
+
import { ApForm as h } from "../../ap-form/index.mjs";
|
|
4
4
|
import { useInjectForm as te } from "../../ap-form/context.mjs";
|
|
5
5
|
import { useWatch as ae } from "../../ap-form/hooks/use-watch.mjs";
|
|
6
6
|
import { getModelValue as ne } from "../../ap-form/utils/get.mjs";
|
|
7
7
|
import { transformValues as le } from "../../ap-form/utils/transform.mjs";
|
|
8
8
|
import "../../config-provider/index.mjs";
|
|
9
9
|
import { useGetEditableColumns as re } from "../hooks/use-editable-columns.mjs";
|
|
10
|
-
import { useEditableFormItemApi as
|
|
10
|
+
import { useEditableFormItemApi as se } from "../hooks/use-editable-form-item-api.mjs";
|
|
11
11
|
import "../index.vue2.mjs";
|
|
12
|
-
import
|
|
12
|
+
import ie from "../style/editable.mjs";
|
|
13
13
|
import { getShadowName as me } from "../utils.mjs";
|
|
14
|
-
import { getColumnTransformOptions as ue, arrayToObject as
|
|
14
|
+
import { getColumnTransformOptions as ue, arrayToObject as C } from "./utils.mjs";
|
|
15
15
|
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
16
16
|
import { useGlobalConfig as pe } from "../../config-provider/hooks/use-global-config.mjs";
|
|
17
|
-
import
|
|
18
|
-
const
|
|
17
|
+
import fe from "../index.vue.mjs";
|
|
18
|
+
const _e = /* @__PURE__ */ A({
|
|
19
19
|
name: "EditableGrid",
|
|
20
20
|
__name: "form-item",
|
|
21
21
|
props: {
|
|
@@ -133,65 +133,65 @@ const Ne = /* @__PURE__ */ A({
|
|
|
133
133
|
name: {},
|
|
134
134
|
formItem: {}
|
|
135
135
|
},
|
|
136
|
-
setup(
|
|
136
|
+
setup(b, {
|
|
137
137
|
expose: R
|
|
138
138
|
}) {
|
|
139
|
-
const
|
|
140
|
-
b:
|
|
141
|
-
} = de("editable-aggrid"),
|
|
142
|
-
internalInstance:
|
|
139
|
+
const B = L(), o = b, {
|
|
140
|
+
b: v
|
|
141
|
+
} = de("editable-aggrid"), x = ie("editable-aggrid"), r = y(), {
|
|
142
|
+
internalInstance: s
|
|
143
143
|
} = te();
|
|
144
144
|
function I(e) {
|
|
145
145
|
const t = ue(o.columns || []);
|
|
146
146
|
if (!Object.keys(t).length || !e?.length)
|
|
147
147
|
return e;
|
|
148
148
|
let a = [];
|
|
149
|
-
for (const
|
|
150
|
-
a.push(le(
|
|
149
|
+
for (const m of e)
|
|
150
|
+
a.push(le(m, t));
|
|
151
151
|
return a;
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const i = me(o.name);
|
|
154
154
|
let f = [];
|
|
155
155
|
P(() => {
|
|
156
|
-
const e = o.formItem?.initialValue ?? ne(
|
|
157
|
-
e && (
|
|
156
|
+
const e = o.formItem?.initialValue ?? ne(s?.getInitialValues() ?? {}, o.name);
|
|
157
|
+
e && (s?.updateInitialModel(i, C(u(e), o.rowKey)), f = u(e), n.value || _(u(e), "suffix", !0));
|
|
158
158
|
});
|
|
159
|
-
const n =
|
|
159
|
+
const n = y([]), S = ae(o.name);
|
|
160
160
|
G(() => S.value, (e) => {
|
|
161
|
-
ee(e, n.value) ||
|
|
161
|
+
ee(e, n.value) || c(e ?? u(f));
|
|
162
162
|
}, {
|
|
163
163
|
deep: !0,
|
|
164
164
|
flush: "post",
|
|
165
165
|
immediate: !0
|
|
166
166
|
});
|
|
167
|
-
const T = pe("valueTypeMap"), E = re(o, T,
|
|
167
|
+
const T = pe("valueTypeMap"), E = re(o, T, i), {
|
|
168
168
|
add: F,
|
|
169
169
|
addMultiple: V,
|
|
170
|
-
__addMultiple:
|
|
171
|
-
remove:
|
|
172
|
-
removeByKey:
|
|
170
|
+
__addMultiple: _,
|
|
171
|
+
remove: N,
|
|
172
|
+
removeByKey: j,
|
|
173
173
|
getRowData: k,
|
|
174
174
|
getRowsData: D,
|
|
175
175
|
setRowData: O,
|
|
176
176
|
clear: H,
|
|
177
|
-
refreshRowIds:
|
|
178
|
-
} =
|
|
177
|
+
refreshRowIds: d
|
|
178
|
+
} = se(o, s, n, i);
|
|
179
179
|
function K() {
|
|
180
180
|
const e = r.value?._internalGridApi;
|
|
181
|
-
if (!
|
|
181
|
+
if (!d.value?.length || !e)
|
|
182
182
|
return;
|
|
183
|
-
const t =
|
|
183
|
+
const t = d.value.map((a) => e.getRowNode(a)).filter((a) => !!a);
|
|
184
184
|
e.refreshCells({
|
|
185
185
|
rowNodes: t,
|
|
186
186
|
force: !0
|
|
187
|
-
}),
|
|
187
|
+
}), d.value = [];
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function c(e) {
|
|
190
190
|
n.value = [...e];
|
|
191
|
-
const t =
|
|
192
|
-
|
|
191
|
+
const t = C(e, o.rowKey);
|
|
192
|
+
s?.setFieldValue(o.name, [...e]), s?.setFieldValue(i, t);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function w(e, t) {
|
|
195
195
|
const a = e === "end" ? n.value.length - 1 : e;
|
|
196
196
|
r.value?.scrollToRow(a, t);
|
|
197
197
|
}
|
|
@@ -201,29 +201,29 @@ const Ne = /* @__PURE__ */ A({
|
|
|
201
201
|
return R({
|
|
202
202
|
add: F,
|
|
203
203
|
addMultiple: V,
|
|
204
|
-
remove:
|
|
205
|
-
removeByKey:
|
|
204
|
+
remove: N,
|
|
205
|
+
removeByKey: j,
|
|
206
206
|
getRowData: k,
|
|
207
207
|
getRowsData: D,
|
|
208
208
|
setRowData: O,
|
|
209
209
|
clear: H,
|
|
210
|
-
setTableData:
|
|
211
|
-
scrollTo:
|
|
212
|
-
scrollToRow:
|
|
210
|
+
setTableData: c,
|
|
211
|
+
scrollTo: w,
|
|
212
|
+
scrollToRow: w,
|
|
213
213
|
scrollToColumn: M,
|
|
214
214
|
table: r
|
|
215
|
-
}), (e, t) => (U(), W($, null, [
|
|
215
|
+
}), (e, t) => (U(), W($, null, [p(l(h).FormItem, {
|
|
216
216
|
hidden: "",
|
|
217
|
-
name:
|
|
218
|
-
"initial-value":
|
|
217
|
+
name: e.name,
|
|
218
|
+
"initial-value": e.formItem?.initialValue,
|
|
219
219
|
transform: I
|
|
220
|
-
}, null, 8, ["name", "initial-value"]),
|
|
221
|
-
label:
|
|
220
|
+
}, null, 8, ["name", "initial-value"]), p(l(h).FormItem, {
|
|
221
|
+
label: e.label
|
|
222
222
|
}, {
|
|
223
|
-
default:
|
|
223
|
+
default: g(() => [p(fe, q(l(oe)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
224
224
|
ref_key: "tableRef",
|
|
225
225
|
ref: r,
|
|
226
|
-
class: [l(
|
|
226
|
+
class: [l(v)(), l(x)],
|
|
227
227
|
size: "mini",
|
|
228
228
|
columns: l(E),
|
|
229
229
|
"data-source": n.value,
|
|
@@ -231,14 +231,14 @@ const Ne = /* @__PURE__ */ A({
|
|
|
231
231
|
onUpdate: K
|
|
232
232
|
}), J({
|
|
233
233
|
_: 2
|
|
234
|
-
}, [Q(
|
|
235
|
-
name:
|
|
236
|
-
fn:
|
|
234
|
+
}, [Q(B, (a, m) => ({
|
|
235
|
+
name: m,
|
|
236
|
+
fn: g((z) => [X(e.$slots, m, Y(Z(z || {})))])
|
|
237
237
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
238
238
|
_: 3
|
|
239
239
|
}, 8, ["label"])], 64));
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
export {
|
|
243
|
-
|
|
243
|
+
_e as default
|
|
244
244
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as M, useSlots as $, ref as
|
|
2
|
-
import { isEqual as te, isArray as
|
|
1
|
+
import { defineComponent as M, useSlots as $, ref as b, watch as q, unref as l, createBlock as J, openBlock as Q, withCtx as m, createVNode as v, mergeProps as X, createSlots as Y, renderList as Z, renderSlot as ee, normalizeProps as oe, guardReactiveProps as ae } from "vue";
|
|
2
|
+
import { isEqual as te, isArray as R, omit as ne } from "lodash-unified";
|
|
3
3
|
import { ApForm as c } from "../../ap-form/index.mjs";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
@@ -10,8 +10,8 @@ import se from "../style/editable.mjs";
|
|
|
10
10
|
import { arrayToObject as f, getRowKey as ie } from "./utils.mjs";
|
|
11
11
|
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
12
|
import { useControllableValue as ue } from "../../hooks/useControllableValue.mjs";
|
|
13
|
-
import { useGlobalConfig as
|
|
14
|
-
import
|
|
13
|
+
import { useGlobalConfig as pe } from "../../config-provider/hooks/use-global-config.mjs";
|
|
14
|
+
import me from "../index.vue.mjs";
|
|
15
15
|
const Fe = /* @__PURE__ */ M({
|
|
16
16
|
name: "EditableGrid",
|
|
17
17
|
__name: "index",
|
|
@@ -133,23 +133,23 @@ const Fe = /* @__PURE__ */ M({
|
|
|
133
133
|
onFieldChange: {}
|
|
134
134
|
},
|
|
135
135
|
emits: ["update:value"],
|
|
136
|
-
setup(
|
|
136
|
+
setup(C, {
|
|
137
137
|
expose: x,
|
|
138
138
|
emit: B
|
|
139
139
|
}) {
|
|
140
|
-
const S = $(), a =
|
|
140
|
+
const S = $(), a = C, {
|
|
141
141
|
b: T
|
|
142
|
-
} = de("editable-aggrid"), F = se("editable-aggrid"), _ = B, i =
|
|
142
|
+
} = de("editable-aggrid"), F = se("editable-aggrid"), _ = B, i = b(), {
|
|
143
143
|
value: s,
|
|
144
|
-
updateValue:
|
|
145
|
-
} = ue(a, _), r =
|
|
144
|
+
updateValue: y
|
|
145
|
+
} = ue(a, _), r = b(), E = c.useWatch(a.name, r);
|
|
146
146
|
q(s, (e) => {
|
|
147
147
|
const o = f(e, a.rowKey);
|
|
148
148
|
te(o, l(E)) || r.value?.setFieldValue(a.name, o);
|
|
149
149
|
}, {
|
|
150
150
|
deep: !0
|
|
151
151
|
});
|
|
152
|
-
const K =
|
|
152
|
+
const K = pe("valueTypeMap"), k = re(a, K), {
|
|
153
153
|
add: A,
|
|
154
154
|
addMultiple: N,
|
|
155
155
|
remove: j,
|
|
@@ -159,7 +159,7 @@ const Fe = /* @__PURE__ */ M({
|
|
|
159
159
|
setRowData: H,
|
|
160
160
|
clear: O,
|
|
161
161
|
refreshRowIds: d
|
|
162
|
-
} = le(a, r, s,
|
|
162
|
+
} = le(a, r, s, y);
|
|
163
163
|
function z() {
|
|
164
164
|
const e = i.value?._internalGridApi;
|
|
165
165
|
if (!d.value?.length || !e)
|
|
@@ -173,31 +173,31 @@ const Fe = /* @__PURE__ */ M({
|
|
|
173
173
|
function L() {
|
|
174
174
|
r.value?.resetFields();
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
return e ? (
|
|
176
|
+
function w(e) {
|
|
177
|
+
return e ? (R(e) ? e : [e]).map((t) => R(t) ? [a.name, ...t] : [a.name, t]) : void 0;
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function g(e) {
|
|
180
180
|
try {
|
|
181
181
|
const o = Object.keys(e), t = s.value.map((n) => ie(n, void 0, a.rowKey));
|
|
182
|
-
return o.sort((n, u) => t.findIndex((
|
|
182
|
+
return o.sort((n, u) => t.findIndex((p) => String(p) === n) - t.findIndex((p) => String(p) === u)), o.map((n) => e[n]);
|
|
183
183
|
} catch {
|
|
184
184
|
return e;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
async function P(e, o) {
|
|
188
|
-
const n = (await r.value?.validateFields(
|
|
189
|
-
return
|
|
188
|
+
const n = (await r.value?.validateFields(w(e), o))?.[a.name];
|
|
189
|
+
return g(n);
|
|
190
190
|
}
|
|
191
191
|
async function G(e, o) {
|
|
192
|
-
const n = (await r.value?.validateFieldsReturnTransformed(
|
|
193
|
-
return
|
|
192
|
+
const n = (await r.value?.validateFieldsReturnTransformed(w(e), o))?.[a.name];
|
|
193
|
+
return g(n);
|
|
194
194
|
}
|
|
195
195
|
function U(e) {
|
|
196
|
-
|
|
196
|
+
y(e);
|
|
197
197
|
const o = f(e, a.rowKey);
|
|
198
198
|
r.value?.setFieldValue(a.name, o);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function h(e, o) {
|
|
201
201
|
const t = e === "end" ? s.value.length - 1 : e;
|
|
202
202
|
i.value?.scrollToRow(t, o);
|
|
203
203
|
}
|
|
@@ -217,8 +217,8 @@ const Fe = /* @__PURE__ */ M({
|
|
|
217
217
|
setRowData: H,
|
|
218
218
|
clear: O,
|
|
219
219
|
setTableData: U,
|
|
220
|
-
scrollTo:
|
|
221
|
-
scrollToRow:
|
|
220
|
+
scrollTo: h,
|
|
221
|
+
scrollToRow: h,
|
|
222
222
|
scrollToColumn: W,
|
|
223
223
|
table: i
|
|
224
224
|
}), (e, o) => (Q(), J(l(c), {
|
|
@@ -231,11 +231,11 @@ const Fe = /* @__PURE__ */ M({
|
|
|
231
231
|
height: "100%"
|
|
232
232
|
}
|
|
233
233
|
}, {
|
|
234
|
-
default:
|
|
235
|
-
name:
|
|
234
|
+
default: m(() => [v(l(c).FormItem, {
|
|
235
|
+
name: e.name,
|
|
236
236
|
"no-style": ""
|
|
237
237
|
}, {
|
|
238
|
-
default:
|
|
238
|
+
default: m(() => [v(me, X(l(ne)(a, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
|
|
239
239
|
ref_key: "tableRef",
|
|
240
240
|
ref: i,
|
|
241
241
|
class: [l(T)(), l(F)],
|
|
@@ -248,7 +248,7 @@ const Fe = /* @__PURE__ */ M({
|
|
|
248
248
|
_: 2
|
|
249
249
|
}, [Z(S, (t, n) => ({
|
|
250
250
|
name: n,
|
|
251
|
-
fn:
|
|
251
|
+
fn: m((u) => [ee(e.$slots, n, oe(ae(u || {})))])
|
|
252
252
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
253
253
|
_: 3
|
|
254
254
|
}, 8, ["name"])]),
|