ep-craft 0.1.32 → 0.1.33
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/components/checkbox/index.js +6 -5
- package/dist/components/table/index.d.ts +56 -3
- package/dist/components/table/index.js +20 -4
- package/dist/components/table/src/composables/use-scrollbar.d.ts +6 -0
- package/dist/components/table/src/composables/use-scrollbar.js +24 -0
- package/dist/components/table/src/config.d.ts +87 -0
- package/dist/components/table/src/config.js +210 -0
- package/dist/components/table/src/filter-panel.vue.d.ts +837 -0
- package/dist/components/table/src/filter-panel.vue.js +130 -0
- package/dist/components/table/src/filter-panel2.vue.js +155 -0
- package/dist/components/table/src/h-helper.d.ts +13 -0
- package/dist/components/table/src/h-helper.js +30 -0
- package/dist/components/table/src/layout-observer.d.ts +8 -0
- package/dist/components/table/src/layout-observer.js +49 -0
- package/dist/components/table/src/store/current.d.ts +15 -0
- package/dist/components/table/src/store/current.js +45 -0
- package/dist/components/table/src/store/expand.d.ts +14 -0
- package/dist/components/table/src/store/expand.js +55 -0
- package/dist/components/table/src/store/helper.d.ts +548 -0
- package/dist/components/table/src/store/helper.js +61 -0
- package/dist/components/table/src/store/index.d.ts +1107 -0
- package/dist/components/table/src/store/index.js +123 -0
- package/dist/components/table/src/store/tree.d.ts +27 -0
- package/dist/components/table/src/store/tree.js +153 -0
- package/dist/components/table/src/store/watcher.d.ts +88 -0
- package/dist/components/table/src/store/watcher.js +483 -0
- package/dist/components/table/src/table/defaults.d.ts +560 -0
- package/dist/components/table/src/table/defaults.js +236 -0
- package/dist/components/table/src/table/key-render-helper.d.ts +2 -0
- package/dist/components/table/src/table/key-render-helper.js +18 -0
- package/dist/components/table/src/table/style-helper.d.ts +51 -0
- package/dist/components/table/src/table/style-helper.js +169 -0
- package/dist/components/table/src/table/utils-helper.d.ts +16 -0
- package/dist/components/table/src/table/utils-helper.js +36 -0
- package/dist/components/table/src/table-body/defaults.d.ts +39 -0
- package/dist/components/table/src/table-body/defaults.js +25 -0
- package/dist/components/table/src/table-body/events-helper.d.ts +19 -0
- package/dist/components/table/src/table-body/events-helper.js +126 -0
- package/dist/components/table/src/table-body/index.d.ts +84 -0
- package/dist/components/table/src/table-body/index.js +77 -0
- package/dist/components/table/src/table-body/render-helper.d.ts +18 -0
- package/dist/components/table/src/table-body/render-helper.js +188 -0
- package/dist/components/table/src/table-body/styles-helper.d.ts +15 -0
- package/dist/components/table/src/table-body/styles-helper.js +98 -0
- package/dist/components/table/src/table-body/td-wrapper.vue.d.ts +33 -0
- package/dist/components/table/src/table-body/td-wrapper.vue.js +26 -0
- package/dist/components/table/src/table-body/td-wrapper2.vue.js +4 -0
- package/dist/components/table/src/table-column/defaults.d.ts +348 -0
- package/dist/components/table/src/table-column/defaults.js +152 -0
- package/dist/components/table/src/table-column/index.d.ts +2 -0
- package/dist/components/table/src/table-column/index.vue.d.ts +32 -0
- package/dist/components/table/src/table-column/index.vue.js +161 -0
- package/dist/components/table/src/table-column/index2.vue.js +4 -0
- package/dist/components/table/src/table-column/render-helper.d.ts +17 -0
- package/dist/components/table/src/table-column/render-helper.js +116 -0
- package/dist/components/table/src/table-column/watcher-helper.d.ts +8 -0
- package/dist/components/table/src/table-column/watcher-helper.js +85 -0
- package/dist/components/table/src/table-footer/index.d.ts +79 -0
- package/dist/components/table/src/table-footer/index.js +110 -0
- package/dist/components/table/src/table-footer/mapState-helper.d.ts +9 -0
- package/dist/components/table/src/table-footer/mapState-helper.js +16 -0
- package/dist/components/table/src/table-footer/style-helper.d.ts +9 -0
- package/dist/components/table/src/table-footer/style-helper.js +42 -0
- package/dist/components/table/src/table-header/event-helper.d.ts +14 -0
- package/dist/components/table/src/table-header/event-helper.js +113 -0
- package/dist/components/table/src/table-header/index.d.ts +361 -0
- package/dist/components/table/src/table-header/index.js +255 -0
- package/dist/components/table/src/table-header/style.helper.d.ts +10 -0
- package/dist/components/table/src/table-header/style.helper.js +73 -0
- package/dist/components/table/src/table-header/utils-helper.d.ts +10 -0
- package/dist/components/table/src/table-header/utils-helper.js +45 -0
- package/dist/components/table/src/table-layout.d.ts +37 -0
- package/dist/components/table/src/table-layout.js +144 -0
- package/dist/components/table/src/table.vue.d.ts +734 -0
- package/dist/components/table/src/table.vue.js +443 -0
- package/dist/components/table/src/table2.vue.js +4 -0
- package/dist/components/table/src/tableColumn.d.ts +2 -0
- package/dist/components/table/src/tokens.d.ts +3 -0
- package/dist/components/table/src/tokens.js +4 -0
- package/dist/components/table/src/util.d.ts +55 -0
- package/dist/components/table/src/util.js +310 -0
- package/dist/components/table-column/index.d.ts +40 -3
- package/dist/components/table-column/index.js +6 -3
- package/dist/directives/mousewheel/index.js +28 -0
- package/dist/ep-craft.js +186 -182
- package/dist/index.d.ts +24 -0
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +12 -1
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { withInstall as o } from "../../utils/with-install.js";
|
|
2
2
|
import c from "./EpCheckbox.vue.js";
|
|
3
|
-
import { checkboxEmits as
|
|
4
|
-
const
|
|
3
|
+
import { checkboxEmits as s, checkboxProps as x } from "./src/checkbox.js";
|
|
4
|
+
const r = o(
|
|
5
5
|
c,
|
|
6
6
|
"ep-checkbox"
|
|
7
7
|
);
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
r as EpCheckbox,
|
|
10
|
+
s as checkboxEmits,
|
|
11
|
+
x as checkboxProps,
|
|
12
|
+
r as default
|
|
12
13
|
};
|
|
@@ -1,4 +1,57 @@
|
|
|
1
|
-
import type { Plugin } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import type { ComponentInstance, Plugin } from 'vue';
|
|
2
|
+
import type { ComponentExposed } from 'vue-component-type-helpers';
|
|
3
|
+
import { EpTableColumn } from '../table-column';
|
|
4
|
+
import _EpTable from './src/table.vue';
|
|
5
|
+
/**
|
|
6
|
+
* table 自持 barrel:用**本地**安装辅助把搬运来的表格本体注册为 `ep-table`
|
|
7
|
+
* ——对外注册名与迁移前的包装态**逐字相同**(需求 6.2)。
|
|
8
|
+
*
|
|
9
|
+
* 形态对齐 `src/components/container/index.ts`(自持本体 + 挂载子组件访问入口)。
|
|
10
|
+
* 与迁移前的 `Object.assign({}, ElTable, { name: 'EpTable' })` 包装态的关键差异:
|
|
11
|
+
* 本体不再来自 `element-plus`,故本入口模块**零 element-plus 引用**(需求 1.3)。
|
|
12
|
+
*
|
|
13
|
+
* **必须用 `../../utils/with-install`(本地版),不得误用 `../../utils/vue/install`(上游版)**:
|
|
14
|
+
* 二者同名而签名不同——本地版 `withInstall(component, name: string)` 按**显式注册名**注册;
|
|
15
|
+
* 上游版 `withInstall(main, extra?)` 按 `comp.name` 注册,并把 `extra` 交给 `Object.values()`
|
|
16
|
+
* 展开。若误用上游版,第二参字符串会被**逐字符展开**,`ep-table` **静默注册失败**。
|
|
17
|
+
*
|
|
18
|
+
* **子组件访问入口**(需求 5.3):`Object.assign` 挂载 `TableColumn` 指向**本地**列组件。
|
|
19
|
+
* 与上游 element-plus 的**有意偏离**:上游 `ElTable.install` 会一并全局注册子组件;
|
|
20
|
+
* 此处只注册 `ep-table`,访问入口仅作静态引用挂载。需求 5.3 只要求访问入口可用,
|
|
21
|
+
* 未要求该注册语义,故不改动被约 90 个组件共用的 `src/utils/with-install.ts`
|
|
22
|
+
* (同 `container/index.ts` 的处置,见 `research.md` 的 Decision「不扩展共享的 withInstall」)。
|
|
23
|
+
*
|
|
24
|
+
* **不导出 `ElTable` 别名**(需求 5.6):本仓的 `El*` 别名只服务于「过渡期仍需用上游
|
|
25
|
+
* 组件」的场景;本体已自持后,别名只会与 `EpTable` 争抢同一个 `.install`。
|
|
26
|
+
*
|
|
27
|
+
* **不导出 `tableEmits`**(design.md 决策 6):上游**没有**该运行时常量,emits 侧只有
|
|
28
|
+
* `TableEmits<T>` 类型声明。需求 5.5 的「emits 常量」在此落为**类型交付**——凭空造一个
|
|
29
|
+
* 运行时常量会新增上游没有的契约面,与需求 1.6「不因本切片而增删」冲突。
|
|
30
|
+
*
|
|
31
|
+
* **不使用 `export *`**:公开面按契约显式列出,避免 `table/defaults.ts` 的内部声明
|
|
32
|
+
* 外泄到主入口(与 `checkbox` / `container` / `backtop` 一致)。
|
|
33
|
+
*/
|
|
34
|
+
export declare const EpTable: typeof _EpTable & Plugin & {
|
|
35
|
+
TableColumn: typeof EpTableColumn;
|
|
36
|
+
};
|
|
4
37
|
export default EpTable;
|
|
38
|
+
/** 上游运行时常量(需求 5.5):使用方可直接引用该 props 契约。 */
|
|
39
|
+
export { tableProps } from './src/table/defaults';
|
|
40
|
+
/**
|
|
41
|
+
* 表格的公开实例类型。
|
|
42
|
+
*
|
|
43
|
+
* 对应上游 `es/components/table/src/table.vue.d.ts` 的 `TableInstance`
|
|
44
|
+
* (上游写作 `ComponentInstance<typeof _default> & ComponentExposed<typeof _default>`)。
|
|
45
|
+
* 本地本体是 SFC,与上游同源,故两项照抄即可,无需像 `autocomplete` 那样手写转录
|
|
46
|
+
* expose 载荷(详见 `src/components/autocomplete/instance.ts` 的长注释)。
|
|
47
|
+
*/
|
|
48
|
+
export type TableInstance = ComponentInstance<typeof _EpTable> & ComponentExposed<typeof _EpTable>;
|
|
49
|
+
/**
|
|
50
|
+
* 上游 `components/table/index.ts` barrel 的类型清单(需求 5.4 / 5.5)。
|
|
51
|
+
*
|
|
52
|
+
* 与 `table/defaults.ts` 的 `export type { ... }` 面一一对应,无新增、无删减;
|
|
53
|
+
* `DefaultRow` / `TreeProps` / `TableSortOrder` / `RenderExpanded` 四项是上游
|
|
54
|
+
* `defaults.ts` 导出但上游 barrel 未转出的,此处一并转出以免本地公开面比
|
|
55
|
+
* 使用方经由 `element-plus` 根入口拿到的更窄。
|
|
56
|
+
*/
|
|
57
|
+
export type { CellCls, CellStyle, ColumnCls, ColumnStyle, DefaultRow, Filter, RenderExpanded, RenderRowData, Sort, SummaryMethod, Table, TableColumnCtx, TableConfigContext, TableEmits, TableProps, TableRefs, TableSortOrder, TableTooltipData, TreeNode, TreeProps, } from './src/table/defaults';
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { withInstall as o } from "../../utils/with-install.js";
|
|
2
|
+
import { EpTableColumn as m } from "../table-column/index.js";
|
|
3
|
+
import t from "./src/table.vue.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
import "@vue/shared";
|
|
6
|
+
import "lodash-unified";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import "@element-plus/icons-vue";
|
|
9
|
+
import "../../hooks/use-size/index.js";
|
|
10
|
+
import "@popperjs/core";
|
|
11
|
+
import "../../hooks/use-z-index/index.js";
|
|
12
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
13
|
+
import "../../hooks/use-aria/index.js";
|
|
14
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
15
|
+
import "../../hooks/use-empty-values/index.js";
|
|
16
|
+
const _ = Object.assign(
|
|
17
|
+
o(t, "ep-table"),
|
|
18
|
+
{ TableColumn: m }
|
|
19
|
+
);
|
|
4
20
|
export {
|
|
5
|
-
|
|
21
|
+
_ as EpTable
|
|
6
22
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ref as e } from "vue";
|
|
2
|
+
import { isNumber as i } from "../../../../utils/types.js";
|
|
3
|
+
import "lodash-unified";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import "@vue/shared";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
const b = () => {
|
|
8
|
+
const t = e(), s = (o, l) => {
|
|
9
|
+
const r = t.value;
|
|
10
|
+
r && r.scrollTo(o, l);
|
|
11
|
+
}, c = (o, l) => {
|
|
12
|
+
const r = t.value;
|
|
13
|
+
r && i(l) && ["Top", "Left"].includes(o) && r[`setScroll${o}`](l);
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
scrollBarRef: t,
|
|
17
|
+
scrollTo: s,
|
|
18
|
+
setScrollTop: (o) => c("Top", o),
|
|
19
|
+
setScrollLeft: (o) => c("Left", o)
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
b as useScrollbar
|
|
24
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
import type { TableColumnCtx } from './table-column/defaults';
|
|
3
|
+
import type { Store } from './store';
|
|
4
|
+
import type { DefaultRow, TreeNode } from './table/defaults';
|
|
5
|
+
export declare const cellStarts: {
|
|
6
|
+
default: {
|
|
7
|
+
order: string;
|
|
8
|
+
};
|
|
9
|
+
selection: {
|
|
10
|
+
width: number;
|
|
11
|
+
minWidth: number;
|
|
12
|
+
realWidth: number;
|
|
13
|
+
order: string;
|
|
14
|
+
};
|
|
15
|
+
expand: {
|
|
16
|
+
width: number;
|
|
17
|
+
minWidth: number;
|
|
18
|
+
realWidth: number;
|
|
19
|
+
order: string;
|
|
20
|
+
};
|
|
21
|
+
index: {
|
|
22
|
+
width: number;
|
|
23
|
+
minWidth: number;
|
|
24
|
+
realWidth: number;
|
|
25
|
+
order: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const getDefaultClassName: (type: string) => "table-column--selection" | "table__expand-column";
|
|
29
|
+
export declare const cellForced: {
|
|
30
|
+
selection: {
|
|
31
|
+
renderHeader<T extends DefaultRow>({ store }: {
|
|
32
|
+
store: Store<T>;
|
|
33
|
+
}): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}>;
|
|
36
|
+
renderCell<T extends DefaultRow>({ row, column, store, $index, }: {
|
|
37
|
+
row: T;
|
|
38
|
+
column: TableColumnCtx<T>;
|
|
39
|
+
store: Store<T>;
|
|
40
|
+
$index: number;
|
|
41
|
+
}): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}>;
|
|
44
|
+
sortable: boolean;
|
|
45
|
+
resizable: boolean;
|
|
46
|
+
};
|
|
47
|
+
index: {
|
|
48
|
+
renderHeader<T extends DefaultRow>({ column, }: {
|
|
49
|
+
column: TableColumnCtx<T>;
|
|
50
|
+
}): string;
|
|
51
|
+
renderCell<T extends DefaultRow>({ column, $index, }: {
|
|
52
|
+
column: TableColumnCtx<T>;
|
|
53
|
+
$index: number;
|
|
54
|
+
}): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}>;
|
|
57
|
+
sortable: boolean;
|
|
58
|
+
};
|
|
59
|
+
expand: {
|
|
60
|
+
renderHeader<T extends DefaultRow>({ column, }: {
|
|
61
|
+
column: TableColumnCtx<T>;
|
|
62
|
+
}): string;
|
|
63
|
+
renderCell<T extends DefaultRow>({ column, row, store, expanded, $index, }: {
|
|
64
|
+
column: TableColumnCtx<T>;
|
|
65
|
+
row: T;
|
|
66
|
+
store: Store<T>;
|
|
67
|
+
expanded: boolean;
|
|
68
|
+
$index: number;
|
|
69
|
+
}): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}>;
|
|
72
|
+
sortable: boolean;
|
|
73
|
+
resizable: boolean;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export declare function defaultRenderCell<T extends DefaultRow>({ row, column, $index, }: {
|
|
77
|
+
row: T;
|
|
78
|
+
column: TableColumnCtx<T>;
|
|
79
|
+
$index: number;
|
|
80
|
+
}): any;
|
|
81
|
+
export declare function treeCellPrefix<T extends DefaultRow>({ row, treeNode, store, }: {
|
|
82
|
+
row: T;
|
|
83
|
+
treeNode: TreeNode;
|
|
84
|
+
store: Store<T>;
|
|
85
|
+
}, createPlaceholder?: boolean): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
}>[] | null;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { h as i } from "vue";
|
|
2
|
+
import { EpCheckbox as u } from "../../checkbox/index.js";
|
|
3
|
+
import { ElIcon as b } from "../../icon/index.js";
|
|
4
|
+
import { ArrowRight as f, Loading as x } from "@element-plus/icons-vue";
|
|
5
|
+
import { isBoolean as g, isNumber as h } from "../../../utils/types.js";
|
|
6
|
+
import "lodash-unified";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import { isFunction as C } from "@vue/shared";
|
|
9
|
+
import { getProp as L } from "../../../utils/objects.js";
|
|
10
|
+
const R = {
|
|
11
|
+
selection: "table-column--selection",
|
|
12
|
+
expand: "table__expand-column"
|
|
13
|
+
}, P = {
|
|
14
|
+
default: {
|
|
15
|
+
order: ""
|
|
16
|
+
},
|
|
17
|
+
selection: {
|
|
18
|
+
width: 48,
|
|
19
|
+
minWidth: 48,
|
|
20
|
+
realWidth: 48,
|
|
21
|
+
order: ""
|
|
22
|
+
},
|
|
23
|
+
expand: {
|
|
24
|
+
width: 48,
|
|
25
|
+
minWidth: 48,
|
|
26
|
+
realWidth: 48,
|
|
27
|
+
order: ""
|
|
28
|
+
},
|
|
29
|
+
index: {
|
|
30
|
+
width: 48,
|
|
31
|
+
minWidth: 48,
|
|
32
|
+
realWidth: 48,
|
|
33
|
+
order: ""
|
|
34
|
+
}
|
|
35
|
+
}, H = (e) => R[e] || "", V = {
|
|
36
|
+
selection: {
|
|
37
|
+
renderHeader({ store: e }) {
|
|
38
|
+
function a() {
|
|
39
|
+
return e.states.data.value && e.states.data.value.length === 0;
|
|
40
|
+
}
|
|
41
|
+
return i(u, {
|
|
42
|
+
disabled: a(),
|
|
43
|
+
size: e.states.tableSize.value,
|
|
44
|
+
indeterminate: e.states.selection.value.length > 0 && !e.states.isAllSelected.value,
|
|
45
|
+
"onUpdate:modelValue": e.toggleAllSelection ?? void 0,
|
|
46
|
+
modelValue: e.states.isAllSelected.value,
|
|
47
|
+
ariaLabel: e.t("el.table.selectAllLabel")
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
renderCell({
|
|
51
|
+
row: e,
|
|
52
|
+
column: a,
|
|
53
|
+
store: l,
|
|
54
|
+
$index: n
|
|
55
|
+
}) {
|
|
56
|
+
return i(u, {
|
|
57
|
+
disabled: a.selectable ? !a.selectable.call(null, e, n) : !1,
|
|
58
|
+
size: l.states.tableSize.value,
|
|
59
|
+
onChange: () => {
|
|
60
|
+
l.commit("rowSelectedChanged", e);
|
|
61
|
+
},
|
|
62
|
+
onClick: (t) => t.stopPropagation(),
|
|
63
|
+
modelValue: l.isSelected(e),
|
|
64
|
+
indeterminate: l.getRowIndeterminate(e),
|
|
65
|
+
ariaLabel: l.t("el.table.selectRowLabel")
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
sortable: !1,
|
|
69
|
+
resizable: !1
|
|
70
|
+
},
|
|
71
|
+
index: {
|
|
72
|
+
renderHeader({
|
|
73
|
+
column: e
|
|
74
|
+
}) {
|
|
75
|
+
return e.label || "#";
|
|
76
|
+
},
|
|
77
|
+
renderCell({
|
|
78
|
+
column: e,
|
|
79
|
+
$index: a
|
|
80
|
+
}) {
|
|
81
|
+
let l = a + 1;
|
|
82
|
+
const n = e.index;
|
|
83
|
+
return h(n) ? l = a + n : C(n) && (l = n(a)), i("div", {}, [l]);
|
|
84
|
+
},
|
|
85
|
+
sortable: !1
|
|
86
|
+
},
|
|
87
|
+
expand: {
|
|
88
|
+
renderHeader({
|
|
89
|
+
column: e
|
|
90
|
+
}) {
|
|
91
|
+
return e.label || "";
|
|
92
|
+
},
|
|
93
|
+
renderCell({
|
|
94
|
+
column: e,
|
|
95
|
+
row: a,
|
|
96
|
+
store: l,
|
|
97
|
+
expanded: n,
|
|
98
|
+
$index: t
|
|
99
|
+
}) {
|
|
100
|
+
var p, c;
|
|
101
|
+
const { ns: r } = l, d = [r.e("expand-icon")];
|
|
102
|
+
!e.renderExpand && n && d.push(r.em("expand-icon", "expanded"));
|
|
103
|
+
const o = function(m) {
|
|
104
|
+
m.stopPropagation(), l.toggleRowExpansion(a);
|
|
105
|
+
}, s = ((c = (p = l.states.rowExpandable).value) == null ? void 0 : c.call(p, a, t)) ?? !0;
|
|
106
|
+
return s || d.push(r.is("disabled")), i(
|
|
107
|
+
"button",
|
|
108
|
+
{
|
|
109
|
+
type: "button",
|
|
110
|
+
disabled: !s,
|
|
111
|
+
"aria-label": l.t(
|
|
112
|
+
n ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"
|
|
113
|
+
),
|
|
114
|
+
"aria-expanded": n,
|
|
115
|
+
class: d,
|
|
116
|
+
onClick: o
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
default: () => e.renderExpand ? [
|
|
120
|
+
e.renderExpand({
|
|
121
|
+
expanded: n,
|
|
122
|
+
expandable: s
|
|
123
|
+
})
|
|
124
|
+
] : [
|
|
125
|
+
i(b, null, {
|
|
126
|
+
default: () => [i(f)]
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
},
|
|
132
|
+
sortable: !1,
|
|
133
|
+
resizable: !1
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
function D({
|
|
137
|
+
row: e,
|
|
138
|
+
column: a,
|
|
139
|
+
$index: l
|
|
140
|
+
}) {
|
|
141
|
+
var r;
|
|
142
|
+
const n = a.property, t = n && L(e, n).value;
|
|
143
|
+
return a && a.formatter ? a.formatter(e, a, t, l) : ((r = t == null ? void 0 : t.toString) == null ? void 0 : r.call(t)) || "";
|
|
144
|
+
}
|
|
145
|
+
function F({
|
|
146
|
+
row: e,
|
|
147
|
+
treeNode: a,
|
|
148
|
+
store: l
|
|
149
|
+
}, n = !1) {
|
|
150
|
+
const { ns: t } = l;
|
|
151
|
+
if (!a)
|
|
152
|
+
return n ? [
|
|
153
|
+
i("span", {
|
|
154
|
+
class: t.e("placeholder")
|
|
155
|
+
})
|
|
156
|
+
] : null;
|
|
157
|
+
const r = [], d = function(o) {
|
|
158
|
+
o.stopPropagation(), !a.loading && l.loadOrToggle(e);
|
|
159
|
+
};
|
|
160
|
+
if (a.indent && r.push(
|
|
161
|
+
i("span", {
|
|
162
|
+
class: t.e("indent"),
|
|
163
|
+
style: { "padding-left": `${a.indent}px` }
|
|
164
|
+
})
|
|
165
|
+
), g(a.expanded) && !a.noLazyChildren) {
|
|
166
|
+
const o = [
|
|
167
|
+
t.e("expand-icon"),
|
|
168
|
+
a.expanded ? t.em("expand-icon", "expanded") : ""
|
|
169
|
+
];
|
|
170
|
+
let s = f;
|
|
171
|
+
a.loading && (s = x), r.push(
|
|
172
|
+
i(
|
|
173
|
+
"button",
|
|
174
|
+
{
|
|
175
|
+
type: "button",
|
|
176
|
+
"aria-label": l.t(
|
|
177
|
+
a.expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"
|
|
178
|
+
),
|
|
179
|
+
"aria-expanded": a.expanded,
|
|
180
|
+
class: o,
|
|
181
|
+
onClick: d
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
default: () => [
|
|
185
|
+
i(
|
|
186
|
+
b,
|
|
187
|
+
{ class: t.is("loading", a.loading) },
|
|
188
|
+
{
|
|
189
|
+
default: () => [i(s)]
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
);
|
|
196
|
+
} else
|
|
197
|
+
r.push(
|
|
198
|
+
i("span", {
|
|
199
|
+
class: t.e("placeholder")
|
|
200
|
+
})
|
|
201
|
+
);
|
|
202
|
+
return r;
|
|
203
|
+
}
|
|
204
|
+
export {
|
|
205
|
+
V as cellForced,
|
|
206
|
+
P as cellStarts,
|
|
207
|
+
D as defaultRenderCell,
|
|
208
|
+
H as getDefaultClassName,
|
|
209
|
+
F as treeCellPrefix
|
|
210
|
+
};
|