@fbkworks/components 0.0.0-stage → 0.3.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.
Files changed (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -2
  3. package/dist/crud-page/CrudPage.d.ts +27 -0
  4. package/dist/crud-page/CrudPage.vue.mjs +126 -0
  5. package/dist/crud-page/CrudPage.vue.mjs.map +1 -0
  6. package/dist/crud-page/CrudPage2.vue.mjs +5 -0
  7. package/dist/crud-page/CrudPage2.vue.mjs.map +1 -0
  8. package/dist/crud-page/index.d.ts +2 -0
  9. package/dist/crud-page/index.mjs +5 -0
  10. package/dist/crud-page/index.mjs.map +1 -0
  11. package/dist/crud-page/style.css +15 -0
  12. package/dist/crud-page/types.d.ts +73 -0
  13. package/dist/descriptions/Descriptions.d.ts +17 -0
  14. package/dist/descriptions/Descriptions.vue.mjs +175 -0
  15. package/dist/descriptions/Descriptions.vue.mjs.map +1 -0
  16. package/dist/descriptions/Descriptions2.vue.mjs +5 -0
  17. package/dist/descriptions/Descriptions2.vue.mjs.map +1 -0
  18. package/dist/descriptions/index.d.ts +2 -0
  19. package/dist/descriptions/index.mjs +5 -0
  20. package/dist/descriptions/index.mjs.map +1 -0
  21. package/dist/descriptions/style.css +273 -0
  22. package/dist/descriptions/types.d.ts +75 -0
  23. package/dist/detail-drawer/DetailDrawer.d.ts +20 -0
  24. package/dist/detail-drawer/DetailDrawer.vue.mjs +146 -0
  25. package/dist/detail-drawer/DetailDrawer.vue.mjs.map +1 -0
  26. package/dist/detail-drawer/DetailDrawer2.vue.mjs +5 -0
  27. package/dist/detail-drawer/DetailDrawer2.vue.mjs.map +1 -0
  28. package/dist/detail-drawer/index.d.ts +4 -0
  29. package/dist/detail-drawer/index.mjs +8 -0
  30. package/dist/detail-drawer/index.mjs.map +1 -0
  31. package/dist/detail-drawer/types.d.ts +73 -0
  32. package/dist/detail-drawer/use-mobile.d.ts +14 -0
  33. package/dist/detail-drawer/use-mobile.mjs +19 -0
  34. package/dist/detail-drawer/use-mobile.mjs.map +1 -0
  35. package/dist/detail-page/DetailPage.d.ts +23 -0
  36. package/dist/detail-page/DetailPage.vue.mjs +175 -0
  37. package/dist/detail-page/DetailPage.vue.mjs.map +1 -0
  38. package/dist/detail-page/DetailPage2.vue.mjs +5 -0
  39. package/dist/detail-page/DetailPage2.vue.mjs.map +1 -0
  40. package/dist/detail-page/index.d.ts +4 -0
  41. package/dist/detail-page/index.mjs +8 -0
  42. package/dist/detail-page/index.mjs.map +1 -0
  43. package/dist/detail-page/style.css +90 -0
  44. package/dist/detail-page/types.d.ts +81 -0
  45. package/dist/detail-page/use-detail.d.ts +40 -0
  46. package/dist/detail-page/use-detail.mjs +57 -0
  47. package/dist/detail-page/use-detail.mjs.map +1 -0
  48. package/dist/form-generator/FormGenerator.d.ts +25 -0
  49. package/dist/form-generator/FormGenerator.vue.mjs +268 -0
  50. package/dist/form-generator/FormGenerator.vue.mjs.map +1 -0
  51. package/dist/form-generator/FormGenerator2.vue.mjs +5 -0
  52. package/dist/form-generator/FormGenerator2.vue.mjs.map +1 -0
  53. package/dist/form-generator/index.d.ts +2 -0
  54. package/dist/form-generator/index.mjs +5 -0
  55. package/dist/form-generator/index.mjs.map +1 -0
  56. package/dist/form-generator/style.css +91 -0
  57. package/dist/form-generator/types.d.ts +48 -0
  58. package/dist/form-modal/FormModal.d.ts +30 -0
  59. package/dist/form-modal/FormModal.vue.mjs +214 -0
  60. package/dist/form-modal/FormModal.vue.mjs.map +1 -0
  61. package/dist/form-modal/FormModal2.vue.mjs +5 -0
  62. package/dist/form-modal/FormModal2.vue.mjs.map +1 -0
  63. package/dist/form-modal/index.d.ts +2 -0
  64. package/dist/form-modal/index.mjs +5 -0
  65. package/dist/form-modal/index.mjs.map +1 -0
  66. package/dist/form-modal/style.css +20 -0
  67. package/dist/form-modal/types.d.ts +60 -0
  68. package/dist/index.d.ts +23 -0
  69. package/dist/index.mjs +33 -0
  70. package/dist/index.mjs.map +1 -0
  71. package/dist/page-container/PageContainer.d.ts +42 -0
  72. package/dist/page-container/PageContainer.vue.mjs +133 -0
  73. package/dist/page-container/PageContainer.vue.mjs.map +1 -0
  74. package/dist/page-container/PageContainer2.vue.mjs +5 -0
  75. package/dist/page-container/PageContainer2.vue.mjs.map +1 -0
  76. package/dist/page-container/index.d.ts +2 -0
  77. package/dist/page-container/index.mjs +5 -0
  78. package/dist/page-container/index.mjs.map +1 -0
  79. package/dist/page-container/style.css +156 -0
  80. package/dist/page-container/types.d.ts +20 -0
  81. package/dist/pro-table/ProTable.d.ts +49 -0
  82. package/dist/pro-table/ProTable.vue.mjs +283 -0
  83. package/dist/pro-table/ProTable.vue.mjs.map +1 -0
  84. package/dist/pro-table/ProTable2.vue.mjs +5 -0
  85. package/dist/pro-table/ProTable2.vue.mjs.map +1 -0
  86. package/dist/pro-table/index.d.ts +3 -0
  87. package/dist/pro-table/index.mjs +7 -0
  88. package/dist/pro-table/index.mjs.map +1 -0
  89. package/dist/pro-table/style.css +345 -0
  90. package/dist/pro-table/types.d.ts +123 -0
  91. package/dist/pro-table/use-table-request.d.ts +26 -0
  92. package/dist/pro-table/use-table-request.mjs +108 -0
  93. package/dist/pro-table/use-table-request.mjs.map +1 -0
  94. package/dist/pro-table/value-renderer.d.ts +16 -0
  95. package/dist/pro-table/value-renderer.mjs +150 -0
  96. package/dist/pro-table/value-renderer.mjs.map +1 -0
  97. package/dist/query-form/QueryForm.d.ts +64 -0
  98. package/dist/query-form/QueryForm.vue.mjs +220 -0
  99. package/dist/query-form/QueryForm.vue.mjs.map +1 -0
  100. package/dist/query-form/QueryForm2.vue.mjs +5 -0
  101. package/dist/query-form/QueryForm2.vue.mjs.map +1 -0
  102. package/dist/query-form/index.d.ts +2 -0
  103. package/dist/query-form/index.mjs +5 -0
  104. package/dist/query-form/index.mjs.map +1 -0
  105. package/dist/query-form/style.css +114 -0
  106. package/dist/query-form/types.d.ts +56 -0
  107. package/dist/query-form/use-query-model.d.ts +14 -0
  108. package/dist/query-form/use-query-model.mjs +53 -0
  109. package/dist/query-form/use-query-model.mjs.map +1 -0
  110. package/dist/result/Result.d.ts +25 -0
  111. package/dist/result/Result.vue.mjs +117 -0
  112. package/dist/result/Result.vue.mjs.map +1 -0
  113. package/dist/result/Result2.vue.mjs +5 -0
  114. package/dist/result/Result2.vue.mjs.map +1 -0
  115. package/dist/result/index.d.ts +3 -0
  116. package/dist/result/index.mjs +7 -0
  117. package/dist/result/index.mjs.map +1 -0
  118. package/dist/result/style.css +106 -0
  119. package/dist/result/types.d.ts +33 -0
  120. package/dist/result/types.mjs +13 -0
  121. package/dist/result/types.mjs.map +1 -0
  122. package/dist/style.css +1918 -0
  123. package/dist/styles/index.css +18 -0
  124. package/package.json +108 -3
@@ -0,0 +1,156 @@
1
+ /**
2
+ * PageContainer 的头部 / 主体 / 底部三段式布局。
3
+ *
4
+ * 窄屏折叠用容器查询而不是 JS 判断窗口宽度:组件嵌在抽屉、分栏、
5
+ * 微前端容器里时,窗口宽度和它实际占的宽度是两回事。
6
+ */
7
+ .fbk-page-container {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: var(--fbk-page-container-gap);
11
+ box-sizing: border-box;
12
+ width: 100%;
13
+ max-width: var(--fbk-page-container-max-width);
14
+ padding: var(--fbk-page-container-padding);
15
+ margin: 0 auto;
16
+ /* 同 ProTable / QueryForm:不继承 provider 注入的字号 */
17
+ font-size: var(--fbk-font-size-md);
18
+ line-height: var(--fbk-font-line-height);
19
+ color: var(--fbk-color-text);
20
+ /* 容器查询的宿主。缺了这一行,下面的 @container 永远不匹配 ——
21
+ 而且不报错,只是静默失效。 */
22
+ container-type: inline-size;
23
+ }
24
+
25
+ .fbk-page-container__header {
26
+ display: flex;
27
+ flex-wrap: wrap;
28
+ gap: var(--fbk-page-container-header-gap);
29
+ align-items: flex-start;
30
+ justify-content: space-between;
31
+ padding-bottom: var(--fbk-page-container-header-padding-bottom);
32
+ border-bottom: 1px solid var(--fbk-page-container-header-border-color);
33
+ }
34
+
35
+ .fbk-page-container--fixed .fbk-page-container__header {
36
+ position: sticky;
37
+ top: 0;
38
+ z-index: var(--fbk-z-index-sticky, 10);
39
+ background: var(--fbk-color-bg);
40
+ }
41
+
42
+ .fbk-page-container__heading {
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: var(--fbk-page-container-heading-gap);
46
+ min-width: 0;
47
+ }
48
+
49
+ /* 返回按钮是文字按钮,但它承载的是「离开这一页」的动作,
50
+ 不该和面包屑、标题挤在同一个视觉层级里 —— 单独给一点下方留白。
51
+
52
+ 内边距在这里归零:element-plus 的 text 按钮 padding 是 0,
53
+ naive 的是 12px,两个适配器下按钮宽度差 24px。
54
+ 组件层统一成「纯文字 + 焦点环」,不依赖 UI 库的按钮内边距。 */
55
+ .fbk-page-container__back {
56
+ align-self: flex-start;
57
+ margin-bottom: var(--fbk-spacing-xs);
58
+ padding: 0;
59
+ font-size: var(--fbk-page-container-breadcrumb-size);
60
+ line-height: var(--fbk-font-line-height-tight);
61
+ color: var(--fbk-color-text-secondary);
62
+ cursor: pointer;
63
+ background: none;
64
+ border: 0;
65
+ transition: var(--fbk-transition-color);
66
+ }
67
+
68
+ .fbk-page-container__back:hover {
69
+ color: var(--fbk-color-text);
70
+ }
71
+
72
+ .fbk-page-container__back:focus-visible {
73
+ outline: 2px solid var(--fbk-color-focus-ring);
74
+ outline-offset: 2px;
75
+ border-radius: var(--fbk-radius-sm);
76
+ }
77
+
78
+ .fbk-page-container__breadcrumbs {
79
+ display: flex;
80
+ flex-wrap: wrap;
81
+ gap: var(--fbk-spacing-xs);
82
+ align-items: center;
83
+ font-size: var(--fbk-page-container-breadcrumb-size);
84
+ color: var(--fbk-page-container-breadcrumb-fg);
85
+ }
86
+
87
+ /* 链接文字用 primary-text 而不是 primary:后者是填充色,白底上 4.499:1
88
+ 正好压 AA 线,而 primary-text 有 6.61:1,给正文留出余量。 */
89
+ .fbk-page-container__breadcrumb-link {
90
+ color: var(--fbk-page-container-breadcrumb-link-fg);
91
+ text-decoration: none;
92
+ }
93
+
94
+ .fbk-page-container__breadcrumb-link:hover {
95
+ text-decoration: underline;
96
+ }
97
+
98
+ /* 下划线是 hover 的反馈,键盘用户拿不到,用焦点环补齐 */
99
+ .fbk-page-container__breadcrumb-link:focus-visible {
100
+ outline: 2px solid var(--fbk-color-focus-ring);
101
+ outline-offset: 2px;
102
+ border-radius: var(--fbk-radius-sm);
103
+ text-decoration: underline;
104
+ }
105
+
106
+ .fbk-page-container__title-row {
107
+ display: flex;
108
+ flex-wrap: wrap;
109
+ gap: var(--fbk-page-container-title-row-gap);
110
+ align-items: baseline;
111
+ }
112
+
113
+ /* 标题行高要压紧。用浏览器默认的 normal 时 h1 会继承 body 的行高,
114
+ 20px 字号撑出 27px 行盒,标题和副标题之间会多出一截空。 */
115
+ .fbk-page-container__title {
116
+ margin: 0;
117
+ font-size: var(--fbk-page-container-title-size);
118
+ font-weight: var(--fbk-page-container-title-weight);
119
+ line-height: var(--fbk-page-container-title-line-height);
120
+ color: var(--fbk-page-container-title-fg);
121
+ }
122
+
123
+ .fbk-page-container__subtitle {
124
+ margin: 0;
125
+ line-height: var(--fbk-page-container-title-line-height);
126
+ color: var(--fbk-page-container-subtitle-fg);
127
+ font-size: var(--fbk-page-container-subtitle-size);
128
+ }
129
+
130
+ .fbk-page-container__extra {
131
+ display: flex;
132
+ flex-wrap: wrap;
133
+ gap: var(--fbk-spacing-sm);
134
+ align-items: center;
135
+ }
136
+
137
+ .fbk-page-container__body {
138
+ min-width: 0;
139
+ }
140
+
141
+ .fbk-page-container__footer {
142
+ padding-top: var(--fbk-page-container-footer-padding-top);
143
+ border-top: 1px solid var(--fbk-page-container-footer-border-color);
144
+ }
145
+
146
+ /* 窄屏下 extra 折叠到标题下方 */
147
+ @container (max-width: 639px) {
148
+ .fbk-page-container__header {
149
+ flex-direction: column;
150
+ align-items: stretch;
151
+ }
152
+
153
+ .fbk-page-container__extra {
154
+ justify-content: flex-start;
155
+ }
156
+ }
@@ -0,0 +1,20 @@
1
+ export interface BreadcrumbItem {
2
+ text: string;
3
+ /** 只接收字符串,避免组件库依赖 vue-router */
4
+ to?: string;
5
+ }
6
+ export interface PageContainerProps {
7
+ title?: string;
8
+ subtitle?: string;
9
+ back?: boolean | (() => void);
10
+ breadcrumbs?: BreadcrumbItem[];
11
+ loading?: boolean;
12
+ fixedHeader?: boolean;
13
+ showHeader?: boolean;
14
+ showFooter?: boolean;
15
+ maxWidth?: string | number;
16
+ uiProps?: {
17
+ header?: Record<string, any>;
18
+ backButton?: Record<string, any>;
19
+ };
20
+ }
@@ -0,0 +1,49 @@
1
+ import { SortState } from '@fbkworks/adapter-core';
2
+ import { Key } from '@fbkworks/shared';
3
+ import { ProTableExpose, ProTableProps } from './types.js';
4
+ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly onError?: ((error: unknown, params: any) => any) | undefined;
7
+ readonly onLoad?: ((result: {
8
+ list: T[];
9
+ total?: number;
10
+ hasMore?: boolean;
11
+ }, params: any) => any) | undefined;
12
+ readonly "onUpdate:selectedKeys"?: ((keys: Key[]) => any) | undefined;
13
+ readonly "onUpdate:page"?: ((page: number) => any) | undefined;
14
+ readonly "onUpdate:pageSize"?: ((size: number) => any) | undefined;
15
+ readonly "onUpdate:sort"?: ((sort: SortState | null) => any) | undefined;
16
+ readonly "onRow-click"?: ((row: T, index: number, event: Event) => any) | undefined;
17
+ readonly onRefresh?: (() => any) | undefined;
18
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onError" | "onLoad" | "onUpdate:selectedKeys" | "onUpdate:page" | "onUpdate:pageSize" | "onUpdate:sort" | "onRow-click" | "onRefresh"> & ProTableProps<T> & Partial<{}>> & import('vue').PublicProps;
19
+ expose(exposed: import('vue').ShallowUnwrapRef<ProTableExpose<T>>): void;
20
+ attrs: any;
21
+ slots: Partial<Record<`cell-${string}`, (_: any) => any>> & {
22
+ toolbar?(_: {
23
+ selectedKeys: Key[];
24
+ reload: (options?: {
25
+ resetPage?: boolean;
26
+ }) => Promise<void>;
27
+ }): any;
28
+ 'bulk-actions'?(_: {
29
+ selectedKeys: Key[];
30
+ clear: () => void;
31
+ }): any;
32
+ error?(_: {
33
+ error: {};
34
+ retry: () => Promise<void>;
35
+ }): any;
36
+ 'card-footer'?(_: any): any;
37
+ };
38
+ emit: ((evt: "error", error: unknown, params: any) => void) & ((evt: "load", result: {
39
+ list: T[];
40
+ total?: number;
41
+ hasMore?: boolean;
42
+ }, params: any) => void) & ((evt: "update:selectedKeys", keys: Key[]) => void) & ((evt: "update:page", page: number) => void) & ((evt: "update:pageSize", size: number) => void) & ((evt: "update:sort", sort: SortState | null) => void) & ((evt: "row-click", row: T, index: number, event: Event) => void) & ((evt: "refresh") => void);
43
+ }>) => import('vue').VNode & {
44
+ __ctx?: Awaited<typeof __VLS_setup>;
45
+ };
46
+ export default _default;
47
+ type __VLS_PrettifyLocal<T> = {
48
+ [K in keyof T]: T[K];
49
+ } & {};
@@ -0,0 +1,283 @@
1
+ import { defineComponent, useAttrs, useSlots, ref, watch, computed, watchEffect, openBlock, createElementBlock, mergeProps, unref, renderSlot, createCommentVNode, normalizeClass, createElementVNode, toDisplayString, createVNode, withCtx, createBlock, resolveDynamicComponent, createSlots, renderList, normalizeProps, guardReactiveProps } from "vue";
2
+ import { useAdapter, useFbkTheme } from "@fbkworks/adapter-core";
3
+ import { getRowKey } from "@fbkworks/shared";
4
+ import _sfc_main$1 from "../result/Result.vue.mjs";
5
+ import { useTableRequest } from "./use-table-request.mjs";
6
+ import { resolveColumnRenderer } from "./value-renderer.mjs";
7
+ const _hoisted_1 = { class: "fbk-pro-table__select-all" };
8
+ const _hoisted_2 = ["checked"];
9
+ const _hoisted_3 = {
10
+ key: 0,
11
+ class: "fbk-pro-table__selected-count"
12
+ };
13
+ const _hoisted_4 = {
14
+ key: 2,
15
+ class: "fbk-pro-table__error"
16
+ };
17
+ const _sfc_main = /* @__PURE__ */ defineComponent({
18
+ ...{ name: "FbkProTable", inheritAttrs: false },
19
+ __name: "ProTable",
20
+ props: {
21
+ columns: {},
22
+ rowKey: { type: [String, Function], default: "id" },
23
+ data: { default: void 0 },
24
+ request: { type: Function, default: void 0 },
25
+ params: { default: () => ({}) },
26
+ loading: { type: Boolean, default: void 0 },
27
+ emptyText: { default: "暂无数据" },
28
+ presentation: { default: "auto" },
29
+ page: { default: void 0 },
30
+ pageSize: { default: void 0 },
31
+ total: { default: void 0 },
32
+ pagination: { type: [Boolean, Object], default: void 0 },
33
+ selection: { type: [Boolean, Object], default: false },
34
+ selectedKeys: { default: void 0 },
35
+ sort: { default: void 0 },
36
+ toolbar: { type: Boolean, default: true },
37
+ uiProps: {}
38
+ },
39
+ emits: ["update:selectedKeys", "update:page", "update:pageSize", "update:sort", "row-click", "load", "error", "refresh"],
40
+ setup(__props, { expose: __expose, emit: __emit }) {
41
+ const props = __props;
42
+ const attrs = useAttrs();
43
+ const emit = __emit;
44
+ const adapter = useAdapter();
45
+ const { locale } = useFbkTheme();
46
+ const slots = useSlots();
47
+ const { DataGrid, Pagination } = adapter.primitives;
48
+ const innerPage = ref(props.page ?? 1);
49
+ const innerPageSize = ref(props.pageSize ?? 20);
50
+ const innerSort = ref(props.sort ?? null);
51
+ const innerSelected = ref(props.selectedKeys ?? []);
52
+ watch(() => props.page, (value) => value !== void 0 && (innerPage.value = value));
53
+ watch(() => props.pageSize, (value) => value !== void 0 && (innerPageSize.value = value));
54
+ watch(() => props.sort, (value) => innerSort.value = value ?? null);
55
+ watch(() => props.selectedKeys, (value) => value !== void 0 && (innerSelected.value = value));
56
+ const isControlledData = computed(() => props.data !== void 0);
57
+ const isInfinite = computed(() => adapter.capabilities.pagination.mode === "infinite");
58
+ const requestState = useTableRequest({
59
+ request: () => isControlledData.value ? void 0 : props.request,
60
+ params: () => props.params,
61
+ page: innerPage,
62
+ pageSize: innerPageSize,
63
+ sort: () => innerSort.value,
64
+ append: () => isInfinite.value,
65
+ onLoad: (result, params) => emit("load", result, params),
66
+ onError: (error, params) => emit("error", error, params)
67
+ });
68
+ const rows = computed(() => isControlledData.value ? props.data ?? [] : requestState.data.value);
69
+ const total = computed(() => props.total ?? requestState.total.value);
70
+ const loading = computed(() => props.loading ?? requestState.loading.value);
71
+ const errorState = computed(() => isControlledData.value ? null : requestState.error.value);
72
+ const errorSubtitle = computed(
73
+ () => errorState.value instanceof Error ? errorState.value.message : String(errorState.value)
74
+ );
75
+ const selectionEnabled = computed(
76
+ () => props.selection !== false && adapter.capabilities.dataGrid.selection
77
+ );
78
+ const selectionOptions = computed(() => typeof props.selection === "object" ? props.selection : {});
79
+ const selectionWidth = computed(() => selectionOptions.value.columnWidth ?? 48);
80
+ const preserveOnReload = computed(() => selectionOptions.value.preserveOnReload ?? true);
81
+ const columns = computed(
82
+ () => props.columns.filter((column) => !column.hideInTable).map(
83
+ (column) => resolveColumnRenderer(column, {
84
+ Tag: adapter.primitives.Tag,
85
+ // locale 是一等公民:业务侧把 createBusinessKit 的 locale 设成 en-US 后,
86
+ // 金额与日期要跟着变。L1 不读注入上下文,所以在这里显式传下去。
87
+ locale: locale.value
88
+ })
89
+ )
90
+ );
91
+ const gridProps = computed(() => ({
92
+ ...props.uiProps?.grid ?? {},
93
+ columns: columns.value,
94
+ data: rows.value,
95
+ rowKey: props.rowKey,
96
+ loading: loading.value,
97
+ presentation: props.presentation === "auto" ? adapter.capabilities.dataGrid.presentation : props.presentation,
98
+ selectionEnabled: selectionEnabled.value,
99
+ selectionWidth: selectionWidth.value,
100
+ selectedKeys: innerSelected.value,
101
+ sort: innerSort.value,
102
+ emptyText: props.emptyText,
103
+ rowClickable: true,
104
+ loadMore: isInfinite.value && !isControlledData.value && props.pagination !== false,
105
+ finished: requestState.finished.value
106
+ }));
107
+ const showPagination = computed(
108
+ () => props.pagination !== false && !isControlledData.value && !isInfinite.value && !errorState.value
109
+ );
110
+ const paginationOptions = computed(() => {
111
+ const options = typeof props.pagination === "object" ? props.pagination : {};
112
+ return {
113
+ pageSizes: options.pageSizes,
114
+ showTotal: options.showTotal ?? true,
115
+ showJumper: options.showJumper ?? true
116
+ };
117
+ });
118
+ const toolbarAttrs = computed(() => props.uiProps?.toolbar ?? {});
119
+ const paginationAttrs = computed(() => props.uiProps?.pagination ?? {});
120
+ const forwardedCellSlots = computed(
121
+ () => columns.value.map((column) => column.key).filter((key) => Boolean(slots[`cell-${key}`]))
122
+ );
123
+ function onSelectedKeys(keys) {
124
+ innerSelected.value = keys;
125
+ emit("update:selectedKeys", keys);
126
+ }
127
+ const rowKeys = computed(
128
+ () => rows.value.map((row, index) => getRowKey(row, index, props.rowKey))
129
+ );
130
+ const allSelected = computed(
131
+ () => rowKeys.value.length > 0 && rowKeys.value.every((key) => innerSelected.value.includes(key))
132
+ );
133
+ const someSelected = computed(
134
+ () => !allSelected.value && rowKeys.value.some((key) => innerSelected.value.includes(key))
135
+ );
136
+ const selectAllRef = ref();
137
+ watchEffect(() => {
138
+ if (selectAllRef.value) selectAllRef.value.indeterminate = someSelected.value;
139
+ });
140
+ function toggleSelectAll(checked) {
141
+ const current = new Set(innerSelected.value);
142
+ if (checked) rowKeys.value.forEach((key) => current.add(key));
143
+ else rowKeys.value.forEach((key) => current.delete(key));
144
+ onSelectedKeys([...current]);
145
+ }
146
+ function onSort(sort) {
147
+ innerSort.value = sort;
148
+ emit("update:sort", sort);
149
+ if (!isControlledData.value) {
150
+ innerPage.value = 1;
151
+ }
152
+ }
153
+ function onPage(page) {
154
+ innerPage.value = page;
155
+ emit("update:page", page);
156
+ }
157
+ function onPageSize(size) {
158
+ innerPageSize.value = size;
159
+ emit("update:pageSize", size);
160
+ innerPage.value = 1;
161
+ }
162
+ async function reload(options = {}) {
163
+ emit("refresh");
164
+ if (isControlledData.value) return;
165
+ if (isInfinite.value) requestState.finished.value = false;
166
+ if (!preserveOnReload.value) innerSelected.value = [];
167
+ await requestState.reload(options);
168
+ }
169
+ function retry() {
170
+ return reload();
171
+ }
172
+ function clearSelection() {
173
+ innerSelected.value = [];
174
+ emit("update:selectedKeys", []);
175
+ }
176
+ function setSelectedKeys(keys) {
177
+ innerSelected.value = keys;
178
+ emit("update:selectedKeys", keys);
179
+ }
180
+ __expose({
181
+ reload,
182
+ getData: () => rows.value,
183
+ clearSelection,
184
+ setSelectedKeys
185
+ });
186
+ return (_ctx, _cache) => {
187
+ return openBlock(), createElementBlock("div", mergeProps({ class: "fbk-pro-table" }, unref(attrs), {
188
+ class: { "fbk-pro-table--cards": unref(adapter).capabilities.dataGrid.presentation === "cards" }
189
+ }), [
190
+ _ctx.$slots.toolbar ? (openBlock(), createElementBlock("div", mergeProps({
191
+ key: 0,
192
+ class: "fbk-pro-table__toolbar"
193
+ }, toolbarAttrs.value), [
194
+ renderSlot(_ctx.$slots, "toolbar", {
195
+ selectedKeys: innerSelected.value,
196
+ reload
197
+ })
198
+ ], 16)) : createCommentVNode("", true),
199
+ selectionEnabled.value && rowKeys.value.length > 0 && !errorState.value ? (openBlock(), createElementBlock("div", {
200
+ key: 1,
201
+ class: normalizeClass(["fbk-pro-table__bulk", { "fbk-pro-table__bulk--cards": unref(adapter).capabilities.dataGrid.presentation === "cards" }])
202
+ }, [
203
+ createElementVNode("label", _hoisted_1, [
204
+ createElementVNode("input", {
205
+ ref_key: "selectAllRef",
206
+ ref: selectAllRef,
207
+ type: "checkbox",
208
+ checked: allSelected.value,
209
+ onChange: _cache[0] || (_cache[0] = ($event) => toggleSelectAll($event.target.checked))
210
+ }, null, 40, _hoisted_2),
211
+ _cache[2] || (_cache[2] = createElementVNode("span", null, "全选当前页", -1))
212
+ ]),
213
+ innerSelected.value.length ? (openBlock(), createElementBlock("span", _hoisted_3, " 已选 " + toDisplayString(innerSelected.value.length) + " 项 ", 1)) : createCommentVNode("", true),
214
+ renderSlot(_ctx.$slots, "bulk-actions", {
215
+ selectedKeys: innerSelected.value,
216
+ clear: clearSelection
217
+ })
218
+ ], 2)) : createCommentVNode("", true),
219
+ errorState.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
220
+ renderSlot(_ctx.$slots, "error", {
221
+ error: errorState.value,
222
+ retry
223
+ }, () => [
224
+ createVNode(unref(_sfc_main$1), {
225
+ status: "error",
226
+ title: "加载失败",
227
+ subtitle: errorSubtitle.value
228
+ }, {
229
+ default: withCtx(() => [
230
+ createElementVNode("button", {
231
+ type: "button",
232
+ class: "fbk-pro-table__retry",
233
+ onClick: retry
234
+ }, "重试")
235
+ ]),
236
+ _: 1
237
+ }, 8, ["subtitle"])
238
+ ])
239
+ ])) : (openBlock(), createBlock(resolveDynamicComponent(unref(DataGrid)), mergeProps({ key: 3 }, gridProps.value, {
240
+ "onUpdate:selectedKeys": onSelectedKeys,
241
+ "onUpdate:sort": onSort,
242
+ onRowClick: _cache[1] || (_cache[1] = (row, index, event) => emit("row-click", row, index, event)),
243
+ onLoadMore: unref(requestState).loadMore
244
+ }), createSlots({ _: 2 }, [
245
+ renderList(forwardedCellSlots.value, (key) => {
246
+ return {
247
+ name: `cell-${key}`,
248
+ fn: withCtx((slotProps) => [
249
+ renderSlot(_ctx.$slots, `cell-${key}`, normalizeProps(guardReactiveProps(slotProps)))
250
+ ])
251
+ };
252
+ }),
253
+ _ctx.$slots["card-footer"] ? {
254
+ name: "card-footer",
255
+ fn: withCtx((slotProps) => [
256
+ renderSlot(_ctx.$slots, "card-footer", normalizeProps(guardReactiveProps(slotProps)))
257
+ ]),
258
+ key: "0"
259
+ } : void 0
260
+ ]), 1040, ["onLoadMore"])),
261
+ showPagination.value ? (openBlock(), createElementBlock("div", mergeProps({
262
+ key: 4,
263
+ class: "fbk-pro-table__pagination"
264
+ }, paginationAttrs.value), [
265
+ (openBlock(), createBlock(resolveDynamicComponent(unref(Pagination)), {
266
+ page: innerPage.value,
267
+ "page-size": innerPageSize.value,
268
+ total: total.value,
269
+ "page-sizes": paginationOptions.value.pageSizes,
270
+ "show-total": paginationOptions.value.showTotal,
271
+ "show-jumper": paginationOptions.value.showJumper,
272
+ "onUpdate:page": onPage,
273
+ "onUpdate:pageSize": onPageSize
274
+ }, null, 40, ["page", "page-size", "total", "page-sizes", "show-total", "show-jumper"]))
275
+ ], 16)) : createCommentVNode("", true)
276
+ ], 16);
277
+ };
278
+ }
279
+ });
280
+ export {
281
+ _sfc_main as default
282
+ };
283
+ //# sourceMappingURL=ProTable.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProTable.vue.mjs","sources":["../../src/pro-table/ProTable.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T extends Record<string, any>\">\nimport { computed, ref, useAttrs, useSlots, watch, watchEffect } from 'vue'\nimport type { Slots } from 'vue'\nimport { useAdapter, useFbkTheme } from '@fbkworks/adapter-core'\nimport type { SortState } from '@fbkworks/adapter-core'\nimport type { Key, RowKeyGetter } from '@fbkworks/shared'\nimport { getRowKey } from '@fbkworks/shared'\nimport { FbkResult } from '../result'\nimport type { ProTableColumn, ProTableExpose, ProTableProps } from './types'\nimport { useTableRequest } from './use-table-request'\nimport { resolveColumnRenderer } from './value-renderer'\n\ndefineOptions({ name: 'FbkProTable', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ProTableProps<T>>(), {\n rowKey: 'id',\n data: undefined,\n request: undefined,\n params: () => ({}),\n loading: undefined,\n emptyText: '暂无数据',\n presentation: 'auto',\n page: undefined,\n pageSize: undefined,\n total: undefined,\n pagination: undefined,\n selection: false,\n selectedKeys: undefined,\n sort: undefined,\n toolbar: true,\n})\n\nconst attrs = useAttrs()\n\nconst emit = defineEmits<{\n 'update:selectedKeys': [keys: Key[]]\n 'update:page': [page: number]\n 'update:pageSize': [size: number]\n 'update:sort': [sort: SortState | null]\n 'row-click': [row: T, index: number, event: Event]\n load: [result: { list: T[]; total?: number; hasMore?: boolean }, params: any]\n error: [error: unknown, params: any]\n refresh: []\n}>()\n\nconst adapter = useAdapter()\nconst { locale } = useFbkTheme()\nconst slots: Slots = useSlots()\nconst { DataGrid, Pagination } = adapter.primitives\n\nconst innerPage = ref(props.page ?? 1)\nconst innerPageSize = ref(props.pageSize ?? 20)\nconst innerSort = ref<SortState | null>(props.sort ?? null)\nconst innerSelected = ref<Key[]>(props.selectedKeys ?? [])\n\nwatch(() => props.page, (value) => value !== undefined && (innerPage.value = value))\nwatch(() => props.pageSize, (value) => value !== undefined && (innerPageSize.value = value))\nwatch(() => props.sort, (value) => (innerSort.value = value ?? null))\nwatch(() => props.selectedKeys, (value) => value !== undefined && (innerSelected.value = value))\n\nconst isControlledData = computed(() => props.data !== undefined)\nconst isInfinite = computed(() => adapter.capabilities.pagination.mode === 'infinite')\n\nconst requestState = useTableRequest<T>({\n request: () => (isControlledData.value ? undefined : props.request),\n params: () => props.params,\n page: innerPage,\n pageSize: innerPageSize,\n sort: () => innerSort.value,\n append: () => isInfinite.value,\n onLoad: (result, params) => emit('load', result, params),\n onError: (error, params) => emit('error', error, params),\n})\n\nconst rows = computed<T[]>(() => (isControlledData.value ? (props.data ?? []) : requestState.data.value))\nconst total = computed(() => props.total ?? requestState.total.value)\nconst loading = computed(() => props.loading ?? requestState.loading.value)\n\n/**\n * 请求失败态。requestState.error 此前没人读 —— reject 后 data 仍是 [],\n * 表格渲染「暂无数据」,用户读到的是「没有数据」而不是「加载失败」。\n *\n * 受控 data 模式下 request 不会被调用,error 恒为 null;这里仍显式短路,\n * 避免运行时从 request 切到 data 后留下一块拆不掉的错误页。\n */\nconst errorState = computed(() => (isControlledData.value ? null : requestState.error.value))\n\nconst errorSubtitle = computed(() =>\n errorState.value instanceof Error ? errorState.value.message : String(errorState.value),\n)\n\nconst selectionEnabled = computed(\n () => props.selection !== false && adapter.capabilities.dataGrid.selection,\n)\n\n/** 只在真的渲染选择列时才读,避免 false/{} 两种写法各写一套取值逻辑 */\nconst selectionOptions = computed(() => (typeof props.selection === 'object' ? props.selection : {}))\n\nconst selectionWidth = computed(() => selectionOptions.value.columnWidth ?? 48)\n/** 默认 true:翻页后保留已选行,这是 ProTable 的既有行为 */\nconst preserveOnReload = computed(() => selectionOptions.value.preserveOnReload ?? true)\n\nconst columns = computed<ProTableColumn<T>[]>(() =>\n props.columns\n .filter((column) => !column.hideInTable)\n .map((column) =>\n resolveColumnRenderer(column, {\n Tag: adapter.primitives.Tag,\n // locale 是一等公民:业务侧把 createBusinessKit 的 locale 设成 en-US 后,\n // 金额与日期要跟着变。L1 不读注入上下文,所以在这里显式传下去。\n locale: locale.value,\n }),\n ),\n)\n\nconst gridProps = computed(() => ({\n ...(props.uiProps?.grid ?? {}),\n columns: columns.value,\n data: rows.value,\n rowKey: props.rowKey,\n loading: loading.value,\n presentation: props.presentation === 'auto' ? adapter.capabilities.dataGrid.presentation : props.presentation,\n selectionEnabled: selectionEnabled.value,\n selectionWidth: selectionWidth.value,\n selectedKeys: innerSelected.value,\n sort: innerSort.value,\n emptyText: props.emptyText,\n rowClickable: true,\n loadMore: isInfinite.value && !isControlledData.value && props.pagination !== false,\n finished: requestState.finished.value,\n}))\n\nconst showPagination = computed(\n () =>\n props.pagination !== false &&\n !isControlledData.value &&\n !isInfinite.value &&\n !errorState.value,\n)\n\n/**\n * `pagination` 有两种形态(false / 配置对象),原先三处各写一遍\n * `typeof pagination === 'object' ? ... : 默认值`,改一处就容易漏另一处。\n * 这里收敛成一个对象,模板只读字段。\n */\nconst paginationOptions = computed(() => {\n const options = typeof props.pagination === 'object' ? props.pagination : {}\n return {\n pageSizes: options.pageSizes,\n showTotal: options.showTotal ?? true,\n showJumper: options.showJumper ?? true,\n }\n})\n\n/** 空对象而不是 undefined:让模板里 v-bind 的写法统一,不必每处写可选链 */\nconst toolbarAttrs = computed(() => props.uiProps?.toolbar ?? {})\nconst paginationAttrs = computed(() => props.uiProps?.pagination ?? {})\n\nconst forwardedCellSlots = computed<string[]>(() =>\n columns.value.map((column) => column.key).filter((key) => Boolean(slots[`cell-${key}`])),\n)\n\nfunction onSelectedKeys(keys: Key[]) {\n innerSelected.value = keys\n emit('update:selectedKeys', keys)\n}\n\n/* ------------------------------------------------------------------\n 表头全选\n 适配器的选择列只能勾单行,表头那个「全选」框由 ProTable 自己渲染,\n 这样才能同时兼容三种适配器(vant 的卡片列表根本没有表头)。\n ------------------------------------------------------------------ */\n\nconst rowKeys = computed<Key[]>(() =>\n rows.value.map((row, index) => getRowKey(row, index, props.rowKey as RowKeyGetter<T>)),\n)\n\nconst allSelected = computed(\n () => rowKeys.value.length > 0 && rowKeys.value.every((key) => innerSelected.value.includes(key)),\n)\n\nconst someSelected = computed(\n () => !allSelected.value && rowKeys.value.some((key) => innerSelected.value.includes(key)),\n)\n\n/** indeterminate 只能通过 DOM 属性设置 */\nconst selectAllRef = ref<HTMLInputElement>()\nwatchEffect(() => {\n if (selectAllRef.value) selectAllRef.value.indeterminate = someSelected.value\n})\n\nfunction toggleSelectAll(checked: boolean) {\n const current = new Set(innerSelected.value)\n if (checked) rowKeys.value.forEach((key) => current.add(key))\n else rowKeys.value.forEach((key) => current.delete(key))\n onSelectedKeys([...current])\n}\n\nfunction onSort(sort: SortState | null) {\n innerSort.value = sort\n emit('update:sort', sort)\n if (!isControlledData.value) {\n innerPage.value = 1\n }\n}\n\nfunction onPage(page: number) {\n innerPage.value = page\n emit('update:page', page)\n}\n\nfunction onPageSize(size: number) {\n innerPageSize.value = size\n emit('update:pageSize', size)\n innerPage.value = 1\n}\n\nasync function reload(options: { resetPage?: boolean } = {}) {\n emit('refresh')\n if (isControlledData.value) return\n if (isInfinite.value) requestState.finished.value = false\n // 重新查询后旧行的 key 通常已经不存在了,默认保留;显式关闭时清空\n if (!preserveOnReload.value) innerSelected.value = []\n await requestState.reload(options)\n}\n\n/** 显式转一层:插槽把 retry 当 onClick 用时会把 MouseEvent 传进 options */\nfunction retry() {\n return reload()\n}\n\nfunction clearSelection() {\n innerSelected.value = []\n emit('update:selectedKeys', [])\n}\n\nfunction setSelectedKeys(keys: Key[]) {\n innerSelected.value = keys\n emit('update:selectedKeys', keys)\n}\n\ndefineExpose<ProTableExpose<T>>({\n reload,\n getData: () => rows.value,\n clearSelection,\n setSelectedKeys,\n})\n</script>\n\n<template>\n <div class=\"fbk-pro-table\" v-bind=\"attrs\" :class=\"{ 'fbk-pro-table--cards': adapter.capabilities.dataGrid.presentation === 'cards' }\">\n\n <!-- toolbar 默认 true 只表示「允许工具栏」。没有插槽时不该渲染容器 ——\n 虽然 :empty 能兜住,但少一个空节点对可访问性和 DOM 快照都更干净。 -->\n <div v-if=\"$slots.toolbar\" class=\"fbk-pro-table__toolbar\" v-bind=\"toolbarAttrs\">\n <slot name=\"toolbar\" :selected-keys=\"innerSelected\" :reload=\"reload\" />\n </div>\n\n <!-- 表头全选 + 批量操作。\n 位置在工具栏**之后**:主操作(新建/导出)是常驻的,应该在上面;\n 批量条是选中后才出现的次要操作,紧贴表格更符合后台惯例。\n 早期放在工具栏之前,导致「新建」被挤到批量条下方,层级颠倒。\n 卡片模式(vant)没有表头,放在工具栏里反而更自然。 -->\n <div\n v-if=\"selectionEnabled && rowKeys.length > 0 && !errorState\"\n class=\"fbk-pro-table__bulk\"\n :class=\"{ 'fbk-pro-table__bulk--cards': adapter.capabilities.dataGrid.presentation === 'cards' }\"\n >\n <label class=\"fbk-pro-table__select-all\">\n <!-- indeterminate 是 DOM 属性不是 HTML attribute,:indeterminate 绑定不会生效,\n 必须用 ref 手动写。否则「部分选中」显示成未选中,用户会误以为没选。 -->\n <input\n ref=\"selectAllRef\"\n type=\"checkbox\"\n :checked=\"allSelected\"\n @change=\"toggleSelectAll(($event.target as HTMLInputElement).checked)\"\n />\n <span>全选当前页</span>\n </label>\n <span v-if=\"innerSelected.length\" class=\"fbk-pro-table__selected-count\">\n 已选 {{ innerSelected.length }} 项\n </span>\n <slot name=\"bulk-actions\" :selected-keys=\"innerSelected\" :clear=\"clearSelection\" />\n </div>\n\n <!-- 失败时整块换成错误态,不叠在表格上方:翻页失败时 data 里\n 还留着上一页的行,错误提示与旧数据并存,用户分不清看到的是哪一页。 -->\n <div v-if=\"errorState\" class=\"fbk-pro-table__error\">\n <slot name=\"error\" :error=\"errorState\" :retry=\"retry\">\n <FbkResult status=\"error\" title=\"加载失败\" :subtitle=\"errorSubtitle\">\n <template #default>\n <button type=\"button\" class=\"fbk-pro-table__retry\" @click=\"retry\">重试</button>\n </template>\n </FbkResult>\n </slot>\n </div>\n\n <component\n v-else\n :is=\"DataGrid\"\n v-bind=\"gridProps\"\n @update:selected-keys=\"onSelectedKeys\"\n @update:sort=\"onSort\"\n @row-click=\"(row: T, index: number, event: Event) => emit('row-click', row, index, event)\"\n @load-more=\"requestState.loadMore\"\n >\n <!-- 只转发用户真正提供的插槽,避免空插槽覆盖适配器的默认单元格渲染 -->\n <template v-for=\"key in forwardedCellSlots\" #[`cell-${key}`]=\"slotProps\" :key=\"key\">\n <slot :name=\"`cell-${key}`\" v-bind=\"slotProps\" />\n </template>\n <template v-if=\"$slots['card-footer']\" #card-footer=\"slotProps\">\n <slot name=\"card-footer\" v-bind=\"slotProps\" />\n </template>\n </component>\n\n <div v-if=\"showPagination\" class=\"fbk-pro-table__pagination\" v-bind=\"paginationAttrs\">\n <component\n :is=\"Pagination\"\n :page=\"innerPage\"\n :page-size=\"innerPageSize\"\n :total=\"total\"\n :page-sizes=\"paginationOptions.pageSizes\"\n :show-total=\"paginationOptions.showTotal\"\n :show-jumper=\"paginationOptions.showJumper\"\n @update:page=\"onPage\"\n @update:page-size=\"onPageSize\"\n />\n </div>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_unref","$slots","_renderSlot","_normalizeClass","_createElementVNode","_createVNode","FbkResult","_createBlock","_resolveDynamicComponent","_renderList","_withCtx","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;;;;;;;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+1,5 @@
1
+ import _sfc_main from "./ProTable.vue.mjs";
2
+ export {
3
+ _sfc_main as default
4
+ };
5
+ //# sourceMappingURL=ProTable2.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProTable2.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ export { default as FbkProTable } from './ProTable.js';
2
+ export type { ProTableAction, ProTableActionContext, ProTableColumn, ProTableExpose, ProTableProps, ProTableSlots, ProTableUiProps, TableRequest, TableRequestParams, TableResponse, ValueEnumItem, ValueType, } from './types.js';
3
+ export { useTableRequest } from './use-table-request.js';
@@ -0,0 +1,7 @@
1
+ import { default as default2 } from "./ProTable.vue.mjs";
2
+ import { useTableRequest } from "./use-table-request.mjs";
3
+ export {
4
+ default2 as FbkProTable,
5
+ useTableRequest
6
+ };
7
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}